@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,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a
|
|
3
|
+
class="cwa:inline-block cwa:h-6"
|
|
4
|
+
:class="{ 'is-open': model }"
|
|
5
|
+
@click.stop="toggleMenu"
|
|
6
|
+
>
|
|
7
|
+
<span class="cwa:sr-only">Menu</span>
|
|
8
|
+
<svg
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
viewBox="0 0 50 50"
|
|
11
|
+
class="cwa:relative cwa:block cwa:transition-[stroke] cwa:duration-300 cwa:fill-none cwa:my-0 cwa:mx-auto cwa:[stroke-linecap:round] cwa:stroke-[5px] cwa:h-full cwa:cursor-pointer"
|
|
12
|
+
:class="[model ? 'cwa:stroke-white' : 'cwa:stroke-gray-300']"
|
|
13
|
+
>
|
|
14
|
+
<!-- end - final X -->
|
|
15
|
+
<g
|
|
16
|
+
class="cwa:transition-opacity-transform cwa:duration-300 cwa:origin-center"
|
|
17
|
+
:class="[model ? 'cwa:opacity-100 cwa:rotate-0' : 'cwa:opacity-0 cwa:-rotate-45']"
|
|
18
|
+
>
|
|
19
|
+
<path
|
|
20
|
+
class="end-one"
|
|
21
|
+
d="M42,8 L 25.5,25.3 L 8,8"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
class="end-two"
|
|
25
|
+
d="M8,42 L 25.5,25.3 L 42,42"
|
|
26
|
+
/>
|
|
27
|
+
</g>
|
|
28
|
+
<!-- middle - curved X (only used in legacy gsap svg transforms) -->
|
|
29
|
+
<g class="cwa:hidden">
|
|
30
|
+
<path
|
|
31
|
+
class="middle-one"
|
|
32
|
+
d="M8,8 c 0 0, 2.2 4.5, 12 13.5 S 38,8,42,8"
|
|
33
|
+
/>
|
|
34
|
+
<path
|
|
35
|
+
class="middle-two"
|
|
36
|
+
d="M8,42 c 0 0, 2.2-4.5, 12-13.5 S 38,42,42,42"
|
|
37
|
+
/>
|
|
38
|
+
</g>
|
|
39
|
+
<!-- start, 3 lines -->
|
|
40
|
+
<g
|
|
41
|
+
class="cwa:transition-opacity-transform cwa:duration-300 cwa:origin-center"
|
|
42
|
+
:class="[model ? 'cwa:opacity-0 cwa:rotate-180' : 'cwa:opacity-100 cwa:rotate-0']"
|
|
43
|
+
>
|
|
44
|
+
<!-- top path for morphing into middle (when legacy used gsap - may re-implement) -->
|
|
45
|
+
<path
|
|
46
|
+
class="stage-one"
|
|
47
|
+
d="M5,8c0,0,2.2,0,13,0s13,0,27,0"
|
|
48
|
+
/>
|
|
49
|
+
<!-- bottom path for morphing into middle (when legacy used gsap - may re-implement) -->
|
|
50
|
+
<path
|
|
51
|
+
class="stage-two"
|
|
52
|
+
d="M5,42c0,0,2.2,0,13,0s13,0,27,0"
|
|
53
|
+
/>
|
|
54
|
+
<!-- middle line as we just fade out -->
|
|
55
|
+
<line
|
|
56
|
+
class="cwa:origin-center"
|
|
57
|
+
x1="5"
|
|
58
|
+
y1="25"
|
|
59
|
+
x2="45"
|
|
60
|
+
y2="25"
|
|
61
|
+
/>
|
|
62
|
+
</g>
|
|
63
|
+
</svg>
|
|
64
|
+
</a>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script setup>
|
|
68
|
+
const model = defineModel({ type: Boolean, ...{
|
|
69
|
+
required: true,
|
|
70
|
+
default: false
|
|
71
|
+
} });
|
|
72
|
+
function toggleMenu() {
|
|
73
|
+
model.value = !model.value;
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_PublicProps = {
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: boolean) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`ProgressBar > snapshots > should match snapshot IF progress bar has percentage 1`] = `
|
|
4
|
+
<transition-stub
|
|
5
|
+
appear="false"
|
|
6
|
+
css="true"
|
|
7
|
+
enteractiveclass="cwa:duration-200 cwa:ease-out"
|
|
8
|
+
enterfromclass="cwa:transform cwa:opacity-0 cwa:w-0"
|
|
9
|
+
entertoclass="cwa:opacity-100"
|
|
10
|
+
leaveactiveclass="cwa:duration-300 cwa:ease-in cwa:delay-200"
|
|
11
|
+
leavefromclass="cwa:opacity-100"
|
|
12
|
+
leavetoclass="cwa:transform cwa:opacity-0"
|
|
13
|
+
persisted="true"
|
|
14
|
+
>
|
|
15
|
+
<div
|
|
16
|
+
class="cwa:w-full cwa:h-0.5"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
class="cwa:bg-green cwa:h-0.5 cwa:transition-all cwa:duration-300"
|
|
20
|
+
style="width: 75%;"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
</transition-stub>
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
exports[`ProgressBar > snapshots > should match snapshot IF progress bar is NOT shown 1`] = `
|
|
27
|
+
<transition-stub
|
|
28
|
+
appear="false"
|
|
29
|
+
css="true"
|
|
30
|
+
enteractiveclass="cwa:duration-200 cwa:ease-out"
|
|
31
|
+
enterfromclass="cwa:transform cwa:opacity-0 cwa:w-0"
|
|
32
|
+
entertoclass="cwa:opacity-100"
|
|
33
|
+
leaveactiveclass="cwa:duration-300 cwa:ease-in cwa:delay-200"
|
|
34
|
+
leavefromclass="cwa:opacity-100"
|
|
35
|
+
leavetoclass="cwa:transform cwa:opacity-0"
|
|
36
|
+
persisted="true"
|
|
37
|
+
>
|
|
38
|
+
<div
|
|
39
|
+
class="cwa:w-full cwa:h-0.5"
|
|
40
|
+
style="display: none;"
|
|
41
|
+
>
|
|
42
|
+
<div
|
|
43
|
+
class="cwa:bg-green cwa:h-0.5 cwa:transition-all cwa:duration-300"
|
|
44
|
+
style="width: 0%;"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
</transition-stub>
|
|
48
|
+
`;
|
|
49
|
+
|
|
50
|
+
exports[`ProgressBar > snapshots > should match snapshot IF progress bar is shown 1`] = `
|
|
51
|
+
<transition-stub
|
|
52
|
+
appear="false"
|
|
53
|
+
css="true"
|
|
54
|
+
enteractiveclass="cwa:duration-200 cwa:ease-out"
|
|
55
|
+
enterfromclass="cwa:transform cwa:opacity-0 cwa:w-0"
|
|
56
|
+
entertoclass="cwa:opacity-100"
|
|
57
|
+
leaveactiveclass="cwa:duration-300 cwa:ease-in cwa:delay-200"
|
|
58
|
+
leavefromclass="cwa:opacity-100"
|
|
59
|
+
leavetoclass="cwa:transform cwa:opacity-0"
|
|
60
|
+
persisted="true"
|
|
61
|
+
>
|
|
62
|
+
<div
|
|
63
|
+
class="cwa:w-full cwa:h-0.5"
|
|
64
|
+
>
|
|
65
|
+
<div
|
|
66
|
+
class="cwa:bg-green cwa:h-0.5 cwa:transition-all cwa:duration-300"
|
|
67
|
+
style="width: 0%;"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
</transition-stub>
|
|
71
|
+
`;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Transition
|
|
3
|
+
enter-from-class="cwa:transform cwa:opacity-0 cwa:w-0"
|
|
4
|
+
enter-active-class="cwa:duration-200 cwa:ease-out"
|
|
5
|
+
enter-to-class="cwa:opacity-100"
|
|
6
|
+
leave-from-class="cwa:opacity-100"
|
|
7
|
+
leave-active-class="cwa:duration-300 cwa:ease-in cwa:delay-200"
|
|
8
|
+
leave-to-class="cwa:transform cwa:opacity-0"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
v-show="props.show"
|
|
12
|
+
class="cwa:w-full cwa:h-0.5"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
:class="[colourClass]"
|
|
16
|
+
class="cwa:h-0.5 cwa:transition-all cwa:duration-300"
|
|
17
|
+
:style="{ width: `${props.percent}%` }"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</Transition>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup>
|
|
24
|
+
const props = defineProps({
|
|
25
|
+
show: { type: Boolean, required: true },
|
|
26
|
+
percent: { type: Number, required: true },
|
|
27
|
+
colourClass: { type: String, required: false, default: "cwa:bg-green" }
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
show: boolean;
|
|
3
|
+
percent: number;
|
|
4
|
+
colourClass?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
colourClass: string;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`Info > snapshots > should match snapshot with passed content 1`] = `
|
|
4
|
+
<div
|
|
5
|
+
class="cwa:flex cwa:items-center cwa:bg-blue-500 cwa:text-white cwa:text-sm cwa:font-bold cwa:px-4 cwa:py-3"
|
|
6
|
+
role="alert"
|
|
7
|
+
>
|
|
8
|
+
<svg
|
|
9
|
+
class="cwa:fill-current cwa:w-4 cwa:h-4 cwa:mr-2"
|
|
10
|
+
viewBox="0 0 20 20"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
d="M12.432 0c1.34 0 2.01.912 2.01 1.957 0 1.305-1.164 2.512-2.679 2.512-1.269 0-2.009-.75-1.974-1.99C9.789 1.436 10.67 0 12.432 0zM8.309 20c-1.058 0-1.833-.652-1.093-3.524l1.214-5.092c.211-.814.246-1.141 0-1.141-.317 0-1.689.562-2.502 1.117l-.528-.88c2.572-2.186 5.531-3.467 6.801-3.467 1.057 0 1.233 1.273.705 3.23l-1.391 5.352c-.246.945-.141 1.271.106 1.271.317 0 1.357-.392 2.379-1.207l.6.814C12.098 19.02 9.365 20 8.309 20z"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
17
|
+
|
|
18
|
+
<div>
|
|
19
|
+
CWA
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="cwa:flex cwa:items-center cwa:bg-blue-500 cwa:text-white cwa:text-sm cwa:font-bold cwa:px-4 cwa:py-3"
|
|
4
|
+
role="alert"
|
|
5
|
+
>
|
|
6
|
+
<svg
|
|
7
|
+
class="cwa:fill-current cwa:w-4 cwa:h-4 cwa:mr-2"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
viewBox="0 0 20 20"
|
|
10
|
+
><path d="M12.432 0c1.34 0 2.01.912 2.01 1.957 0 1.305-1.164 2.512-2.679 2.512-1.269 0-2.009-.75-1.974-1.99C9.789 1.436 10.67 0 12.432 0zM8.309 20c-1.058 0-1.833-.652-1.093-3.524l1.214-5.092c.211-.814.246-1.141 0-1.141-.317 0-1.689.562-2.502 1.117l-.528-.88c2.572-2.186 5.531-3.467 6.801-3.467 1.057 0 1.233 1.273.705 3.23l-1.391 5.352c-.246.945-.141 1.271.106 1.271.317 0 1.357-.392 2.379-1.207l.6.814C12.098 19.02 9.365 20 8.309 20z" /></svg>
|
|
11
|
+
<slot />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`Warning > snapshots > should match snapshot with passed content 1`] = `
|
|
4
|
+
<div
|
|
5
|
+
class="cwa:flex cwa:items-start cwa:outline-1 cwa:outline-offset-2 cwa:outline-red-500/50 cwa:bg-red-500/50 cwa:text-white cwa:text-sm cwa:font-bold cwa:px-4 cwa:py-3 cwa:rounded-md"
|
|
6
|
+
role="alert"
|
|
7
|
+
>
|
|
8
|
+
|
|
9
|
+
<div>
|
|
10
|
+
CWA
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, Comment, Text } from "vue";
|
|
3
|
+
import { defu } from "defu";
|
|
4
|
+
import {
|
|
5
|
+
Popover,
|
|
6
|
+
PopoverButton,
|
|
7
|
+
PopoverPanel
|
|
8
|
+
} from "@headlessui/vue";
|
|
9
|
+
import { usePopper } from "#cwa/runtime/composables/popper";
|
|
10
|
+
import ButtonPopoverGroup from "#cwa/runtime/templates/components/ui/form/ButtonPopoverGroup.vue";
|
|
11
|
+
import ButtonPopoverItem from "#cwa/runtime/templates/components/ui/form/ButtonPopoverItem.vue";
|
|
12
|
+
import Spinner from "#cwa/runtime/templates/components/utils/Spinner.vue";
|
|
13
|
+
import { NuxtLink } from "#components";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
color: { type: String, required: false, default: "grey" },
|
|
16
|
+
buttonClass: { type: String, required: false, default: void 0 },
|
|
17
|
+
options: { type: Array, required: false, default: void 0 },
|
|
18
|
+
popper: { type: Object, required: false, default: void 0 },
|
|
19
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
20
|
+
loading: { type: Boolean, required: false, default: false },
|
|
21
|
+
to: { type: null, required: false, default: void 0 }
|
|
22
|
+
});
|
|
23
|
+
const slots = defineSlots();
|
|
24
|
+
const emit = defineEmits(["click"]);
|
|
25
|
+
const buttonColorClassNames = computed(() => {
|
|
26
|
+
if (props.color === "blue") {
|
|
27
|
+
return "cwa:text-white cwa:bg-blue-600/90 cwa:hover:bg-blue-600 cwa:border-transparent";
|
|
28
|
+
}
|
|
29
|
+
if (props.color === "dark") {
|
|
30
|
+
return "cwa:text-light cwa:bg-dark/90 cwa:hover:bg-dark cwa:border-stone-400 cwa:hover:border-white cwa:hover:text-white";
|
|
31
|
+
}
|
|
32
|
+
if (props.color === "error") {
|
|
33
|
+
return "cwa:text-light cwa:bg-magenta/80 cwa:hover:bg-magenta cwa:border-magenta cwa:hover:border-magenta cwa:hover:text-white";
|
|
34
|
+
}
|
|
35
|
+
return "cwa:text-white cwa:bg-stone-700/90 cwa:hover:bg-stone-700 cwa:border-transparent";
|
|
36
|
+
});
|
|
37
|
+
const buttonBaseClass = computed(() => {
|
|
38
|
+
return `${buttonColorClassNames.value} cwa:cursor-pointer cwa:py-1.5 cwa:px-3 cwa:md:px-4 cwa:border cwa:transition cwa:disabled:pointer-events-none cwa:disabled:opacity-70 cwa:disabled:saturate-[.4]`;
|
|
39
|
+
});
|
|
40
|
+
const buttonClassNames = computed(() => {
|
|
41
|
+
const baseClass = `cwa:grow ${buttonBaseClass.value} ${props.buttonClass}`;
|
|
42
|
+
return `${baseClass} ${buttonColorClassNames.value}`;
|
|
43
|
+
});
|
|
44
|
+
const hasOptions = computed(() => {
|
|
45
|
+
return props.options?.length;
|
|
46
|
+
});
|
|
47
|
+
function handleOptionClick(value, close) {
|
|
48
|
+
close();
|
|
49
|
+
emit("click", value);
|
|
50
|
+
}
|
|
51
|
+
function hasSlotContent(slot, slotProps = {}) {
|
|
52
|
+
if (!slot) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return slot(slotProps).some((vnode) => {
|
|
56
|
+
if (vnode.type === Comment) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
if (Array.isArray(vnode.children) && !vnode.children.length) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
return vnode.type !== Text || typeof vnode.children === "string" && vnode.children.trim() !== "";
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const showButton = computed(() => {
|
|
66
|
+
const slotContent = slots.default?.(props);
|
|
67
|
+
return hasSlotContent(slots.default, slotContent);
|
|
68
|
+
});
|
|
69
|
+
const dotClassName = ["cwa:w-[0.3rem]", "cwa:h-[0.3rem]", "cwa:rounded-full", "cwa:bg-white", "cwa:absolute", "cwa:left-1/2", "cwa:-translate-x-1/2"];
|
|
70
|
+
const middleDotClassName = [...dotClassName, "cwa:top-1/2 cwa:-translate-y-1/2"];
|
|
71
|
+
const topDotClassName = [...dotClassName, "cwa:top-2"];
|
|
72
|
+
const bottomDotClassName = [...dotClassName, "cwa:bottom-2"];
|
|
73
|
+
const enforcedOps = {
|
|
74
|
+
placement: "top-start",
|
|
75
|
+
offsetDistance: 0
|
|
76
|
+
};
|
|
77
|
+
const popperOps = computed(() => defu({}, props.popper, enforcedOps));
|
|
78
|
+
const [trigger, container] = usePopper(popperOps.value);
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<template>
|
|
82
|
+
<Popover
|
|
83
|
+
v-slot="{ open }"
|
|
84
|
+
class="cwa:flex cwa:gap-x-1.5 relative"
|
|
85
|
+
>
|
|
86
|
+
<component
|
|
87
|
+
:is="to ? NuxtLink : 'button'"
|
|
88
|
+
v-if="showButton"
|
|
89
|
+
:to="to"
|
|
90
|
+
:class="[buttonClassNames, open ? 'cwa:opacity-50' : '']"
|
|
91
|
+
:disabled="loading || disabled || open"
|
|
92
|
+
@click.prevent.stop="emit('click')"
|
|
93
|
+
>
|
|
94
|
+
<div
|
|
95
|
+
v-if="loading"
|
|
96
|
+
class="cwa:flex cwa:w-full cwa:justify-center"
|
|
97
|
+
>
|
|
98
|
+
<Spinner :show="true" />
|
|
99
|
+
</div>
|
|
100
|
+
<slot
|
|
101
|
+
v-else
|
|
102
|
+
v-bind="props"
|
|
103
|
+
/>
|
|
104
|
+
</component>
|
|
105
|
+
<template v-if="hasOptions">
|
|
106
|
+
<PopoverButton
|
|
107
|
+
ref="trigger"
|
|
108
|
+
:class="buttonBaseClass"
|
|
109
|
+
class="cwa:relative"
|
|
110
|
+
:disabled="disabled || loading"
|
|
111
|
+
>
|
|
112
|
+
|
|
113
|
+
<span :class="topDotClassName" />
|
|
114
|
+
<span :class="middleDotClassName" />
|
|
115
|
+
<span :class="bottomDotClassName" />
|
|
116
|
+
</PopoverButton>
|
|
117
|
+
<PopoverPanel
|
|
118
|
+
v-slot="{ close }"
|
|
119
|
+
ref="container"
|
|
120
|
+
class="cwa:absolute cwa:!min-w-[220px] cwa:max-w-[300px] cwa:bg-stone-700 cwa:py-1"
|
|
121
|
+
>
|
|
122
|
+
<template v-for="(option, index) of options">
|
|
123
|
+
<ButtonPopoverGroup
|
|
124
|
+
v-if="Array.isArray(option)"
|
|
125
|
+
:key="`popover-group-option-${index}`"
|
|
126
|
+
:options="option"
|
|
127
|
+
@click="(value) => handleOptionClick(value, close)"
|
|
128
|
+
/>
|
|
129
|
+
<ButtonPopoverItem
|
|
130
|
+
v-else
|
|
131
|
+
:key="`popover-item-option-${index}`"
|
|
132
|
+
:option="option"
|
|
133
|
+
@click="(value) => handleOptionClick(value, close)"
|
|
134
|
+
/>
|
|
135
|
+
</template>
|
|
136
|
+
</PopoverPanel>
|
|
137
|
+
</template>
|
|
138
|
+
</Popover>
|
|
139
|
+
</template>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
import type { PopperOptions } from '#cwa/runtime/types/popper';
|
|
3
|
+
export type ModelValue = undefined | string | number | boolean | object | null | (string | number | boolean | object)[];
|
|
4
|
+
export interface ButtonOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: ModelValue;
|
|
7
|
+
}
|
|
8
|
+
export type ButtonColor = 'blue' | 'grey' | 'dark' | 'error';
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
color?: ButtonColor;
|
|
11
|
+
buttonClass?: string;
|
|
12
|
+
options?: (ButtonOption | ButtonOption[])[];
|
|
13
|
+
popper?: PopperOptions;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
to?: RouteLocationRaw;
|
|
17
|
+
};
|
|
18
|
+
declare const props: Readonly<{}> & {
|
|
19
|
+
readonly color: ButtonColor;
|
|
20
|
+
readonly buttonClass: string | undefined;
|
|
21
|
+
readonly options: (ButtonOption | ButtonOption[])[] | undefined;
|
|
22
|
+
readonly popper: PopperOptions | undefined;
|
|
23
|
+
readonly disabled: boolean;
|
|
24
|
+
readonly loading: boolean;
|
|
25
|
+
readonly to: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
readonly disabled: boolean;
|
|
28
|
+
readonly loading: boolean;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_Slots = {
|
|
31
|
+
default(p: typeof props): any;
|
|
32
|
+
};
|
|
33
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
34
|
+
click: (value?: ModelValue) => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
36
|
+
onClick?: ((value?: ModelValue) => any) | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
options: (ButtonOption | ButtonOption[])[];
|
|
40
|
+
color: ButtonColor;
|
|
41
|
+
popper: PopperOptions;
|
|
42
|
+
to: RouteLocationRaw;
|
|
43
|
+
buttonClass: string;
|
|
44
|
+
loading: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ButtonPopoverItem from "./ButtonPopoverItem.vue";
|
|
3
|
+
const emit = defineEmits(["click"]);
|
|
4
|
+
defineProps({
|
|
5
|
+
options: { type: Array, required: true }
|
|
6
|
+
});
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div class="cwa:not-last:border-b cwa:border-solid cwa:border-stone-400">
|
|
11
|
+
<ButtonPopoverItem
|
|
12
|
+
v-for="(option, index) of options"
|
|
13
|
+
:key="`option-${index}-${option.label}`"
|
|
14
|
+
:option="option"
|
|
15
|
+
@click="(value) => emit('click', value)"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ButtonOption, ModelValue } from './Button.vue.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options: ButtonOption[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
click: (value?: ModelValue) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onClick?: ((value?: ModelValue) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const emit = defineEmits(["click"]);
|
|
3
|
+
defineProps({
|
|
4
|
+
option: { type: Object, required: true }
|
|
5
|
+
});
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<button
|
|
10
|
+
class="cwa:block cwa:w-full cwa:py-2 cwa:px-5 cwa:hover:bg-dark cwa:text-left cwa:transition cwa:cursor-pointer"
|
|
11
|
+
@click.prevent.stop="emit('click', option.value)"
|
|
12
|
+
>
|
|
13
|
+
{{ option.label }}
|
|
14
|
+
</button>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ButtonOption, ModelValue } from './Button.vue.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
option: ButtonOption;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
click: (value?: ModelValue) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onClick?: ((value?: ModelValue) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useTemplateRef } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
label: { type: String, required: true },
|
|
5
|
+
modelValue: { type: null, required: true },
|
|
6
|
+
accept: { type: String, required: false },
|
|
7
|
+
fileExists: { type: Boolean, required: true },
|
|
8
|
+
disabled: { type: Boolean, required: false }
|
|
9
|
+
});
|
|
10
|
+
const fileInput = useTemplateRef("fileInput");
|
|
11
|
+
const emit = defineEmits(["update:modelValue", "change", "delete"]);
|
|
12
|
+
const value = computed({
|
|
13
|
+
get() {
|
|
14
|
+
return props.modelValue;
|
|
15
|
+
},
|
|
16
|
+
set(value2) {
|
|
17
|
+
emit("update:modelValue", value2);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
function showFileSelect() {
|
|
21
|
+
const clickEvent = new MouseEvent("click", {
|
|
22
|
+
view: window,
|
|
23
|
+
bubbles: true,
|
|
24
|
+
cancelable: false
|
|
25
|
+
});
|
|
26
|
+
fileInput.value?.dispatchEvent(clickEvent);
|
|
27
|
+
}
|
|
28
|
+
function handleFileChange() {
|
|
29
|
+
const file = fileInput.value?.files?.[0];
|
|
30
|
+
if (!file) return;
|
|
31
|
+
emit("change", file);
|
|
32
|
+
value.value = file.name;
|
|
33
|
+
}
|
|
34
|
+
function handleDeleteClick() {
|
|
35
|
+
emit("delete");
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div
|
|
41
|
+
class="cwa:flex cwa:relative cwa:items-center cwa:select-none"
|
|
42
|
+
:class="{ 'cwa:opacity-50 cwa:pointer-events-none': disabled }"
|
|
43
|
+
>
|
|
44
|
+
<div class="cwa:flex cwa:items-center cwa:relative">
|
|
45
|
+
<input
|
|
46
|
+
ref="fileInput"
|
|
47
|
+
:accept="accept"
|
|
48
|
+
class="cwa:absolute cwa:h-full cwa:w-full cwa:top-0 cwa:left-0 cwa:opacity-0 cwa:outline-0"
|
|
49
|
+
type="file"
|
|
50
|
+
@change="handleFileChange"
|
|
51
|
+
>
|
|
52
|
+
<CwaUiFormButton @click="showFileSelect">
|
|
53
|
+
{{ label }}
|
|
54
|
+
</CwaUiFormButton>
|
|
55
|
+
<span class="cwa:ml-3 cwa:text-sm cwa:cursor-pointer cwa:font-medium">
|
|
56
|
+
{{ value || "No file" }}
|
|
57
|
+
</span>
|
|
58
|
+
</div>
|
|
59
|
+
<span
|
|
60
|
+
v-if="fileExists"
|
|
61
|
+
class="cwa:ml-4"
|
|
62
|
+
>
|
|
63
|
+
<CwaUiFormButton
|
|
64
|
+
color="grey"
|
|
65
|
+
button-class="cwa:min-w-[100px]"
|
|
66
|
+
@click="handleDeleteClick"
|
|
67
|
+
>
|
|
68
|
+
Delete
|
|
69
|
+
</CwaUiFormButton>
|
|
70
|
+
</span>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
modelValue: string | number | undefined | null;
|
|
4
|
+
accept?: string;
|
|
5
|
+
fileExists: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
modelValue: { type: null, required: true }
|
|
5
|
+
});
|
|
6
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
7
|
+
const value = computed({
|
|
8
|
+
get() {
|
|
9
|
+
return props.modelValue;
|
|
10
|
+
},
|
|
11
|
+
set(value2) {
|
|
12
|
+
emit("update:modelValue", value2);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<input
|
|
19
|
+
v-model="value"
|
|
20
|
+
class="cwa:disabled:opacity-50 cwa:disabled:cursor-not-allowed cwa:disabled:pointer-events-none cwa:disabled:select-none cwa:text-light cwa:w-full cwa:dark-blur cwa:border-0 cwa:outline-dotted cwa:outline-1 cwa:outline-stone-700 cwa:hover:outline-stone-400 cwa:focus-visible:ring-2 cwa:focus-visible:ring-stone-600"
|
|
21
|
+
>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: string | number | undefined | null;
|
|
3
|
+
};
|
|
4
|
+
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>;
|
|
5
|
+
export default _default;
|