@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,112 @@
1
+ <script setup>
2
+ import {
3
+ Listbox,
4
+ ListboxButton,
5
+ ListboxOptions,
6
+ ListboxOption
7
+ } from "@headlessui/vue";
8
+ import { computed } from "vue";
9
+ import { useCwaSelectInput } from "#cwa/runtime/composables/cwa-select-input";
10
+ const emit = defineEmits(["update:modelValue"]);
11
+ const props = defineProps({
12
+ modelValue: { type: [String, Number, Boolean, Object, null, Array], required: true, skipCheck: true },
13
+ popper: { type: Object, required: false }
14
+ });
15
+ const options = [
16
+ {
17
+ label: "Static",
18
+ value: false
19
+ },
20
+ {
21
+ label: "Dynamic",
22
+ value: true
23
+ }
24
+ ];
25
+ const selectInputProps = computed(() => ({ ...props, options }));
26
+ const { value, compareOptions, selectedOption, trigger, container } = useCwaSelectInput(selectInputProps, emit);
27
+ </script>
28
+
29
+ <template>
30
+ <Listbox
31
+ v-slot="{ open }"
32
+ v-model="value"
33
+ :by="compareOptions"
34
+ >
35
+ <div class="cwa:relative">
36
+ <div
37
+ class="cwa:rounded-lg cwa:py-1.5 cwa:relative"
38
+ :class="[open ? 'cwa:bg-stone-700/90' : 'cwa:bg-stone-700/70']"
39
+ >
40
+ <ListboxButton
41
+ ref="trigger"
42
+ class="cwa:flex cwa:transition-colors cwa:relative cwa:px-4 cwa:text-left cwa:text-light cwa:w-full cwa:border-0 cwa:items-center cwa:cursor-pointer"
43
+ >
44
+ <span class="cwa:block cwa:truncate cwa:grow">{{ selectedOption?.label }}</span>
45
+ <span
46
+ class="cwa:w-3 cwa:h-3 cwa:rounded-full cwa:ml-2.5 cwa:mr-2.5"
47
+ :class="[selectedOption?.value === true ? 'cwa:bg-yellow' : 'cwa:bg-blue-600']"
48
+ />
49
+ <svg
50
+ class="cwa:-mr-1 cwa:h-6 cwa:w-6 cwa:transition-transform"
51
+ :class="{ 'cwa:rotate-180': open }"
52
+ viewBox="0 0 20 20"
53
+ fill="currentColor"
54
+ aria-hidden="true"
55
+ >
56
+ <path
57
+ fill-rule="evenodd"
58
+ d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"
59
+ clip-rule="evenodd"
60
+ />
61
+ </svg>
62
+ </ListboxButton>
63
+ </div>
64
+ <ClientOnly>
65
+ <Teleport to="body">
66
+ <Transition
67
+ enter-active-class="cwa:transition-opacity cwa:duration-100 cwa:ease-out"
68
+ enter-from-class="cwa:opacity-0"
69
+ enter-to-class="cwa:opacity-100"
70
+ leave-active-class="cwa:transition-opacity cwa:duration-100 cwa:ease-in"
71
+ leave-from-class="cwa:opacity-100"
72
+ leave-to-class="cwa:opacity-0"
73
+ >
74
+ <ListboxOptions
75
+ v-show="open"
76
+ ref="container"
77
+ static
78
+ class="cwa:absolute cwa:max-h-60 cwa:overflow-auto cwa:dark-blur cwa:rounded-lg cwa:border cwa:border-stone-600 cwa:z-notifications"
79
+ >
80
+ <ListboxOption
81
+ v-for="option in options"
82
+ :key="option.label"
83
+ v-slot="{ active, selected }"
84
+ as="template"
85
+ :value="option.value"
86
+ :disabled="option.disabled"
87
+ >
88
+ <li
89
+ :class="[
90
+ active ? 'cwa:text-white cwa:opacity-100' : 'cwa:text-stone-400 cwa:opacity-80',
91
+ 'cwa:relative cwa:cursor-pointer cwa:select-none cwa:py-2 cwa:px-4 cwa:flex cwa:items-center cwa:hover:opacity-100'
92
+ ]"
93
+ >
94
+ <span
95
+ :class="[
96
+ selected ? 'cwa:text-white' : '',
97
+ 'cwa:block cwa:truncate cwa:grow'
98
+ ]"
99
+ >{{ option.label }}</span>
100
+ <span
101
+ class="cwa:w-2 cwa:h-2 cwa:rounded-full cwa:ml-2.5"
102
+ :class="[option?.value === true ? 'cwa:bg-yellow' : 'cwa:bg-blue-600']"
103
+ />
104
+ </li>
105
+ </ListboxOption>
106
+ </ListboxOptions>
107
+ </Transition>
108
+ </Teleport>
109
+ </ClientOnly>
110
+ </div>
111
+ </Listbox>
112
+ </template>
@@ -0,0 +1,4 @@
1
+ import { type SelectInputProps } from '#cwa/runtime/composables/cwa-select-input';
2
+ type __VLS_Props = Omit<SelectInputProps, 'options'>;
3
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ export default _default;
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <svg
3
+ width="906px"
4
+ height="260px"
5
+ viewBox="0 0 906 260"
6
+ version="1.1"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <g
10
+ transform="translate(-181.000000, -185.000000)"
11
+ fill="currentColor"
12
+ >
13
+ <path
14
+ d="M411,232.558892 L311.990506,315.54434 L395.186608,414.582148 C395.083121,414.669432 394.979462,414.756587 394.875631,414.843614 C340.020479,460.820814 258.000365,453.391191 211.678578,398.249085 C165.356791,343.10698 172.27445,261.133586 227.129601,215.156386 C281.984753,169.179186 364.004868,176.608809 410.326654,231.750915 C410.552367,232.019606 410.776815,232.288934 411,232.558892 Z M731,444.98882 L606.047047,318.63887 L482,444.072786 L482,186 L731,186 L731,444.98882 Z M784,445 L935,186 L1087,445 L784,445 Z"
15
+ />
16
+ </g>
17
+ </svg>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ </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,15 @@
1
+ <template>
2
+ <svg
3
+ height="27"
4
+ viewBox="0 0 26 27"
5
+ width="26"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ >
8
+ <g
9
+ fill="currentColor"
10
+ fill-rule="evenodd"
11
+ >
12
+ <path d="m5.69507059 20.3811012c.14677255-.150897.22920784-.3557647.22920784-.5696452 0-.2139332-.08243529-.4188009-.22920784-.5696979l-.01254118-.0096452c-.02926274-.0335736-.07351372-.0490164-.11669412-.041216-1.37111764.204657-2.69441568-.6066974-3.17811764-1.9486418-.48390589-1.3415229.00280392-2.8508612 1.16918431-3.6235295 1.16617647-.772879 2.69558824-.6001618 3.67313726.4146372.65739215.6792207.96128627 1.6425261.81767451 2.5918645-.00453726.0261421 0 .0532856.01315294.0759492l.04659608.0481731c.30251764.3121243.79238823.3121243 1.0951098 0l3.17929015-3.2861063-3.17888231-3.2864753c-.66554902-.68865506-.66554902-1.80475482 0-2.49367341l.04659608-.04796235c.05393726-.05597365.1149098-.10435765.18098039-.14430871.06056471-.04179577.12668628-.07431529.19617255-.09613553.16507451-.06076988.34274118-.07452612.51479999-.03995106.6228784.0976113 1.2534039-.11774494 1.6976471-.57955388.4371568-.45479906.6482157-1.09180235.5723568-1.728384-.0756549-.63637082-.4301215-1.20174682-.9610823-1.53321412-.6314432-.4014607-1.4266353-.40557176-2.0621059-.01091012-.70057255.42986918-1.08073334 1.25424189-.96266275 2.08725836.02610196.18979388.00637255.38332988-.05832157.56284611-.04919607.12870777-.12189411.24645271-.21350588.34733177-.00418039.00474353-.04078431.04321882-.04639215.04817318-.01932157.02287435-.04022353.04427294-.06250197.06424847-.02513333.0251407-.05138823.04880564-.07907058.0708367-.06494902.05043953-.09997255.07737224-.13958432.10145883-.09181568.06530258-.19138039.11843011-.29634902.1577487-.40921961.16718306-.86529019.16528565-1.27328627-.005376-.03843922-.01401976-.07611373-.02983153-.11312549-.04796235l-.44750588-.33663247-2.17161177-2.25112094c-4.68958431 5.15142023-4.7005451 13.18326962-.02508235 18.34844612z" /><path d="m16.0962431 18.6247304c.023502.005376.0480236.0031096.0698942-.0067991l.0741254-.0712057c.1369844-.14784.2124863-.345487.2100902-.5503548.0009687-.2126682-.0806509-.4166927-.2264549-.5663774l-3.1840823-3.2864753-3.1775059 3.2864753c-.66631372.6876537-1.74546666.6876537-2.41178039 0l-.04664706-.0481732c-.22283529-.2367548-.325-.5680113-.27580392-.8941553.10058432-.6495473-.10654902-1.3094249-.55696078-1.7738691-.43374118-.4529544-1.04509804-.6744772-1.65747451-.6001619-.62170589.0763708-1.17474118.4445214-1.49953726.9979332-.38775686.6518136-.3923451 1.4724442-.01157255 2.1287905.41961961.724337 1.2183804 1.1179445 2.02708236.9989873.32219607-.0558155.65096862.0516518.884.2886175l.01371372.0111209c.67829412.6890767.6892549 1.8156649.02472549 2.5189722l-2.1967451 2.2715181c4.99725098 4.8143135 12.7500431 4.7956029 17.7254235-.0428498l-2.186549-2.2605553c-.0061686-.0057977-.0080039-.0082749-.0075961-.0082749-.0127451-.0092235-.0248784-.0191322-.0366549-.0298315-.0089215-.0047435-.0392039-.0300423-.046596-.03584-.3066471-.2089788-.7131138-.1651275-.9713804.104832l-.0609726.0571859c-.0013765.0265638-.0002039.0531275.0036196.0792696.1250549.873969-.1240863 1.7611144-.6822706 2.4300575-.5583882.6688903-1.3707098 1.053696-2.225447 1.053696-.5400353.0012122-1.0699765-.1537958-1.5295647-.4477892-.0798863-.0506504-.1563569-.1070457-.2284432-.168817-.1909725-.1426748-.3628274-.3111228-.5107725-.5007058l-.0322706-.0410052c-.0330863-.0409525-.0639294-.0839605-.0929882-.1284443-.6852785-.9913449-.7304981-2.310415-.1149098-3.3495115.6155372-1.0393073 1.7727411-1.5970409 2.9383058-1.4162597z" /><path d="m6.39961961 5.91191341c.00479215.00368941.00958431.00758965.01396863.01196424l.02069803.01581176c.00479216.00289883.03961177.02988424.04440393.03273035.03685882.02635295.07667451.04801506.11847843.0644593.19061568.08195765.40447843.08380235.59641961.00516518.04165098-.01502118.08105882-.03562918.11771372-.06098071l.05638431-.04137412.04659608-.0349967c.01192941-.01438871.02528628-.02714353.04001961-.0384753-.01376471.01006683-.02671372.02139859-.03823529.03415341.00418039-.00474353.0288549-.0323087.03344313-.03663058.0202902-.01792.03706275-.03952942.04980785-.06340518.00734117-.02677459.00871764-.05497224.00418039-.0823793-.16313726-1.16464188.33952941-2.32211576 1.28980392-2.96981835.95052941-.64754447 2.17762744-.66894306 3.14865094-.05460329.7714863.48673882 1.2848589 1.31253459 1.3927844 2.24021082.1081803.92815059-.2013216 1.85624847-.8393412 2.51839247-.6565765.67937883-1.5877843.99461271-2.50604316.84819577-.02049412-.00490165-.04180392-.00326777-.06092157.00495435l-.06612157.05950494c-.30267058.31312565-.30267058.82063059 0 1.13380894l3.1789333 3.28647529 3.1788824-3.28647529c.6699333-.6819087 1.7451098-.6819087 2.4151961 0l.0543451.05618447c.2210509.23986447.3188313.57401972.2633137.90032192-.0627569.4584884.0200863.9258842.2361412 1.331456.0529686.0969788.1153176.1879491.1864353.2717515.0328313.045696.0694862.0891783.1086902.1292875.0358902.0370523.0720862.0708367.1075686.1033563l.0664784.0626145c.4530628.3855963 1.0457098.5482466 1.6240314.445312.5783216-.1027237 1.0845059-.4607548 1.3870235-.9806456.3871451-.6520245.3913255-1.4726551.010553-2.12879059-.0244706-.04511623-.0527647-.08833506-.0846275-.12849694-.0693333-.09613553-.1238823-.16633976-.1776667-.23037741-.0238588-.02735435-.0491451-.05349647-.0758588-.07779388-.012949-.01217506-.0250823-.02471906-.0368078-.03726306-.0295177-.02350683-.0559765-.05086118-.0790706-.08111436-.4413373-.36525176-1.0090549-.52605741-1.5688706-.44346729-.3245922.05639529-.6557608-.05191529-.8903725-.29093647-.0023451-.00289882-.0330353-.03378447-.0358393-.03663059-.6571372-.69197553-.6571372-1.80064376 0-2.49283012l2.1280745-2.20479247c-4.9682431-4.80408847-12.68239211-4.82258823-17.67230192-.0430607l2.16646275 2.24105412z" /><path d="m20.389149 6.54543812c-.1467725.15068612-.2292078.3557647-.2292078.56964517 0 .21393318.0824353.41874824.2292078.56948706.031302.03952941.0800902.05887247.1288785.05123012.8246588-.12206682 1.6610431.12048565 2.3042627.66809977.0265098.02039717.0513882.04284988.0742784.06714729.0296706.02529882.0575569.05270588.0830471.08253741.0457804.043008.0892157.08875671.130051.13692988.077847.08975812.1505451.18425977.218247.28224.0557726.07062589.1055294.14578447.1489647.22526494.4928785.86796044.5394745 1.93156514.1244432 2.84200664-.4149804.9103887-1.2382628 1.5504489-2.1994981 1.7098315-.8457647.1389854-1.708251-.1087323-2.3636549-.6787991l-.072647-.0681487c-.0464432-.0442729-.0968118-.0899689-.143204-.1385637-.0663254-.0665149-.127247-.1381422-.1830196-.214513-.1051215-.1270212-.1967333-.2651633-.273-.4125816-.311847-.5894626-.4295607-1.2674184-.3355529-1.9320396.0075451-.0300423.0021922-.0617186-.0149373-.0872809l-.0384392-.0397402c-.1459568-.1521092-.3445255-.23775628-.5518117-.23775628-.2071334 0-.4058549.08564708-.5518628.23775628l-3.1760784 3.2850522 3.1509961 3.2576979c.3337686.3265129.5255568.7788348.5317255 1.254031.0061686.4749854-.1738432.9324198-.4990471 1.268209l-.067498.0644593c-.2290549.226688-.5490589.3263548-.8611098.2678513-.7993726-.1233318-1.5919648.2616847-2.0107177.9761129-.4188039.7145864-.3817922 1.6190193.0939569 2.2945506.0143764.0228216.0298745.0448527.0463921.0660932l.0382353.0479623c.1045608.12992.2254353.2447661.3592588.3419558.0478197.0410052.0983922.0784263.150953.1124216.6323098.4020932 1.4286745.4068367 2.0653176.0121224.7001647-.43008 1.0801726-1.2544.9622549-2.0874165-.0561804-.3364216.0476157-.6800113.2790157-.9235652l.0591373-.0556047c.5713372-.5783416 1.4561019-.6649901 2.1224666-.2079247.0416.0261421.0812118.0557629.1178667.0889149.0414471.0319397.0802431.0669364.1159294.1054117l2.186753 2.2608188c4.622698-5.1528433 4.6127568-13.12134019-.0228902-18.26158678z" />
13
+ </g>
14
+ </svg>
15
+ </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,24 @@
1
+ <template>
2
+ <svg
3
+ viewBox="0 0 26 32"
4
+ version="1.1"
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ xmlns:xlink="http://www.w3.org/1999/xlink"
7
+ >
8
+ <g
9
+ stroke="none"
10
+ stroke-width="1"
11
+ fill="none"
12
+ fill-rule="evenodd"
13
+ >
14
+ <g
15
+ fill="currentColor"
16
+ fill-rule="nonzero"
17
+ >
18
+ <path d="M3.12,12.48 L3.12,26.56 L3.12720644,26.7061913 C3.20132869,27.4759446 3.83762888,28.0777647 4.61231693,28.08 L4.61231693,28.08 L14.56,28.08 L14.56,30.72 C14.5578054,31.5090588 13.9671181,32.1571626 13.2112423,32.2326599 L13.0676831,32.24 L1.49231693,32.24 C0.717628877,32.2377647 0.0813286908,31.6359446 0.00720643582,30.8661913 L2.0250468e-13,30.72 L2.0250468e-13,14 C0.00219458372,13.2109412 0.593053977,12.5628374 1.34878812,12.4873401 L1.49231693,12.48 L3.12,12.48 Z" />
19
+ <path d="M7.55,5.2 L7.5504,21.5510007 L7.55697433,21.6963437 C7.6328669,22.558592 8.35575175,23.2352206 9.23711672,23.2377174 L9.23711672,23.2377174 L20.616,23.237 L20.6166889,25.4406007 C20.6141921,26.3219657 19.9377606,27.0448505 19.0753463,27.1207431 L18.9299722,27.1273174 L5.84671672,27.1273174 C4.96535175,27.1248206 4.2424669,26.448192 4.16657433,25.5859437 L4.16,25.4406007 L4.16,6.88671672 C4.16249678,6.00535175 4.83912542,5.2824669 5.70137373,5.20657433 L5.84671672,5.2 L7.55,5.2 Z" />
20
+ <path d="M19.1982181,8.8817842e-15 L19.1982181,3.26669588 C19.1986573,4.81900242 20.4568865,6.07723158 22.0094126,6.07789042 L22.0094126,6.07789042 L25.2758889,6.07789042 L25.2758889,20.2406007 C25.2732534,21.1709304 24.5197215,21.9246819 23.5891722,21.9273174 L23.5891722,21.9273174 L10.5059167,21.9273174 C9.57558703,21.9246819 8.82183549,21.1709304 8.8192,20.2406007 L8.8192,20.2406007 L8.8192,1.68671672 C8.82183549,0.756387031 9.57558703,0.00263549488 10.5059167,8.8817842e-15 L10.5059167,8.8817842e-15 L19.1982181,8.8817842e-15 Z M20.3226959,0.792844682 L24.4944647,4.9534126 L22.0094126,4.9534126 C21.0779848,4.95253416 20.3233548,4.19790407 20.3226959,3.26669588 L20.3226959,3.26669588 L20.3226959,0.792844682 Z" />
21
+ </g>
22
+ </g>
23
+ </svg>
24
+ </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,20 @@
1
+ <template>
2
+ <svg
3
+ height="20"
4
+ viewBox="0 0 30 20"
5
+ width="30"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ >
8
+ <g
9
+ fill="currentColor"
10
+ fill-rule="evenodd"
11
+ >
12
+ <path
13
+ d="m0 5h30v15h-30zm1 1v13h28v-13z"
14
+ fill-rule="nonzero"
15
+ />
16
+ <path d="m0 0h30v6h-30z" />
17
+ <path d="m16 9h10v8h-10z" />
18
+ </g>
19
+ </svg>
20
+ </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,21 @@
1
+ <template>
2
+ <svg
3
+ viewBox="0 0 18 24"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ >
6
+ <g
7
+ stroke="none"
8
+ stroke-width="1"
9
+ fill="none"
10
+ fill-rule="evenodd"
11
+ >
12
+ <g
13
+ fill="currentColor"
14
+ fill-rule="nonzero"
15
+ >
16
+ <path d="M14.4123826,6.64105159 C12.7160036,6.64033171 11.3411903,5.26551838 11.3407103,3.56937924 L11.3407103,0 L1.84300341,0 C0.826471843,0.00287969283 0.00287969283,0.826471843 0,1.84300341 L0,22.116041 C0.00287969283,23.1325725 0.826471843,23.9561647 1.84300341,23.9590444 L16.1385186,23.9590444 C17.1552901,23.9561647 17.9786423,23.1325725 17.981522,22.116041 L17.981522,6.64105159 L14.4123826,6.64105159 Z" />
17
+ <path d="M14.4123826,5.41238265 L17.127693,5.41238265 L12.5693792,0.866307563 L12.5693792,3.56937924 C12.5700992,4.5868707 13.3946512,5.41142281 14.4123826,5.41238265 L14.4123826,5.41238265 Z" />
18
+ </g>
19
+ </g>
20
+ </svg>
21
+ </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,23 @@
1
+ <template>
2
+ <svg
3
+ viewBox="0 0 27 26"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ >
6
+ <g
7
+ stroke="none"
8
+ stroke-width="1"
9
+ fill="none"
10
+ fill-rule="evenodd"
11
+ >
12
+ <g
13
+ transform="translate(-794.000000, -31.000000)"
14
+ fill="currentColor"
15
+ fill-rule="nonzero"
16
+ >
17
+ <g transform="translate(794.000000, 31.000000)">
18
+ <path d="M13.8270888,20.1144951 C15.4513737,20.1641473 17.0244245,20.3716353 18.4782692,20.7190985 C18.24496,21.327121 17.9825127,21.9027394 17.6918458,22.4394729 C16.6589014,24.3469743 15.3850399,25.560514 14.0308065,25.9543271 L13.8270888,26.0072354 L13.8270888,20.1144951 Z M12.2962398,20.1144951 L12.2962398,26.0072354 C10.8662772,25.6801841 9.5160744,24.4424004 8.43143175,22.4394729 C8.14076487,21.9027394 7.87831758,21.32707 7.64495739,20.7190985 C9.09885312,20.3716353 10.6719549,20.1641473 12.2962398,20.1144951 Z M6.16631211,21.1339724 C6.43575051,21.8539547 6.74233875,22.5352562 7.08520932,23.1684365 C7.52626161,23.9828753 8.01278163,24.693366 8.5357881,25.293836 C6.91571906,24.6979155 5.4197888,23.779756 4.12814987,22.5709448 L3.80954259,22.262705 L3.71319795,22.164013 C4.45772565,21.7671017 5.28155397,21.4221389 6.16631211,21.1339724 Z M19.9569655,21.1339724 C20.8417236,21.4221389 21.6655009,21.7671527 22.4099776,22.163962 C22.3778287,22.1968253 22.3462411,22.2300968 22.313684,22.262654 C20.9518974,23.6244406 19.3425133,24.6482044 17.5874385,25.293785 C18.1104449,24.6933149 18.597016,23.9828243 19.0380173,23.1683855 C19.3809389,22.5352052 19.6875271,21.8539547 19.9569655,21.1339724 Z M4.80738321,13.7761098 C4.86688419,15.8606853 5.16908385,17.8660112 5.68887543,19.6821179 C4.59647622,20.037848 3.58526574,20.4740525 2.68453521,20.9827706 C1.16730051,19.0161281 0.251187895,16.6764464 0.0303520771,14.1915625 L-6.21724894e-15,13.7761098 L4.80738321,13.7761098 Z M26.1232776,13.7761098 C25.9720247,16.4153814 25.0403189,18.9069212 23.4387424,20.9828216 C22.5380119,20.4740525 21.5268524,20.037848 20.4344022,19.6821689 C20.9022146,18.047627 21.1938189,16.2598588 21.2908378,14.3989951 L21.3159454,13.7761098 L26.1232776,13.7761098 Z M19.78428,13.7760588 C19.7256975,15.7211693 19.4446243,17.5846829 18.9633093,19.2641822 C17.533925,18.9130051 16.0014021,18.6889973 14.4216511,18.6069965 L13.8271398,18.5829317 L13.8271398,13.7760588 L19.78428,13.7760588 Z M12.2962398,13.7761098 L12.2962398,18.5829827 C10.5066177,18.6349823 8.76802563,18.869108 7.15996827,19.2642332 C6.67865331,17.5847339 6.39758007,15.7212203 6.33899763,13.7761098 L6.33899763,13.7761098 L12.2962398,13.7761098 Z M2.68458624,5.03839602 C3.58531677,5.54716512 4.59647622,5.98336956 5.68892646,6.33904866 C5.22106811,7.97363652 4.92950055,9.76140929 4.83248941,11.6223107 L4.80738321,12.2452098 L-1.61648472e-13,12.2452098 C0.15125292,9.60593823 1.08300969,7.11434745 2.68458624,5.03839602 Z M18.9633093,6.75698436 C19.3964928,8.26857971 19.6674805,9.92922655 19.7600528,11.6641883 L19.78428,12.2451588 L13.8271398,12.2451588 L13.8271398,7.43823486 C15.6167109,7.38623529 17.355252,7.15210965 18.9633093,6.75698436 Z M23.4387424,5.03844705 C24.9559771,7.00508953 25.8720897,9.34481701 26.0929255,11.8297491 L26.1232776,12.2452098 L21.3158944,12.2452098 C21.2563934,10.1605833 20.9541938,8.15525739 20.4343511,6.33904866 C21.5268014,5.98336956 22.5379608,5.54716512 23.4387424,5.03844705 Z M7.15996827,6.75703539 C8.58939795,7.10821251 10.1219259,7.33226067 11.7017133,7.41423459 L12.2962398,7.43828589 L12.2962398,12.2452609 L6.33899763,12.2452609 C6.39752904,10.3000993 6.67865331,8.43653475 7.15996827,6.75703539 Z M12.2962909,0.01398222 L12.2962909,5.90677353 C10.6719549,5.85712134 9.09885312,5.64963336 7.64500842,5.30217009 C7.87831758,4.69414764 8.14076487,4.11852924 8.43143175,3.5817957 C9.5160744,1.57881717 10.8662772,0.34103349 12.2962909,0.01398222 Z M13.8271398,0.01398222 C15.2570515,0.34108452 16.6072542,1.5788682 17.6918969,3.58174467 C17.9825127,4.11847821 18.24496,4.69414764 18.4783202,5.30211906 C17.2062061,5.60610477 15.8427858,5.80300004 14.4336977,5.88073717 L13.8271398,5.9067225 L13.8271398,0.01398222 Z M17.5874895,0.72743265 C19.3425643,1.37301318 20.9519484,2.39677704 22.313735,3.75856362 C22.3462922,3.79112076 22.3778797,3.82439232 22.4100797,3.85725564 C21.665552,4.25411595 20.8417236,4.59907875 19.9569655,4.88724516 C19.6875271,4.16726289 19.3809389,3.48596136 19.0380683,2.85283215 C18.597016,2.03839335 18.110496,1.32790266 17.5874895,0.72743265 Z M8.53583913,0.72743265 C8.01283266,1.32790266 7.52626161,2.03839335 7.08526035,2.85283215 C6.74233875,3.48601239 6.43575051,4.16726289 6.16631211,4.88724516 C5.28155397,4.59907875 4.45777668,4.25411595 3.71330001,3.85725564 C3.74544891,3.82439232 3.77703648,3.79112076 3.80959362,3.75856362 C5.1713802,2.39677704 6.78076434,1.37301318 8.53583913,0.72743265 Z" />
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </svg>
23
+ </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,13 @@
1
+ <template>
2
+ <svg
3
+ height="23"
4
+ viewBox="0 0 32 23"
5
+ width="32"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ >
8
+ <path
9
+ d="m4.8 9.85714286c1.765 0 3.2-1.4734375 3.2-3.28571429 0-1.81227678-1.435-3.28571428-3.2-3.28571428s-3.2 1.4734375-3.2 3.28571428c0 1.81227679 1.435 3.28571429 3.2 3.28571429zm22.4 0c1.765 0 3.2-1.4734375 3.2-3.28571429 0-1.81227678-1.435-3.28571428-3.2-3.28571428s-3.2 1.4734375-3.2 3.28571428c0 1.81227679 1.435 3.28571429 3.2 3.28571429zm1.6 1.64285714h-3.2c-.88 0-1.675.3645089-2.255.9549107 2.015 1.1345982 3.445 3.1830357 3.755 5.6165179h3.3c.885 0 1.6-.7341518 1.6-1.6428572v-1.6428571c0-1.8122768-1.435-3.2857143-3.2-3.2857143zm-12.8 0c3.095 0 5.6-2.57209821 5.6-5.75s-2.505-5.75-5.6-5.75-5.6 2.57209821-5.6 5.75 2.505 5.75 5.6 5.75zm3.84 1.6428571h-.415c-1.04.5133929-2.195.8214286-3.425.8214286s-2.38-.3080357-3.425-.8214286h-.415c-3.18 0-5.76 2.6491072-5.76 5.9142858v1.4785714c0 1.3604911 1.075 2.4642857 2.4 2.4642857h14.4c1.325 0 2.4-1.1037946 2.4-2.4642857v-1.4785714c0-3.2651786-2.58-5.9142858-5.76-5.9142858zm-11.185-.6879464c-.58-.5904018-1.375-.9549107-2.255-.9549107h-3.2c-1.765 0-3.2 1.4734375-3.2 3.2857143v1.6428571c0 .9087054.715 1.6428572 1.6 1.6428572h3.295c.315-2.4334822 1.745-4.4819197 3.76-5.6165179z"
10
+ fill="currentColor"
11
+ />
12
+ </svg>
13
+ </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,12 @@
1
+ import { type Ref } from 'vue';
2
+ import type { ManagerTab } from '#cwa/module.js';
3
+ interface Options {
4
+ components: Ref<ManagerTab[] | undefined>;
5
+ props: Ref<any>;
6
+ propsValidator?: (props: any) => boolean;
7
+ }
8
+ export declare const useDataResolver: <T extends object>(allMeta: Ref<(T | null)[]>, ops: Options) => {
9
+ startDataResolver: () => void;
10
+ stopDataResolver: () => void;
11
+ };
12
+ export {};
@@ -0,0 +1,109 @@
1
+ import {
2
+ createApp,
3
+ defineComponent,
4
+ h,
5
+ onBeforeUnmount,
6
+ onMounted,
7
+ ref,
8
+ watch
9
+ } from "vue";
10
+ import { useNuxtApp } from "#app";
11
+ export const useDataResolver = (allMeta, ops) => {
12
+ allMeta.value = [];
13
+ const nuxtApp = useNuxtApp();
14
+ const globalComponents = nuxtApp.vueApp._context.components;
15
+ const rootDefinition = defineComponent(
16
+ (props, { expose }) => {
17
+ const metadata = ref(null);
18
+ const resolved = ref(false);
19
+ const possibleAsyncDefinition = typeof props.component === "string" ? globalComponents[props.component] : props.component;
20
+ if (possibleAsyncDefinition === void 0) {
21
+ throw new Error("Cannot load metadata for component");
22
+ }
23
+ if (possibleAsyncDefinition.name !== "AsyncComponentWrapper") {
24
+ resolved.value = true;
25
+ } else {
26
+ const isAsyncResolved = () => !!possibleAsyncDefinition.__asyncResolved;
27
+ resolved.value = isAsyncResolved();
28
+ if (!resolved.value) {
29
+ const interval = window.setInterval(() => {
30
+ if (isAsyncResolved()) {
31
+ resolved.value = true;
32
+ window.clearInterval(interval);
33
+ }
34
+ }, 10);
35
+ }
36
+ }
37
+ expose({
38
+ metadata,
39
+ resolved
40
+ });
41
+ return () => {
42
+ return h(possibleAsyncDefinition, { ...props.cProps, ref: metadata });
43
+ };
44
+ },
45
+ {
46
+ props: ["component", "cProps"]
47
+ }
48
+ );
49
+ const resolvedWatchers = ref([]);
50
+ const handleInputChange = () => {
51
+ for (const unwatch of resolvedWatchers.value) {
52
+ unwatch();
53
+ }
54
+ resolvedWatchers.value = [];
55
+ allMeta.value = new Array(ops.components.value?.length || 0);
56
+ if (!ops.components.value || ops.propsValidator && !ops.propsValidator(ops.props.value)) {
57
+ return;
58
+ }
59
+ for (const [index, cName] of ops.components.value.entries()) {
60
+ const wrapper = document.createElement("div");
61
+ const component = createApp(rootDefinition, { cProps: ops.props.value, component: cName });
62
+ const instance = component.mount(wrapper);
63
+ const exposed = instance.$.exposed;
64
+ if (!exposed) {
65
+ continue;
66
+ }
67
+ const completeLoad = () => {
68
+ allMeta.value.splice(index, 1, exposed.metadata.value);
69
+ component.unmount();
70
+ };
71
+ if (exposed.resolved.value) {
72
+ completeLoad();
73
+ continue;
74
+ }
75
+ const unwatch = watch(exposed.resolved, (isResolved, wasResolved) => {
76
+ if (!wasResolved && isResolved) {
77
+ completeLoad();
78
+ unwatch();
79
+ }
80
+ });
81
+ resolvedWatchers.value.push(unwatch);
82
+ }
83
+ };
84
+ let stopPrimaryWatch;
85
+ const startDataResolver = () => {
86
+ if (stopPrimaryWatch) {
87
+ return;
88
+ }
89
+ allMeta.value = [];
90
+ stopPrimaryWatch = watch([ops.components, ops.props], handleInputChange, {
91
+ immediate: true
92
+ });
93
+ };
94
+ const stopDataResolver = () => {
95
+ if (stopPrimaryWatch) {
96
+ stopPrimaryWatch();
97
+ }
98
+ };
99
+ onMounted(() => {
100
+ startDataResolver();
101
+ });
102
+ onBeforeUnmount(() => {
103
+ stopDataResolver();
104
+ });
105
+ return {
106
+ startDataResolver,
107
+ stopDataResolver
108
+ };
109
+ };
@@ -0,0 +1,6 @@
1
+ import { type ComputedRef } from 'vue';
2
+ import type Cwa from '#cwa/runtime/cwa';
3
+ export declare const useComponentGroupPositions: (iri: ComputedRef<string | undefined>, $cwa: Cwa) => {
4
+ groupIsReordering: ComputedRef<boolean>;
5
+ componentPositions: ComputedRef<string[] | undefined>;
6
+ };
@@ -0,0 +1,164 @@
1
+ import { computed, onBeforeUnmount, onMounted, ref } from "vue";
2
+ import { debounce } from "lodash-es";
3
+ import { CwaResourceTypes } from "#cwa/runtime/resources/resource-utils";
4
+ const moveElement = (array, fromIndex, toIndex) => {
5
+ const startIndex = fromIndex < 0 ? array.length + fromIndex : fromIndex;
6
+ if (startIndex >= 0 && startIndex < array.length) {
7
+ const endIndex = toIndex < 0 ? array.length + toIndex : toIndex;
8
+ const [item] = array.splice(fromIndex, 1);
9
+ array.splice(endIndex, 0, item);
10
+ }
11
+ };
12
+ export const useComponentGroupPositions = (iri, $cwa) => {
13
+ const updateRequests = ref({});
14
+ const groupIsReordering = computed(() => {
15
+ if (!iri.value || !$cwa.admin.resourceStackManager.getState("reordering")) {
16
+ return false;
17
+ }
18
+ return $cwa.admin.resourceStackManager.getClosestStackItemByType(CwaResourceTypes.COMPONENT_GROUP) === iri.value;
19
+ });
20
+ const componentPositions = computed(() => {
21
+ return iri.value ? $cwa.resources.getOrderedPositionsForGroup(iri.value) : void 0;
22
+ });
23
+ let oldPositions;
24
+ function handleReorderEvent(event) {
25
+ if (!groupIsReordering.value || !componentPositions.value) {
26
+ return;
27
+ }
28
+ const currentIndex = componentPositions.value.indexOf(event.positionIri);
29
+ if (currentIndex === -1) {
30
+ return;
31
+ }
32
+ if (!oldPositions) {
33
+ oldPositions = [...componentPositions.value];
34
+ }
35
+ let newIndex;
36
+ switch (event.location) {
37
+ case "next":
38
+ newIndex = currentIndex + 1;
39
+ break;
40
+ case "previous":
41
+ newIndex = currentIndex - 1;
42
+ break;
43
+ default:
44
+ newIndex = event.location - 1;
45
+ break;
46
+ }
47
+ if (newIndex < 0) {
48
+ newIndex = 0;
49
+ }
50
+ const positionCopy = [...componentPositions.value];
51
+ moveElement(positionCopy, currentIndex, newIndex);
52
+ for (const [index, iri2] of positionCopy.entries()) {
53
+ const currentResource = $cwa.resources.getResource(iri2).value?.data;
54
+ if (!currentResource) {
55
+ continue;
56
+ }
57
+ currentResource._metadata.sortDisplayNumber = index + 1;
58
+ $cwa.resourcesManager.saveResource({
59
+ resource: currentResource
60
+ });
61
+ }
62
+ $cwa.admin.emitRedraw();
63
+ if (updateRequests.value[event.positionIri] === void 0) {
64
+ updateRequests.value[event.positionIri] = {};
65
+ }
66
+ if (updateRequests.value[event.positionIri].debounced) {
67
+ updateRequests.value[event.positionIri].debounced.cancel();
68
+ }
69
+ updateRequests.value[event.positionIri].debounced = debounce(async () => {
70
+ if (!oldPositions) {
71
+ return;
72
+ }
73
+ const savedPositions = oldPositions;
74
+ oldPositions = void 0;
75
+ if (updateRequests.value[event.positionIri].apiRequest) {
76
+ await updateRequests.value[event.positionIri].apiRequest;
77
+ }
78
+ componentPositions.value && sendUpdatePositionRequest(event.positionIri, componentPositions.value, savedPositions);
79
+ }, 1e3);
80
+ updateRequests.value[event.positionIri].debounced();
81
+ }
82
+ function sendUpdatePositionRequest(iri2, newPositions, oldPositions2) {
83
+ if (!updateRequests.value[iri2]) {
84
+ return;
85
+ }
86
+ const oldIndex = oldPositions2.indexOf(iri2);
87
+ const newIndex = newPositions.indexOf(iri2);
88
+ if (oldIndex === newIndex) {
89
+ return;
90
+ }
91
+ const positionToOverwrite = oldPositions2[newIndex];
92
+ if (!positionToOverwrite) {
93
+ return;
94
+ }
95
+ const positionToOverwriteSortValue = $cwa.resources.getResource(positionToOverwrite).value?.data?.sortValue;
96
+ if (positionToOverwriteSortValue === void 0) {
97
+ return;
98
+ }
99
+ updateRequests.value[iri2].apiRequest = new Promise((resolve) => {
100
+ updateRequests.value[iri2].apiRequest = $cwa.resourcesManager.updateResource({
101
+ endpoint: iri2,
102
+ data: {
103
+ sortValue: positionToOverwriteSortValue
104
+ }
105
+ });
106
+ updateRequests.value[iri2].apiRequest.then(() => {
107
+ updateRelatedLocalSortValues(iri2, newIndex, oldIndex, oldPositions2);
108
+ resolve();
109
+ });
110
+ });
111
+ }
112
+ function updateRelatedLocalSortValues(iri2, newIndex, oldIndex, oldPositions2) {
113
+ const updatePosSortValue = (positionIri, moveBy) => {
114
+ const posRes = $cwa.resources.getResource(positionIri).value?.data;
115
+ if (posRes === void 0 || posRes.sortValue === void 0) {
116
+ return;
117
+ }
118
+ const sortValue = posRes.sortValue + moveBy;
119
+ $cwa.resourcesManager.saveResource({
120
+ resource: {
121
+ ...posRes,
122
+ sortValue,
123
+ _metadata: {
124
+ ...posRes._metadata,
125
+ sortDisplayNumber: void 0
126
+ }
127
+ }
128
+ });
129
+ };
130
+ if (newIndex > oldIndex) {
131
+ for (const [index, positionIri] of oldPositions2.entries()) {
132
+ if (positionIri === iri2) {
133
+ continue;
134
+ }
135
+ if (index > oldIndex && index <= newIndex) {
136
+ updatePosSortValue(positionIri, -1);
137
+ } else {
138
+ updatePosSortValue(positionIri, 0);
139
+ }
140
+ }
141
+ } else {
142
+ for (const [index, positionIri] of oldPositions2.entries()) {
143
+ if (positionIri === iri2) {
144
+ continue;
145
+ }
146
+ if (index < oldIndex && index >= newIndex) {
147
+ updatePosSortValue(positionIri, 1);
148
+ } else {
149
+ updatePosSortValue(positionIri, 0);
150
+ }
151
+ }
152
+ }
153
+ }
154
+ onMounted(() => {
155
+ $cwa.admin.eventBus.on("reorder", handleReorderEvent);
156
+ });
157
+ onBeforeUnmount(() => {
158
+ $cwa.admin.eventBus.off("reorder", handleReorderEvent);
159
+ });
160
+ return {
161
+ groupIsReordering,
162
+ componentPositions
163
+ };
164
+ };
@@ -0,0 +1,20 @@
1
+ import type { ComputedRef } from 'vue';
2
+ import type { CwaCurrentResourceInterface } from '../../../storage/stores/resources/state.js';
3
+ interface SyncWatcherOps {
4
+ resource: ComputedRef<CwaCurrentResourceInterface | undefined>;
5
+ location: string;
6
+ fullReference: ComputedRef<string | undefined>;
7
+ allowedComponents: string[] | null;
8
+ }
9
+ export declare class ComponentGroupUtilSynchronizer {
10
+ private readonly resourcesManager;
11
+ private readonly resources;
12
+ private readonly auth;
13
+ private watchStopHandle;
14
+ constructor();
15
+ createSyncWatcher(ops: SyncWatcherOps): void;
16
+ stopSyncWatcher(): void;
17
+ private createComponentGroup;
18
+ private updateAllowedComponents;
19
+ }
20
+ export {};