@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,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label :for="inputId">
|
|
3
|
+
<input
|
|
4
|
+
:id="inputId"
|
|
5
|
+
v-model="model"
|
|
6
|
+
class="cwa:sr-only cwa:peer/checkbox"
|
|
7
|
+
type="checkbox"
|
|
8
|
+
:value="value"
|
|
9
|
+
>
|
|
10
|
+
<button
|
|
11
|
+
:class="['cwa:cursor-pointer', 'cwa:transition-opacity', 'cwa:border-2', 'cwa:rounded', 'cwa:py-1', 'cwa:px-4', 'cwa:opacity-50', 'cwa:peer-checked/checkbox:opacity-100', backgroundColorClass, borderColorClass]"
|
|
12
|
+
@click="toggleCheckbox"
|
|
13
|
+
>
|
|
14
|
+
{{ label }}
|
|
15
|
+
</button>
|
|
16
|
+
</label>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { computed, useId } from "vue";
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
modelValue: { type: [Array, null], required: true },
|
|
23
|
+
value: { type: String, required: true },
|
|
24
|
+
label: { type: String, required: true },
|
|
25
|
+
backgroundColorClass: { type: String, required: true },
|
|
26
|
+
borderColorClass: { type: String, required: true }
|
|
27
|
+
});
|
|
28
|
+
const inputId = useId();
|
|
29
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
30
|
+
function toggleCheckbox() {
|
|
31
|
+
if (isChecked.value) {
|
|
32
|
+
if (model.value === null) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
model.value = model.value.filter((v) => {
|
|
36
|
+
return v !== props.value;
|
|
37
|
+
});
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
model.value = [...model.value || [], props.value];
|
|
41
|
+
}
|
|
42
|
+
const model = computed({
|
|
43
|
+
get() {
|
|
44
|
+
return props.modelValue;
|
|
45
|
+
},
|
|
46
|
+
set(value) {
|
|
47
|
+
emit("update:modelValue", value);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const isChecked = computed(() => {
|
|
51
|
+
return model.value && model.value.includes(props.value);
|
|
52
|
+
});
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: string[] | null;
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
backgroundColorClass: string;
|
|
6
|
+
borderColorClass: string;
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ListContainer class="cwa:bg-dark cwa:pt-12 cwa:pb-8 cwa:border-b-2 cwa:border-b-stone-700">
|
|
3
|
+
<div class="cwa:w-full cwa:max-w-2xl">
|
|
4
|
+
<slot />
|
|
5
|
+
<div class="cwa:flex cwa:gap-x-6 cwa:items-center">
|
|
6
|
+
<div>
|
|
7
|
+
<h1 class="cwa:text-4xl cwa:text-light">
|
|
8
|
+
{{ title }}
|
|
9
|
+
</h1>
|
|
10
|
+
</div>
|
|
11
|
+
<div v-if="!hideAdd">
|
|
12
|
+
<button
|
|
13
|
+
class="cwa:text-white cwa:bg-blue-600/90 cwa:hover:bg-blue-600 cwa:border-transparent cwa:p-2.5 cwa:cursor-pointer"
|
|
14
|
+
@click="$emit('add')"
|
|
15
|
+
>
|
|
16
|
+
<CwaUiIconPlusIcon class="cwa:w-4 cwa:h-4" />
|
|
17
|
+
<span class="cwa:sr-only">Add</span>
|
|
18
|
+
</button>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</ListContainer>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup>
|
|
26
|
+
import ListContainer from "#cwa/runtime/templates/components/core/admin/ListContainer.vue";
|
|
27
|
+
defineProps({
|
|
28
|
+
title: { type: String, required: true },
|
|
29
|
+
hideAdd: { type: Boolean, required: false }
|
|
30
|
+
});
|
|
31
|
+
defineEmits(["add"]);
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
hideAdd?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_5: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_5) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
add: () => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onAdd?: (() => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cwa:flex cwa:justify-between cwa:items-center">
|
|
3
|
+
<div class="cwa:text-stone-400 cwa:py-1.5 cwa:text-sm">
|
|
4
|
+
{{ showingFrom }} to {{ showingTo }} of {{ totalItems }} results
|
|
5
|
+
</div>
|
|
6
|
+
<div>
|
|
7
|
+
<ul class="cwa:flex cwa:bg-dark cwa:rounded-lg cwa:overflow-hidden cwa:border cwa:border-stone-600">
|
|
8
|
+
<ListPaginationButton
|
|
9
|
+
:disabled="isFirst"
|
|
10
|
+
@click="pageModel--"
|
|
11
|
+
>
|
|
12
|
+
<
|
|
13
|
+
</ListPaginationButton>
|
|
14
|
+
<ListPaginationButton
|
|
15
|
+
v-for="pageNumber of pages"
|
|
16
|
+
:key="`page-change-button-${pageNumber}`"
|
|
17
|
+
:selected="pageNumber === pageModel"
|
|
18
|
+
@click="pageModel = pageNumber"
|
|
19
|
+
>
|
|
20
|
+
{{ pageNumber }}
|
|
21
|
+
</ListPaginationButton>
|
|
22
|
+
<ListPaginationButton
|
|
23
|
+
:disabled="isLast"
|
|
24
|
+
@click="pageModel++"
|
|
25
|
+
>
|
|
26
|
+
>
|
|
27
|
+
</ListPaginationButton>
|
|
28
|
+
</ul>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup>
|
|
34
|
+
import { computed } from "vue";
|
|
35
|
+
import ListPaginationButton from "./ListPaginationButton.vue";
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
totalItems: { type: Number, required: true }
|
|
38
|
+
});
|
|
39
|
+
const pageModel = defineModel("page", { type: Number, ...{ required: true } });
|
|
40
|
+
const perPageModel = defineModel("perPage", { type: Number, ...{ required: true } });
|
|
41
|
+
const showingFrom = computed(() => {
|
|
42
|
+
return 1 + (pageModel.value - 1) * perPageModel.value;
|
|
43
|
+
});
|
|
44
|
+
const showingTo = computed(() => {
|
|
45
|
+
return Math.min(props.totalItems, showingFrom.value - 1 + perPageModel.value);
|
|
46
|
+
});
|
|
47
|
+
const isFirst = computed(() => {
|
|
48
|
+
return pageModel.value <= 1;
|
|
49
|
+
});
|
|
50
|
+
const isLast = computed(() => {
|
|
51
|
+
return showingTo.value === props.totalItems;
|
|
52
|
+
});
|
|
53
|
+
const totalPages = computed(() => {
|
|
54
|
+
if (!perPageModel.value) {
|
|
55
|
+
return 1;
|
|
56
|
+
}
|
|
57
|
+
return Math.ceil(props.totalItems / perPageModel.value);
|
|
58
|
+
});
|
|
59
|
+
const pages = computed(() => {
|
|
60
|
+
if (!totalPages.value) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
const allPages = Array.from(Array(totalPages.value), (_, x) => x + 1);
|
|
64
|
+
const maxPagesToDisplay = 7;
|
|
65
|
+
if (allPages.length < maxPagesToDisplay) {
|
|
66
|
+
return allPages;
|
|
67
|
+
}
|
|
68
|
+
const displayPages = [];
|
|
69
|
+
displayPages.push(pageModel.value);
|
|
70
|
+
let lowest = pageModel.value;
|
|
71
|
+
let highest = pageModel.value;
|
|
72
|
+
let displayCounter = 1;
|
|
73
|
+
while (displayCounter < maxPagesToDisplay) {
|
|
74
|
+
displayCounter++;
|
|
75
|
+
if ((displayCounter % 2 === 0 || highest >= totalPages.value) && lowest > 1) {
|
|
76
|
+
lowest--;
|
|
77
|
+
displayPages.unshift(lowest);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (highest < totalPages.value) {
|
|
81
|
+
highest++;
|
|
82
|
+
displayPages.push(highest);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return displayPages;
|
|
86
|
+
});
|
|
87
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
totalItems: number;
|
|
3
|
+
};
|
|
4
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
5
|
+
'page': number;
|
|
6
|
+
'perPage': number;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:page": (value: number) => any;
|
|
10
|
+
"update:perPage": (value: number) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
13
|
+
"onUpdate:perPage"?: ((value: number) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li class="cwa:border-r cwa:last:border-0 cwa:border-stone-600">
|
|
3
|
+
<button
|
|
4
|
+
:disabled="!!disabled"
|
|
5
|
+
class="cwa:py-1.5 cwa:px-3 cwa:transition-colors cwa:font-bold cwa:cursor-pointer"
|
|
6
|
+
:class="[disabled ? 'cwa:opacity-50' : 'cwa:hover:bg-stone-700 cwa:hover:text-light', selected ? 'cwa:text-light cwa:bg-stone-700' : 'cwa:text-stone-400']"
|
|
7
|
+
>
|
|
8
|
+
<slot />
|
|
9
|
+
</button>
|
|
10
|
+
</li>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
defineProps({
|
|
15
|
+
disabled: { type: Boolean, required: false },
|
|
16
|
+
selected: { type: Boolean, required: false }
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
selected?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ResourceModal
|
|
3
|
+
v-if="localResourceData"
|
|
4
|
+
v-model="localResourceData.reference"
|
|
5
|
+
title-placeholder="No Reference"
|
|
6
|
+
:is-loading="isLoading"
|
|
7
|
+
:border-color-class="localResourceData.isTemplate ? 'cwa:border-b-yellow' : 'cwa:border-b-blue-600'"
|
|
8
|
+
@close="$emit('close')"
|
|
9
|
+
@save="saveTitle"
|
|
10
|
+
>
|
|
11
|
+
<template #title>
|
|
12
|
+
<PageTypeSelect v-model="localResourceData.isTemplate" />
|
|
13
|
+
</template>
|
|
14
|
+
<template
|
|
15
|
+
v-if="!hideViewLink && !isAdding"
|
|
16
|
+
#icons
|
|
17
|
+
>
|
|
18
|
+
<div>
|
|
19
|
+
<NuxtLink :to="localResourceData['@id']">
|
|
20
|
+
<CwaUiIconEyeIcon class="cwa:w-9" />
|
|
21
|
+
</NuxtLink>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<ResourceModalTabs :tabs="tabs">
|
|
25
|
+
<template #details>
|
|
26
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
27
|
+
<div>
|
|
28
|
+
<ModalInput
|
|
29
|
+
v-model="localResourceData.title"
|
|
30
|
+
label="SEO Page Title"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<ModalInput
|
|
35
|
+
v-model="localResourceData.metaDescription"
|
|
36
|
+
label="SEO Meta Description"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<ModalSelect
|
|
41
|
+
v-model="localResourceData.layout"
|
|
42
|
+
label="Layout"
|
|
43
|
+
:options="layoutOptions"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="cwa:flex cwa:gap-x-2">
|
|
47
|
+
<div class="cwa:grow">
|
|
48
|
+
<ModalSelect
|
|
49
|
+
v-model="localResourceData.uiComponent"
|
|
50
|
+
label="Page UI"
|
|
51
|
+
:options="pageComponentOptions"
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
<div
|
|
55
|
+
v-if="pageStyleOptions.length"
|
|
56
|
+
class="cwa:w-1/2"
|
|
57
|
+
>
|
|
58
|
+
<ModalSelect
|
|
59
|
+
v-model="localResourceData.uiClassNames"
|
|
60
|
+
label="Style"
|
|
61
|
+
:options="pageStyleOptions"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="cwa:flex cwa:justify-end cwa:pt-2 cwa:gap-x-2">
|
|
66
|
+
<div>
|
|
67
|
+
<CwaUiFormButton
|
|
68
|
+
color="dark"
|
|
69
|
+
:disabled="isUpdating"
|
|
70
|
+
@click="saveResource(true)"
|
|
71
|
+
>
|
|
72
|
+
{{ isAdding ? "Add" : "Save" }} & Close
|
|
73
|
+
</CwaUiFormButton>
|
|
74
|
+
</div>
|
|
75
|
+
<div>
|
|
76
|
+
<CwaUiFormButton
|
|
77
|
+
color="blue"
|
|
78
|
+
:disabled="isUpdating"
|
|
79
|
+
@click="() => saveResource(false)"
|
|
80
|
+
>
|
|
81
|
+
{{ isAdding ? "Add Now" : "Save" }}
|
|
82
|
+
</CwaUiFormButton>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
<template #routes>
|
|
88
|
+
<RoutesTab
|
|
89
|
+
v-if="resource && resource.hasOwnProperty('@id')"
|
|
90
|
+
:page-resource="resource"
|
|
91
|
+
@reload="loadResource"
|
|
92
|
+
/>
|
|
93
|
+
</template>
|
|
94
|
+
<template #info>
|
|
95
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
96
|
+
<div>
|
|
97
|
+
<ModalInfo
|
|
98
|
+
label="Created"
|
|
99
|
+
:content="formatDate(localResourceData.createdAt)"
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
<div>
|
|
103
|
+
<ModalInfo
|
|
104
|
+
label="Updated"
|
|
105
|
+
:content="formatDate(localResourceData.updatedAt)"
|
|
106
|
+
/>
|
|
107
|
+
</div>
|
|
108
|
+
<div>
|
|
109
|
+
<ModalInfo
|
|
110
|
+
label="ID"
|
|
111
|
+
:content="localResourceData['@id']"
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="cwa:flex cwa:justify-start cwa:pt-6">
|
|
115
|
+
<div>
|
|
116
|
+
<CwaUiFormButton
|
|
117
|
+
:disabled="isUpdating"
|
|
118
|
+
@click="handleDeleteClick"
|
|
119
|
+
>
|
|
120
|
+
Delete
|
|
121
|
+
</CwaUiFormButton>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</template>
|
|
126
|
+
</ResourceModalTabs>
|
|
127
|
+
</ResourceModal>
|
|
128
|
+
</template>
|
|
129
|
+
|
|
130
|
+
<script setup>
|
|
131
|
+
import { computed, onMounted, ref, toRef, watch } from "vue";
|
|
132
|
+
import ResourceModal from "#cwa/runtime/templates/components/core/admin/ResourceModal.vue";
|
|
133
|
+
import ResourceModalTabs, {} from "#cwa/runtime/templates/components/core/admin/ResourceModalTabs.vue";
|
|
134
|
+
import ModalInfo from "#cwa/runtime/templates/components/core/admin/form/ModalInfo.vue";
|
|
135
|
+
import ModalInput from "#cwa/runtime/templates/components/core/admin/form/ModalInput.vue";
|
|
136
|
+
import { useItemPage } from "#cwa/layer/pages/_cwa/composables/useItemPage";
|
|
137
|
+
import { componentNames } from "#components";
|
|
138
|
+
import { useCwa } from "#imports";
|
|
139
|
+
import ModalSelect from "#cwa/runtime/templates/components/core/admin/form/ModalSelect.vue";
|
|
140
|
+
import PageTypeSelect from "#cwa/runtime/templates/components/core/admin/form/PageTypeSelect.vue";
|
|
141
|
+
import RoutesTab from "#cwa/runtime/templates/components/core/admin/RoutesTab.vue";
|
|
142
|
+
const emit = defineEmits(["close", "reload"]);
|
|
143
|
+
const props = defineProps({
|
|
144
|
+
iri: { type: String, required: false },
|
|
145
|
+
hideViewLink: { type: Boolean, required: false }
|
|
146
|
+
});
|
|
147
|
+
const $cwa = useCwa();
|
|
148
|
+
const pageComponentNames = computed(() => {
|
|
149
|
+
return componentNames.filter((n) => n.startsWith("CwaPage"));
|
|
150
|
+
});
|
|
151
|
+
function cleanUiName(componentName) {
|
|
152
|
+
return componentName.replace(/^CwaPage/, "");
|
|
153
|
+
}
|
|
154
|
+
const pageComponentOptions = computed(() => {
|
|
155
|
+
const options = [];
|
|
156
|
+
for (const componentName of pageComponentNames.value) {
|
|
157
|
+
const cleanName = cleanUiName(componentName);
|
|
158
|
+
options.push({
|
|
159
|
+
label: $cwa.pagesConfig?.[cleanName]?.name || cleanName,
|
|
160
|
+
value: componentName
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
return options;
|
|
164
|
+
});
|
|
165
|
+
const pageStyleOptions = computed(() => {
|
|
166
|
+
if (!localResourceData.value?.uiComponent) {
|
|
167
|
+
return [];
|
|
168
|
+
}
|
|
169
|
+
const cleanName = cleanUiName(localResourceData.value?.uiComponent);
|
|
170
|
+
const configuredClasses = $cwa.pagesConfig?.[cleanName]?.classes;
|
|
171
|
+
if (!configuredClasses) {
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
const options = [
|
|
175
|
+
{
|
|
176
|
+
label: "Default",
|
|
177
|
+
value: null
|
|
178
|
+
}
|
|
179
|
+
];
|
|
180
|
+
for (const [label, value] of Object.entries(configuredClasses)) {
|
|
181
|
+
options.push({
|
|
182
|
+
label,
|
|
183
|
+
value
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
return options;
|
|
187
|
+
});
|
|
188
|
+
const layoutOptions = computed(() => {
|
|
189
|
+
if (!layouts.value) {
|
|
190
|
+
return [];
|
|
191
|
+
}
|
|
192
|
+
const options = [];
|
|
193
|
+
for (const layout of layouts.value) {
|
|
194
|
+
options.push({
|
|
195
|
+
label: layout.reference,
|
|
196
|
+
value: layout["@id"]
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return options;
|
|
200
|
+
});
|
|
201
|
+
const { isAdding, isLoading, isUpdating, localResourceData, resource, formatDate, deleteResource, saveResource, saveTitle, loadResource } = useItemPage({
|
|
202
|
+
createEndpoint: "/_/pages",
|
|
203
|
+
emit,
|
|
204
|
+
resourceType: "Page",
|
|
205
|
+
defaultResource: {
|
|
206
|
+
isTemplate: false,
|
|
207
|
+
uiComponent: pageComponentOptions.value[0].value
|
|
208
|
+
},
|
|
209
|
+
endpoint: toRef(props, "iri"),
|
|
210
|
+
routeHashAfterAdd: computed(() => localResourceData.value?.isTemplate ? "#data" : "#routes")
|
|
211
|
+
});
|
|
212
|
+
const tabs = computed(() => {
|
|
213
|
+
const t = [
|
|
214
|
+
{
|
|
215
|
+
label: "Details",
|
|
216
|
+
id: "details"
|
|
217
|
+
}
|
|
218
|
+
];
|
|
219
|
+
if (!isAdding.value) {
|
|
220
|
+
t.push({
|
|
221
|
+
label: "Routes",
|
|
222
|
+
id: "routes"
|
|
223
|
+
});
|
|
224
|
+
t.push({
|
|
225
|
+
label: "Info",
|
|
226
|
+
id: "info"
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
return t;
|
|
230
|
+
});
|
|
231
|
+
const currentRequestId = ref(0);
|
|
232
|
+
const layouts = ref();
|
|
233
|
+
function handleDeleteClick() {
|
|
234
|
+
deleteResource();
|
|
235
|
+
}
|
|
236
|
+
async function loadLayoutOptions() {
|
|
237
|
+
const thisRequestId = currentRequestId.value + 1;
|
|
238
|
+
currentRequestId.value = thisRequestId;
|
|
239
|
+
isLoading.value = true;
|
|
240
|
+
const { response } = $cwa.fetch({ path: "/_/layouts", noQuery: true });
|
|
241
|
+
const { _data: data } = await response;
|
|
242
|
+
if (thisRequestId === currentRequestId.value) {
|
|
243
|
+
data && (layouts.value = data["hydra:member"]);
|
|
244
|
+
isLoading.value = false;
|
|
245
|
+
}
|
|
246
|
+
if (!layouts.value?.length) {
|
|
247
|
+
emit("close");
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
if (isAdding.value && localResourceData.value && !localResourceData.value.layout) {
|
|
251
|
+
localResourceData.value.layout = layoutOptions.value[0].value;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
watch(() => localResourceData.value?.isTemplate, (isTemplate, oldIsTemplate) => {
|
|
255
|
+
!isAdding.value && isTemplate !== void 0 && oldIsTemplate !== void 0 && saveResource(false);
|
|
256
|
+
});
|
|
257
|
+
onMounted(() => {
|
|
258
|
+
loadLayoutOptions();
|
|
259
|
+
});
|
|
260
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
iri?: string;
|
|
3
|
+
hideViewLink?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
close: () => any;
|
|
7
|
+
reload: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onClose?: (() => any) | undefined;
|
|
10
|
+
onReload?: (() => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|