@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,248 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ResourceModal
|
|
3
|
+
v-if="localResourceData"
|
|
4
|
+
v-model="localResourceData.username"
|
|
5
|
+
title-placeholder="No Username"
|
|
6
|
+
:is-loading="isLoading"
|
|
7
|
+
@close="$emit('close')"
|
|
8
|
+
@save="saveTitle"
|
|
9
|
+
>
|
|
10
|
+
<ResourceModalTabs :tabs="tabs">
|
|
11
|
+
<template #details>
|
|
12
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
13
|
+
<div>
|
|
14
|
+
<CwaUiFormToggle
|
|
15
|
+
v-model="localResourceData.enabled"
|
|
16
|
+
label="User Enabled"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
<div>
|
|
20
|
+
<ModalInput
|
|
21
|
+
v-model="localResourceData.emailAddress"
|
|
22
|
+
label="Email"
|
|
23
|
+
type="email"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
<div>
|
|
27
|
+
<ModalSelect
|
|
28
|
+
v-model="selectRole"
|
|
29
|
+
label="Role"
|
|
30
|
+
:options="roleOptions"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
<template v-if="isAdding">
|
|
34
|
+
<div>
|
|
35
|
+
<ModalInput
|
|
36
|
+
v-model="localResourceData.plainPassword"
|
|
37
|
+
label="Password"
|
|
38
|
+
type="password"
|
|
39
|
+
placeholder="***"
|
|
40
|
+
autocomplete="new-password"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<ModalInput
|
|
45
|
+
v-model="localResourceData.repeatPassword"
|
|
46
|
+
label="Repeat Password"
|
|
47
|
+
type="password"
|
|
48
|
+
placeholder="***"
|
|
49
|
+
autocomplete="new-password"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</template>
|
|
53
|
+
<div class="cwa:flex cwa:justify-end cwa:pt-2 cwa:gap-x-2">
|
|
54
|
+
<div>
|
|
55
|
+
<CwaUiFormButton
|
|
56
|
+
color="dark"
|
|
57
|
+
:disabled="isUpdating"
|
|
58
|
+
@click="saveResource(!isAdding)"
|
|
59
|
+
>
|
|
60
|
+
{{ isAdding ? 'Add Now' : 'Save & Close' }}
|
|
61
|
+
</CwaUiFormButton>
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<CwaUiFormButton
|
|
65
|
+
color="blue"
|
|
66
|
+
:disabled="isUpdating"
|
|
67
|
+
@click="() => saveResource(isAdding)"
|
|
68
|
+
>
|
|
69
|
+
{{ isAdding ? 'Add & Close' : 'Save' }}
|
|
70
|
+
</CwaUiFormButton>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
<template #password>
|
|
76
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
77
|
+
<div>
|
|
78
|
+
<ModalInput
|
|
79
|
+
v-model="localResourceData.plainPassword"
|
|
80
|
+
label="New Password"
|
|
81
|
+
type="password"
|
|
82
|
+
placeholder="***"
|
|
83
|
+
autocomplete="new-password"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
<div>
|
|
87
|
+
<ModalInput
|
|
88
|
+
v-model="localResourceData.repeatPassword"
|
|
89
|
+
label="Repeat Password"
|
|
90
|
+
type="password"
|
|
91
|
+
placeholder="***"
|
|
92
|
+
autocomplete="new-password"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
<div class="cwa:flex cwa:justify-end cwa:pt-2 cwa:gap-x-2">
|
|
96
|
+
<div v-if="!isAdding">
|
|
97
|
+
<CwaUiFormButton
|
|
98
|
+
color="dark"
|
|
99
|
+
:disabled="isUpdating"
|
|
100
|
+
@click="saveResource(true)"
|
|
101
|
+
>
|
|
102
|
+
Save & Close
|
|
103
|
+
</CwaUiFormButton>
|
|
104
|
+
</div>
|
|
105
|
+
<div>
|
|
106
|
+
<CwaUiFormButton
|
|
107
|
+
color="blue"
|
|
108
|
+
:disabled="isUpdating"
|
|
109
|
+
@click="() => saveResource(false)"
|
|
110
|
+
>
|
|
111
|
+
Save
|
|
112
|
+
</CwaUiFormButton>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
117
|
+
<template #info>
|
|
118
|
+
<div class="cwa:flex cwa:flex-col cwa:gap-y-2">
|
|
119
|
+
<div>
|
|
120
|
+
<ModalInfo
|
|
121
|
+
label="Created"
|
|
122
|
+
:content="formatDate(localResourceData.createdAt)"
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
<div>
|
|
126
|
+
<ModalInfo
|
|
127
|
+
label="Updated"
|
|
128
|
+
:content="formatDate(localResourceData.updatedAt)"
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
<div>
|
|
132
|
+
<ModalInfo
|
|
133
|
+
label="ID"
|
|
134
|
+
:content="localResourceData['@id']"
|
|
135
|
+
/>
|
|
136
|
+
</div>
|
|
137
|
+
<div class="cwa:flex cwa:justify-start cwa:pt-6">
|
|
138
|
+
<div>
|
|
139
|
+
<CwaUiFormButton
|
|
140
|
+
:disabled="isUpdating"
|
|
141
|
+
@click="handleDeleteClick"
|
|
142
|
+
>
|
|
143
|
+
Delete
|
|
144
|
+
</CwaUiFormButton>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</template>
|
|
149
|
+
</ResourceModalTabs>
|
|
150
|
+
</ResourceModal>
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<script setup lang="ts">
|
|
154
|
+
import { computed, ref, watch } from 'vue'
|
|
155
|
+
import { useItemPage } from '../composables/useItemPage'
|
|
156
|
+
import type { SelectOption } from '#imports'
|
|
157
|
+
import ResourceModal from '#cwa/runtime/templates/components/core/admin/ResourceModal.vue'
|
|
158
|
+
import ResourceModalTabs, { type ResourceModalTab } from '#cwa/runtime/templates/components/core/admin/ResourceModalTabs.vue'
|
|
159
|
+
import ModalInfo from '#cwa/runtime/templates/components/core/admin/form/ModalInfo.vue'
|
|
160
|
+
import ModalSelect from '#cwa/runtime/templates/components/core/admin/form/ModalSelect.vue'
|
|
161
|
+
import ModalInput from '#cwa/runtime/templates/components/core/admin/form/ModalInput.vue'
|
|
162
|
+
|
|
163
|
+
const emit = defineEmits<{
|
|
164
|
+
close: []
|
|
165
|
+
reload: []
|
|
166
|
+
}>()
|
|
167
|
+
|
|
168
|
+
const { isAdding, isLoading, isUpdating, localResourceData, formatDate, deleteResource, saveResource, saveTitle } = useItemPage({
|
|
169
|
+
createEndpoint: '/users',
|
|
170
|
+
emit,
|
|
171
|
+
resourceType: 'User',
|
|
172
|
+
defaultResource: {
|
|
173
|
+
enabled: true,
|
|
174
|
+
roles: ['ROLE_USER'],
|
|
175
|
+
},
|
|
176
|
+
validate: (data) => {
|
|
177
|
+
if (data?.plainPassword) {
|
|
178
|
+
if (data.plainPassword !== data.repeatPassword) {
|
|
179
|
+
return 'The passwords entered do not match'
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return true
|
|
183
|
+
},
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
const roleOptions: SelectOption[] = [
|
|
187
|
+
{
|
|
188
|
+
label: 'User',
|
|
189
|
+
value: 'ROLE_USER',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
label: 'Admin',
|
|
193
|
+
value: 'ROLE_ADMIN',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: 'Super Admin',
|
|
197
|
+
value: 'ROLE_SUPER_ADMIN',
|
|
198
|
+
},
|
|
199
|
+
]
|
|
200
|
+
|
|
201
|
+
const tabs = computed<ResourceModalTab[]>(() => {
|
|
202
|
+
const t: ResourceModalTab[] = [
|
|
203
|
+
{
|
|
204
|
+
label: 'Details',
|
|
205
|
+
id: 'details',
|
|
206
|
+
},
|
|
207
|
+
]
|
|
208
|
+
if (!isAdding.value) {
|
|
209
|
+
t.push({
|
|
210
|
+
label: 'Password',
|
|
211
|
+
id: 'password',
|
|
212
|
+
})
|
|
213
|
+
t.push({
|
|
214
|
+
label: 'Info',
|
|
215
|
+
id: 'info',
|
|
216
|
+
})
|
|
217
|
+
}
|
|
218
|
+
return t
|
|
219
|
+
})
|
|
220
|
+
|
|
221
|
+
function handleDeleteClick() {
|
|
222
|
+
deleteResource()
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function getHighestRole() {
|
|
226
|
+
const resourceRoles = localResourceData.value?.roles
|
|
227
|
+
if (!Array.isArray(resourceRoles)) {
|
|
228
|
+
return
|
|
229
|
+
}
|
|
230
|
+
const reversed = roleOptions.slice().reverse()
|
|
231
|
+
for (const roleOption of reversed) {
|
|
232
|
+
if (resourceRoles.includes(roleOption.value)) {
|
|
233
|
+
return roleOption.value
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const selectRole = ref(getHighestRole())
|
|
238
|
+
|
|
239
|
+
watch(localResourceData, () => {
|
|
240
|
+
selectRole.value = getHighestRole()
|
|
241
|
+
})
|
|
242
|
+
watch(selectRole, (newRole) => {
|
|
243
|
+
if (!localResourceData.value) {
|
|
244
|
+
return
|
|
245
|
+
}
|
|
246
|
+
localResourceData.value.roles = [newRole]
|
|
247
|
+
})
|
|
248
|
+
</script>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<ListHeading
|
|
4
|
+
title="Users"
|
|
5
|
+
@add="goToAdd"
|
|
6
|
+
/>
|
|
7
|
+
<ListFilter
|
|
8
|
+
:order-options="orderOptions"
|
|
9
|
+
:search-fields="['emailAddress', 'username']"
|
|
10
|
+
/>
|
|
11
|
+
<ListContent
|
|
12
|
+
ref="listContent"
|
|
13
|
+
fetch-url="/users"
|
|
14
|
+
>
|
|
15
|
+
<template #item="{ data }">
|
|
16
|
+
<div
|
|
17
|
+
class="cwa:flex cwa:border-b cwa:border-b-stone-700 cwa:py-6 cwa:gap-x-4 cwa:items-center"
|
|
18
|
+
:class="{ 'cwa:opacity-50': !data.enabled }"
|
|
19
|
+
>
|
|
20
|
+
<div class="cwa:grow cwa:flex cwa:flex-col cwa:gap-y-1">
|
|
21
|
+
<span class="cwa:text-xl">{{ data.username }} <span class="cwa:text-stone-400 cwa:text-sm">{{ getUserRole(data.roles) }}</span></span>
|
|
22
|
+
<span>{{ data.emailAddress }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
<div>
|
|
25
|
+
<CwaUiFormButton :to="computedItemLink(data['@id'])">
|
|
26
|
+
<CwaUiIconCogIcon class="cwa:w-6" />
|
|
27
|
+
<span class="cwa:sr-only">Settings</span>
|
|
28
|
+
</CwaUiFormButton>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
</ListContent>
|
|
33
|
+
<ResourceModalOverlay @reload="triggerReload" />
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script lang="ts" setup>
|
|
38
|
+
import { ref } from 'vue'
|
|
39
|
+
import { useHead } from '#app'
|
|
40
|
+
import ListHeading from '#cwa/runtime/templates/components/core/admin/ListHeading.vue'
|
|
41
|
+
import ListContent from '#cwa/runtime/templates/components/core/admin/ListContent.vue'
|
|
42
|
+
import { CwaUserRoles } from '#cwa/runtime/storage/stores/auth/state'
|
|
43
|
+
import ListFilter from '#cwa/runtime/templates/components/core/admin/ListFilter.vue'
|
|
44
|
+
import ResourceModalOverlay from '#cwa/runtime/templates/components/core/admin/ResourceModalOverlay.vue'
|
|
45
|
+
import { useListPage } from '#cwa/layer/pages/_cwa/composables/useListPage'
|
|
46
|
+
|
|
47
|
+
const listContent = ref<InstanceType<typeof ListContent> | null>(null)
|
|
48
|
+
|
|
49
|
+
const { goToAdd, triggerReload, computedItemLink } = useListPage(listContent)
|
|
50
|
+
|
|
51
|
+
const orderOptions = [
|
|
52
|
+
{
|
|
53
|
+
label: 'New - Old',
|
|
54
|
+
value: { createdAt: 'desc' },
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: 'Old - New',
|
|
58
|
+
value: { createdAt: 'asc' },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'A - Z',
|
|
62
|
+
value: { username: 'asc' },
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'Z - A',
|
|
66
|
+
value: { username: 'desc' },
|
|
67
|
+
},
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
function getUserRole(roles: CwaUserRoles[]) {
|
|
71
|
+
if (roles.includes(CwaUserRoles.SUPER_ADMIN)) {
|
|
72
|
+
return 'Super Admin'
|
|
73
|
+
}
|
|
74
|
+
if (roles.includes(CwaUserRoles.ADMIN)) {
|
|
75
|
+
return 'Admin'
|
|
76
|
+
}
|
|
77
|
+
if (roles.includes(CwaUserRoles.USER)) {
|
|
78
|
+
return 'User'
|
|
79
|
+
}
|
|
80
|
+
return 'Unknown'
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
useHead({
|
|
84
|
+
title: 'Users',
|
|
85
|
+
})
|
|
86
|
+
</script>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cwa:flex cwa:flex-col cwa:h-full">
|
|
3
|
+
<div class="cwa:bg-stone-800 cwa:text-white cwa:grow">
|
|
4
|
+
<NuxtPage />
|
|
5
|
+
</div>
|
|
6
|
+
<div class="cwa:text-stone-600 p-6 cwa:flex cwa:justify-center">
|
|
7
|
+
<NuxtLink
|
|
8
|
+
to="https://cwa.rocks"
|
|
9
|
+
target="_blank"
|
|
10
|
+
rel="noopener"
|
|
11
|
+
>
|
|
12
|
+
<CwaLogo class="cwa:h-5 cwa:w-auto" /><span class="cwa:sr-only">Components Web App</span>
|
|
13
|
+
</NuxtLink>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts" setup>
|
|
19
|
+
import { onBeforeMount } from 'vue'
|
|
20
|
+
import { navigateTo, useHead } from '#app'
|
|
21
|
+
import { definePageMeta, useCwa } from '#imports'
|
|
22
|
+
|
|
23
|
+
const $cwa = useCwa()
|
|
24
|
+
|
|
25
|
+
onBeforeMount(async () => {
|
|
26
|
+
if (!$cwa.auth.isAdmin.value) {
|
|
27
|
+
await navigateTo('/')
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
definePageMeta({
|
|
32
|
+
cwa: {
|
|
33
|
+
disabled: true,
|
|
34
|
+
admin: true,
|
|
35
|
+
},
|
|
36
|
+
layout: 'cwa-root-layout',
|
|
37
|
+
})
|
|
38
|
+
useHead({
|
|
39
|
+
bodyAttrs: {
|
|
40
|
+
class: 'cwa:bg-stone-800',
|
|
41
|
+
},
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CwaAuthForgotPasswordPage
|
|
3
|
+
v-model="credentials"
|
|
4
|
+
:error="error"
|
|
5
|
+
:submitting="submitting"
|
|
6
|
+
:success="success"
|
|
7
|
+
@submit="doSubmit"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import { useHead } from '#app'
|
|
13
|
+
import { definePageMeta, useForgotPassword } from '#imports'
|
|
14
|
+
import { CwaAuthForgotPasswordPage } from '#components'
|
|
15
|
+
|
|
16
|
+
const { doSubmit, credentials, error, submitting, success } = useForgotPassword()
|
|
17
|
+
|
|
18
|
+
definePageMeta({
|
|
19
|
+
cwa: {
|
|
20
|
+
disabled: true,
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
useHead({
|
|
25
|
+
bodyAttrs: {
|
|
26
|
+
class: 'cwa:h-full',
|
|
27
|
+
},
|
|
28
|
+
htmlAttrs: {
|
|
29
|
+
class: 'cwa:h-full cwa:bg-neutral-900',
|
|
30
|
+
},
|
|
31
|
+
})
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CwaAuthLoginPage
|
|
3
|
+
v-model="credentials"
|
|
4
|
+
:error="error"
|
|
5
|
+
:submitting="submitting"
|
|
6
|
+
submit-button-text="Sign In"
|
|
7
|
+
@submit="signIn"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup lang="ts">
|
|
12
|
+
import { useHead } from '#app'
|
|
13
|
+
import { CwaAuthLoginPage } from '#components'
|
|
14
|
+
import { definePageMeta, useLogin } from '#imports'
|
|
15
|
+
|
|
16
|
+
const { error, submitting, signIn, credentials } = useLogin()
|
|
17
|
+
|
|
18
|
+
definePageMeta({
|
|
19
|
+
cwa: {
|
|
20
|
+
disabled: true,
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
useHead({
|
|
25
|
+
title: 'Login',
|
|
26
|
+
bodyAttrs: {
|
|
27
|
+
class: 'cwa:h-full',
|
|
28
|
+
},
|
|
29
|
+
htmlAttrs: {
|
|
30
|
+
class: 'cwa:h-full cwa:bg-neutral-900',
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CwaAuthResetPasswordPage
|
|
3
|
+
v-model="passwords"
|
|
4
|
+
:error="error"
|
|
5
|
+
:submitting="submitting"
|
|
6
|
+
:success="success"
|
|
7
|
+
:input-errors="inputErrors"
|
|
8
|
+
@submit="resetPassword"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { useHead } from '#app'
|
|
14
|
+
import { definePageMeta, useResetPassword } from '#imports'
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
error,
|
|
18
|
+
submitting,
|
|
19
|
+
success,
|
|
20
|
+
passwords,
|
|
21
|
+
inputErrors,
|
|
22
|
+
resetPassword,
|
|
23
|
+
} = useResetPassword()
|
|
24
|
+
|
|
25
|
+
definePageMeta({
|
|
26
|
+
cwa: {
|
|
27
|
+
disabled: true,
|
|
28
|
+
},
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
useHead({
|
|
32
|
+
bodyAttrs: {
|
|
33
|
+
class: 'cwa:h-full',
|
|
34
|
+
},
|
|
35
|
+
htmlAttrs: {
|
|
36
|
+
class: 'cwa:h-full cwa:bg-neutral-900',
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import { GlobalComponents, DefineComponent } from 'vue';
|
|
3
|
+
|
|
4
|
+
type GlobalComponentNames = keyof GlobalComponents;
|
|
5
|
+
type ManagerTab = GlobalComponentNames | DefineComponent<object, object, any>;
|
|
6
|
+
type ComponentUi = GlobalComponentNames;
|
|
7
|
+
interface CwaResourceMeta {
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
instantAdd?: boolean;
|
|
11
|
+
managerTabs?: ManagerTab[];
|
|
12
|
+
ui?: ComponentUi[];
|
|
13
|
+
}
|
|
14
|
+
interface CwaResourcesMeta {
|
|
15
|
+
[type: string]: CwaResourceMeta;
|
|
16
|
+
}
|
|
17
|
+
interface CwaUiMeta {
|
|
18
|
+
name?: string;
|
|
19
|
+
classes?: {
|
|
20
|
+
[name: string]: string[] | string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
interface CwaModuleOptions {
|
|
24
|
+
appName: string;
|
|
25
|
+
storeName: string;
|
|
26
|
+
apiUrl?: string;
|
|
27
|
+
apiUrlBrowser?: string;
|
|
28
|
+
pagesDepth?: number;
|
|
29
|
+
resources?: CwaResourcesMeta;
|
|
30
|
+
layouts?: {
|
|
31
|
+
[type: string]: CwaUiMeta;
|
|
32
|
+
};
|
|
33
|
+
pages?: {
|
|
34
|
+
[type: string]: CwaUiMeta;
|
|
35
|
+
};
|
|
36
|
+
pageData?: {
|
|
37
|
+
[resourceClass: string]: Pick<CwaUiMeta, 'name'>;
|
|
38
|
+
};
|
|
39
|
+
layoutName?: string;
|
|
40
|
+
}
|
|
41
|
+
declare module '@nuxt/schema' {
|
|
42
|
+
interface PublicRuntimeConfig {
|
|
43
|
+
cwa: {
|
|
44
|
+
apiUrl: string;
|
|
45
|
+
apiUrlBrowser: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
declare const NAME: "@cwa/nuxt";
|
|
50
|
+
declare const _default: _nuxt_schema.NuxtModule<CwaModuleOptions, CwaModuleOptions, false>;
|
|
51
|
+
|
|
52
|
+
export { NAME, _default as default };
|
|
53
|
+
export type { ComponentUi, CwaModuleOptions, CwaResourceMeta, CwaResourcesMeta, CwaUiMeta, GlobalComponentNames, ManagerTab };
|