@vc-shell/framework 1.1.99-alpha.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/api/platform.ts +9883 -9883
- package/core/composables/useDynamicProperties/index.ts +16 -10
- package/core/composables/useNotifications/index.ts +1 -32
- package/core/composables/useSettings/index.ts +3 -8
- package/core/composables/useUser/index.ts +171 -74
- package/core/composables/useUserManagement/index.ts +25 -67
- package/core/interceptors/index.ts +56 -19
- package/core/plugins/signalR/index.ts +1 -27
- package/core/types/index.ts +0 -2
- package/dist/core/api/platform.d.ts +1 -1
- package/dist/core/api/platform.d.ts.map +1 -1
- package/dist/core/composables/useDynamicProperties/index.d.ts.map +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useSettings/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +9 -18
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/composables/useUserManagement/index.d.ts +7 -7
- package/dist/core/composables/useUserManagement/index.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts +1 -2
- package/dist/core/interceptors/index.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts +0 -2
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/injection-keys.d.ts +1 -2
- package/dist/injection-keys.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/components/multilanguage-selector/multilanguage-selector.vue.d.ts +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +10 -10
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/components/sign-in/useExternalProvider.d.ts +1 -1
- package/dist/shared/components/sign-in/useExternalProvider.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +2 -2
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +2 -2
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/index.d.ts +1 -0
- package/dist/ui/components/molecules/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts +34 -0
- package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-accordion/index.d.ts +7 -0
- package/dist/ui/components/molecules/vc-accordion/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts +42 -0
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.backupsb.d.ts +3 -3
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +5 -5
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-body/vc-table-body.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/vc-table-desktop-view.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +1 -1
- package/package.json +5 -7
- package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +2 -2
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +1 -15
- package/shared/components/sign-in/useExternalProvider.ts +1 -11
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +3 -11
- package/ui/components/atoms/vc-badge/vc-badge.stories.ts +1 -1
- package/ui/components/atoms/vc-button/vc-button.stories.ts +1 -1
- package/ui/components/atoms/vc-card/vc-card.stories.ts +1 -1
- package/ui/components/atoms/vc-col/vc-col.stories.ts +1 -1
- package/ui/components/atoms/vc-container/vc-container.stories.ts +1 -1
- package/ui/components/atoms/vc-hint/vc-hint.stories.ts +1 -1
- package/ui/components/atoms/vc-icon/vc-icon.stories.ts +1 -1
- package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -1
- package/ui/components/atoms/vc-label/vc-label.stories.ts +1 -1
- package/ui/components/atoms/vc-link/vc-link.stories.ts +1 -1
- package/ui/components/atoms/vc-progress/vc-progress.stories.ts +1 -1
- package/ui/components/atoms/vc-row/vc-row.stories.ts +1 -1
- package/ui/components/atoms/vc-skeleton/vc-skeleton.stories.ts +1 -1
- package/ui/components/atoms/vc-status/vc-status.stories.ts +1 -1
- package/ui/components/atoms/vc-status-icon/vc-status-icon.stories.ts +1 -1
- package/ui/components/atoms/vc-tooltip/vc-tooltip.stories.ts +1 -1
- package/ui/components/atoms/vc-video/vc-video.stories.ts +1 -1
- package/ui/components/atoms/vc-widget/vc-widget.stories.ts +1 -1
- package/ui/components/molecules/index.ts +1 -0
- package/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue +251 -0
- package/ui/components/molecules/vc-accordion/index.ts +11 -0
- package/ui/components/molecules/vc-accordion/vc-accordion.stories.ts +526 -0
- package/ui/components/molecules/vc-accordion/vc-accordion.vue +176 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +1 -1
- package/ui/components/molecules/vc-checkbox/vc-checkbox.stories.ts +1 -1
- package/ui/components/molecules/vc-editor/vc-editor.stories.ts +1 -1
- package/ui/components/molecules/vc-field/vc-field.stories.ts +1 -1
- package/ui/components/molecules/vc-file-upload/vc-file-upload.stories.ts +1 -1
- package/ui/components/molecules/vc-form/vc-form.stories.ts +1 -1
- package/ui/components/molecules/vc-input/vc-input.stories.ts +1 -1
- package/ui/components/molecules/vc-input-currency/vc-input-currency.stories.ts +1 -1
- package/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.stories.ts +1 -1
- package/ui/components/molecules/vc-multivalue/vc-multivalue.stories.ts +1 -1
- package/ui/components/molecules/vc-pagination/vc-pagination.stories.ts +1 -1
- package/ui/components/molecules/vc-radio-button/vc-radio-button.stories.ts +1 -1
- package/ui/components/molecules/vc-rating/vc-rating.stories.ts +1 -1
- package/ui/components/molecules/vc-select/vc-select.stories.ts +1 -1
- package/ui/components/molecules/vc-slider/vc-slider.stories.ts +1 -1
- package/ui/components/molecules/vc-switch/vc-switch.stories.ts +1 -1
- package/ui/components/molecules/vc-textarea/vc-textarea.stories.ts +1 -1
- package/ui/components/molecules/vc-toast/vc-toast.stories.ts +1 -1
- package/ui/components/organisms/vc-app/vc-app.vue +2 -20
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +4 -0
- package/ui/components/organisms/vc-gallery/vc-gallery.stories.ts +1 -1
- package/ui/components/organisms/vc-popup/vc-popup.stories.ts +1 -1
- package/core/providers/README.md +0 -176
- package/core/providers/auth-provider-manager.ts +0 -74
- package/core/providers/auth-provider-utils.ts +0 -26
- package/core/providers/example-custom-auth-provider.ts +0 -162
- package/core/providers/index.ts +0 -3
- package/core/providers/platform-auth-provider.ts +0 -207
- package/core/types/auth-provider.ts +0 -40
- package/dist/assets/042c75b764bc78a7.svg +0 -1
- package/dist/assets/0ba156439a339f2a.svg +0 -1
- package/dist/assets/0be560bfb22d0e72.woff2 +0 -0
- package/dist/assets/0f590f8a94577092.svg +0 -1
- package/dist/assets/0fc5820f8be53a1b.svg +0 -1
- package/dist/assets/105efd028edc1dfe.woff +0 -0
- package/dist/assets/10768e2cc79fc60b.svg +0 -1
- package/dist/assets/11b3d25a56fd9a21.woff2 +0 -0
- package/dist/assets/154365acf3010d96.woff2 +0 -0
- package/dist/assets/157b8721e0600ea8.svg +0 -1
- package/dist/assets/15e91cdd649cde9a.svg +0 -1
- package/dist/assets/19275e398ae57130.woff2 +0 -0
- package/dist/assets/1a3e84b2457f709a.woff +0 -0
- package/dist/assets/1de63eb118636cce.svg +0 -1
- package/dist/assets/1ea01de36eb5491b.svg +0 -1
- package/dist/assets/204eaf512fde2023.svg +0 -1
- package/dist/assets/2088983edf42e153.svg +0 -1
- package/dist/assets/208f810a9321a327.svg +0 -1
- package/dist/assets/21220a9d10e6c558.svg +0 -1
- package/dist/assets/220db345a102045d.woff2 +0 -0
- package/dist/assets/225da11d23968333.svg +0 -1
- package/dist/assets/226f862dd81bdc13.woff2 +0 -0
- package/dist/assets/23a2d53395ddb14f.woff +0 -0
- package/dist/assets/259e6ad461a52ad7.svg +0 -1
- package/dist/assets/261e6dec4d53b9ac.woff +0 -0
- package/dist/assets/262f46a0b6d94bb6.svg +0 -1
- package/dist/assets/2857c513073467da.svg +0 -1
- package/dist/assets/2b3be7889467d98f.woff +0 -0
- package/dist/assets/2d4e6190eec72737.svg +0 -1
- package/dist/assets/2eba973185078bc8.woff +0 -0
- package/dist/assets/334d3f6bc766c516.woff +0 -0
- package/dist/assets/34ff7dd0c2285956.svg +0 -1
- package/dist/assets/3d26b7c1ab78bbe2.woff +0 -0
- package/dist/assets/3d892965ab4f1cbb.woff2 +0 -0
- package/dist/assets/3f8c4cc8099e34b6.woff2 +0 -0
- package/dist/assets/40a0e53b79ce63c6.woff2 +0 -0
- package/dist/assets/41275bcb979cb650.svg +0 -1
- package/dist/assets/434f7982590e462f.woff +0 -0
- package/dist/assets/475937116ee3314a.woff2 +0 -0
- package/dist/assets/489710fb710e73f0.woff +0 -0
- package/dist/assets/49791943b3872376.woff2 +0 -0
- package/dist/assets/4ae5f23e0ca888e7.woff2 +0 -0
- package/dist/assets/4d7a77b0e5373992.svg +0 -1
- package/dist/assets/4e43c74354534fb3.svg +0 -1
- package/dist/assets/4fe75f5117100705.svg +0 -1
- package/dist/assets/52e261a005074e1b.woff +0 -0
- package/dist/assets/5304c3d05a5f9789.woff2 +0 -0
- package/dist/assets/54cda5482c6c9218.woff +0 -0
- package/dist/assets/550f52072e8ccafe.woff2 +0 -0
- package/dist/assets/572bb1bb4156a9c1.svg +0 -1
- package/dist/assets/6075995d7e74da46.woff2 +0 -0
- package/dist/assets/617c4736236e199e.woff +0 -0
- package/dist/assets/67230f05dc94a265.svg +0 -1
- package/dist/assets/6798e4dd4add9b48.svg +0 -1
- package/dist/assets/686d4077c1e26876.woff2 +0 -0
- package/dist/assets/698ec6c722d4cb05.woff2 +0 -0
- package/dist/assets/6a3e73faf406cf33.svg +0 -1
- package/dist/assets/72de3a63bc0b70dd.svg +0 -1
- package/dist/assets/74c6a6ab81bb6340.woff2 +0 -0
- package/dist/assets/74ed5f8a78e71106.svg +0 -1
- package/dist/assets/7a5aa5abd625137f.ttf +0 -0
- package/dist/assets/7ce0c166fd6a1204.woff +0 -0
- package/dist/assets/7d55399c2a7bc985.svg +0 -1
- package/dist/assets/7d970675c69fca1d.woff +0 -0
- package/dist/assets/7eda727273fd98d3.svg +0 -1
- package/dist/assets/7f6ebfd707b76ca2.woff +0 -0
- package/dist/assets/7fa898d213fcc7bc.woff2 +0 -0
- package/dist/assets/861e6b7192b3b6c7.woff +0 -0
- package/dist/assets/8bbcde81ba21ecb2.woff2 +0 -0
- package/dist/assets/8f6657e5e0b8d3e4.woff +0 -0
- package/dist/assets/910b0d99b9e26568.svg +0 -1
- package/dist/assets/91fe94e424323d61.woff +0 -0
- package/dist/assets/92508f8707159b51.svg +0 -1
- package/dist/assets/9392bf1d591e1abb.svg +0 -1
- package/dist/assets/97e8d4984ba0713a.woff2 +0 -0
- package/dist/assets/9cb83236f6bb7ab1.svg +0 -1
- package/dist/assets/9d37314695c0b68d.woff +0 -0
- package/dist/assets/a03cdcd8da5bb987.woff +0 -0
- package/dist/assets/a18404194e3f9047.svg +0 -1
- package/dist/assets/a2017fe7f0a26510.svg +0 -1
- package/dist/assets/ab6e7190bb1492d5.woff2 +0 -0
- package/dist/assets/abf88f301a0730f4.svg +0 -1
- package/dist/assets/ac1a99b3d05d8232.woff +0 -0
- package/dist/assets/aed17cb6fdad2ada.woff2 +0 -0
- package/dist/assets/b1a596e31ad1185a.svg +0 -1
- package/dist/assets/b27767411c8427be.woff +0 -0
- package/dist/assets/b325adcae33bbe7a.svg +0 -1
- package/dist/assets/b372390551ca2fa1.svg +0 -1
- package/dist/assets/b5bb1e8fc975decd.svg +0 -1
- package/dist/assets/b645a4a2181b9dc1.svg +0 -1
- package/dist/assets/b6499ddce0a4ef7d.svg +0 -1
- package/dist/assets/b94421fadd23b0f2.svg +0 -1
- package/dist/assets/bb28fb0f27f1c11b.svg +0 -1
- package/dist/assets/c9191b638a10f67b.woff2 +0 -0
- package/dist/assets/ca791c5ca5848a03.svg +0 -1
- package/dist/assets/cb32840ce330103f.woff +0 -0
- package/dist/assets/ccc878931d74181b.woff2 +0 -0
- package/dist/assets/d084bda16abe8a56.svg +0 -1
- package/dist/assets/d32b129cae2fffd6.svg +0 -1
- package/dist/assets/d35a4c7113315758.woff2 +0 -0
- package/dist/assets/d3f792f54ae4c307.svg +0 -1
- package/dist/assets/d5a5b8630120073d.svg +0 -1
- package/dist/assets/d5f9664ebbfb104b.svg +0 -1
- package/dist/assets/d84247b59449dd88.woff2 +0 -0
- package/dist/assets/dceaf3b39091e6a4.woff +0 -0
- package/dist/assets/dd05d43ff0df2fc7.svg +0 -1
- package/dist/assets/e2ad5b3428289141.woff +0 -0
- package/dist/assets/e38acaa1757232e0.svg +0 -1
- package/dist/assets/e4a8550f1c7ffe36.svg +0 -1
- package/dist/assets/e5adb5ae3a3698f6.svg +0 -1
- package/dist/assets/e61a1889bac955f4.woff2 +0 -0
- package/dist/assets/e72bb11356af94c7.svg +0 -1
- package/dist/assets/e98196a9f8dcb2f0.svg +0 -1
- package/dist/assets/ebec912a42ad49ff.woff +0 -0
- package/dist/assets/ee6983981ffcbb41.woff2 +0 -0
- package/dist/assets/f09d89268e4c0317.svg +0 -1
- package/dist/assets/f239394367fcf005.woff2 +0 -0
- package/dist/assets/f5722262b6e7214e.woff2 +0 -0
- package/dist/assets/f7fc8bf46089d8b2.svg +0 -1
- package/dist/assets/fc829e3f399b70e0.woff2 +0 -0
- package/dist/assets/fe141d99763f5d2b.woff +0 -0
- package/dist/assets/fed13b0d59903483.svg +0 -1
- package/dist/assets/fed757d2c2344ead.woff2 +0 -0
- package/dist/assets/ffc438f20e79ce73.woff +0 -0
- package/dist/core/providers/auth-provider-manager.d.ts +0 -34
- package/dist/core/providers/auth-provider-manager.d.ts.map +0 -1
- package/dist/core/providers/auth-provider-utils.d.ts +0 -17
- package/dist/core/providers/auth-provider-utils.d.ts.map +0 -1
- package/dist/core/providers/example-custom-auth-provider.d.ts +0 -45
- package/dist/core/providers/example-custom-auth-provider.d.ts.map +0 -1
- package/dist/core/providers/index.d.ts +0 -3
- package/dist/core/providers/index.d.ts.map +0 -1
- package/dist/core/providers/platform-auth-provider.d.ts +0 -34
- package/dist/core/providers/platform-auth-provider.d.ts.map +0 -1
- package/dist/core/types/auth-provider.d.ts +0 -27
- package/dist/core/types/auth-provider.d.ts.map +0 -1
- package/dist/framework.js +0 -25048
- package/dist/index.css +0 -9
- package/dist/vendor-boolbase-A_-Pp38P.js +0 -23
- package/dist/vendor-cheerio-C46iBpCu.js +0 -1053
- package/dist/vendor-cheerio-select-C8emRZsx.js +0 -191
- package/dist/vendor-core-js-DDuR6YMQ.js +0 -1206
- package/dist/vendor-css-select-DR9bp36p.js +0 -622
- package/dist/vendor-css-what-CZZaquJM.js +0 -267
- package/dist/vendor-cypress-signalr-mock-DjBxJHA6.js +0 -769
- package/dist/vendor-date-fns-sZ1zMzTH.js +0 -3008
- package/dist/vendor-dom-serializer-Sk3xHhQk.js +0 -213
- package/dist/vendor-domelementtype-B3sFIGaC.js +0 -21
- package/dist/vendor-domhandler-CL40eeX9.js +0 -311
- package/dist/vendor-dompurify-BuxjWxA2.js +0 -553
- package/dist/vendor-domutils-BiVCXO8c.js +0 -386
- package/dist/vendor-entities-CCReaWqU.js +0 -364
- package/dist/vendor-floating-ui-core-Cl9nBI4j.js +0 -349
- package/dist/vendor-floating-ui-dom-3z44E4mf.js +0 -395
- package/dist/vendor-floating-ui-utils-D2sT7feD.js +0 -259
- package/dist/vendor-floating-ui-vue-ClrgkeO5.js +0 -107
- package/dist/vendor-headlessui-vue-D7tzx4PC.js +0 -961
- package/dist/vendor-htmlparser2-CpQu33io.js +0 -735
- package/dist/vendor-intlify-core-base-Da62SG4M.js +0 -1130
- package/dist/vendor-intlify-message-compiler-CHvGSH2u.js +0 -952
- package/dist/vendor-intlify-shared-jWBPd9WB.js +0 -144
- package/dist/vendor-iso-639-1-BJO6WZAt.js +0 -781
- package/dist/vendor-linkify-it-LzoUhj6C.js +0 -199
- package/dist/vendor-linkifyjs-dCH9UYes.js +0 -701
- package/dist/vendor-lodash-es-BqkGj3Jl.js +0 -4816
- package/dist/vendor-lucide-vue-next-m0L4DzUL.js +0 -29780
- package/dist/vendor-markdown-it-Czg9qJTh.js +0 -2263
- package/dist/vendor-markdown-it-task-lists-BxLwscWK.js +0 -69
- package/dist/vendor-mdurl-DZFDNdqC.js +0 -192
- package/dist/vendor-microsoft-applicationinsights-analytics-js-C1Yxuzwg.js +0 -1207
- package/dist/vendor-microsoft-applicationinsights-cfgsync-js-DArHD4Dn.js +0 -261
- package/dist/vendor-microsoft-applicationinsights-channel-js-Dbs0XRes.js +0 -1822
- package/dist/vendor-microsoft-applicationinsights-common-OjU3Zs6r.js +0 -1921
- package/dist/vendor-microsoft-applicationinsights-core-js-DWRvqBek.js +0 -4276
- package/dist/vendor-microsoft-applicationinsights-dependencies-js-BxTNw-Sk.js +0 -1407
- package/dist/vendor-microsoft-applicationinsights-properties-js-Gfhpu-At.js +0 -572
- package/dist/vendor-microsoft-applicationinsights-shims-CxtPYiwp.js +0 -43
- package/dist/vendor-microsoft-applicationinsights-web-9yeJ0EZv.js +0 -487
- package/dist/vendor-microsoft-dynamicproto-js-DSkQkH3T.js +0 -147
- package/dist/vendor-microsoft-signalr-Bgpbb4fW.js +0 -1761
- package/dist/vendor-moment-DMLRxgRE.js +0 -2589
- package/dist/vendor-nevware21-ts-async-CdMc_sGt.js +0 -261
- package/dist/vendor-nevware21-ts-utils-Dy41wRhA.js +0 -853
- package/dist/vendor-nth-check-CS1D-zr5.js +0 -45
- package/dist/vendor-orderedmap-B3SOk52B.js +0 -103
- package/dist/vendor-parse5-htmlparser2-tree-adapter-BWywtwol.js +0 -143
- package/dist/vendor-parse5-zq5Hn0y9.js +0 -5749
- package/dist/vendor-prettier-cZc5sCiS.js +0 -4875
- package/dist/vendor-prosemirror-commands-Cu1q5ZDk.js +0 -385
- package/dist/vendor-prosemirror-dropcursor-BuGmFgFS.js +0 -86
- package/dist/vendor-prosemirror-gapcursor-CyYcCWVK.js +0 -203
- package/dist/vendor-prosemirror-history-DzRcbrCw.js +0 -248
- package/dist/vendor-prosemirror-keymap-KfbdOEJw.js +0 -62
- package/dist/vendor-prosemirror-markdown-OyxRuawK.js +0 -650
- package/dist/vendor-prosemirror-model-DFp4ML7B.js +0 -2730
- package/dist/vendor-prosemirror-schema-list-CwCUArvx.js +0 -87
- package/dist/vendor-prosemirror-state-DHaVEu5h.js +0 -821
- package/dist/vendor-prosemirror-tables-mYok4vGT.js +0 -1711
- package/dist/vendor-prosemirror-transform-CAHmg-qG.js +0 -1508
- package/dist/vendor-prosemirror-view-CspJa44O.js +0 -3751
- package/dist/vendor-punycode-js-CgGegfA_.js +0 -133
- package/dist/vendor-rope-sequence-BWC2FSrq.js +0 -100
- package/dist/vendor-semver-Dar8oU3V.js +0 -1023
- package/dist/vendor-swiper-1bp0oJwt.js +0 -3387
- package/dist/vendor-tanstack-virtual-core-l0sNRNKZ.js +0 -1
- package/dist/vendor-tanstack-vue-virtual-CD9yLWd7.js +0 -1
- package/dist/vendor-tiptap-core-ClsTgaMv.js +0 -3699
- package/dist/vendor-tiptap-extension-blockquote-r1MBx4hD.js +0 -54
- package/dist/vendor-tiptap-extension-bold-BjLI4i8b.js +0 -74
- package/dist/vendor-tiptap-extension-code-D5-kDnMW.js +0 -52
- package/dist/vendor-tiptap-extension-code-block-RjEb0zPA.js +0 -215
- package/dist/vendor-tiptap-extension-document--PLOxIdq.js +0 -12
- package/dist/vendor-tiptap-extension-hard-break-9cxC2YOS.js +0 -59
- package/dist/vendor-tiptap-extension-heading-2w0TutHn.js +0 -63
- package/dist/vendor-tiptap-extension-horizontal-rule-CFowa_lc.js +0 -56
- package/dist/vendor-tiptap-extension-image-aWn-na6j.js +0 -127
- package/dist/vendor-tiptap-extension-italic-Bn-6saY0.js +0 -73
- package/dist/vendor-tiptap-extension-link-BmcG1_k-.js +0 -298
- package/dist/vendor-tiptap-extension-list-BrNBJ45n.js +0 -707
- package/dist/vendor-tiptap-extension-paragraph-DAiYhwUB.js +0 -41
- package/dist/vendor-tiptap-extension-placeholder-9tURDKy-.js +0 -1
- package/dist/vendor-tiptap-extension-strike-DqbXPfos.js +0 -64
- package/dist/vendor-tiptap-extension-table-DQwPaR7v.js +0 -374
- package/dist/vendor-tiptap-extension-table-cell-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-table-header-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-table-row-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-text-BFnfj70b.js +0 -13
- package/dist/vendor-tiptap-extension-text-style-Darua3qr.js +0 -235
- package/dist/vendor-tiptap-extension-underline-QyVnBqQZ.js +0 -65
- package/dist/vendor-tiptap-extensions-CU-D7bfm.js +0 -290
- package/dist/vendor-tiptap-markdown-BwATYN5A.js +0 -826
- package/dist/vendor-tiptap-pm-d91nGny8.js +0 -1
- package/dist/vendor-tiptap-starter-kit-5luf7zzS.js +0 -28
- package/dist/vendor-tiptap-vue-3-CFBErZGb.js +0 -157
- package/dist/vendor-truncate-html-DYC0Lj9o.js +0 -145
- package/dist/vendor-uc-micro-4lbSaZOs.js +0 -17
- package/dist/vendor-vee-validate-i18n-zT8NxX3R.js +0 -93
- package/dist/vendor-vee-validate-rules-4oWUZPpG.js +0 -316
- package/dist/vendor-vue-currency-input-BqaYAdhD.js +0 -317
- package/dist/vendor-vue-demi-CD9yLWd7.js +0 -1
- package/dist/vendor-vue-devtools-api-aVYGocXp.js +0 -93
- package/dist/vendor-vue-i18n-CO5LWKE0.js +0 -1370
- package/dist/vendor-vue3-application-insights-BKiiWnf2.js +0 -69
- package/dist/vendor-vue3-touch-events-DqysuuWh.js +0 -169
- package/dist/vendor-vuepic-vue-datepicker-CaY_xSnG.js +0 -4998
- package/dist/vendor-vueuse-components-sgKpNzof.js +0 -542
- package/dist/vendor-vueuse-core-D0cN7FqY.js +0 -5130
- package/dist/vendor-vueuse-shared-Pt0UEStA.js +0 -1169
- package/dist/vendor-w3c-keyname-CLxH8j-f.js +0 -92
|
@@ -188,6 +188,10 @@ export const useDynamicProperties = <
|
|
|
188
188
|
|
|
189
189
|
property.values?.push(newValue);
|
|
190
190
|
}
|
|
191
|
+
// For boolean properties, return false if no value exists
|
|
192
|
+
if (property.valueType === "Boolean") {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
if (isDictionaryProperty(property)) {
|
|
@@ -203,7 +207,13 @@ export const useDynamicProperties = <
|
|
|
203
207
|
}
|
|
204
208
|
|
|
205
209
|
const firstValue = property.values?.[0];
|
|
206
|
-
if (!firstValue)
|
|
210
|
+
if (!firstValue) {
|
|
211
|
+
// For boolean properties, return false instead of empty string
|
|
212
|
+
if (property.valueType === "Boolean") {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
return "";
|
|
216
|
+
}
|
|
207
217
|
|
|
208
218
|
if (isDictionaryProperty(property)) {
|
|
209
219
|
return firstValue.valueId as string;
|
|
@@ -470,16 +480,12 @@ export const useDynamicProperties = <
|
|
|
470
480
|
}
|
|
471
481
|
|
|
472
482
|
function handleBooleanValue(property: TProperty, value: boolean, initialProp?: TProperty): void {
|
|
473
|
-
if
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
: createPropertyValue({ value } as Partial<TPropertyValue>),
|
|
478
|
-
];
|
|
479
|
-
} else if (value) {
|
|
480
|
-
property.values = [createPropertyValue({ value } as Partial<TPropertyValue>)];
|
|
483
|
+
// Always create or update the value, even if it's false
|
|
484
|
+
// This ensures the state is properly reflected in the UI
|
|
485
|
+
if (property.values?.[0]) {
|
|
486
|
+
Object.assign(property.values[0], { value });
|
|
481
487
|
} else {
|
|
482
|
-
property.values = [];
|
|
488
|
+
property.values = [createPropertyValue({ value } as Partial<TPropertyValue>)];
|
|
483
489
|
}
|
|
484
490
|
}
|
|
485
491
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { PushNotification, PushNotificationClient } from "./../../api/platform";
|
|
2
|
-
import { computed, ComputedRef, ref, onUnmounted
|
|
2
|
+
import { computed, ComputedRef, ref, onUnmounted } from "vue";
|
|
3
3
|
import * as _ from "lodash-es";
|
|
4
|
-
import { AuthProviderKey } from "../../../injection-keys";
|
|
5
|
-
import { shouldEnablePlatformFeatures } from "../../providers/auth-provider-utils";
|
|
6
4
|
|
|
7
5
|
const notificationsClient = new PushNotificationClient();
|
|
8
6
|
|
|
@@ -31,10 +29,6 @@ const subscribers = new Map<
|
|
|
31
29
|
let subscriberCounter = 0;
|
|
32
30
|
|
|
33
31
|
export function useNotifications(notifyType?: string | string[]): INotifications {
|
|
34
|
-
// Check if we're using a custom auth provider
|
|
35
|
-
const authProvider = inject(AuthProviderKey);
|
|
36
|
-
const isPlatformProvider = shouldEnablePlatformFeatures(authProvider);
|
|
37
|
-
|
|
38
32
|
if (notifyType) {
|
|
39
33
|
const types = Array.isArray(notifyType) ? notifyType : [notifyType];
|
|
40
34
|
|
|
@@ -55,12 +49,6 @@ export function useNotifications(notifyType?: string | string[]): INotifications
|
|
|
55
49
|
}
|
|
56
50
|
|
|
57
51
|
async function loadFromHistory(take = 10) {
|
|
58
|
-
// Skip platform API calls for custom authentication providers
|
|
59
|
-
if (!isPlatformProvider) {
|
|
60
|
-
console.log("[useNotifications] Skipping loadFromHistory - custom authentication provider detected");
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
52
|
// TODO temporary workaround to get push notifications without base type
|
|
65
53
|
try {
|
|
66
54
|
const result = await fetch("/api/platform/pushnotifications", {
|
|
@@ -118,25 +106,6 @@ export function useNotifications(notifyType?: string | string[]): INotifications
|
|
|
118
106
|
}
|
|
119
107
|
|
|
120
108
|
async function markAllAsRead() {
|
|
121
|
-
// Skip platform API calls for custom authentication providers
|
|
122
|
-
if (!isPlatformProvider) {
|
|
123
|
-
console.log("[useNotifications] Skipping markAllAsRead - custom authentication provider detected");
|
|
124
|
-
// Still update local state
|
|
125
|
-
notifications.value = notifications.value.map((x) => {
|
|
126
|
-
if (x.isNew) {
|
|
127
|
-
x.isNew = false;
|
|
128
|
-
}
|
|
129
|
-
return x;
|
|
130
|
-
});
|
|
131
|
-
pushNotifications.value = pushNotifications.value.map((x) => {
|
|
132
|
-
if (x.isNew) {
|
|
133
|
-
x.isNew = false;
|
|
134
|
-
}
|
|
135
|
-
return x;
|
|
136
|
-
});
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
109
|
try {
|
|
141
110
|
notifications.value = notifications.value.map((x) => {
|
|
142
111
|
if (x.isNew) {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { useAsync } from "./../useAsync";
|
|
2
2
|
import { useApiClient } from "./../useApiClient";
|
|
3
|
-
import { computed, Ref, ref, ComputedRef, onMounted
|
|
3
|
+
import { computed, Ref, ref, ComputedRef, onMounted } from "vue";
|
|
4
4
|
import { SettingClient } from "./../../api/platform";
|
|
5
5
|
import { useLoading } from "../useLoading";
|
|
6
|
-
import { shouldEnablePlatformFeatures } from "../../providers/auth-provider-utils";
|
|
7
|
-
import { AuthProviderKey } from "../../../injection-keys";
|
|
8
6
|
|
|
9
7
|
interface IUISetting {
|
|
10
8
|
contrast_logo?: string;
|
|
@@ -21,16 +19,13 @@ interface IUseSettings {
|
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
export function useSettings(): IUseSettings {
|
|
24
|
-
// Check if we're using a custom auth provider
|
|
25
|
-
const authProvider = inject(AuthProviderKey);
|
|
26
|
-
const isPlatformProvider = shouldEnablePlatformFeatures(authProvider);
|
|
27
22
|
const uiSettings = ref<IUISetting | undefined>();
|
|
28
23
|
const customSettingsApplied = ref(false);
|
|
29
24
|
|
|
30
25
|
const { getApiClient } = useApiClient(SettingClient);
|
|
31
26
|
|
|
32
27
|
const { loading, action: getUiCustomizationSettings } = useAsync(async () => {
|
|
33
|
-
if (customSettingsApplied.value
|
|
28
|
+
if (customSettingsApplied.value) return;
|
|
34
29
|
|
|
35
30
|
const result = await (await getApiClient()).getUICustomizationSetting();
|
|
36
31
|
const settings = await JSON.parse(result.defaultValue ?? null);
|
|
@@ -56,7 +51,7 @@ export function useSettings(): IUseSettings {
|
|
|
56
51
|
}
|
|
57
52
|
|
|
58
53
|
onMounted(async () => {
|
|
59
|
-
if (!uiSettings.value && !customSettingsApplied.value
|
|
54
|
+
if (!uiSettings.value && !customSettingsApplied.value) {
|
|
60
55
|
await getUiCustomizationSettings();
|
|
61
56
|
}
|
|
62
57
|
});
|
|
@@ -1,114 +1,211 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { computed,
|
|
2
|
+
import { computed, Ref, ref, ComputedRef } from "vue";
|
|
3
3
|
import {
|
|
4
4
|
UserDetail,
|
|
5
|
+
SecurityClient,
|
|
6
|
+
ResetPasswordConfirmRequest,
|
|
5
7
|
SecurityResult,
|
|
8
|
+
ValidatePasswordResetTokenRequest,
|
|
6
9
|
IdentityResult,
|
|
10
|
+
ChangePasswordRequest,
|
|
7
11
|
LoginType,
|
|
12
|
+
LoginRequest,
|
|
8
13
|
SignInResult,
|
|
9
|
-
IUserDetail,
|
|
10
|
-
ISecurityResult,
|
|
11
|
-
ILoginType,
|
|
12
|
-
IIdentityResult,
|
|
13
14
|
} from "./../../api/platform";
|
|
14
|
-
import { RequestPasswordResult
|
|
15
|
+
import { RequestPasswordResult } from "./../../types";
|
|
15
16
|
import { createSharedComposable } from "@vueuse/core";
|
|
16
|
-
import {
|
|
17
|
-
import { authProviderManager } from "../../providers/auth-provider-manager";
|
|
17
|
+
import { useExternalProvider } from "../../../shared/components/sign-in/useExternalProvider";
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
* Interface for the full internal API
|
|
21
|
-
* @deprecated This interface is kept for backward compatibility but will be removed in future versions
|
|
22
|
-
*/
|
|
19
|
+
// Interface for the full internal API provided by _createInternalUserLogic
|
|
23
20
|
export interface IUserInternalAPI {
|
|
24
|
-
user: ComputedRef<
|
|
21
|
+
user: ComputedRef<UserDetail | undefined>;
|
|
25
22
|
loading: ComputedRef<boolean>;
|
|
26
23
|
isAdministrator: ComputedRef<boolean | undefined>;
|
|
27
|
-
loadUser: () => Promise<
|
|
24
|
+
loadUser: () => Promise<UserDetail>;
|
|
28
25
|
signIn: (username: string, password: string) => Promise<SignInResult | { succeeded: boolean; error?: any }>;
|
|
29
26
|
signOut: () => Promise<void>;
|
|
30
27
|
validateToken: (userId: string, token: string) => Promise<boolean>;
|
|
31
|
-
validatePassword: (password: string) => Promise<
|
|
32
|
-
resetPasswordByToken: (userId: string, password: string, token: string) => Promise<
|
|
28
|
+
validatePassword: (password: string) => Promise<IdentityResult>;
|
|
29
|
+
resetPasswordByToken: (userId: string, password: string, token: string) => Promise<SecurityResult>;
|
|
33
30
|
requestPasswordReset: (loginOrEmail: string) => Promise<RequestPasswordResult>;
|
|
34
|
-
changeUserPassword: (oldPassword: string, newPassword: string) => Promise<
|
|
35
|
-
getLoginType: () => Promise<
|
|
31
|
+
changeUserPassword: (oldPassword: string, newPassword: string) => Promise<SecurityResult | undefined>;
|
|
32
|
+
getLoginType: () => Promise<LoginType[]>;
|
|
36
33
|
isAuthenticated: ComputedRef<boolean>;
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
export interface IAppUserAPI {
|
|
40
|
-
user: ComputedRef<
|
|
37
|
+
user: ComputedRef<UserDetail | undefined>;
|
|
41
38
|
loading: ComputedRef<boolean>;
|
|
42
39
|
isAuthenticated: ComputedRef<boolean>;
|
|
43
40
|
isAdministrator: ComputedRef<boolean | undefined>;
|
|
44
|
-
loadUser: () => Promise<
|
|
41
|
+
loadUser: () => Promise<UserDetail>;
|
|
45
42
|
signOut: () => Promise<void>;
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
45
|
+
const user: Ref<UserDetail | undefined> = ref();
|
|
46
|
+
|
|
47
|
+
export function _createInternalUserLogic(): IUserInternalAPI {
|
|
48
|
+
const loading: Ref<boolean> = ref(false);
|
|
49
|
+
|
|
50
|
+
const { storage: externalSignInStorage, signOut: externalSignOut } = useExternalProvider();
|
|
51
|
+
|
|
52
|
+
const securityClient = new SecurityClient();
|
|
53
|
+
|
|
54
|
+
const isAuthenticated = computed(() => user.value?.userName != null);
|
|
55
|
+
|
|
56
|
+
async function validateToken(userId: string, token: string): Promise<boolean> {
|
|
57
|
+
let result = false;
|
|
58
|
+
try {
|
|
59
|
+
loading.value = true;
|
|
60
|
+
result = await securityClient.validatePasswordResetToken(userId, {
|
|
61
|
+
token,
|
|
62
|
+
} as ValidatePasswordResetTokenRequest);
|
|
63
|
+
} catch (e) {
|
|
64
|
+
//TODO: log error
|
|
65
|
+
} finally {
|
|
66
|
+
loading.value = false;
|
|
60
67
|
}
|
|
68
|
+
return result;
|
|
61
69
|
}
|
|
62
70
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
71
|
+
async function validatePassword(password: string): Promise<IdentityResult> {
|
|
72
|
+
return securityClient.validatePassword(password);
|
|
73
|
+
}
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
async function resetPasswordByToken(userId: string, password: string, token: string): Promise<SecurityResult> {
|
|
76
|
+
return securityClient.resetPasswordByToken(userId, {
|
|
77
|
+
newPassword: password,
|
|
78
|
+
token,
|
|
79
|
+
} as ResetPasswordConfirmRequest);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function signIn(
|
|
83
|
+
username: string,
|
|
84
|
+
password: string,
|
|
85
|
+
): Promise<SignInResult | { succeeded: boolean; error?: any; status?: number }> {
|
|
86
|
+
console.debug(`[@vc-shell/framework#_createInternalUserLogic:signIn] - Entry point`);
|
|
87
|
+
try {
|
|
88
|
+
loading.value = true;
|
|
89
|
+
const result = await securityClient.login(new LoginRequest({ userName: username, password }));
|
|
90
|
+
return await securityClient
|
|
91
|
+
.getCurrentUser()
|
|
92
|
+
.then((res) => {
|
|
93
|
+
if (res) {
|
|
94
|
+
user.value = res;
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
throw { succeeded: false };
|
|
98
|
+
})
|
|
99
|
+
.catch((e) => {
|
|
100
|
+
throw e;
|
|
101
|
+
});
|
|
102
|
+
} catch (e: any) {
|
|
103
|
+
//TODO: log error
|
|
104
|
+
console.log(e);
|
|
105
|
+
return { succeeded: false, error: e.message, status: e.status };
|
|
106
|
+
} finally {
|
|
107
|
+
loading.value = false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function signOut(): Promise<void> {
|
|
112
|
+
console.debug(`[@vc-shell/framework#_createInternalUserLogic:signOut] - Entry point`);
|
|
113
|
+
|
|
114
|
+
user.value = undefined;
|
|
115
|
+
|
|
116
|
+
if (externalSignInStorage.value?.providerType) {
|
|
117
|
+
await externalSignOut(externalSignInStorage.value.providerType);
|
|
118
|
+
} else {
|
|
119
|
+
securityClient.logout();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async function loadUser(): Promise<UserDetail> {
|
|
124
|
+
console.debug(`[@vc-shell/framework#_createInternalUserLogic:loadUser] - Entry point`);
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
loading.value = true;
|
|
128
|
+
user.value = await securityClient.getCurrentUser();
|
|
129
|
+
console.log("[_createInternalUserLogic]: an user details has been loaded", user.value);
|
|
130
|
+
} catch (e: any) {
|
|
131
|
+
console.error(e);
|
|
132
|
+
} finally {
|
|
133
|
+
loading.value = false;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return { ...user.value } as UserDetail;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
async function requestPasswordReset(loginOrEmail: string): Promise<RequestPasswordResult> {
|
|
140
|
+
try {
|
|
141
|
+
loading.value = true;
|
|
142
|
+
await securityClient.requestPasswordReset(loginOrEmail);
|
|
143
|
+
return { succeeded: true };
|
|
144
|
+
} catch (e) {
|
|
145
|
+
//TODO: log error
|
|
146
|
+
return { succeeded: false, error: e as string };
|
|
147
|
+
} finally {
|
|
148
|
+
loading.value = false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async function changeUserPassword(oldPassword: string, newPassword: string): Promise<SecurityResult | undefined> {
|
|
153
|
+
let result;
|
|
154
|
+
|
|
155
|
+
try {
|
|
156
|
+
loading.value = true;
|
|
157
|
+
const command = new ChangePasswordRequest({
|
|
158
|
+
oldPassword,
|
|
159
|
+
newPassword,
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
result = await securityClient.changeCurrentUserPassword(command);
|
|
163
|
+
} catch (e: any) {
|
|
164
|
+
return { succeeded: false, errors: [e.message] } as SecurityResult;
|
|
165
|
+
} finally {
|
|
166
|
+
loading.value = false;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return result;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
async function getLoginType() {
|
|
173
|
+
let result: LoginType[] | null = null;
|
|
174
|
+
try {
|
|
175
|
+
result = await securityClient.getLoginTypes();
|
|
176
|
+
} catch (e) {
|
|
177
|
+
console.error(e);
|
|
178
|
+
throw e;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return result;
|
|
182
|
+
}
|
|
74
183
|
|
|
75
184
|
return {
|
|
76
|
-
user:
|
|
77
|
-
loading:
|
|
78
|
-
isAdministrator:
|
|
79
|
-
isAuthenticated
|
|
80
|
-
loadUser
|
|
81
|
-
signIn
|
|
82
|
-
signOut
|
|
83
|
-
validateToken
|
|
84
|
-
validatePassword
|
|
85
|
-
resetPasswordByToken
|
|
86
|
-
requestPasswordReset
|
|
87
|
-
changeUserPassword
|
|
88
|
-
getLoginType
|
|
185
|
+
user: computed(() => user.value),
|
|
186
|
+
loading: computed(() => loading.value),
|
|
187
|
+
isAdministrator: computed(() => user.value?.isAdministrator),
|
|
188
|
+
isAuthenticated,
|
|
189
|
+
loadUser,
|
|
190
|
+
signIn,
|
|
191
|
+
signOut,
|
|
192
|
+
validateToken,
|
|
193
|
+
validatePassword,
|
|
194
|
+
resetPasswordByToken,
|
|
195
|
+
requestPasswordReset,
|
|
196
|
+
changeUserPassword,
|
|
197
|
+
getLoginType,
|
|
89
198
|
};
|
|
90
199
|
}
|
|
91
200
|
|
|
92
201
|
export const useUser = createSharedComposable((): IAppUserAPI => {
|
|
93
|
-
|
|
94
|
-
// This is important because custom auth providers may be set after composable creation
|
|
95
|
-
|
|
202
|
+
const internals = _createInternalUserLogic();
|
|
96
203
|
return {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
get isAuthenticated() {
|
|
105
|
-
return getAuthProvider().isAuthenticated;
|
|
106
|
-
},
|
|
107
|
-
get isAdministrator() {
|
|
108
|
-
return getAuthProvider().isAdministrator;
|
|
109
|
-
},
|
|
110
|
-
// Methods get provider dynamically on each call
|
|
111
|
-
loadUser: () => getAuthProvider().loadUser(),
|
|
112
|
-
signOut: () => getAuthProvider().signOut(),
|
|
204
|
+
user: internals.user,
|
|
205
|
+
loading: internals.loading,
|
|
206
|
+
isAuthenticated: internals.isAuthenticated,
|
|
207
|
+
isAdministrator: internals.isAdministrator,
|
|
208
|
+
loadUser: internals.loadUser,
|
|
209
|
+
signOut: internals.signOut,
|
|
113
210
|
};
|
|
114
211
|
});
|
|
@@ -1,87 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, ComputedRef } from "vue";
|
|
2
2
|
import { createSharedComposable } from "@vueuse/core";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
LoginType,
|
|
7
|
-
UserDetail,
|
|
8
|
-
SignInResult,
|
|
9
|
-
IUserDetail,
|
|
10
|
-
IIdentityResult,
|
|
11
|
-
ISecurityResult,
|
|
12
|
-
ILoginType,
|
|
13
|
-
} from "./../../api/platform";
|
|
14
|
-
import { RequestPasswordResult, IAuthProvider } from "./../../types";
|
|
15
|
-
import { AuthProviderKey } from "../../../injection-keys";
|
|
16
|
-
import { authProviderManager } from "../../providers/auth-provider-manager";
|
|
3
|
+
import { _createInternalUserLogic, IUserInternalAPI } from "../useUser"; // Import the internal logic
|
|
4
|
+
import { SecurityResult, IdentityResult, LoginType, UserDetail, SignInResult } from "./../../api/platform";
|
|
5
|
+
import { RequestPasswordResult } from "./../../types";
|
|
17
6
|
|
|
18
7
|
// Interface for the API exposed by useUserManagement (for framework/admin use)
|
|
19
8
|
export interface IUserManagementAPI {
|
|
20
|
-
user: ComputedRef<
|
|
9
|
+
user: ComputedRef<UserDetail | undefined>;
|
|
21
10
|
loading: ComputedRef<boolean>;
|
|
22
11
|
isAdministrator: ComputedRef<boolean | undefined>;
|
|
23
12
|
isAuthenticated: ComputedRef<boolean>;
|
|
24
13
|
// Methods specific to user management
|
|
25
14
|
validateToken: (userId: string, token: string) => Promise<boolean>;
|
|
26
|
-
validatePassword: (password: string) => Promise<
|
|
27
|
-
resetPasswordByToken: (userId: string, password: string, token: string) => Promise<
|
|
28
|
-
getLoginType: () => Promise<
|
|
29
|
-
loadUser: () => Promise<
|
|
15
|
+
validatePassword: (password: string) => Promise<IdentityResult>;
|
|
16
|
+
resetPasswordByToken: (userId: string, password: string, token: string) => Promise<SecurityResult>;
|
|
17
|
+
getLoginType: () => Promise<LoginType[]>;
|
|
18
|
+
loadUser: () => Promise<UserDetail>;
|
|
30
19
|
requestPasswordReset: (loginOrEmail: string) => Promise<RequestPasswordResult>;
|
|
31
|
-
changeUserPassword: (oldPassword: string, newPassword: string) => Promise<
|
|
20
|
+
changeUserPassword: (oldPassword: string, newPassword: string) => Promise<SecurityResult | undefined>;
|
|
32
21
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
22
|
signIn: (username: string, password: string) => Promise<SignInResult | { succeeded: boolean; error?: any }>;
|
|
34
23
|
signOut: () => Promise<void>;
|
|
35
24
|
}
|
|
36
25
|
|
|
37
|
-
/**
|
|
38
|
-
* Get auth provider with fallback to global instance
|
|
39
|
-
* This allows composables to work before Vue app context is available
|
|
40
|
-
* Priority: Vue DI > Global Manager (always has default PlatformAuthProvider)
|
|
41
|
-
*/
|
|
42
|
-
function getAuthProvider(): IAuthProvider {
|
|
43
|
-
// Try to get from Vue DI first (preferred method for components)
|
|
44
|
-
const instance = getCurrentInstance();
|
|
45
|
-
if (instance) {
|
|
46
|
-
const injectedProvider = inject(AuthProviderKey, null);
|
|
47
|
-
if (injectedProvider) {
|
|
48
|
-
return injectedProvider;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Fallback to global provider (always available with default PlatformAuthProvider)
|
|
53
|
-
return authProviderManager.getProvider();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
26
|
export const useUserManagement = createSharedComposable((): IUserManagementAPI => {
|
|
57
|
-
//
|
|
58
|
-
|
|
27
|
+
// Utilize the same internal logic instance
|
|
28
|
+
const internals: IUserInternalAPI = _createInternalUserLogic();
|
|
59
29
|
|
|
60
30
|
return {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
// Methods get provider dynamically on each call
|
|
75
|
-
validateToken: (userId: string, token: string) => getAuthProvider().validateToken(userId, token),
|
|
76
|
-
validatePassword: (password: string) => getAuthProvider().validatePassword(password),
|
|
77
|
-
resetPasswordByToken: (userId: string, password: string, token: string) =>
|
|
78
|
-
getAuthProvider().resetPasswordByToken(userId, password, token),
|
|
79
|
-
getLoginType: () => getAuthProvider().getLoginType(),
|
|
80
|
-
loadUser: () => getAuthProvider().loadUser(),
|
|
81
|
-
requestPasswordReset: (loginOrEmail: string) => getAuthProvider().requestPasswordReset(loginOrEmail),
|
|
82
|
-
changeUserPassword: (oldPassword: string, newPassword: string) =>
|
|
83
|
-
getAuthProvider().changeUserPassword(oldPassword, newPassword),
|
|
84
|
-
signIn: (username: string, password: string) => getAuthProvider().signIn(username, password),
|
|
85
|
-
signOut: () => getAuthProvider().signOut(),
|
|
31
|
+
user: internals.user,
|
|
32
|
+
loading: internals.loading,
|
|
33
|
+
isAdministrator: internals.isAdministrator,
|
|
34
|
+
isAuthenticated: internals.isAuthenticated,
|
|
35
|
+
validateToken: internals.validateToken,
|
|
36
|
+
validatePassword: internals.validatePassword,
|
|
37
|
+
resetPasswordByToken: internals.resetPasswordByToken,
|
|
38
|
+
getLoginType: internals.getLoginType,
|
|
39
|
+
loadUser: internals.loadUser,
|
|
40
|
+
requestPasswordReset: internals.requestPasswordReset,
|
|
41
|
+
changeUserPassword: internals.changeUserPassword,
|
|
42
|
+
signIn: internals.signIn,
|
|
43
|
+
signOut: internals.signOut,
|
|
86
44
|
};
|
|
87
45
|
});
|
|
@@ -1,33 +1,70 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import { Router } from "vue-router";
|
|
3
|
+
import { useUserManagement } from "../composables/useUserManagement";
|
|
2
4
|
import { notification } from "../../shared";
|
|
3
|
-
import { IAuthProvider } from "../types/auth-provider";
|
|
4
5
|
|
|
5
|
-
export function registerInterceptors(router: Router
|
|
6
|
+
export function registerInterceptors(router: Router) {
|
|
6
7
|
const { fetch: originalFetch } = window;
|
|
8
|
+
const { signOut, isAuthenticated } = useUserManagement();
|
|
7
9
|
|
|
8
10
|
window.fetch = async (...args) => {
|
|
9
11
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
+
* Overrides the global `fetch` function to handle API calls in demo mode.
|
|
13
|
+
* If `window.__DEMO_MODE__` is true, the fetch is cancelled and a warning is logged.
|
|
14
|
+
* Otherwise, the original `fetch` function is called.
|
|
15
|
+
* @param args - The arguments passed to the `fetch` function.
|
|
16
|
+
* @returns A promise that resolves to the response from the API call.
|
|
12
17
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
if (window.__DEMO_MODE__) {
|
|
19
|
+
console.warn("CANCELLED FETCH WHILE IN __DEMO_MODE__: ", ...args);
|
|
20
|
+
console.warn("Please logout and add APP_PLATFORM_URL into .env file of your application to enable API calls");
|
|
21
|
+
return new Promise((resolve: any) => {
|
|
22
|
+
/**
|
|
23
|
+
* This conditions are mocking login, currentuser API calls for demo purposes.
|
|
24
|
+
*/
|
|
25
|
+
if (args[0] === "/api/platform/security/login") {
|
|
26
|
+
resolve({
|
|
27
|
+
status: 200,
|
|
28
|
+
text: async () => JSON.stringify({ succeeded: true }),
|
|
29
|
+
});
|
|
30
|
+
} else if (args[0] === "/api/platform/security/currentuser") {
|
|
31
|
+
notification.warning(
|
|
32
|
+
"You are currently in DEMO mode until the first page refresh. \n All API calls are disabled. Please add APP_PLATFORM_URL to your application's .env file to enable API calls.",
|
|
33
|
+
{
|
|
34
|
+
timeout: 10000,
|
|
35
|
+
},
|
|
25
36
|
);
|
|
26
|
-
|
|
37
|
+
resolve({
|
|
38
|
+
status: 200,
|
|
39
|
+
text: async () => JSON.stringify({ id: "demo_user_id", userName: "DEMO_USER" }),
|
|
40
|
+
});
|
|
41
|
+
} else {
|
|
42
|
+
resolve({
|
|
43
|
+
status: 200,
|
|
44
|
+
text: async () => JSON.stringify({}),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
const response = await originalFetch(...args);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* If the response is unauthorized, logout the user
|
|
53
|
+
*/
|
|
54
|
+
if (response.status === 401) {
|
|
55
|
+
//logout user
|
|
56
|
+
if (isAuthenticated.value) {
|
|
57
|
+
signOut().then(() => {
|
|
58
|
+
redirect(router);
|
|
59
|
+
notification.error(
|
|
60
|
+
"Access Denied: Your session has expired or you do not have the necessary permissions.\nPlease log in again or contact the administrator for assistance.",
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
27
64
|
}
|
|
28
|
-
}
|
|
29
65
|
|
|
30
|
-
|
|
66
|
+
return response;
|
|
67
|
+
}
|
|
31
68
|
};
|
|
32
69
|
|
|
33
70
|
return window.fetch;
|