@cwa/nuxt-edge 0.0.0-29696494.72f11a4
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/README.md +38 -0
- package/README.template.md +32 -0
- package/dist/layer/_components/TextButton.vue +13 -0
- package/dist/layer/error.vue +13 -0
- package/dist/layer/layouts/CwaRootLayout.vue +172 -0
- package/dist/layer/nuxt.config.ts +8 -0
- package/dist/layer/pages/_cwa/[cwaPage0].vue +18 -0
- package/dist/layer/pages/_cwa/index/composables/useDataList.ts +50 -0
- package/dist/layer/pages/_cwa/index/composables/useDataType.ts +41 -0
- package/dist/layer/pages/_cwa/index/composables/useDynamicPageLoader.ts +28 -0
- package/dist/layer/pages/_cwa/index/composables/useItemPage.ts +200 -0
- package/dist/layer/pages/_cwa/index/composables/useListPage.ts +44 -0
- package/dist/layer/pages/_cwa/index/composables/useParentPageDataLoader.ts +51 -0
- package/dist/layer/pages/_cwa/index/composables/useParentPageLoader.ts +25 -0
- package/dist/layer/pages/_cwa/index/data/[type]/[iri].vue +22 -0
- package/dist/layer/pages/_cwa/index/data/[type].vue +132 -0
- package/dist/layer/pages/_cwa/index/data/index.vue +84 -0
- package/dist/layer/pages/_cwa/index/layouts/[iri].vue +180 -0
- package/dist/layer/pages/_cwa/index/layouts.vue +77 -0
- package/dist/layer/pages/_cwa/index/pages/[iri].vue +16 -0
- package/dist/layer/pages/_cwa/index/pages.vue +130 -0
- package/dist/layer/pages/_cwa/index/routes.vue +56 -0
- package/dist/layer/pages/_cwa/index/settings.vue +398 -0
- package/dist/layer/pages/_cwa/index/users/[iri].vue +337 -0
- package/dist/layer/pages/_cwa/index/users.vue +90 -0
- package/dist/layer/pages/_cwa/index.vue +43 -0
- package/dist/layer/pages/confirm-new-email/[username]/[newEmail]/[token].vue +49 -0
- package/dist/layer/pages/forgot-password.vue +31 -0
- package/dist/layer/pages/login.vue +32 -0
- package/dist/layer/pages/reset-password/[username]/[token].vue +38 -0
- package/dist/layer/pages/verify-email/[username]/[token].vue +48 -0
- package/dist/module.d.mts +15 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +292 -0
- package/dist/runtime/admin/admin.d.ts +35 -0
- package/dist/runtime/admin/admin.js +65 -0
- package/dist/runtime/admin/manageable-resource.d.ts +42 -0
- package/dist/runtime/admin/manageable-resource.js +241 -0
- package/dist/runtime/admin/manager-tabs-resolver.d.ts +17 -0
- package/dist/runtime/admin/manager-tabs-resolver.js +55 -0
- package/dist/runtime/admin/navigation-guard.d.ts +18 -0
- package/dist/runtime/admin/navigation-guard.js +57 -0
- package/dist/runtime/admin/resource-stack-manager.d.ts +93 -0
- package/dist/runtime/admin/resource-stack-manager.js +388 -0
- package/dist/runtime/api/api-documentation.d.ts +28 -0
- package/dist/runtime/api/api-documentation.js +131 -0
- package/dist/runtime/api/auth.d.ts +100 -0
- package/dist/runtime/api/auth.js +264 -0
- package/dist/runtime/api/fetcher/cwa-fetch.d.ts +12 -0
- package/dist/runtime/api/fetcher/cwa-fetch.js +43 -0
- package/dist/runtime/api/fetcher/fetch-status-manager.d.ts +59 -0
- package/dist/runtime/api/fetcher/fetch-status-manager.js +225 -0
- package/dist/runtime/api/fetcher/fetcher.d.ts +57 -0
- package/dist/runtime/api/fetcher/fetcher.js +263 -0
- package/dist/runtime/api/fetcher/preload-headers.d.ts +6 -0
- package/dist/runtime/api/fetcher/preload-headers.js +31 -0
- package/dist/runtime/api/forms.d.ts +40 -0
- package/dist/runtime/api/forms.js +40 -0
- package/dist/runtime/api/mercure.d.ts +32 -0
- package/dist/runtime/api/mercure.js +196 -0
- package/dist/runtime/api/site-config.d.ts +36 -0
- package/dist/runtime/api/site-config.js +135 -0
- package/dist/runtime/composables/component/html-content.d.ts +2 -0
- package/dist/runtime/composables/component/html-content.js +74 -0
- package/dist/runtime/composables/cwa-collection-pagination.d.ts +13 -0
- package/dist/runtime/composables/cwa-collection-pagination.js +34 -0
- package/dist/runtime/composables/cwa-collection-resource.d.ts +18 -0
- package/dist/runtime/composables/cwa-collection-resource.js +105 -0
- package/dist/runtime/composables/cwa-image-resource.d.ts +15 -0
- package/dist/runtime/composables/cwa-image-resource.js +26 -0
- package/dist/runtime/composables/cwa-image.d.ts +24 -0
- package/dist/runtime/composables/cwa-image.js +38 -0
- package/dist/runtime/composables/cwa-query-bound-model.d.ts +9 -0
- package/dist/runtime/composables/cwa-query-bound-model.js +109 -0
- package/dist/runtime/composables/cwa-resource-endpoint.d.ts +5 -0
- package/dist/runtime/composables/cwa-resource-endpoint.js +36 -0
- package/dist/runtime/composables/cwa-resource-manageable.d.ts +10 -0
- package/dist/runtime/composables/cwa-resource-manageable.js +53 -0
- package/dist/runtime/composables/cwa-resource-manager-tab.d.ts +16 -0
- package/dist/runtime/composables/cwa-resource-manager-tab.js +30 -0
- package/dist/runtime/composables/cwa-resource-model.d.ts +21 -0
- package/dist/runtime/composables/cwa-resource-model.js +156 -0
- package/dist/runtime/composables/cwa-resource-upload.d.ts +8 -0
- package/dist/runtime/composables/cwa-resource-upload.js +70 -0
- package/dist/runtime/composables/cwa-resource.d.ts +26 -0
- package/dist/runtime/composables/cwa-resource.js +42 -0
- package/dist/runtime/composables/cwa-select-input.d.ts +21 -0
- package/dist/runtime/composables/cwa-select-input.js +37 -0
- package/dist/runtime/composables/cwa-select.d.ts +15 -0
- package/dist/runtime/composables/cwa-select.js +24 -0
- package/dist/runtime/composables/cwa.d.ts +2 -0
- package/dist/runtime/composables/cwa.js +2 -0
- package/dist/runtime/composables/forgot-password.d.ts +9 -0
- package/dist/runtime/composables/forgot-password.js +45 -0
- package/dist/runtime/composables/login.d.ts +9 -0
- package/dist/runtime/composables/login.js +30 -0
- package/dist/runtime/composables/popper.d.ts +529 -0
- package/dist/runtime/composables/popper.js +105 -0
- package/dist/runtime/composables/process.d.ts +4 -0
- package/dist/runtime/composables/process.js +6 -0
- package/dist/runtime/composables/reset-password.d.ts +14 -0
- package/dist/runtime/composables/reset-password.js +75 -0
- package/dist/runtime/composables/transitions.d.ts +12 -0
- package/dist/runtime/composables/transitions.js +12 -0
- package/dist/runtime/composables/useCwaResourceRoute.d.ts +10 -0
- package/dist/runtime/composables/useCwaResourceRoute.js +17 -0
- package/dist/runtime/composables/useCwaSiteConfig.d.ts +15 -0
- package/dist/runtime/composables/useCwaSiteConfig.js +78 -0
- package/dist/runtime/composables/useResendVerifyEmail.d.ts +6 -0
- package/dist/runtime/composables/useResendVerifyEmail.js +43 -0
- package/dist/runtime/composables/useVerifyEmail.d.ts +8 -0
- package/dist/runtime/composables/useVerifyEmail.js +84 -0
- package/dist/runtime/cwa.d.ts +70 -0
- package/dist/runtime/cwa.js +133 -0
- package/dist/runtime/errors/cwa-resource-error.d.ts +20 -0
- package/dist/runtime/errors/cwa-resource-error.js +61 -0
- package/dist/runtime/plugin.d.ts +8 -0
- package/dist/runtime/plugin.js +20 -0
- package/dist/runtime/resources/resource-utils.d.ts +52 -0
- package/dist/runtime/resources/resource-utils.js +86 -0
- package/dist/runtime/resources/resources-manager.d.ts +70 -0
- package/dist/runtime/resources/resources-manager.js +482 -0
- package/dist/runtime/resources/resources.d.ts +61 -0
- package/dist/runtime/resources/resources.js +360 -0
- package/dist/runtime/route-middleware.d.ts +2 -0
- package/dist/runtime/route-middleware.js +71 -0
- package/dist/runtime/server/cwa-custom-sitemap.get.d.ts +2 -0
- package/dist/runtime/server/cwa-custom-sitemap.get.js +29 -0
- package/dist/runtime/server/cwa-healthcheck.get.d.ts +4 -0
- package/dist/runtime/server/cwa-healthcheck.get.js +10 -0
- package/dist/runtime/server/cwa-urls.get.d.ts +3 -0
- package/dist/runtime/server/cwa-urls.get.js +15 -0
- package/dist/runtime/server/server-middleware.d.ts +2 -0
- package/dist/runtime/server/server-middleware.js +63 -0
- package/dist/runtime/server/server-plugin.d.ts +2 -0
- package/dist/runtime/server/server-plugin.js +59 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/server/useFetcher.d.ts +7 -0
- package/dist/runtime/server/useFetcher.js +40 -0
- package/dist/runtime/storage/storage.d.ts +25 -0
- package/dist/runtime/storage/storage.js +48 -0
- package/dist/runtime/storage/stores/admin/actions.d.ts +5 -0
- package/dist/runtime/storage/stores/admin/actions.js +10 -0
- package/dist/runtime/storage/stores/admin/admin-store.d.ts +18 -0
- package/dist/runtime/storage/stores/admin/admin-store.js +20 -0
- package/dist/runtime/storage/stores/admin/state.d.ts +7 -0
- package/dist/runtime/storage/stores/admin/state.js +9 -0
- package/dist/runtime/storage/stores/api-documentation/api-documentation-store.d.ts +16 -0
- package/dist/runtime/storage/stores/api-documentation/api-documentation-store.js +18 -0
- package/dist/runtime/storage/stores/api-documentation/state.d.ts +71 -0
- package/dist/runtime/storage/stores/api-documentation/state.js +6 -0
- package/dist/runtime/storage/stores/auth/auth-store.d.ts +16 -0
- package/dist/runtime/storage/stores/auth/auth-store.js +18 -0
- package/dist/runtime/storage/stores/auth/state.d.ts +19 -0
- package/dist/runtime/storage/stores/auth/state.js +15 -0
- package/dist/runtime/storage/stores/cwa-store-types.d.ts +14 -0
- package/dist/runtime/storage/stores/error/actions.d.ts +11 -0
- package/dist/runtime/storage/stores/error/actions.js +73 -0
- package/dist/runtime/storage/stores/error/error-store.d.ts +13 -0
- package/dist/runtime/storage/stores/error/error-store.js +21 -0
- package/dist/runtime/storage/stores/error/getters.d.ts +7 -0
- package/dist/runtime/storage/stores/error/getters.js +11 -0
- package/dist/runtime/storage/stores/error/state.d.ts +35 -0
- package/dist/runtime/storage/stores/error/state.js +15 -0
- package/dist/runtime/storage/stores/fetcher/actions.d.ts +56 -0
- package/dist/runtime/storage/stores/fetcher/actions.js +138 -0
- package/dist/runtime/storage/stores/fetcher/fetcher-store.d.ts +19 -0
- package/dist/runtime/storage/stores/fetcher/fetcher-store.js +23 -0
- package/dist/runtime/storage/stores/fetcher/getter-utils.d.ts +7 -0
- package/dist/runtime/storage/stores/fetcher/getter-utils.js +27 -0
- package/dist/runtime/storage/stores/fetcher/getters.d.ts +13 -0
- package/dist/runtime/storage/stores/fetcher/getters.js +52 -0
- package/dist/runtime/storage/stores/fetcher/state.d.ts +27 -0
- package/dist/runtime/storage/stores/fetcher/state.js +7 -0
- package/dist/runtime/storage/stores/mercure/mercure-store.d.ts +16 -0
- package/dist/runtime/storage/stores/mercure/mercure-store.js +18 -0
- package/dist/runtime/storage/stores/mercure/state.d.ts +5 -0
- package/dist/runtime/storage/stores/mercure/state.js +6 -0
- package/dist/runtime/storage/stores/resources/actions.d.ts +59 -0
- package/dist/runtime/storage/stores/resources/actions.js +449 -0
- package/dist/runtime/storage/stores/resources/getter-utils.d.ts +7 -0
- package/dist/runtime/storage/stores/resources/getter-utils.js +27 -0
- package/dist/runtime/storage/stores/resources/getters.d.ts +38 -0
- package/dist/runtime/storage/stores/resources/getters.js +254 -0
- package/dist/runtime/storage/stores/resources/resources-store.d.ts +19 -0
- package/dist/runtime/storage/stores/resources/resources-store.js +23 -0
- package/dist/runtime/storage/stores/resources/state.d.ts +67 -0
- package/dist/runtime/storage/stores/resources/state.js +24 -0
- package/dist/runtime/storage/stores/site-config/actions.d.ts +9 -0
- package/dist/runtime/storage/stores/site-config/actions.js +20 -0
- package/dist/runtime/storage/stores/site-config/getters.d.ts +7 -0
- package/dist/runtime/storage/stores/site-config/getters.js +10 -0
- package/dist/runtime/storage/stores/site-config/site-config-store.d.ts +19 -0
- package/dist/runtime/storage/stores/site-config/site-config-store.js +23 -0
- package/dist/runtime/storage/stores/site-config/state.d.ts +13 -0
- package/dist/runtime/storage/stores/site-config/state.js +8 -0
- package/dist/runtime/templates/assets/base.css +1 -0
- package/dist/runtime/templates/assets/cwa.css +1 -0
- package/dist/runtime/templates/components/core/ComponentPlaceholder.d.vue.ts +7 -0
- package/dist/runtime/templates/components/core/ComponentPlaceholder.vue +27 -0
- package/dist/runtime/templates/components/core/ComponentPlaceholder.vue.d.ts +7 -0
- package/dist/runtime/templates/components/core/ComponentPosition.d.vue.ts +4 -0
- package/dist/runtime/templates/components/core/ComponentPosition.spec.ts.snap +16 -0
- package/dist/runtime/templates/components/core/ComponentPosition.vue +64 -0
- package/dist/runtime/templates/components/core/ComponentPosition.vue.d.ts +4 -0
- package/dist/runtime/templates/components/core/ConfirmDialog.d.vue.ts +16 -0
- package/dist/runtime/templates/components/core/ConfirmDialog.vue +41 -0
- package/dist/runtime/templates/components/core/ConfirmDialog.vue.d.ts +16 -0
- package/dist/runtime/templates/components/core/DialogBox.d.vue.ts +38 -0
- package/dist/runtime/templates/components/core/DialogBox.vue +96 -0
- package/dist/runtime/templates/components/core/DialogBox.vue.d.ts +38 -0
- package/dist/runtime/templates/components/core/README.md +1 -0
- package/dist/runtime/templates/components/core/ResourceLoader.d.vue.ts +14 -0
- package/dist/runtime/templates/components/core/ResourceLoader.spec.ts.snap +39 -0
- package/dist/runtime/templates/components/core/ResourceLoader.vue +151 -0
- package/dist/runtime/templates/components/core/ResourceLoader.vue.d.ts +14 -0
- package/dist/runtime/templates/components/core/admin/CwaCode.d.vue.ts +12 -0
- package/dist/runtime/templates/components/core/admin/CwaCode.vue +7 -0
- package/dist/runtime/templates/components/core/admin/CwaCode.vue.d.ts +12 -0
- package/dist/runtime/templates/components/core/admin/ListContainer.d.vue.ts +12 -0
- package/dist/runtime/templates/components/core/admin/ListContainer.vue +11 -0
- package/dist/runtime/templates/components/core/admin/ListContainer.vue.d.ts +12 -0
- package/dist/runtime/templates/components/core/admin/ListContent.d.vue.ts +24 -0
- package/dist/runtime/templates/components/core/admin/ListContent.vue +137 -0
- package/dist/runtime/templates/components/core/admin/ListContent.vue.d.ts +24 -0
- package/dist/runtime/templates/components/core/admin/ListFilter.d.vue.ts +10 -0
- package/dist/runtime/templates/components/core/admin/ListFilter.vue +49 -0
- package/dist/runtime/templates/components/core/admin/ListFilter.vue.d.ts +10 -0
- package/dist/runtime/templates/components/core/admin/ListFilterButton.d.vue.ts +14 -0
- package/dist/runtime/templates/components/core/admin/ListFilterButton.vue +53 -0
- package/dist/runtime/templates/components/core/admin/ListFilterButton.vue.d.ts +14 -0
- package/dist/runtime/templates/components/core/admin/ListHeading.d.vue.ts +20 -0
- package/dist/runtime/templates/components/core/admin/ListHeading.vue +33 -0
- package/dist/runtime/templates/components/core/admin/ListHeading.vue.d.ts +20 -0
- package/dist/runtime/templates/components/core/admin/ListPagination.d.vue.ts +17 -0
- package/dist/runtime/templates/components/core/admin/ListPagination.vue +94 -0
- package/dist/runtime/templates/components/core/admin/ListPagination.vue.d.ts +17 -0
- package/dist/runtime/templates/components/core/admin/ListPaginationButton.d.vue.ts +16 -0
- package/dist/runtime/templates/components/core/admin/ListPaginationButton.vue +19 -0
- package/dist/runtime/templates/components/core/admin/ListPaginationButton.vue.d.ts +16 -0
- package/dist/runtime/templates/components/core/admin/PageAdminModal.d.vue.ts +13 -0
- package/dist/runtime/templates/components/core/admin/PageAdminModal.vue +404 -0
- package/dist/runtime/templates/components/core/admin/PageAdminModal.vue.d.ts +13 -0
- package/dist/runtime/templates/components/core/admin/PageDataAdminModal.d.vue.ts +14 -0
- package/dist/runtime/templates/components/core/admin/PageDataAdminModal.vue +368 -0
- package/dist/runtime/templates/components/core/admin/PageDataAdminModal.vue.d.ts +14 -0
- package/dist/runtime/templates/components/core/admin/PageResourceAdminModal.d.vue.ts +14 -0
- package/dist/runtime/templates/components/core/admin/PageResourceAdminModal.vue +439 -0
- package/dist/runtime/templates/components/core/admin/PageResourceAdminModal.vue.d.ts +14 -0
- package/dist/runtime/templates/components/core/admin/ResourceModal.d.vue.ts +35 -0
- package/dist/runtime/templates/components/core/admin/ResourceModal.vue +110 -0
- package/dist/runtime/templates/components/core/admin/ResourceModal.vue.d.ts +35 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlay.d.vue.ts +7 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlay.vue +27 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlay.vue.d.ts +7 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.d.vue.ts +15 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.vue +24 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.vue.d.ts +15 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalTabs.d.vue.ts +0 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalTabs.vue +81 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalTabs.vue.d.ts +0 -0
- package/dist/runtime/templates/components/core/admin/RouteHierarchyNode.d.vue.ts +16 -0
- package/dist/runtime/templates/components/core/admin/RouteHierarchyNode.vue +42 -0
- package/dist/runtime/templates/components/core/admin/RouteHierarchyNode.vue.d.ts +16 -0
- package/dist/runtime/templates/components/core/admin/RouteListRow.d.vue.ts +21 -0
- package/dist/runtime/templates/components/core/admin/RouteListRow.vue +102 -0
- package/dist/runtime/templates/components/core/admin/RouteListRow.vue.d.ts +21 -0
- package/dist/runtime/templates/components/core/admin/RouteRedirectsTree.d.vue.ts +11 -0
- package/dist/runtime/templates/components/core/admin/RouteRedirectsTree.vue +62 -0
- package/dist/runtime/templates/components/core/admin/RouteRedirectsTree.vue.d.ts +11 -0
- package/dist/runtime/templates/components/core/admin/RoutesTab.d.vue.ts +14 -0
- package/dist/runtime/templates/components/core/admin/RoutesTab.vue +264 -0
- package/dist/runtime/templates/components/core/admin/RoutesTab.vue.d.ts +14 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabAddRedirect.d.vue.ts +11 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabAddRedirect.vue +45 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabAddRedirect.vue.d.ts +11 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabManage.d.vue.ts +24 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabManage.vue +139 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabManage.vue.d.ts +24 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabView.d.vue.ts +17 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabView.vue +74 -0
- package/dist/runtime/templates/components/core/admin/RoutesTabView.vue.d.ts +17 -0
- package/dist/runtime/templates/components/core/admin/form/FilterFormWrapper.d.vue.ts +16 -0
- package/dist/runtime/templates/components/core/admin/form/FilterFormWrapper.vue +19 -0
- package/dist/runtime/templates/components/core/admin/form/FilterFormWrapper.vue.d.ts +16 -0
- package/dist/runtime/templates/components/core/admin/form/FilterSelect.d.vue.ts +8 -0
- package/dist/runtime/templates/components/core/admin/form/FilterSelect.vue +86 -0
- package/dist/runtime/templates/components/core/admin/form/FilterSelect.vue.d.ts +8 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInfo.d.vue.ts +16 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInfo.vue +24 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInfo.vue.d.ts +16 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInput.d.vue.ts +17 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInput.vue +57 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInput.vue.d.ts +17 -0
- package/dist/runtime/templates/components/core/admin/form/ModalRadioTabs.d.vue.ts +14 -0
- package/dist/runtime/templates/components/core/admin/form/ModalRadioTabs.vue +23 -0
- package/dist/runtime/templates/components/core/admin/form/ModalRadioTabs.vue.d.ts +14 -0
- package/dist/runtime/templates/components/core/admin/form/ModalSelect.d.vue.ts +12 -0
- package/dist/runtime/templates/components/core/admin/form/ModalSelect.vue +100 -0
- package/dist/runtime/templates/components/core/admin/form/ModalSelect.vue.d.ts +12 -0
- package/dist/runtime/templates/components/core/admin/form/PageTypeSelect.d.vue.ts +9 -0
- package/dist/runtime/templates/components/core/admin/form/PageTypeSelect.vue +112 -0
- package/dist/runtime/templates/components/core/admin/form/PageTypeSelect.vue.d.ts +9 -0
- package/dist/runtime/templates/components/core/assets/CwaLogo.d.vue.ts +3 -0
- package/dist/runtime/templates/components/core/assets/CwaLogo.vue +21 -0
- package/dist/runtime/templates/components/core/assets/CwaLogo.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconComponents.d.vue.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconComponents.vue +15 -0
- package/dist/runtime/templates/components/core/assets/IconComponents.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconData.d.vue.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconData.vue +24 -0
- package/dist/runtime/templates/components/core/assets/IconData.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconLayouts.d.vue.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconLayouts.vue +20 -0
- package/dist/runtime/templates/components/core/assets/IconLayouts.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconPages.d.vue.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconPages.vue +21 -0
- package/dist/runtime/templates/components/core/assets/IconPages.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconRoutes.d.vue.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconRoutes.vue +23 -0
- package/dist/runtime/templates/components/core/assets/IconRoutes.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconUsers.d.vue.ts +3 -0
- package/dist/runtime/templates/components/core/assets/IconUsers.vue +13 -0
- package/dist/runtime/templates/components/core/assets/IconUsers.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/useDataResolver.d.ts +12 -0
- package/dist/runtime/templates/components/core/useDataResolver.js +113 -0
- package/dist/runtime/templates/components/main/ComponentGroup.Util.Positions.d.ts +6 -0
- package/dist/runtime/templates/components/main/ComponentGroup.Util.Positions.js +166 -0
- package/dist/runtime/templates/components/main/ComponentGroup.Util.Synchronizer.d.ts +22 -0
- package/dist/runtime/templates/components/main/ComponentGroup.Util.Synchronizer.js +102 -0
- package/dist/runtime/templates/components/main/ComponentGroup.d.vue.ts +13 -0
- package/dist/runtime/templates/components/main/ComponentGroup.spec.ts.snap +68 -0
- package/dist/runtime/templates/components/main/ComponentGroup.vue +138 -0
- package/dist/runtime/templates/components/main/ComponentGroup.vue.d.ts +13 -0
- package/dist/runtime/templates/components/main/CwaLink.d.vue.ts +14 -0
- package/dist/runtime/templates/components/main/CwaLink.vue +55 -0
- package/dist/runtime/templates/components/main/CwaLink.vue.d.ts +14 -0
- package/dist/runtime/templates/components/main/CwaPage.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/CwaPage.vue +22 -0
- package/dist/runtime/templates/components/main/CwaPage.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/DefaultLayout.d.vue.ts +12 -0
- package/dist/runtime/templates/components/main/DefaultLayout.vue +12 -0
- package/dist/runtime/templates/components/main/DefaultLayout.vue.d.ts +12 -0
- package/dist/runtime/templates/components/main/ErrorPage.d.vue.ts +7 -0
- package/dist/runtime/templates/components/main/ErrorPage.vue +134 -0
- package/dist/runtime/templates/components/main/ErrorPage.vue.d.ts +7 -0
- package/dist/runtime/templates/components/main/Logo.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/Logo.vue +18 -0
- package/dist/runtime/templates/components/main/Logo.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/README.md +7 -0
- package/dist/runtime/templates/components/main/admin/_common/ResourceContextItem.d.vue.ts +12 -0
- package/dist/runtime/templates/components/main/admin/_common/ResourceContextItem.vue +41 -0
- package/dist/runtime/templates/components/main/admin/_common/ResourceContextItem.vue.d.ts +12 -0
- package/dist/runtime/templates/components/main/admin/_common/ResourceLoadingIndicator.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/_common/ResourceLoadingIndicator.vue +48 -0
- package/dist/runtime/templates/components/main/admin/_common/ResourceLoadingIndicator.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/_common/useDynamicPositionSelectOptions.d.ts +5 -0
- package/dist/runtime/templates/components/main/admin/_common/useDynamicPositionSelectOptions.js +19 -0
- package/dist/runtime/templates/components/main/admin/header/Header.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/Header.vue +209 -0
- package/dist/runtime/templates/components/main/admin/header/Header.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Menu.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Menu.vue +155 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Menu.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/MenuLink.d.vue.ts +16 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/MenuLink.vue +15 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/MenuLink.vue.d.ts +16 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/MenuPrimaryLink.d.vue.ts +15 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/MenuPrimaryLink.vue +20 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/MenuPrimaryLink.vue.d.ts +15 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Notification.d.vue.ts +16 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Notification.vue +70 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Notification.vue.d.ts +16 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/OutdatedContentNotice.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/OutdatedContentNotice.vue +19 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/OutdatedContentNotice.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/PathSelector.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/PathSelector.vue +79 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/PathSelector.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/RequestErrors.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/RequestErrors.vue +52 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/RequestErrors.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/ComponentFocus.d.vue.ts +11 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/ComponentFocus.vue +159 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/ComponentFocus.vue.d.ts +11 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/LayoutPageOverlay.d.vue.ts +10 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/LayoutPageOverlay.vue +198 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/LayoutPageOverlay.vue.d.ts +10 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/ResourceManager.d.vue.ts +10 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/ResourceManager.vue +186 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/ResourceManager.vue.d.ts +10 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/AddComponentDialog.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/AddComponentDialog.vue +208 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/AddComponentDialog.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/CwaResourceManagerContextMenu.d.vue.ts +11 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/CwaResourceManagerContextMenu.vue +38 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/CwaResourceManagerContextMenu.vue.d.ts +11 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTab.d.vue.ts +8 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTab.vue +15 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTab.vue.d.ts +8 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTabs.d.vue.ts +14 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTabs.vue +44 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTabs.vue.d.ts +14 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/ResourceInfoTab.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/ResourceInfoTab.vue +67 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/ResourceInfoTab.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Order.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Order.vue +75 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Order.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Publish.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Publish.vue +41 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Publish.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Ui.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Ui.vue +114 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Ui.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/group/Group.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/group/Group.vue +34 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/group/Group.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DataPage.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DataPage.vue +104 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DataPage.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DynamicPage.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DynamicPage.vue +52 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DynamicPage.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/CurrentResourceCta.d.vue.ts +8 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/CurrentResourceCta.vue +94 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/CurrentResourceCta.vue.d.ts +8 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/NewResourceCta.d.vue.ts +8 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/NewResourceCta.vue +59 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/NewResourceCta.vue.d.ts +8 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/ResourceManagerCtaButton.d.vue.ts +3 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/ResourceManagerCtaButton.vue +28 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/ResourceManagerCtaButton.vue.d.ts +3 -0
- package/dist/runtime/templates/components/main/auth/ForgotPasswordPage.d.vue.ts +26 -0
- package/dist/runtime/templates/components/main/auth/ForgotPasswordPage.vue +56 -0
- package/dist/runtime/templates/components/main/auth/ForgotPasswordPage.vue.d.ts +26 -0
- package/dist/runtime/templates/components/main/auth/LoginPage.d.vue.ts +28 -0
- package/dist/runtime/templates/components/main/auth/LoginPage.vue +61 -0
- package/dist/runtime/templates/components/main/auth/LoginPage.vue.d.ts +28 -0
- package/dist/runtime/templates/components/main/auth/ResetPasswordPage.d.vue.ts +28 -0
- package/dist/runtime/templates/components/main/auth/ResetPasswordPage.vue +59 -0
- package/dist/runtime/templates/components/main/auth/ResetPasswordPage.vue.d.ts +28 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthPageLink.d.vue.ts +7 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthPageLink.spec.ts.snap +14 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthPageLink.vue +17 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthPageLink.vue.d.ts +7 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthTemplate.d.vue.ts +25 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthTemplate.spec.ts.snap +90 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthTemplate.vue +59 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthTemplate.vue.d.ts +25 -0
- package/dist/runtime/templates/components/main/auth/_parts/InputField.d.vue.ts +22 -0
- package/dist/runtime/templates/components/main/auth/_parts/InputField.spec.ts.snap +111 -0
- package/dist/runtime/templates/components/main/auth/_parts/InputField.vue +50 -0
- package/dist/runtime/templates/components/main/auth/_parts/InputField.vue.d.ts +22 -0
- package/dist/runtime/templates/components/ui/BackgroundParticles.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/BackgroundParticles.vue +1071 -0
- package/dist/runtime/templates/components/ui/BackgroundParticles.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/Hamburger.d.vue.ts +10 -0
- package/dist/runtime/templates/components/ui/Hamburger.vue +75 -0
- package/dist/runtime/templates/components/ui/Hamburger.vue.d.ts +10 -0
- package/dist/runtime/templates/components/ui/ProgressBar.d.vue.ts +10 -0
- package/dist/runtime/templates/components/ui/ProgressBar.spec.ts.snap +71 -0
- package/dist/runtime/templates/components/ui/ProgressBar.vue +29 -0
- package/dist/runtime/templates/components/ui/ProgressBar.vue.d.ts +10 -0
- package/dist/runtime/templates/components/ui/README.md +6 -0
- package/dist/runtime/templates/components/ui/alert/Info.d.vue.ts +12 -0
- package/dist/runtime/templates/components/ui/alert/Info.spec.ts.snap +23 -0
- package/dist/runtime/templates/components/ui/alert/Info.vue +17 -0
- package/dist/runtime/templates/components/ui/alert/Info.vue.d.ts +12 -0
- package/dist/runtime/templates/components/ui/alert/Warning.d.vue.ts +13 -0
- package/dist/runtime/templates/components/ui/alert/Warning.spec.ts.snap +18 -0
- package/dist/runtime/templates/components/ui/alert/Warning.vue +13 -0
- package/dist/runtime/templates/components/ui/alert/Warning.vue.d.ts +13 -0
- package/dist/runtime/templates/components/ui/form/Button.d.vue.ts +53 -0
- package/dist/runtime/templates/components/ui/form/Button.vue +139 -0
- package/dist/runtime/templates/components/ui/form/Button.vue.d.ts +53 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverGroup.d.vue.ts +11 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverGroup.vue +18 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverGroup.vue.d.ts +11 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverItem.d.vue.ts +11 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverItem.vue +15 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverItem.vue.d.ts +11 -0
- package/dist/runtime/templates/components/ui/form/File.d.vue.ts +18 -0
- package/dist/runtime/templates/components/ui/form/File.vue +72 -0
- package/dist/runtime/templates/components/ui/form/File.vue.d.ts +18 -0
- package/dist/runtime/templates/components/ui/form/Input.d.vue.ts +10 -0
- package/dist/runtime/templates/components/ui/form/Input.vue +17 -0
- package/dist/runtime/templates/components/ui/form/Input.vue.d.ts +10 -0
- package/dist/runtime/templates/components/ui/form/LabelWrapper.d.vue.ts +15 -0
- package/dist/runtime/templates/components/ui/form/LabelWrapper.vue +17 -0
- package/dist/runtime/templates/components/ui/form/LabelWrapper.vue.d.ts +15 -0
- package/dist/runtime/templates/components/ui/form/SearchResource.d.vue.ts +15 -0
- package/dist/runtime/templates/components/ui/form/SearchResource.vue +212 -0
- package/dist/runtime/templates/components/ui/form/SearchResource.vue.d.ts +15 -0
- package/dist/runtime/templates/components/ui/form/Select.d.vue.ts +8 -0
- package/dist/runtime/templates/components/ui/form/Select.vue +60 -0
- package/dist/runtime/templates/components/ui/form/Select.vue.d.ts +8 -0
- package/dist/runtime/templates/components/ui/form/Toggle.d.vue.ts +11 -0
- package/dist/runtime/templates/components/ui/form/Toggle.vue +48 -0
- package/dist/runtime/templates/components/ui/form/Toggle.vue.d.ts +11 -0
- package/dist/runtime/templates/components/ui/icon/ArrowIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/ArrowIcon.vue +30 -0
- package/dist/runtime/templates/components/ui/icon/ArrowIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/BinIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/BinIcon.vue +24 -0
- package/dist/runtime/templates/components/ui/icon/BinIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/CogIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/CogIcon.vue +9 -0
- package/dist/runtime/templates/components/ui/icon/CogIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/EyeIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/EyeIcon.vue +24 -0
- package/dist/runtime/templates/components/ui/icon/EyeIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/PenIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/PenIcon.vue +12 -0
- package/dist/runtime/templates/components/ui/icon/PenIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/PlusIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/PlusIcon.vue +9 -0
- package/dist/runtime/templates/components/ui/icon/PlusIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/SearchIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/SearchIcon.vue +10 -0
- package/dist/runtime/templates/components/ui/icon/SearchIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/TickIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/TickIcon.vue +23 -0
- package/dist/runtime/templates/components/ui/icon/TickIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/WarningIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/WarningIcon.vue +11 -0
- package/dist/runtime/templates/components/ui/icon/WarningIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/XMarkIcon.d.vue.ts +3 -0
- package/dist/runtime/templates/components/ui/icon/XMarkIcon.vue +15 -0
- package/dist/runtime/templates/components/ui/icon/XMarkIcon.vue.d.ts +3 -0
- package/dist/runtime/templates/components/utils/ContextMenu.d.vue.ts +27 -0
- package/dist/runtime/templates/components/utils/ContextMenu.vue +60 -0
- package/dist/runtime/templates/components/utils/ContextMenu.vue.d.ts +27 -0
- package/dist/runtime/templates/components/utils/HotSpot.d.vue.ts +12 -0
- package/dist/runtime/templates/components/utils/HotSpot.vue +28 -0
- package/dist/runtime/templates/components/utils/HotSpot.vue.d.ts +12 -0
- package/dist/runtime/templates/components/utils/README.md +1 -0
- package/dist/runtime/templates/components/utils/Spinner.d.vue.ts +7 -0
- package/dist/runtime/templates/components/utils/Spinner.spec.ts.snap +56 -0
- package/dist/runtime/templates/components/utils/Spinner.vue +44 -0
- package/dist/runtime/templates/components/utils/Spinner.vue.d.ts +7 -0
- package/dist/runtime/templates/components/utils/SpinnerTick.d.vue.ts +7 -0
- package/dist/runtime/templates/components/utils/SpinnerTick.vue +43 -0
- package/dist/runtime/templates/components/utils/SpinnerTick.vue.d.ts +7 -0
- package/dist/runtime/templates/cwa-page.d.vue.ts +3 -0
- package/dist/runtime/templates/cwa-page.spec.ts.snap +9 -0
- package/dist/runtime/templates/cwa-page.vue +55 -0
- package/dist/runtime/templates/cwa-page.vue.d.ts +3 -0
- package/dist/runtime/types/index.d.ts +59 -0
- package/dist/runtime/types/index.js +0 -0
- package/dist/runtime/types/popper.d.ts +14 -0
- package/dist/types.d.mts +7 -0
- package/package.json +132 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { computed, reactive, ref } from "vue";
|
|
2
|
+
import { FetchError } from "ofetch";
|
|
3
|
+
import { navigateTo, useRoute } from "#imports";
|
|
4
|
+
import { useCwa } from "#cwa/composables/cwa";
|
|
5
|
+
export const useResetPassword = () => {
|
|
6
|
+
const route = useRoute();
|
|
7
|
+
const $cwa = useCwa();
|
|
8
|
+
const error = ref(null);
|
|
9
|
+
const submitting = ref(false);
|
|
10
|
+
const success = ref(false);
|
|
11
|
+
const submittedFormIri = ref(null);
|
|
12
|
+
const passwords = reactive({
|
|
13
|
+
first: "",
|
|
14
|
+
second: ""
|
|
15
|
+
});
|
|
16
|
+
const inputErrors = computed(() => {
|
|
17
|
+
const formIri = submittedFormIri.value;
|
|
18
|
+
if (!formIri) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
form: $cwa.forms.getFormViewErrors(formIri, "password_update").value,
|
|
23
|
+
password: $cwa.forms.getFormViewErrors(formIri, "password_update[plainPassword][first]").value
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
submittedFormIri.value && $cwa.forms.getFormViewErrors(submittedFormIri.value, "password_update[plainPassword][first]");
|
|
27
|
+
function getStringFromParam(paramName) {
|
|
28
|
+
const paramValue = route.params[paramName];
|
|
29
|
+
return (Array.isArray(paramValue) ? paramValue[0] : paramValue) || "";
|
|
30
|
+
}
|
|
31
|
+
function handleResetError(fetchError) {
|
|
32
|
+
if (fetchError.status === 404) {
|
|
33
|
+
return "The reset link is invalid or has expired. Please restart the reset password process.";
|
|
34
|
+
}
|
|
35
|
+
if (fetchError.status === 422) {
|
|
36
|
+
$cwa.resourcesManager.saveResource({
|
|
37
|
+
resource: fetchError.data
|
|
38
|
+
});
|
|
39
|
+
submittedFormIri.value = fetchError.data["@id"];
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
return fetchError.data?.message || fetchError.statusMessage || "Unexpected error";
|
|
43
|
+
}
|
|
44
|
+
async function resetPassword() {
|
|
45
|
+
if (success.value) {
|
|
46
|
+
navigateTo("/login");
|
|
47
|
+
}
|
|
48
|
+
const previousFormIri = submittedFormIri.value;
|
|
49
|
+
if (previousFormIri) {
|
|
50
|
+
$cwa.resourcesManager.removeResource({ resource: previousFormIri });
|
|
51
|
+
submittedFormIri.value = null;
|
|
52
|
+
}
|
|
53
|
+
submitting.value = true;
|
|
54
|
+
error.value = null;
|
|
55
|
+
const response = await $cwa.auth.resetPassword({
|
|
56
|
+
username: getStringFromParam("username"),
|
|
57
|
+
token: getStringFromParam("token"),
|
|
58
|
+
passwords
|
|
59
|
+
});
|
|
60
|
+
if (response instanceof FetchError) {
|
|
61
|
+
error.value = handleResetError(response);
|
|
62
|
+
} else {
|
|
63
|
+
success.value = true;
|
|
64
|
+
}
|
|
65
|
+
submitting.value = false;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
error,
|
|
69
|
+
submitting,
|
|
70
|
+
success,
|
|
71
|
+
passwords,
|
|
72
|
+
inputErrors,
|
|
73
|
+
resetPassword
|
|
74
|
+
};
|
|
75
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Transitions {
|
|
2
|
+
[key: string]: {
|
|
3
|
+
enterActiveClass: string;
|
|
4
|
+
enterFromClass: string;
|
|
5
|
+
enterToClass: string;
|
|
6
|
+
leaveActiveClass: string;
|
|
7
|
+
leaveFromClass: string;
|
|
8
|
+
leaveToClass: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare function useTransitions(): Transitions;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function useTransitions() {
|
|
2
|
+
return {
|
|
3
|
+
context: {
|
|
4
|
+
enterActiveClass: "cwa:transform-gpu cwa:transition-opacity-transform cwa:ease-out cwa:duration-200",
|
|
5
|
+
enterFromClass: "cwa:opacity-0 cwa:translate-y-0 cwa:scale-110",
|
|
6
|
+
enterToClass: "cwa:opacity-100 cwa:translate-y-0 cwa:scale-100",
|
|
7
|
+
leaveActiveClass: "cwa:duration-0",
|
|
8
|
+
leaveFromClass: "cwa:opacity-100 cwa:translate-y-0",
|
|
9
|
+
leaveToClass: "cwa:opacity-0 cwa:translate-y-0"
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CwaResource } from '#cwa/resources/resource-utils';
|
|
2
|
+
export declare const useCwaResourceRoute: () => {
|
|
3
|
+
getInternalResourceLink: (iri: string) => {
|
|
4
|
+
name: string;
|
|
5
|
+
params: {
|
|
6
|
+
cwaPage0: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
getResourceRoute: (resource: CwaResource, property: string) => any;
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const useCwaResourceRoute = () => {
|
|
2
|
+
function getInternalResourceLink(iri) {
|
|
3
|
+
return {
|
|
4
|
+
name: "_cwa-resource-page",
|
|
5
|
+
params: {
|
|
6
|
+
cwaPage0: iri
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function getResourceRoute(resource, property) {
|
|
11
|
+
return resource[property] || getInternalResourceLink(resource["@id"]);
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
getInternalResourceLink,
|
|
15
|
+
getResourceRoute
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CwaResource } from '#cwa/resources/resource-utils';
|
|
2
|
+
import type { SiteConfigParams } from '#cwa/types';
|
|
3
|
+
export declare const defaultSiteConfig: SiteConfigParams;
|
|
4
|
+
export declare function useCwaSiteConfig(): {
|
|
5
|
+
defaultSiteConfig: SiteConfigParams;
|
|
6
|
+
responseToConfig: (data: CwaResource, noMerge?: boolean) => Partial<SiteConfigParams>;
|
|
7
|
+
mergeConfig: (...configs: Partial<SiteConfigParams>[]) => SiteConfigParams;
|
|
8
|
+
processApiConfigValue: (configValue: any) => any;
|
|
9
|
+
resolvedConfigToSiteConfig: (config: SiteConfigParams) => {
|
|
10
|
+
name: string;
|
|
11
|
+
indexable: boolean;
|
|
12
|
+
url: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default useCwaSiteConfig;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export const defaultSiteConfig = {
|
|
2
|
+
indexable: true,
|
|
3
|
+
robotsAllowNonSeoCrawlers: true,
|
|
4
|
+
robotsAllowAiBots: true,
|
|
5
|
+
robotsText: "",
|
|
6
|
+
robotsRemoveSitemap: false,
|
|
7
|
+
sitemapEnabled: true,
|
|
8
|
+
siteName: "CWA Web App",
|
|
9
|
+
fallbackTitle: true,
|
|
10
|
+
concatTitle: true,
|
|
11
|
+
maintenanceModeEnabled: false,
|
|
12
|
+
sitemapXml: "",
|
|
13
|
+
canonicalUrl: ""
|
|
14
|
+
};
|
|
15
|
+
export function useCwaSiteConfig() {
|
|
16
|
+
function processApiConfigValue(configValue) {
|
|
17
|
+
let value = configValue;
|
|
18
|
+
if (configValue === "0" || configValue === "1" || configValue === "false" || configValue === "true") {
|
|
19
|
+
value = Boolean(JSON.parse(configValue));
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
function getRowsFromResponse(data) {
|
|
24
|
+
const configRows = data["member"];
|
|
25
|
+
if (!configRows || !Array.isArray(configRows)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
return configRows;
|
|
29
|
+
}
|
|
30
|
+
function siteConfigRowsToConfig(configRows) {
|
|
31
|
+
const configData = {};
|
|
32
|
+
for (const configRow of configRows) {
|
|
33
|
+
const configKey = configRow.key;
|
|
34
|
+
configData[configKey] = processApiConfigValue(configRow.value);
|
|
35
|
+
}
|
|
36
|
+
return configData;
|
|
37
|
+
}
|
|
38
|
+
function mergeConfig(...configs) {
|
|
39
|
+
const filteredConfigs = configs.filter((c) => c !== void 0).map((c) => {
|
|
40
|
+
return Object.entries(c).reduce((obj, [key, value]) => {
|
|
41
|
+
if (value !== void 0 && value !== "") {
|
|
42
|
+
obj[key] = value;
|
|
43
|
+
}
|
|
44
|
+
return obj;
|
|
45
|
+
}, {});
|
|
46
|
+
});
|
|
47
|
+
return Object.assign(
|
|
48
|
+
{},
|
|
49
|
+
defaultSiteConfig,
|
|
50
|
+
...filteredConfigs
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function responseToConfig(data, noMerge) {
|
|
54
|
+
const rows = getRowsFromResponse(data);
|
|
55
|
+
if (!rows) {
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
if (noMerge) {
|
|
59
|
+
return siteConfigRowsToConfig(rows);
|
|
60
|
+
}
|
|
61
|
+
return mergeConfig(siteConfigRowsToConfig(rows));
|
|
62
|
+
}
|
|
63
|
+
function resolvedConfigToSiteConfig(config) {
|
|
64
|
+
return {
|
|
65
|
+
name: config.siteName,
|
|
66
|
+
indexable: true,
|
|
67
|
+
url: config.canonicalUrl
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
defaultSiteConfig,
|
|
72
|
+
responseToConfig,
|
|
73
|
+
mergeConfig,
|
|
74
|
+
processApiConfigValue,
|
|
75
|
+
resolvedConfigToSiteConfig
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export default useCwaSiteConfig;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const useResendVerifyEmail: () => {
|
|
2
|
+
resendVerifyEmail: (username: string, type: "current" | "new") => Promise<void>;
|
|
3
|
+
error: import("vue").Ref<string | undefined, string | undefined>;
|
|
4
|
+
submitting: import("vue").Ref<boolean, boolean>;
|
|
5
|
+
success: import("vue").Ref<boolean, boolean>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
import { FetchError } from "ofetch";
|
|
3
|
+
import { useCwa } from "#cwa/composables/cwa";
|
|
4
|
+
export const useResendVerifyEmail = () => {
|
|
5
|
+
const $cwa = useCwa();
|
|
6
|
+
const error = ref();
|
|
7
|
+
const submitting = ref(false);
|
|
8
|
+
const success = ref(false);
|
|
9
|
+
function handleResetError(fetchError) {
|
|
10
|
+
if (fetchError.status === 404) {
|
|
11
|
+
error.value = "Username not found";
|
|
12
|
+
} else {
|
|
13
|
+
error.value = fetchError.data?.message || fetchError.statusMessage || "Unexpected error";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
async function resendVerifyEmail(username, type) {
|
|
17
|
+
if (!username) {
|
|
18
|
+
error.value = "Please enter a username";
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
submitting.value = true;
|
|
22
|
+
error.value = void 0;
|
|
23
|
+
const callFunction = (type2) => {
|
|
24
|
+
if (type2 === "current") {
|
|
25
|
+
return $cwa.auth.resendVerifyEmail(username);
|
|
26
|
+
}
|
|
27
|
+
return $cwa.auth.resendVerifyNewEmail(username);
|
|
28
|
+
};
|
|
29
|
+
const response = await callFunction(type);
|
|
30
|
+
if (response instanceof FetchError) {
|
|
31
|
+
handleResetError(response);
|
|
32
|
+
} else {
|
|
33
|
+
success.value = true;
|
|
34
|
+
}
|
|
35
|
+
submitting.value = false;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
resendVerifyEmail,
|
|
39
|
+
error,
|
|
40
|
+
submitting,
|
|
41
|
+
success
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const useVerifyEmail: () => {
|
|
2
|
+
verifyEmail: () => Promise<void>;
|
|
3
|
+
confirmEmail: () => Promise<void>;
|
|
4
|
+
error: import("vue").Ref<string | undefined, string | undefined>;
|
|
5
|
+
submitting: import("vue").Ref<boolean, boolean>;
|
|
6
|
+
success: import("vue").Ref<boolean, boolean>;
|
|
7
|
+
getStringFromParam: (paramName: string) => string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
import { FetchError } from "ofetch";
|
|
3
|
+
import { useRoute } from "#imports";
|
|
4
|
+
import { useCwa } from "#cwa/composables/cwa";
|
|
5
|
+
export const useVerifyEmail = () => {
|
|
6
|
+
const route = useRoute();
|
|
7
|
+
const $cwa = useCwa();
|
|
8
|
+
const error = ref();
|
|
9
|
+
const submitting = ref(false);
|
|
10
|
+
const success = ref(false);
|
|
11
|
+
function getStringFromParam(paramName) {
|
|
12
|
+
const paramValue = route.params[paramName];
|
|
13
|
+
return (Array.isArray(paramValue) ? paramValue[0] : paramValue) || "";
|
|
14
|
+
}
|
|
15
|
+
function handleResetError(fetchError) {
|
|
16
|
+
if (fetchError.status === 404) {
|
|
17
|
+
error.value = "Request expired or has already been used.";
|
|
18
|
+
} else {
|
|
19
|
+
error.value = fetchError.data?.message || fetchError.statusMessage || "Unexpected error";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function verifyEmail() {
|
|
23
|
+
const username = getStringFromParam("username");
|
|
24
|
+
if (!username) {
|
|
25
|
+
error.value = "No username specified";
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const token = getStringFromParam("token");
|
|
29
|
+
if (!token) {
|
|
30
|
+
error.value = "No token specified";
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
submitting.value = true;
|
|
34
|
+
error.value = void 0;
|
|
35
|
+
const response = await $cwa.auth.verifyEmail({
|
|
36
|
+
username,
|
|
37
|
+
token
|
|
38
|
+
});
|
|
39
|
+
if (response instanceof FetchError) {
|
|
40
|
+
handleResetError(response);
|
|
41
|
+
} else {
|
|
42
|
+
success.value = true;
|
|
43
|
+
}
|
|
44
|
+
submitting.value = false;
|
|
45
|
+
}
|
|
46
|
+
async function confirmEmail() {
|
|
47
|
+
const username = getStringFromParam("username");
|
|
48
|
+
if (!username) {
|
|
49
|
+
error.value = "No username specified";
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const token = getStringFromParam("token");
|
|
53
|
+
if (!token) {
|
|
54
|
+
error.value = "No token specified";
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const newEmail = getStringFromParam("newEmail");
|
|
58
|
+
if (!newEmail) {
|
|
59
|
+
error.value = "No new email specified";
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
submitting.value = true;
|
|
63
|
+
error.value = void 0;
|
|
64
|
+
const response = await $cwa.auth.confirmEmail({
|
|
65
|
+
username,
|
|
66
|
+
token,
|
|
67
|
+
newEmail
|
|
68
|
+
});
|
|
69
|
+
if (response instanceof FetchError) {
|
|
70
|
+
handleResetError(response);
|
|
71
|
+
} else {
|
|
72
|
+
success.value = true;
|
|
73
|
+
}
|
|
74
|
+
submitting.value = false;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
verifyEmail,
|
|
78
|
+
confirmEmail,
|
|
79
|
+
error,
|
|
80
|
+
submitting,
|
|
81
|
+
success,
|
|
82
|
+
getStringFromParam
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { RouteLocationNormalizedLoaded, Router } from 'vue-router';
|
|
2
|
+
import type { CwaModuleOptions, CwaResourcesMeta } from '#cwa/types';
|
|
3
|
+
import type { FetchEvent, FetchResourceEvent } from './api/fetcher/fetcher.js';
|
|
4
|
+
import type { ApiDocumentationComponentMetadataCollection } from './api/api-documentation.js';
|
|
5
|
+
import type { CwaApiDocumentationDataInterface } from './storage/stores/api-documentation/state.js';
|
|
6
|
+
import { ResourcesManager } from './resources/resources-manager.js';
|
|
7
|
+
import { Resources } from './resources/resources.js';
|
|
8
|
+
import Auth from './api/auth.js';
|
|
9
|
+
import Forms from './api/forms.js';
|
|
10
|
+
import Admin from './admin/admin.js';
|
|
11
|
+
import SiteConfig from '#cwa/api/site-config';
|
|
12
|
+
export default class Cwa {
|
|
13
|
+
private readonly apiUrl;
|
|
14
|
+
private readonly options;
|
|
15
|
+
private readonly storage;
|
|
16
|
+
private readonly apiDocumentation;
|
|
17
|
+
private readonly mercure;
|
|
18
|
+
private readonly fetcher;
|
|
19
|
+
private readonly fetchStatusManager;
|
|
20
|
+
private readonly cwaFetch;
|
|
21
|
+
readonly siteConfig: SiteConfig;
|
|
22
|
+
readonly resources: Resources;
|
|
23
|
+
readonly resourcesManager: ResourcesManager;
|
|
24
|
+
readonly auth: Auth;
|
|
25
|
+
readonly forms: Forms;
|
|
26
|
+
readonly admin: Admin;
|
|
27
|
+
private readonly adminNavGuard;
|
|
28
|
+
readonly currentModulePackageInfo: {
|
|
29
|
+
version: string;
|
|
30
|
+
name: string;
|
|
31
|
+
};
|
|
32
|
+
constructor($router: Router, options: CwaModuleOptions, currentModulePackageInfo: {
|
|
33
|
+
version: string;
|
|
34
|
+
name: string;
|
|
35
|
+
});
|
|
36
|
+
get adminNavigationGuardFn(): (toRoute: import("vue-router").RouteLocationNormalized) => boolean | {
|
|
37
|
+
path: string;
|
|
38
|
+
query: import("vue-router").LocationQuery;
|
|
39
|
+
hash: string;
|
|
40
|
+
};
|
|
41
|
+
get navigationDisabled(): boolean;
|
|
42
|
+
getApiDocumentation(refresh?: boolean): Promise<CwaApiDocumentationDataInterface | undefined>;
|
|
43
|
+
getComponentMetadata(refresh?: boolean, includePosition?: boolean): Promise<undefined | ApiDocumentationComponentMetadataCollection>;
|
|
44
|
+
fetchResource(event: FetchResourceEvent): Promise<import("#cwa/resources/resource-utils").CwaResource | undefined>;
|
|
45
|
+
fetchRoute(route: RouteLocationNormalizedLoaded): Promise<import("#cwa/resources/resource-utils").CwaResource | undefined>;
|
|
46
|
+
fetch(event: FetchEvent): import("./api/fetcher/fetcher.js").CwaFetchResponseRaw;
|
|
47
|
+
clearPrimaryFetch(): void;
|
|
48
|
+
initClientSide(): Promise<void>;
|
|
49
|
+
get resourcesConfig(): CwaResourcesMeta;
|
|
50
|
+
setResourceMeta(meta: CwaResourcesMeta): void;
|
|
51
|
+
get layoutsConfig(): {
|
|
52
|
+
[type: string]: import("#cwa/types").CwaUiMeta;
|
|
53
|
+
} | undefined;
|
|
54
|
+
get pagesConfig(): {
|
|
55
|
+
[type: string]: import("#cwa/types").CwaUiMeta;
|
|
56
|
+
} | undefined;
|
|
57
|
+
get pageDataConfig(): {
|
|
58
|
+
[resourceClass: string]: Pick<import("#cwa/types").CwaUiMeta, "name"> & {
|
|
59
|
+
metaFields?: {
|
|
60
|
+
field: string;
|
|
61
|
+
type: "input" | "select";
|
|
62
|
+
label: string;
|
|
63
|
+
options?: import("#imports").SelectOption[];
|
|
64
|
+
}[];
|
|
65
|
+
};
|
|
66
|
+
} | undefined;
|
|
67
|
+
get config(): import("#cwa/types").SiteConfigParams;
|
|
68
|
+
get apiUrlBase(): string;
|
|
69
|
+
addUniquePromise(scope: string, key: string, fn: () => Promise<void>): Promise<void> | undefined;
|
|
70
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { useCookie, useRuntimeConfig } from "#imports";
|
|
2
|
+
import { Storage } from "./storage/storage.js";
|
|
3
|
+
import Fetcher from "./api/fetcher/fetcher.js";
|
|
4
|
+
import Mercure from "./api/mercure.js";
|
|
5
|
+
import ApiDocumentation from "./api/api-documentation.js";
|
|
6
|
+
import CwaFetch from "./api/fetcher/cwa-fetch.js";
|
|
7
|
+
import FetchStatusManager from "./api/fetcher/fetch-status-manager.js";
|
|
8
|
+
import { ResourcesManager } from "./resources/resources-manager.js";
|
|
9
|
+
import { Resources } from "./resources/resources.js";
|
|
10
|
+
import Auth from "./api/auth.js";
|
|
11
|
+
import Forms from "./api/forms.js";
|
|
12
|
+
import { useProcess } from "./composables/process.js";
|
|
13
|
+
import Admin from "./admin/admin.js";
|
|
14
|
+
import NavigationGuard from "./admin/navigation-guard.js";
|
|
15
|
+
import { ResourceTypeFromIri } from "#cwa/resources/resource-utils";
|
|
16
|
+
import SiteConfig from "#cwa/api/site-config";
|
|
17
|
+
export default class Cwa {
|
|
18
|
+
apiUrl;
|
|
19
|
+
options;
|
|
20
|
+
storage;
|
|
21
|
+
apiDocumentation;
|
|
22
|
+
mercure;
|
|
23
|
+
fetcher;
|
|
24
|
+
fetchStatusManager;
|
|
25
|
+
cwaFetch;
|
|
26
|
+
siteConfig;
|
|
27
|
+
// public resources repository and utility getters
|
|
28
|
+
resources;
|
|
29
|
+
// public service for managing resources - CRUD functions etc.
|
|
30
|
+
resourcesManager;
|
|
31
|
+
// public service for authentication
|
|
32
|
+
auth;
|
|
33
|
+
forms;
|
|
34
|
+
admin;
|
|
35
|
+
adminNavGuard;
|
|
36
|
+
currentModulePackageInfo;
|
|
37
|
+
constructor($router, options, currentModulePackageInfo) {
|
|
38
|
+
this.currentModulePackageInfo = currentModulePackageInfo;
|
|
39
|
+
const { isClient } = useProcess();
|
|
40
|
+
const { public: { cwa: { apiUrl, apiUrlBrowser } } } = useRuntimeConfig();
|
|
41
|
+
const defaultApiUrl = "https://api-url-not-set.com";
|
|
42
|
+
if (isClient) {
|
|
43
|
+
this.apiUrl = apiUrlBrowser || apiUrl || defaultApiUrl;
|
|
44
|
+
} else {
|
|
45
|
+
this.apiUrl = apiUrl || apiUrlBrowser || defaultApiUrl;
|
|
46
|
+
}
|
|
47
|
+
if (this.apiUrl) {
|
|
48
|
+
ResourceTypeFromIri.setPathPrefix(new URL(this.apiUrl).pathname);
|
|
49
|
+
}
|
|
50
|
+
this.cwaFetch = new CwaFetch(this.apiUrl);
|
|
51
|
+
this.options = options;
|
|
52
|
+
this.storage = new Storage(this.options.storeName);
|
|
53
|
+
this.siteConfig = new SiteConfig(this.cwaFetch, this.storage.stores.siteConfig, this.options.siteConfig);
|
|
54
|
+
this.apiDocumentation = new ApiDocumentation(this.cwaFetch, this.storage.stores.apiDocumentation);
|
|
55
|
+
this.mercure = new Mercure(this.storage.stores.mercure, this.storage.stores.resources, this.storage.stores.fetcher);
|
|
56
|
+
this.fetchStatusManager = new FetchStatusManager(this.storage.stores.fetcher, this.mercure, this.apiDocumentation, this.storage.stores.resources);
|
|
57
|
+
this.fetcher = new Fetcher(this.cwaFetch, this.fetchStatusManager, $router, this.storage.stores.resources);
|
|
58
|
+
this.resources = new Resources(this.storage.stores.resources, this.storage.stores.fetcher);
|
|
59
|
+
this.admin = new Admin(this.storage.stores.admin, this.storage.stores.resources, this.resources);
|
|
60
|
+
this.resourcesManager = new ResourcesManager(this.cwaFetch, this.storage.stores.resources, this.fetchStatusManager, this.storage.stores.error, this.fetcher, this.admin, this.resources);
|
|
61
|
+
this.auth = new Auth(
|
|
62
|
+
this.cwaFetch,
|
|
63
|
+
this.mercure,
|
|
64
|
+
this.fetcher,
|
|
65
|
+
this.admin,
|
|
66
|
+
this.apiDocumentation,
|
|
67
|
+
this.storage.stores.auth,
|
|
68
|
+
this.storage.stores.resources,
|
|
69
|
+
this.storage.stores.fetcher,
|
|
70
|
+
useCookie("cwa_auth", { sameSite: "strict" })
|
|
71
|
+
);
|
|
72
|
+
this.forms = new Forms(this.storage.stores.resources);
|
|
73
|
+
this.mercure.setFetcher(this.fetcher);
|
|
74
|
+
this.mercure.setRequestCount(this.resourcesManager.requestCount);
|
|
75
|
+
this.adminNavGuard = new NavigationGuard($router, this.storage.stores.admin);
|
|
76
|
+
}
|
|
77
|
+
get adminNavigationGuardFn() {
|
|
78
|
+
return this.adminNavGuard.adminNavigationGuardFn;
|
|
79
|
+
}
|
|
80
|
+
get navigationDisabled() {
|
|
81
|
+
return this.adminNavGuard.navigationDisabled;
|
|
82
|
+
}
|
|
83
|
+
// API Documentation service is private, exposing only function required by applications
|
|
84
|
+
async getApiDocumentation(refresh = false) {
|
|
85
|
+
return await this.apiDocumentation.getApiDocumentation(refresh);
|
|
86
|
+
}
|
|
87
|
+
async getComponentMetadata(refresh = false, includePosition = false) {
|
|
88
|
+
return await this.apiDocumentation.getComponentMetadata(refresh, includePosition);
|
|
89
|
+
}
|
|
90
|
+
// fetcher is private, exposing the only function required by applications
|
|
91
|
+
fetchResource(event) {
|
|
92
|
+
return this.fetcher.fetchResource(event);
|
|
93
|
+
}
|
|
94
|
+
fetchRoute(route) {
|
|
95
|
+
return this.fetcher.fetchRoute(route);
|
|
96
|
+
}
|
|
97
|
+
fetch(event) {
|
|
98
|
+
return this.fetcher.fetch(event);
|
|
99
|
+
}
|
|
100
|
+
clearPrimaryFetch() {
|
|
101
|
+
this.fetchStatusManager.clearPrimaryFetch();
|
|
102
|
+
}
|
|
103
|
+
// Added as utility to bridge primary functionality of initialising 2 CWA services - this is not required by an application though, perhaps could be moved
|
|
104
|
+
async initClientSide() {
|
|
105
|
+
await this.auth.init();
|
|
106
|
+
this.mercure.init();
|
|
107
|
+
}
|
|
108
|
+
get resourcesConfig() {
|
|
109
|
+
return this.options.resources || {};
|
|
110
|
+
}
|
|
111
|
+
// @internal
|
|
112
|
+
setResourceMeta(meta) {
|
|
113
|
+
this.options.resources = meta;
|
|
114
|
+
}
|
|
115
|
+
get layoutsConfig() {
|
|
116
|
+
return this.options.layouts;
|
|
117
|
+
}
|
|
118
|
+
get pagesConfig() {
|
|
119
|
+
return this.options.pages;
|
|
120
|
+
}
|
|
121
|
+
get pageDataConfig() {
|
|
122
|
+
return this.options.pageData;
|
|
123
|
+
}
|
|
124
|
+
get config() {
|
|
125
|
+
return this.siteConfig.config;
|
|
126
|
+
}
|
|
127
|
+
get apiUrlBase() {
|
|
128
|
+
return this.apiUrl;
|
|
129
|
+
}
|
|
130
|
+
addUniquePromise(scope, key, fn) {
|
|
131
|
+
return this.storage.addUniquePromise(scope, key, fn);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CwaResourceErrorObject {
|
|
2
|
+
message?: string;
|
|
3
|
+
statusCode?: number;
|
|
4
|
+
statusMessage?: string;
|
|
5
|
+
statusText?: string;
|
|
6
|
+
request?: string;
|
|
7
|
+
primaryMessage: string;
|
|
8
|
+
setCookieHeaders?: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare class CwaResourceError extends Error {
|
|
11
|
+
name: "CwaResourceError";
|
|
12
|
+
statusCode?: number;
|
|
13
|
+
statusMessage?: string;
|
|
14
|
+
statusText?: string;
|
|
15
|
+
request?: string;
|
|
16
|
+
primaryMessage?: string;
|
|
17
|
+
setCookieHeaders?: string[];
|
|
18
|
+
asObject?: CwaResourceErrorObject;
|
|
19
|
+
}
|
|
20
|
+
export declare function createCwaResourceError(error: any): CwaResourceError;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export class CwaResourceError extends Error {
|
|
2
|
+
name = "CwaResourceError";
|
|
3
|
+
statusCode;
|
|
4
|
+
statusMessage;
|
|
5
|
+
statusText;
|
|
6
|
+
request;
|
|
7
|
+
primaryMessage;
|
|
8
|
+
setCookieHeaders;
|
|
9
|
+
asObject;
|
|
10
|
+
}
|
|
11
|
+
export function createCwaResourceError(error) {
|
|
12
|
+
let message = error?.message;
|
|
13
|
+
if (!message || message === "") {
|
|
14
|
+
message = "An unknown error occurred";
|
|
15
|
+
}
|
|
16
|
+
const cwaResourceError = new CwaResourceError(message);
|
|
17
|
+
Object.defineProperty(cwaResourceError, "statusCode", {
|
|
18
|
+
get() {
|
|
19
|
+
return error?.statusCode;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(cwaResourceError, "statusMessage", {
|
|
23
|
+
get() {
|
|
24
|
+
return error?.statusMessage;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(cwaResourceError, "statusText", {
|
|
28
|
+
get() {
|
|
29
|
+
return error?.statusText;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(cwaResourceError, "request", {
|
|
33
|
+
get() {
|
|
34
|
+
return error?.request ? error.request.toString() : void 0;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(cwaResourceError, "primaryMessage", {
|
|
38
|
+
get() {
|
|
39
|
+
return error?.statusText || error?.statusMessage || message;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(cwaResourceError, "setCookieHeaders", {
|
|
43
|
+
get() {
|
|
44
|
+
return error?.response?.headers.getSetCookie();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(cwaResourceError, "asObject", {
|
|
48
|
+
get() {
|
|
49
|
+
return {
|
|
50
|
+
message: this.message,
|
|
51
|
+
statusCode: this.statusCode,
|
|
52
|
+
statusMessage: this.statusMessage,
|
|
53
|
+
statusText: this.statusText,
|
|
54
|
+
primaryMessage: this.primaryMessage,
|
|
55
|
+
request: this.request,
|
|
56
|
+
setCookieHeaders: this.setCookieHeaders
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return cwaResourceError;
|
|
61
|
+
}
|