@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,10 @@
|
|
|
1
|
+
import type { CwaResource } from '#cwa/runtime/resources/resource-utils';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
redirects: CwaResource[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
reload: () => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onReload?: (() => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="currentScreen === 'view'">
|
|
4
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-6">
|
|
5
|
+
<ModalInfo
|
|
6
|
+
label="Route"
|
|
7
|
+
:content="isLoadingRoute ? void 0 : resource?.path"
|
|
8
|
+
>
|
|
9
|
+
<Spinner
|
|
10
|
+
v-if="isLoadingRoute"
|
|
11
|
+
:show="true"
|
|
12
|
+
/>
|
|
13
|
+
<CwaUiFormButton
|
|
14
|
+
v-else
|
|
15
|
+
:color="resource?.path ? 'dark' : 'blue'"
|
|
16
|
+
@click="goToManageRoute"
|
|
17
|
+
>
|
|
18
|
+
{{ resource?.path ? "Edit" : "Create New Route" }}
|
|
19
|
+
</CwaUiFormButton>
|
|
20
|
+
</ModalInfo>
|
|
21
|
+
<div class="cwa:dark-blur cwa:p-4 cwa:flex cwa:flex-col cwa:gap-y-2.5 cwa:border cwa:rounded-xl cwa:border-stone-600">
|
|
22
|
+
<div class="cwa:flex cwa:gap-x-4 cwa:items-center">
|
|
23
|
+
<h2 class="cwa:text-stone-400 cwa:text-2xl">
|
|
24
|
+
Redirects
|
|
25
|
+
</h2>
|
|
26
|
+
<div>
|
|
27
|
+
<button
|
|
28
|
+
class="cwa:text-white cwa:bg-blue-600/90 cwa:hover:bg-blue-600 cwa:border-transparent cwa:p-2.5 cwa:cursor-pointer"
|
|
29
|
+
@click="addRedirect"
|
|
30
|
+
>
|
|
31
|
+
<CwaUiIconPlusIcon class="cwa:w-4 cwa:h-4" />
|
|
32
|
+
<span class="cwa:sr-only">Add</span>
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div>
|
|
37
|
+
<Spinner
|
|
38
|
+
v-if="isLoadingRoute"
|
|
39
|
+
:show="true"
|
|
40
|
+
/>
|
|
41
|
+
<RouteRedirectsTree
|
|
42
|
+
v-else-if="resource?.redirectedFrom?.length"
|
|
43
|
+
:redirects="resource.redirectedFrom"
|
|
44
|
+
@reload="loadResource"
|
|
45
|
+
/>
|
|
46
|
+
<p
|
|
47
|
+
v-else
|
|
48
|
+
class="cwa:text-lg cwa:font-bold cwa:text-stone-400 cwa:mb-2 cwa:mt-4"
|
|
49
|
+
>
|
|
50
|
+
You do not have any redirects
|
|
51
|
+
</p>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div v-else-if="currentScreen === 'manage-route' && localResourceData">
|
|
57
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-8">
|
|
58
|
+
<div>
|
|
59
|
+
<button
|
|
60
|
+
class="cwa:cursor-pointer"
|
|
61
|
+
@click="goBackToViewing"
|
|
62
|
+
>
|
|
63
|
+
< Back to Routes
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-4">
|
|
67
|
+
<div>
|
|
68
|
+
<ModalInput
|
|
69
|
+
v-model="localResourceData.path"
|
|
70
|
+
label="Route path"
|
|
71
|
+
:placeholder="recommendedRoute"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
<div>
|
|
75
|
+
<p class="cwa:text-sm cwa:text-stone-300">
|
|
76
|
+
When updating, we will automatically create a new redirect from the old path.
|
|
77
|
+
</p>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="cwa:flex cwa:justify-between">
|
|
80
|
+
<div>
|
|
81
|
+
<CwaUiFormButton
|
|
82
|
+
color="blue"
|
|
83
|
+
:disabled="disableButtons"
|
|
84
|
+
@click="saveRoute"
|
|
85
|
+
>
|
|
86
|
+
Save Route
|
|
87
|
+
</CwaUiFormButton>
|
|
88
|
+
</div>
|
|
89
|
+
<div v-if="!!routeIri">
|
|
90
|
+
<CwaUiFormButton
|
|
91
|
+
color="grey"
|
|
92
|
+
:disabled="disableButtons"
|
|
93
|
+
@click="deleteRoute"
|
|
94
|
+
>
|
|
95
|
+
Delete Route
|
|
96
|
+
</CwaUiFormButton>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<template v-if="recommendedRoute !== resource?.path">
|
|
101
|
+
<div class="cwa:w-full cwa:border-b cwa:border-b-stone-600" />
|
|
102
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-4">
|
|
103
|
+
<ModalInfo
|
|
104
|
+
label="Recommended route path"
|
|
105
|
+
:content="recommendedRoute"
|
|
106
|
+
/>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="cwa:text-sm cwa:text-stone-300 cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
109
|
+
<p>This is based on your page title <b>`{{ pageResource.title }}`</b>.</p>
|
|
110
|
+
<p>It is optimal for search engines to increase the relevance of the page to the title provided. Relevance of page content is important too.</p>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="cwa:flex cwa:justify-start">
|
|
113
|
+
<CwaUiFormButton
|
|
114
|
+
color="blue"
|
|
115
|
+
:disabled="disableButtons"
|
|
116
|
+
@click="generateRoute"
|
|
117
|
+
>
|
|
118
|
+
Use Recommended Route
|
|
119
|
+
</CwaUiFormButton>
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div v-else-if="currentScreen === 'create-redirect'">
|
|
125
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-6">
|
|
126
|
+
<div>
|
|
127
|
+
<button
|
|
128
|
+
class="cwa:cursor-pointer"
|
|
129
|
+
@click="goBackToViewing"
|
|
130
|
+
>
|
|
131
|
+
< Back to Routes
|
|
132
|
+
</button>
|
|
133
|
+
</div>
|
|
134
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-4">
|
|
135
|
+
<div>
|
|
136
|
+
<ModalInput
|
|
137
|
+
v-model="newRedirectPath"
|
|
138
|
+
label="Redirect from path"
|
|
139
|
+
placeholder="/some-path"
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="cwa:text-sm cwa:text-stone-300 cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
143
|
+
<p v-if="newRedirectPath">
|
|
144
|
+
A user visiting <b class="cwa:bg-dark cwa:p-2">{{ finalPath }}</b> will be redirected to <b class="cwa:bg-dark cwa:p-2">{{ resource?.path }}</b>
|
|
145
|
+
</p>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<div class="cwa:flex cwa:justify-start">
|
|
149
|
+
<CwaUiFormButton
|
|
150
|
+
color="blue"
|
|
151
|
+
:disabled="disableButtons"
|
|
152
|
+
@click="createRedirect"
|
|
153
|
+
>
|
|
154
|
+
Create Redirect
|
|
155
|
+
</CwaUiFormButton>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</template>
|
|
161
|
+
|
|
162
|
+
<script setup>
|
|
163
|
+
import { computed, ref, toRef, watch } from "vue";
|
|
164
|
+
import slugify from "slugify";
|
|
165
|
+
import ModalInfo from "#cwa/runtime/templates/components/core/admin/form/ModalInfo.vue";
|
|
166
|
+
import Spinner from "#cwa/runtime/templates/components/utils/Spinner.vue";
|
|
167
|
+
import { useItemPage } from "#cwa/layer/pages/_cwa/composables/useItemPage";
|
|
168
|
+
import ModalInput from "#cwa/runtime/templates/components/core/admin/form/ModalInput.vue";
|
|
169
|
+
import { useCwa } from "#imports";
|
|
170
|
+
import RouteRedirectsTree from "#cwa/runtime/templates/components/core/admin/RouteRedirectsTree.vue";
|
|
171
|
+
const props = defineProps({
|
|
172
|
+
pageResource: { type: Object, required: true }
|
|
173
|
+
});
|
|
174
|
+
const emit = defineEmits(["close", "reload"]);
|
|
175
|
+
const $cwa = useCwa();
|
|
176
|
+
const pageResource = toRef(props, "pageResource");
|
|
177
|
+
const routeIri = computed(() => pageResource.value?.route);
|
|
178
|
+
const endpoint = computed(() => routeIri.value ? `${routeIri.value}/redirects` : "add");
|
|
179
|
+
const disableButtons = computed(() => submitting.value || isUpdating.value);
|
|
180
|
+
const submitting = ref(false);
|
|
181
|
+
const newRedirectPath = ref();
|
|
182
|
+
const currentScreen = ref("view");
|
|
183
|
+
const recommendedRoute = computed(() => {
|
|
184
|
+
if (!props.pageResource.title) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
return "/" + slugify(props.pageResource.title.toLowerCase());
|
|
188
|
+
});
|
|
189
|
+
function goToManageRoute() {
|
|
190
|
+
currentScreen.value = "manage-route";
|
|
191
|
+
}
|
|
192
|
+
function goBackToViewing() {
|
|
193
|
+
newRedirectPath.value = "";
|
|
194
|
+
currentScreen.value = "view";
|
|
195
|
+
}
|
|
196
|
+
function addRedirect() {
|
|
197
|
+
currentScreen.value = "create-redirect";
|
|
198
|
+
}
|
|
199
|
+
const finalPath = computed(() => {
|
|
200
|
+
return newRedirectPath.value?.startsWith("/") ? newRedirectPath.value : `/${newRedirectPath.value}`;
|
|
201
|
+
});
|
|
202
|
+
async function createRedirect() {
|
|
203
|
+
submitting.value = true;
|
|
204
|
+
const newResource = await $cwa.resourcesManager.createResource({
|
|
205
|
+
endpoint: "/_/routes",
|
|
206
|
+
data: {
|
|
207
|
+
name: newRedirectPath.value,
|
|
208
|
+
path: finalPath.value,
|
|
209
|
+
redirect: routeIri.value
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
submitting.value = false;
|
|
213
|
+
if (newResource) {
|
|
214
|
+
goBackToViewing();
|
|
215
|
+
await loadResource();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async function generateRoute() {
|
|
219
|
+
submitting.value = true;
|
|
220
|
+
const newResource = await $cwa.resourcesManager.createResource({
|
|
221
|
+
endpoint: "/_/routes/generate",
|
|
222
|
+
data: {
|
|
223
|
+
page: defaultResource.value.page,
|
|
224
|
+
pageData: defaultResource.value.pageData
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
submitting.value = false;
|
|
228
|
+
if (newResource) {
|
|
229
|
+
emit("reload");
|
|
230
|
+
goBackToViewing();
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
async function saveRoute() {
|
|
234
|
+
const resource2 = await saveResource(true);
|
|
235
|
+
if (resource2) {
|
|
236
|
+
await loadResource();
|
|
237
|
+
emit("reload");
|
|
238
|
+
goBackToViewing();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
async function deleteRoute() {
|
|
242
|
+
await deleteResource();
|
|
243
|
+
emit("reload");
|
|
244
|
+
goBackToViewing();
|
|
245
|
+
}
|
|
246
|
+
watch(routeIri, async () => {
|
|
247
|
+
await loadResource();
|
|
248
|
+
});
|
|
249
|
+
const defaultResource = computed(() => {
|
|
250
|
+
const obj = {
|
|
251
|
+
path: ""
|
|
252
|
+
};
|
|
253
|
+
if (pageResource.value["@type"] === "Page") {
|
|
254
|
+
obj.page = pageResource.value["@id"];
|
|
255
|
+
} else {
|
|
256
|
+
obj.pageData = pageResource.value["@id"];
|
|
257
|
+
}
|
|
258
|
+
return obj;
|
|
259
|
+
});
|
|
260
|
+
const { isLoading: isLoadingRoute, isUpdating, resource, localResourceData, loadResource, deleteResource, saveResource } = useItemPage({
|
|
261
|
+
createEndpoint: "/_/routes",
|
|
262
|
+
emit,
|
|
263
|
+
resourceType: "Route",
|
|
264
|
+
defaultResource: defaultResource.value,
|
|
265
|
+
validate(data) {
|
|
266
|
+
data.name = data.path;
|
|
267
|
+
return true;
|
|
268
|
+
},
|
|
269
|
+
endpoint,
|
|
270
|
+
iri: routeIri,
|
|
271
|
+
excludeFields: ["redirectedFrom"]
|
|
272
|
+
});
|
|
273
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CwaResource } from '#cwa/runtime/resources/resource-utils';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
pageResource: CwaResource;
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label
|
|
3
|
+
class="cwa:block cwa:text-light/70"
|
|
4
|
+
:for="inputId"
|
|
5
|
+
>
|
|
6
|
+
{{ label }}
|
|
7
|
+
</label>
|
|
8
|
+
<span class="cwa:flex cwa:relative">
|
|
9
|
+
<slot />
|
|
10
|
+
</span>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
defineProps({
|
|
15
|
+
label: { type: String, required: true },
|
|
16
|
+
inputId: { type: String, required: false }
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
inputId?: string;
|
|
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,86 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
Listbox,
|
|
4
|
+
ListboxButton,
|
|
5
|
+
ListboxOptions,
|
|
6
|
+
ListboxOption
|
|
7
|
+
} from "@headlessui/vue";
|
|
8
|
+
import { computed } from "vue";
|
|
9
|
+
import { useCwaSelectInput } from "#cwa/runtime/composables/cwa-select-input";
|
|
10
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
options: { type: Array, required: true },
|
|
13
|
+
modelValue: { type: [String, Number, Boolean, Object, null, Array], required: true, skipCheck: true },
|
|
14
|
+
popper: { type: Object, required: false }
|
|
15
|
+
});
|
|
16
|
+
const { value, compareOptions, selectedOption, trigger, container } = useCwaSelectInput(computed(() => props), emit);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<Listbox
|
|
21
|
+
v-slot="{ open }"
|
|
22
|
+
v-model="value"
|
|
23
|
+
:by="compareOptions"
|
|
24
|
+
>
|
|
25
|
+
<div class="cwa:relative cwa:inline-flex">
|
|
26
|
+
<ListboxButton
|
|
27
|
+
ref="trigger"
|
|
28
|
+
class="cwa:flex cwa:transition-colors cwa:relative cwa:rounded-lg cwa:py-2 cwa:px-4 cwa:text-left cwa:text-light cwa:w-full cwa:border-0 cwa:cursor-pointer"
|
|
29
|
+
:class="[open ? 'cwa:bg-stone-700' : 'cwa:bg-stone-700/80']"
|
|
30
|
+
>
|
|
31
|
+
<span class="cwa:block cwa:truncate cwa:grow">{{ selectedOption?.label }}</span>
|
|
32
|
+
<svg
|
|
33
|
+
class="cwa:-mr-1 cwa:h-6 cwa:w-6 cwa:transition-transform"
|
|
34
|
+
:class="{ 'cwa:rotate-180': open }"
|
|
35
|
+
viewBox="0 0 20 20"
|
|
36
|
+
fill="currentColor"
|
|
37
|
+
aria-hidden="true"
|
|
38
|
+
>
|
|
39
|
+
<path
|
|
40
|
+
fill-rule="evenodd"
|
|
41
|
+
d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"
|
|
42
|
+
clip-rule="evenodd"
|
|
43
|
+
/>
|
|
44
|
+
</svg>
|
|
45
|
+
</ListboxButton>
|
|
46
|
+
<Transition
|
|
47
|
+
enter-active-class="cwa:transition-opacity cwa:duration-100 cwa:ease-out"
|
|
48
|
+
enter-from-class="cwa:opacity-0"
|
|
49
|
+
enter-to-class="cwa:opacity-100"
|
|
50
|
+
leave-active-class="cwa:transition-opacity cwa:duration-100 cwa:ease-in"
|
|
51
|
+
leave-from-class="cwa:opacity-100"
|
|
52
|
+
leave-to-class="cwa:opacity-0"
|
|
53
|
+
>
|
|
54
|
+
<ListboxOptions
|
|
55
|
+
v-show="open"
|
|
56
|
+
ref="container"
|
|
57
|
+
static
|
|
58
|
+
class="cwa:absolute cwa:max-h-60 cwa:min-w-full cwa:overflow-auto cwa:dark-blur cwa:rounded-lg cwa:z-dialog cwa:border cwa:border-stone-600"
|
|
59
|
+
>
|
|
60
|
+
<ListboxOption
|
|
61
|
+
v-for="option in options"
|
|
62
|
+
:key="option.label"
|
|
63
|
+
v-slot="{ active, selected }"
|
|
64
|
+
as="template"
|
|
65
|
+
:value="option.value"
|
|
66
|
+
:disabled="option.disabled"
|
|
67
|
+
>
|
|
68
|
+
<li
|
|
69
|
+
:class="[
|
|
70
|
+
active ? 'cwa:text-white' : 'cwa:text-stone-400',
|
|
71
|
+
'cwa:relative cwa:cursor-pointer cwa:select-none cwa:py-2 cwa:px-4'
|
|
72
|
+
]"
|
|
73
|
+
>
|
|
74
|
+
<span
|
|
75
|
+
:class="[
|
|
76
|
+
selected ? 'cwa:text-white' : '',
|
|
77
|
+
'cwa:block cwa:truncate'
|
|
78
|
+
]"
|
|
79
|
+
>{{ option.label }}</span>
|
|
80
|
+
</li>
|
|
81
|
+
</ListboxOption>
|
|
82
|
+
</ListboxOptions>
|
|
83
|
+
</Transition>
|
|
84
|
+
</div>
|
|
85
|
+
</Listbox>
|
|
86
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type SelectInputProps } from '#cwa/runtime/composables/cwa-select-input';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<SelectInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-1">
|
|
3
|
+
<span class="cwa:text-stone-400">
|
|
4
|
+
{{ label }}
|
|
5
|
+
</span>
|
|
6
|
+
<div class="cwa:flex cwa:items-center cwa:gap-x-4">
|
|
7
|
+
<span
|
|
8
|
+
v-if="content"
|
|
9
|
+
class="cwa:truncate"
|
|
10
|
+
>
|
|
11
|
+
{{ content }}
|
|
12
|
+
</span>
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
defineProps({
|
|
20
|
+
label: { type: String, required: true },
|
|
21
|
+
content: { type: String, required: false }
|
|
22
|
+
});
|
|
23
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
content?: string;
|
|
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,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cwa:rounded-lg cwa:py-1.5 cwa:relative cwa:border cwa:bg-dark/90 cwa:border-stone-700 cwa:focus-within:bg-dark cwa:focus-within:border-stone-600">
|
|
3
|
+
<label
|
|
4
|
+
class="cwa:px-4 cwa:text-stone-400 cwa:absolute"
|
|
5
|
+
:for="id"
|
|
6
|
+
>
|
|
7
|
+
{{ label }}
|
|
8
|
+
</label>
|
|
9
|
+
<input
|
|
10
|
+
:id="id"
|
|
11
|
+
v-model="model"
|
|
12
|
+
:type="type"
|
|
13
|
+
:placeholder="placeholder"
|
|
14
|
+
:autocomplete="autocomplete"
|
|
15
|
+
class="cwa:flex cwa:relative cwa:px-4 cwa:pt-6 cwa:pb-0 cwa:text-left cwa:text-light cwa:w-full cwa:border-0 cwa:items-center cwa:bg-transparent cwa:border-0 cwa:focus:ring-0 cwa:outline-0"
|
|
16
|
+
>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
import { useId } from "vue";
|
|
22
|
+
const id = useId();
|
|
23
|
+
const model = defineModel({ type: String });
|
|
24
|
+
defineProps({
|
|
25
|
+
label: { type: String, required: true },
|
|
26
|
+
type: { type: String, required: false },
|
|
27
|
+
placeholder: { type: String, required: false },
|
|
28
|
+
autocomplete: { type: String, required: false }
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
type?: 'text' | 'number' | 'email' | 'password';
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
autocomplete?: string;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import {
|
|
3
|
+
Listbox,
|
|
4
|
+
ListboxButton,
|
|
5
|
+
ListboxOptions,
|
|
6
|
+
ListboxOption,
|
|
7
|
+
ListboxLabel
|
|
8
|
+
} from "@headlessui/vue";
|
|
9
|
+
import { computed } from "vue";
|
|
10
|
+
import { useCwaSelectInput } from "#cwa/runtime/composables/cwa-select-input";
|
|
11
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
options: { type: Array, required: true },
|
|
14
|
+
modelValue: { type: [String, Number, Boolean, Object, null, Array], required: true, skipCheck: true },
|
|
15
|
+
popper: { type: Object, required: false },
|
|
16
|
+
label: { type: String, required: true }
|
|
17
|
+
});
|
|
18
|
+
const { value, compareOptions, selectedOption, trigger, container } = useCwaSelectInput(computed(() => props), emit);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<Listbox
|
|
23
|
+
v-slot="{ open }"
|
|
24
|
+
v-model="value"
|
|
25
|
+
:by="compareOptions"
|
|
26
|
+
>
|
|
27
|
+
<div class="cwa:relative cwa:w-full">
|
|
28
|
+
<div
|
|
29
|
+
class="cwa:rounded-lg cwa:py-1.5 cwa:relative cwa:border"
|
|
30
|
+
:class="[open ? 'cwa:bg-dark cwa:border-stone-600' : 'cwa:bg-dark/90 cwa:border-stone-700']"
|
|
31
|
+
>
|
|
32
|
+
<ListboxLabel class="cwa:px-4 cwa:text-stone-400 cwa:absolute">
|
|
33
|
+
{{ label }}
|
|
34
|
+
</ListboxLabel>
|
|
35
|
+
<ListboxButton
|
|
36
|
+
ref="trigger"
|
|
37
|
+
class="cwa:flex cwa:transition-colors cwa:relative cwa:px-4 cwa:text-left cwa:text-light cwa:w-full cwa:border-0 cwa:items-center cwa:cursor-pointer"
|
|
38
|
+
>
|
|
39
|
+
<span class="cwa:block cwa:truncate cwa:grow cwa:pt-6">{{ selectedOption?.label }}</span>
|
|
40
|
+
<svg
|
|
41
|
+
class="cwa:-mr-1 cwa:h-6 cwa:w-6 cwa:transition-transform"
|
|
42
|
+
:class="{ 'cwa:rotate-180': open }"
|
|
43
|
+
viewBox="0 0 20 20"
|
|
44
|
+
fill="currentColor"
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
>
|
|
47
|
+
<path
|
|
48
|
+
fill-rule="evenodd"
|
|
49
|
+
d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"
|
|
50
|
+
clip-rule="evenodd"
|
|
51
|
+
/>
|
|
52
|
+
</svg>
|
|
53
|
+
</ListboxButton>
|
|
54
|
+
</div>
|
|
55
|
+
<ClientOnly>
|
|
56
|
+
<Teleport to="body">
|
|
57
|
+
<Transition
|
|
58
|
+
enter-active-class="cwa:transition-opacity cwa:duration-100 cwa:ease-out"
|
|
59
|
+
enter-from-class="cwa:opacity-0"
|
|
60
|
+
enter-to-class="cwa:opacity-100"
|
|
61
|
+
leave-active-class="cwa:transition-opacity cwa:duration-100 cwa:ease-in"
|
|
62
|
+
leave-from-class="cwa:opacity-100"
|
|
63
|
+
leave-to-class="cwa:opacity-0"
|
|
64
|
+
>
|
|
65
|
+
<ListboxOptions
|
|
66
|
+
v-show="open"
|
|
67
|
+
ref="container"
|
|
68
|
+
static
|
|
69
|
+
class="cwa:absolute cwa:max-h-60 cwa:overflow-auto cwa:dark-blur cwa:rounded-lg cwa:border cwa:border-stone-600 cwa:z-notifications"
|
|
70
|
+
>
|
|
71
|
+
<ListboxOption
|
|
72
|
+
v-for="option in options"
|
|
73
|
+
:key="option.label"
|
|
74
|
+
v-slot="{ active, selected }"
|
|
75
|
+
as="template"
|
|
76
|
+
:value="option.value"
|
|
77
|
+
:disabled="option.disabled"
|
|
78
|
+
>
|
|
79
|
+
<li
|
|
80
|
+
:class="[
|
|
81
|
+
active ? 'cwa:text-white' : 'cwa:text-stone-400',
|
|
82
|
+
'cwa:relative cwa:cursor-pointer cwa:select-none cwa:py-2 cwa:px-4'
|
|
83
|
+
]"
|
|
84
|
+
>
|
|
85
|
+
<span
|
|
86
|
+
:class="[
|
|
87
|
+
selected ? 'cwa:text-white' : '',
|
|
88
|
+
'cwa:block cwa:truncate'
|
|
89
|
+
]"
|
|
90
|
+
>{{ option.label }}</span>
|
|
91
|
+
</li>
|
|
92
|
+
</ListboxOption>
|
|
93
|
+
</ListboxOptions>
|
|
94
|
+
</Transition>
|
|
95
|
+
</Teleport>
|
|
96
|
+
</ClientOnly>
|
|
97
|
+
</div>
|
|
98
|
+
</Listbox>
|
|
99
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SelectInputProps } from '#cwa/runtime/composables/cwa-select-input';
|
|
2
|
+
type __VLS_Props = SelectInputProps & {
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
export default _default;
|