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

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 (385) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/README.md +2 -2
  3. package/data/mockup-spec.schema.json +303 -223
  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 +1 -2
  7. package/dist/implementations/dms-auth/index.js.map +1 -1
  8. package/dist/implementations/dms-base/group-order.d.ts +18 -0
  9. package/dist/implementations/dms-base/group-order.js +66 -0
  10. package/dist/implementations/dms-base/group-order.js.map +1 -0
  11. package/dist/implementations/dms-base/search-route.js +8 -5
  12. package/dist/implementations/dms-base/search-route.js.map +1 -1
  13. package/dist/implementations/dms-builder/engine/cell-displays.js +4 -1
  14. package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
  15. package/dist/implementations/dms-builder/engine/mapped-displays.js +5 -1
  16. package/dist/implementations/dms-builder/engine/mapped-displays.js.map +1 -1
  17. package/dist/implementations/dms-builder/engine/resource-emit.js +4 -0
  18. package/dist/implementations/dms-builder/engine/resource-emit.js.map +1 -1
  19. package/dist/implementations/dms-builder/engine/theme-assets.js +5 -17
  20. package/dist/implementations/dms-builder/engine/theme-assets.js.map +1 -1
  21. package/dist/index.js +0 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/mcp/index.d.ts +0 -1
  24. package/dist/mcp/index.js +0 -5
  25. package/dist/mcp/index.js.map +1 -1
  26. package/dist/mcp/page-verify/index.d.ts +0 -14
  27. package/dist/mcp/page-verify/index.js +5 -9
  28. package/dist/mcp/page-verify/index.js.map +1 -1
  29. package/dist/mcp/page-verify/mockup.d.ts +1 -2
  30. package/dist/mcp/page-verify/mockup.js +0 -1
  31. package/dist/mcp/page-verify/mockup.js.map +1 -1
  32. package/dist/mcp/page-verify/playwright.d.ts +4 -22
  33. package/dist/mcp/page-verify/playwright.js.map +1 -1
  34. package/dist/mcp/tools/mockup-apply-to-page.js +1 -1
  35. package/dist/mcp/tools/mockup-apply-to-page.js.map +1 -1
  36. package/dist/mcp/tools/mockup-patch-spec.js +1 -1
  37. package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
  38. package/dist/mcp/tools/mockup-read-spec.js +3 -10
  39. package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
  40. package/dist/mcp/tools/mockup-write-spec.js +1 -1
  41. package/dist/mcp/tools/mockup-write-spec.js.map +1 -1
  42. package/dist/mcp/tools/mockup.js +0 -2
  43. package/dist/mcp/tools/mockup.js.map +1 -1
  44. package/dist/mcp/tools/page-verify.d.ts +0 -1
  45. package/dist/mcp/tools/page-verify.js +1 -5
  46. package/dist/mcp/tools/page-verify.js.map +1 -1
  47. package/dist/mockup/apply-notes.d.ts +1 -1
  48. package/dist/mockup/apply-notes.js +2 -1
  49. package/dist/mockup/apply-notes.js.map +1 -1
  50. package/dist/mockup/apply-plan.js +3 -0
  51. package/dist/mockup/apply-plan.js.map +1 -1
  52. package/dist/mockup/{fixture-routes.d.ts → capture-routes.d.ts} +6 -11
  53. package/dist/mockup/capture-routes.js +101 -0
  54. package/dist/mockup/capture-routes.js.map +1 -0
  55. package/dist/mockup/capture.d.ts +10 -0
  56. package/dist/mockup/capture.js +64 -0
  57. package/dist/mockup/capture.js.map +1 -0
  58. package/dist/mockup/compile.d.ts +1 -6
  59. package/dist/mockup/compile.js +25 -29
  60. package/dist/mockup/compile.js.map +1 -1
  61. package/dist/mockup/controller-blocks.js +62 -10
  62. package/dist/mockup/controller-blocks.js.map +1 -1
  63. package/dist/mockup/display-values.js +1 -1
  64. package/dist/mockup/display-values.js.map +1 -1
  65. package/dist/mockup/files.d.ts +2 -2
  66. package/dist/mockup/files.js +2 -2
  67. package/dist/mockup/files.js.map +1 -1
  68. package/dist/mockup/fixture-answers.d.ts +0 -1
  69. package/dist/mockup/fixture-answers.js +1 -1
  70. package/dist/mockup/fixture-answers.js.map +1 -1
  71. package/dist/mockup/fixtures.d.ts +3 -1
  72. package/dist/mockup/fixtures.js +25 -2
  73. package/dist/mockup/fixtures.js.map +1 -1
  74. package/dist/mockup/form-fields.js +10 -1
  75. package/dist/mockup/form-fields.js.map +1 -1
  76. package/dist/mockup/generate.js +1 -4
  77. package/dist/mockup/generate.js.map +1 -1
  78. package/dist/mockup/header-action.d.ts +47 -0
  79. package/dist/mockup/header-action.js +46 -0
  80. package/dist/mockup/header-action.js.map +1 -0
  81. package/dist/mockup/history-routes.js +17 -2
  82. package/dist/mockup/history-routes.js.map +1 -1
  83. package/dist/mockup/index.d.ts +0 -3
  84. package/dist/mockup/index.js +0 -3
  85. package/dist/mockup/index.js.map +1 -1
  86. package/dist/mockup/json-schema-header.d.ts +2 -0
  87. package/dist/mockup/json-schema-header.js +69 -0
  88. package/dist/mockup/json-schema-header.js.map +1 -0
  89. package/dist/mockup/json-schema-layout.d.ts +2 -0
  90. package/dist/mockup/json-schema-layout.js +61 -0
  91. package/dist/mockup/json-schema-layout.js.map +1 -0
  92. package/dist/mockup/json-schema.js +24 -23
  93. package/dist/mockup/json-schema.js.map +1 -1
  94. package/dist/mockup/manage.js +1 -1
  95. package/dist/mockup/manage.js.map +1 -1
  96. package/dist/mockup/model.d.ts +255 -106
  97. package/dist/mockup/model.js +82 -86
  98. package/dist/mockup/model.js.map +1 -1
  99. package/dist/mockup/modules.d.ts +9 -20
  100. package/dist/mockup/modules.js +22 -146
  101. package/dist/mockup/modules.js.map +1 -1
  102. package/dist/mockup/page-links.d.ts +2 -1
  103. package/dist/mockup/page-links.js +14 -3
  104. package/dist/mockup/page-links.js.map +1 -1
  105. package/dist/mockup/refusals.d.ts +1 -4
  106. package/dist/mockup/refusals.js +1 -15
  107. package/dist/mockup/refusals.js.map +1 -1
  108. package/dist/mockup/routes.d.ts +5 -1
  109. package/dist/mockup/routes.js +171 -9
  110. package/dist/mockup/routes.js.map +1 -1
  111. package/dist/mockup/sample-rows.js +4 -0
  112. package/dist/mockup/sample-rows.js.map +1 -1
  113. package/dist/mockup/store.d.ts +2 -1
  114. package/dist/mockup/store.js +22 -16
  115. package/dist/mockup/store.js.map +1 -1
  116. package/dist/mockup/{store-summary.js → summary-fields.js} +1 -1
  117. package/dist/mockup/summary-fields.js.map +1 -0
  118. package/dist/mockup/table-columns.js +9 -3
  119. package/dist/mockup/table-columns.js.map +1 -1
  120. package/dist/mockup/table-options.d.ts +4 -1
  121. package/dist/mockup/table-options.js +40 -2
  122. package/dist/mockup/table-options.js.map +1 -1
  123. package/dist/mockup/table-param-filters.d.ts +52 -0
  124. package/dist/mockup/table-param-filters.js +83 -0
  125. package/dist/mockup/table-param-filters.js.map +1 -0
  126. package/dist/mockup/table-row-actions.d.ts +2 -0
  127. package/dist/mockup/table-row-actions.js +85 -0
  128. package/dist/mockup/table-row-actions.js.map +1 -0
  129. package/dist/mockup/unknown-keys.d.ts +3 -0
  130. package/dist/mockup/unknown-keys.js +45 -0
  131. package/dist/mockup/unknown-keys.js.map +1 -0
  132. package/dist/mockup/validate.d.ts +7 -1
  133. package/dist/mockup/validate.js +76 -3
  134. package/dist/mockup/validate.js.map +1 -1
  135. package/dist/pages/account.d.ts +1 -0
  136. package/dist/pages/account.js +1 -0
  137. package/dist/pages/account.js.map +1 -1
  138. package/dist/pages/settings/overview/account-summary.d.ts +2 -0
  139. package/dist/pages/settings/overview/account-summary.js +17 -8
  140. package/dist/pages/settings/overview/account-summary.js.map +1 -1
  141. package/dist/pages/settings/settings-index.js +2 -1
  142. package/dist/pages/settings/settings-index.js.map +1 -1
  143. package/dist/realtime/sse.js +2 -4
  144. package/dist/realtime/sse.js.map +1 -1
  145. package/dist/store/internal/frontend/dev-reload.js +7 -1
  146. package/dist/store/internal/frontend/dev-reload.js.map +1 -1
  147. package/dist/utils/account-notifications.js +1 -0
  148. package/dist/utils/account-notifications.js.map +1 -1
  149. package/dist/utils/email-change-mail.js +2 -2
  150. package/dist/utils/email-change-mail.js.map +1 -1
  151. package/dist/utils/email-plain-text.d.ts +1 -0
  152. package/dist/utils/email-plain-text.js +95 -0
  153. package/dist/utils/email-plain-text.js.map +1 -0
  154. package/dist/utils/export-jobs.js +2 -2
  155. package/dist/utils/export-jobs.js.map +1 -1
  156. package/dist/utils/html-email.d.ts +8 -0
  157. package/dist/utils/html-email.js +9 -0
  158. package/dist/utils/html-email.js.map +1 -0
  159. package/dist/utils/image-signatures.d.ts +3 -0
  160. package/dist/utils/image-signatures.js +22 -0
  161. package/dist/utils/image-signatures.js.map +1 -0
  162. package/dist/utils/index.d.ts +2 -0
  163. package/dist/utils/index.js +2 -0
  164. package/dist/utils/index.js.map +1 -1
  165. package/dist/utils/sse-keepalive/index.d.ts +3 -0
  166. package/dist/utils/sse-keepalive/index.js +8 -0
  167. package/dist/utils/sse-keepalive/index.js.map +1 -0
  168. package/dist/validation/allowed-keys.d.ts +2 -0
  169. package/dist/validation/allowed-keys.js +16 -0
  170. package/dist/validation/allowed-keys.js.map +1 -0
  171. package/dist/validation/index.d.ts +1 -0
  172. package/dist/validation/index.js +1 -0
  173. package/dist/validation/index.js.map +1 -1
  174. package/frontend-vue/eslint-globals.generated.mjs +2 -2
  175. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +3 -0
  176. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +3 -0
  177. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +3 -0
  178. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot.vue +3 -0
  179. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/login.vue +4 -1
  180. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +3 -0
  181. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +17 -1
  182. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +3 -0
  183. package/frontend-vue/layers/dms-auth/i18n/locales/auth-fr-FR.json +10 -10
  184. package/frontend-vue/layers/dms-core/app/build/composables/api-error.ts +8 -0
  185. package/frontend-vue/layers/dms-core/app/build/composables/field-errors.ts +485 -0
  186. package/frontend-vue/layers/dms-core/app/build/composables/useHydrated.ts +27 -0
  187. package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +3 -2
  188. package/frontend-vue/layers/dms-core/app/composables/translation/useUniqueLocales.ts +23 -5
  189. package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +1 -0
  190. package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +12 -443
  191. package/frontend-vue/layers/dms-core/app/entries/composables/useHydrated.ts +1 -0
  192. package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +8 -0
  193. package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +8 -0
  194. package/frontend-vue/layers/dms-core/shared/types/app-config.ts +2 -0
  195. package/frontend-vue/layers/dms-layout/app/app.config.ts +1 -0
  196. package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +7 -4
  197. package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +14 -29
  198. package/frontend-vue/layers/dms-layout/app/build/components/layout/EmptyLayoutBrand.vue +49 -0
  199. package/frontend-vue/layers/dms-layout/app/build/components/layout/LayoutFooter.vue +2 -0
  200. package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +6 -21
  201. package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +19 -3
  202. package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +9 -110
  203. package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +8 -2
  204. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +6 -9
  205. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixCategory.vue +6 -2
  206. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixSubject.vue +27 -22
  207. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +8 -10
  208. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/notificationDisplay.ts +39 -3
  209. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +38 -5
  210. package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfilePreferences.ts +1 -3
  211. package/frontend-vue/layers/dms-layout/app/build/utils/dev-reload-stream.ts +23 -4
  212. package/frontend-vue/layers/dms-layout/app/custom-layouts/EmptyLayout.vue +39 -31
  213. package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +60 -9
  214. package/frontend-vue/layers/dms-layout/app/entries/components/pages/settings/shell/SettingsShell.ts +2 -0
  215. package/frontend-vue/layers/dms-layout/app/error.vue +1 -1
  216. package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +7 -1
  217. package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +14 -1
  218. package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +13 -0
  219. package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +1 -1
  220. package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +5 -5
  221. package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/steps/StepPlatform.vue +3 -0
  222. package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/StepRegister.vue +3 -1
  223. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +1 -1
  224. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupHeaderActions.vue +1 -4
  225. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +2 -1
  226. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIssues.vue +22 -1
  227. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +6 -11
  228. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +125 -182
  229. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewArrows.vue +110 -0
  230. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewFrameImage.vue +75 -0
  231. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +114 -12
  232. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewZoom.vue +67 -0
  233. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +10 -4
  234. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +8 -76
  235. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +9 -65
  236. package/frontend-vue/layers/dms-ui/app/build/components/table-view/ExpandedRowDetail.vue +26 -6
  237. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +247 -0
  238. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCaptureAssets.ts +181 -0
  239. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +8 -8
  240. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewRaster.ts +45 -0
  241. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +46 -6
  242. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +109 -35
  243. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +5 -18
  244. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +4 -1
  245. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +3 -1
  246. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +0 -6
  247. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +137 -0
  248. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +68 -13
  249. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewLinks.ts +17 -7
  250. package/frontend-vue/layers/dms-ui/app/build/composables/confirm/fetchedConfirmDialog.ts +6 -0
  251. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDisplayComponents.ts +4 -0
  252. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +38 -0
  253. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerFieldTypes.ts +69 -3
  254. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +20 -7
  255. package/frontend-vue/layers/dms-ui/app/build/composables/form/keyValueRows.ts +36 -0
  256. package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +4 -0
  257. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewGrouping.ts +1 -0
  258. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewListing.ts +21 -5
  259. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewSorting.ts +8 -0
  260. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useGroupedRows.ts +32 -4
  261. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +1 -1
  262. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +1 -1
  263. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/displayOptions.ts +16 -2
  264. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +67 -5
  265. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +5 -0
  266. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +73 -48
  267. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +18 -11
  268. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupThumbnail.vue +35 -124
  269. package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +7 -3
  270. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewCapture.ts +96 -0
  271. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +10 -0
  272. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +84 -149
  273. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +61 -0
  274. package/frontend-vue/layers/dms-ui/app/build/utils/dotGrid.ts +37 -0
  275. package/frontend-vue/layers/dms-ui/app/build/utils/legalIdentifier.ts +279 -0
  276. package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +43 -72
  277. package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +130 -0
  278. package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +8 -92
  279. package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +35 -1
  280. package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +44 -17
  281. package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +3 -14
  282. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +26 -14
  283. package/frontend-vue/layers/dms-ui/app/build/utils/previewHeader.ts +154 -0
  284. package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +149 -0
  285. package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +42 -0
  286. package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +56 -6
  287. package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +0 -3
  288. package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +7 -7
  289. package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +4 -7
  290. package/frontend-vue/layers/dms-ui/app/components/form/components/InputIdentifier.vue +90 -0
  291. package/frontend-vue/layers/dms-ui/app/components/form/components/InputPhone.vue +5 -0
  292. package/frontend-vue/layers/dms-ui/app/components/form/components/KeyValue.vue +2 -20
  293. package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +51 -15
  294. package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +3 -8
  295. package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +10 -0
  296. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCapture.ts +1 -0
  297. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCaptureAssets.ts +1 -0
  298. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePreviewFrame.ts +1 -0
  299. package/frontend-vue/layers/dms-ui/app/entries/composables/table-view/utils/displayOptions.ts +1 -0
  300. package/frontend-vue/layers/dms-ui/app/entries/mockups/manage.ts +1 -0
  301. package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +3 -0
  302. package/frontend-vue/layers/dms-ui/app/entries/utils/legalIdentifier.ts +1 -0
  303. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupCaptures.ts +1 -0
  304. package/frontend-vue/layers/dms-ui/app/types/table/query.ts +5 -0
  305. package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +2 -28
  306. package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +12 -38
  307. package/frontend-vue/package.json +3 -3
  308. package/frontend-vue/scripts/check-invariants.mjs +101 -0
  309. package/package.json +9 -8
  310. package/skills/dms/SKILL.md +4 -2
  311. package/skills/dms-module/SKILL.md +3 -0
  312. package/dist/mcp/mockup-export/capture.d.ts +0 -15
  313. package/dist/mcp/mockup-export/capture.js +0 -97
  314. package/dist/mcp/mockup-export/capture.js.map +0 -1
  315. package/dist/mcp/mockup-export/document.d.ts +0 -4
  316. package/dist/mcp/mockup-export/document.js +0 -199
  317. package/dist/mcp/mockup-export/document.js.map +0 -1
  318. package/dist/mcp/mockup-export/index.d.ts +0 -23
  319. package/dist/mcp/mockup-export/index.js +0 -90
  320. package/dist/mcp/mockup-export/index.js.map +0 -1
  321. package/dist/mcp/mockup-export/plan.d.ts +0 -78
  322. package/dist/mcp/mockup-export/plan.js +0 -257
  323. package/dist/mcp/mockup-export/plan.js.map +0 -1
  324. package/dist/mcp/mockup-export/route.d.ts +0 -13
  325. package/dist/mcp/mockup-export/route.js +0 -66
  326. package/dist/mcp/mockup-export/route.js.map +0 -1
  327. package/dist/mcp/tools/mockup-export-pdf.d.ts +0 -1
  328. package/dist/mcp/tools/mockup-export-pdf.js +0 -71
  329. package/dist/mcp/tools/mockup-export-pdf.js.map +0 -1
  330. package/dist/mockup/database-manifest.d.ts +0 -2
  331. package/dist/mockup/database-manifest.js +0 -75
  332. package/dist/mockup/database-manifest.js.map +0 -1
  333. package/dist/mockup/entities.d.ts +0 -20
  334. package/dist/mockup/entities.js +0 -213
  335. package/dist/mockup/entities.js.map +0 -1
  336. package/dist/mockup/fixture-routes.js +0 -155
  337. package/dist/mockup/fixture-routes.js.map +0 -1
  338. package/dist/mockup/json-schema-entities.d.ts +0 -5
  339. package/dist/mockup/json-schema-entities.js +0 -141
  340. package/dist/mockup/json-schema-entities.js.map +0 -1
  341. package/dist/mockup/json.d.ts +0 -8
  342. package/dist/mockup/json.js +0 -20
  343. package/dist/mockup/json.js.map +0 -1
  344. package/dist/mockup/manifest-blocks.d.ts +0 -19
  345. package/dist/mockup/manifest-blocks.js +0 -65
  346. package/dist/mockup/manifest-blocks.js.map +0 -1
  347. package/dist/mockup/module-manifests.d.ts +0 -22
  348. package/dist/mockup/module-manifests.js +0 -28
  349. package/dist/mockup/module-manifests.js.map +0 -1
  350. package/dist/mockup/modules-schema.d.ts +0 -2
  351. package/dist/mockup/modules-schema.js +0 -42
  352. package/dist/mockup/modules-schema.js.map +0 -1
  353. package/dist/mockup/saas-manifest.d.ts +0 -2
  354. package/dist/mockup/saas-manifest.js +0 -496
  355. package/dist/mockup/saas-manifest.js.map +0 -1
  356. package/dist/mockup/state.d.ts +0 -76
  357. package/dist/mockup/state.js +0 -22
  358. package/dist/mockup/state.js.map +0 -1
  359. package/dist/mockup/store-summary.js.map +0 -1
  360. package/dist/mockup/tenancy.d.ts +0 -19
  361. package/dist/mockup/tenancy.js +0 -73
  362. package/dist/mockup/tenancy.js.map +0 -1
  363. package/dist/mockup/tenant-rows.d.ts +0 -4
  364. package/dist/mockup/tenant-rows.js +0 -19
  365. package/dist/mockup/tenant-rows.js.map +0 -1
  366. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +0 -165
  367. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTenantBanner.vue +0 -48
  368. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +0 -142
  369. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +0 -175
  370. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +0 -76
  371. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +0 -63
  372. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +0 -119
  373. package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +0 -80
  374. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +0 -177
  375. package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +0 -151
  376. package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +0 -23
  377. package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +0 -15
  378. package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupTenantBanner.ts +0 -2
  379. package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupWorkspaceSwitcher.ts +0 -2
  380. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupPdfExport.ts +0 -1
  381. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupTenancy.ts +0 -1
  382. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +0 -1
  383. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenancy.ts +0 -1
  384. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenants.ts +0 -1
  385. /package/dist/mockup/{store-summary.d.ts → summary-fields.d.ts} +0 -0
@@ -0,0 +1,49 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ /** Draw the glow only, without the theme toggle and the logo. */
4
+ hideBrand?: boolean;
5
+ }
6
+
7
+ const props = withDefaults(defineProps<Props>(), {
8
+ hideBrand: false,
9
+ });
10
+
11
+ const emit = defineEmits<{
12
+ /** The theme toggle was clicked. */
13
+ toggleColorMode: [];
14
+ }>();
15
+
16
+ const { t } = useI18n();
17
+ </script>
18
+
19
+ <template>
20
+ <div class="contents">
21
+ <!-- v2 .au-stage: in dark only, a cyan glow centred behind the card. -->
22
+ <div
23
+ aria-hidden="true"
24
+ class="pointer-events-none absolute top-[150px] left-1/2 -z-10 h-[560px] w-[720px] max-w-full -translate-x-1/2 bg-(image:--dms-stage-glow)"
25
+ />
26
+
27
+ <template v-if="!props.hideBrand">
28
+ <UButton
29
+ variant="ghost"
30
+ color="neutral"
31
+ square
32
+ class="text-muted hover:text-highlighted absolute top-3.5 right-4 z-10"
33
+ :title="t('empty_layout.theme_toggle')"
34
+ :aria-label="t('empty_layout.theme_toggle')"
35
+ @click="emit('toggleColorMode')"
36
+ >
37
+ <UIcon
38
+ name="i-ph-sun-light"
39
+ class="hidden size-[18px] dark:inline-block"
40
+ />
41
+ <UIcon name="i-ph-moon-light" class="size-[18px] dark:hidden" />
42
+ </UButton>
43
+
44
+ <header class="mt-9 mb-3.5 flex w-full justify-center">
45
+ <DmsAppLogo class="h-14 w-auto" />
46
+ </header>
47
+ </template>
48
+ </div>
49
+ </template>
@@ -17,6 +17,7 @@ const copyright = computed(() =>
17
17
  ? null
18
18
  : processI18n(footer.value.copyright ?? DEFAULT_COPYRIGHT),
19
19
  );
20
+ const showsGithubStar = computed(() => footer.value.githubStar !== false);
20
21
  const showsLocaleSwitcher = computed(
21
22
  () => footer.value.localeSwitcher !== false,
22
23
  );
@@ -67,6 +68,7 @@ async function onLocaleChange(code: Parameters<typeof changeLanguage>[0]) {
67
68
  </template>
68
69
 
69
70
  <a
71
+ v-if="showsGithubStar"
70
72
  :href="GITHUB_REPOSITORY_URL"
71
73
  target="_blank"
72
74
  rel="noopener noreferrer"
@@ -14,14 +14,12 @@ import {
14
14
  } from "./mockupMenu";
15
15
 
16
16
  /**
17
- * The sidebar's menu of a mockup, drawn under the app's own menu: the spec's
18
- * sections and pages, the default section under the real menu's Pages
19
- * header, then each module as a root with its sub-sections, drawn by the
20
- * dashboard's own menu (see `mockupMenu`). Picking a page tells the
21
- * embedding page, which draws it. While the navigation is `editable`, the
22
- * spec's sections are edited in place, as in the viewer's page list, and
23
- * each change is handed to the embedding page, which writes the spec; the
24
- * modules are never edited. Otherwise the menu only navigates.
17
+ * The sidebar's menu of a mockup: the spec's own sections and pages alone,
18
+ * the default section under the real menu's Pages header, drawn by the
19
+ * dashboard's own menu (see `mockupMenu`). Picking a page tells the embedding page, which draws it. While the navigation is
20
+ * `editable`, the sections are edited in place, as in the viewer's page
21
+ * list, and each change is handed to the embedding page, which writes the
22
+ * spec; otherwise the menu only navigates.
25
23
  */
26
24
  const props = defineProps<{
27
25
  navigation: PreviewNavigation;
@@ -171,19 +169,6 @@ function holdDrop(event: DragEvent): void {
171
169
  </template>
172
170
  </template>
173
171
 
174
- <template #mockup-module-label="{ item }">
175
- <span
176
- class="flex min-w-0 items-center gap-1.5"
177
- :data-dms-preview-module="item['data-dms-preview-module']"
178
- :data-dms-preview-module-section="
179
- item['data-dms-preview-module-section']
180
- "
181
- >
182
- <UIcon v-if="item.icon" :name="item.icon" class="size-4 shrink-0" />
183
- <span class="truncate">{{ item.label }}</span>
184
- </span>
185
- </template>
186
-
187
172
  <template #mockup-page="{ item, active, ui }">
188
173
  <template v-for="entry in [pageOf(item)]" :key="entry?.page">
189
174
  <span
@@ -1,15 +1,21 @@
1
1
  <script setup lang="ts">
2
2
  import type { ButtonProps } from "@nuxt/ui";
3
3
  import { PREVIEW_HEADER_ATTRIBUTE } from "#dms-ui/app/entries/composables/block-preview/previewNavigation";
4
- import type { PreviewHeader } from "#dms-ui/app/entries/utils/blockPreview";
4
+ import { useActionConfirm } from "#dms-ui/app/entries/composables/confirm/useActionConfirm";
5
+ import type {
6
+ PreviewHeader,
7
+ PreviewHeaderAction,
8
+ } from "#dms-ui/app/entries/utils/blockPreview";
5
9
  import PageHeader from "./PageHeader.vue";
6
10
  import { headerButtonProps } from "./headerButton";
7
11
 
8
12
  /**
9
13
  * The page header a mockup draws above its blocks: the dashboard's own
10
14
  * `PageHeader`, fed by the spec page's fields instead of the page's layout,
11
- * with its buttons drawn as the page header bar draws them and none of what
12
- * they would do. Clicking it while inspecting picks the page.
15
+ * with its buttons drawn as the page header bar draws them. A button asks
16
+ * its confirmation, then opens the page of the mockup its target names, as
17
+ * a row action does; one with neither does nothing. Clicking the header
18
+ * while inspecting picks the page.
13
19
  */
14
20
  const props = defineProps<{ header: PreviewHeader }>();
15
21
 
@@ -19,10 +25,20 @@ const ACTIONS_CLASS =
19
25
 
20
26
  const marker = { [PREVIEW_HEADER_ATTRIBUTE]: "" };
21
27
 
28
+ const { confirmAction } = useActionConfirm();
29
+
30
+ async function press(action: PreviewHeaderAction): Promise<void> {
31
+ if (action.confirm && !(await confirmAction(action.confirm))) return;
32
+ if (action.target) await navigateDms(action.target.url);
33
+ }
34
+
22
35
  const actions = computed(() =>
23
36
  (props.header.actions ?? []).map((action): ButtonProps => ({
24
37
  ...headerButtonProps(action),
25
38
  label: action.label,
39
+ ...((action.target || action.confirm) && {
40
+ onClick: () => void press(action),
41
+ }),
26
42
  })),
27
43
  );
28
44
  </script>
@@ -3,7 +3,6 @@ import type {
3
3
  PreviewNavigation,
4
4
  PreviewNavigationCategory,
5
5
  PreviewNavigationItem,
6
- PreviewNavigationModule,
7
6
  } from "#dms-ui/app/entries/utils/blockPreview";
8
7
  import { DEFAULT_PAGE_ICON } from "../../../utils/dms-icons";
9
8
 
@@ -13,16 +12,8 @@ export const MOCKUP_SECTION_SLOT = "mockup-section";
13
12
  /** The menu slot drawing a mockup page's row. */
14
13
  export const MOCKUP_PAGE_SLOT = "mockup-page";
15
14
 
16
- /** The menu slot drawing a module's root header and the labels of its sub-sections. */
17
- export const MOCKUP_MODULE_SLOT = "mockup-module";
18
-
19
15
  const SECTION_ID_PREFIX = "mockup-section:";
20
16
  const PAGE_ID_PREFIX = "mockup-page:";
21
- const MODULE_ID_PREFIX = "mockup-module:";
22
- /** Sets a module's sub-section, its label and its rows, in from the module's root. */
23
- const MODULE_NESTED_CLASS = "ps-6";
24
- /** Spaces a sub-section's label from the rows above it. */
25
- const MODULE_SECTION_LABEL_CLASS = `${MODULE_NESTED_CLASS} pt-3`;
26
17
 
27
18
  /** A mockup section's header: the default section's has no category. */
28
19
  export interface MockupMenuSection {
@@ -46,11 +37,7 @@ export interface MockupMenuPage {
46
37
 
47
38
  export type MockupMenuEntry = MockupMenuSection | MockupMenuPage;
48
39
 
49
- /**
50
- * A mockup's menu: the groups the sidebar draws, and what each entry of the
51
- * spec's own sections stands for. A module's header and rows are in `groups`
52
- * alone: they are read-only, so no entry stands for them.
53
- */
40
+ /** A mockup's sections as the sidebar's menu lists them, and what each entry stands for. */
54
41
  export interface MockupMenu {
55
42
  groups: NavigationMenuItem[][];
56
43
  entries: ReadonlyMap<string, MockupMenuEntry>;
@@ -99,110 +86,25 @@ function pageItem(
99
86
  };
100
87
  }
101
88
 
102
- /** A module's header: its icon and title, a menu root under the app's own menu. */
103
- function moduleHeader(module: PreviewNavigationModule): NavigationMenuItem {
104
- return {
105
- id: `${MODULE_ID_PREFIX}${module.id}`,
106
- type: "label",
107
- label: module.title,
108
- icon: module.icon,
109
- slot: MOCKUP_MODULE_SLOT,
110
- "data-dms-preview-module": module.id,
111
- };
112
- }
113
-
114
- /** The label of a module's sub-section: its category's title and icon. */
115
- function moduleSectionLabel(
116
- module: PreviewNavigationModule,
117
- category: PreviewNavigationCategory,
118
- ): NavigationMenuItem {
119
- return {
120
- id: `${MODULE_ID_PREFIX}${module.id}:${category.id}`,
121
- type: "label",
122
- label: category.title,
123
- icon: category.icon,
124
- slot: MOCKUP_MODULE_SLOT,
125
- class: MODULE_SECTION_LABEL_CLASS,
126
- "data-dms-preview-module-section": category.id,
127
- };
128
- }
129
-
130
- /**
131
- * A module page's row: it picks the page like a spec page's, but is no
132
- * entry, so it is never dragged or edited. A row of a sub-section is set in
133
- * under its label.
134
- */
135
- function modulePageItem(
136
- item: PreviewNavigationItem,
137
- isActive: boolean,
138
- isNested: boolean,
139
- select: (id: string) => void,
140
- ): NavigationMenuItem {
141
- return {
142
- ...(isNested && { class: MODULE_NESTED_CLASS }),
143
- label: item.label,
144
- icon: item.icon ?? DEFAULT_PAGE_ICON,
145
- active: isActive,
146
- "aria-label": item.label,
147
- "aria-current": isActive ? "page" : undefined,
148
- "data-dms-preview-page": item.id,
149
- onSelect: () => select(item.id),
150
- };
151
- }
152
-
153
- /** A module's group: its header, then its root pages, then each sub-section as a label over its pages. */
154
- function moduleGroup(
155
- module: PreviewNavigationModule,
156
- active: string | undefined,
157
- select: (id: string) => void,
158
- ): NavigationMenuItem[] {
159
- const group = [moduleHeader(module)];
160
- for (const section of module.sections) {
161
- if (section.category) {
162
- group.push(moduleSectionLabel(module, section.category));
163
- }
164
- for (const item of section.items) {
165
- group.push(
166
- modulePageItem(
167
- item,
168
- item.id === active,
169
- section.category !== undefined,
170
- select,
171
- ),
172
- );
173
- }
174
- }
175
- return group;
176
- }
177
-
178
89
  /**
179
- * The sidebar's menu of a mockup, drawn after the app's own menu: first the
180
- * spec's own sections, then one group per module, in the spec's order. A
181
- * section is a label over its pages, the default one (pages without
182
- * category) under the real menu's Pages header, and each page a row with its
183
- * icon, the active one highlighted. A section with no page is left out,
184
- * except while editing, when every category is listed, and the default
185
- * section too once there are categories to drag its pages from. A module is
186
- * a root header with its icon and title, then its root pages, then each of
187
- * its categories as a label over its pages. Its header and rows are
188
- * read-only: a row picks its page and highlights while active, but is not
189
- * draggable, and no editing entry stands for it.
90
+ * The sidebar's menu of a mockup: the spec's own sections alone, none of the
91
+ * app's entries, so a mockup of an existing app starts empty and lists only
92
+ * its own pages. Each section is a label over its pages, the default one
93
+ * (pages without category) under the real menu's Pages header, and each page
94
+ * a row with its icon, the active one highlighted. A section with no page is
95
+ * left out, except while editing, when every category is listed. The default
96
+ * section is the root category: it shows only when it holds a page.
190
97
  */
191
98
  export function mockupMenu(
192
99
  navigation: PreviewNavigation,
193
100
  options: MockupMenuOptions,
194
101
  ): MockupMenu {
195
102
  const isEditable = navigation.editable === true;
196
- const hasCategories = navigation.sections.some(
197
- (section) => section.category !== undefined,
198
- );
199
103
  const entries = new Map<string, MockupMenuEntry>();
200
104
  const groups: NavigationMenuItem[][] = [];
201
105
  navigation.sections.forEach((section, index) => {
202
106
  const isEmpty = section.items.length === 0;
203
- const isListed =
204
- !isEmpty ||
205
- (isEditable && (section.category !== undefined || hasCategories));
107
+ const isListed = !isEmpty || (isEditable && section.category !== undefined);
206
108
  if (!isListed) return;
207
109
  const id = `${SECTION_ID_PREFIX}${index}`;
208
110
  entries.set(id, {
@@ -227,8 +129,5 @@ export function mockupMenu(
227
129
  });
228
130
  groups.push(group);
229
131
  });
230
- for (const module of navigation.modules ?? []) {
231
- groups.push(moduleGroup(module, navigation.active, options.select));
232
- }
233
132
  return { groups, entries };
234
133
  }
@@ -10,6 +10,7 @@ import {
10
10
  } from "../../../composables/notification/useNotifications";
11
11
  import {
12
12
  formatNotificationFullTime,
13
+ localizeNotificationParams,
13
14
  resolveNotificationTone,
14
15
  } from "../pages/settings/notification/notificationDisplay";
15
16
  import { DMS_TONE_SOLID, iconWellToneOf } from "#dms-ui/app/entries/utils/tone";
@@ -54,6 +55,9 @@ const { isLoadingMore, setupObserver, disconnectObserver } = useInfiniteScroll(
54
55
  const iconWellTone = (notification: UserNotification) =>
55
56
  iconWellToneOf(resolveNotificationTone(notification));
56
57
 
58
+ const paramsOf = (notification: UserNotification) =>
59
+ localizeNotificationParams(notification.params, t);
60
+
57
61
  const formatCount = (count: number) =>
58
62
  count > MAX_DISPLAYED_COUNT ? `${MAX_DISPLAYED_COUNT}+` : String(count);
59
63
 
@@ -216,7 +220,9 @@ const goToNotifications = () => {
216
220
 
217
221
  <template #title>
218
222
  <div class="text-highlighted mb-0.5 text-xs font-medium">
219
- {{ processI18n(notification.title ?? "", notification.params) }}
223
+ {{
224
+ processI18n(notification.title ?? "", paramsOf(notification))
225
+ }}
220
226
  </div>
221
227
  </template>
222
228
 
@@ -225,7 +231,7 @@ const goToNotifications = () => {
225
231
  {{
226
232
  processI18n(
227
233
  notification.description ?? "",
228
- notification.params,
234
+ paramsOf(notification),
229
235
  )
230
236
  }}
231
237
  </div>
@@ -5,6 +5,7 @@ import {
5
5
  type NotificationSourceTag,
6
6
  SOURCE_TAG_CLASS,
7
7
  formatNotificationFullTime,
8
+ localizeNotificationParams,
8
9
  resolveNotificationTone,
9
10
  } from "./notificationDisplay";
10
11
 
@@ -24,6 +25,9 @@ const { t, locale } = useI18n();
24
25
  const { processI18n } = useTranslation();
25
26
 
26
27
  const isUnread = computed(() => !props.notification.isRead);
28
+ const params = computed(() =>
29
+ localizeNotificationParams(props.notification.params, t),
30
+ );
27
31
  const iconWellTone = computed(() => {
28
32
  const tone = resolveNotificationTone(props.notification);
29
33
  return tone === "neutral" ? "muted" : tone;
@@ -62,17 +66,10 @@ const actionLabelUi = {
62
66
  class="block text-left outline-none"
63
67
  @click.stop="emit('open')"
64
68
  >
65
- {{
66
- processI18n(props.notification.title ?? "", props.notification.params)
67
- }}
69
+ {{ processI18n(props.notification.title ?? "", params) }}
68
70
  </button>
69
71
  <template #description>
70
- {{
71
- processI18n(
72
- props.notification.description ?? "",
73
- props.notification.params,
74
- )
75
- }}
72
+ {{ processI18n(props.notification.description ?? "", params) }}
76
73
  </template>
77
74
  <template #meta>
78
75
  <time :datetime="props.notification.createdAt" :title="fullTime">
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import type { NotificationCategory } from "../../../../composables/notification/useNotificationCatalog";
3
3
  import {
4
- MATRIX_GRID_CLASS,
4
+ matrixGridClass,
5
5
  MODULE_TAG_CLASS,
6
6
  SOURCE_TAG_CLASS,
7
7
  } from "./notificationDisplay";
@@ -21,6 +21,8 @@ interface NotificationMatrixCategoryProps {
21
21
  expanded: boolean;
22
22
  /** Id of the element holding the subjects, for `aria-controls`. */
23
23
  controls: string;
24
+ /** A mail channel is registered: the matrix has its email column. */
25
+ emailChannel?: boolean;
24
26
  }
25
27
 
26
28
  const props = defineProps<NotificationMatrixCategoryProps>();
@@ -40,11 +42,12 @@ const countLabel = computed(() =>
40
42
  const iconWellTone = computed(() =>
41
43
  props.category.tagKey ? "primary" : "muted",
42
44
  );
45
+ const gridClass = computed(() => matrixGridClass(props.emailChannel === true));
43
46
  </script>
44
47
 
45
48
  <template>
46
49
  <div
47
- :class="[MATRIX_GRID_CLASS, props.first ? 'border-t-0' : 'border-t']"
50
+ :class="[gridClass, props.first ? 'border-t-0' : 'border-t']"
48
51
  class="border-default min-h-14 bg-[color-mix(in_srgb,var(--dms-bg-muted)_55%,transparent)] py-2.5"
49
52
  role="row"
50
53
  >
@@ -118,6 +121,7 @@ const iconWellTone = computed(() =>
118
121
  />
119
122
  </div>
120
123
  <div
124
+ v-if="props.emailChannel"
121
125
  class="text-dimmed flex justify-center font-mono text-xs font-medium"
122
126
  role="cell"
123
127
  >
@@ -2,7 +2,7 @@
2
2
  import type { NotificationSubject } from "../../../../composables/notification/useNotificationCatalog";
3
3
  import type { SaveStatusState } from "#dms-ui/app/components/save-bar/SaveStatus.vue";
4
4
  import {
5
- MATRIX_GRID_CLASS,
5
+ matrixGridClass,
6
6
  MATRIX_SUBJECT_INDENT_CLASS,
7
7
  } from "./notificationDisplay";
8
8
 
@@ -10,6 +10,8 @@ interface NotificationMatrixSubjectProps {
10
10
  subject: NotificationSubject;
11
11
  enabled: boolean;
12
12
  state: SaveStatusState;
13
+ /** A mail channel is registered: the matrix has its email column. */
14
+ emailChannel?: boolean;
13
15
  emailEnabled?: boolean;
14
16
  }
15
17
 
@@ -22,6 +24,7 @@ const emit = defineEmits<{
22
24
  const { t } = useI18n();
23
25
 
24
26
  const label = computed(() => t(props.subject.labelKey));
27
+ const gridClass = computed(() => matrixGridClass(props.emailChannel === true));
25
28
  const isLocked = computed(() => props.subject.locked === true);
26
29
  /** E-mail follows the in-app notification: none is sent without it. */
27
30
  const isEmailDisabled = computed(() => isLocked.value || !props.enabled);
@@ -43,7 +46,7 @@ const onToggleEmail = (value: boolean) => {
43
46
 
44
47
  <template>
45
48
  <div
46
- :class="MATRIX_GRID_CLASS"
49
+ :class="gridClass"
47
50
  class="border-muted min-h-[50px] border-t py-2"
48
51
  role="row"
49
52
  >
@@ -85,26 +88,28 @@ const onToggleEmail = (value: boolean) => {
85
88
  @update:model-value="onToggle"
86
89
  />
87
90
  </div>
88
- <div v-if="props.subject.email" class="flex justify-center" role="cell">
89
- <USwitch
90
- :model-value="props.emailEnabled"
91
- :disabled="isEmailDisabled"
92
- :title="emailTitle"
93
- :aria-label="
94
- t('page.settings.notifications.email_switch', { name: label })
95
- "
96
- :aria-busy="props.state === 'saving'"
97
- data-channel="email"
98
- @update:model-value="onToggleEmail"
99
- />
100
- </div>
101
- <div
102
- v-else
103
- class="text-dimmed flex justify-center font-mono text-xs font-medium"
104
- role="cell"
105
- >
106
- —
107
- </div>
91
+ <template v-if="props.emailChannel">
92
+ <div v-if="props.subject.email" class="flex justify-center" role="cell">
93
+ <USwitch
94
+ :model-value="props.emailEnabled"
95
+ :disabled="isEmailDisabled"
96
+ :title="emailTitle"
97
+ :aria-label="
98
+ t('page.settings.notifications.email_switch', { name: label })
99
+ "
100
+ :aria-busy="props.state === 'saving'"
101
+ data-channel="email"
102
+ @update:model-value="onToggleEmail"
103
+ />
104
+ </div>
105
+ <div
106
+ v-else
107
+ class="text-dimmed flex justify-center font-mono text-xs font-medium"
108
+ role="cell"
109
+ >
110
+ —
111
+ </div>
112
+ </template>
108
113
  <div class="flex justify-end" role="cell">
109
114
  <DmsSaveStatus
110
115
  v-if="props.state !== 'idle'"
@@ -9,7 +9,7 @@ import NotificationMatrixSubject from "./NotificationMatrixSubject.vue";
9
9
  import {
10
10
  categorySubjectsElementId,
11
11
  MATRIX_CONTAINER_CLASS,
12
- MATRIX_GRID_CLASS,
12
+ matrixGridClass,
13
13
  } from "./notificationDisplay";
14
14
  import DmsRowSkeleton from "#dms-ui/app/entries/components/skeleton/RowSkeleton";
15
15
 
@@ -52,6 +52,8 @@ const isCategoryOn = (category: NotificationCategory) => {
52
52
 
53
53
  useInstantSaveHeader(() => saveState.value);
54
54
 
55
+ const gridClass = computed(() => matrixGridClass(hasEmailChannel.value));
56
+
55
57
  /** Names the direction the failed switch went back to, as v2 words it. */
56
58
  const failureMessage = computed(() => {
57
59
  const changes = Object.values(failedChanges.value ?? {});
@@ -76,7 +78,7 @@ const failureMessage = computed(() => {
76
78
  >
77
79
  <div
78
80
  :class="[
79
- MATRIX_GRID_CLASS,
81
+ gridClass,
80
82
  EYEBROW_CLASS,
81
83
  'border-default text-dimmed h-[34px] border-b bg-(--dms-bg-muted)',
82
84
  ]"
@@ -89,17 +91,11 @@ const failureMessage = computed(() => {
89
91
  {{ t("page.settings.notifications.column_in_app") }}
90
92
  </span>
91
93
  <span
92
- class="flex items-center justify-center gap-1.5 whitespace-nowrap"
94
+ v-if="hasEmailChannel"
95
+ class="text-center whitespace-nowrap"
93
96
  role="columnheader"
94
97
  >
95
98
  {{ t("page.settings.notifications.column_email") }}
96
- <UBadge
97
- v-if="!hasEmailChannel"
98
- color="neutral"
99
- size="sm"
100
- class="tracking-[0.04em]"
101
- :label="t('page.settings.notifications.soon')"
102
- />
103
99
  </span>
104
100
  <span role="columnheader">
105
101
  <span class="sr-only">
@@ -149,6 +145,7 @@ const failureMessage = computed(() => {
149
145
  :first="index === 0"
150
146
  :expanded="isOpen(category.id)"
151
147
  :controls="categorySubjectsElementId(category.id)"
148
+ :email-channel="hasEmailChannel"
152
149
  @toggle="(enabled) => toggleCategory(category, enabled)"
153
150
  @toggle-expanded="toggleOpen(category.id)"
154
151
  />
@@ -164,6 +161,7 @@ const failureMessage = computed(() => {
164
161
  :subject="subject"
165
162
  :enabled="isEnabled(subject)"
166
163
  :state="rowState(subject)"
164
+ :email-channel="hasEmailChannel"
167
165
  :email-enabled="isEmailEnabled(subject)"
168
166
  @toggle="(enabled) => toggleSubject(subject, enabled)"
169
167
  @toggle-email="(enabled) => toggleEmail(subject, enabled)"
@@ -9,6 +9,30 @@ import type {
9
9
  NotificationTone,
10
10
  UserNotification,
11
11
  } from "../../../../../composables/notification/useNotifications";
12
+ import { isString } from "#dms-core/app/utils/type-check";
13
+
14
+ /** The country a sign-in came from, as an ISO 3166-1 alpha-2 code. */
15
+ const COUNTRY_CODE_PARAM = "countryCode";
16
+ /** The country's name, as the texts interpolate it. */
17
+ const COUNTRY_PARAM = "country";
18
+ const COUNTRY_NAME_KEY_PREFIX = "country.";
19
+
20
+ /**
21
+ * A notification's parameters as its texts interpolate them: the country
22
+ * named in the reader's language from its code, where the server wrote the
23
+ * name in the language the account read at the time. A code the locale does
24
+ * not name keeps the server's name.
25
+ */
26
+ export const localizeNotificationParams = (
27
+ params: UserNotification["params"],
28
+ t: (key: string) => string,
29
+ ): UserNotification["params"] => {
30
+ const code = params?.[COUNTRY_CODE_PARAM];
31
+ if (!isString(code)) return params;
32
+ const key = `${COUNTRY_NAME_KEY_PREFIX}${code}`;
33
+ const name = t(key);
34
+ return name === key ? params : { ...params, [COUNTRY_PARAM]: name };
35
+ };
12
36
 
13
37
  /**
14
38
  * Notifications without a tone stand out in `primary` until read. Mirrors
@@ -105,12 +129,24 @@ export const MATRIX_CONTAINER_CLASS = "@container/matrix";
105
129
  /**
106
130
  * v2 .cs-matrix grid: subject, in-app, email, state. Under 672px of matrix
107
131
  * the state column goes; under 448px (phones) only the subject and in-app
108
- * columns remain. The email column fits its header on one line, the label
109
- * and its "Soon" badge, in French too.
132
+ * columns remain. The email column fits its header on one line, in French
133
+ * too.
110
134
  */
111
- export const MATRIX_GRID_CLASS =
135
+ const MATRIX_GRID_CLASS =
112
136
  "grid grid-cols-[minmax(0,1fr)_80px_120px_168px] items-center gap-x-3 px-[18px] @max-2xl/matrix:grid-cols-[minmax(0,1fr)_80px_120px] @max-2xl/matrix:[&>:nth-child(4)]:hidden @max-md/matrix:grid-cols-[minmax(0,1fr)_60px] @max-md/matrix:[&>:nth-child(n+3)]:hidden";
113
137
 
138
+ /**
139
+ * The grid without the email column, while no mail channel is registered:
140
+ * subject, in-app, state. A column of dashes under a "Soon" badge said
141
+ * nothing a row could act on; the footer note says it once.
142
+ */
143
+ const MATRIX_GRID_IN_APP_ONLY_CLASS =
144
+ "grid grid-cols-[minmax(0,1fr)_80px_168px] items-center gap-x-3 px-[18px] @max-2xl/matrix:grid-cols-[minmax(0,1fr)_80px] @max-2xl/matrix:[&>:nth-child(3)]:hidden @max-md/matrix:grid-cols-[minmax(0,1fr)_60px]";
145
+
146
+ /** The row grid of the matrix, with the email column while mail is delivered. */
147
+ export const matrixGridClass = (emailChannel: boolean): string =>
148
+ emailChannel ? MATRIX_GRID_CLASS : MATRIX_GRID_IN_APP_ONLY_CLASS;
149
+
114
150
  /**
115
151
  * The subject's indent under its category: past the caret and the icon
116
152
  * well, under the category's title. Dropped where only two columns remain.