From a02388fb099511aebb9563596633ab536011e9d4 Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Fri, 9 Aug 2024 16:44:06 +0200 Subject: [PATCH 01/68] Initial setup and cleaup for admin-app and admin-lib: - vue3 - cleanup unused deps - login available - first age available --- web-app/package.json | 8 +- web-app/packages/admin-app/.eslintrc.cjs | 11 +- web-app/packages/admin-app/components.d.ts | 1 + web-app/packages/admin-app/package.json | 28 +- web-app/packages/admin-app/src/App.vue | 293 +++------- web-app/packages/admin-app/src/app.ts | 89 ++- web-app/packages/admin-app/src/main.ts | 19 +- .../modules/layout/components/AppHeader.vue | 9 + .../src/modules/layout/components/Sidebar.vue | 29 + .../src/modules/user/index.ts | 0 .../src/modules/user/views/LoginView.vue | 4 +- .../src/modules/user/views/index.ts | 0 .../admin-app/src/plugins/i18n/i18n.ts | 22 +- .../admin-app/src/plugins/vuetify/vuetify.ts | 32 -- web-app/packages/admin-app/src/router.ts | 399 +++++++------ .../admin-app/src/sass/overrides.sass | 8 - .../packages/admin-app/src/shims-pinia.d.ts | 7 + .../admin-app/src/shims-vue-router.d.ts | 9 + web-app/packages/admin-app/src/shims-vue.d.ts | 15 +- web-app/packages/admin-app/src/store.ts | 10 +- web-app/packages/admin-app/vite.config.ts | 18 +- web-app/packages/admin-lib/.eslintrc.cjs | 13 +- web-app/packages/admin-lib/components.d.ts | 34 +- web-app/packages/admin-lib/package.json | 26 +- .../admin-lib/src/modules/admin/adminApi.ts | 4 +- .../modules/admin/components/AdminLayout.vue | 44 +- .../admin/components/AdminProjectsTable.vue | 2 +- .../admin/components/CheckForUpdates.vue | 53 +- .../admin/components/CreateUserForm.vue | 2 +- .../admin/components/DashboardCoreAppBar.vue | 108 ---- .../admin/components/DashboardCoreDrawer.vue | 228 -------- .../admin/components/ProjectsViewTemplate.vue | 72 ++- .../admin/components/ServerNotConfigured.vue | 111 ++-- .../admin/components/UsageInformationCard.vue | 2 +- .../src/modules/admin/components/index.ts | 2 - .../admin-lib/src/modules/admin/index.ts | 1 + .../admin-lib/src/modules/admin/module.ts | 2 +- .../admin-lib/src/modules/admin/routes.ts | 4 + .../admin-lib/src/modules/admin/store.ts | 2 +- .../admin-lib/src/modules/admin/types.ts | 2 +- .../src/modules/admin/views/AccountsView.vue | 32 +- .../src/modules/admin/views/ProfileView.vue | 233 ++++---- .../admin/views/SettingsViewTemplate.vue | 12 +- .../packages/admin-lib/src/modules/index.ts | 2 - .../modules/layout/components/AppHeader.vue | 27 - .../src/modules/layout/components/index.ts | 5 - .../admin-lib/src/modules/layout/index.ts | 5 - .../project/views/ProjectSettingsView.vue | 15 +- .../src/modules/project/views/ProjectView.vue | 2 +- .../packages/admin-lib/src/modules/types.ts | 2 +- .../admin-lib/src/sass/overrides.sass | 7 - web-app/packages/admin-lib/vite.config.ts | 23 +- web-app/packages/app/cypress.json | 14 - web-app/packages/app/package.json | 7 +- web-app/packages/app/src/App.vue | 4 - web-app/packages/app/src/app.ts | 14 +- web-app/packages/app/src/main.ts | 6 + .../modules/layout/components/AppHeader.vue | 8 +- web-app/packages/app/src/shims-pinia.d.ts | 7 + web-app/packages/app/vite.config.ts | 11 - web-app/packages/lib-vue2/package.json | 1 + web-app/packages/lib/package.json | 5 +- .../common/components/FullStorageWarning.vue | 9 +- .../layout/components/SideBarTemplate.vue | 45 +- .../lib/src/modules/project/projectApi.ts | 14 +- .../packages/lib/src/modules/project/store.ts | 36 +- .../project/views/FileVersionDetailView.vue | 150 +++-- web-app/packages/lib/vite.config.ts | 19 +- web-app/yarn.lock | 526 ++++++------------ 69 files changed, 1081 insertions(+), 1883 deletions(-) create mode 100644 web-app/packages/admin-app/src/modules/layout/components/AppHeader.vue create mode 100644 web-app/packages/admin-app/src/modules/layout/components/Sidebar.vue rename web-app/packages/{admin-lib => admin-app}/src/modules/user/index.ts (100%) rename web-app/packages/{admin-lib => admin-app}/src/modules/user/views/LoginView.vue (89%) rename web-app/packages/{admin-lib => admin-app}/src/modules/user/views/index.ts (100%) delete mode 100644 web-app/packages/admin-app/src/plugins/vuetify/vuetify.ts delete mode 100644 web-app/packages/admin-app/src/sass/overrides.sass create mode 100644 web-app/packages/admin-app/src/shims-pinia.d.ts create mode 100644 web-app/packages/admin-app/src/shims-vue-router.d.ts delete mode 100644 web-app/packages/admin-lib/src/modules/admin/components/DashboardCoreAppBar.vue delete mode 100644 web-app/packages/admin-lib/src/modules/admin/components/DashboardCoreDrawer.vue delete mode 100644 web-app/packages/admin-lib/src/modules/layout/components/AppHeader.vue delete mode 100644 web-app/packages/admin-lib/src/modules/layout/components/index.ts delete mode 100644 web-app/packages/admin-lib/src/modules/layout/index.ts delete mode 100644 web-app/packages/admin-lib/src/sass/overrides.sass delete mode 100644 web-app/packages/app/cypress.json create mode 100644 web-app/packages/app/src/shims-pinia.d.ts diff --git a/web-app/package.json b/web-app/package.json index 50771c7c..3ccd6578 100755 --- a/web-app/package.json +++ b/web-app/package.json @@ -51,7 +51,6 @@ "@typescript-eslint/eslint-plugin": "^5.61.0", "@typescript-eslint/parser": "^5.61.0", "@vitejs/plugin-vue": "^4.6.2", - "@vitejs/plugin-vue2": "^2.2.0", "@vue/eslint-config-standard": "^8.0.1", "@vue/eslint-config-typescript": "^11.0.2", "agent-base": "^6.0.2", @@ -69,18 +68,19 @@ "prettier": "2.6.0", "purgecss": "^5.0.0", "rimraf": "^3.0.2", - "rollup-plugin-copy": "^3.4.0", + "sass": "^1.69.5", "tsc-alias": "^1.8.6", "typescript": "^5.0.4", "unplugin-vue-components": "^0.25.1", "vite": "^4.5.3", "vite-plugin-static-copy": "^0.17.0", - "vite-plugin-vuetify": "^1.0.2", "vue-tsc": "^1.6.5" }, "engines": { "node": ">=18" }, "version": "0.0.0", - "dependencies": {} + "dependencies": { + "@vitejs/plugin-vue2": "^2.3.1" + } } diff --git a/web-app/packages/admin-app/.eslintrc.cjs b/web-app/packages/admin-app/.eslintrc.cjs index 51dfd9e4..9a294e26 100644 --- a/web-app/packages/admin-app/.eslintrc.cjs +++ b/web-app/packages/admin-app/.eslintrc.cjs @@ -1,11 +1,9 @@ module.exports = { - env: { - node: true - }, extends: [ 'plugin:vue/essential', 'eslint:recommended', - '@vue/typescript/recommended' + '@vue/typescript/recommended', + '../../.eslintrc.cjs' ], parser: 'vue-eslint-parser', parserOptions: { @@ -16,6 +14,9 @@ module.exports = { plugins: ['@typescript-eslint'], rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + // Vue 3 opt https://v3-migration.vuejs.org/breaking-changes/key-attribute.html#with-template-v-for + 'vue/no-v-for-template-key-on-child': 'error', + 'vue/no-v-for-template-key': 'off', } } diff --git a/web-app/packages/admin-app/components.d.ts b/web-app/packages/admin-app/components.d.ts index 277cd1f0..97368df8 100644 --- a/web-app/packages/admin-app/components.d.ts +++ b/web-app/packages/admin-app/components.d.ts @@ -7,6 +7,7 @@ export {} declare module 'vue' { export interface GlobalComponents { + PDivider: typeof import('primevue/divider')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] VApp: typeof import('vuetify/lib')['VApp'] diff --git a/web-app/packages/admin-app/package.json b/web-app/packages/admin-app/package.json index 1324ede8..b7b59ccb 100644 --- a/web-app/packages/admin-app/package.json +++ b/web-app/packages/admin-app/package.json @@ -3,10 +3,10 @@ "version": "1.0.0", "private": true, "scripts": { - "dev": "vue-demi-switch 2.7 && vite --port 8081", + "dev": "vue-demi-switch 3 && vite --port 8081", "preview": "vite preview --port 8081", - "build": "vue-demi-switch 2.7 && vite build", - "build:dev": "vue-demi-switch 2.7 && vite build --mode development", + "build": "vue-demi-switch 3 && vite build", + "build:dev": "vue-demi-switch 3 && vite build --mode development", "build:lib": "echo 'Not defined script'", "build:lib:prod": "echo 'Not defined script'", "build:lib:all": "yarn build:lib && yarn build:types", @@ -19,24 +19,16 @@ "i18n:report": "vue-cli-service i18n:report --src './src/admin/**/*.?(js|vue)' --locales './src/admin/locales/**/*.json'" }, "dependencies": { - "@fortawesome/fontawesome-free": "^6.4.2", - "@mdi/font": "^6.6.96", - "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", + "@tabler/icons-webfont": "^2.42.0", "axios": "^0.28.1", - "crypto-js": "^3.1.9-1", - "date-fns": "^2.28.0", - "file-saver": "^2.0.5", "lodash": "^4.17.21", "material-icons": "^0.2.3", - "pdfjs-dist": "2.5.207", "pinia": "^2.1.7", - "portal-vue": "^2.1.7", - "sass": "^1.69.5", - "vue": "^2.7.14", - "vue-i18n": "^8.28.2", - "vue-meta": "^2.4.0", - "vue-router": "^3.6.5", - "vue-tabler-icons": "^1.0", - "vuetify": "^2.6.15" + "primeflex": "^3.3.1", + "primevue": "3.43.0", + "vue": "3.3.8", + "vue-i18n": "^9.7.1", + "vue-meta": "^3.0.0-alpha.10", + "vue-router": "4.2.5" } } diff --git a/web-app/packages/admin-app/src/App.vue b/web-app/packages/admin-app/src/App.vue index 85f96fd7..0140a4de 100644 --- a/web-app/packages/admin-app/src/App.vue +++ b/web-app/packages/admin-app/src/App.vue @@ -5,69 +5,67 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial --> - - diff --git a/web-app/packages/admin-app/src/app.ts b/web-app/packages/admin-app/src/app.ts index 6109ea2c..e9613118 100644 --- a/web-app/packages/admin-app/src/app.ts +++ b/web-app/packages/admin-app/src/app.ts @@ -2,61 +2,60 @@ // // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial -// styles must be imported first (at least before imports of our libs) -import 'vuetify/dist/vuetify.min.css' -import 'material-icons/iconfont/material-icons.scss' -import '@fortawesome/fontawesome-free/css/all.css' -import '@mdi/font/css/materialdesignicons.css' - -import '@mergin/lib-vue2/dist/style.css' -import '@mergin/admin-lib/dist/style.css' - import { + MMTheme, + MerginComponentUuidMixin, dateUtils, - textUtils, + merginUtils, numberUtils, - getHttpService, - MerginComponentUuidMixin -} from '@mergin/lib-vue2' -import PortalVue from 'portal-vue' -import Vue from 'vue' -import VueMeta from 'vue-meta' + textUtils, + useAppStore +} from '@mergin/lib' +import PrimeVue from 'primevue/config' +import Toast from 'primevue/toast' +import ToastService from 'primevue/toastservice' +import Tooltip from 'primevue/tooltip' +import { createApp } from 'vue' +import { createMetaManager } from 'vue-meta' import App from './App.vue' -import router from './router' -import { getPiniaInstance } from './store' +import { createRouter } from './router' +import { addRouterToPinia, getPiniaInstance } from './store' import i18n from '@/plugins/i18n/i18n' -import vuetify from '@/plugins/vuetify/vuetify' - -Vue.config.productionTip = false -Vue.use(PortalVue) -Vue.use(VueMeta) -Vue.prototype.$http = getHttpService() -Vue.filter('filesize', (value, unit, digits = 2, minUnit = 'B') => { - return numberUtils.formatFileSize(value, unit, digits, minUnit) -}) -Vue.filter('datetime', dateUtils.formatDateTime) -Vue.filter('date', dateUtils.formatDate) -Vue.filter('timediff', dateUtils.formatTimeDiff) -Vue.filter('remainingtime', dateUtils.formatRemainingTime) -Vue.filter('totitle', textUtils.formatToTitle) -Vue.filter('currency', numberUtils.formatToCurrency) - -// global mixin - replace with composable after migration to Vue 3 -Vue.mixin(MerginComponentUuidMixin) - -const createMerginApp = (): Vue => { +const createMerginApp = () => { const pinia = getPiniaInstance() - - return new Vue({ - router, - pinia, - vuetify, - i18n, - render: (h) => h(App) + const router = createRouter(pinia) + addRouterToPinia(router) + router.onError((e) => { + const appStore = useAppStore() + appStore.setServerError(e.message) }) + + const app = createApp(App) + .mixin(MerginComponentUuidMixin) + .use(pinia) + .use(router) + .use(i18n) + .use(createMetaManager()) + .use(PrimeVue, { pt: MMTheme }) + .use(ToastService) + .component('PToast', Toast) + .directive('tooltip', Tooltip) + + app.config.globalProperties.$filters = { + filesize: (value, unit, digits = 2, minUnit: numberUtils.SizeUnit = 'B') => + numberUtils.formatFileSize(value, unit, digits, minUnit), + datetime: dateUtils.formatDateTime, + date: dateUtils.formatDate, + timediff: dateUtils.formatTimeDiff, + remainingtime: dateUtils.formatRemainingTime, + totitle: textUtils.formatToTitle, + currency: numberUtils.formatToCurrency, + getAvatar: merginUtils.getAvatar + } + return app } export { createMerginApp } diff --git a/web-app/packages/admin-app/src/main.ts b/web-app/packages/admin-app/src/main.ts index c6440128..f7095c64 100644 --- a/web-app/packages/admin-app/src/main.ts +++ b/web-app/packages/admin-app/src/main.ts @@ -13,13 +13,18 @@ import { NotificationModule, ProjectModule, UserModule, - useAppStore, useInstanceStore, initCsrfToken -} from '@mergin/lib-vue2' +} from '@mergin/lib' + +import 'primevue/resources/primevue.min.css' +import 'primeflex/primeflex.min.css' +import '@mergin/lib/dist/sass/themes/mm-theme-light/theme.scss' +import '@tabler/icons-webfont/tabler-icons.min.css' +import '@mergin/lib/dist/style.css' +import '@mergin/admin-lib/dist/style.css' import { createMerginApp } from './app' -import { createRouter } from './router' import { createPiniaInstance, getPiniaInstance } from './store' async function main() { @@ -47,13 +52,7 @@ async function main() { const instanceStore = useInstanceStore(pinia) const response = await instanceStore.initApp() initCsrfToken(response) - const router = createRouter(pinia) - createMerginApp().$mount('#app') - - router.onError((e) => { - const appStore = useAppStore() - appStore.setServerError(e.message) - }) + createMerginApp().mount('#app') } main() diff --git a/web-app/packages/admin-app/src/modules/layout/components/AppHeader.vue b/web-app/packages/admin-app/src/modules/layout/components/AppHeader.vue new file mode 100644 index 00000000..dd4ed76e --- /dev/null +++ b/web-app/packages/admin-app/src/modules/layout/components/AppHeader.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/web-app/packages/admin-app/src/modules/layout/components/Sidebar.vue b/web-app/packages/admin-app/src/modules/layout/components/Sidebar.vue new file mode 100644 index 00000000..3ccd0acb --- /dev/null +++ b/web-app/packages/admin-app/src/modules/layout/components/Sidebar.vue @@ -0,0 +1,29 @@ + + + + + + + diff --git a/web-app/packages/admin-lib/src/modules/user/index.ts b/web-app/packages/admin-app/src/modules/user/index.ts similarity index 100% rename from web-app/packages/admin-lib/src/modules/user/index.ts rename to web-app/packages/admin-app/src/modules/user/index.ts diff --git a/web-app/packages/admin-lib/src/modules/user/views/LoginView.vue b/web-app/packages/admin-app/src/modules/user/views/LoginView.vue similarity index 89% rename from web-app/packages/admin-lib/src/modules/user/views/LoginView.vue rename to web-app/packages/admin-app/src/modules/user/views/LoginView.vue index 08d3a83e..f1fb63b1 100644 --- a/web-app/packages/admin-lib/src/modules/user/views/LoginView.vue +++ b/web-app/packages/admin-app/src/modules/user/views/LoginView.vue @@ -9,11 +9,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial - + diff --git a/web-app/packages/admin-lib/src/modules/admin/components/AdminProjectsTable.vue b/web-app/packages/admin-lib/src/modules/admin/components/AdminProjectsTable.vue index 6f3d763d..0eee49ca 100644 --- a/web-app/packages/admin-lib/src/modules/admin/components/AdminProjectsTable.vue +++ b/web-app/packages/admin-lib/src/modules/admin/components/AdminProjectsTable.vue @@ -151,7 +151,7 @@ import { htmlUtils, useDialogStore, useNotificationStore -} from '@mergin/lib-vue2' +} from '@mergin/lib' import { mapActions } from 'pinia' import { defineComponent } from 'vue' diff --git a/web-app/packages/admin-lib/src/modules/admin/components/CheckForUpdates.vue b/web-app/packages/admin-lib/src/modules/admin/components/CheckForUpdates.vue index 8030ec2d..9edb465f 100644 --- a/web-app/packages/admin-lib/src/modules/admin/components/CheckForUpdates.vue +++ b/web-app/packages/admin-lib/src/modules/admin/components/CheckForUpdates.vue @@ -5,33 +5,44 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial --> - diff --git a/web-app/packages/admin-lib/src/modules/admin/components/CreateUserForm.vue b/web-app/packages/admin-lib/src/modules/admin/components/CreateUserForm.vue index b3a53f8b..08835a40 100644 --- a/web-app/packages/admin-lib/src/modules/admin/components/CreateUserForm.vue +++ b/web-app/packages/admin-lib/src/modules/admin/components/CreateUserForm.vue @@ -87,7 +87,7 @@ import { useDialogStore, useNotificationStore, useFormStore -} from '@mergin/lib-vue2' +} from '@mergin/lib' import { mapActions, mapState } from 'pinia' import { defineComponent } from 'vue' diff --git a/web-app/packages/admin-lib/src/modules/admin/components/DashboardCoreAppBar.vue b/web-app/packages/admin-lib/src/modules/admin/components/DashboardCoreAppBar.vue deleted file mode 100644 index 715dcf54..00000000 --- a/web-app/packages/admin-lib/src/modules/admin/components/DashboardCoreAppBar.vue +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - diff --git a/web-app/packages/admin-lib/src/modules/admin/components/DashboardCoreDrawer.vue b/web-app/packages/admin-lib/src/modules/admin/components/DashboardCoreDrawer.vue deleted file mode 100644 index 857b94b6..00000000 --- a/web-app/packages/admin-lib/src/modules/admin/components/DashboardCoreDrawer.vue +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - diff --git a/web-app/packages/admin-lib/src/modules/admin/components/ProjectsViewTemplate.vue b/web-app/packages/admin-lib/src/modules/admin/components/ProjectsViewTemplate.vue index 9ffc4162..1c0c69d6 100644 --- a/web-app/packages/admin-lib/src/modules/admin/components/ProjectsViewTemplate.vue +++ b/web-app/packages/admin-lib/src/modules/admin/components/ProjectsViewTemplate.vue @@ -6,48 +6,43 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial +const adminStore = useAdminStore() +const instanceStore = useInstanceStore() - + +adminStore.getServerConfiguredCookies() + + + diff --git a/web-app/packages/admin-lib/src/modules/admin/components/UsageInformationCard.vue b/web-app/packages/admin-lib/src/modules/admin/components/UsageInformationCard.vue index 7cb42f9c..2e2c819c 100644 --- a/web-app/packages/admin-lib/src/modules/admin/components/UsageInformationCard.vue +++ b/web-app/packages/admin-lib/src/modules/admin/components/UsageInformationCard.vue @@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial - - diff --git a/web-app/packages/admin-lib/src/modules/layout/components/index.ts b/web-app/packages/admin-lib/src/modules/layout/components/index.ts deleted file mode 100644 index 3aeee633..00000000 --- a/web-app/packages/admin-lib/src/modules/layout/components/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (C) Lutra Consulting Limited -// -// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial - -export { default as AppHeader } from './AppHeader.vue' diff --git a/web-app/packages/admin-lib/src/modules/layout/index.ts b/web-app/packages/admin-lib/src/modules/layout/index.ts deleted file mode 100644 index d333dd14..00000000 --- a/web-app/packages/admin-lib/src/modules/layout/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (C) Lutra Consulting Limited -// -// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial - -export * from './components' diff --git a/web-app/packages/admin-lib/src/modules/project/views/ProjectSettingsView.vue b/web-app/packages/admin-lib/src/modules/project/views/ProjectSettingsView.vue index 60311ff8..053a3ce4 100644 --- a/web-app/packages/admin-lib/src/modules/project/views/ProjectSettingsView.vue +++ b/web-app/packages/admin-lib/src/modules/project/views/ProjectSettingsView.vue @@ -12,28 +12,17 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial :show-settings="true" :show-access-requests="true" > - diff --git a/web-app/packages/app/src/shims-pinia.d.ts b/web-app/packages/app/src/shims-pinia.d.ts new file mode 100644 index 00000000..4a4f5ef4 --- /dev/null +++ b/web-app/packages/app/src/shims-pinia.d.ts @@ -0,0 +1,7 @@ +import { Router } from 'vue-router' + +declare module 'pinia' { + export interface Pinia { + router: Router + } +} diff --git a/web-app/packages/app/vite.config.ts b/web-app/packages/app/vite.config.ts index 27be222f..48913b74 100644 --- a/web-app/packages/app/vite.config.ts +++ b/web-app/packages/app/vite.config.ts @@ -20,9 +20,6 @@ export default defineConfig(({ mode }) => ({ : '/', plugins: [ vue(), - // vuetify({ - // styles: { configFile: './src/sass/settings.scss' } - // }), Components({ resolvers: [PrimeVueResolver({ prefix: 'P' })] }), @@ -37,15 +34,7 @@ export default defineConfig(({ mode }) => ({ }, dedupe: ['vue', 'pinia', 'vue-router', '@mergin/lib', 'primevue'] }, - // define: { - // 'process.env': process.env - // }, build: { - // commonjsOptions: { - // include: [/node_modules/], - // transformMixedEsModules: true - // }, - sourcemap: mode !== 'production', rollupOptions: { plugins: [ diff --git a/web-app/packages/lib-vue2/package.json b/web-app/packages/lib-vue2/package.json index f7575f77..e2d574f1 100644 --- a/web-app/packages/lib-vue2/package.json +++ b/web-app/packages/lib-vue2/package.json @@ -40,6 +40,7 @@ "lint": "eslint . --ext .js,.vue,.ts" }, "dependencies": { + "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0", "axios": "^0.28.1", "axios-retry": "^3.2.4", "date-fns": "^2.28.0", diff --git a/web-app/packages/lib/package.json b/web-app/packages/lib/package.json index a4f4440f..1c8637d4 100644 --- a/web-app/packages/lib/package.json +++ b/web-app/packages/lib/package.json @@ -41,10 +41,11 @@ "axios": "^0.28.1", "axios-retry": "^3.2.4", "date-fns": "^2.28.0", + "file-saver": "^2.0.5", "lodash": "^4.17.21", "primeflex": "^3.3.1", - "primevue": "^3.43.0", - "vue": "^3.3.8", + "primevue": "3.43.0", + "vue": "3.3.8", "vue-router": "4.2.5" }, "peerDependencies": { diff --git a/web-app/packages/lib/src/common/components/FullStorageWarning.vue b/web-app/packages/lib/src/common/components/FullStorageWarning.vue index bb4579b7..96eea9d5 100644 --- a/web-app/packages/lib/src/common/components/FullStorageWarning.vue +++ b/web-app/packages/lib/src/common/components/FullStorageWarning.vue @@ -8,15 +8,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial - diff --git a/web-app/packages/lib/src/modules/layout/components/SideBarTemplate.vue b/web-app/packages/lib/src/modules/layout/components/SideBarTemplate.vue index 4a5987de..c2e8ce32 100644 --- a/web-app/packages/lib/src/modules/layout/components/SideBarTemplate.vue +++ b/web-app/packages/lib/src/modules/layout/components/SideBarTemplate.vue @@ -73,28 +73,33 @@ import { ProjectRouteName } from '@/modules/project' const route = useRoute() const layoutStore = useLayoutStore() +const props = defineProps<{ + sidebarItems: SideBarItemModel[] +}>() const initialSidebarItems = computed(() => { - return [ - { - active: route.matched.some( - (item) => item.name === DashboardRouteName.Dashboard - ), - title: 'Dashboard', - to: '/dashboard', - icon: 'ti ti-home' - }, - { - active: route.matched.some( - (item) => - item.name === ProjectRouteName.Projects || - item.name === ProjectRouteName.Project - ), - title: 'Projects', - to: '/projects', - icon: 'ti ti-article' - } - ] + return ( + props.sidebarItems || [ + { + active: route.matched.some( + (item) => item.name === DashboardRouteName.Dashboard + ), + title: 'Dashboard', + to: '/dashboard', + icon: 'ti ti-home' + }, + { + active: route.matched.some( + (item) => + item.name === ProjectRouteName.Projects || + item.name === ProjectRouteName.Project + ), + title: 'Projects', + to: '/projects', + icon: 'ti ti-article' + } + ] + ) }) const isOpen = computed(() => layoutStore.drawer) diff --git a/web-app/packages/lib/src/modules/project/projectApi.ts b/web-app/packages/lib/src/modules/project/projectApi.ts index df85415e..20af59fd 100644 --- a/web-app/packages/lib/src/modules/project/projectApi.ts +++ b/web-app/packages/lib/src/modules/project/projectApi.ts @@ -24,7 +24,8 @@ import { UpdateProjectAccessParams, ProjectVersion, ProjectAccessDetail, - ProjectAccess + ProjectAccess, + ProjectVersionFileChange } from '@/modules/project/types' export const ProjectApi = { @@ -274,5 +275,16 @@ export const ProjectApi = { projectId: string ): Promise> { return ProjectModule.httpService.get(`/app/project/${projectId}/access`) + }, + + async getVersionChangeset( + workspace: string, + projectName: string, + versionId: string, + path: string + ): Promise> { + return ProjectModule.httpService.get( + `/v1/resource/changesets/${workspace}/${projectName}/${versionId}?path=${path}` + ) } } diff --git a/web-app/packages/lib/src/modules/project/store.ts b/web-app/packages/lib/src/modules/project/store.ts index 2c0aa9e5..ae3da7e1 100644 --- a/web-app/packages/lib/src/modules/project/store.ts +++ b/web-app/packages/lib/src/modules/project/store.ts @@ -43,7 +43,8 @@ import { SaveProjectSettings, ErrorCodes, ProjectAccessDetail, - UpdateProjectAccessParams + UpdateProjectAccessParams, + ProjectVersionFileChange } from '@/modules/project/types' import { useUserStore } from '@/modules/user/store' @@ -72,7 +73,8 @@ export interface ProjectState { accessSearch: string accessSorting: SortingParams availablePermissions: DropdownOption[] - availableRoles: DropdownOption[] + availableRoles: DropdownOption[], + versionsChangesetLoading: boolean } export const useProjectStore = defineStore('projectModule', { @@ -96,7 +98,8 @@ export const useProjectStore = defineStore('projectModule', { accessSearch: '', accessSorting: undefined, availablePermissions: permissionUtils.getProjectPermissionsValues(), - availableRoles: permissionUtils.getProjectRoleNameValues() + availableRoles: permissionUtils.getProjectRoleNameValues(), + versionsChangesetLoading: false }), getters: { @@ -802,6 +805,33 @@ export const useProjectStore = defineStore('projectModule', { } finally { this.accessLoading = false } + }, + + async getVersionChangeset(payload: { + workspace: string + projectName: string + versionId: string + path: string + }): Promise { + let response: AxiosResponse = null + const notificationStore = useNotificationStore() + try { + this.versionsChangesetLoading = true + const { path, projectName, versionId, workspace } = payload + response = await ProjectApi.getVersionChangeset( + path, + projectName, + versionId, + workspace + ) + } catch (err) { + await notificationStore.error({ + text: getErrorMessage(err, 'Failed to display changeset of file') + }) + } finally { + this.versionsChangesetLoading = false + } + return response?.data } } }) diff --git a/web-app/packages/lib/src/modules/project/views/FileVersionDetailView.vue b/web-app/packages/lib/src/modules/project/views/FileVersionDetailView.vue index 71f51e45..584e81de 100644 --- a/web-app/packages/lib/src/modules/project/views/FileVersionDetailView.vue +++ b/web-app/packages/lib/src/modules/project/views/FileVersionDetailView.vue @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial - +

Changes cannot be calculated

@@ -106,7 +106,11 @@ import { defineComponent } from 'vue' import AppCircle from '@/common/components/AppCircle.vue' import AppContainer from '@/common/components/AppContainer.vue' import AppSection from '@/common/components/AppSection.vue' -import { ProjectVersionFileChange, useNotificationStore } from '@/modules' +import { + ProjectVersionFileChange, + useNotificationStore, + useProjectStore +} from '@/modules' import { useInstanceStore } from '@/modules/instance/store' interface ColumnItem { @@ -129,10 +133,9 @@ export default defineComponent({ string, { headers?: ColumnItem[]; changes?: Record[] } > | null, - loading: false, actions: { insert: { icon: 'ti-plus', severity: 'success' }, - update: { icon: 'ti-pen', severity: 'warn' }, + update: { icon: 'ti-pencil', severity: 'warn' }, delete: { icon: 'ti-trash', severity: 'danger' } }, itemsPerPage: 10 @@ -140,6 +143,7 @@ export default defineComponent({ }, computed: { ...mapState(useInstanceStore, ['configData']), + ...mapState(useProjectStore, ['versionsChangesetLoading']), docsLinkManageSynchronisation() { return `${this.configData?.docs_url ?? ''}/manage/synchronisation` }, @@ -161,82 +165,72 @@ export default defineComponent({ }, methods: { ...mapActions(useNotificationStore, ['error']), + ...mapActions(useProjectStore, ['getVersionChangeset']), // TODO: refactor to pinia action - getChangeset() { - this.loading = true - this.$http - .get( - `/v1/resource/changesets/${this.namespace}/${this.projectName}/${this.version_id}?path=${this.path}` - ) - .then((resp: AxiosResponse) => { - if (!resp.data.length) return - // process data grouped by tables - this.tables = {} - let changeset = { ...resp.data } - changeset = groupBy(changeset, 'table') - // eslint-disable-next-line @typescript-eslint/no-this-alias - const _this = this - for (const [key, value] of Object.entries(changeset)) { - _this.tables[key] = {} - const headers = [ - { text: 'Change', value: 'operationTypeHeader', width: 50 } - ] - const changes = [] - if (isArray(value)) { - const arrayValue = value - arrayValue.forEach((data) => { - if (data.table === 'gpkg_contents') { - return + async getChangeset() { + const changesetData = await this.getVersionChangeset({ + workspace: this.namespace, + projectName: this.projectName, + versionId: this.version_id, + path: this.path + }) + if (!changesetData.length) return + // process data grouped by tables + this.tables = {} + const changeset = groupBy(changesetData, 'table') + // eslint-disable-next-line @typescript-eslint/no-this-alias + const _this = this + for (const [key, value] of Object.entries(changeset)) { + _this.tables[key] = {} + const headers = [ + { text: 'Change', value: 'operationTypeHeader', width: 50 } + ] + const changes = [] + if (isArray(value)) { + const arrayValue = value + arrayValue.forEach((data) => { + if (data.table === 'gpkg_contents') { + return + } + data.values = { operationTypeHeader: data.type } + data.changes.forEach((row) => { + const columnIdentifier = row.name + // based on operation type create a value to display: old, new or change old -> new + // display undefined values as N/A + row.value = {} + if (data.type === 'insert') { + data.values[columnIdentifier] = + row.new === undefined ? 'N/A' : row.new + } else if (data.type === 'update') { + if (typeof row.new === 'undefined') { + data.values[columnIdentifier] = + row.old === undefined ? 'N/A' : row.old + } else { + data.values[columnIdentifier] = + (row.old === undefined ? 'N/A' : row.old) + + ' ' + + String.fromCharCode(parseInt('2794', 16)) + + ' ' + + (row.new === undefined ? 'N/A' : row.new) } - data.values = { operationTypeHeader: data.type } - data.changes.forEach((row) => { - const columnIdentifier = row.name - // based on operation type create a value to display: old, new or change old -> new - // display undefined values as N/A - row.value = {} - if (data.type === 'insert') { - data.values[columnIdentifier] = - row.new === undefined ? 'N/A' : row.new - } else if (data.type === 'update') { - if (typeof row.new === 'undefined') { - data.values[columnIdentifier] = - row.old === undefined ? 'N/A' : row.old - } else { - data.values[columnIdentifier] = - (row.old === undefined ? 'N/A' : row.old) + - ' ' + - String.fromCharCode(parseInt('2794', 16)) + - ' ' + - (row.new === undefined ? 'N/A' : row.new) - } - } else if (data.type === 'delete') { - data.values[columnIdentifier] = - row.old === undefined ? 'N/A' : row.old - } - if (!headers.map((h) => h.value).includes(columnIdentifier)) { - headers.push({ - text: row.name, - value: columnIdentifier, - width: 50 - }) - } + } else if (data.type === 'delete') { + data.values[columnIdentifier] = + row.old === undefined ? 'N/A' : row.old + } + if (!headers.map((h) => h.value).includes(columnIdentifier)) { + headers.push({ + text: row.name, + value: columnIdentifier, + width: 50 }) - changes.push(data.values) - }) - } - _this.tables[key].headers = headers - _this.tables[key].changes = changes - } - }) - .catch((err) => { - const msg = err.response - ? err.response.data?.detail - : 'Failed to display changeset of file' - this.error({ text: msg }) - }) - .finally(() => { - this.loading = false - }) + } + }) + changes.push(data.values) + }) + } + _this.tables[key].headers = headers + _this.tables[key].changes = changes + } } }, components: { AppContainer, AppSection, AppCircle } diff --git a/web-app/packages/lib/vite.config.ts b/web-app/packages/lib/vite.config.ts index bdf9aaeb..a11d3825 100644 --- a/web-app/packages/lib/vite.config.ts +++ b/web-app/packages/lib/vite.config.ts @@ -14,7 +14,7 @@ import { defineConfig } from 'vite' import packageJson from './package.json' // https://vitejs.dev/config/ -export default defineConfig(() => ({ +export default defineConfig({ plugins: [ vue(), Components({ @@ -46,38 +46,25 @@ export default defineConfig(() => ({ }, build: { commonjsOptions: { - // include: [/node_modules/], transformMixedEsModules: true }, - // Fix for watching, if watch:lib, disable this - // sourcemap: mode !== 'production', sourcemap: false, lib: { formats: ['es'], - // Could also be a dictionary or array of multiple entry points entry: resolve(__dirname, 'src/main.ts'), name: 'lib', - // the proper extensions will be added fileName: 'lib' }, rollupOptions: { - // make sure to externalize deps that shouldn't be bundled - // into your library external: ['vue', 'pinia', ...Object.keys(packageJson.dependencies)], output: { exports: 'named', - // Provide global variables to use in the UMD build - // for externalized deps globals: { vue: 'Vue', pinia: 'pinia' } }, - plugins: [ - // Enable rollup polyfills plugin - // used during production bundling - rollupNodePolyFill() - ] + plugins: [rollupNodePolyFill()] } }, optimizeDeps: { @@ -99,4 +86,4 @@ export default defineConfig(() => ({ ignored: ['!**/node_modules/@mergin/**'] } } -})) +}) diff --git a/web-app/yarn.lock b/web-app/yarn.lock index 201f3654..d1d5a8d2 100644 --- a/web-app/yarn.lock +++ b/web-app/yarn.lock @@ -129,11 +129,21 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.18.6": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" @@ -162,21 +172,18 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.2.tgz#dacafadfc6d7654c3051a66d6fe55b6cb2f2a0b3" integrity sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ== -"@babel/parser@^7.20.15": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.4.tgz#94003fdfc520bbe2875d4ae557b43ddb6d880f17" - integrity sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw== - -"@babel/parser@^7.21.3": - version "7.22.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.4.tgz#a770e98fd785c231af9d93f6459d36770993fb32" - integrity sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA== - "@babel/parser@^7.23.0": version "7.23.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.4.tgz#409fbe690c333bb70187e2de4021e1e47a026661" integrity sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ== +"@babel/parser@^7.24.7": + version "7.25.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.3.tgz#91fb126768d944966263f0657ab222a642b82065" + integrity sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw== + dependencies: + "@babel/types" "^7.25.2" + "@babel/runtime@^7.15.4": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" @@ -225,6 +232,15 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" +"@babel/types@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.2.tgz#55fb231f7dc958cd69ea141a4c2997e819646125" + integrity sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + "@esbuild-plugins/node-globals-polyfill@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz#0e4497a2b53c9e9485e149bc92ddb228438d6bcf" @@ -380,11 +396,6 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.37.0.tgz#cf1b5fa24217fe007f6487a26d765274925efa7d" integrity sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A== -"@fortawesome/fontawesome-free@^6.4.2": - version "6.4.2" - resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.2.tgz#36b6a9cb5ffbecdf89815c94d0c0ffa489ac5ecb" - integrity sha512-m5cPn3e2+FDCOgi1mz0RexTUvvQibBebOUlUlW0+YrMjDTPkiJ6VTKukA1GRsvRw+12KyJndNjj0O4AgTxm2Pg== - "@humanwhocodes/config-array@^0.11.8": version "0.11.8" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" @@ -470,11 +481,6 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@mdi/font@^6.6.96": - version "6.9.96" - resolved "https://registry.yarnpkg.com/@mdi/font/-/font-6.9.96.tgz#c68da7e0895885dd09e60dc08c5ecc0d77f67efb" - integrity sha512-z3QVZStyHVwkDsFR7A7F2PIvZJPWgdSFw4BEEy2Gc9HUN5NfK9mGbjgaYClRcbMWiYEV45srmiYtczmBtCqR8w== - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -527,21 +533,6 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== -"@types/fs-extra@^8.0.1": - version "8.1.2" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.2.tgz#7125cc2e4bdd9bd2fc83005ffdb1d0ba00cca61f" - integrity sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg== - dependencies: - "@types/node" "*" - -"@types/glob@^7.1.1": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" @@ -552,16 +543,6 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/minimatch@*": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - -"@types/node@*": - version "18.14.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.6.tgz#ae1973dd2b1eeb1825695bb11ebfb746d27e3e93" - integrity sha512-93+VvleD3mXwlLI/xASjw0FzKcwzl3OdTCzm1LaRfqgS21gfFtK3zDXM5Op9TeeMsJVOaJ2VRDpT9q4Y3d0AvA== - "@types/semver@^7.3.12": version "7.3.13" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" @@ -735,74 +716,42 @@ "@typescript-eslint/types" "5.61.0" eslint-visitor-keys "^3.3.0" -"@vitejs/plugin-vue2@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue2/-/plugin-vue2-2.2.0.tgz#7453207197d6ac2b7023cedc7133b142c604c356" - integrity sha512-1km7zEuZ/9QRPvzXSjikbTYGQPG86Mq1baktpC4sXqsXlb02HQKfi+fl8qVS703JM7cgm24Ga9j+RwKmvFn90A== +"@vitejs/plugin-vue2@^2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue2/-/plugin-vue2-2.3.1.tgz#53078d3d9d50d9863f1fbb1c1ef7791a5fcd4948" + integrity sha512-/ksaaz2SRLN11JQhLdEUhDzOn909WEk99q9t9w+N12GjQCljzv7GyvAbD/p20aBUjHkvpGOoQ+FCOkG+mjDF4A== "@vitejs/plugin-vue@^4.6.2": version "4.6.2" resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz#057d2ded94c4e71b94e9814f92dcd9306317aa46" integrity sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw== -"@volar/language-core@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@volar/language-core/-/language-core-1.4.1.tgz#66b5758252e35c4e5e71197ca7fa0344d306442c" - integrity sha512-EIY+Swv+TjsWpxOxujjMf1ZXqOjg9MT2VMXZ+1dKva0wD8W0L6EtptFFcCJdBbcKmGMFkr57Qzz9VNMWhs3jXQ== - dependencies: - "@volar/source-map" "1.4.1" - -"@volar/source-map@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@volar/source-map/-/source-map-1.4.1.tgz#e3b561775c742508e5e1f28609a4787c98056715" - integrity sha512-bZ46ad72dsbzuOWPUtJjBXkzSQzzSejuR3CT81+GvTEI2E994D8JPXzM3tl98zyCNnjgs4OkRyliImL1dvJ5BA== +"@volar/language-core@1.11.1", "@volar/language-core@~1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@volar/language-core/-/language-core-1.11.1.tgz#ecdf12ea8dc35fb8549e517991abcbf449a5ad4f" + integrity sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw== dependencies: - muggle-string "^0.2.2" + "@volar/source-map" "1.11.1" -"@volar/typescript@1.4.1-patch.2": - version "1.4.1-patch.2" - resolved "https://registry.yarnpkg.com/@volar/typescript/-/typescript-1.4.1-patch.2.tgz#89f4bd199ca81a832d86d1449b01f49f2b72137c" - integrity sha512-lPFYaGt8OdMEzNGJJChF40uYqMO4Z/7Q9fHPQC/NRVtht43KotSXLrkPandVVMf9aPbiJ059eAT+fwHGX16k4w== +"@volar/source-map@1.11.1", "@volar/source-map@~1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@volar/source-map/-/source-map-1.11.1.tgz#535b0328d9e2b7a91dff846cab4058e191f4452f" + integrity sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg== dependencies: - "@volar/language-core" "1.4.1" + muggle-string "^0.3.1" -"@volar/vue-language-core@1.6.5": - version "1.6.5" - resolved "https://registry.yarnpkg.com/@volar/vue-language-core/-/vue-language-core-1.6.5.tgz#db42520f1a29737c7e40fbb3e6aead8def85ba75" - integrity sha512-IF2b6hW4QAxfsLd5mePmLgtkXzNi+YnH6ltCd80gb7+cbdpFMjM1I+w+nSg2kfBTyfu+W8useCZvW89kPTBpzg== +"@volar/typescript@~1.11.1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/@volar/typescript/-/typescript-1.11.1.tgz#ba86c6f326d88e249c7f5cfe4b765be3946fd627" + integrity sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ== dependencies: - "@volar/language-core" "1.4.1" - "@volar/source-map" "1.4.1" - "@vue/compiler-dom" "^3.3.0" - "@vue/compiler-sfc" "^3.3.0" - "@vue/reactivity" "^3.3.0" - "@vue/shared" "^3.3.0" - minimatch "^9.0.0" - muggle-string "^0.2.2" - vue-template-compiler "^2.7.14" + "@volar/language-core" "1.11.1" + path-browserify "^1.0.1" -"@volar/vue-typescript@1.6.5": - version "1.6.5" - resolved "https://registry.yarnpkg.com/@volar/vue-typescript/-/vue-typescript-1.6.5.tgz#6ca9bfefa5dc64ff97fcdbc74249e5e7da44e533" - integrity sha512-er9rVClS4PHztMUmtPMDTl+7c7JyrxweKSAEe/o/Noeq2bQx6v3/jZHVHBe8ZNUti5ubJL/+Tg8L3bzmlalV8A== - dependencies: - "@volar/typescript" "1.4.1-patch.2" - "@volar/vue-language-core" "1.6.5" - -"@vue/babel-helper-vue-jsx-merge-props@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz#31624a7a505fb14da1d58023725a4c5f270e6a81" - integrity sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA== - -"@vue/compiler-core@3.3.4": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.3.4.tgz#7fbf591c1c19e1acd28ffd284526e98b4f581128" - integrity sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g== - dependencies: - "@babel/parser" "^7.21.3" - "@vue/shared" "3.3.4" - estree-walker "^2.0.2" - source-map-js "^1.0.2" +"@vue/babel-helper-vue-jsx-merge-props@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz#8d53a1e21347db8edbe54d339902583176de09f2" + integrity sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA== "@vue/compiler-core@3.3.8": version "3.3.8" @@ -814,13 +763,16 @@ estree-walker "^2.0.2" source-map-js "^1.0.2" -"@vue/compiler-dom@3.3.4", "@vue/compiler-dom@^3.3.0": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.3.4.tgz#f56e09b5f4d7dc350f981784de9713d823341151" - integrity sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w== +"@vue/compiler-core@3.4.37": + version "3.4.37" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.37.tgz#55db3900e09424c65c39111a05a3c6e698f371e3" + integrity sha512-ZDDT/KiLKuCRXyzWecNzC5vTcubGz4LECAtfGPENpo0nrmqJHwuWtRLxk/Sb9RAKtR9iFflFycbkjkY+W/PZUQ== dependencies: - "@vue/compiler-core" "3.3.4" - "@vue/shared" "3.3.4" + "@babel/parser" "^7.24.7" + "@vue/shared" "3.4.37" + entities "^5.0.0" + estree-walker "^2.0.2" + source-map-js "^1.2.0" "@vue/compiler-dom@3.3.8": version "3.3.8" @@ -830,6 +782,14 @@ "@vue/compiler-core" "3.3.8" "@vue/shared" "3.3.8" +"@vue/compiler-dom@^3.3.0": + version "3.4.37" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.4.37.tgz#a1fcf79e287cb828545082ff1afa8630480a3044" + integrity sha512-rIiSmL3YrntvgYV84rekAtU/xfogMUJIclUMeIKEtVBFngOL3IeZHhsH3UaFEgB5iFGpj6IW+8YuM/2Up+vVag== + dependencies: + "@vue/compiler-core" "3.4.37" + "@vue/shared" "3.4.37" + "@vue/compiler-sfc@2.7.14": version "2.7.14" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-2.7.14.tgz#3446fd2fbb670d709277fc3ffa88efc5e10284fd" @@ -855,30 +815,6 @@ postcss "^8.4.31" source-map-js "^1.0.2" -"@vue/compiler-sfc@^3.3.0": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.3.4.tgz#b19d942c71938893535b46226d602720593001df" - integrity sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ== - dependencies: - "@babel/parser" "^7.20.15" - "@vue/compiler-core" "3.3.4" - "@vue/compiler-dom" "3.3.4" - "@vue/compiler-ssr" "3.3.4" - "@vue/reactivity-transform" "3.3.4" - "@vue/shared" "3.3.4" - estree-walker "^2.0.2" - magic-string "^0.30.0" - postcss "^8.1.10" - source-map-js "^1.0.2" - -"@vue/compiler-ssr@3.3.4": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.3.4.tgz#9d1379abffa4f2b0cd844174ceec4a9721138777" - integrity sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ== - dependencies: - "@vue/compiler-dom" "3.3.4" - "@vue/shared" "3.3.4" - "@vue/compiler-ssr@3.3.8": version "3.3.8" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.3.8.tgz#136eed54411e4694815d961048a237191063fbce" @@ -913,16 +849,20 @@ "@typescript-eslint/parser" "^5.0.0" vue-eslint-parser "^9.0.0" -"@vue/reactivity-transform@3.3.4": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz#52908476e34d6a65c6c21cd2722d41ed8ae51929" - integrity sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw== +"@vue/language-core@1.8.27": + version "1.8.27" + resolved "https://registry.yarnpkg.com/@vue/language-core/-/language-core-1.8.27.tgz#2ca6892cb524e024a44e554e4c55d7a23e72263f" + integrity sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA== dependencies: - "@babel/parser" "^7.20.15" - "@vue/compiler-core" "3.3.4" - "@vue/shared" "3.3.4" - estree-walker "^2.0.2" - magic-string "^0.30.0" + "@volar/language-core" "~1.11.1" + "@volar/source-map" "~1.11.1" + "@vue/compiler-dom" "^3.3.0" + "@vue/shared" "^3.3.0" + computeds "^0.0.1" + minimatch "^9.0.3" + muggle-string "^0.3.1" + path-browserify "^1.0.1" + vue-template-compiler "^2.7.14" "@vue/reactivity-transform@3.3.8": version "3.3.8" @@ -942,13 +882,6 @@ dependencies: "@vue/shared" "3.3.8" -"@vue/reactivity@^3.3.0": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.3.4.tgz#a27a29c6cd17faba5a0e99fbb86ee951653e2253" - integrity sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ== - dependencies: - "@vue/shared" "3.3.4" - "@vue/runtime-core@3.3.8": version "3.3.8" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.3.8.tgz#fba5a632cbf2b5d29e171489570149cb6975dcdb" @@ -974,23 +907,15 @@ "@vue/compiler-ssr" "3.3.8" "@vue/shared" "3.3.8" -"@vue/shared@3.3.4", "@vue/shared@^3.3.0": - version "3.3.4" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.3.4.tgz#06e83c5027f464eef861c329be81454bc8b70780" - integrity sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ== - "@vue/shared@3.3.8": version "3.3.8" resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.3.8.tgz#f044942142e1d3a395f24132e6203a784838542d" integrity sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw== -"@vuetify/loader-shared@^1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuetify/loader-shared/-/loader-shared-1.7.1.tgz#0f63a3d41b6df29a2db1ff438aa1819b237c37a3" - integrity sha512-kLUvuAed6RCvkeeTNJzuy14pqnkur8lTuner7v7pNE/kVhPR97TuyXwBSBMR1cJeiLiOfu6SF5XlCYbXByEx1g== - dependencies: - find-cache-dir "^3.3.2" - upath "^2.0.1" +"@vue/shared@3.4.37", "@vue/shared@^3.3.0": + version "3.4.37" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.37.tgz#4f4c08a2e73da512a77b47165cf59ffbc1b5ade8" + integrity sha512-nIh8P2fc3DflG8+5Uw8PT/1i17ccFn0xxN/5oE9RfV5SVnd7G0XEFRwakrnNFE/jlS95fpGXDVG5zDETS26nmg== acorn-jsx@^5.3.2: version "5.3.2" @@ -1215,7 +1140,22 @@ chalk@^4.0.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3: +"chokidar@>=3.0.0 <4.0.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -1263,11 +1203,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" - integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== - combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -1280,10 +1215,10 @@ commander@^9.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== +computeds@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/computeds/-/computeds-0.0.1.tgz#215b08a4ba3e08a11ff6eee5d6d8d7166a97ce2e" + integrity sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q== concat-map@0.0.1: version "0.0.1" @@ -1372,7 +1307,7 @@ de-indent@^1.0.2: resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg== -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1391,11 +1326,6 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -deepmerge@^4.2.2: - version "4.3.0" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.0.tgz#65491893ec47756d44719ae520e0e2609233b59b" - integrity sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og== - define-properties@^1.1.3, define-properties@^1.1.4: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -1440,6 +1370,11 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +entities@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-5.0.0.tgz#b2ab51fe40d995817979ec79dd621154c3c0f62b" + integrity sha512-BeJFvFRJddxobhvEdm5GqHzRV/X+ACeuw0/BuuxsCh1EUZcAIz8+kYmBp/LrQuloy6K1f3a0M7+IhmZ7QnkISA== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -1830,7 +1765,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.0.3, fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== @@ -1877,23 +1812,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -1950,15 +1868,6 @@ fs-extra@^11.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2072,20 +1981,6 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globby@10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" - integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A== - dependencies: - "@types/glob" "^7.1.1" - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.0.3" - glob "^7.1.3" - ignore "^5.1.1" - merge2 "^1.2.3" - slash "^3.0.0" - globby@^11.0.4, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -2182,9 +2077,9 @@ ignore@^5.1.1, ignore@^5.2.0: integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== immutable@^4.0.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.4.tgz#2e07b33837b4bb7662f288c244d1ced1ef65a78f" - integrity sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA== + version "4.3.7" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.7.tgz#c70145fc90d89fb02021e65c84eb0226e4e5a381" + integrity sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" @@ -2315,11 +2210,6 @@ is-path-inside@^3.0.3: resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== -is-plain-object@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b" - integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g== - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -2426,13 +2316,6 @@ json5@^2.2.2: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== - optionalDependencies: - graceful-fs "^4.1.6" - jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -2465,13 +2348,6 @@ local-pkg@^0.4.3: resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -2524,13 +2400,6 @@ magic-string@^0.30.5: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" -make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - material-icons@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/material-icons/-/material-icons-0.2.3.tgz#1f84d50effbb700287ba44a21bbce0339252ccaf" @@ -2541,7 +2410,7 @@ memorystream@^0.3.1: resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== -merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: +merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -2580,13 +2449,20 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.0, minimatch@^9.0.1: +minimatch@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.1.tgz#8a555f541cf976c622daf078bb28f29fb927c253" integrity sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w== dependencies: brace-expansion "^2.0.1" +minimatch@^9.0.3: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" @@ -2602,10 +2478,10 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -muggle-string@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/muggle-string/-/muggle-string-0.2.2.tgz#786aa53fea1652c61c6a59e1f839292b262bc72a" - integrity sha512-YVE1mIJ4VpUMqZObFndk9CJu6DBJR/GB13p3tXuNbwD4XExaI5EOuRl6BHeIDxIqXZVxSfAC+y6U1Z/IxCfKUg== +muggle-string@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/muggle-string/-/muggle-string-0.3.1.tgz#e524312eb1728c63dd0b2ac49e3282e6ed85963a" + integrity sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg== mylas@^2.1.9: version "2.1.13" @@ -2737,13 +2613,6 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - p-limit@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" @@ -2751,13 +2620,6 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" @@ -2765,11 +2627,6 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -2785,6 +2642,11 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +path-browserify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -2822,11 +2684,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pdfjs-dist@2.5.207: - version "2.5.207" - resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-2.5.207.tgz#b5e8c19627be64269cd3fb6df3eaaf45ddffe7b6" - integrity sha512-xGDUhnCYPfHy+unMXCLCJtlpZaaZ17Ew3WIL0tnSgKFUZXHAPD49GO9xScyszSsQMoutNDgRb+rfBXIaX/lJbw== - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -2855,13 +2712,6 @@ pinia@^2.1.7: "@vue/devtools-api" "^6.5.0" vue-demi ">=0.14.5" -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - plimit-lit@^1.2.6: version "1.5.0" resolved "https://registry.yarnpkg.com/plimit-lit/-/plimit-lit-1.5.0.tgz#f66df8a7041de1e965c4f1c0697ab486968a92a5" @@ -2869,11 +2719,6 @@ plimit-lit@^1.2.6: dependencies: queue-lit "^1.5.0" -portal-vue@^2.1.7: - version "2.1.7" - resolved "https://registry.yarnpkg.com/portal-vue/-/portal-vue-2.1.7.tgz#ea08069b25b640ca08a5b86f67c612f15f4e4ad4" - integrity sha512-+yCno2oB3xA7irTt0EU5Ezw22L2J51uKAacE/6hMPMoO/mx3h4rXFkkBkT4GFsMDv/vEe8TNKC3ujJJ0PTwb6g== - portal-vue@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/portal-vue/-/portal-vue-3.0.0.tgz#0f60fe3540e479d18f998d32d415c50c8e17c9a9" @@ -2900,7 +2745,7 @@ postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.1.10, postcss@^8.4.14, postcss@^8.4.21: +postcss@^8.4.14, postcss@^8.4.21: version "8.4.21" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== @@ -2958,7 +2803,7 @@ primeflex@^3.3.1: resolved "https://registry.yarnpkg.com/primeflex/-/primeflex-3.3.1.tgz#361dddf6eb5db50d733e4cddd4b6e376a3d7bd68" integrity sha512-zaOq3YvcOYytbAmKv3zYc+0VNS9Wg5d37dfxZnveKBFPr7vEIwfV5ydrpiouTft8MVW6qNjfkaQphHSnvgQbpQ== -primevue@^3.43.0: +primevue@3.43.0: version "3.43.0" resolved "https://registry.yarnpkg.com/primevue/-/primevue-3.43.0.tgz#bee115cd9a8324106d0a66078eb82c37b9118693" integrity sha512-iW2gEbM79v5RzRYIrg010fN1DRr5CIRdMsVMG3pBUCq0rzUGnm/hlzJ9ThDZyJrA0/tEKByAo/Pra56s5PnvqQ== @@ -3068,17 +2913,6 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -rollup-plugin-copy@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-copy/-/rollup-plugin-copy-3.4.0.tgz#f1228a3ffb66ffad8606e2f3fb7ff23141ed3286" - integrity sha512-rGUmYYsYsceRJRqLVlE9FivJMxJ7X6jDlP79fmFkL8sJs7VVMSVyA2yfyL+PGyO/vJs4A87hwhgVfz61njI+uQ== - dependencies: - "@types/fs-extra" "^8.0.1" - colorette "^1.1.0" - fs-extra "^8.1.0" - globby "10.0.1" - is-plain-object "^3.0.0" - rollup-plugin-inject@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz#e4233855bfba6c0c12a312fd6649dff9a13ee9f4" @@ -3133,9 +2967,9 @@ safe-regex-test@^1.0.0: is-regex "^1.1.4" sass@^1.69.5: - version "1.69.5" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.5.tgz#23e18d1c757a35f2e52cc81871060b9ad653dfde" - integrity sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ== + version "1.77.8" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.77.8.tgz#9f18b449ea401759ef7ec1752a16373e296b52bd" + integrity sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -3146,7 +2980,7 @@ sass@^1.69.5: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: +semver@^6.1.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -3158,6 +2992,11 @@ semver@^7.0.0, semver@^7.3.5, semver@^7.3.6, semver@^7.3.7, semver@^7.3.8: dependencies: lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -3206,16 +3045,16 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map-js@^1.2.0: +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" @@ -3441,11 +3280,6 @@ universal-cookie@^4.0.4: "@types/cookie" "^0.3.3" cookie "^0.4.0" -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -3477,11 +3311,6 @@ unplugin@^1.3.1: webpack-sources "^3.2.3" webpack-virtual-modules "^0.5.0" -upath@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" - integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== - update-browserslist-db@^1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" @@ -3520,15 +3349,6 @@ vite-plugin-static-copy@^0.17.0: fs-extra "^11.1.0" picocolors "^1.0.0" -vite-plugin-vuetify@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/vite-plugin-vuetify/-/vite-plugin-vuetify-1.0.2.tgz#d1777c63aa1b3a308756461b3d0299fd101ee8f4" - integrity sha512-MubIcKD33O8wtgQXlbEXE7ccTEpHZ8nPpe77y9Wy3my2MWw/PgehP9VqTp92BLqr0R1dSL970Lynvisx3UxBFw== - dependencies: - "@vuetify/loader-shared" "^1.7.1" - debug "^4.3.3" - upath "^2.0.1" - vite@^4.5.3: version "4.5.3" resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.3.tgz#d88a4529ea58bae97294c7e2e6f0eab39a50fb1a" @@ -3571,11 +3391,6 @@ vue-eslint-parser@^9.0.1: lodash "^4.17.21" semver "^7.3.6" -vue-i18n@^8.28.2: - version "8.28.2" - resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-8.28.2.tgz#913558066e274395c0a9f40b2f3393d5c2636840" - integrity sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA== - vue-i18n@^9.7.1: version "9.7.1" resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-9.7.1.tgz#41393b066f6ff69d9be2ba31a59b043263c77289" @@ -3585,13 +3400,6 @@ vue-i18n@^9.7.1: "@intlify/shared" "9.7.1" "@vue/devtools-api" "^6.5.0" -vue-meta@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/vue-meta/-/vue-meta-2.4.0.tgz#a419fb4b4135ce965dab32ec641d1989c2ee4845" - integrity sha512-XEeZUmlVeODclAjCNpWDnjgw+t3WA6gdzs6ENoIAgwO1J1d5p1tezDhtteLUFwcaQaTtayRrsx7GL6oXp/m2Jw== - dependencies: - deepmerge "^4.2.2" - vue-meta@^3.0.0-alpha.10: version "3.0.0-alpha.10" resolved "https://registry.yarnpkg.com/vue-meta/-/vue-meta-3.0.0-alpha.10.tgz#8aa7dee8ef43edda2633d52d2d4ca0ae03352222" @@ -3615,31 +3423,23 @@ vue-tabler-icons@^1.0: integrity sha512-ZFYo5RWXhp9/Ky8CFWUQ65x2oZy0YkwdfB4b2+tT/hPqGdieQfa303UiiFeNMHFYrNSGouDAN1LvpDxaN/4X2g== vue-template-compiler@^2.7.14: - version "2.7.14" - resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz#4545b7dfb88090744c1577ae5ac3f964e61634b1" - integrity sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ== + version "2.7.16" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz#c81b2d47753264c77ac03b9966a46637482bb03b" + integrity sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ== dependencies: de-indent "^1.0.2" he "^1.2.0" vue-tsc@^1.6.5: - version "1.6.5" - resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-1.6.5.tgz#cd18804b12087c300b6c9ee2a1da41a63f11103e" - integrity sha512-Wtw3J7CC+JM2OR56huRd5iKlvFWpvDiU+fO1+rqyu4V2nMTotShz4zbOZpW5g9fUOcjnyZYfBo5q5q+D/q27JA== + version "1.8.27" + resolved "https://registry.yarnpkg.com/vue-tsc/-/vue-tsc-1.8.27.tgz#feb2bb1eef9be28017bb9e95e2bbd1ebdd48481c" + integrity sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg== dependencies: - "@volar/vue-language-core" "1.6.5" - "@volar/vue-typescript" "1.6.5" - semver "^7.3.8" + "@volar/typescript" "~1.11.1" + "@vue/language-core" "1.8.27" + semver "^7.5.4" -vue@^2.7.14: - version "2.7.14" - resolved "https://registry.yarnpkg.com/vue/-/vue-2.7.14.tgz#3743dcd248fd3a34d421ae456b864a0246bafb17" - integrity sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ== - dependencies: - "@vue/compiler-sfc" "2.7.14" - csstype "^3.1.0" - -vue@^3.3.8: +vue@3.3.8: version "3.3.8" resolved "https://registry.yarnpkg.com/vue/-/vue-3.3.8.tgz#532ff071af24f6a69e5ecc53a66858a9ee874ffc" integrity sha512-5VSX/3DabBikOXMsxzlW8JyfeLKlG9mzqnWgLQLty88vdZL7ZJgrdgBOmrArwxiLtmS+lNNpPcBYqrhE6TQW5w== @@ -3650,6 +3450,14 @@ vue@^3.3.8: "@vue/server-renderer" "3.3.8" "@vue/shared" "3.3.8" +vue@^2.7.14: + version "2.7.14" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.7.14.tgz#3743dcd248fd3a34d421ae456b864a0246bafb17" + integrity sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ== + dependencies: + "@vue/compiler-sfc" "2.7.14" + csstype "^3.1.0" + vuetify@^2.6.15: version "2.6.15" resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-2.6.15.tgz#058c976f4e6e834076d80ae0c09bd61baa836d26" From c47b364c07b091d413b80287fd5e3fc4a70a2fe3 Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Fri, 13 Sep 2024 21:48:06 +0200 Subject: [PATCH 02/68] Improve searching + added reation date to User --- server/mergin/auth/api.yaml | 9 +++++++-- server/mergin/auth/controller.py | 9 +++++---- server/mergin/auth/schemas.py | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/server/mergin/auth/api.yaml b/server/mergin/auth/api.yaml index 337dc862..f89e110d 100644 --- a/server/mergin/auth/api.yaml +++ b/server/mergin/auth/api.yaml @@ -171,7 +171,7 @@ paths: count: type: integer example: 10 - users: + items: type: array items: $ref: "#/components/schemas/User" @@ -670,6 +670,11 @@ components: type: string format: date-time example: 2023-07-30T08:47:58Z + registration_date: + nullable: true + type: string + format: date-time + example: 2023-07-30T08:47:58Z profile: $ref: "#/components/schemas/UserProfile" PaginatedUsers: @@ -839,4 +844,4 @@ components: - editor - reader - guest - example: reader \ No newline at end of file + example: reader diff --git a/server/mergin/auth/controller.py b/server/mergin/auth/controller.py index 36932def..42d84714 100644 --- a/server/mergin/auth/controller.py +++ b/server/mergin/auth/controller.py @@ -6,7 +6,7 @@ import pytz from datetime import datetime, timedelta from connexion import NoContent -from sqlalchemy import func, desc, asc +from sqlalchemy import func, desc, asc, or_ from sqlalchemy.sql.operators import is_ from flask import request, current_app, jsonify, abort, render_template from flask_login import login_user, logout_user, current_user @@ -454,8 +454,9 @@ def get_paginated_users( ) if like: - attr = User.email if "@" in like else User.username - users = users.filter(attr.ilike(f"%{like}%")) + users = users.filter( + User.username.ilike(f"%{like}%") | User.email.ilike(f"%{like}%") + ) if descending and order_by: users = users.order_by(desc(User.__table__.c[order_by])) @@ -467,7 +468,7 @@ def get_paginated_users( result_users = UserSchema(many=True).dump(result) - data = {"users": result_users, "total": total} + data = {"items": result_users, "count": total} return data, 200 diff --git a/server/mergin/auth/schemas.py b/server/mergin/auth/schemas.py index bcebca5c..10475b2c 100644 --- a/server/mergin/auth/schemas.py +++ b/server/mergin/auth/schemas.py @@ -71,6 +71,7 @@ class Meta: "verified_email", "profile", "scheduled_removal", + "registration_date", ) load_instance = True From 658f113bb0b148e036069acca373bbdf61e7bfd2 Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Fri, 13 Sep 2024 21:48:56 +0200 Subject: [PATCH 03/68] Added: - AccountsTable / AccountDetail / banners / dialogs Refactored: - dl -> dd - label class removing --- web-app/packages/admin-app/src/router.ts | 38 +-- web-app/packages/admin-app/vite.config.ts | 1 + web-app/packages/admin-lib/components.d.ts | 6 + .../admin-lib/src/modules/admin/adminApi.ts | 31 +- .../admin/components/CreateUserForm.vue | 166 +++++----- .../admin-lib/src/modules/admin/store.ts | 27 +- .../admin-lib/src/modules/admin/types.ts | 5 +- .../modules/admin/views/AccountDetailView.vue | 286 +++++++++++++++++ .../src/modules/admin/views/AccountsView.vue | 261 ++++++++-------- .../src/modules/admin/views/ProfileView.vue | 290 ------------------ .../src/modules/admin/views/index.ts | 4 +- .../packages/admin-lib/src/shims-pinia.d.ts | 7 + web-app/packages/admin-lib/src/shims-tsx.d.ts | 15 - web-app/packages/admin-lib/src/shims-vue.d.ts | 15 +- web-app/packages/admin-lib/vite.config.ts | 1 + .../themes/mm-theme-light/_extensions.scss | 11 +- .../common/components/AppPasswordTooltip.vue | 2 +- .../lib/src/common/components/types.ts | 7 + web-app/packages/lib/src/mm-theme.ts | 26 +- .../project/components/FileDetailSidebar.vue | 12 +- .../project/components/ProjectShareDialog.vue | 2 +- .../components/ProjectShareDialogTemplate.vue | 2 +- .../project/components/ProjectsTable.vue | 47 +-- .../components/VersionDetailSidebar.vue | 20 +- .../packages/lib/src/modules/project/types.ts | 7 - .../user/components/ChangePasswordForm.vue | 2 +- .../user/components/EditProfileForm.vue | 6 +- .../packages/lib/src/modules/user/types.ts | 2 + .../modules/user/views/ChangePasswordView.vue | 10 - .../modules/user/views/LoginViewTemplate.vue | 6 +- .../user/views/ProfileViewTemplate.vue | 8 +- 31 files changed, 644 insertions(+), 679 deletions(-) create mode 100644 web-app/packages/admin-lib/src/modules/admin/views/AccountDetailView.vue delete mode 100644 web-app/packages/admin-lib/src/modules/admin/views/ProfileView.vue create mode 100644 web-app/packages/admin-lib/src/shims-pinia.d.ts delete mode 100644 web-app/packages/admin-lib/src/shims-tsx.d.ts diff --git a/web-app/packages/admin-app/src/router.ts b/web-app/packages/admin-app/src/router.ts index f8996e7a..d10c55d3 100644 --- a/web-app/packages/admin-app/src/router.ts +++ b/web-app/packages/admin-app/src/router.ts @@ -3,8 +3,8 @@ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial import { - AccountView - // ProfileView, + AccountsView, + AccountDetailView // SettingsView, // ProjectSettingsView, // ProjectsView, @@ -67,7 +67,7 @@ export const createRouter = (pinia: Pinia) => { path: '/accounts', name: 'accounts', components: { - default: AccountView, + default: AccountsView, sidebar: Sidebar, header: AppHeader }, @@ -77,30 +77,18 @@ export const createRouter = (pinia: Pinia) => { routeUtils.isAuthenticatedGuard(to, from, next, userStore) routeUtils.isSuperUser(to, from, next, userStore) } + }, + { + path: '/user/:username', + name: 'account', + components: { + default: AccountDetailView, + sidebar: Sidebar, + header: AppHeader + }, + props: true } // { - // path: '/user/:username', - // name: 'profile', - // component: ProfileView, - // props: true, - // beforeEnter: async (to, from, next) => { - // const adminStore = useAdminStore(pinia) - // adminStore.setUserAdminProfile(null) - // try { - // await adminStore.fetchUserProfileByName({ - // username: to.params.username - // }) - // next() - // } catch (e) { - // next( - // Error( - // errorUtils.getErrorMessage(e, 'Failed to fetch user profile') - // ) - // ) - // } - // } - // }, - // { // path: '/projects', // name: 'projects', // component: ProjectsView, diff --git a/web-app/packages/admin-app/vite.config.ts b/web-app/packages/admin-app/vite.config.ts index 15f916ec..d5a8efb3 100644 --- a/web-app/packages/admin-app/vite.config.ts +++ b/web-app/packages/admin-app/vite.config.ts @@ -53,6 +53,7 @@ export default defineConfig(({ mode }) => ({ sourcemap: mode !== 'production' }, optimizeDeps: { + include: ['vue-router'], exclude: ['vue', '@mergin', 'vue-demi'], esbuildOptions: { define: { diff --git a/web-app/packages/admin-lib/components.d.ts b/web-app/packages/admin-lib/components.d.ts index fe456069..50387356 100644 --- a/web-app/packages/admin-lib/components.d.ts +++ b/web-app/packages/admin-lib/components.d.ts @@ -7,7 +7,13 @@ export {} declare module 'vue' { export interface GlobalComponents { + PAvatar: typeof import('primevue/avatar')['default'] PButton: typeof import('primevue/button')['default'] + PColumn: typeof import('primevue/column')['default'] + PDataTable: typeof import('primevue/datatable')['default'] + PInputSwitch: typeof import('primevue/inputswitch')['default'] + PInputText: typeof import('primevue/inputtext')['default'] + PPassword: typeof import('primevue/password')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } diff --git a/web-app/packages/admin-lib/src/modules/admin/adminApi.ts b/web-app/packages/admin-lib/src/modules/admin/adminApi.ts index 7d429b79..3d53e80f 100644 --- a/web-app/packages/admin-lib/src/modules/admin/adminApi.ts +++ b/web-app/packages/admin-lib/src/modules/admin/adminApi.ts @@ -31,16 +31,13 @@ export const AdminApi = { return AdminModule.httpService.get(`/app/admin/users`, { params }) }, - async fetchUserProfileByName( + async fetchUserByName( username: string ): Promise> { - return AdminModule.httpService?.get(`/app/admin/user/${username}?random=${Math.random()}`) + return AdminModule.httpService?.get(`/app/admin/user/${username}`) }, - async deleteUser( - username: number, - withRetry?: boolean - ): Promise> { + async deleteUser(username: number): Promise> { return AdminModule.httpService.delete( `/app/admin/user/${username}` /*, { ...(withRetry ? getDefaultRetryOptions() : {}) @@ -50,8 +47,7 @@ export const AdminApi = { async updateUser( username: string, - data: UpdateUserData, - withRetry?: boolean + data: UpdateUserData ): Promise> { return AdminModule.httpService.patch( `/app/admin/user/${username}`, @@ -118,9 +114,12 @@ export const AdminApi = { * @return Result promise */ async removeProject(id: number): Promise> { - return await AdminModule.httpService.delete(`/app/project/removed-project/${id}`, { - 'axios-retry': { retries: 5 } - }) + return await AdminModule.httpService.delete( + `/app/project/removed-project/${id}`, + { + 'axios-retry': { retries: 5 } + } + ) }, /** @@ -129,8 +128,12 @@ export const AdminApi = { * @return Result promise */ async restoreProject(id: number): Promise> { - return await AdminModule.httpService.post(`/app/project/removed-project/restore/${id}`, null, { - 'axios-retry': { retries: 5 } - }) + return await AdminModule.httpService.post( + `/app/project/removed-project/restore/${id}`, + null, + { + 'axios-retry': { retries: 5 } + } + ) } } diff --git a/web-app/packages/admin-lib/src/modules/admin/components/CreateUserForm.vue b/web-app/packages/admin-lib/src/modules/admin/components/CreateUserForm.vue index 08835a40..a97323a5 100644 --- a/web-app/packages/admin-lib/src/modules/admin/components/CreateUserForm.vue +++ b/web-app/packages/admin-lib/src/modules/admin/components/CreateUserForm.vue @@ -5,79 +5,79 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial --> - - - + diff --git a/web-app/packages/admin-lib/src/modules/admin/store.ts b/web-app/packages/admin-lib/src/modules/admin/store.ts index d85a6873..244e5dd4 100644 --- a/web-app/packages/admin-lib/src/modules/admin/store.ts +++ b/web-app/packages/admin-lib/src/modules/admin/store.ts @@ -14,7 +14,7 @@ import { import { defineStore, getActivePinia } from 'pinia' import Cookies from 'universal-cookie' import { AdminApi } from '@/modules/admin/adminApi' -import { UpdateUserPayload } from '@/modules/admin/types' +import { UpdateUserPayload, UsersResponse } from '@/modules/admin/types' export interface AdminState { loading: boolean @@ -22,7 +22,7 @@ export interface AdminState { items: UserResponse[] count: number } - userAdminProfile?: UserResponse + user?: UserResponse checkForUpdates?: boolean info_url?: string isServerConfigHidden: boolean @@ -38,7 +38,7 @@ export const useAdminStore = defineStore('adminModule', { items: [], count: 0 }, - userAdminProfile: null, + user: null, checkForUpdates: undefined, info_url: undefined, isServerConfigHidden: false @@ -54,12 +54,8 @@ export const useAdminStore = defineStore('adminModule', { setLoading(value) { this.loading = value }, - setUsers(data) { - this.users.count = data.total - this.users.items = data.users - }, - setUserAdminProfile(userAdminProfile) { - this.userAdminProfile = userAdminProfile + setUsers(data: UsersResponse) { + this.users = data }, setCheckForUpdates(value) { this.checkForUpdates = value @@ -84,14 +80,14 @@ export const useAdminStore = defineStore('adminModule', { this.setLoading(false) } }, - async fetchUserProfileByName(payload) { + async fetchUserByName(payload) { const notificationStore = useNotificationStore() htmlUtils.waitCursor(true) try { - const response = await AdminApi.fetchUserProfileByName(payload.username) - this.setUserAdminProfile(response.data) - } catch(e) { + const response = await AdminApi.fetchUserByName(payload.username) + this.user = response.data + } catch (e) { await notificationStore.error({ text: 'Failed to fetch user profile' }) } finally { htmlUtils.waitCursor(false) @@ -123,11 +119,10 @@ export const useAdminStore = defineStore('adminModule', { payload.username, payload.data ) - if (this.userAdminProfile?.id === response.data?.id) { + if (this.user?.id === response.data?.id) { // update stored user detail data - this.setUserAdminProfile(response.data) + this.user = response.data } - await getActivePinia().router.push({ name: 'accounts' }) } catch (err) { await notificationStore.error({ text: errorUtils.getErrorMessage( diff --git a/web-app/packages/admin-lib/src/modules/admin/types.ts b/web-app/packages/admin-lib/src/modules/admin/types.ts index 823af2ad..b5ab01a5 100644 --- a/web-app/packages/admin-lib/src/modules/admin/types.ts +++ b/web-app/packages/admin-lib/src/modules/admin/types.ts @@ -5,6 +5,7 @@ /* eslint-disable camelcase */ import { PaginatedRequestParams, + PaginatedResponse, PaginatedResponseDefaults, Project, ProjectListItem, @@ -15,9 +16,7 @@ export interface UsersParams extends PaginatedRequestParams { username?: string } -export interface UsersResponse extends PaginatedResponseDefaults { - users: UserResponse[] -} +export type UsersResponse = PaginatedResponse export interface UpdateUserData { is_admin: boolean diff --git a/web-app/packages/admin-lib/src/modules/admin/views/AccountDetailView.vue b/web-app/packages/admin-lib/src/modules/admin/views/AccountDetailView.vue new file mode 100644 index 00000000..f13bc773 --- /dev/null +++ b/web-app/packages/admin-lib/src/modules/admin/views/AccountDetailView.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/web-app/packages/admin-lib/src/modules/admin/views/AccountsView.vue b/web-app/packages/admin-lib/src/modules/admin/views/AccountsView.vue index 644493c8..feeff69c 100644 --- a/web-app/packages/admin-lib/src/modules/admin/views/AccountsView.vue +++ b/web-app/packages/admin-lib/src/modules/admin/views/AccountsView.vue @@ -1,9 +1,3 @@ - - - + + + + + + + + @@ -121,11 +101,17 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial import { PaginatedUsersParams, useDialogStore, + AppSection, AppContainer, - AppSection + TableDataHeader } from '@mergin/lib' import debounce from 'lodash/debounce' import { mapActions, mapState } from 'pinia' +import { + DataTablePageEvent, + DataTableRowClickEvent, + DataTableSortEvent +} from 'primevue/datatable' import { defineComponent } from 'vue' import AdminLayout from '@/modules/admin/components/AdminLayout.vue' @@ -144,20 +130,17 @@ export default defineComponent({ options: { sortBy: ['username'], sortDesc: [false], - itemsPerPage: 10, - page: 1 + itemsPerPage: 20, + page: 1, + perPageOptions: [20, 50, 100] }, + searchByName: '', headers: [ - { text: 'Name', value: 'username', filterable: true, sortable: true }, - { - text: 'Active', - value: 'active', - filterable: false, - sortable: false, - width: 15 - } - ], - searchByName: '' + { field: 'username', header: 'Name', sortable: true }, + { field: 'email', header: 'Email', sortable: true }, + { field: 'profile.name', header: 'Username' }, + { field: 'active', header: 'Active' } + ] as TableDataHeader[] } }, computed: { @@ -165,41 +148,66 @@ export default defineComponent({ }, created() { this.resetPaging = debounce(this.resetPaging, 1000) + this.fetchUsers({ params: this.getParams() }) }, methods: { ...mapActions(useAdminStore, ['fetchUsers']), ...mapActions(useDialogStore, ['show']), - async resetPaging() { + onSearch() { this.options.page = 1 - await this.paginate(this.options) + this.fetchUsers({ params: this.getParams() }) }, - async resetSearch() { - this.searchByName = '' - await this.resetPaging() + async resetPaging() { + this.options.page = 1 }, - async paginate(options) { - this.options = options + getParams(): PaginatedUsersParams { const params = { - page: options.page, - per_page: options.itemsPerPage + page: this.options.page, + per_page: this.options.itemsPerPage } as PaginatedUsersParams - if (options.sortBy[0]) { - params.descending = options.sortDesc[0] - params.order_by = options.sortBy[0] + if (this.options.sortBy[0]) { + params.descending = this.options.sortDesc[0] + params.order_by = this.options.sortBy[0] } if (this.searchByName) { params.like = this.searchByName.trim() } - await this.fetchUsers({ params }) + return params + }, + + refresh() { + this.fetchUsers({ params: this.getParams() }) + }, + + onPage(event: DataTablePageEvent) { + this.options.page = event.page + 1 + this.options.itemsPerPage = event.rows + this.fetchUsers({ params: this.getParams() }) + }, + + onSort(event: DataTableSortEvent) { + this.options.sortBy[0] = event.sortField?.toString() + this.options.sortDesc[0] = event.sortOrder < 1 + this.fetchUsers({ params: this.getParams() }) + }, + + rowClick(event: DataTableRowClickEvent) { + this.$router.push({ + name: 'account', + params: { username: event.data.username } + }) }, createUserDialog() { - const dialog = { maxWidth: 500, persistent: true } + const dialog = { maxWidth: 500, header: 'Create user' } const listeners = { - success: async () => this.resetPaging() + success: () => { + this.resetPaging() + this.fetchUsers({ params: this.getParams() }) + } } this.show({ component: CreateUserForm, @@ -212,10 +220,3 @@ export default defineComponent({ } }) - - diff --git a/web-app/packages/admin-lib/src/modules/admin/views/ProfileView.vue b/web-app/packages/admin-lib/src/modules/admin/views/ProfileView.vue deleted file mode 100644 index ba34a195..00000000 --- a/web-app/packages/admin-lib/src/modules/admin/views/ProfileView.vue +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - diff --git a/web-app/packages/admin-lib/src/modules/admin/views/index.ts b/web-app/packages/admin-lib/src/modules/admin/views/index.ts index 47a6fcd0..6d414de0 100644 --- a/web-app/packages/admin-lib/src/modules/admin/views/index.ts +++ b/web-app/packages/admin-lib/src/modules/admin/views/index.ts @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial -export { default as AccountView } from './AccountsView.vue' -export { default as ProfileView } from './ProfileView.vue' +export { default as AccountsView } from './AccountsView.vue' +export { default as AccountDetailView } from './AccountDetailView.vue' export { default as SettingsView } from './SettingsView.vue' export { default as SettingsViewTemplate } from './SettingsViewTemplate.vue' diff --git a/web-app/packages/admin-lib/src/shims-pinia.d.ts b/web-app/packages/admin-lib/src/shims-pinia.d.ts new file mode 100644 index 00000000..4a4f5ef4 --- /dev/null +++ b/web-app/packages/admin-lib/src/shims-pinia.d.ts @@ -0,0 +1,7 @@ +import { Router } from 'vue-router' + +declare module 'pinia' { + export interface Pinia { + router: Router + } +} diff --git a/web-app/packages/admin-lib/src/shims-tsx.d.ts b/web-app/packages/admin-lib/src/shims-tsx.d.ts deleted file mode 100644 index e73203a2..00000000 --- a/web-app/packages/admin-lib/src/shims-tsx.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) Lutra Consulting Limited -// -// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial - -import Vue, { VNode } from 'vue' - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any - } - } -} diff --git a/web-app/packages/admin-lib/src/shims-vue.d.ts b/web-app/packages/admin-lib/src/shims-vue.d.ts index 42ada501..0e8a3633 100644 --- a/web-app/packages/admin-lib/src/shims-vue.d.ts +++ b/web-app/packages/admin-lib/src/shims-vue.d.ts @@ -2,15 +2,20 @@ // // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial -import Router from 'vue-router' +import { MerginComponentUuid } from './modules/form/types' + +import { ComponentCustomPropertyFilters } from '@/common' declare module '*.vue' { - import Vue from 'vue' + import * as Vue from 'vue' export default Vue } -declare module 'pinia' { - export interface Pinia { - router: Router +// It seems that IntelliJ IDEs are using the @vue/runtime-core module for type checking in .vue