@vc-shell/framework 1.1.99-alpha.1 → 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/vue3";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
2
2
|
import { VcEditor, type CustomToolbarButton, type CustomToolbarDropdown } from "./";
|
|
3
3
|
import { ref, defineComponent, h } from "vue";
|
|
4
4
|
import type { Editor } from "@tiptap/vue-3";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
|
-
import { Meta, StoryObj } from "@storybook/vue3";
|
|
2
|
+
import { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
3
3
|
import VcRating from "./vc-rating.vue";
|
|
4
4
|
|
|
5
5
|
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, defineComponent } from "vue";
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/vue3";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
3
3
|
import { VcToast } from ".";
|
|
4
4
|
import { notification } from "../../../../shared/components/notifications";
|
|
5
5
|
|
|
@@ -60,11 +60,10 @@ import { ChangePasswordButton } from "../../../../shared/components/change-passw
|
|
|
60
60
|
import { LogoutButton } from "../../../../shared/components/logout-button";
|
|
61
61
|
import { provideGlobalSearch } from "../../../../core/composables/useGlobalSearch";
|
|
62
62
|
import { provideDashboardService } from "../../../../core/composables/useDashboard";
|
|
63
|
-
import { DynamicModulesKey, EMBEDDED_MODE
|
|
63
|
+
import { DynamicModulesKey, EMBEDDED_MODE } from "../../../../injection-keys";
|
|
64
64
|
import { provideMenuService } from "../../../../core/composables/useMenuService";
|
|
65
65
|
import { provideAppBarMobileButtonsService } from "../../../../core/composables/useAppBarMobileButtons";
|
|
66
66
|
import { useUserManagement } from "../../../../core/composables/useUserManagement";
|
|
67
|
-
import { shouldEnablePlatformFeatures } from "../../../../core/providers/auth-provider-utils";
|
|
68
67
|
|
|
69
68
|
export interface Props {
|
|
70
69
|
isReady: boolean;
|
|
@@ -98,23 +97,6 @@ console.debug("vc-app: Init vc-app");
|
|
|
98
97
|
const internalRoutes = inject("bladeRoutes") as BladeRoutesRecord[];
|
|
99
98
|
const dynamicModules = inject(DynamicModulesKey, undefined);
|
|
100
99
|
|
|
101
|
-
// Inject auth provider to check if platform features should be enabled
|
|
102
|
-
const authProvider = inject(AuthProviderKey);
|
|
103
|
-
|
|
104
|
-
// Automatically disable app switcher for custom authentication providers
|
|
105
|
-
const shouldDisableAppSwitcher = computed(() => {
|
|
106
|
-
// If explicitly disabled via prop, respect that
|
|
107
|
-
if (props.disableAppSwitcher) return true;
|
|
108
|
-
|
|
109
|
-
// If using custom auth provider, disable platform-specific features
|
|
110
|
-
if (!shouldEnablePlatformFeatures(authProvider)) {
|
|
111
|
-
console.log("[VcApp] App Switcher disabled - custom authentication provider detected");
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return false;
|
|
116
|
-
});
|
|
117
|
-
|
|
118
100
|
const isAppReady = ref(props.isReady);
|
|
119
101
|
|
|
120
102
|
const route = useRoute();
|
|
@@ -241,7 +223,7 @@ provideAppSlots(
|
|
|
241
223
|
slots,
|
|
242
224
|
{
|
|
243
225
|
disableMenu: props.disableMenu,
|
|
244
|
-
disableAppSwitcher:
|
|
226
|
+
disableAppSwitcher: props.disableAppSwitcher,
|
|
245
227
|
version: props.version,
|
|
246
228
|
avatar: props.avatar,
|
|
247
229
|
name: props.name,
|
|
@@ -503,6 +503,10 @@ const value = computed({
|
|
|
503
503
|
// Return empty array as fallback
|
|
504
504
|
return [];
|
|
505
505
|
}
|
|
506
|
+
// For boolean and other types, extract value from PropertyValue object if needed
|
|
507
|
+
if (internalModel.value && typeof internalModel.value === "object" && "value" in internalModel.value) {
|
|
508
|
+
return internalModel.value.value;
|
|
509
|
+
}
|
|
506
510
|
return internalModel.value;
|
|
507
511
|
},
|
|
508
512
|
set(newValue) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
1
|
+
import type { Meta, StoryFn } from "@storybook/vue3-vite";
|
|
2
2
|
import { VcGallery } from "./";
|
|
3
3
|
import VcGalleryItem from "./_internal/vc-gallery-item/vc-gallery-item.vue";
|
|
4
4
|
import VcGalleryPreview from "./_internal/vc-gallery-preview/vc-gallery-preview.vue";
|
package/core/providers/README.md
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
# Authentication Providers
|
|
2
|
-
|
|
3
|
-
This directory contains authentication provider implementations for the vc-shell framework.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
The vc-shell framework uses a pluggable authentication system that allows you to implement custom authentication logic while maintaining compatibility with all framework pages (Login, ResetPassword, ChangePassword, Invite).
|
|
8
|
-
|
|
9
|
-
## Available Providers
|
|
10
|
-
|
|
11
|
-
### PlatformAuthProvider (Default)
|
|
12
|
-
|
|
13
|
-
The default authentication provider that uses VirtoCommerce Platform API for authentication.
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import { PlatformAuthProvider } from "@vc-shell/framework";
|
|
17
|
-
|
|
18
|
-
const authProvider = new PlatformAuthProvider();
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
This provider is used automatically if no custom provider is specified.
|
|
22
|
-
|
|
23
|
-
## Creating a Custom Provider
|
|
24
|
-
|
|
25
|
-
To create a custom authentication provider, implement the `IAuthProvider` interface:
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import { IAuthProvider, UserDetail, SignInResult } from "@vc-shell/framework";
|
|
29
|
-
import { computed, ref } from "vue";
|
|
30
|
-
|
|
31
|
-
export class CustomAuthProvider implements IAuthProvider {
|
|
32
|
-
private _user = ref<UserDetail | undefined>();
|
|
33
|
-
private _loading = ref(false);
|
|
34
|
-
|
|
35
|
-
get user() {
|
|
36
|
-
return computed(() => this._user.value);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
get loading() {
|
|
40
|
-
return computed(() => this._loading.value);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
get isAuthenticated() {
|
|
44
|
-
return computed(() => this._user.value?.userName != null);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
get isAdministrator() {
|
|
48
|
-
return computed(() => this._user.value?.isAdministrator);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
async loadUser(): Promise<UserDetail> {
|
|
52
|
-
// Your custom logic to load user
|
|
53
|
-
// Example: from localStorage, file, custom API, etc.
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
async signIn(username: string, password: string): Promise<SignInResult> {
|
|
57
|
-
// Your custom sign-in logic
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async signOut(): Promise<void> {
|
|
61
|
-
// Your custom sign-out logic
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Implement other required methods...
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
See `example-custom-auth-provider.ts` for a complete implementation example.
|
|
69
|
-
|
|
70
|
-
## Required Methods
|
|
71
|
-
|
|
72
|
-
All authentication providers must implement the following methods:
|
|
73
|
-
|
|
74
|
-
### Core Methods
|
|
75
|
-
- `loadUser()` - Load current authenticated user
|
|
76
|
-
- `signIn(username, password)` - Authenticate user with credentials
|
|
77
|
-
- `signOut()` - Sign out current user
|
|
78
|
-
|
|
79
|
-
### Password Management Methods
|
|
80
|
-
- `validateToken(userId, token)` - Validate password reset token
|
|
81
|
-
- `validatePassword(password)` - Validate password strength
|
|
82
|
-
- `resetPasswordByToken(userId, password, token)` - Reset password using token
|
|
83
|
-
- `requestPasswordReset(loginOrEmail)` - Request password reset email
|
|
84
|
-
- `changeUserPassword(oldPassword, newPassword)` - Change current user password
|
|
85
|
-
|
|
86
|
-
### Additional Methods
|
|
87
|
-
- `getLoginType()` - Get available login types (e.g., local, external)
|
|
88
|
-
|
|
89
|
-
### Properties
|
|
90
|
-
- `user` - Current user details (ComputedRef)
|
|
91
|
-
- `loading` - Loading state (ComputedRef)
|
|
92
|
-
- `isAuthenticated` - Authentication status (ComputedRef)
|
|
93
|
-
- `isAdministrator` - Administrator status (ComputedRef)
|
|
94
|
-
|
|
95
|
-
## Using a Custom Provider
|
|
96
|
-
|
|
97
|
-
To use a custom authentication provider in your application:
|
|
98
|
-
|
|
99
|
-
```typescript
|
|
100
|
-
import VirtoShellFramework from "@vc-shell/framework";
|
|
101
|
-
import { CustomAuthProvider } from "./auth/custom-provider";
|
|
102
|
-
|
|
103
|
-
const app = createApp(App);
|
|
104
|
-
const customAuthProvider = new CustomAuthProvider();
|
|
105
|
-
|
|
106
|
-
app.use(VirtoShellFramework, {
|
|
107
|
-
router,
|
|
108
|
-
authProvider: customAuthProvider, // Pass your custom provider
|
|
109
|
-
i18n: {
|
|
110
|
-
locale: "en",
|
|
111
|
-
fallbackLocale: "en",
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Type Safety
|
|
117
|
-
|
|
118
|
-
All providers use the same types from the platform API:
|
|
119
|
-
- `UserDetail` - User information
|
|
120
|
-
- `SignInResult` - Sign-in result
|
|
121
|
-
- `SecurityResult` - Security operation result
|
|
122
|
-
- `IdentityResult` - Identity validation result
|
|
123
|
-
- `LoginType` - Login type enumeration
|
|
124
|
-
|
|
125
|
-
This ensures compatibility across all authentication pages and interceptors.
|
|
126
|
-
|
|
127
|
-
## Integration with Framework
|
|
128
|
-
|
|
129
|
-
The authentication provider integrates with:
|
|
130
|
-
|
|
131
|
-
1. **Login Pages** - All auth pages (Login, ResetPassword, ChangePassword, Invite) automatically use the provided auth provider
|
|
132
|
-
2. **HTTP Interceptors** - Automatically handles 401 errors and redirects to login
|
|
133
|
-
3. **Route Guards** - Checks authentication status before route navigation
|
|
134
|
-
4. **Composables** - Available via `useUser()` and `useUserManagement()` composables
|
|
135
|
-
|
|
136
|
-
## Example Use Cases
|
|
137
|
-
|
|
138
|
-
### File-based Authentication
|
|
139
|
-
```typescript
|
|
140
|
-
class FileAuthProvider implements IAuthProvider {
|
|
141
|
-
async signIn(username: string, password: string) {
|
|
142
|
-
const credentials = await fetch("/auth-data.json");
|
|
143
|
-
const users = await credentials.json();
|
|
144
|
-
// Validate against file data
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Custom API Authentication
|
|
150
|
-
```typescript
|
|
151
|
-
class CustomApiAuthProvider implements IAuthProvider {
|
|
152
|
-
async signIn(username: string, password: string) {
|
|
153
|
-
const response = await fetch("https://my-custom-api.com/auth", {
|
|
154
|
-
method: "POST",
|
|
155
|
-
body: JSON.stringify({ username, password }),
|
|
156
|
-
});
|
|
157
|
-
// Handle custom API response
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### OAuth/OIDC Provider
|
|
163
|
-
```typescript
|
|
164
|
-
class OAuthAuthProvider implements IAuthProvider {
|
|
165
|
-
async signIn(username: string, password: string) {
|
|
166
|
-
// Redirect to OAuth provider
|
|
167
|
-
window.location.href = "https://oauth-provider.com/authorize";
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Backward Compatibility
|
|
173
|
-
|
|
174
|
-
If no custom provider is specified, the framework automatically uses `PlatformAuthProvider`, ensuring full backward compatibility with existing applications.
|
|
175
|
-
|
|
176
|
-
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { IAuthProvider } from "../types/auth-provider";
|
|
2
|
-
import { PlatformAuthProvider } from "./platform-auth-provider";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Global auth provider manager
|
|
6
|
-
* Provides access to auth provider before Vue app context is available
|
|
7
|
-
* This is necessary for early initialization scenarios where composables
|
|
8
|
-
* are called before app.use(VirtoShellFramework)
|
|
9
|
-
*/
|
|
10
|
-
class AuthProviderManager {
|
|
11
|
-
private provider: IAuthProvider | null = null;
|
|
12
|
-
private defaultProvider: IAuthProvider | null = null;
|
|
13
|
-
private configureWasCalled = false;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Set the global auth provider
|
|
17
|
-
* Should be called via VirtoShellFramework.configure() before any composables
|
|
18
|
-
* If custom provider is provided, it will replace the default
|
|
19
|
-
*/
|
|
20
|
-
setProvider(provider: IAuthProvider): void {
|
|
21
|
-
console.log("[AuthProviderManager] Setting auth provider:", provider.constructor.name);
|
|
22
|
-
this.configureWasCalled = true;
|
|
23
|
-
this.provider = provider;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Get the global auth provider
|
|
28
|
-
* Lazy-initializes default PlatformAuthProvider if no custom provider was set
|
|
29
|
-
*/
|
|
30
|
-
getProvider(): IAuthProvider {
|
|
31
|
-
// If custom provider was set, use it
|
|
32
|
-
if (this.provider) {
|
|
33
|
-
return this.provider;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Lazy-initialize default platform provider only when needed (backward compatibility)
|
|
37
|
-
if (!this.defaultProvider) {
|
|
38
|
-
console.log("[AuthProviderManager] Lazy-initializing default PlatformAuthProvider");
|
|
39
|
-
|
|
40
|
-
// Show deprecation warning only if configure() was never called
|
|
41
|
-
if (!this.configureWasCalled) {
|
|
42
|
-
console.warn(
|
|
43
|
-
"[AuthProviderManager] DEPRECATION WARNING: " +
|
|
44
|
-
"Automatic PlatformAuthProvider creation will be removed in a future version. " +
|
|
45
|
-
"Please use VirtoShellFramework.configure({ authProvider }) explicitly before calling useUser()."
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
this.defaultProvider = new PlatformAuthProvider();
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return this.defaultProvider;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Check if provider is available
|
|
57
|
-
*/
|
|
58
|
-
hasProvider(): boolean {
|
|
59
|
-
return this.provider !== null || this.defaultProvider !== null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Reset manager (for testing)
|
|
64
|
-
*/
|
|
65
|
-
reset(): void {
|
|
66
|
-
this.provider = null;
|
|
67
|
-
this.defaultProvider = null;
|
|
68
|
-
this.configureWasCalled = false;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// Global singleton instance
|
|
73
|
-
export const authProviderManager = new AuthProviderManager();
|
|
74
|
-
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { IAuthProvider } from "../types/auth-provider";
|
|
2
|
-
import { PlatformAuthProvider } from "./platform-auth-provider";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Check if the provider is a platform provider
|
|
6
|
-
* Centralized logic for determining platform-specific features availability
|
|
7
|
-
*/
|
|
8
|
-
export function isPlatformProvider(provider: IAuthProvider | null | undefined): boolean {
|
|
9
|
-
return provider instanceof PlatformAuthProvider;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Check if platform-specific features should be enabled
|
|
14
|
-
* This is the main function to use throughout the framework
|
|
15
|
-
*/
|
|
16
|
-
export function shouldEnablePlatformFeatures(provider: IAuthProvider | null | undefined): boolean {
|
|
17
|
-
return isPlatformProvider(provider);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Get a safe provider instance with fallback
|
|
22
|
-
* Handles null/undefined cases gracefully
|
|
23
|
-
*/
|
|
24
|
-
export function getSafeProvider(provider: IAuthProvider | null | undefined): IAuthProvider | null {
|
|
25
|
-
return provider || null;
|
|
26
|
-
}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
/**
|
|
3
|
-
* Example Custom Authentication Provider
|
|
4
|
-
*
|
|
5
|
-
* This is an example implementation showing how to create a custom authentication provider.
|
|
6
|
-
* You can use this as a template to implement your own authentication logic.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import { CustomAuthProvider } from './auth/custom-provider';
|
|
11
|
-
*
|
|
12
|
-
* const customAuthProvider = new CustomAuthProvider();
|
|
13
|
-
*
|
|
14
|
-
* app.use(VirtoShellFramework, {
|
|
15
|
-
* router,
|
|
16
|
-
* authProvider: customAuthProvider,
|
|
17
|
-
* i18n: { ... }
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
import { computed, Ref, ref, ComputedRef } from "vue";
|
|
23
|
-
import {
|
|
24
|
-
UserDetail,
|
|
25
|
-
SecurityResult,
|
|
26
|
-
IdentityResult,
|
|
27
|
-
LoginType,
|
|
28
|
-
SignInResult,
|
|
29
|
-
IIdentityResult,
|
|
30
|
-
} from "../api/platform";
|
|
31
|
-
import { RequestPasswordResult } from "../types";
|
|
32
|
-
import { IAuthProvider } from "../types/auth-provider";
|
|
33
|
-
|
|
34
|
-
export class CustomAuthProvider implements IAuthProvider {
|
|
35
|
-
|
|
36
|
-
private _user: Ref<UserDetail | undefined> = ref();
|
|
37
|
-
private _loading: Ref<boolean> = ref(false);
|
|
38
|
-
|
|
39
|
-
get user(): ComputedRef<UserDetail | undefined> {
|
|
40
|
-
return computed(() => this._user.value);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
get loading(): ComputedRef<boolean> {
|
|
44
|
-
return computed(() => this._loading.value);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
get isAuthenticated(): ComputedRef<boolean> {
|
|
48
|
-
return computed(() => this._user.value?.userName != null);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
get isAdministrator(): ComputedRef<boolean | undefined> {
|
|
52
|
-
return computed(() => this._user.value?.isAdministrator);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async loadUser(): Promise<UserDetail> {
|
|
56
|
-
// Implement your custom user loading logic
|
|
57
|
-
// Example: Load from localStorage, custom API, etc.
|
|
58
|
-
console.debug("[CustomAuthProvider] Loading user...");
|
|
59
|
-
|
|
60
|
-
this._loading.value = true;
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
// Example: Load from localStorage
|
|
64
|
-
const storedUser = localStorage.getItem("customUser");
|
|
65
|
-
if (storedUser) {
|
|
66
|
-
this._user.value = JSON.parse(storedUser) as UserDetail;
|
|
67
|
-
}
|
|
68
|
-
} catch (e) {
|
|
69
|
-
console.error("Failed to load user:", e);
|
|
70
|
-
} finally {
|
|
71
|
-
this._loading.value = false;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return { ...this._user.value } as UserDetail;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async signIn(
|
|
78
|
-
username: string,
|
|
79
|
-
password: string,
|
|
80
|
-
): Promise<SignInResult | { succeeded: boolean; error?: any; status?: number }> {
|
|
81
|
-
console.debug("[CustomAuthProvider] Signing in...");
|
|
82
|
-
|
|
83
|
-
this._loading.value = true;
|
|
84
|
-
|
|
85
|
-
try {
|
|
86
|
-
// Implement your custom sign-in logic
|
|
87
|
-
// Example: Validate against local file, custom API, etc.
|
|
88
|
-
|
|
89
|
-
// Example implementation:
|
|
90
|
-
if (username === "demo" && password === "demo") {
|
|
91
|
-
this._user.value = {
|
|
92
|
-
userName: username,
|
|
93
|
-
isAdministrator: true,
|
|
94
|
-
// ... other user properties
|
|
95
|
-
} as UserDetail;
|
|
96
|
-
|
|
97
|
-
// Store user in localStorage
|
|
98
|
-
localStorage.setItem("customUser", JSON.stringify(this._user.value));
|
|
99
|
-
|
|
100
|
-
return { succeeded: true } as SignInResult;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return { succeeded: false, error: "Invalid credentials" };
|
|
104
|
-
} catch (e: any) {
|
|
105
|
-
console.error("Sign in failed:", e);
|
|
106
|
-
return { succeeded: false, error: e.message };
|
|
107
|
-
} finally {
|
|
108
|
-
this._loading.value = false;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
async signOut(): Promise<void> {
|
|
113
|
-
console.debug("[CustomAuthProvider] Signing out...");
|
|
114
|
-
|
|
115
|
-
this._user.value = undefined;
|
|
116
|
-
localStorage.removeItem("customUser");
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
async validateToken(userId: string, token: string): Promise<boolean> {
|
|
120
|
-
// Implement your custom token validation logic
|
|
121
|
-
console.debug("[CustomAuthProvider] Validating token...");
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
async validatePassword(password: string): Promise<IIdentityResult> {
|
|
126
|
-
// Implement your custom password validation logic
|
|
127
|
-
console.debug("[CustomAuthProvider] Validating password...");
|
|
128
|
-
return { succeeded: true } as IIdentityResult;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
async resetPasswordByToken(
|
|
132
|
-
userId: string,
|
|
133
|
-
password: string,
|
|
134
|
-
token: string,
|
|
135
|
-
): Promise<SecurityResult> {
|
|
136
|
-
// Implement your custom password reset logic
|
|
137
|
-
console.debug("[CustomAuthProvider] Resetting password...");
|
|
138
|
-
return { succeeded: true } as SecurityResult;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
async requestPasswordReset(loginOrEmail: string): Promise<RequestPasswordResult> {
|
|
142
|
-
// Implement your custom password reset request logic
|
|
143
|
-
console.debug("[CustomAuthProvider] Requesting password reset...");
|
|
144
|
-
return { succeeded: true };
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
async changeUserPassword(
|
|
148
|
-
oldPassword: string,
|
|
149
|
-
newPassword: string,
|
|
150
|
-
): Promise<SecurityResult | undefined> {
|
|
151
|
-
// Implement your custom password change logic
|
|
152
|
-
console.debug("[CustomAuthProvider] Changing password...");
|
|
153
|
-
return { succeeded: true } as SecurityResult;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
async getLoginType(): Promise<LoginType[]> {
|
|
157
|
-
// Return supported login types for your custom provider
|
|
158
|
-
console.debug("[CustomAuthProvider] Getting login types...");
|
|
159
|
-
return [];
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
package/core/providers/index.ts
DELETED