Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(refs T19759): update vuex to v4 [vue 3 upgrade] #2405

Merged
merged 51 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4a96784
fix(refs T19759): Make the page load.
salisdemos Oct 11, 2023
19815ad
Merge branch 'f_vue3_compat_mode_setup' into f_vue3_hotfixes
salisdemos Oct 30, 2023
d5d7d32
chore: Refactor out vue.set
salisdemos Oct 31, 2023
52f9994
chore: Refactor usage of $parent
salisdemos Oct 31, 2023
ca53c2e
chore: For migrationg-Purpose set a dedicated hash for demosplan-ui a…
salisdemos Oct 31, 2023
ef064f7
fix: Prevent undefined assignee
salisdemos Oct 31, 2023
cd2d7a1
chore(refs T19759): Move keys from template to inner (real) element(s)
salisdemos Nov 2, 2023
e3c7136
chore(refs T19759): Comment out portal-vue to prevent errors (for now)
salisdemos Nov 2, 2023
25c86c2
Merge branch 'f_vue3_compat_mode_setup' into f_vue3_hotfixes
salisdemos Nov 2, 2023
2b336fb
chore(refs T19759): Move label Key to template
salisdemos Nov 6, 2023
d7e9396
chore(refs T19759): Update Yarn.lock
salisdemos Nov 6, 2023
5df8a97
chore(refs T19759): Bump demosplan-ui
salisdemos Nov 6, 2023
115a620
fix(refs T19759): Use $refs instead of $el
salisdemos Nov 9, 2023
9d7cfeb
fix(refs T19759): replace `del` and `set` with native code
salisdemos Nov 9, 2023
dfc8dc5
Update client/js/components/procedure/publicindex/DpSearchProcedureMa…
salisdemos Nov 13, 2023
47d5cde
Update client/js/components/statement/DpStatementAnonymize.vue
salisdemos Nov 13, 2023
8befa91
Update templates/bundles/DemosPlanCoreBundle/Extension/contextual_hel…
salisdemos Nov 13, 2023
fd9fd91
refactor(refs T19759): remove productionTip
hwiem Nov 14, 2023
a919a3a
refactor(refs T19759): define whitespace option
hwiem Nov 14, 2023
11bc1b9
refactor(refs T19759): replace Vue.set()
hwiem Nov 14, 2023
b88c6d9
feat(refs T19759): add build feature flags
hwiem Nov 14, 2023
ed92336
feat(refs T19759): replace Vue.prototype
hwiem Nov 14, 2023
06e7a71
fix(refs T19759): use new hooks
hwiem Nov 14, 2023
57413fe
fix(refs T19759): replace this.$set
hwiem Nov 16, 2023
ad6d8d4
fix(refs T19759): remove unused attribute
hwiem Nov 17, 2023
5a36ef5
fix(refs T19759): default to null
hwiem Nov 17, 2023
0d24cba
fix(refs T19759): rename beforeDestroy to beforeUnmount
hwiem Nov 20, 2023
3e9315c
Merge branch 'f_vue3_compat_mode_setup' into m_integration_branch_int…
hwiem Nov 20, 2023
9ee55ad
build(refs T19759): update yarn.lock
hwiem Nov 20, 2023
699e5c8
feat(refs T19759): use deep watcher
hwiem Nov 21, 2023
65e0724
refactor(refs T19759): make filtermodal work again
hwiem Nov 24, 2023
53d3a59
build(refs T19759): remove portal-vue
hwiem Nov 27, 2023
2b0232c
fix(refs T19759): fix deleting of selected options
hwiem Nov 29, 2023
9c86b24
style(refs T19759): improve code style
hwiem Nov 29, 2023
87d8bea
build(refs T19759): remove unnecessary dependency
hwiem Nov 29, 2023
96a9eb1
build(refs T19759): update package.json
hwiem Nov 30, 2023
1b4ca76
Merge branch 'f_vue3_compat_mode_setup' into f_T19759_filter_modal
hwiem Nov 30, 2023
23ed3e5
build(refs T19759): update yarn.lock after merge
hwiem Nov 30, 2023
d56d664
refactor(refs T19759): set isActive for DpTab
hwiem Nov 30, 2023
29f8a48
build(refs T19759): update demosplan-ui
hwiem Nov 30, 2023
d868309
build(refs T19759): update vuex to v4
hwiem Dec 1, 2023
ab7a304
docs(refs T19759): remove redundant documentation comments
hwiem Dec 5, 2023
a9d82aa
refactor(refs T19759): declare emitted events
hwiem Dec 5, 2023
7c88f09
refactor(refs T19759): define async components
hwiem Dec 5, 2023
3bf8e6c
build(refs T19759): update dependencies
hwiem Dec 5, 2023
9fe4066
Merge branch 'f_vue3_compat_mode_setup' into m_f_vue3_compat_mode_set…
hwiem Dec 6, 2023
8479fcf
build(refs T19759): update yarn.lock after merge
hwiem Dec 6, 2023
842a7f9
build(refs T19759): link dependencies to feature branches
hwiem Dec 6, 2023
2952d8c
build(refs T19759): add missing yarn.lock
hwiem Dec 6, 2023
f7586a2
build(refs T19759): disable devtools in prod mode
hwiem Dec 6, 2023
e652ede
build(refs T19759): set demosplan-ui to integration branch
hwiem Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/js/InitVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function initialize (components = {}, storeModules = {}, apiStoreModules = [], p

return initStore(storeModules, apiStoreModules, presetStoreModules).then(store => {
const app = createApp({
store,
mounted () {
window.dplan.notify = new NotificationStoreAdapter(this.$store)
loadLibs()
Expand Down Expand Up @@ -76,6 +75,8 @@ function initialize (components = {}, storeModules = {}, apiStoreModules = [], p
app.directive('dp-validate-multiselect', dpValidateMultiselectDirective)
app.directive('tooltip', Tooltip)

app.use(store)

// Add plugins to Vue instance
app.use(DPVueCorePlugin)

Expand Down
5 changes: 3 additions & 2 deletions client/js/components/user/DpCreateItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

<script>
import { DpAccordion, DpButtonRow, dpValidateMixin } from '@demos-europe/demosplan-ui'
import { defineAsyncComponent } from 'vue'
import { mapActions, mapState } from 'vuex'

export default {
Expand All @@ -67,8 +68,8 @@ export default {
components: {
DpAccordion,
DpButtonRow,
DpOrganisationFormFields: () => import(/* webpackChunkName: "organisation-form-fields" */ './DpOrganisationList/DpOrganisationFormFields'),
DpUserFormFields: () => import(/* webpackChunkName: "user-form-fields" */ './DpUserList/DpUserFormFields')
DpOrganisationFormFields: defineAsyncComponent(() => import('./DpOrganisationList/DpOrganisationFormFields')),
DpUserFormFields: defineAsyncComponent(() => import('./DpUserList/DpUserFormFields'))
},

mixins: [dpValidateMixin],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,10 @@ export default {
cleanhtml: CleanHtml
},

emits: [
'organisation-update'
],

props: {
availableOrgaTypes: {
type: Array,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
All rights reserved
</license>

<documentation>
<!--
Component that is used to display list of editable items
-->

</documentation>

<template>
<div class="u-mt-0_5">
<!-- List of pending organisations (if orga-self-registration is active) -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
All rights reserved
</license>

<documentation>
<!-- This component is used as a wrapper for DpItem to display organisation data that can be editable -->
</documentation>

<template>
<dp-table-card
:id="organisation.id"
Expand All @@ -27,13 +23,13 @@
data-cy="organisationItemSelect"
@change="$emit('item:selected', organisation.id)">
<div
@click="isOpen = false === isOpen"
@click="isOpen = !isOpen"
class="weight--bold cursor-pointer o-hellip--nowrap u-pv-0_75 u-ph-0_25 grow"
data-cy="organisationListTitle">
{{ initialOrganisation.attributes.name }}
</div>
<button
@click="isOpen = false === isOpen"
@click="isOpen = !isOpen"
type="button"
data-cy="accordionToggleBtn"
class="btn--blank o-link--default">
Expand Down Expand Up @@ -72,6 +68,7 @@
<script>
import { DpButtonRow, DpIcon, dpValidateMixin } from '@demos-europe/demosplan-ui'
import DpTableCard from '@DpJs/components/user/DpTableCardList/DpTableCard'
import { defineAsyncComponent } from 'vue'
import { mapState } from 'vuex'

export default {
Expand All @@ -80,7 +77,7 @@ export default {
components: {
DpButtonRow,
DpIcon,
DpOrganisationFormFields: () => import(/* webpackChunkName: "organisation-form-fields" */ './DpOrganisationFormFields'),
DpOrganisationFormFields: defineAsyncComponent(() => import('./DpOrganisationFormFields')),
DpTableCard
},

Expand Down
5 changes: 5 additions & 0 deletions client/js/components/user/DpUserList/DpUserFormFields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ import qs from 'qs'

export default {
name: 'DpUserFormFields',

components: {
DpMultiselect
},
Expand All @@ -185,6 +186,10 @@ export default {
'projectName'
],

emits: [
'user-update'
],

props: {
user: {
type: Object,
Expand Down
7 changes: 4 additions & 3 deletions client/js/components/user/DpUserList/DpUserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@

<script>
import { debounce, DpButton, DpLoading, dpSelectAllMixin, hasOwnProp } from '@demos-europe/demosplan-ui'
import { defineAsyncComponent } from 'vue'
import { mapActions, mapState } from 'vuex'

export default {
Expand All @@ -114,11 +115,11 @@ export default {
components: {
DpButton,
DpLoading,
DpSlidingPagination: async () => {
DpSlidingPagination: defineAsyncComponent(async () => {
const { DpSlidingPagination } = await import('@demos-europe/demosplan-ui')
return DpSlidingPagination
},
DpUserListItem: () => import(/* webpackChunkName: "user-list-item" */ './DpUserListItem')
}),
DpUserListItem: defineAsyncComponent(() => import('./DpUserListItem'))
},

mixins: [dpSelectAllMixin],
Expand Down
4 changes: 4 additions & 0 deletions client/js/components/user/DpUserList/DpUserListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ export default {
DpUserFormFields
},

emits: [
'item:selected'
],

mixins: [dpValidateMixin],

props: {
Expand Down
6 changes: 3 additions & 3 deletions client/js/store/core/initStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { checkResponse, handleResponseMessages, hasOwnProp } from '@demos-europe/demosplan-ui'
import { initJsonApiPlugin, prepareModuleHashMap, StaticRouter } from '@efrane/vuex-json-api'
import notify from './Notify'
import Vuex from 'vuex'
import { createStore } from 'vuex'
import { VuexApiRoutes } from './VuexApiRoutes'

function registerPresetModules (store, presetStoreModules) {
Expand Down Expand Up @@ -54,9 +54,9 @@ function initStore (storeModules, apiStoreModules, presetStoreModules) {
return router
.updateRoutes()
.then(router => {
const store = new Vuex.Store({
const store = createStore({
strict: process.env.NODE_ENV !== 'production',

devtools: true,
hwiem marked this conversation as resolved.
Show resolved Hide resolved
modules: prepareModuleHashMap(staticModules),
plugins: [
initJsonApiPlugin({
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@
"lint:scss": "stylelint {demosplan/DemosPlanCoreBundle/Resources/client/scss,projects}/**/*.scss"
},
"dependencies": {
"@demos-europe/demosplan-ui": "github:demos-europe/demosplan-ui#i_vue3_migration",
"@demos-europe/demosplan-ui": "github:demos-europe/demosplan-ui#f_T19759_update_vue_deps",
"@demos-europe/dp-consent": "^1.1.2",
"@efrane/vuex-json-api": "0.0.38",
"@efrane/vuex-json-api": "github:efrane/vuex-json-api#f_update_vue",
"@masterportal/masterportalapi": "^2.19.2",
"@sentry/browser": "^7.66.0",
"@sentry/integrations": "^7.74.1",
"@sentry/tracing": "^7.76.0",
"@uppy/core": "^3.5.0",
"@uppy/drag-drop": "^3.0.3",
"@uppy/progress-bar": "^3.0.3",
"@vue/compat": "3.1.5",
"@vue/compiler-sfc": "3.1.5",
"@vue/compat": "3.2.0",
"@vue/compiler-sfc": "3.2.0",
"a11y-datepicker": " ^0.9.0",
"core-js": "^3.33.1",
"d3": "^7.8.5",
Expand Down Expand Up @@ -90,15 +90,14 @@
"timers-browserify": "^2.0.12",
"tippy.js": "^6.3.7",
"uuid": "^9.0.1",
"vue": "3.1.5",
"vue": "3.2.0",
"vue-scrollto": "^2.20.0",
"vue-sliding-pagination": "^1.3.2",
"vue-template-compiler": "^2.7.15",
"vue2-leaflet": "^2.7.1",
"vue2-leaflet-markercluster": "^3.1.0",
"vuedraggable": "^2.24.3",
"vuejs-datepicker": "^1.5.4",
"vuex": "^3.6.2"
"vuex": "^4.0.2"
},
"devDependencies": {
"@babel/core": "^7.23.2",
Expand Down
Loading