@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,187 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ResourceModal
|
|
3
|
+
v-if="localResourceData"
|
|
4
|
+
v-model="localResourceData.title"
|
|
5
|
+
title-placeholder="No Title"
|
|
6
|
+
:is-loading="isLoading"
|
|
7
|
+
:border-color-class="resource?.route ? 'cwa:border-b-green' : 'cwa:border-b-orange'"
|
|
8
|
+
@close="$emit('close')"
|
|
9
|
+
@save="saveTitle"
|
|
10
|
+
>
|
|
11
|
+
<template
|
|
12
|
+
v-if="!hideViewLink && !isAdding"
|
|
13
|
+
#icons
|
|
14
|
+
>
|
|
15
|
+
<div>
|
|
16
|
+
<NuxtLink :to="localResourceData['@id']">
|
|
17
|
+
<CwaUiIconEyeIcon class="cwa:w-9" />
|
|
18
|
+
</NuxtLink>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
<ResourceModalTabs :tabs="tabs">
|
|
22
|
+
<template #details>
|
|
23
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
24
|
+
<div>
|
|
25
|
+
<ModalInput
|
|
26
|
+
v-model="localResourceData.metaDescription"
|
|
27
|
+
label="SEO Meta Description"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
<div>
|
|
31
|
+
<ModalSelect
|
|
32
|
+
v-model="localResourceData.page"
|
|
33
|
+
label="Dynamic Page"
|
|
34
|
+
:options="pageOptions"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="cwa:flex cwa:justify-end cwa:pt-2 cwa:gap-x-2">
|
|
38
|
+
<div>
|
|
39
|
+
<CwaUiFormButton
|
|
40
|
+
color="dark"
|
|
41
|
+
:disabled="isUpdating"
|
|
42
|
+
@click="saveResource(true)"
|
|
43
|
+
>
|
|
44
|
+
{{ isAdding ? "Add" : "Save" }} & Close
|
|
45
|
+
</CwaUiFormButton>
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<CwaUiFormButton
|
|
49
|
+
color="blue"
|
|
50
|
+
:disabled="isUpdating"
|
|
51
|
+
@click="() => saveResource(false)"
|
|
52
|
+
>
|
|
53
|
+
{{ isAdding ? "Add Now" : "Save" }}
|
|
54
|
+
</CwaUiFormButton>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
<template #routes>
|
|
60
|
+
<RoutesTab
|
|
61
|
+
v-if="resource && resource.hasOwnProperty('@id')"
|
|
62
|
+
:page-resource="resource"
|
|
63
|
+
@reload="loadResource"
|
|
64
|
+
/>
|
|
65
|
+
</template>
|
|
66
|
+
<template #info>
|
|
67
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
68
|
+
<div>
|
|
69
|
+
<ModalInfo
|
|
70
|
+
label="Created"
|
|
71
|
+
:content="formatDate(localResourceData.createdAt)"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
<div>
|
|
75
|
+
<ModalInfo
|
|
76
|
+
label="Updated"
|
|
77
|
+
:content="formatDate(localResourceData.updatedAt)"
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
80
|
+
<div>
|
|
81
|
+
<ModalInfo
|
|
82
|
+
label="ID"
|
|
83
|
+
:content="localResourceData['@id']"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="cwa:flex cwa:justify-start cwa:pt-6">
|
|
87
|
+
<div>
|
|
88
|
+
<CwaUiFormButton
|
|
89
|
+
:disabled="isUpdating"
|
|
90
|
+
@click="handleDeleteClick"
|
|
91
|
+
>
|
|
92
|
+
Delete
|
|
93
|
+
</CwaUiFormButton>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
</ResourceModalTabs>
|
|
99
|
+
</ResourceModal>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<script setup>
|
|
103
|
+
import { computed, onMounted, ref, toRef, watch, watchEffect } from "vue";
|
|
104
|
+
import ResourceModal from "#cwa/runtime/templates/components/core/admin/ResourceModal.vue";
|
|
105
|
+
import ResourceModalTabs, {} from "#cwa/runtime/templates/components/core/admin/ResourceModalTabs.vue";
|
|
106
|
+
import ModalInfo from "#cwa/runtime/templates/components/core/admin/form/ModalInfo.vue";
|
|
107
|
+
import ModalInput from "#cwa/runtime/templates/components/core/admin/form/ModalInput.vue";
|
|
108
|
+
import { useItemPage } from "#cwa/layer/pages/_cwa/composables/useItemPage";
|
|
109
|
+
import ModalSelect from "#cwa/runtime/templates/components/core/admin/form/ModalSelect.vue";
|
|
110
|
+
import RoutesTab from "#cwa/runtime/templates/components/core/admin/RoutesTab.vue";
|
|
111
|
+
import { useDynamicPageLoader } from "#cwa/layer/pages/_cwa/composables/useDynamicPageLoader";
|
|
112
|
+
import { useDataList } from "#cwa/layer/pages/_cwa/composables/useDataList";
|
|
113
|
+
import { useCwa } from "#imports";
|
|
114
|
+
const $cwa = useCwa();
|
|
115
|
+
const emit = defineEmits(["close", "reload"]);
|
|
116
|
+
const props = defineProps({
|
|
117
|
+
iri: { type: String, required: false },
|
|
118
|
+
hideViewLink: { type: Boolean, required: false },
|
|
119
|
+
resourceType: { type: String, required: true }
|
|
120
|
+
});
|
|
121
|
+
const iriRef = toRef(props, "iri");
|
|
122
|
+
const createEndpoint = ref("");
|
|
123
|
+
const { isAdding, isLoading, isUpdating, localResourceData, resource, formatDate, deleteResource, saveResource, saveTitle, loadResource } = useItemPage({
|
|
124
|
+
createEndpoint,
|
|
125
|
+
emit,
|
|
126
|
+
resourceType: props.resourceType,
|
|
127
|
+
defaultResource: {},
|
|
128
|
+
endpoint: iriRef,
|
|
129
|
+
routeHashAfterAdd: computed(() => "#routes")
|
|
130
|
+
});
|
|
131
|
+
function handleDeleteClick() {
|
|
132
|
+
deleteResource();
|
|
133
|
+
}
|
|
134
|
+
const tabs = computed(() => {
|
|
135
|
+
const t = [
|
|
136
|
+
{
|
|
137
|
+
label: "Details",
|
|
138
|
+
id: "details"
|
|
139
|
+
}
|
|
140
|
+
];
|
|
141
|
+
if (!isAdding.value) {
|
|
142
|
+
t.push({
|
|
143
|
+
label: "Routes",
|
|
144
|
+
id: "routes"
|
|
145
|
+
});
|
|
146
|
+
t.push({
|
|
147
|
+
label: "Info",
|
|
148
|
+
id: "info"
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
return t;
|
|
152
|
+
});
|
|
153
|
+
const pageOptions = computed(() => {
|
|
154
|
+
if (!dynamicPages.value) {
|
|
155
|
+
return [];
|
|
156
|
+
}
|
|
157
|
+
const options = [];
|
|
158
|
+
for (const page of dynamicPages.value) {
|
|
159
|
+
options.push({
|
|
160
|
+
label: page.reference,
|
|
161
|
+
value: page["@id"]
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
return options;
|
|
165
|
+
});
|
|
166
|
+
const { dynamicPages, loadDynamicPageOptions } = useDynamicPageLoader();
|
|
167
|
+
const { fqcnToEntrypointKey } = useDataList();
|
|
168
|
+
watch(() => localResourceData.value?.isTemplate, (isTemplate, oldIsTemplate) => {
|
|
169
|
+
!isAdding.value && isTemplate !== void 0 && oldIsTemplate !== void 0 && saveResource(false);
|
|
170
|
+
});
|
|
171
|
+
watchEffect(async () => {
|
|
172
|
+
const docs = await $cwa.getApiDocumentation();
|
|
173
|
+
if (props.resourceType) {
|
|
174
|
+
createEndpoint.value = docs?.entrypoint?.[fqcnToEntrypointKey(props.resourceType) || ""] || "";
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
onMounted(async () => {
|
|
178
|
+
await loadDynamicPageOptions();
|
|
179
|
+
if (!dynamicPages.value?.length) {
|
|
180
|
+
emit("close");
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (isAdding.value && localResourceData.value && !localResourceData.value.page) {
|
|
184
|
+
localResourceData.value.page = pageOptions.value[0].value;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
iri?: string;
|
|
3
|
+
hideViewLink?: boolean;
|
|
4
|
+
resourceType: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
close: () => any;
|
|
8
|
+
reload: () => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onClose?: (() => any) | undefined;
|
|
11
|
+
onReload?: (() => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cwa:text-light cwa:w-full cwa:bg-stone-800 cwa:max-w-4xl cwa:max-h-full cwa:min-h-96 cwa:flex cwa:flex-col">
|
|
3
|
+
<template v-if="isLoading">
|
|
4
|
+
<Spinner
|
|
5
|
+
class="cwa:absolute cwa:top-1/2 cwa:left-1/2 cwa:-translate-x-1/2 cwa:-translate-y-1/2"
|
|
6
|
+
:show="true"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
<template v-else>
|
|
10
|
+
<div
|
|
11
|
+
class="cwa:relative cwa:bg-stone-900/40 cwa:border-b-2"
|
|
12
|
+
:class="[borderColorClass]"
|
|
13
|
+
>
|
|
14
|
+
<div class="cwa:p-3 cwa:flex cwa:justify-end cwa:text-stone-400 cwa:gap-x-4 cwa:items-center">
|
|
15
|
+
<slot name="icons" />
|
|
16
|
+
<button
|
|
17
|
+
class="cwa:cursor-pointer"
|
|
18
|
+
@click="closeModal"
|
|
19
|
+
>
|
|
20
|
+
<CwaUiIconXMarkIcon class="cwa:h-10" />
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="cwa:p-4 cwa:flex cwa:justify-center">
|
|
24
|
+
<div class="cwa:grow cwa:max-w-xl cwa:flex cwa:items-center cwa:gap-x-6">
|
|
25
|
+
<div class="cwa:grow cwa:flex cwa:items-center cwa:gap-x-2 cwa:min-w-0">
|
|
26
|
+
<div class="cwa:max-w-[calc(100%-1.3em)]">
|
|
27
|
+
<input
|
|
28
|
+
v-if="isEditingTitle"
|
|
29
|
+
ref="referenceInput"
|
|
30
|
+
v-model="titleModel"
|
|
31
|
+
v-auto-width="{ comfortZone: '.5rem', minWidth: '270px' }"
|
|
32
|
+
class="cwa:dark-blur cwa:text-4xl cwa:py-1 cwa:px-2 cwa:max-w-full cwa:-ml-2 cwa:placeholder-light/20"
|
|
33
|
+
placeholder="Enter Reference"
|
|
34
|
+
>
|
|
35
|
+
<h2
|
|
36
|
+
v-else
|
|
37
|
+
class="cwa:text-4xl cwa:truncate cwa:py-1 cwa:pr-3 cwa:border cwa:border-transparent"
|
|
38
|
+
:class="[titleModel ? '' : 'cwa:text-light/20']"
|
|
39
|
+
@click="triggerEditTitle"
|
|
40
|
+
>
|
|
41
|
+
{{ titleModel || "[" + titlePlaceholder + "]" }}
|
|
42
|
+
</h2>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="cwa:shrink-0 cwa:w-[1.3em] cwa:cursor-pointer">
|
|
45
|
+
<CwaUiIconTickIcon
|
|
46
|
+
v-if="isEditingTitle"
|
|
47
|
+
class="cwa:w-full"
|
|
48
|
+
@click="saveTitle()"
|
|
49
|
+
/>
|
|
50
|
+
<CwaUiIconPenIcon
|
|
51
|
+
v-else
|
|
52
|
+
class="cwa:w-full"
|
|
53
|
+
@click="triggerEditTitle"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<slot name="title" />
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<ResourceLoadingIndicator class="cwa:absolute cwa:top-full cwa:left-0 cwa:z-10" />
|
|
61
|
+
</div>
|
|
62
|
+
<div class="cwa:grow cwa:px-4 cwa:pt-4 cwa:pb-10 cwa:flex cwa:justify-center cwa:min-h-0">
|
|
63
|
+
<div class="cwa:w-full cwa:max-w-xl cwa:overflow-auto">
|
|
64
|
+
<slot />
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script setup>
|
|
72
|
+
import { nextTick, ref, useTemplateRef } from "vue";
|
|
73
|
+
import { directive as vAutoWidth } from "vue-input-autowidth";
|
|
74
|
+
import ResourceLoadingIndicator from "#cwa/runtime/templates/components/main/admin/_common/ResourceLoadingIndicator.vue";
|
|
75
|
+
import Spinner from "#cwa/runtime/templates/components/utils/Spinner.vue";
|
|
76
|
+
const referenceInput = useTemplateRef("referenceInput");
|
|
77
|
+
const titleModel = defineModel();
|
|
78
|
+
const emit = defineEmits(["close", "save"]);
|
|
79
|
+
defineProps({
|
|
80
|
+
isLoading: { type: Boolean, required: false },
|
|
81
|
+
titlePlaceholder: { type: String, required: false, default: "No Reference" },
|
|
82
|
+
borderColorClass: { type: String, required: false, default: "cwa:border-b-stone-700" }
|
|
83
|
+
});
|
|
84
|
+
const isEditingTitle = ref(false);
|
|
85
|
+
function closeModal() {
|
|
86
|
+
emit("close");
|
|
87
|
+
}
|
|
88
|
+
function saveTitle() {
|
|
89
|
+
emit("save");
|
|
90
|
+
isEditingTitle.value = false;
|
|
91
|
+
}
|
|
92
|
+
async function triggerEditTitle() {
|
|
93
|
+
isEditingTitle.value = true;
|
|
94
|
+
await nextTick();
|
|
95
|
+
if (referenceInput.value) {
|
|
96
|
+
referenceInput.value.focus();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</script>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isLoading?: boolean;
|
|
3
|
+
titlePlaceholder?: string;
|
|
4
|
+
borderColorClass?: 'cwa:border-b-stone-700' | 'cwa:border-b-green' | 'cwa:border-b-orange' | 'cwa:border-b-yellow' | 'cwa:border-b-blue-600';
|
|
5
|
+
};
|
|
6
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
7
|
+
modelValue?: any;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_4: {}, __VLS_26: {}, __VLS_31: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
icons?: (props: typeof __VLS_4) => any;
|
|
12
|
+
} & {
|
|
13
|
+
title?: (props: typeof __VLS_26) => any;
|
|
14
|
+
} & {
|
|
15
|
+
default?: (props: typeof __VLS_31) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {
|
|
18
|
+
titlePlaceholder: string;
|
|
19
|
+
borderColorClass: "cwa:border-b-stone-700" | "cwa:border-b-green" | "cwa:border-b-orange" | "cwa:border-b-yellow" | "cwa:border-b-blue-600";
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ResourceModalOverlayTemplate :show="!!route.params.iri">
|
|
3
|
+
<NuxtPage
|
|
4
|
+
v-if="route.params.iri"
|
|
5
|
+
@click.stop
|
|
6
|
+
@close="hideModal"
|
|
7
|
+
@reload="$emit('reload')"
|
|
8
|
+
/>
|
|
9
|
+
</ResourceModalOverlayTemplate>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { useRoute, useRouter } from "vue-router";
|
|
14
|
+
import ResourceModalOverlayTemplate from "#cwa/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.vue";
|
|
15
|
+
defineEmits(["reload"]);
|
|
16
|
+
const route = useRoute();
|
|
17
|
+
const router = useRouter();
|
|
18
|
+
function hideModal() {
|
|
19
|
+
if (!route.name) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
router.push({
|
|
23
|
+
name: route.name.toString().replace("-iri", ""),
|
|
24
|
+
query: route.query
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
reload: () => any;
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onReload?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Transition
|
|
3
|
+
enter-from-class="cwa:transform cwa:opacity-0"
|
|
4
|
+
enter-active-class="cwa:duration-200"
|
|
5
|
+
enter-to-class="cwa:opacity-100"
|
|
6
|
+
leave-from-class="cwa:opacity-100"
|
|
7
|
+
leave-active-class="cwa:duration-200"
|
|
8
|
+
leave-to-class="cwa:transform cwa:opacity-0"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
v-if="show"
|
|
12
|
+
class="cwa:fixed cwa:z-dialog cwa:bg-dark/80 cwa:backdrop-blur-sm cwa:top-0 cwa:left-0 cwa:w-full cwa:h-full cwa:px-6 cwa:py-10 cwa:text-light cwa:flex cwa:justify-center cwa:items-center"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</div>
|
|
16
|
+
</Transition>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
defineProps({
|
|
21
|
+
show: { type: Boolean, required: true }
|
|
22
|
+
});
|
|
23
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
show: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_5: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_5) => any;
|
|
7
|
+
};
|
|
8
|
+
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>;
|
|
9
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
10
|
+
export default _default;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cwa:flex cwa:flex-col cwa:h-full">
|
|
3
|
+
<div
|
|
4
|
+
v-if="tabs.length > 1"
|
|
5
|
+
class="cwa:mb-4"
|
|
6
|
+
>
|
|
7
|
+
<div class="cwa:flex cwa:gap-x-1 cwa:overflow-hidden cwa:items-center cwa:text-lg">
|
|
8
|
+
<button
|
|
9
|
+
v-for="(tab, index) of tabs"
|
|
10
|
+
:id="tab.id"
|
|
11
|
+
:key="`tab-button-${tab.id}`"
|
|
12
|
+
class="cwa:py-1.5 cwa:px-5 cwa:transition cwa:rounded cwa:cursor-pointer"
|
|
13
|
+
:class="[index === selectedTabIndex ? 'cwa:text-stone-100 cwa:bg-stone-700/80' : 'cwa:text-stone-400 cwa:hover:text-stone-300']"
|
|
14
|
+
@click="selectTab(index)"
|
|
15
|
+
>
|
|
16
|
+
{{ tab.label }}
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="cwa:grow cwa:min-h-0 cwa:overflow-auto">
|
|
21
|
+
<slot
|
|
22
|
+
v-if="tabs[selectedTabIndex]?.id"
|
|
23
|
+
:name="tabs[selectedTabIndex]?.id"
|
|
24
|
+
>
|
|
25
|
+
No tab content provided for tab index `{{ selectedTabIndex }}`- ID: `{{ tabs[selectedTabIndex].id }}`
|
|
26
|
+
</slot>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup>
|
|
32
|
+
import { computed, ref, watch } from "vue";
|
|
33
|
+
import { useRoute, useRouter } from "#imports";
|
|
34
|
+
const router = useRouter();
|
|
35
|
+
const route = useRoute();
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
tabs: { type: Array, required: true }
|
|
38
|
+
});
|
|
39
|
+
function selectTab(index) {
|
|
40
|
+
selectedTabIndex.value = index;
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
router.replace({ ...route, hash: `#${selectedTabId.value}` });
|
|
43
|
+
}, 100);
|
|
44
|
+
}
|
|
45
|
+
function getIndexFromHash() {
|
|
46
|
+
const currentHash = route.hash?.substring(1, route.hash.length);
|
|
47
|
+
if (!currentHash) {
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
const initialHashValue = route.hash.substring(1, route.hash.length);
|
|
51
|
+
return getIndexFromId(initialHashValue);
|
|
52
|
+
}
|
|
53
|
+
function getIndexFromId(checkId) {
|
|
54
|
+
const index = props.tabs.findIndex(({ id }) => id === checkId);
|
|
55
|
+
return index !== -1 ? index : 0;
|
|
56
|
+
}
|
|
57
|
+
const selectedTabIndex = ref(getIndexFromHash());
|
|
58
|
+
const selectedTabId = computed(() => {
|
|
59
|
+
return props.tabs[selectedTabIndex.value]?.id;
|
|
60
|
+
});
|
|
61
|
+
const indexAndId = computed(() => {
|
|
62
|
+
return {
|
|
63
|
+
index: selectedTabIndex.value,
|
|
64
|
+
id: selectedTabId.value
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
watch(indexAndId, (newValues, oldValues) => {
|
|
68
|
+
if (oldValues.id === void 0) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const indexIsSame = oldValues.index === newValues.index;
|
|
72
|
+
const idHasChanged = oldValues.id !== newValues.id;
|
|
73
|
+
if (indexIsSame && idHasChanged) {
|
|
74
|
+
selectedTabIndex.value = getIndexFromId(oldValues.id);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ResourceModalTab = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
tabs: ResourceModalTab[];
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_2: any, __VLS_3: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
11
|
+
};
|
|
12
|
+
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>;
|
|
13
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cwa:flex cwa:border-b cwa:border-b-stone-700 cwa:py-6 cwa:gap-x-4 cwa:items-center">
|
|
3
|
+
<div class="cwa:grow cwa:flex cwa:flex-col cwa:gap-y-1 cwa:min-w-0">
|
|
4
|
+
<span class="cwa:text-xl cwa:truncate">{{ data.path }}</span>
|
|
5
|
+
<span
|
|
6
|
+
v-if="relatedResource"
|
|
7
|
+
class="cwa:text-stone-400"
|
|
8
|
+
>
|
|
9
|
+
<span class="cwa:inline-flex cwa:max-w-full cwa:bg-dark cwa:p-2 cwa:font-bold cwa:gap-x-2 cwa:items-center">
|
|
10
|
+
<IconRoutes
|
|
11
|
+
v-if="resourceType === 'Route'"
|
|
12
|
+
class="cwa:h-5"
|
|
13
|
+
/>
|
|
14
|
+
<IconData
|
|
15
|
+
v-else-if="resourceType === 'PageData'"
|
|
16
|
+
class="cwa:h-5"
|
|
17
|
+
/>
|
|
18
|
+
<IconPages
|
|
19
|
+
v-else-if="resourceType === 'Page'"
|
|
20
|
+
class="cwa:h-5"
|
|
21
|
+
/>
|
|
22
|
+
<span class="cwa:truncate">{{ relatedResource || "Unknown" }}</span>
|
|
23
|
+
</span>
|
|
24
|
+
</span>
|
|
25
|
+
<span v-else>
|
|
26
|
+
<span class="cwa:inline-flex cwa:truncate cwa:bg-magenta/60 cwa:text-white cwa:font-bold cwa:py-1 cwa:px-3 cwa:border cwa:border-magenta cwa:rounded">
|
|
27
|
+
This route has no association and should be deleted
|
|
28
|
+
</span>
|
|
29
|
+
</span>
|
|
30
|
+
</div>
|
|
31
|
+
<div>
|
|
32
|
+
<CwaUiFormButton
|
|
33
|
+
v-if="relatedResource"
|
|
34
|
+
:to="linkTo"
|
|
35
|
+
>
|
|
36
|
+
<IconPages
|
|
37
|
+
v-if="data.page"
|
|
38
|
+
class="cwa:h-6"
|
|
39
|
+
/>
|
|
40
|
+
<IconData
|
|
41
|
+
v-else
|
|
42
|
+
class="cwa:h-6"
|
|
43
|
+
/>
|
|
44
|
+
<span class="cwa:sr-only">View</span>
|
|
45
|
+
</CwaUiFormButton>
|
|
46
|
+
<CwaUiFormButton
|
|
47
|
+
v-else-if="!data.redirect"
|
|
48
|
+
color="error"
|
|
49
|
+
@click="$emit('delete', data['@id'])"
|
|
50
|
+
>
|
|
51
|
+
<CwaUiIconBinIcon class="cwa:w-4 cwa:m-1" />
|
|
52
|
+
<span class="cwa:sr-only">Delete</span>
|
|
53
|
+
</CwaUiFormButton>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script setup>
|
|
59
|
+
import { computed } from "vue";
|
|
60
|
+
import IconPages from "#cwa/runtime/templates/components/core/assets/IconPages.vue";
|
|
61
|
+
import IconRoutes from "#cwa/runtime/templates/components/core/assets/IconRoutes.vue";
|
|
62
|
+
import IconData from "#cwa/runtime/templates/components/core/assets/IconData.vue";
|
|
63
|
+
import { useDataList } from "#cwa/layer/pages/_cwa/composables/useDataList";
|
|
64
|
+
const { fqcnToEntrypointKey } = useDataList();
|
|
65
|
+
const props = defineProps({
|
|
66
|
+
data: { type: Object, required: true },
|
|
67
|
+
linkFn: { type: Function, required: true },
|
|
68
|
+
associatedResources: { type: Object, required: false }
|
|
69
|
+
});
|
|
70
|
+
defineEmits(["delete"]);
|
|
71
|
+
const linkTo = computed(() => {
|
|
72
|
+
if (!relatedResource.value) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (props.associatedResources?.pageData) {
|
|
76
|
+
if (!props.data.pageData) {
|
|
77
|
+
return "#";
|
|
78
|
+
}
|
|
79
|
+
return props.linkFn(props.data.pageData, "_cwa-data-type-iri", "#routes", { type: fqcnToEntrypointKey(props.associatedResources?.pageDataType || "") || "" });
|
|
80
|
+
}
|
|
81
|
+
if (!props.data.page) {
|
|
82
|
+
return "#";
|
|
83
|
+
}
|
|
84
|
+
return props.linkFn(props.data.page, "_cwa-pages", "#routes");
|
|
85
|
+
});
|
|
86
|
+
const resourceType = computed(() => {
|
|
87
|
+
const assocResource = props.associatedResources;
|
|
88
|
+
if (!assocResource) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (props.associatedResources?.redirect) {
|
|
92
|
+
return "Route";
|
|
93
|
+
}
|
|
94
|
+
if (props.associatedResources?.page) {
|
|
95
|
+
return "Page";
|
|
96
|
+
}
|
|
97
|
+
return "PageData";
|
|
98
|
+
});
|
|
99
|
+
const relatedResource = computed(() => {
|
|
100
|
+
return props.associatedResources?.redirect || props.associatedResources?.pageData || props.associatedResources?.page;
|
|
101
|
+
});
|
|
102
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
import type { CwaResource } from '#cwa/runtime/resources/resource-utils';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
data: CwaResource;
|
|
5
|
+
linkFn: (iri: string, routeName?: string, hash?: string, params?: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
}) => RouteLocationRaw;
|
|
8
|
+
associatedResources?: {
|
|
9
|
+
redirect?: string;
|
|
10
|
+
page?: string;
|
|
11
|
+
pageData?: string;
|
|
12
|
+
pageDataType?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
delete: (args_0: string) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onDelete?: ((args_0: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<ul class="relative cwa:flex cwa:flex-col cwa:gap-y-0.5 cwa:pl-3">
|
|
4
|
+
<li
|
|
5
|
+
v-for="(redirectRoute, index) of redirects"
|
|
6
|
+
:key="redirectRoute['@id']"
|
|
7
|
+
class="relative"
|
|
8
|
+
>
|
|
9
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-0.5">
|
|
10
|
+
<div class="cwa:flex cwa:items-center cwa:before:absolute cwa:before:w-3 cwa:before:border-b cwa:before:top-1/2 cwa:before:right-full cwa:before:border-stone-400 cwa:hover:bg-stone-800 cwa:px-2 cwa:py-1.5">
|
|
11
|
+
<div class="cwa:grow cwa:min-w-0 cwa:truncate">
|
|
12
|
+
{{ redirectRoute.path }}
|
|
13
|
+
</div>
|
|
14
|
+
<div>
|
|
15
|
+
<button
|
|
16
|
+
class="cwa:opacity-60 cwa:hover:opacity-80 cwa:translate-y-0.5 cwa:cursor-pointer"
|
|
17
|
+
@click="deleteRoute(redirectRoute['@id'])"
|
|
18
|
+
>
|
|
19
|
+
<CwaUiIconBinIcon class="cwa:w-3.5" />
|
|
20
|
+
</button>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="cwa:absolute cwa:top-0 cwa:-left-3 cwa:h-1/2 cwa:border-l cwa:border-stone-400" />
|
|
23
|
+
<div
|
|
24
|
+
v-if="index < redirects.length - 1"
|
|
25
|
+
class="cwa:absolute cwa:top-1/2 cwa:-left-3 cwa:h-[calc(50%+.75rem)] cwa:border-l cwa:border-stone-400"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
<RouteRedirectsTree
|
|
29
|
+
v-if="redirectRoute.redirectedFrom"
|
|
30
|
+
:redirects="redirectRoute.redirectedFrom"
|
|
31
|
+
@reload="$emit('reload')"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</li>
|
|
35
|
+
</ul>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup>
|
|
40
|
+
import { useCwa } from "#imports";
|
|
41
|
+
const $cwa = useCwa();
|
|
42
|
+
const emit = defineEmits(["reload"]);
|
|
43
|
+
defineProps({
|
|
44
|
+
redirects: { type: Array, required: true }
|
|
45
|
+
});
|
|
46
|
+
async function deleteRoute(iri) {
|
|
47
|
+
await $cwa.resourcesManager.deleteResource({
|
|
48
|
+
endpoint: iri
|
|
49
|
+
});
|
|
50
|
+
emit("reload");
|
|
51
|
+
}
|
|
52
|
+
</script>
|