@cwa/nuxt-edge 1.0.0-29138192.e49c1a0
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/error.vue +13 -0
- package/dist/layer/layouts/CwaRootLayout.vue +140 -0
- package/dist/layer/nuxt.config.spec.ts +10 -0
- package/dist/layer/nuxt.config.ts +3 -0
- package/dist/layer/pages/_cwa/composables/useDataList.ts +50 -0
- package/dist/layer/pages/_cwa/composables/useDataType.ts +30 -0
- package/dist/layer/pages/_cwa/composables/useDynamicPageLoader.ts +28 -0
- package/dist/layer/pages/_cwa/composables/useItemPage.ts +172 -0
- package/dist/layer/pages/_cwa/composables/useListPage.ts +43 -0
- package/dist/layer/pages/_cwa/data/[type]/[iri].vue +17 -0
- package/dist/layer/pages/_cwa/data/[type].vue +131 -0
- package/dist/layer/pages/_cwa/data/index.vue +84 -0
- package/dist/layer/pages/_cwa/layouts/[iri].vue +174 -0
- package/dist/layer/pages/_cwa/layouts.vue +77 -0
- package/dist/layer/pages/_cwa/pages/[iri].vue +11 -0
- package/dist/layer/pages/_cwa/pages.vue +129 -0
- package/dist/layer/pages/_cwa/routes.vue +72 -0
- package/dist/layer/pages/_cwa/users/[iri].vue +248 -0
- package/dist/layer/pages/_cwa/users.vue +86 -0
- package/dist/layer/pages/_cwa.vue +43 -0
- package/dist/layer/pages/forgot-password.vue +32 -0
- package/dist/layer/pages/login.vue +33 -0
- package/dist/layer/pages/reset-password/[username]/[token].vue +39 -0
- package/dist/module.d.mts +53 -0
- package/dist/module.json +13 -0
- package/dist/module.mjs +235 -0
- package/dist/runtime/admin/admin.d.ts +36 -0
- package/dist/runtime/admin/admin.js +65 -0
- package/dist/runtime/admin/manageable-resource.d.ts +41 -0
- package/dist/runtime/admin/manageable-resource.js +206 -0
- package/dist/runtime/admin/manager-tabs-resolver.d.ts +17 -0
- package/dist/runtime/admin/manager-tabs-resolver.js +51 -0
- package/dist/runtime/admin/navigation-guard.d.ts +18 -0
- package/dist/runtime/admin/navigation-guard.js +55 -0
- package/dist/runtime/admin/resource-stack-manager.d.ts +92 -0
- package/dist/runtime/admin/resource-stack-manager.js +355 -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 +85 -0
- package/dist/runtime/api/auth.js +183 -0
- package/dist/runtime/api/fetcher/cwa-fetch.d.ts +5 -0
- package/dist/runtime/api/fetcher/cwa-fetch.js +20 -0
- package/dist/runtime/api/fetcher/fetch-status-manager.d.ts +51 -0
- package/dist/runtime/api/fetcher/fetch-status-manager.js +185 -0
- package/dist/runtime/api/fetcher/fetcher.d.ts +57 -0
- package/dist/runtime/api/fetcher/fetcher.js +222 -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 +33 -0
- package/dist/runtime/api/mercure.js +191 -0
- package/dist/runtime/composables/component/html-content.d.ts +2 -0
- package/dist/runtime/composables/component/html-content.js +82 -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 +16 -0
- package/dist/runtime/composables/cwa-collection-resource.js +92 -0
- package/dist/runtime/composables/cwa-image.d.ts +19 -0
- package/dist/runtime/composables/cwa-image.js +43 -0
- package/dist/runtime/composables/cwa-query-bound-model.d.ts +9 -0
- package/dist/runtime/composables/cwa-query-bound-model.js +108 -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 +32 -0
- package/dist/runtime/composables/cwa-resource-manager-tab.d.ts +17 -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 +149 -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 +24 -0
- package/dist/runtime/composables/cwa-resource.js +22 -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 +104 -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/cwa.d.ts +61 -0
- package/dist/runtime/cwa.js +123 -0
- package/dist/runtime/errors/cwa-resource-error.d.ts +18 -0
- package/dist/runtime/errors/cwa-resource-error.js +54 -0
- package/dist/runtime/plugin.d.ts +7 -0
- package/dist/runtime/plugin.js +18 -0
- package/dist/runtime/resources/resource-utils.d.ts +44 -0
- package/dist/runtime/resources/resource-utils.js +73 -0
- package/dist/runtime/resources/resources-manager.d.ts +70 -0
- package/dist/runtime/resources/resources-manager.js +463 -0
- package/dist/runtime/resources/resources.d.ts +53 -0
- package/dist/runtime/resources/resources.js +300 -0
- package/dist/runtime/route-middleware.d.ts +2 -0
- package/dist/runtime/route-middleware.js +86 -0
- package/dist/runtime/storage/storage.d.ts +20 -0
- package/dist/runtime/storage/storage.js +25 -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 +74 -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 +20 -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 +69 -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 +49 -0
- package/dist/runtime/storage/stores/fetcher/actions.js +125 -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 +25 -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 +54 -0
- package/dist/runtime/storage/stores/resources/actions.js +390 -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 +251 -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 +64 -0
- package/dist/runtime/storage/stores/resources/state.js +24 -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.vue +18 -0
- package/dist/runtime/templates/components/core/ComponentPlaceholder.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/ComponentPosition.spec.ts.snap +16 -0
- package/dist/runtime/templates/components/core/ComponentPosition.vue +63 -0
- package/dist/runtime/templates/components/core/ComponentPosition.vue.d.ts +3 -0
- package/dist/runtime/templates/components/core/ConfirmDialog.vue +41 -0
- package/dist/runtime/templates/components/core/ConfirmDialog.vue.d.ts +9 -0
- package/dist/runtime/templates/components/core/DialogBox.vue +95 -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.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 +13 -0
- package/dist/runtime/templates/components/core/admin/ListContainer.vue +7 -0
- package/dist/runtime/templates/components/core/admin/ListContainer.vue.d.ts +12 -0
- package/dist/runtime/templates/components/core/admin/ListContent.vue +136 -0
- package/dist/runtime/templates/components/core/admin/ListContent.vue.d.ts +21 -0
- package/dist/runtime/templates/components/core/admin/ListFilter.vue +49 -0
- package/dist/runtime/templates/components/core/admin/ListFilter.vue.d.ts +9 -0
- package/dist/runtime/templates/components/core/admin/ListFilterButton.vue +53 -0
- package/dist/runtime/templates/components/core/admin/ListFilterButton.vue.d.ts +9 -0
- package/dist/runtime/templates/components/core/admin/ListHeading.vue +32 -0
- package/dist/runtime/templates/components/core/admin/ListHeading.vue.d.ts +20 -0
- package/dist/runtime/templates/components/core/admin/ListPagination.vue +87 -0
- package/dist/runtime/templates/components/core/admin/ListPagination.vue.d.ts +15 -0
- package/dist/runtime/templates/components/core/admin/ListPaginationButton.vue +18 -0
- package/dist/runtime/templates/components/core/admin/ListPaginationButton.vue.d.ts +16 -0
- package/dist/runtime/templates/components/core/admin/PageAdminModal.vue +260 -0
- package/dist/runtime/templates/components/core/admin/PageAdminModal.vue.d.ts +12 -0
- package/dist/runtime/templates/components/core/admin/PageDataAdminModal.vue +187 -0
- package/dist/runtime/templates/components/core/admin/PageDataAdminModal.vue.d.ts +13 -0
- package/dist/runtime/templates/components/core/admin/ResourceModal.vue +99 -0
- package/dist/runtime/templates/components/core/admin/ResourceModal.vue.d.ts +27 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlay.vue +27 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlay.vue.d.ts +6 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.vue +23 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.vue.d.ts +15 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalTabs.vue +77 -0
- package/dist/runtime/templates/components/core/admin/ResourceModalTabs.vue.d.ts +19 -0
- package/dist/runtime/templates/components/core/admin/RouteListRow.vue +102 -0
- package/dist/runtime/templates/components/core/admin/RouteListRow.vue.d.ts +20 -0
- package/dist/runtime/templates/components/core/admin/RouteRedirectsTree.vue +52 -0
- package/dist/runtime/templates/components/core/admin/RouteRedirectsTree.vue.d.ts +10 -0
- package/dist/runtime/templates/components/core/admin/RoutesTab.vue +273 -0
- package/dist/runtime/templates/components/core/admin/RoutesTab.vue.d.ts +12 -0
- package/dist/runtime/templates/components/core/admin/form/FilterFormWrapper.vue +18 -0
- package/dist/runtime/templates/components/core/admin/form/FilterFormWrapper.vue.d.ts +16 -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 +3 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInfo.vue +23 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInfo.vue.d.ts +16 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInput.vue +30 -0
- package/dist/runtime/templates/components/core/admin/form/ModalInput.vue.d.ts +15 -0
- package/dist/runtime/templates/components/core/admin/form/ModalSelect.vue +99 -0
- package/dist/runtime/templates/components/core/admin/form/ModalSelect.vue.d.ts +6 -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 +4 -0
- package/dist/runtime/templates/components/core/assets/CwaLogo.vue +21 -0
- package/dist/runtime/templates/components/core/assets/CwaLogo.vue.d.ts +2 -0
- package/dist/runtime/templates/components/core/assets/IconComponents.vue +15 -0
- package/dist/runtime/templates/components/core/assets/IconComponents.vue.d.ts +2 -0
- package/dist/runtime/templates/components/core/assets/IconData.vue +24 -0
- package/dist/runtime/templates/components/core/assets/IconData.vue.d.ts +2 -0
- package/dist/runtime/templates/components/core/assets/IconLayouts.vue +20 -0
- package/dist/runtime/templates/components/core/assets/IconLayouts.vue.d.ts +2 -0
- package/dist/runtime/templates/components/core/assets/IconPages.vue +21 -0
- package/dist/runtime/templates/components/core/assets/IconPages.vue.d.ts +2 -0
- package/dist/runtime/templates/components/core/assets/IconRoutes.vue +23 -0
- package/dist/runtime/templates/components/core/assets/IconRoutes.vue.d.ts +2 -0
- package/dist/runtime/templates/components/core/assets/IconUsers.vue +13 -0
- package/dist/runtime/templates/components/core/assets/IconUsers.vue.d.ts +2 -0
- package/dist/runtime/templates/components/core/useDataResolver.d.ts +12 -0
- package/dist/runtime/templates/components/core/useDataResolver.js +109 -0
- package/dist/runtime/templates/components/main/ComponentGroup.Util.Positions.d.ts +6 -0
- package/dist/runtime/templates/components/main/ComponentGroup.Util.Positions.js +164 -0
- package/dist/runtime/templates/components/main/ComponentGroup.Util.Synchronizer.d.ts +20 -0
- package/dist/runtime/templates/components/main/ComponentGroup.Util.Synchronizer.js +69 -0
- package/dist/runtime/templates/components/main/ComponentGroup.spec.ts.snap +59 -0
- package/dist/runtime/templates/components/main/ComponentGroup.vue +107 -0
- package/dist/runtime/templates/components/main/ComponentGroup.vue.d.ts +9 -0
- package/dist/runtime/templates/components/main/CwaLink.vue +51 -0
- package/dist/runtime/templates/components/main/CwaLink.vue.d.ts +14 -0
- package/dist/runtime/templates/components/main/DefaultLayout.vue +8 -0
- package/dist/runtime/templates/components/main/DefaultLayout.vue.d.ts +12 -0
- package/dist/runtime/templates/components/main/ErrorPage.vue +98 -0
- package/dist/runtime/templates/components/main/ErrorPage.vue.d.ts +6 -0
- package/dist/runtime/templates/components/main/Logo.vue +18 -0
- package/dist/runtime/templates/components/main/Logo.vue.d.ts +2 -0
- package/dist/runtime/templates/components/main/README.md +7 -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 +7 -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 +2 -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.vue +207 -0
- package/dist/runtime/templates/components/main/admin/header/Header.vue.d.ts +2 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Menu.vue +189 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Menu.vue.d.ts +2 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/MenuLink.vue +14 -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.vue +19 -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.vue +69 -0
- package/dist/runtime/templates/components/main/admin/header/_parts/Notification.vue.d.ts +12 -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 +2 -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 +2 -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 +2 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/ComponentFocus.vue +151 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/ComponentFocus.vue.d.ts +10 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/LayoutPageOverlay.vue +192 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/LayoutPageOverlay.vue.d.ts +6 -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 +9 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/AddComponentDialog.vue +205 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_parts/AddComponentDialog.vue.d.ts +2 -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 +6 -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 +7 -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 +13 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/ResourceInfoTab.vue +59 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/ResourceInfoTab.vue.d.ts +6 -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 +6 -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 +6 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Ui.vue +101 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Ui.vue.d.ts +6 -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 +6 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DataPage.vue +121 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DataPage.vue.d.ts +6 -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 +6 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/CurrentResourceCta.vue +99 -0
- package/dist/runtime/templates/components/main/admin/resource-manager/cta/CurrentResourceCta.vue.d.ts +7 -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 +7 -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 +2 -0
- package/dist/runtime/templates/components/main/auth/ForgotPasswordPage.vue +55 -0
- package/dist/runtime/templates/components/main/auth/ForgotPasswordPage.vue.d.ts +20 -0
- package/dist/runtime/templates/components/main/auth/LoginPage.vue +60 -0
- package/dist/runtime/templates/components/main/auth/LoginPage.vue.d.ts +23 -0
- package/dist/runtime/templates/components/main/auth/ResetPasswordPage.vue +59 -0
- package/dist/runtime/templates/components/main/auth/ResetPasswordPage.vue.d.ts +27 -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 +6 -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 +45 -0
- package/dist/runtime/templates/components/main/auth/_parts/AuthTemplate.vue.d.ts +17 -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 +17 -0
- package/dist/runtime/templates/components/ui/BackgroundParticles.vue +960 -0
- package/dist/runtime/templates/components/ui/BackgroundParticles.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/Hamburger.vue +75 -0
- package/dist/runtime/templates/components/ui/Hamburger.vue.d.ts +9 -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 +9 -0
- package/dist/runtime/templates/components/ui/README.md +6 -0
- package/dist/runtime/templates/components/ui/alert/Info.spec.ts.snap +23 -0
- package/dist/runtime/templates/components/ui/alert/Info.vue +13 -0
- package/dist/runtime/templates/components/ui/alert/Info.vue.d.ts +12 -0
- package/dist/runtime/templates/components/ui/alert/Warning.spec.ts.snap +14 -0
- package/dist/runtime/templates/components/ui/alert/Warning.vue +8 -0
- package/dist/runtime/templates/components/ui/alert/Warning.vue.d.ts +12 -0
- package/dist/runtime/templates/components/ui/form/Button.vue +139 -0
- package/dist/runtime/templates/components/ui/form/Button.vue.d.ts +52 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverGroup.vue +18 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverGroup.vue.d.ts +10 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverItem.vue +15 -0
- package/dist/runtime/templates/components/ui/form/ButtonPopoverItem.vue.d.ts +10 -0
- package/dist/runtime/templates/components/ui/form/File.vue +72 -0
- package/dist/runtime/templates/components/ui/form/File.vue.d.ts +9 -0
- package/dist/runtime/templates/components/ui/form/Input.vue +22 -0
- package/dist/runtime/templates/components/ui/form/Input.vue.d.ts +5 -0
- package/dist/runtime/templates/components/ui/form/LabelWrapper.vue +16 -0
- package/dist/runtime/templates/components/ui/form/LabelWrapper.vue.d.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 +14 -0
- package/dist/runtime/templates/components/ui/form/Select.vue +60 -0
- package/dist/runtime/templates/components/ui/form/Select.vue.d.ts +3 -0
- package/dist/runtime/templates/components/ui/form/Toggle.vue +39 -0
- package/dist/runtime/templates/components/ui/form/Toggle.vue.d.ts +6 -0
- package/dist/runtime/templates/components/ui/icon/ArrowIcon.vue +30 -0
- package/dist/runtime/templates/components/ui/icon/ArrowIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/BinIcon.vue +24 -0
- package/dist/runtime/templates/components/ui/icon/BinIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/CogIcon.vue +9 -0
- package/dist/runtime/templates/components/ui/icon/CogIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/EyeIcon.vue +24 -0
- package/dist/runtime/templates/components/ui/icon/EyeIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/PenIcon.vue +12 -0
- package/dist/runtime/templates/components/ui/icon/PenIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/PlusIcon.vue +9 -0
- package/dist/runtime/templates/components/ui/icon/PlusIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/SearchIcon.vue +10 -0
- package/dist/runtime/templates/components/ui/icon/SearchIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/TickIcon.vue +23 -0
- package/dist/runtime/templates/components/ui/icon/TickIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/WarningIcon.vue +11 -0
- package/dist/runtime/templates/components/ui/icon/WarningIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/ui/icon/XMarkIcon.vue +15 -0
- package/dist/runtime/templates/components/ui/icon/XMarkIcon.vue.d.ts +2 -0
- package/dist/runtime/templates/components/utils/ContextMenu.vue +59 -0
- package/dist/runtime/templates/components/utils/ContextMenu.vue.d.ts +21 -0
- package/dist/runtime/templates/components/utils/HotSpot.vue +24 -0
- package/dist/runtime/templates/components/utils/HotSpot.vue.d.ts +9 -0
- package/dist/runtime/templates/components/utils/README.md +1 -0
- package/dist/runtime/templates/components/utils/Spinner.spec.ts.snap +56 -0
- package/dist/runtime/templates/components/utils/Spinner.vue +42 -0
- package/dist/runtime/templates/components/utils/Spinner.vue.d.ts +5 -0
- package/dist/runtime/templates/components/utils/SpinnerTick.vue +43 -0
- package/dist/runtime/templates/components/utils/SpinnerTick.vue.d.ts +6 -0
- package/dist/runtime/templates/cwa-page.spec.ts.snap +20 -0
- package/dist/runtime/templates/cwa-page.vue +32 -0
- package/dist/runtime/templates/cwa-page.vue.d.ts +2 -0
- package/dist/runtime/types/popper.d.ts +14 -0
- package/dist/types.d.mts +9 -0
- package/package.json +108 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { watch } from "vue";
|
|
2
|
+
import { isEqual } from "lodash-es";
|
|
3
|
+
import { CwaResourceTypes, getResourceTypeFromIri } from "../../../resources/resource-utils.js";
|
|
4
|
+
import { CwaResourceApiStatuses } from "../../../storage/stores/resources/state.js";
|
|
5
|
+
import { useCwa } from "../../../composables/cwa.js";
|
|
6
|
+
const resourceTypeProperty = {
|
|
7
|
+
[CwaResourceTypes.PAGE]: "pages",
|
|
8
|
+
[CwaResourceTypes.LAYOUT]: "layouts",
|
|
9
|
+
[CwaResourceTypes.COMPONENT]: "components"
|
|
10
|
+
};
|
|
11
|
+
export class ComponentGroupUtilSynchronizer {
|
|
12
|
+
resourcesManager;
|
|
13
|
+
resources;
|
|
14
|
+
auth;
|
|
15
|
+
watchStopHandle;
|
|
16
|
+
constructor() {
|
|
17
|
+
const { auth, resources, resourcesManager } = useCwa();
|
|
18
|
+
this.resourcesManager = resourcesManager;
|
|
19
|
+
this.resources = resources;
|
|
20
|
+
this.auth = auth;
|
|
21
|
+
}
|
|
22
|
+
createSyncWatcher(ops) {
|
|
23
|
+
this.watchStopHandle = watch(
|
|
24
|
+
[this.resources.isLoading, this.auth.signedIn, ops.resource],
|
|
25
|
+
async ([isLoading, signedIn, resource]) => {
|
|
26
|
+
if (!isLoading && signedIn) {
|
|
27
|
+
if (!resource) {
|
|
28
|
+
await this.createComponentGroup(ops.location, ops.fullReference, ops.allowedComponents);
|
|
29
|
+
} else if (resource.apiState.status === CwaResourceApiStatuses.SUCCESS) {
|
|
30
|
+
await this.updateAllowedComponents(ops.allowedComponents, resource);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
immediate: true
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
stopSyncWatcher() {
|
|
40
|
+
this.watchStopHandle?.();
|
|
41
|
+
}
|
|
42
|
+
async createComponentGroup(iri, fullReference, allowedComponents) {
|
|
43
|
+
const locationResourceType = getResourceTypeFromIri(iri);
|
|
44
|
+
const locationProperty = resourceTypeProperty[locationResourceType];
|
|
45
|
+
const postData = {
|
|
46
|
+
reference: fullReference.value,
|
|
47
|
+
location: iri,
|
|
48
|
+
allowedComponents
|
|
49
|
+
};
|
|
50
|
+
if (locationProperty) {
|
|
51
|
+
postData[locationProperty] = [iri];
|
|
52
|
+
}
|
|
53
|
+
await this.resourcesManager.createResource({
|
|
54
|
+
endpoint: "/_/component_groups",
|
|
55
|
+
data: postData
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
async updateAllowedComponents(allowedComponents, resource) {
|
|
59
|
+
if (isEqual(allowedComponents, resource?.data?.allowedComponents ?? null)) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
await this.resourcesManager.updateResource({
|
|
63
|
+
endpoint: resource?.data["@id"],
|
|
64
|
+
data: {
|
|
65
|
+
allowedComponents
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`ComponentGroup > snapshots > should match snapshot IF loader is shown 1`] = `
|
|
4
|
+
<div
|
|
5
|
+
class="component-group-placeholder"
|
|
6
|
+
>
|
|
7
|
+
<spinner-stub
|
|
8
|
+
show="true"
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
exports[`ComponentGroup > snapshots > should match snapshot IF resource is not found 1`] = `<!--v-if-->`;
|
|
14
|
+
|
|
15
|
+
exports[`ComponentGroup > snapshots > should match snapshot IF there are component positions defined 1`] = `
|
|
16
|
+
<div
|
|
17
|
+
data-v-app=""
|
|
18
|
+
>
|
|
19
|
+
|
|
20
|
+
<!--cwa-start-->
|
|
21
|
+
|
|
22
|
+
<resourceloader-stub
|
|
23
|
+
class=""
|
|
24
|
+
componentprefix=""
|
|
25
|
+
data-sort-value="mock_sort_pos1"
|
|
26
|
+
iri="pos1"
|
|
27
|
+
uicomponent="[object Object]"
|
|
28
|
+
/>
|
|
29
|
+
<resourceloader-stub
|
|
30
|
+
class=""
|
|
31
|
+
componentprefix=""
|
|
32
|
+
data-sort-value="mock_sort_pos2"
|
|
33
|
+
iri="pos2"
|
|
34
|
+
uicomponent="[object Object]"
|
|
35
|
+
/>
|
|
36
|
+
<resourceloader-stub
|
|
37
|
+
class=""
|
|
38
|
+
componentprefix=""
|
|
39
|
+
data-sort-value="mock_sort_pos3"
|
|
40
|
+
iri="pos3"
|
|
41
|
+
uicomponent="[object Object]"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<!--cwa-end-->
|
|
45
|
+
|
|
46
|
+
</div>
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
exports[`ComponentGroup > snapshots > should match snapshot IF there are no component positions defined 1`] = `<!--v-if-->`;
|
|
50
|
+
|
|
51
|
+
exports[`ComponentGroup > snapshots > should match snapshot IF user is logged in but there are no positions 1`] = `
|
|
52
|
+
<div
|
|
53
|
+
class="cwa:flex cwa:justify-center cwa:border-2 cwa:border-dashed cwa:border-gray-200 cwa:p-5"
|
|
54
|
+
>
|
|
55
|
+
<lazyhotspot-stub
|
|
56
|
+
screen-reader-action="Add component position"
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="showLoader"
|
|
4
|
+
class="component-group-placeholder"
|
|
5
|
+
>
|
|
6
|
+
<Spinner :show="true" />
|
|
7
|
+
</div>
|
|
8
|
+
<template v-else-if="componentPositions?.length">
|
|
9
|
+
<!--cwa-start-->
|
|
10
|
+
<ResourceLoader
|
|
11
|
+
v-for="positionIri of componentPositions"
|
|
12
|
+
:key="getResourceKey(positionIri)"
|
|
13
|
+
:data-sort-value="$cwa.resources.getPositionSortDisplayNumber(positionIri)"
|
|
14
|
+
:iri="positionIri"
|
|
15
|
+
:ui-component="ComponentPosition"
|
|
16
|
+
:class="nestedClasses"
|
|
17
|
+
/>
|
|
18
|
+
<!--cwa-end-->
|
|
19
|
+
</template>
|
|
20
|
+
<div
|
|
21
|
+
v-else-if="signedInAndResourceExists"
|
|
22
|
+
class="cwa:flex cwa:justify-center cwa:border-2 cwa:border-dashed cwa:border-gray-200 cwa:p-5"
|
|
23
|
+
>
|
|
24
|
+
<LazyHotSpot
|
|
25
|
+
screen-reader-action="Add component position"
|
|
26
|
+
:iri="iri"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup>
|
|
32
|
+
import {
|
|
33
|
+
computed,
|
|
34
|
+
onMounted,
|
|
35
|
+
onBeforeUnmount,
|
|
36
|
+
defineAsyncComponent
|
|
37
|
+
} from "vue";
|
|
38
|
+
import { ComponentGroupUtilSynchronizer } from "#cwa/runtime/templates/components/main/ComponentGroup.Util.Synchronizer";
|
|
39
|
+
import {
|
|
40
|
+
useComponentGroupPositions
|
|
41
|
+
} from "#cwa/runtime/templates/components/main/ComponentGroup.Util.Positions";
|
|
42
|
+
import ComponentPosition from "#cwa/runtime/templates/components/core/ComponentPosition.vue";
|
|
43
|
+
import ResourceLoader from "#cwa/runtime/templates/components/core/ResourceLoader.vue";
|
|
44
|
+
import { CwaResourceApiStatuses } from "#cwa/runtime/storage/stores/resources/state";
|
|
45
|
+
import { useCwa } from "#cwa/runtime/composables/cwa";
|
|
46
|
+
import { useCwaResourceManageable } from "#cwa/runtime/composables/cwa-resource-manageable";
|
|
47
|
+
import Spinner from "#cwa/runtime/templates/components/utils/Spinner.vue";
|
|
48
|
+
const LazyHotSpot = defineAsyncComponent({
|
|
49
|
+
suspensible: false,
|
|
50
|
+
loader: () => import("#cwa/runtime/templates/components/utils/HotSpot.vue")
|
|
51
|
+
});
|
|
52
|
+
const iri = computed(() => resource.value?.data?.["@id"]);
|
|
53
|
+
const $cwa = useCwa();
|
|
54
|
+
useCwaResourceManageable(iri);
|
|
55
|
+
const props = defineProps({
|
|
56
|
+
reference: { type: String, required: true },
|
|
57
|
+
location: { type: String, required: true },
|
|
58
|
+
allowedComponents: { type: [Array, null], required: false, default: null }
|
|
59
|
+
});
|
|
60
|
+
const fullReference = computed(() => {
|
|
61
|
+
const locationResource = $cwa.resources.getResource(props.location);
|
|
62
|
+
if (!locationResource.value) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
return `${props.reference}_${props.location}`;
|
|
66
|
+
});
|
|
67
|
+
const resource = computed(() => {
|
|
68
|
+
if (!fullReference.value) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
return $cwa.resources.getComponentGroupByReference(fullReference.value);
|
|
72
|
+
});
|
|
73
|
+
const signedInAndResourceExists = computed(() => {
|
|
74
|
+
return $cwa.auth.signedIn.value && !!resource.value?.data && $cwa.admin.isEditing;
|
|
75
|
+
});
|
|
76
|
+
const showLoader = computed(() => {
|
|
77
|
+
if (!$cwa.resources.isLoading.value) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
if (!resource.value) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
return !resource.value?.data && resource.value?.apiState.status === CwaResourceApiStatuses.IN_PROGRESS;
|
|
84
|
+
});
|
|
85
|
+
const componentGroupSynchronizer = new ComponentGroupUtilSynchronizer();
|
|
86
|
+
const { groupIsReordering, componentPositions } = useComponentGroupPositions(iri, $cwa);
|
|
87
|
+
const nestedClasses = computed(() => {
|
|
88
|
+
if (!groupIsReordering.value) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
return ["cwa:is-reordering"];
|
|
92
|
+
});
|
|
93
|
+
function getResourceKey(positionIri) {
|
|
94
|
+
return `ResourceLoaderGroupPosition_${iri.value}_${positionIri}`;
|
|
95
|
+
}
|
|
96
|
+
onMounted(() => {
|
|
97
|
+
componentGroupSynchronizer.createSyncWatcher({
|
|
98
|
+
resource,
|
|
99
|
+
location: props.location,
|
|
100
|
+
fullReference,
|
|
101
|
+
allowedComponents: props.allowedComponents
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
onBeforeUnmount(() => {
|
|
105
|
+
componentGroupSynchronizer.stopSyncWatcher();
|
|
106
|
+
});
|
|
107
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
reference: string;
|
|
3
|
+
location: string;
|
|
4
|
+
allowedComponents?: string[] | null;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
allowedComponents: string[] | null;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { defineNuxtLink } from "#app";
|
|
4
|
+
import { useCwa } from "#imports";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
custom: { type: null, required: false },
|
|
7
|
+
to: { type: null, required: false },
|
|
8
|
+
href: { type: null, required: false },
|
|
9
|
+
external: { type: Boolean, required: false },
|
|
10
|
+
target: { type: [String, Object, null], required: false },
|
|
11
|
+
rel: { type: [String, Object, null], required: false },
|
|
12
|
+
noRel: { type: Boolean, required: false },
|
|
13
|
+
prefetchedClass: { type: String, required: false },
|
|
14
|
+
prefetch: { type: Boolean, required: false },
|
|
15
|
+
prefetchOn: { type: [String, Object], required: false },
|
|
16
|
+
noPrefetch: { type: Boolean, required: false },
|
|
17
|
+
trailingSlash: { type: String, required: false },
|
|
18
|
+
activeClass: { type: String, required: false },
|
|
19
|
+
exactActiveClass: { type: String, required: false },
|
|
20
|
+
ariaCurrentValue: { type: String, required: false },
|
|
21
|
+
viewTransition: { type: Boolean, required: false },
|
|
22
|
+
replace: { type: Boolean, required: false }
|
|
23
|
+
});
|
|
24
|
+
const $cwa = useCwa();
|
|
25
|
+
const CwaLinkComponent = defineNuxtLink({
|
|
26
|
+
componentName: "CwaLink"
|
|
27
|
+
});
|
|
28
|
+
const cwaLink = CwaLinkComponent.useLink(props);
|
|
29
|
+
const target = computed(() => {
|
|
30
|
+
if (props.target) {
|
|
31
|
+
return props.target;
|
|
32
|
+
}
|
|
33
|
+
return cwaLink.isExternal.value ? "_blank" : "_self";
|
|
34
|
+
});
|
|
35
|
+
function handleClick(e) {
|
|
36
|
+
if (!cwaLink.isExternal.value) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
$cwa.navigationDisabled && e.preventDefault();
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<CwaLinkComponent
|
|
45
|
+
v-bind="props"
|
|
46
|
+
:target="target"
|
|
47
|
+
@click="handleClick"
|
|
48
|
+
>
|
|
49
|
+
<slot />
|
|
50
|
+
</CwaLinkComponent>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type NuxtLinkProps } from '#app';
|
|
2
|
+
type __VLS_Props = NuxtLinkProps;
|
|
3
|
+
declare var __VLS_10: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
default?: (props: typeof __VLS_10) => any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { onMounted, ref } from "vue";
|
|
3
|
+
import { clearError, useHead, useRoute } from "#app";
|
|
4
|
+
import { useCwa } from "#cwa/runtime/composables/cwa";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
error: { type: Object, required: true }
|
|
7
|
+
});
|
|
8
|
+
const _error = props.error;
|
|
9
|
+
const stacktrace = _error.stack ? _error.stack.split("\n").splice(1).map((line) => {
|
|
10
|
+
const text = line.replace("webpack:/", "").replace(".vue", ".js").trim();
|
|
11
|
+
return {
|
|
12
|
+
text,
|
|
13
|
+
internal: line.includes("node_modules") && !line.includes(".cache") || line.includes("internal") || line.includes("new Promise")
|
|
14
|
+
};
|
|
15
|
+
}).map((i) => `<span class="stack${i.internal ? " internal" : ""}">${i.text}</span>`).join("\n") : "";
|
|
16
|
+
const $route = useRoute();
|
|
17
|
+
const $cwa = useCwa();
|
|
18
|
+
const statusCode = Number(_error.statusCode || 500);
|
|
19
|
+
const is404 = statusCode === 404;
|
|
20
|
+
const statusMessage = _error.statusMessage ?? (is404 ? "Page Not Found" : "Internal Server Error");
|
|
21
|
+
const description = _error.message || _error.toString();
|
|
22
|
+
const stack = import.meta.dev && !is404 ? description || `${stacktrace}` : void 0;
|
|
23
|
+
useHead({
|
|
24
|
+
bodyAttrs: {
|
|
25
|
+
class: "cwa:h-full cwa:bg-white cwa:dark:bg-black"
|
|
26
|
+
},
|
|
27
|
+
htmlAttrs: {
|
|
28
|
+
class: "cwa:h-full"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const returnHome = () => clearError({ redirect: "/" });
|
|
32
|
+
const showingErrorPage = ref(false);
|
|
33
|
+
onMounted(() => {
|
|
34
|
+
showingErrorPage.value = true;
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<div
|
|
40
|
+
class="cwa:h-full cwa:relative cwa:z-10 cwa:transition-opacity cwa:duration-300"
|
|
41
|
+
:class="[showingErrorPage ? 'cwa:opacity-100' : 'cwa:opacity-0']"
|
|
42
|
+
>
|
|
43
|
+
<CwaUiBackgroundParticles class="cwa:absolute cwa:inset-0 cwa:-z-10 cwa:opacity-30 cwa:invert cwa:dark:invert-0" />
|
|
44
|
+
<main class="cwa:h-full cwa:flex cwa:flex-col cwa:p-6 cwa:lg:p-8">
|
|
45
|
+
<div class="cwa:flex cwa:justify-center cwa:grow cwa:h-full cwa:items-center">
|
|
46
|
+
<div class="cwa:text-center">
|
|
47
|
+
<p class="cwa:text-base cwa:font-semibold cwa:text-blue-600">
|
|
48
|
+
{{ statusCode }}
|
|
49
|
+
</p>
|
|
50
|
+
<h1 class="cwa:mt-4 cwa:text-balance cwa:text-4xl cwa:font-semibold cwa:tracking-tight cwa:text-gray-900 cwa:dark:text-stone-100 cwa:sm:text-6xl">
|
|
51
|
+
{{ statusMessage }}
|
|
52
|
+
</h1>
|
|
53
|
+
<p class="cwa:mt-6 cwa:text-pretty cwa:text-lg cwa:font-medium cwa:text-stone-400 sm:text-xl/8">
|
|
54
|
+
{{ description }}
|
|
55
|
+
</p>
|
|
56
|
+
<div
|
|
57
|
+
v-if="stack"
|
|
58
|
+
class="cwa:text-left cwa:bg-black/5 cwa:bg-white cwa:dark:bg-white/10 cwa:flex-1 cwa:h-auto cwa:overflow-y-auto cwa:rounded-md cwa:text-stone-400 cwa:mt-8"
|
|
59
|
+
>
|
|
60
|
+
<pre
|
|
61
|
+
class="cwa:font-light cwa:leading-tight cwa:p-4 cwa:text-sm cwa:z-10"
|
|
62
|
+
v-html="stack"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="cwa:mt-10 cwa:flex cwa:items-center cwa:justify-center cwa:gap-x-6">
|
|
66
|
+
<button
|
|
67
|
+
v-if="$route.path !== '/'"
|
|
68
|
+
class="cwa:cursor-pointer cwa:rounded-md cwa:bg-blue-600 cwa:px-3.5 cwa:py-2.5 cwa:text-sm cwa:font-semibold cwa:text-white cwa:shadow-sm cwa:hover:bg-indigo-500 cwa:focus-visible:outline cwa:focus-visible:outline-2 cwa:focus-visible:outline-offset-2 cwa:focus-visible:outline-indigo-600"
|
|
69
|
+
@click="returnHome"
|
|
70
|
+
>
|
|
71
|
+
Go back home
|
|
72
|
+
</button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="cwa:justify-center cwa:gap-y-2 cwa:flex cwa:h-auto cwa:grow-0 cwa:flex-col cwa:text-center cwa:pb-2 cwa:pt-6">
|
|
77
|
+
<div class="cwa:justify-center cwa:flex">
|
|
78
|
+
<CwaLogo class="cwa:h-6 cwa:w-auto cwa:text-stone-300" />
|
|
79
|
+
</div>
|
|
80
|
+
<ClientOnly>
|
|
81
|
+
<div class="cwa:text-sm cwa:text-stone-400">
|
|
82
|
+
Are you the owner of this website?
|
|
83
|
+
<NuxtLink
|
|
84
|
+
v-if="$cwa.auth.hasRole('ROLE_ADMIN')"
|
|
85
|
+
to="/_cwa/layouts"
|
|
86
|
+
class="cwa:font-semibold cwa:hover:text-dark cwa:dark:hover:text-white"
|
|
87
|
+
>Go to admin <span aria-hidden="true">→</span></NuxtLink>
|
|
88
|
+
<NuxtLink
|
|
89
|
+
v-else
|
|
90
|
+
to="/login"
|
|
91
|
+
class="cwa:font-semibold cwa:hover:text-dark cwa:dark:hover:text-white"
|
|
92
|
+
>Sign in <span aria-hidden="true">→</span></NuxtLink>
|
|
93
|
+
</div>
|
|
94
|
+
</ClientOnly>
|
|
95
|
+
</div>
|
|
96
|
+
</main>
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type NuxtError } from '#app';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
error: NuxtError;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg
|
|
3
|
+
width="906px"
|
|
4
|
+
height="260px"
|
|
5
|
+
viewBox="0 0 906 260"
|
|
6
|
+
version="1.1"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<g
|
|
10
|
+
transform="translate(-181.000000, -185.000000)"
|
|
11
|
+
fill="currentColor"
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M411,232.558892 L311.990506,315.54434 L395.186608,414.582148 C395.083121,414.669432 394.979462,414.756587 394.875631,414.843614 C340.020479,460.820814 258.000365,453.391191 211.678578,398.249085 C165.356791,343.10698 172.27445,261.133586 227.129601,215.156386 C281.984753,169.179186 364.004868,176.608809 410.326654,231.750915 C410.552367,232.019606 410.776815,232.288934 411,232.558892 Z M731,444.98882 L606.047047,318.63887 L482,444.072786 L482,186 L731,186 L731,444.98882 Z M784,445 L935,186 L1087,445 L784,445 Z"
|
|
15
|
+
/>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Components in this directory are available to the application automatically with the 'Cwa' prefix.
|
|
2
|
+
N.b directories starting with an underscore will not be available as an auto-import or from the #components alias
|
|
3
|
+
|
|
4
|
+
For example:
|
|
5
|
+
```vue
|
|
6
|
+
<CwaComponentGroup reference="primary" :location="props.iri" />
|
|
7
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useCwa } from "#imports";
|
|
4
|
+
const $cwa = useCwa();
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
index: { type: Number, required: true },
|
|
7
|
+
rootWidth: { type: Number, required: false },
|
|
8
|
+
useCurrentStack: { type: Boolean, required: false }
|
|
9
|
+
});
|
|
10
|
+
defineEmits(["click"]);
|
|
11
|
+
const stack = computed(() => {
|
|
12
|
+
return props.useCurrentStack ? $cwa.admin.resourceStackManager.resourceStack.value : $cwa.admin.resourceStackManager.contextStack.value;
|
|
13
|
+
});
|
|
14
|
+
const stackItem = computed(() => {
|
|
15
|
+
return stack.value[props.index];
|
|
16
|
+
});
|
|
17
|
+
const nextIndex = computed(() => props.index - 1);
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div
|
|
22
|
+
class="resource-context-item cwa:border cwa:border-dashed cwa:px-1.5 cwa:py-1 cwa:cursor-pointer cwa:text-gray-300 cwa:block
|
|
23
|
+
[&:not(:has(.resource-context-item:hover)):hover]:cwa:!bg-dark
|
|
24
|
+
[&:not(:has(.resource-context-item:hover)):hover]:cwa:!border-gray-200
|
|
25
|
+
[&:not(:has(.resource-context-item:hover)):hover]:cwa:!border-solid
|
|
26
|
+
[&:not(:has(.resource-context-item:hover)):hover]:cwa:!text-white"
|
|
27
|
+
:style="{ minWidth: rootWidth && index === 0 ? `${rootWidth}px` : `auto` }"
|
|
28
|
+
@click="$emit('click', index)"
|
|
29
|
+
>
|
|
30
|
+
<resource-context-item
|
|
31
|
+
v-if="nextIndex >= 0"
|
|
32
|
+
:index="nextIndex"
|
|
33
|
+
:root-width="rootWidth"
|
|
34
|
+
:use-current-stack="useCurrentStack"
|
|
35
|
+
@click="(childIndex) => $emit('click', childIndex)"
|
|
36
|
+
/>
|
|
37
|
+
<button class="cwa:px-1.5 cwa:py-0.5 cwa:w-auto cwa:min-w-full cwa:cursor-pointer">
|
|
38
|
+
{{ stackItem.displayName || stackItem.iri }}
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
index: number;
|
|
3
|
+
rootWidth?: number;
|
|
4
|
+
useCurrentStack?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onMounted, ref, useTemplateRef, watch } from "vue";
|
|
3
|
+
import { useCwa } from "#imports";
|
|
4
|
+
const $cwa = useCwa();
|
|
5
|
+
const requestsOngoing = computed(() => {
|
|
6
|
+
return $cwa.resourcesManager.requestCount.value > 0;
|
|
7
|
+
});
|
|
8
|
+
const holder = useTemplateRef("holder");
|
|
9
|
+
const currentIndicators = ref([]);
|
|
10
|
+
const indicatorCount = ref();
|
|
11
|
+
onMounted(() => {
|
|
12
|
+
watch(requestsOngoing, (isRequests) => {
|
|
13
|
+
if (isRequests) {
|
|
14
|
+
indicatorCount.value++;
|
|
15
|
+
if (indicatorCount.value > 100) {
|
|
16
|
+
indicatorCount.value = 0;
|
|
17
|
+
}
|
|
18
|
+
currentIndicators.value.push(indicatorCount.value);
|
|
19
|
+
} else if (currentIndicators.value.length) {
|
|
20
|
+
currentIndicators.value.splice(0, 1);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div
|
|
28
|
+
ref="holder"
|
|
29
|
+
class="cwa:w-full cwa:h-[1px] cwa:pointer-events-none"
|
|
30
|
+
>
|
|
31
|
+
<TransitionGroup name="load-indicator">
|
|
32
|
+
<div
|
|
33
|
+
v-for="count in currentIndicators"
|
|
34
|
+
:key="`load-indicator-${count}`"
|
|
35
|
+
class="cwa:absolute cwa:h-full cwa:bg-orange/30 cwa:top-0 cwa:left-0 cwa:right-0"
|
|
36
|
+
>
|
|
37
|
+
<div class="cwa:shadow-[inset_-20px_0_10px_-10px] cwa:shadow-orange/30 cwa:absolute cwa:right-full cwa:w-8 cwa:h-full" />
|
|
38
|
+
<div class="cwa-loader-inner-holder cwa:transition cwa:duration-300 cwa:left-0 cwa:right-0 cwa:top-0 cwa:h-full">
|
|
39
|
+
<div class="cwa-loader-inner-indicator cwa:bg-light/30 cwa:h-full cwa:top-0 cwa:absolute cwa:z-10" />
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</TransitionGroup>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<style>
|
|
47
|
+
.load-indicator-enter-active,.load-indicator-leave-active{transition:all .6s ease}.load-indicator-enter-from{opacity:1;right:100%!important}.load-indicator-leave-to{left:100%!important;opacity:1}.load-indicator-leave-to .cwa-loader-inner-holder{left:100%!important;opacity:0!important}@keyframes inner-indicator-animation{0%,5%{left:0;opacity:0;right:100%}45%,55%{opacity:1}50%{left:0;opacity:1;right:0}95%,to{left:100%;opacity:0;right:0}}.cwa-loader-inner-indicator{animation:inner-indicator-animation 2.5s infinite;animation-delay:.8s}
|
|
48
|
+
</style>
|
package/dist/runtime/templates/components/main/admin/_common/ResourceLoadingIndicator.vue.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
package/dist/runtime/templates/components/main/admin/_common/useDynamicPositionSelectOptions.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const useDynamicPositionSelectOptions = ($cwa) => {
|
|
2
|
+
async function getOptions() {
|
|
3
|
+
const newOptions = [{
|
|
4
|
+
label: "None",
|
|
5
|
+
value: null
|
|
6
|
+
}];
|
|
7
|
+
const docs = await $cwa.getApiDocumentation();
|
|
8
|
+
const pageDataMeta = docs?.pageDataMetadata?.["hydra:member"];
|
|
9
|
+
if (pageDataMeta) {
|
|
10
|
+
for (const { properties } of pageDataMeta) {
|
|
11
|
+
newOptions.push(...properties.map(({ property }) => ({ label: property, value: property })));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return newOptions;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
getOptions
|
|
18
|
+
};
|
|
19
|
+
};
|