@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.
Files changed (387) hide show
  1. package/README.md +38 -0
  2. package/README.template.md +32 -0
  3. package/dist/layer/error.vue +13 -0
  4. package/dist/layer/layouts/CwaRootLayout.vue +140 -0
  5. package/dist/layer/nuxt.config.spec.ts +10 -0
  6. package/dist/layer/nuxt.config.ts +3 -0
  7. package/dist/layer/pages/_cwa/composables/useDataList.ts +50 -0
  8. package/dist/layer/pages/_cwa/composables/useDataType.ts +30 -0
  9. package/dist/layer/pages/_cwa/composables/useDynamicPageLoader.ts +28 -0
  10. package/dist/layer/pages/_cwa/composables/useItemPage.ts +172 -0
  11. package/dist/layer/pages/_cwa/composables/useListPage.ts +43 -0
  12. package/dist/layer/pages/_cwa/data/[type]/[iri].vue +17 -0
  13. package/dist/layer/pages/_cwa/data/[type].vue +131 -0
  14. package/dist/layer/pages/_cwa/data/index.vue +84 -0
  15. package/dist/layer/pages/_cwa/layouts/[iri].vue +174 -0
  16. package/dist/layer/pages/_cwa/layouts.vue +77 -0
  17. package/dist/layer/pages/_cwa/pages/[iri].vue +11 -0
  18. package/dist/layer/pages/_cwa/pages.vue +129 -0
  19. package/dist/layer/pages/_cwa/routes.vue +72 -0
  20. package/dist/layer/pages/_cwa/users/[iri].vue +248 -0
  21. package/dist/layer/pages/_cwa/users.vue +86 -0
  22. package/dist/layer/pages/_cwa.vue +43 -0
  23. package/dist/layer/pages/forgot-password.vue +32 -0
  24. package/dist/layer/pages/login.vue +33 -0
  25. package/dist/layer/pages/reset-password/[username]/[token].vue +39 -0
  26. package/dist/module.d.mts +53 -0
  27. package/dist/module.json +13 -0
  28. package/dist/module.mjs +235 -0
  29. package/dist/runtime/admin/admin.d.ts +36 -0
  30. package/dist/runtime/admin/admin.js +65 -0
  31. package/dist/runtime/admin/manageable-resource.d.ts +41 -0
  32. package/dist/runtime/admin/manageable-resource.js +206 -0
  33. package/dist/runtime/admin/manager-tabs-resolver.d.ts +17 -0
  34. package/dist/runtime/admin/manager-tabs-resolver.js +51 -0
  35. package/dist/runtime/admin/navigation-guard.d.ts +18 -0
  36. package/dist/runtime/admin/navigation-guard.js +55 -0
  37. package/dist/runtime/admin/resource-stack-manager.d.ts +92 -0
  38. package/dist/runtime/admin/resource-stack-manager.js +355 -0
  39. package/dist/runtime/api/api-documentation.d.ts +28 -0
  40. package/dist/runtime/api/api-documentation.js +131 -0
  41. package/dist/runtime/api/auth.d.ts +85 -0
  42. package/dist/runtime/api/auth.js +183 -0
  43. package/dist/runtime/api/fetcher/cwa-fetch.d.ts +5 -0
  44. package/dist/runtime/api/fetcher/cwa-fetch.js +20 -0
  45. package/dist/runtime/api/fetcher/fetch-status-manager.d.ts +51 -0
  46. package/dist/runtime/api/fetcher/fetch-status-manager.js +185 -0
  47. package/dist/runtime/api/fetcher/fetcher.d.ts +57 -0
  48. package/dist/runtime/api/fetcher/fetcher.js +222 -0
  49. package/dist/runtime/api/fetcher/preload-headers.d.ts +6 -0
  50. package/dist/runtime/api/fetcher/preload-headers.js +31 -0
  51. package/dist/runtime/api/forms.d.ts +40 -0
  52. package/dist/runtime/api/forms.js +40 -0
  53. package/dist/runtime/api/mercure.d.ts +33 -0
  54. package/dist/runtime/api/mercure.js +191 -0
  55. package/dist/runtime/composables/component/html-content.d.ts +2 -0
  56. package/dist/runtime/composables/component/html-content.js +82 -0
  57. package/dist/runtime/composables/cwa-collection-pagination.d.ts +13 -0
  58. package/dist/runtime/composables/cwa-collection-pagination.js +34 -0
  59. package/dist/runtime/composables/cwa-collection-resource.d.ts +16 -0
  60. package/dist/runtime/composables/cwa-collection-resource.js +92 -0
  61. package/dist/runtime/composables/cwa-image.d.ts +19 -0
  62. package/dist/runtime/composables/cwa-image.js +43 -0
  63. package/dist/runtime/composables/cwa-query-bound-model.d.ts +9 -0
  64. package/dist/runtime/composables/cwa-query-bound-model.js +108 -0
  65. package/dist/runtime/composables/cwa-resource-endpoint.d.ts +5 -0
  66. package/dist/runtime/composables/cwa-resource-endpoint.js +36 -0
  67. package/dist/runtime/composables/cwa-resource-manageable.d.ts +10 -0
  68. package/dist/runtime/composables/cwa-resource-manageable.js +32 -0
  69. package/dist/runtime/composables/cwa-resource-manager-tab.d.ts +17 -0
  70. package/dist/runtime/composables/cwa-resource-manager-tab.js +30 -0
  71. package/dist/runtime/composables/cwa-resource-model.d.ts +21 -0
  72. package/dist/runtime/composables/cwa-resource-model.js +149 -0
  73. package/dist/runtime/composables/cwa-resource-upload.d.ts +8 -0
  74. package/dist/runtime/composables/cwa-resource-upload.js +70 -0
  75. package/dist/runtime/composables/cwa-resource.d.ts +24 -0
  76. package/dist/runtime/composables/cwa-resource.js +22 -0
  77. package/dist/runtime/composables/cwa-select-input.d.ts +21 -0
  78. package/dist/runtime/composables/cwa-select-input.js +37 -0
  79. package/dist/runtime/composables/cwa-select.d.ts +15 -0
  80. package/dist/runtime/composables/cwa-select.js +24 -0
  81. package/dist/runtime/composables/cwa.d.ts +2 -0
  82. package/dist/runtime/composables/cwa.js +2 -0
  83. package/dist/runtime/composables/forgot-password.d.ts +9 -0
  84. package/dist/runtime/composables/forgot-password.js +45 -0
  85. package/dist/runtime/composables/login.d.ts +9 -0
  86. package/dist/runtime/composables/login.js +30 -0
  87. package/dist/runtime/composables/popper.d.ts +529 -0
  88. package/dist/runtime/composables/popper.js +104 -0
  89. package/dist/runtime/composables/process.d.ts +4 -0
  90. package/dist/runtime/composables/process.js +6 -0
  91. package/dist/runtime/composables/reset-password.d.ts +14 -0
  92. package/dist/runtime/composables/reset-password.js +75 -0
  93. package/dist/runtime/composables/transitions.d.ts +12 -0
  94. package/dist/runtime/composables/transitions.js +12 -0
  95. package/dist/runtime/cwa.d.ts +61 -0
  96. package/dist/runtime/cwa.js +123 -0
  97. package/dist/runtime/errors/cwa-resource-error.d.ts +18 -0
  98. package/dist/runtime/errors/cwa-resource-error.js +54 -0
  99. package/dist/runtime/plugin.d.ts +7 -0
  100. package/dist/runtime/plugin.js +18 -0
  101. package/dist/runtime/resources/resource-utils.d.ts +44 -0
  102. package/dist/runtime/resources/resource-utils.js +73 -0
  103. package/dist/runtime/resources/resources-manager.d.ts +70 -0
  104. package/dist/runtime/resources/resources-manager.js +463 -0
  105. package/dist/runtime/resources/resources.d.ts +53 -0
  106. package/dist/runtime/resources/resources.js +300 -0
  107. package/dist/runtime/route-middleware.d.ts +2 -0
  108. package/dist/runtime/route-middleware.js +86 -0
  109. package/dist/runtime/storage/storage.d.ts +20 -0
  110. package/dist/runtime/storage/storage.js +25 -0
  111. package/dist/runtime/storage/stores/admin/actions.d.ts +5 -0
  112. package/dist/runtime/storage/stores/admin/actions.js +10 -0
  113. package/dist/runtime/storage/stores/admin/admin-store.d.ts +18 -0
  114. package/dist/runtime/storage/stores/admin/admin-store.js +20 -0
  115. package/dist/runtime/storage/stores/admin/state.d.ts +7 -0
  116. package/dist/runtime/storage/stores/admin/state.js +9 -0
  117. package/dist/runtime/storage/stores/api-documentation/api-documentation-store.d.ts +16 -0
  118. package/dist/runtime/storage/stores/api-documentation/api-documentation-store.js +18 -0
  119. package/dist/runtime/storage/stores/api-documentation/state.d.ts +74 -0
  120. package/dist/runtime/storage/stores/api-documentation/state.js +6 -0
  121. package/dist/runtime/storage/stores/auth/auth-store.d.ts +16 -0
  122. package/dist/runtime/storage/stores/auth/auth-store.js +18 -0
  123. package/dist/runtime/storage/stores/auth/state.d.ts +20 -0
  124. package/dist/runtime/storage/stores/auth/state.js +15 -0
  125. package/dist/runtime/storage/stores/cwa-store-types.d.ts +14 -0
  126. package/dist/runtime/storage/stores/error/actions.d.ts +11 -0
  127. package/dist/runtime/storage/stores/error/actions.js +69 -0
  128. package/dist/runtime/storage/stores/error/error-store.d.ts +13 -0
  129. package/dist/runtime/storage/stores/error/error-store.js +21 -0
  130. package/dist/runtime/storage/stores/error/getters.d.ts +7 -0
  131. package/dist/runtime/storage/stores/error/getters.js +11 -0
  132. package/dist/runtime/storage/stores/error/state.d.ts +35 -0
  133. package/dist/runtime/storage/stores/error/state.js +15 -0
  134. package/dist/runtime/storage/stores/fetcher/actions.d.ts +49 -0
  135. package/dist/runtime/storage/stores/fetcher/actions.js +125 -0
  136. package/dist/runtime/storage/stores/fetcher/fetcher-store.d.ts +19 -0
  137. package/dist/runtime/storage/stores/fetcher/fetcher-store.js +23 -0
  138. package/dist/runtime/storage/stores/fetcher/getter-utils.d.ts +7 -0
  139. package/dist/runtime/storage/stores/fetcher/getter-utils.js +27 -0
  140. package/dist/runtime/storage/stores/fetcher/getters.d.ts +13 -0
  141. package/dist/runtime/storage/stores/fetcher/getters.js +52 -0
  142. package/dist/runtime/storage/stores/fetcher/state.d.ts +25 -0
  143. package/dist/runtime/storage/stores/fetcher/state.js +7 -0
  144. package/dist/runtime/storage/stores/mercure/mercure-store.d.ts +16 -0
  145. package/dist/runtime/storage/stores/mercure/mercure-store.js +18 -0
  146. package/dist/runtime/storage/stores/mercure/state.d.ts +5 -0
  147. package/dist/runtime/storage/stores/mercure/state.js +6 -0
  148. package/dist/runtime/storage/stores/resources/actions.d.ts +54 -0
  149. package/dist/runtime/storage/stores/resources/actions.js +390 -0
  150. package/dist/runtime/storage/stores/resources/getter-utils.d.ts +7 -0
  151. package/dist/runtime/storage/stores/resources/getter-utils.js +27 -0
  152. package/dist/runtime/storage/stores/resources/getters.d.ts +38 -0
  153. package/dist/runtime/storage/stores/resources/getters.js +251 -0
  154. package/dist/runtime/storage/stores/resources/resources-store.d.ts +19 -0
  155. package/dist/runtime/storage/stores/resources/resources-store.js +23 -0
  156. package/dist/runtime/storage/stores/resources/state.d.ts +64 -0
  157. package/dist/runtime/storage/stores/resources/state.js +24 -0
  158. package/dist/runtime/templates/assets/base.css +1 -0
  159. package/dist/runtime/templates/assets/cwa.css +1 -0
  160. package/dist/runtime/templates/components/core/ComponentPlaceholder.vue +18 -0
  161. package/dist/runtime/templates/components/core/ComponentPlaceholder.vue.d.ts +3 -0
  162. package/dist/runtime/templates/components/core/ComponentPosition.spec.ts.snap +16 -0
  163. package/dist/runtime/templates/components/core/ComponentPosition.vue +63 -0
  164. package/dist/runtime/templates/components/core/ComponentPosition.vue.d.ts +3 -0
  165. package/dist/runtime/templates/components/core/ConfirmDialog.vue +41 -0
  166. package/dist/runtime/templates/components/core/ConfirmDialog.vue.d.ts +9 -0
  167. package/dist/runtime/templates/components/core/DialogBox.vue +95 -0
  168. package/dist/runtime/templates/components/core/DialogBox.vue.d.ts +38 -0
  169. package/dist/runtime/templates/components/core/README.md +1 -0
  170. package/dist/runtime/templates/components/core/ResourceLoader.spec.ts.snap +39 -0
  171. package/dist/runtime/templates/components/core/ResourceLoader.vue +151 -0
  172. package/dist/runtime/templates/components/core/ResourceLoader.vue.d.ts +13 -0
  173. package/dist/runtime/templates/components/core/admin/ListContainer.vue +7 -0
  174. package/dist/runtime/templates/components/core/admin/ListContainer.vue.d.ts +12 -0
  175. package/dist/runtime/templates/components/core/admin/ListContent.vue +136 -0
  176. package/dist/runtime/templates/components/core/admin/ListContent.vue.d.ts +21 -0
  177. package/dist/runtime/templates/components/core/admin/ListFilter.vue +49 -0
  178. package/dist/runtime/templates/components/core/admin/ListFilter.vue.d.ts +9 -0
  179. package/dist/runtime/templates/components/core/admin/ListFilterButton.vue +53 -0
  180. package/dist/runtime/templates/components/core/admin/ListFilterButton.vue.d.ts +9 -0
  181. package/dist/runtime/templates/components/core/admin/ListHeading.vue +32 -0
  182. package/dist/runtime/templates/components/core/admin/ListHeading.vue.d.ts +20 -0
  183. package/dist/runtime/templates/components/core/admin/ListPagination.vue +87 -0
  184. package/dist/runtime/templates/components/core/admin/ListPagination.vue.d.ts +15 -0
  185. package/dist/runtime/templates/components/core/admin/ListPaginationButton.vue +18 -0
  186. package/dist/runtime/templates/components/core/admin/ListPaginationButton.vue.d.ts +16 -0
  187. package/dist/runtime/templates/components/core/admin/PageAdminModal.vue +260 -0
  188. package/dist/runtime/templates/components/core/admin/PageAdminModal.vue.d.ts +12 -0
  189. package/dist/runtime/templates/components/core/admin/PageDataAdminModal.vue +187 -0
  190. package/dist/runtime/templates/components/core/admin/PageDataAdminModal.vue.d.ts +13 -0
  191. package/dist/runtime/templates/components/core/admin/ResourceModal.vue +99 -0
  192. package/dist/runtime/templates/components/core/admin/ResourceModal.vue.d.ts +27 -0
  193. package/dist/runtime/templates/components/core/admin/ResourceModalOverlay.vue +27 -0
  194. package/dist/runtime/templates/components/core/admin/ResourceModalOverlay.vue.d.ts +6 -0
  195. package/dist/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.vue +23 -0
  196. package/dist/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.vue.d.ts +15 -0
  197. package/dist/runtime/templates/components/core/admin/ResourceModalTabs.vue +77 -0
  198. package/dist/runtime/templates/components/core/admin/ResourceModalTabs.vue.d.ts +19 -0
  199. package/dist/runtime/templates/components/core/admin/RouteListRow.vue +102 -0
  200. package/dist/runtime/templates/components/core/admin/RouteListRow.vue.d.ts +20 -0
  201. package/dist/runtime/templates/components/core/admin/RouteRedirectsTree.vue +52 -0
  202. package/dist/runtime/templates/components/core/admin/RouteRedirectsTree.vue.d.ts +10 -0
  203. package/dist/runtime/templates/components/core/admin/RoutesTab.vue +273 -0
  204. package/dist/runtime/templates/components/core/admin/RoutesTab.vue.d.ts +12 -0
  205. package/dist/runtime/templates/components/core/admin/form/FilterFormWrapper.vue +18 -0
  206. package/dist/runtime/templates/components/core/admin/form/FilterFormWrapper.vue.d.ts +16 -0
  207. package/dist/runtime/templates/components/core/admin/form/FilterSelect.vue +86 -0
  208. package/dist/runtime/templates/components/core/admin/form/FilterSelect.vue.d.ts +3 -0
  209. package/dist/runtime/templates/components/core/admin/form/ModalInfo.vue +23 -0
  210. package/dist/runtime/templates/components/core/admin/form/ModalInfo.vue.d.ts +16 -0
  211. package/dist/runtime/templates/components/core/admin/form/ModalInput.vue +30 -0
  212. package/dist/runtime/templates/components/core/admin/form/ModalInput.vue.d.ts +15 -0
  213. package/dist/runtime/templates/components/core/admin/form/ModalSelect.vue +99 -0
  214. package/dist/runtime/templates/components/core/admin/form/ModalSelect.vue.d.ts +6 -0
  215. package/dist/runtime/templates/components/core/admin/form/PageTypeSelect.vue +112 -0
  216. package/dist/runtime/templates/components/core/admin/form/PageTypeSelect.vue.d.ts +4 -0
  217. package/dist/runtime/templates/components/core/assets/CwaLogo.vue +21 -0
  218. package/dist/runtime/templates/components/core/assets/CwaLogo.vue.d.ts +2 -0
  219. package/dist/runtime/templates/components/core/assets/IconComponents.vue +15 -0
  220. package/dist/runtime/templates/components/core/assets/IconComponents.vue.d.ts +2 -0
  221. package/dist/runtime/templates/components/core/assets/IconData.vue +24 -0
  222. package/dist/runtime/templates/components/core/assets/IconData.vue.d.ts +2 -0
  223. package/dist/runtime/templates/components/core/assets/IconLayouts.vue +20 -0
  224. package/dist/runtime/templates/components/core/assets/IconLayouts.vue.d.ts +2 -0
  225. package/dist/runtime/templates/components/core/assets/IconPages.vue +21 -0
  226. package/dist/runtime/templates/components/core/assets/IconPages.vue.d.ts +2 -0
  227. package/dist/runtime/templates/components/core/assets/IconRoutes.vue +23 -0
  228. package/dist/runtime/templates/components/core/assets/IconRoutes.vue.d.ts +2 -0
  229. package/dist/runtime/templates/components/core/assets/IconUsers.vue +13 -0
  230. package/dist/runtime/templates/components/core/assets/IconUsers.vue.d.ts +2 -0
  231. package/dist/runtime/templates/components/core/useDataResolver.d.ts +12 -0
  232. package/dist/runtime/templates/components/core/useDataResolver.js +109 -0
  233. package/dist/runtime/templates/components/main/ComponentGroup.Util.Positions.d.ts +6 -0
  234. package/dist/runtime/templates/components/main/ComponentGroup.Util.Positions.js +164 -0
  235. package/dist/runtime/templates/components/main/ComponentGroup.Util.Synchronizer.d.ts +20 -0
  236. package/dist/runtime/templates/components/main/ComponentGroup.Util.Synchronizer.js +69 -0
  237. package/dist/runtime/templates/components/main/ComponentGroup.spec.ts.snap +59 -0
  238. package/dist/runtime/templates/components/main/ComponentGroup.vue +107 -0
  239. package/dist/runtime/templates/components/main/ComponentGroup.vue.d.ts +9 -0
  240. package/dist/runtime/templates/components/main/CwaLink.vue +51 -0
  241. package/dist/runtime/templates/components/main/CwaLink.vue.d.ts +14 -0
  242. package/dist/runtime/templates/components/main/DefaultLayout.vue +8 -0
  243. package/dist/runtime/templates/components/main/DefaultLayout.vue.d.ts +12 -0
  244. package/dist/runtime/templates/components/main/ErrorPage.vue +98 -0
  245. package/dist/runtime/templates/components/main/ErrorPage.vue.d.ts +6 -0
  246. package/dist/runtime/templates/components/main/Logo.vue +18 -0
  247. package/dist/runtime/templates/components/main/Logo.vue.d.ts +2 -0
  248. package/dist/runtime/templates/components/main/README.md +7 -0
  249. package/dist/runtime/templates/components/main/admin/_common/ResourceContextItem.vue +41 -0
  250. package/dist/runtime/templates/components/main/admin/_common/ResourceContextItem.vue.d.ts +7 -0
  251. package/dist/runtime/templates/components/main/admin/_common/ResourceLoadingIndicator.vue +48 -0
  252. package/dist/runtime/templates/components/main/admin/_common/ResourceLoadingIndicator.vue.d.ts +2 -0
  253. package/dist/runtime/templates/components/main/admin/_common/useDynamicPositionSelectOptions.d.ts +5 -0
  254. package/dist/runtime/templates/components/main/admin/_common/useDynamicPositionSelectOptions.js +19 -0
  255. package/dist/runtime/templates/components/main/admin/header/Header.vue +207 -0
  256. package/dist/runtime/templates/components/main/admin/header/Header.vue.d.ts +2 -0
  257. package/dist/runtime/templates/components/main/admin/header/_parts/Menu.vue +189 -0
  258. package/dist/runtime/templates/components/main/admin/header/_parts/Menu.vue.d.ts +2 -0
  259. package/dist/runtime/templates/components/main/admin/header/_parts/MenuLink.vue +14 -0
  260. package/dist/runtime/templates/components/main/admin/header/_parts/MenuLink.vue.d.ts +16 -0
  261. package/dist/runtime/templates/components/main/admin/header/_parts/MenuPrimaryLink.vue +19 -0
  262. package/dist/runtime/templates/components/main/admin/header/_parts/MenuPrimaryLink.vue.d.ts +15 -0
  263. package/dist/runtime/templates/components/main/admin/header/_parts/Notification.vue +69 -0
  264. package/dist/runtime/templates/components/main/admin/header/_parts/Notification.vue.d.ts +12 -0
  265. package/dist/runtime/templates/components/main/admin/header/_parts/OutdatedContentNotice.vue +19 -0
  266. package/dist/runtime/templates/components/main/admin/header/_parts/OutdatedContentNotice.vue.d.ts +2 -0
  267. package/dist/runtime/templates/components/main/admin/header/_parts/PathSelector.vue +79 -0
  268. package/dist/runtime/templates/components/main/admin/header/_parts/PathSelector.vue.d.ts +2 -0
  269. package/dist/runtime/templates/components/main/admin/header/_parts/RequestErrors.vue +52 -0
  270. package/dist/runtime/templates/components/main/admin/header/_parts/RequestErrors.vue.d.ts +2 -0
  271. package/dist/runtime/templates/components/main/admin/resource-manager/ComponentFocus.vue +151 -0
  272. package/dist/runtime/templates/components/main/admin/resource-manager/ComponentFocus.vue.d.ts +10 -0
  273. package/dist/runtime/templates/components/main/admin/resource-manager/LayoutPageOverlay.vue +192 -0
  274. package/dist/runtime/templates/components/main/admin/resource-manager/LayoutPageOverlay.vue.d.ts +6 -0
  275. package/dist/runtime/templates/components/main/admin/resource-manager/ResourceManager.vue +186 -0
  276. package/dist/runtime/templates/components/main/admin/resource-manager/ResourceManager.vue.d.ts +9 -0
  277. package/dist/runtime/templates/components/main/admin/resource-manager/_parts/AddComponentDialog.vue +205 -0
  278. package/dist/runtime/templates/components/main/admin/resource-manager/_parts/AddComponentDialog.vue.d.ts +2 -0
  279. package/dist/runtime/templates/components/main/admin/resource-manager/_parts/CwaResourceManagerContextMenu.vue +38 -0
  280. package/dist/runtime/templates/components/main/admin/resource-manager/_parts/CwaResourceManagerContextMenu.vue.d.ts +6 -0
  281. package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTab.vue +15 -0
  282. package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTab.vue.d.ts +7 -0
  283. package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTabs.vue +44 -0
  284. package/dist/runtime/templates/components/main/admin/resource-manager/_parts/ManagerTabs.vue.d.ts +13 -0
  285. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/ResourceInfoTab.vue +59 -0
  286. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/ResourceInfoTab.vue.d.ts +6 -0
  287. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Order.vue +75 -0
  288. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Order.vue.d.ts +6 -0
  289. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Publish.vue +41 -0
  290. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Publish.vue.d.ts +6 -0
  291. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Ui.vue +101 -0
  292. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/component/Ui.vue.d.ts +6 -0
  293. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/group/Group.vue +34 -0
  294. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/group/Group.vue.d.ts +6 -0
  295. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DataPage.vue +121 -0
  296. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DataPage.vue.d.ts +6 -0
  297. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DynamicPage.vue +52 -0
  298. package/dist/runtime/templates/components/main/admin/resource-manager/_tabs/position/DynamicPage.vue.d.ts +6 -0
  299. package/dist/runtime/templates/components/main/admin/resource-manager/cta/CurrentResourceCta.vue +99 -0
  300. package/dist/runtime/templates/components/main/admin/resource-manager/cta/CurrentResourceCta.vue.d.ts +7 -0
  301. package/dist/runtime/templates/components/main/admin/resource-manager/cta/NewResourceCta.vue +59 -0
  302. package/dist/runtime/templates/components/main/admin/resource-manager/cta/NewResourceCta.vue.d.ts +7 -0
  303. package/dist/runtime/templates/components/main/admin/resource-manager/cta/ResourceManagerCtaButton.vue +28 -0
  304. package/dist/runtime/templates/components/main/admin/resource-manager/cta/ResourceManagerCtaButton.vue.d.ts +2 -0
  305. package/dist/runtime/templates/components/main/auth/ForgotPasswordPage.vue +55 -0
  306. package/dist/runtime/templates/components/main/auth/ForgotPasswordPage.vue.d.ts +20 -0
  307. package/dist/runtime/templates/components/main/auth/LoginPage.vue +60 -0
  308. package/dist/runtime/templates/components/main/auth/LoginPage.vue.d.ts +23 -0
  309. package/dist/runtime/templates/components/main/auth/ResetPasswordPage.vue +59 -0
  310. package/dist/runtime/templates/components/main/auth/ResetPasswordPage.vue.d.ts +27 -0
  311. package/dist/runtime/templates/components/main/auth/_parts/AuthPageLink.spec.ts.snap +14 -0
  312. package/dist/runtime/templates/components/main/auth/_parts/AuthPageLink.vue +17 -0
  313. package/dist/runtime/templates/components/main/auth/_parts/AuthPageLink.vue.d.ts +6 -0
  314. package/dist/runtime/templates/components/main/auth/_parts/AuthTemplate.spec.ts.snap +90 -0
  315. package/dist/runtime/templates/components/main/auth/_parts/AuthTemplate.vue +45 -0
  316. package/dist/runtime/templates/components/main/auth/_parts/AuthTemplate.vue.d.ts +17 -0
  317. package/dist/runtime/templates/components/main/auth/_parts/InputField.spec.ts.snap +111 -0
  318. package/dist/runtime/templates/components/main/auth/_parts/InputField.vue +50 -0
  319. package/dist/runtime/templates/components/main/auth/_parts/InputField.vue.d.ts +17 -0
  320. package/dist/runtime/templates/components/ui/BackgroundParticles.vue +960 -0
  321. package/dist/runtime/templates/components/ui/BackgroundParticles.vue.d.ts +2 -0
  322. package/dist/runtime/templates/components/ui/Hamburger.vue +75 -0
  323. package/dist/runtime/templates/components/ui/Hamburger.vue.d.ts +9 -0
  324. package/dist/runtime/templates/components/ui/ProgressBar.spec.ts.snap +71 -0
  325. package/dist/runtime/templates/components/ui/ProgressBar.vue +29 -0
  326. package/dist/runtime/templates/components/ui/ProgressBar.vue.d.ts +9 -0
  327. package/dist/runtime/templates/components/ui/README.md +6 -0
  328. package/dist/runtime/templates/components/ui/alert/Info.spec.ts.snap +23 -0
  329. package/dist/runtime/templates/components/ui/alert/Info.vue +13 -0
  330. package/dist/runtime/templates/components/ui/alert/Info.vue.d.ts +12 -0
  331. package/dist/runtime/templates/components/ui/alert/Warning.spec.ts.snap +14 -0
  332. package/dist/runtime/templates/components/ui/alert/Warning.vue +8 -0
  333. package/dist/runtime/templates/components/ui/alert/Warning.vue.d.ts +12 -0
  334. package/dist/runtime/templates/components/ui/form/Button.vue +139 -0
  335. package/dist/runtime/templates/components/ui/form/Button.vue.d.ts +52 -0
  336. package/dist/runtime/templates/components/ui/form/ButtonPopoverGroup.vue +18 -0
  337. package/dist/runtime/templates/components/ui/form/ButtonPopoverGroup.vue.d.ts +10 -0
  338. package/dist/runtime/templates/components/ui/form/ButtonPopoverItem.vue +15 -0
  339. package/dist/runtime/templates/components/ui/form/ButtonPopoverItem.vue.d.ts +10 -0
  340. package/dist/runtime/templates/components/ui/form/File.vue +72 -0
  341. package/dist/runtime/templates/components/ui/form/File.vue.d.ts +9 -0
  342. package/dist/runtime/templates/components/ui/form/Input.vue +22 -0
  343. package/dist/runtime/templates/components/ui/form/Input.vue.d.ts +5 -0
  344. package/dist/runtime/templates/components/ui/form/LabelWrapper.vue +16 -0
  345. package/dist/runtime/templates/components/ui/form/LabelWrapper.vue.d.ts +15 -0
  346. package/dist/runtime/templates/components/ui/form/SearchResource.vue +212 -0
  347. package/dist/runtime/templates/components/ui/form/SearchResource.vue.d.ts +14 -0
  348. package/dist/runtime/templates/components/ui/form/Select.vue +60 -0
  349. package/dist/runtime/templates/components/ui/form/Select.vue.d.ts +3 -0
  350. package/dist/runtime/templates/components/ui/form/Toggle.vue +39 -0
  351. package/dist/runtime/templates/components/ui/form/Toggle.vue.d.ts +6 -0
  352. package/dist/runtime/templates/components/ui/icon/ArrowIcon.vue +30 -0
  353. package/dist/runtime/templates/components/ui/icon/ArrowIcon.vue.d.ts +2 -0
  354. package/dist/runtime/templates/components/ui/icon/BinIcon.vue +24 -0
  355. package/dist/runtime/templates/components/ui/icon/BinIcon.vue.d.ts +2 -0
  356. package/dist/runtime/templates/components/ui/icon/CogIcon.vue +9 -0
  357. package/dist/runtime/templates/components/ui/icon/CogIcon.vue.d.ts +2 -0
  358. package/dist/runtime/templates/components/ui/icon/EyeIcon.vue +24 -0
  359. package/dist/runtime/templates/components/ui/icon/EyeIcon.vue.d.ts +2 -0
  360. package/dist/runtime/templates/components/ui/icon/PenIcon.vue +12 -0
  361. package/dist/runtime/templates/components/ui/icon/PenIcon.vue.d.ts +2 -0
  362. package/dist/runtime/templates/components/ui/icon/PlusIcon.vue +9 -0
  363. package/dist/runtime/templates/components/ui/icon/PlusIcon.vue.d.ts +2 -0
  364. package/dist/runtime/templates/components/ui/icon/SearchIcon.vue +10 -0
  365. package/dist/runtime/templates/components/ui/icon/SearchIcon.vue.d.ts +2 -0
  366. package/dist/runtime/templates/components/ui/icon/TickIcon.vue +23 -0
  367. package/dist/runtime/templates/components/ui/icon/TickIcon.vue.d.ts +2 -0
  368. package/dist/runtime/templates/components/ui/icon/WarningIcon.vue +11 -0
  369. package/dist/runtime/templates/components/ui/icon/WarningIcon.vue.d.ts +2 -0
  370. package/dist/runtime/templates/components/ui/icon/XMarkIcon.vue +15 -0
  371. package/dist/runtime/templates/components/ui/icon/XMarkIcon.vue.d.ts +2 -0
  372. package/dist/runtime/templates/components/utils/ContextMenu.vue +59 -0
  373. package/dist/runtime/templates/components/utils/ContextMenu.vue.d.ts +21 -0
  374. package/dist/runtime/templates/components/utils/HotSpot.vue +24 -0
  375. package/dist/runtime/templates/components/utils/HotSpot.vue.d.ts +9 -0
  376. package/dist/runtime/templates/components/utils/README.md +1 -0
  377. package/dist/runtime/templates/components/utils/Spinner.spec.ts.snap +56 -0
  378. package/dist/runtime/templates/components/utils/Spinner.vue +42 -0
  379. package/dist/runtime/templates/components/utils/Spinner.vue.d.ts +5 -0
  380. package/dist/runtime/templates/components/utils/SpinnerTick.vue +43 -0
  381. package/dist/runtime/templates/components/utils/SpinnerTick.vue.d.ts +6 -0
  382. package/dist/runtime/templates/cwa-page.spec.ts.snap +20 -0
  383. package/dist/runtime/templates/cwa-page.vue +32 -0
  384. package/dist/runtime/templates/cwa-page.vue.d.ts +2 -0
  385. package/dist/runtime/types/popper.d.ts +14 -0
  386. package/dist/types.d.mts +9 -0
  387. package/package.json +108 -0
@@ -0,0 +1,207 @@
1
+ <template>
2
+ <div>
3
+ <div ref="spacer" />
4
+ <div
5
+ ref="header"
6
+ class="cwa:section cwa:border-0 cwa:border-b-2 cwa:border-b-light/30 cwa:fixed cwa:z-manager cwa:w-full cwa:h-18 cwa:top-0 cwa:dark-blur"
7
+ :class="highlightClass"
8
+ @click.stop
9
+ >
10
+ <div class="cwa:flex cwa:justify-between cwa:items-center">
11
+ <div class="cwa:absolute cwa:left-1/2 cwa:top-1/2 cwa:-translate-x-1/2 cwa:-translate-y-1/2 cwa:text-center cwa:text-gray-300 cwa:z-20">
12
+ <template v-if="!pageIsAdmin && !isErrorPage">
13
+ <CwaUiFormButton
14
+ v-if="!$cwa.admin.isEditing && $cwa.resources?.page?.value?.data"
15
+ color="dark"
16
+ class="cwa:min-w-[120px]"
17
+ >
18
+ <span
19
+ class="cwa:flex cwa:items-center cwa:gap-x-2 cwa:justify-center"
20
+ @click="showEditPage"
21
+ >
22
+ <span>{{ $cwa.resources.page.value.data?.reference }}</span> <CwaUiIconCogIcon
23
+ class="cwa:h-5 cwa:w-5"
24
+ aria-hidden="true"
25
+ />
26
+ </span>
27
+ </CwaUiFormButton>
28
+ <path-selector v-else-if="$cwa.admin.resourceStackManager.showManager.value" />
29
+ </template>
30
+ <template v-else>
31
+ <ul class="cwa:flex cwa:gap-x-8 cwa:text-stone-400 cwa:items-center">
32
+ <li>
33
+ <NuxtLink
34
+ to="/_cwa/layouts"
35
+ class="cwa:hover:text-white cwa:transition-colors"
36
+ active-class="cwa:text-white"
37
+ >
38
+ <IconLayouts />
39
+ <span class="cwa:sr-only">Layouts</span>
40
+ </NuxtLink>
41
+ </li>
42
+ <li>
43
+ <NuxtLink
44
+ to="/_cwa/pages"
45
+ class="cwa:hover:text-white cwa:transition-colors"
46
+ active-class="cwa:text-white"
47
+ >
48
+ <IconPages class="cwa:h-6" />
49
+ <span class="cwa:sr-only">Pages</span>
50
+ </NuxtLink>
51
+ </li>
52
+ <li>
53
+ <NuxtLink
54
+ to="/_cwa/data"
55
+ class="cwa:hover:text-white cwa:transition-colors"
56
+ active-class="cwa:text-white"
57
+ >
58
+ <IconData class="cwa:h-6" />
59
+ <span class="cwa:sr-only">Data</span>
60
+ </NuxtLink>
61
+ </li>
62
+ <li>
63
+ <NuxtLink
64
+ to="/_cwa/routes"
65
+ class="cwa:hover:text-white cwa:transition-colors"
66
+ active-class="cwa:text-white"
67
+ >
68
+ <IconRoutes class="cwa:h-6" />
69
+ <span class="cwa:sr-only">Routes</span>
70
+ </NuxtLink>
71
+ </li>
72
+ <li>
73
+ <NuxtLink
74
+ to="/_cwa/users"
75
+ class="cwa:hover:text-white cwa:transition-colors"
76
+ active-class="cwa:text-white"
77
+ >
78
+ <IconUsers />
79
+ <span class="cwa:sr-only">Users</span>
80
+ </NuxtLink>
81
+ </li>
82
+ </ul>
83
+ </template>
84
+ </div>
85
+ <div class="cwa:flex cwa:justify-start cwa:gap-x-4">
86
+ <template v-if="!pageIsAdmin && !isErrorPage">
87
+ <CwaUiFormButton
88
+ class="cwa:min-w-[100px]"
89
+ color="blue"
90
+ :loading="$cwa.resources.isLoading.value"
91
+ @click="$cwa.admin.toggleEdit()"
92
+ >
93
+ {{ $cwa.admin.isEditing ? "Done" : "Edit" }}
94
+ </CwaUiFormButton>
95
+ <!-- this will be used when cloning a component only -->
96
+ <CwaUiFormToggle
97
+ v-if="false"
98
+ v-model="isNavEnabled"
99
+ label="Enable Navigation"
100
+ />
101
+ </template>
102
+ </div>
103
+ <div
104
+ v-if="$cwa.admin.isEditing"
105
+ class="cwa:flex cwa:gap-x-4 cwa:items-center"
106
+ >
107
+ <SpinnerTick
108
+ :is-loading="isLoading"
109
+ :is-pending="!!$cwa.resources.newResource.value"
110
+ />
111
+ </div>
112
+ <div
113
+ v-else
114
+ class="cwa:flex cwa:self-stretch cwa:min-h-9"
115
+ >
116
+ <Menu />
117
+ </div>
118
+ </div>
119
+ <OutdatedContentNotice class="cwa:absolute cwa:top-full cwa:mt-1.5 cwa:left-1/2 cwa:-translate-x-1/2 cwa:z-20" />
120
+ <ResourceLoadingIndicator class="cwa:absolute cwa:top-full cwa:left-0 cwa:z-10" />
121
+ </div>
122
+ <RequestErrors />
123
+ <ResourceModalOverlayTemplate :show="showEditModal && !!($cwa.resources.pageDataIri.value || $cwa.resources.pageIri.value)">
124
+ <PageDataAdminModal
125
+ v-if="$cwa.resources.pageDataIri.value"
126
+ :resource-type="$cwa.resources.pageData?.value?.data?.['@type'] || ''"
127
+ :iri="$cwa.resources.pageDataIri.value"
128
+ :hide-view-link="true"
129
+ @close="closeModal"
130
+ @reload="goToAdminPagesView"
131
+ />
132
+ <PageAdminModal
133
+ v-else-if="$cwa.resources.pageIri.value"
134
+ :iri="$cwa.resources.pageIri.value"
135
+ :hide-view-link="true"
136
+ @close="closeModal"
137
+ @reload="goToAdminPagesView"
138
+ />
139
+ </ResourceModalOverlayTemplate>
140
+ </div>
141
+ </template>
142
+
143
+ <script setup>
144
+ import { computed, onMounted, ref, useTemplateRef } from "vue";
145
+ import ResourceLoadingIndicator from "../_common/ResourceLoadingIndicator.vue";
146
+ import SpinnerTick from "../../../utils/SpinnerTick.vue";
147
+ import PathSelector from "./_parts/PathSelector.vue";
148
+ import RequestErrors from "./_parts/RequestErrors.vue";
149
+ import Menu from "./_parts/Menu.vue";
150
+ import { useRoute, useRouter } from "#app";
151
+ import { useCwa } from "#imports";
152
+ import OutdatedContentNotice from "#cwa/runtime/templates/components/main/admin/header/_parts/OutdatedContentNotice.vue";
153
+ import IconPages from "#cwa/runtime/templates/components/core/assets/IconPages.vue";
154
+ import IconLayouts from "#cwa/runtime/templates/components/core/assets/IconLayouts.vue";
155
+ import IconUsers from "#cwa/runtime/templates/components/core/assets/IconUsers.vue";
156
+ import ResourceModalOverlayTemplate from "#cwa/runtime/templates/components/core/admin/ResourceModalOverlayTemplate.vue";
157
+ import PageAdminModal from "#cwa/runtime/templates/components/core/admin/PageAdminModal.vue";
158
+ import PageDataAdminModal from "#cwa/runtime/templates/components/core/admin/PageDataAdminModal.vue";
159
+ import IconRoutes from "#cwa/runtime/templates/components/core/assets/IconRoutes.vue";
160
+ import IconData from "#cwa/runtime/templates/components/core/assets/IconData.vue";
161
+ import { useError } from "#app/composables/error";
162
+ const $cwa = useCwa();
163
+ const route = useRoute();
164
+ const router = useRouter();
165
+ const header = useTemplateRef("header");
166
+ const spacer = useTemplateRef("spacer");
167
+ const error = useError();
168
+ const pageIsAdmin = computed(() => route.meta.cwa?.admin);
169
+ const isErrorPage = computed(() => !!error.value);
170
+ const showEditModal = ref(false);
171
+ const isNavEnabled = computed({
172
+ get: () => {
173
+ return $cwa.admin.navigationGuardDisabled;
174
+ },
175
+ set: (newValue) => {
176
+ $cwa.admin.setNavigationGuardDisabled(newValue);
177
+ }
178
+ });
179
+ const isLoading = computed(() => $cwa.resourcesManager.requestCount.value > 0);
180
+ const highlightClass = computed(() => {
181
+ const classes = ['cwa:before:content-[""] cwa:before:absolute cwa:before:top-0 cwa:before:left-0 cwa:before:w-full cwa:before:h-0.5 cwa:before:transition-colors'];
182
+ if ($cwa.resources.isDynamicPage.value) {
183
+ return [...classes, "cwa:before:bg-yellow"];
184
+ }
185
+ if ($cwa.resources.isDataPage.value) {
186
+ return [...classes, $cwa.resources.pageData?.value?.data?.route ? "cwa:before:bg-green" : "cwa:before:bg-orange"];
187
+ }
188
+ if (pageIsAdmin.value) {
189
+ return [...classes, "cwa:before:bg-stone-400"];
190
+ }
191
+ return [...classes, "cwa:before:bg-blue-600"];
192
+ });
193
+ function showEditPage() {
194
+ showEditModal.value = true;
195
+ }
196
+ function closeModal() {
197
+ showEditModal.value = false;
198
+ }
199
+ function goToAdminPagesView() {
200
+ router.replace("/_cwa/pages");
201
+ }
202
+ onMounted(() => {
203
+ if (header.value && spacer.value) {
204
+ spacer.value.style.height = `${header.value.clientHeight}px`;
205
+ }
206
+ });
207
+ </script>
@@ -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,189 @@
1
+ <template>
2
+ <div class="cwa:flex cwa:relative cwa:h-full cwa:items-center cwa:z-50">
3
+ <CwaUiHamburger
4
+ ref="hamburger"
5
+ v-model="showMenu"
6
+ class="cwa:relative cwa:z-20"
7
+ />
8
+ <Transition
9
+ enter-from-class="cwa:transform cwa:opacity-0 cwa:scale-[0.97]"
10
+ enter-active-class="cwa:duration-200 cwa:ease-out"
11
+ enter-to-class="cwa:opacity-100"
12
+ leave-from-class="cwa:opacity-100"
13
+ leave-active-class="cwa:duration-200 cwa:ease-in"
14
+ leave-to-class="cwa:transform cwa:opacity-0 cwa:scale-[0.97]"
15
+ >
16
+ <div
17
+ v-show="showMenu"
18
+ ref="menu"
19
+ class="cwa:absolute cwa:z-10 cwa:-top-1.5 cwa:-right-2 cwa:bg-dark cwa:pt-6 cwa:pb-12 cwa:px-12 cwa:w-[90vw] cwa:max-w-xl cwa:origin-top-right"
20
+ >
21
+ <div class="cwa:text-light cwa:flex cwa:flex-col cwa:text-center cwa:gap-y-2 cwa:mb-5">
22
+ <div class="cwa:flex cwa:justify-center cwa:opacity-[.35]">
23
+ <CwaLogo class="cwa:h-8 cwa:w-auto" />
24
+ </div>
25
+ <h2 class="cwa:opacity-50 cwa:text-sm cwa:font-bold">
26
+ {{ $cwa.appName }}
27
+ </h2>
28
+ </div>
29
+ <div class="cwa:flex cwa:justify-center">
30
+ <div class="cwa:flex cwa:justify-between cwa:w-full cwa:max-w-[400px]">
31
+ <div class="cwa:mt-2">
32
+ <ul class="cwa:text-xl cwa:flex cwa:flex-col cwa:gap-y-5">
33
+ <li>
34
+ <MenuPrimaryLink
35
+ label="Layouts"
36
+ to="/_cwa/layouts"
37
+ >
38
+ <IconLayouts class="cwa:w-7" />
39
+ </MenuPrimaryLink>
40
+ </li>
41
+ <li>
42
+ <MenuPrimaryLink
43
+ label="Pages"
44
+ to="/_cwa/pages"
45
+ >
46
+ <IconPages class="cwa:w-5 cwa:mx-1" />
47
+ </MenuPrimaryLink>
48
+ </li>
49
+ <li>
50
+ <MenuPrimaryLink
51
+ label="Data"
52
+ to="/_cwa/data"
53
+ >
54
+ <IconData class="cwa:w-6 cwa:mx-0.5" />
55
+ </MenuPrimaryLink>
56
+ </li>
57
+ <li>
58
+ <MenuPrimaryLink
59
+ label="Routes"
60
+ to="/_cwa/routes"
61
+ >
62
+ <IconRoutes class="cwa:w-7" />
63
+ </MenuPrimaryLink>
64
+ </li>
65
+ <li>
66
+ <MenuPrimaryLink
67
+ label="Users"
68
+ to="/_cwa/users"
69
+ >
70
+ <IconUsers class="cwa:w-7" />
71
+ </MenuPrimaryLink>
72
+ </li>
73
+ </ul>
74
+ </div>
75
+ <div class="cwa:flex cwa:flex-col cwa:gap-y-4">
76
+ <div>
77
+ <h3>Account</h3>
78
+ <ul class="cwa:text-sm">
79
+ <li>
80
+ <MenuLink>
81
+ My account
82
+ </MenuLink>
83
+ </li>
84
+ <li>
85
+ <MenuLink @click="signOut">
86
+ Sign out
87
+ </MenuLink>
88
+ </li>
89
+ </ul>
90
+ </div>
91
+ <div class="cwa:pr-8">
92
+ <h3>CWA</h3>
93
+ <ul class="cwa:text-sm">
94
+ <li>
95
+ <MenuLink
96
+ to="https://cwa.rocks"
97
+ target="_blank"
98
+ >
99
+ About CWA
100
+ </MenuLink>
101
+ </li>
102
+ <li>
103
+ <MenuLink
104
+ :to="moduleLink"
105
+ target="_blank"
106
+ >
107
+ App <span class="cwa:text-xs">{{ displayAppVersion }}</span>
108
+ </MenuLink>
109
+ </li>
110
+ <li>
111
+ <MenuLink
112
+ :to="$cwa.apiUrlBase"
113
+ target="_blank"
114
+ >
115
+ API <span class="cwa:text-xs">{{ displayApiVersion }}</span>
116
+ </MenuLink>
117
+ </li>
118
+ </ul>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </Transition>
125
+ </div>
126
+ </template>
127
+
128
+ <script setup>
129
+ import { computed, onMounted, ref, useTemplateRef, watch } from "vue";
130
+ import { onClickOutside } from "@vueuse/core";
131
+ import MenuPrimaryLink from "./MenuPrimaryLink.vue";
132
+ import CwaLogo from "#cwa/runtime/templates/components/core/assets/CwaLogo.vue";
133
+ import { useCwa, useRoute } from "#imports";
134
+ import IconLayouts from "#cwa/runtime/templates/components/core/assets/IconLayouts.vue";
135
+ import IconPages from "#cwa/runtime/templates/components/core/assets/IconPages.vue";
136
+ import IconUsers from "#cwa/runtime/templates/components/core/assets/IconUsers.vue";
137
+ import MenuLink from "#cwa/runtime/templates/components/main/admin/header/_parts/MenuLink.vue";
138
+ import IconRoutes from "#cwa/runtime/templates/components/core/assets/IconRoutes.vue";
139
+ import IconData from "#cwa/runtime/templates/components/core/assets/IconData.vue";
140
+ const $cwa = useCwa();
141
+ const route = useRoute();
142
+ const showMenu = ref(false);
143
+ const apiVersion = ref("");
144
+ const menu = useTemplateRef("menu");
145
+ const hamburger = ref();
146
+ onClickOutside(menu, () => {
147
+ showMenu.value = false;
148
+ }, {
149
+ ignore: [hamburger]
150
+ });
151
+ async function signOut() {
152
+ if ($cwa.navigationDisabled) {
153
+ return;
154
+ }
155
+ await $cwa.auth.signOut();
156
+ }
157
+ const moduleLink = computed(() => {
158
+ return `https://www.npmjs.com/package/${$cwa.currentModulePackageInfo.name}/v/${$cwa.currentModulePackageInfo.version}`;
159
+ });
160
+ async function setApiVersion() {
161
+ const docs = await $cwa.getApiDocumentation();
162
+ const version = docs?.docs?.info.version;
163
+ if (!version) {
164
+ return;
165
+ }
166
+ const matches = version.match(/ \(([a-zA-Z0-9\-@]+)\)$/);
167
+ apiVersion.value = matches ? matches[1] : version;
168
+ }
169
+ function truncateVersion(version) {
170
+ return version.length > 9 ? `${version.substring(0, 3)}..${version.substring(version.length - 4)}` : version;
171
+ }
172
+ const displayApiVersion = computed(() => {
173
+ const unstablePostfix = apiVersion.value.substring(0, 3) === "dev" ? " (unstable)" : "";
174
+ return truncateVersion(apiVersion.value) + unstablePostfix;
175
+ });
176
+ const displayAppVersion = computed(() => {
177
+ const unstablePostfix = $cwa.currentModulePackageInfo.name.substring($cwa.currentModulePackageInfo.name.length - 4) === "edge" ? " (unstable)" : "";
178
+ return truncateVersion($cwa.currentModulePackageInfo.version) + unstablePostfix;
179
+ });
180
+ watch(
181
+ () => route.path,
182
+ () => {
183
+ showMenu.value = false;
184
+ }
185
+ );
186
+ onMounted(() => {
187
+ setApiVersion();
188
+ });
189
+ </script>
@@ -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,14 @@
1
+ <template>
2
+ <NuxtLink
3
+ :to="to || '#'"
4
+ class="cwa:font-medium cwa:text-neutral-400 cwa:hover:text-white"
5
+ >
6
+ <slot />
7
+ </NuxtLink>
8
+ </template>
9
+
10
+ <script setup>
11
+ defineProps({
12
+ to: { type: null, required: false }
13
+ });
14
+ </script>
@@ -0,0 +1,16 @@
1
+ import type { RouteLocationRaw } from 'vue-router';
2
+ type __VLS_Props = {
3
+ to?: RouteLocationRaw;
4
+ };
5
+ declare var __VLS_6: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_6) => any;
8
+ };
9
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <NuxtLink
3
+ to="#"
4
+ class="cwa:font-medium cwa:text-neutral-400 cwa:hover:text-white cwa:flex cwa:gap-x-2 cwa:items-center"
5
+ >
6
+ <div class="cwa:w-10">
7
+ <slot />
8
+ </div>
9
+ <span>
10
+ {{ label }}
11
+ </span>
12
+ </NuxtLink>
13
+ </template>
14
+
15
+ <script setup>
16
+ defineProps({
17
+ label: { type: String, required: true }
18
+ });
19
+ </script>
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ };
4
+ declare var __VLS_6: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_6) => any;
7
+ };
8
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,69 @@
1
+ <template>
2
+ <li
3
+ class="cwa:pointer-events-auto cwa:w-full cwa:max-w-sm cwa:overflow-hidden cwa:rounded-lg cwa:dark-blur cwa:ring-2 cwa:ring-magenta"
4
+ @mouseout="setEmitTimeout"
5
+ @mouseover="clearEmitTimeout"
6
+ >
7
+ <div class="cwa:p-4">
8
+ <div class="cwa:flex cwa:items-start cwa:relative">
9
+ <div class="cwa:ml-3 cwa:w-0 cwa:flex-1 cwa:pt-0.5">
10
+ <slot />
11
+ </div>
12
+ <div class="cwa:ml-4 cwa:flex cwa:shrink-0">
13
+ <button
14
+ type="button"
15
+ class="cwa:inline-flex cwa:rounded-md cwa:text-stone-400 cwa:hover:text-white cwa:transition cwa:cursor-pointer"
16
+ @click="$emit('clear')"
17
+ >
18
+ <span class="cwa:sr-only">Close</span>
19
+ <CwaUiIconXMarkIcon
20
+ class="cwa:h-5 cwa:w-5"
21
+ aria-hidden="true"
22
+ />
23
+ </button>
24
+ </div>
25
+ <svg
26
+ class="cwa:absolute cwa:-top-0.5 cwa:-right-0.5 countdown-icon cwa:w-6 cwa:h-6 cwa:pointer-events-none"
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ viewBox="0 0 100 100"
29
+ xml:space="preserve"
30
+ :class="{ 'is-progressing': emitTimeout !== void 0 }"
31
+ >
32
+ <circle
33
+ class="circle cwa:stroke-stone-400"
34
+ cx="50"
35
+ cy="50"
36
+ r="44"
37
+ fill="transparent"
38
+ />
39
+ </svg>
40
+ </div>
41
+ </div>
42
+ </li>
43
+ </template>
44
+
45
+ <script setup>
46
+ import { onMounted, ref } from "vue";
47
+ const emitTimeout = ref();
48
+ const emit = defineEmits(["clear"]);
49
+ function setEmitTimeout() {
50
+ emitTimeout.value = setTimeout(() => {
51
+ emit("clear");
52
+ }, 6e3);
53
+ }
54
+ function clearEmitTimeout() {
55
+ if (emitTimeout.value) {
56
+ clearTimeout(emitTimeout.value);
57
+ emitTimeout.value = void 0;
58
+ }
59
+ }
60
+ onMounted(() => {
61
+ setTimeout(() => {
62
+ setEmitTimeout();
63
+ }, 20);
64
+ });
65
+ </script>
66
+
67
+ <style>
68
+ .countdown-icon .circle{stroke-width:12;transform-origin:50% 50% 0;stroke-dasharray:314;stroke-dashoffset:0;transform:rotate(-90deg);transition:stroke-dashoffset .6s linear}.countdown-icon.is-progressing .circle{transition-duration:6s;stroke-dashoffset:314}
69
+ </style>
@@ -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, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, 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,19 @@
1
+ <script setup>
2
+ import { useCwa } from "#cwa/runtime/composables/cwa";
3
+ const $cwa = useCwa();
4
+ </script>
5
+
6
+ <template>
7
+ <div
8
+ v-if="$cwa.resources.hasNewResources"
9
+ class="cwa:dark-blur cwa:py-2 cwa:px-3 cwa:rounded-full cwa:flex cwa:gap-x-1.5 cwa:items-center cwa:opacity-75 cwa:hover:opacity-100 cwa:transition"
10
+ >
11
+ <span class="cwa:text-stone-300">The content on this page is outdated</span>
12
+ <button
13
+ class="cwa:bg-light/90 cwa:hover:bg-light cwa:text-dark cwa:py-1 cwa:px-2 cwa:rounded-full cwa:cursor-pointer"
14
+ @click.stop="$cwa.resourcesManager.mergeNewResources"
15
+ >
16
+ Update
17
+ </button>
18
+ </div>
19
+ </template>
@@ -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,79 @@
1
+ <template>
2
+ <div
3
+ v-if="stackItem && stackSize"
4
+ ref="pathSelector"
5
+ >
6
+ <div
7
+ class="cwa:py-1.5 cwa:px-3 cwa:bg-neutral-800 cwa:border cwa:border-dashed cwa:text-white"
8
+ :class="[isEnabled ? 'cwa:hover:bg-dark cwa:cursor-pointer' : '']"
9
+ @click="openMenu"
10
+ >
11
+ <span :class="{ 'cwa:opacity-0 cwa:duration-200': isOpen }">{{ stackItem.displayName }}</span>
12
+ </div>
13
+ <Transition v-bind="transitions.context">
14
+ <div
15
+ v-if="isOpen"
16
+ class="cwa:absolute cwa:top-0 cwa:left-1/2 cwa:-translate-x-1/2 cwa:min-w-full cwa:box-content cwa:inline-block"
17
+ :style="{ marginTop, transformOrigin: tOrig }"
18
+ >
19
+ <div class="cwa:relative cwa:bg-dark cwa:inline-block">
20
+ <resource-context-item
21
+ :index="stackSize - 1"
22
+ :root-width="selectorWidth"
23
+ :use-current-stack="true"
24
+ @click="(index) => selectResource(index)"
25
+ />
26
+ </div>
27
+ </div>
28
+ </Transition>
29
+ </div>
30
+ </template>
31
+
32
+ <script setup>
33
+ import { computed, ref, useTemplateRef } from "vue";
34
+ import { onClickOutside } from "@vueuse/core";
35
+ import ResourceContextItem from "../../_common/ResourceContextItem.vue";
36
+ import { useCwa } from "#cwa/runtime/composables/cwa";
37
+ import { useTransitions } from "#cwa/runtime/composables/transitions";
38
+ const $cwa = useCwa();
39
+ const transitions = useTransitions();
40
+ const isOpen = ref(false);
41
+ const pathSelector = useTemplateRef("pathSelector");
42
+ const stackSize = computed(() => $cwa.admin.resourceStackManager.resourceStack.value.length);
43
+ const spacingStackSize = computed(() => stackSize.value - 1);
44
+ const tOrig = computed(() => {
45
+ const pathSelectorEl = pathSelector.value;
46
+ if (!pathSelectorEl) {
47
+ return;
48
+ }
49
+ const buttonOffset = Math.round(pathSelectorEl.offsetHeight / 2);
50
+ return `50% calc(${buttonOffset}px + ${stackSize.value}px + ${spacingStackSize.value * 0.25}rem)`;
51
+ });
52
+ const isEnabled = computed(() => {
53
+ return stackSize.value > 1;
54
+ });
55
+ const marginTop = computed(() => {
56
+ return spacingStackSize.value ? `calc(0px - ${spacingStackSize.value}px - ${spacingStackSize.value * 0.25}rem)` : 0;
57
+ });
58
+ const stackItem = computed(() => {
59
+ return $cwa.admin.resourceStackManager.resourceStack.value[0];
60
+ });
61
+ const selectorWidth = computed(() => {
62
+ const pathSelectorEl = pathSelector.value;
63
+ return stackItem.value?.displayName && pathSelectorEl ? pathSelectorEl.clientWidth : void 0;
64
+ });
65
+ function selectResource(index) {
66
+ $cwa.admin.resourceStackManager.selectStackIndex(index, false);
67
+ isOpen.value = false;
68
+ }
69
+ function openMenu() {
70
+ if (!isEnabled.value) {
71
+ isOpen.value = false;
72
+ return;
73
+ }
74
+ isOpen.value = true;
75
+ }
76
+ onClickOutside(pathSelector, () => {
77
+ isOpen.value = false;
78
+ });
79
+ </script>
@@ -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;