@antelopejs/dms 0.25.6 → 0.25.7-next.1111.gaba637e

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 (384) hide show
  1. package/CHANGELOG.md +0 -60
  2. package/README.md +1 -1
  3. package/data/mockup-spec.schema.json +223 -303
  4. package/dist/implementations/dms-auth/account-emails.js +2 -2
  5. package/dist/implementations/dms-auth/account-emails.js.map +1 -1
  6. package/dist/implementations/dms-auth/index.js +2 -1
  7. package/dist/implementations/dms-auth/index.js.map +1 -1
  8. package/dist/implementations/dms-base/search-route.js +5 -8
  9. package/dist/implementations/dms-base/search-route.js.map +1 -1
  10. package/dist/implementations/dms-builder/engine/cell-displays.js +1 -4
  11. package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
  12. package/dist/implementations/dms-builder/engine/mapped-displays.js +1 -5
  13. package/dist/implementations/dms-builder/engine/mapped-displays.js.map +1 -1
  14. package/dist/implementations/dms-builder/engine/resource-emit.js +0 -4
  15. package/dist/implementations/dms-builder/engine/resource-emit.js.map +1 -1
  16. package/dist/implementations/dms-builder/engine/theme-assets.js +17 -5
  17. package/dist/implementations/dms-builder/engine/theme-assets.js.map +1 -1
  18. package/dist/index.js +1 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/mcp/index.d.ts +1 -0
  21. package/dist/mcp/index.js +5 -0
  22. package/dist/mcp/index.js.map +1 -1
  23. package/dist/mcp/mockup-export/capture.d.ts +15 -0
  24. package/dist/mcp/mockup-export/capture.js +97 -0
  25. package/dist/mcp/mockup-export/capture.js.map +1 -0
  26. package/dist/mcp/mockup-export/document.d.ts +4 -0
  27. package/dist/mcp/mockup-export/document.js +199 -0
  28. package/dist/mcp/mockup-export/document.js.map +1 -0
  29. package/dist/mcp/mockup-export/index.d.ts +23 -0
  30. package/dist/mcp/mockup-export/index.js +90 -0
  31. package/dist/mcp/mockup-export/index.js.map +1 -0
  32. package/dist/mcp/mockup-export/plan.d.ts +78 -0
  33. package/dist/mcp/mockup-export/plan.js +257 -0
  34. package/dist/mcp/mockup-export/plan.js.map +1 -0
  35. package/dist/mcp/mockup-export/route.d.ts +13 -0
  36. package/dist/mcp/mockup-export/route.js +66 -0
  37. package/dist/mcp/mockup-export/route.js.map +1 -0
  38. package/dist/mcp/page-verify/index.d.ts +14 -0
  39. package/dist/mcp/page-verify/index.js +9 -5
  40. package/dist/mcp/page-verify/index.js.map +1 -1
  41. package/dist/mcp/page-verify/mockup.d.ts +2 -1
  42. package/dist/mcp/page-verify/mockup.js +1 -0
  43. package/dist/mcp/page-verify/mockup.js.map +1 -1
  44. package/dist/mcp/page-verify/playwright.d.ts +22 -4
  45. package/dist/mcp/page-verify/playwright.js.map +1 -1
  46. package/dist/mcp/tools/mockup-apply-to-page.js +1 -1
  47. package/dist/mcp/tools/mockup-apply-to-page.js.map +1 -1
  48. package/dist/mcp/tools/mockup-export-pdf.d.ts +1 -0
  49. package/dist/mcp/tools/mockup-export-pdf.js +71 -0
  50. package/dist/mcp/tools/mockup-export-pdf.js.map +1 -0
  51. package/dist/mcp/tools/mockup-patch-spec.js +1 -1
  52. package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
  53. package/dist/mcp/tools/mockup-read-spec.js +10 -3
  54. package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
  55. package/dist/mcp/tools/mockup-write-spec.js +1 -1
  56. package/dist/mcp/tools/mockup-write-spec.js.map +1 -1
  57. package/dist/mcp/tools/mockup.js +2 -0
  58. package/dist/mcp/tools/mockup.js.map +1 -1
  59. package/dist/mcp/tools/page-verify.d.ts +1 -0
  60. package/dist/mcp/tools/page-verify.js +5 -1
  61. package/dist/mcp/tools/page-verify.js.map +1 -1
  62. package/dist/mockup/apply-notes.d.ts +1 -1
  63. package/dist/mockup/apply-notes.js +1 -2
  64. package/dist/mockup/apply-notes.js.map +1 -1
  65. package/dist/mockup/apply-plan.js +0 -3
  66. package/dist/mockup/apply-plan.js.map +1 -1
  67. package/dist/mockup/compile.d.ts +6 -1
  68. package/dist/mockup/compile.js +29 -25
  69. package/dist/mockup/compile.js.map +1 -1
  70. package/dist/mockup/controller-blocks.js +10 -62
  71. package/dist/mockup/controller-blocks.js.map +1 -1
  72. package/dist/mockup/database-manifest.d.ts +2 -0
  73. package/dist/mockup/database-manifest.js +75 -0
  74. package/dist/mockup/database-manifest.js.map +1 -0
  75. package/dist/mockup/display-values.js +1 -1
  76. package/dist/mockup/display-values.js.map +1 -1
  77. package/dist/mockup/entities.d.ts +20 -0
  78. package/dist/mockup/entities.js +213 -0
  79. package/dist/mockup/entities.js.map +1 -0
  80. package/dist/mockup/files.d.ts +2 -2
  81. package/dist/mockup/files.js +2 -2
  82. package/dist/mockup/files.js.map +1 -1
  83. package/dist/mockup/fixture-answers.d.ts +1 -0
  84. package/dist/mockup/fixture-answers.js +1 -1
  85. package/dist/mockup/fixture-answers.js.map +1 -1
  86. package/dist/mockup/{capture-routes.d.ts → fixture-routes.d.ts} +11 -6
  87. package/dist/mockup/fixture-routes.js +155 -0
  88. package/dist/mockup/fixture-routes.js.map +1 -0
  89. package/dist/mockup/fixtures.d.ts +1 -3
  90. package/dist/mockup/fixtures.js +2 -25
  91. package/dist/mockup/fixtures.js.map +1 -1
  92. package/dist/mockup/form-fields.js +1 -10
  93. package/dist/mockup/form-fields.js.map +1 -1
  94. package/dist/mockup/generate.js +4 -1
  95. package/dist/mockup/generate.js.map +1 -1
  96. package/dist/mockup/history-routes.js +2 -17
  97. package/dist/mockup/history-routes.js.map +1 -1
  98. package/dist/mockup/index.d.ts +3 -0
  99. package/dist/mockup/index.js +3 -0
  100. package/dist/mockup/index.js.map +1 -1
  101. package/dist/mockup/json-schema-entities.d.ts +5 -0
  102. package/dist/mockup/json-schema-entities.js +141 -0
  103. package/dist/mockup/json-schema-entities.js.map +1 -0
  104. package/dist/mockup/json-schema.js +23 -24
  105. package/dist/mockup/json-schema.js.map +1 -1
  106. package/dist/mockup/json.d.ts +8 -0
  107. package/dist/mockup/json.js +20 -0
  108. package/dist/mockup/json.js.map +1 -0
  109. package/dist/mockup/manage.js +1 -1
  110. package/dist/mockup/manage.js.map +1 -1
  111. package/dist/mockup/manifest-blocks.d.ts +19 -0
  112. package/dist/mockup/manifest-blocks.js +65 -0
  113. package/dist/mockup/manifest-blocks.js.map +1 -0
  114. package/dist/mockup/model.d.ts +106 -255
  115. package/dist/mockup/model.js +86 -82
  116. package/dist/mockup/model.js.map +1 -1
  117. package/dist/mockup/module-manifests.d.ts +22 -0
  118. package/dist/mockup/module-manifests.js +28 -0
  119. package/dist/mockup/module-manifests.js.map +1 -0
  120. package/dist/mockup/modules-schema.d.ts +2 -0
  121. package/dist/mockup/modules-schema.js +42 -0
  122. package/dist/mockup/modules-schema.js.map +1 -0
  123. package/dist/mockup/modules.d.ts +20 -9
  124. package/dist/mockup/modules.js +146 -22
  125. package/dist/mockup/modules.js.map +1 -1
  126. package/dist/mockup/page-links.d.ts +1 -2
  127. package/dist/mockup/page-links.js +3 -14
  128. package/dist/mockup/page-links.js.map +1 -1
  129. package/dist/mockup/refusals.d.ts +4 -1
  130. package/dist/mockup/refusals.js +15 -1
  131. package/dist/mockup/refusals.js.map +1 -1
  132. package/dist/mockup/routes.d.ts +1 -5
  133. package/dist/mockup/routes.js +9 -171
  134. package/dist/mockup/routes.js.map +1 -1
  135. package/dist/mockup/saas-manifest.d.ts +2 -0
  136. package/dist/mockup/saas-manifest.js +496 -0
  137. package/dist/mockup/saas-manifest.js.map +1 -0
  138. package/dist/mockup/sample-rows.js +0 -4
  139. package/dist/mockup/sample-rows.js.map +1 -1
  140. package/dist/mockup/state.d.ts +76 -0
  141. package/dist/mockup/state.js +22 -0
  142. package/dist/mockup/state.js.map +1 -0
  143. package/dist/mockup/{summary-fields.js → store-summary.js} +1 -1
  144. package/dist/mockup/store-summary.js.map +1 -0
  145. package/dist/mockup/store.d.ts +1 -2
  146. package/dist/mockup/store.js +16 -22
  147. package/dist/mockup/store.js.map +1 -1
  148. package/dist/mockup/table-columns.js +3 -9
  149. package/dist/mockup/table-columns.js.map +1 -1
  150. package/dist/mockup/table-options.d.ts +1 -4
  151. package/dist/mockup/table-options.js +2 -40
  152. package/dist/mockup/table-options.js.map +1 -1
  153. package/dist/mockup/tenancy.d.ts +19 -0
  154. package/dist/mockup/tenancy.js +73 -0
  155. package/dist/mockup/tenancy.js.map +1 -0
  156. package/dist/mockup/tenant-rows.d.ts +4 -0
  157. package/dist/mockup/tenant-rows.js +19 -0
  158. package/dist/mockup/tenant-rows.js.map +1 -0
  159. package/dist/mockup/validate.d.ts +1 -7
  160. package/dist/mockup/validate.js +3 -76
  161. package/dist/mockup/validate.js.map +1 -1
  162. package/dist/pages/account.d.ts +0 -1
  163. package/dist/pages/account.js +0 -1
  164. package/dist/pages/account.js.map +1 -1
  165. package/dist/pages/settings/overview/account-summary.d.ts +0 -2
  166. package/dist/pages/settings/overview/account-summary.js +8 -17
  167. package/dist/pages/settings/overview/account-summary.js.map +1 -1
  168. package/dist/pages/settings/settings-index.js +1 -2
  169. package/dist/pages/settings/settings-index.js.map +1 -1
  170. package/dist/realtime/sse.js +4 -2
  171. package/dist/realtime/sse.js.map +1 -1
  172. package/dist/store/internal/frontend/dev-reload.js +1 -7
  173. package/dist/store/internal/frontend/dev-reload.js.map +1 -1
  174. package/dist/utils/account-notifications.js +0 -1
  175. package/dist/utils/account-notifications.js.map +1 -1
  176. package/dist/utils/email-change-mail.js +2 -2
  177. package/dist/utils/email-change-mail.js.map +1 -1
  178. package/dist/utils/export-jobs.js +2 -2
  179. package/dist/utils/export-jobs.js.map +1 -1
  180. package/dist/utils/index.d.ts +0 -2
  181. package/dist/utils/index.js +0 -2
  182. package/dist/utils/index.js.map +1 -1
  183. package/dist/validation/index.d.ts +0 -1
  184. package/dist/validation/index.js +0 -1
  185. package/dist/validation/index.js.map +1 -1
  186. package/frontend-vue/eslint-globals.generated.mjs +2 -2
  187. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +0 -3
  188. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +0 -3
  189. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +0 -3
  190. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot.vue +0 -3
  191. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/login.vue +1 -4
  192. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +0 -3
  193. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +1 -17
  194. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +0 -3
  195. package/frontend-vue/layers/dms-auth/i18n/locales/auth-fr-FR.json +10 -10
  196. package/frontend-vue/layers/dms-core/app/build/composables/api-error.ts +0 -8
  197. package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +2 -3
  198. package/frontend-vue/layers/dms-core/app/composables/translation/useUniqueLocales.ts +5 -23
  199. package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +0 -1
  200. package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +443 -12
  201. package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +0 -8
  202. package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +0 -8
  203. package/frontend-vue/layers/dms-core/shared/types/app-config.ts +0 -2
  204. package/frontend-vue/layers/dms-layout/app/app.config.ts +0 -1
  205. package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +4 -7
  206. package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +29 -14
  207. package/frontend-vue/layers/dms-layout/app/build/components/layout/LayoutFooter.vue +0 -2
  208. package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +21 -6
  209. package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +3 -19
  210. package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +110 -9
  211. package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +2 -8
  212. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +9 -6
  213. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixCategory.vue +2 -6
  214. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixSubject.vue +22 -27
  215. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +10 -8
  216. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/notificationDisplay.ts +3 -39
  217. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +5 -38
  218. package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfilePreferences.ts +3 -1
  219. package/frontend-vue/layers/dms-layout/app/build/utils/dev-reload-stream.ts +4 -23
  220. package/frontend-vue/layers/dms-layout/app/custom-layouts/EmptyLayout.vue +31 -39
  221. package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +9 -60
  222. package/frontend-vue/layers/dms-layout/app/error.vue +1 -1
  223. package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +1 -7
  224. package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +1 -14
  225. package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +0 -13
  226. package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +1 -1
  227. package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +5 -5
  228. package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/steps/StepPlatform.vue +0 -3
  229. package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/StepRegister.vue +1 -3
  230. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +1 -1
  231. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +165 -0
  232. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupHeaderActions.vue +4 -1
  233. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +1 -2
  234. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIssues.vue +1 -22
  235. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +11 -6
  236. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +182 -125
  237. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +12 -114
  238. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +4 -10
  239. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTenantBanner.vue +48 -0
  240. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +76 -8
  241. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +65 -9
  242. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +142 -0
  243. package/frontend-vue/layers/dms-ui/app/build/components/table-view/ExpandedRowDetail.vue +6 -26
  244. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +8 -8
  245. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +6 -46
  246. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +175 -0
  247. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +35 -109
  248. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +18 -5
  249. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +76 -0
  250. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +1 -4
  251. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +63 -0
  252. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +1 -3
  253. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +6 -0
  254. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +13 -68
  255. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewLinks.ts +7 -17
  256. package/frontend-vue/layers/dms-ui/app/build/composables/confirm/fetchedConfirmDialog.ts +0 -6
  257. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDisplayComponents.ts +0 -4
  258. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +0 -38
  259. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerFieldTypes.ts +3 -69
  260. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +7 -20
  261. package/frontend-vue/layers/dms-ui/app/build/composables/form/keyValueRows.ts +0 -36
  262. package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +0 -4
  263. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewGrouping.ts +0 -1
  264. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewListing.ts +5 -21
  265. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewSorting.ts +0 -8
  266. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useGroupedRows.ts +4 -32
  267. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +1 -1
  268. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +1 -1
  269. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/displayOptions.ts +2 -14
  270. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +6 -68
  271. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +0 -5
  272. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +48 -73
  273. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +11 -18
  274. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupThumbnail.vue +125 -34
  275. package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +3 -7
  276. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +149 -84
  277. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +119 -0
  278. package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +72 -43
  279. package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +80 -0
  280. package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +92 -8
  281. package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +1 -35
  282. package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +17 -44
  283. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +177 -0
  284. package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +14 -3
  285. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +14 -26
  286. package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +151 -0
  287. package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +23 -0
  288. package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +15 -0
  289. package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +6 -56
  290. package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +3 -0
  291. package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +7 -7
  292. package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +7 -4
  293. package/frontend-vue/layers/dms-ui/app/components/form/components/InputPhone.vue +0 -5
  294. package/frontend-vue/layers/dms-ui/app/components/form/components/KeyValue.vue +20 -2
  295. package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +15 -51
  296. package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +8 -3
  297. package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +0 -10
  298. package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupTenantBanner.ts +2 -0
  299. package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupWorkspaceSwitcher.ts +2 -0
  300. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupPdfExport.ts +1 -0
  301. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupTenancy.ts +1 -0
  302. package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +0 -3
  303. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +1 -0
  304. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenancy.ts +1 -0
  305. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenants.ts +1 -0
  306. package/frontend-vue/layers/dms-ui/app/types/table/query.ts +0 -5
  307. package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +28 -2
  308. package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +38 -12
  309. package/frontend-vue/scripts/check-invariants.mjs +0 -101
  310. package/package.json +5 -5
  311. package/skills/dms/SKILL.md +2 -4
  312. package/skills/dms-module/SKILL.md +0 -3
  313. package/dist/implementations/dms-base/group-order.d.ts +0 -18
  314. package/dist/implementations/dms-base/group-order.js +0 -66
  315. package/dist/implementations/dms-base/group-order.js.map +0 -1
  316. package/dist/mockup/capture-routes.js +0 -101
  317. package/dist/mockup/capture-routes.js.map +0 -1
  318. package/dist/mockup/capture.d.ts +0 -10
  319. package/dist/mockup/capture.js +0 -64
  320. package/dist/mockup/capture.js.map +0 -1
  321. package/dist/mockup/header-action.d.ts +0 -47
  322. package/dist/mockup/header-action.js +0 -46
  323. package/dist/mockup/header-action.js.map +0 -1
  324. package/dist/mockup/json-schema-header.d.ts +0 -2
  325. package/dist/mockup/json-schema-header.js +0 -69
  326. package/dist/mockup/json-schema-header.js.map +0 -1
  327. package/dist/mockup/json-schema-layout.d.ts +0 -2
  328. package/dist/mockup/json-schema-layout.js +0 -61
  329. package/dist/mockup/json-schema-layout.js.map +0 -1
  330. package/dist/mockup/summary-fields.js.map +0 -1
  331. package/dist/mockup/table-param-filters.d.ts +0 -52
  332. package/dist/mockup/table-param-filters.js +0 -83
  333. package/dist/mockup/table-param-filters.js.map +0 -1
  334. package/dist/mockup/table-row-actions.d.ts +0 -2
  335. package/dist/mockup/table-row-actions.js +0 -85
  336. package/dist/mockup/table-row-actions.js.map +0 -1
  337. package/dist/mockup/unknown-keys.d.ts +0 -3
  338. package/dist/mockup/unknown-keys.js +0 -45
  339. package/dist/mockup/unknown-keys.js.map +0 -1
  340. package/dist/utils/email-plain-text.d.ts +0 -1
  341. package/dist/utils/email-plain-text.js +0 -95
  342. package/dist/utils/email-plain-text.js.map +0 -1
  343. package/dist/utils/html-email.d.ts +0 -8
  344. package/dist/utils/html-email.js +0 -9
  345. package/dist/utils/html-email.js.map +0 -1
  346. package/dist/utils/image-signatures.d.ts +0 -3
  347. package/dist/utils/image-signatures.js +0 -22
  348. package/dist/utils/image-signatures.js.map +0 -1
  349. package/dist/utils/sse-keepalive/index.d.ts +0 -3
  350. package/dist/utils/sse-keepalive/index.js +0 -8
  351. package/dist/utils/sse-keepalive/index.js.map +0 -1
  352. package/dist/validation/allowed-keys.d.ts +0 -2
  353. package/dist/validation/allowed-keys.js +0 -16
  354. package/dist/validation/allowed-keys.js.map +0 -1
  355. package/frontend-vue/layers/dms-core/app/build/composables/field-errors.ts +0 -485
  356. package/frontend-vue/layers/dms-core/app/build/composables/useHydrated.ts +0 -27
  357. package/frontend-vue/layers/dms-core/app/entries/composables/useHydrated.ts +0 -1
  358. package/frontend-vue/layers/dms-layout/app/build/components/layout/EmptyLayoutBrand.vue +0 -49
  359. package/frontend-vue/layers/dms-layout/app/entries/components/pages/settings/shell/SettingsShell.ts +0 -2
  360. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewArrows.vue +0 -110
  361. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewFrameImage.vue +0 -75
  362. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewZoom.vue +0 -67
  363. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +0 -247
  364. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCaptureAssets.ts +0 -181
  365. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewRaster.ts +0 -45
  366. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +0 -136
  367. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewCapture.ts +0 -96
  368. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +0 -10
  369. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +0 -61
  370. package/frontend-vue/layers/dms-ui/app/build/utils/dotGrid.ts +0 -37
  371. package/frontend-vue/layers/dms-ui/app/build/utils/legalIdentifier.ts +0 -279
  372. package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +0 -130
  373. package/frontend-vue/layers/dms-ui/app/build/utils/previewHeader.ts +0 -154
  374. package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +0 -149
  375. package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +0 -42
  376. package/frontend-vue/layers/dms-ui/app/components/form/components/InputIdentifier.vue +0 -90
  377. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCapture.ts +0 -1
  378. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCaptureAssets.ts +0 -1
  379. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePreviewFrame.ts +0 -1
  380. package/frontend-vue/layers/dms-ui/app/entries/composables/table-view/utils/displayOptions.ts +0 -1
  381. package/frontend-vue/layers/dms-ui/app/entries/mockups/manage.ts +0 -1
  382. package/frontend-vue/layers/dms-ui/app/entries/utils/legalIdentifier.ts +0 -1
  383. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupCaptures.ts +0 -1
  384. /package/dist/mockup/{summary-fields.d.ts → store-summary.d.ts} +0 -0
@@ -1,130 +0,0 @@
1
- import { shallowRef, type Ref, type ShallowRef } from "vue";
2
- import type {
3
- PreviewBlockRect,
4
- PreviewNavigation,
5
- } from "./blockPreviewMessages";
6
- import type { MockupPageState } from "./mockup";
7
- import { mockupPageRender } from "./mockupFrame";
8
- import { mockupDataTree } from "./mockupRealData";
9
-
10
- /** The image of a page of a mockup, drawn once by the page's live preview. */
11
- export interface PageCapture {
12
- /** What drew the page, as {@link captureKey} names it: a page whose key is another is out of date. */
13
- key: string;
14
- /** An object URL of the image, WebP where the browser encodes it. */
15
- url: string;
16
- /** The height of the page the image shows, as its preview reported it. */
17
- height?: number;
18
- /** Where each block of the page sat in the image, for the pins of a frame no live preview reported. */
19
- blocks?: PreviewBlockRect[];
20
- }
21
-
22
- /** What the live preview of a page reported of the drawing it was captured from. */
23
- export interface CapturedLayout {
24
- height?: number;
25
- blocks?: PreviewBlockRect[];
26
- }
27
-
28
- /** The captures of a mockup by page id. */
29
- export type PageCaptures = ReadonlyMap<string, PageCapture>;
30
-
31
- /** The sidebar every page is drawn in, which is the same for all of them and so says nothing of one. */
32
- const NO_NAVIGATION: PreviewNavigation = { sections: [] };
33
-
34
- /**
35
- * What draws `page` alone: its own state as the preview is sent it, minus
36
- * the sidebar, and whether it reads real data. Another page changing, or
37
- * the pages' order or titles, leaves the key as it was; changing the page
38
- * itself, its theme or locale, or Real data does not.
39
- */
40
- export function captureKey(page: MockupPageState, realData: boolean): string {
41
- return JSON.stringify([
42
- realData,
43
- mockupPageRender(page, mockupDataTree(page, realData), NO_NAVIGATION),
44
- ]);
45
- }
46
-
47
- /**
48
- * The captures of each mockup, kept outside the viewer, which the dashboard
49
- * builds again on a step of the browser's history, so a viewer built again,
50
- * or another view of the mockup, can show a page the Overview drew.
51
- */
52
- const stores = new Map<string, ShallowRef<PageCaptures>>();
53
-
54
- function storeOf(name: string): ShallowRef<PageCaptures> {
55
- const known = stores.get(name);
56
- if (known) return known;
57
- const made = shallowRef<PageCaptures>(new Map());
58
- stores.set(name, made);
59
- return made;
60
- }
61
-
62
- /** The captures of the mockup `name`, replaced as a whole on each change: read them reactively. */
63
- export function mockupCaptures(name: string): Readonly<Ref<PageCaptures>> {
64
- return storeOf(name);
65
- }
66
-
67
- /** The capture of `page` of the mockup `name`, stale or not; undefined while it has none. */
68
- export function pageCapture(
69
- name: string,
70
- page: string,
71
- ): PageCapture | undefined {
72
- return storeOf(name).value.get(page);
73
- }
74
-
75
- /** Keeps `image` as the capture of `page` of the mockup `name`, drawn from `key` at the height and with the blocks of `drawn`, and releases the image it replaces. */
76
- export function storePageCapture(
77
- name: string,
78
- page: string,
79
- key: string,
80
- image: Blob,
81
- drawn: CapturedLayout = {},
82
- ): void {
83
- const store = storeOf(name);
84
- const replaced = store.value.get(page);
85
- store.value = new Map(store.value).set(page, {
86
- key,
87
- url: URL.createObjectURL(image),
88
- ...drawn,
89
- });
90
- if (replaced) URL.revokeObjectURL(replaced.url);
91
- }
92
-
93
- /**
94
- * What the server holds of each mockup's first page as far as this browser
95
- * session knows, as the page and the capture key it was sent from.
96
- */
97
- const sent = new Map<string, string>();
98
-
99
- /**
100
- * Takes the right to send the capture of `page`, drawn from `key`, as the
101
- * image of the mockup `name`. False when it was sent already, or is being
102
- * sent, so each drawing of a first page is sent once per session.
103
- */
104
- export function claimCaptureUpload(
105
- name: string,
106
- page: string,
107
- key: string,
108
- ): boolean {
109
- const claim = JSON.stringify([page, key]);
110
- if (sent.get(name) === claim) return false;
111
- sent.set(name, claim);
112
- return true;
113
- }
114
-
115
- /** Gives back a claim whose upload failed, so the same capture is sent again the next time it is current. */
116
- export function releaseCaptureUpload(
117
- name: string,
118
- page: string,
119
- key: string,
120
- ): void {
121
- if (sent.get(name) === JSON.stringify([page, key])) sent.delete(name);
122
- }
123
-
124
- /** Forgets every capture of the mockup `name`, and releases its images. */
125
- export function clearMockupCaptures(name: string): void {
126
- sent.delete(name);
127
- const store = storeOf(name);
128
- for (const { url } of store.value.values()) URL.revokeObjectURL(url);
129
- store.value = new Map();
130
- }
@@ -1,154 +0,0 @@
1
- import { ButtonVariant } from "../../../../dms-core/app/types/button";
2
- import { Color, type ColorValue } from "../../../../dms-core/app/types/color";
3
- import {
4
- isBoolean,
5
- isNumber,
6
- isObject,
7
- isString,
8
- } from "../../../../dms-core/app/utils/type-check";
9
-
10
- type ButtonVariantValue = `${ButtonVariant}`;
11
-
12
- const HEADER_COLORS = new Set<string>(Object.values(Color));
13
- const HEADER_VARIANTS = new Set<string>(Object.values(ButtonVariant));
14
-
15
- /** Whether `value` is a color a header button takes. */
16
- export function isHeaderColor(
17
- value: Parameters<typeof isString>[0],
18
- ): value is ColorValue {
19
- return isString(value) && HEADER_COLORS.has(value);
20
- }
21
-
22
- /** Whether `value` is a variant a header button takes. */
23
- export function isHeaderVariant(
24
- value: Parameters<typeof isString>[0],
25
- ): value is ButtonVariantValue {
26
- return isString(value) && HEADER_VARIANTS.has(value);
27
- }
28
-
29
- /** Where a header button of a mockup goes: the viewer's URL of a page of the mockup. */
30
- export interface PreviewHeaderTarget {
31
- type: "page";
32
- url: string;
33
- }
34
-
35
- /** One dependent a header button's action affects, listed in its dialog. */
36
- export interface PreviewConfirmImpact {
37
- icon: string;
38
- label: string;
39
- count?: number | string;
40
- }
41
-
42
- /** The dialog a header button of a mockup asks in before it goes: a fixed `ConfirmDialog`'s texts. */
43
- export interface PreviewHeaderConfirm {
44
- title: string;
45
- description?: string;
46
- params?: Record<string, string | number>;
47
- icon?: string;
48
- color?: ColorValue;
49
- confirmLabel?: string;
50
- cancelLabel?: string;
51
- impact?: PreviewConfirmImpact[];
52
- blocked?: boolean;
53
- confirmText?: string;
54
- confirmTextCaseInsensitive?: boolean;
55
- }
56
-
57
- /** A button right of the page title, as the header draws it, and what pressing it does. */
58
- export interface PreviewHeaderAction {
59
- label: string;
60
- icon?: string;
61
- color?: ColorValue;
62
- variant?: ButtonVariantValue;
63
- target?: PreviewHeaderTarget;
64
- confirm?: PreviewHeaderConfirm;
65
- }
66
-
67
- /** The page header the preview draws above the blocks, as the dashboard draws a page's. */
68
- export interface PreviewHeader {
69
- title: string;
70
- icon?: string;
71
- description?: string;
72
- actions?: PreviewHeaderAction[];
73
- }
74
-
75
- function isRecord(
76
- value: Parameters<typeof isObject>[0],
77
- ): value is Record<string, unknown> {
78
- return isObject(value) && value !== null && !Array.isArray(value);
79
- }
80
-
81
- function isOptionalString(value: Parameters<typeof isString>[0]): boolean {
82
- return value === undefined || isString(value);
83
- }
84
-
85
- function isOptionalBoolean(value: Parameters<typeof isBoolean>[0]): boolean {
86
- return value === undefined || isBoolean(value);
87
- }
88
-
89
- function isHeaderTarget(value: unknown): value is PreviewHeaderTarget {
90
- return isRecord(value) && value.type === "page" && isString(value.url);
91
- }
92
-
93
- function isConfirmImpact(value: unknown): value is PreviewConfirmImpact {
94
- return (
95
- isRecord(value) &&
96
- isString(value.icon) &&
97
- isString(value.label) &&
98
- (value.count === undefined ||
99
- isString(value.count) ||
100
- isNumber(value.count))
101
- );
102
- }
103
-
104
- function isConfirmParams(
105
- value: unknown,
106
- ): value is PreviewHeaderConfirm["params"] {
107
- return (
108
- value === undefined ||
109
- (isRecord(value) &&
110
- Object.values(value).every((param) => isString(param) || isNumber(param)))
111
- );
112
- }
113
-
114
- function isHeaderConfirm(value: unknown): value is PreviewHeaderConfirm {
115
- return (
116
- isRecord(value) &&
117
- isString(value.title) &&
118
- isOptionalString(value.description) &&
119
- isConfirmParams(value.params) &&
120
- isOptionalString(value.icon) &&
121
- (value.color === undefined || isHeaderColor(value.color)) &&
122
- isOptionalString(value.confirmLabel) &&
123
- isOptionalString(value.cancelLabel) &&
124
- (value.impact === undefined ||
125
- (Array.isArray(value.impact) && value.impact.every(isConfirmImpact))) &&
126
- isOptionalBoolean(value.blocked) &&
127
- isOptionalString(value.confirmText) &&
128
- isOptionalBoolean(value.confirmTextCaseInsensitive)
129
- );
130
- }
131
-
132
- function isHeaderAction(value: unknown): value is PreviewHeaderAction {
133
- return (
134
- isRecord(value) &&
135
- isString(value.label) &&
136
- isOptionalString(value.icon) &&
137
- (value.color === undefined || isHeaderColor(value.color)) &&
138
- (value.variant === undefined || isHeaderVariant(value.variant)) &&
139
- (value.target === undefined || isHeaderTarget(value.target)) &&
140
- (value.confirm === undefined || isHeaderConfirm(value.confirm))
141
- );
142
- }
143
-
144
- /** Whether `value` is a page header a `render` may carry, every button checked. */
145
- export function isPreviewHeader(value: unknown): value is PreviewHeader {
146
- return (
147
- isRecord(value) &&
148
- isString(value.title) &&
149
- isOptionalString(value.icon) &&
150
- isOptionalString(value.description) &&
151
- (value.actions === undefined ||
152
- (Array.isArray(value.actions) && value.actions.every(isHeaderAction)))
153
- );
154
- }
@@ -1,149 +0,0 @@
1
- import {
2
- isBoolean,
3
- isObject,
4
- isString,
5
- } from "../../../../dms-core/app/utils/type-check";
6
-
7
- /**
8
- * The layouts a mockup page is drawn in, named after their factories:
9
- * `DefaultLayout`, `FormPageLayout`, `SettingsLayout` and `EmptyLayout`.
10
- */
11
- export const PREVIEW_PAGE_LAYOUTS = [
12
- "default",
13
- "form-page",
14
- "settings",
15
- "empty",
16
- ] as const;
17
- export type PreviewPageLayoutType = (typeof PREVIEW_PAGE_LAYOUTS)[number];
18
-
19
- /** The options of a layout, each one the layout's factory takes. */
20
- export interface PreviewPageLayoutOptions {
21
- fullWidth?: boolean;
22
- hideHeader?: boolean;
23
- fillHeight?: boolean;
24
- hideBrand?: boolean;
25
- hideFooter?: boolean;
26
- }
27
-
28
- const LAYOUT_TYPES: ReadonlySet<unknown> = new Set(PREVIEW_PAGE_LAYOUTS);
29
-
30
- const LAYOUT_OPTION_KEYS: readonly string[] = [
31
- "fullWidth",
32
- "hideHeader",
33
- "fillHeight",
34
- "hideBrand",
35
- "hideFooter",
36
- ] satisfies (keyof PreviewPageLayoutOptions)[];
37
-
38
- /** The layout a page is drawn in, with its options. */
39
- export interface PreviewPageLayout {
40
- type: PreviewPageLayoutType;
41
- options?: PreviewPageLayoutOptions;
42
- }
43
-
44
- /** What the preview draws around a page's blocks. */
45
- export interface PreviewFrame {
46
- /** The dashboard's sidebar and top bar. */
47
- dashboard: boolean;
48
- /** The page header: title, icon, description and buttons. */
49
- header: boolean;
50
- /** The blocks span the panel, else a readable column. */
51
- fullWidth: boolean;
52
- /** The settings navigation beside the page. */
53
- settings: boolean;
54
- /** The page fills the frame's height, its last block taking what is left. */
55
- fillHeight: boolean;
56
- /** Without the dashboard: the app logo and the theme toggle above the page. */
57
- brand: boolean;
58
- /** Without the dashboard: the footer under the page. */
59
- footer: boolean;
60
- }
61
-
62
- function isRecord(
63
- value: Parameters<typeof isObject>[0],
64
- ): value is Record<string, unknown> {
65
- return isObject(value) && value !== null && !Array.isArray(value);
66
- }
67
-
68
- function isLayoutType(value: unknown): value is PreviewPageLayoutType {
69
- return LAYOUT_TYPES.has(value);
70
- }
71
-
72
- function isOptionalBoolean(value: Parameters<typeof isBoolean>[0]): boolean {
73
- return value === undefined || isBoolean(value);
74
- }
75
-
76
- function isLayoutOptions(value: unknown): value is PreviewPageLayoutOptions {
77
- return (
78
- isRecord(value) &&
79
- Object.keys(value).every((key) => LAYOUT_OPTION_KEYS.includes(key)) &&
80
- isOptionalBoolean(value.fullWidth) &&
81
- isOptionalBoolean(value.hideHeader) &&
82
- isOptionalBoolean(value.fillHeight) &&
83
- isOptionalBoolean(value.hideBrand) &&
84
- isOptionalBoolean(value.hideFooter)
85
- );
86
- }
87
-
88
- /** Whether `value` is a layout a page is drawn in, each option a boolean the layouts take. */
89
- export function isPreviewPageLayout(
90
- value: unknown,
91
- ): value is PreviewPageLayout {
92
- return (
93
- isRecord(value) &&
94
- isLayoutType(value.type) &&
95
- (value.options === undefined || isLayoutOptions(value.options))
96
- );
97
- }
98
-
99
- /** Whether `value` is absent, or a layout a page is drawn in. */
100
- export function isOptionalPreviewPageLayout(
101
- value: unknown,
102
- ): value is PreviewPageLayout | undefined {
103
- return value === undefined || isPreviewPageLayout(value);
104
- }
105
-
106
- /** Whether `value` is absent, or an object of strings, as a render's `params` and `query` are. */
107
- export function isOptionalStringRecord(
108
- value: Parameters<typeof isObject>[0],
109
- ): boolean {
110
- return (
111
- value === undefined ||
112
- (isObject(value) &&
113
- value !== null &&
114
- !Array.isArray(value) &&
115
- Object.values(value).every(isString))
116
- );
117
- }
118
-
119
- /**
120
- * What the preview draws around a page in `layout`, as the layout draws a
121
- * real page: the dashboard frame of `DefaultLayout()` when there is none.
122
- */
123
- export function previewFrameOf(
124
- layout: PreviewPageLayout | undefined,
125
- ): PreviewFrame {
126
- const options = layout?.options ?? {};
127
- const fillHeight = options.fillHeight ?? false;
128
- if (layout?.type === "empty") {
129
- return {
130
- dashboard: false,
131
- header: false,
132
- fullWidth: true,
133
- settings: false,
134
- fillHeight,
135
- brand: !(options.hideBrand ?? false),
136
- footer: !(options.hideFooter ?? false),
137
- };
138
- }
139
- const type = layout?.type ?? "default";
140
- return {
141
- dashboard: true,
142
- header: !(options.hideHeader ?? false),
143
- fullWidth: type === "default" && (options.fullWidth ?? true),
144
- settings: type === "settings",
145
- fillHeight,
146
- brand: false,
147
- footer: false,
148
- };
149
- }
@@ -1,42 +0,0 @@
1
- import { FIXTURES_ONLY_QUERY } from "./previewFixturesOnly";
2
-
3
- /** The query `/dms-preview` reads its first state from. */
4
- export const STATE_QUERY = "state";
5
-
6
- /** The parameters the preview reads itself, which a page's query never replaces. */
7
- const PREVIEW_QUERY_KEYS: ReadonlySet<string> = new Set([
8
- STATE_QUERY,
9
- FIXTURES_ONLY_QUERY,
10
- ]);
11
-
12
- type QueryValue = string | null | readonly (string | null)[];
13
-
14
- type RouteQuery = Readonly<Record<string, QueryValue | undefined>>;
15
-
16
- /**
17
- * The query `/dms-preview` takes so its blocks read `page`, the query of the
18
- * page they are drawn on, from the route as a page's blocks do: the preview's
19
- * own parameters, then each of `page`'s. Undefined when `current` holds that
20
- * already, so the route is replaced only when the page's query changes.
21
- */
22
- export function previewRouteQuery(
23
- current: RouteQuery,
24
- page: Readonly<Record<string, string>> | undefined,
25
- ): Record<string, QueryValue> | undefined {
26
- const held = new Map(
27
- Object.entries(current).flatMap(([key, value]) =>
28
- value === undefined ? [] : [[key, value] as const],
29
- ),
30
- );
31
- const next = new Map<string, QueryValue>();
32
- for (const [key, value] of held) {
33
- if (PREVIEW_QUERY_KEYS.has(key)) next.set(key, value);
34
- }
35
- for (const [key, value] of Object.entries(page ?? {})) {
36
- if (!PREVIEW_QUERY_KEYS.has(key)) next.set(key, value);
37
- }
38
- const same =
39
- held.size === next.size &&
40
- [...next].every(([key, value]) => held.get(key) === value);
41
- return same ? undefined : Object.fromEntries(next);
42
- }
@@ -1,90 +0,0 @@
1
- <script setup lang="ts">
2
- import { useFormField } from "@nuxt/ui/composables/useFormField";
3
- import { useControlError } from "../../../composables/form/useControlError";
4
- import {
5
- formatIdentifier,
6
- type IdentifierKind,
7
- identifierErrorKey,
8
- readIdentifier,
9
- } from "../../../build/utils/legalIdentifier";
10
-
11
- interface InputIdentifierProps {
12
- id?: string;
13
- placeholder?: string;
14
- disabled?: boolean;
15
- /** Which identifier the field holds, and so which rule it checks. */
16
- identifier: IdentifierKind;
17
- /** `vat_number`: the country a number typed without its code is read in. */
18
- defaultCountry?: string;
19
- /** `company_number`: the country whose register the number belongs to. */
20
- country?: string;
21
- }
22
-
23
- const props = defineProps<InputIdentifierProps>();
24
- const model = defineModel<string | null | undefined>();
25
- const { t } = useI18n();
26
- const { report } = useControlError();
27
- const {
28
- id,
29
- size,
30
- color,
31
- highlight,
32
- disabled,
33
- ariaAttrs,
34
- emitFormBlur,
35
- emitFormInput,
36
- } = useFormField(props);
37
-
38
- const text = ref("");
39
- let emitted: string | null | undefined;
40
-
41
- function shown(value: string | null | undefined): string {
42
- return value ? formatIdentifier(value, props) : "";
43
- }
44
-
45
- text.value = shown(model.value);
46
-
47
- watch(model, (value) => {
48
- if (value !== emitted) text.value = shown(value);
49
- });
50
-
51
- function onInput(next: string | number | null | undefined): void {
52
- text.value = String(next ?? "");
53
- const read = readIdentifier(text.value, props);
54
- emitted = read ?? text.value.trim();
55
- model.value = emitted;
56
- emitFormInput();
57
- if (read !== undefined || !text.value.trim()) report(undefined);
58
- }
59
-
60
- function onBlur(): void {
61
- const read = readIdentifier(text.value, props);
62
- if (read !== undefined) text.value = shown(read);
63
- report(
64
- read === undefined && text.value.trim()
65
- ? t(identifierErrorKey(props.identifier))
66
- : undefined,
67
- );
68
- emitFormBlur();
69
- }
70
- </script>
71
-
72
- <template>
73
- <UInput
74
- v-bind="ariaAttrs"
75
- :id="id"
76
- :model-value="text"
77
- autocomplete="off"
78
- spellcheck="false"
79
- :placeholder="props.placeholder"
80
- :size="size"
81
- :color="color"
82
- :highlight="highlight"
83
- :disabled="disabled"
84
- class="w-full"
85
- :ui="{ base: 'tabular-nums uppercase' }"
86
- :data-identifier="props.identifier"
87
- @update:model-value="onInput"
88
- @blur="onBlur"
89
- />
90
- </template>
@@ -1 +0,0 @@
1
- export * from "../../../build/composables/block-preview/previewCapture";
@@ -1 +0,0 @@
1
- export * from "../../../build/composables/block-preview/previewCaptureAssets";
@@ -1 +0,0 @@
1
- export * from "../../../build/composables/block-preview/usePreviewFrame";
@@ -1 +0,0 @@
1
- export * from "../../../../build/composables/table-view/utils/displayOptions";
@@ -1 +0,0 @@
1
- export * from "../../build/mockups/manage";
@@ -1 +0,0 @@
1
- export * from "../../build/utils/legalIdentifier";
@@ -1 +0,0 @@
1
- export * from "../../build/utils/mockupCaptures";