@antelopejs/dms 0.20.2 → 0.20.4

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 (367) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +1 -1
  3. package/dist/config/internal/state.d.ts +5 -3
  4. package/dist/config/internal/state.js +9 -1
  5. package/dist/config/internal/state.js.map +1 -1
  6. package/dist/implementations/dms-builder/engine/compose-page.js +3 -2
  7. package/dist/implementations/dms-builder/engine/compose-page.js.map +1 -1
  8. package/dist/implementations/dms-builder/engine/connection-targets.d.ts +2 -0
  9. package/dist/implementations/dms-builder/engine/connection-targets.js +276 -0
  10. package/dist/implementations/dms-builder/engine/connection-targets.js.map +1 -0
  11. package/dist/implementations/dms-builder/engine/dms-database.d.ts +1 -0
  12. package/dist/implementations/dms-builder/engine/dms-database.js +1 -0
  13. package/dist/implementations/dms-builder/engine/dms-database.js.map +1 -1
  14. package/dist/implementations/dms-builder/engine/driver-packages.js +16 -4
  15. package/dist/implementations/dms-builder/engine/driver-packages.js.map +1 -1
  16. package/dist/implementations/dms-builder/engine/index.d.ts +1 -0
  17. package/dist/implementations/dms-builder/engine/index.js +1 -0
  18. package/dist/implementations/dms-builder/engine/index.js.map +1 -1
  19. package/dist/implementations/dms-builder/engine/theme-scaffold.js +1 -1
  20. package/dist/implementations/dms-html-render/index.js +5 -2
  21. package/dist/implementations/dms-html-render/index.js.map +1 -1
  22. package/dist/mcp/page-verify/index.d.ts +1 -0
  23. package/dist/mcp/page-verify/index.js +1 -0
  24. package/dist/mcp/page-verify/index.js.map +1 -1
  25. package/dist/mcp/page-verify/redact-report.d.ts +2 -0
  26. package/dist/mcp/page-verify/redact-report.js +120 -0
  27. package/dist/mcp/page-verify/redact-report.js.map +1 -0
  28. package/dist/mcp/page-verify/render.js +4 -1
  29. package/dist/mcp/page-verify/render.js.map +1 -1
  30. package/dist/mcp/redact.d.ts +87 -0
  31. package/dist/mcp/redact.js +139 -0
  32. package/dist/mcp/redact.js.map +1 -0
  33. package/dist/mcp/tools/builder-compose.js +11 -2
  34. package/dist/mcp/tools/builder-compose.js.map +1 -1
  35. package/dist/mcp/tools/builder-project.js +59 -26
  36. package/dist/mcp/tools/builder-project.js.map +1 -1
  37. package/dist/mcp/tools/builder-queries.js +41 -4
  38. package/dist/mcp/tools/builder-queries.js.map +1 -1
  39. package/dist/mcp/tools/builder-shared.d.ts +3 -1
  40. package/dist/mcp/tools/builder-shared.js +5 -0
  41. package/dist/mcp/tools/builder-shared.js.map +1 -1
  42. package/dist/mcp/tools/database.js +3 -2
  43. package/dist/mcp/tools/database.js.map +1 -1
  44. package/dist/mcp/tools/page-verify.js +3 -2
  45. package/dist/mcp/tools/page-verify.js.map +1 -1
  46. package/frontend-vue/dms.frontend.ts +6 -2
  47. package/frontend-vue/eslint-globals.generated.mjs +259 -942
  48. package/frontend-vue/layers/dms-auth/app/build/composables/useAuthFormError.ts +5 -3
  49. package/frontend-vue/layers/dms-auth/app/composables/useOAuthErrorToast.ts +6 -4
  50. package/frontend-vue/layers/dms-auth/app/composables/usePostLoginRedirect.ts +3 -2
  51. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +1 -1
  52. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot.vue +1 -1
  53. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/login.vue +12 -4
  54. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +1 -1
  55. package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +12 -6
  56. package/frontend-vue/layers/dms-auth/app/middleware/auth.ts +4 -2
  57. package/frontend-vue/layers/dms-auth/server/oauth.ts +13 -7
  58. package/frontend-vue/layers/dms-auth/server/session.ts +37 -6
  59. package/frontend-vue/layers/dms-core/app/build/composables/api-error.ts +46 -23
  60. package/frontend-vue/layers/dms-core/app/build/composables/auth/usePermissionPreview.ts +34 -23
  61. package/frontend-vue/layers/dms-core/app/build/composables/user/preferencesCookie.ts +8 -2
  62. package/frontend-vue/layers/dms-core/app/build/composables/user/tablePreferences.ts +11 -5
  63. package/frontend-vue/layers/dms-core/app/build/utils/crossTab.ts +4 -2
  64. package/frontend-vue/layers/dms-core/app/build/utils/json.ts +31 -0
  65. package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +6 -11
  66. package/frontend-vue/layers/dms-core/app/build/utils/record.ts +4 -0
  67. package/frontend-vue/layers/dms-core/app/build/utils/sharedRealtimeConnection.ts +56 -36
  68. package/frontend-vue/layers/dms-core/app/composables/auth/useApiData.ts +2 -2
  69. package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +6 -1
  70. package/frontend-vue/layers/dms-core/app/composables/auth/useCurrentUser.ts +3 -2
  71. package/frontend-vue/layers/dms-core/app/composables/auth/useLogout.ts +3 -2
  72. package/frontend-vue/layers/dms-core/app/composables/auth/useMultiAccount.ts +15 -14
  73. package/frontend-vue/layers/dms-core/app/composables/auth/useSessionRecovery.ts +21 -8
  74. package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +3 -3
  75. package/frontend-vue/layers/dms-core/app/composables/page/useSiteLayout.ts +11 -9
  76. package/frontend-vue/layers/dms-core/app/composables/period/periodLink.ts +3 -2
  77. package/frontend-vue/layers/dms-core/app/composables/period/usePeriod.ts +2 -2
  78. package/frontend-vue/layers/dms-core/app/composables/realtime/usePageRealtime.ts +10 -3
  79. package/frontend-vue/layers/dms-core/app/composables/realtime/useSseStream.ts +22 -16
  80. package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +68 -46
  81. package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +22 -11
  82. package/frontend-vue/layers/dms-core/app/composables/useEventedAction.ts +4 -1
  83. package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +14 -6
  84. package/frontend-vue/layers/dms-core/app/composables/user/usePreferences.ts +8 -3
  85. package/frontend-vue/layers/dms-core/app/composables/watch/useWatch.ts +17 -8
  86. package/frontend-vue/layers/dms-core/app/types/module-store.ts +3 -1
  87. package/frontend-vue/layers/dms-core/app/types/page.ts +3 -1
  88. package/frontend-vue/layers/dms-core/app/utils/dedupedRefresh.ts +2 -2
  89. package/frontend-vue/layers/dms-core/app/utils/formatter.ts +5 -5
  90. package/frontend-vue/layers/dms-core/app/utils/menu.ts +12 -4
  91. package/frontend-vue/layers/dms-core/app/utils/pageQuery.ts +7 -4
  92. package/frontend-vue/layers/dms-core/app/utils/row-action-rule-evaluator.ts +7 -3
  93. package/frontend-vue/layers/dms-core/app/utils/stringTypeParser.ts +8 -10
  94. package/frontend-vue/layers/dms-core/app/utils/type-check.ts +25 -12
  95. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingColorPair.vue +5 -2
  96. package/frontend-vue/layers/dms-layout/app/build/branding/device-draft.ts +2 -1
  97. package/frontend-vue/layers/dms-layout/app/build/branding/logos.ts +11 -13
  98. package/frontend-vue/layers/dms-layout/app/build/branding/model.ts +6 -2
  99. package/frontend-vue/layers/dms-layout/app/build/branding/preview-style.ts +12 -10
  100. package/frontend-vue/layers/dms-layout/app/build/branding/raster.ts +7 -4
  101. package/frontend-vue/layers/dms-layout/app/build/branding/useBrandingEditor.ts +59 -31
  102. package/frontend-vue/layers/dms-layout/app/build/branding/values.ts +2 -1
  103. package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +1 -1
  104. package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +37 -24
  105. package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +2 -4
  106. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/profile/ProfileSummaryRow.vue +2 -2
  107. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecuritySessions.vue +35 -10
  108. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/CssVariablesList.vue +2 -2
  109. package/frontend-vue/layers/dms-layout/app/build/composables/dev-reload/useDevReloadHolder.ts +4 -4
  110. package/frontend-vue/layers/dms-layout/app/build/composables/navigation/useVisitNavBadges.ts +26 -4
  111. package/frontend-vue/layers/dms-layout/app/build/composables/security/useSessionHandoff.ts +3 -6
  112. package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useAccountData.ts +16 -12
  113. package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityFormat.ts +12 -9
  114. package/frontend-vue/layers/dms-layout/app/build/mockup/header-action.ts +2 -2
  115. package/frontend-vue/layers/dms-layout/app/build/utils/modules-catalog.ts +13 -6
  116. package/frontend-vue/layers/dms-layout/app/build/utils/notificationPayload.ts +81 -0
  117. package/frontend-vue/layers/dms-layout/app/build/utils/submittedUrl.ts +14 -0
  118. package/frontend-vue/layers/dms-layout/app/components/AppWidgetsDock.vue +3 -1
  119. package/frontend-vue/layers/dms-layout/app/composables/general/useSystemState.ts +4 -5
  120. package/frontend-vue/layers/dms-layout/app/composables/layout/useServedHeaderActions.ts +7 -5
  121. package/frontend-vue/layers/dms-layout/app/composables/notification/useNotifications.ts +2 -2
  122. package/frontend-vue/layers/dms-layout/app/composables/page/useModuleHistory.ts +1 -1
  123. package/frontend-vue/layers/dms-layout/app/composables/page/useModuleStore.ts +3 -3
  124. package/frontend-vue/layers/dms-layout/app/composables/page/useModuleStoreActions.ts +2 -2
  125. package/frontend-vue/layers/dms-layout/app/composables/page/useModulesListing.ts +17 -4
  126. package/frontend-vue/layers/dms-layout/app/composables/page/usePageComponentPreload.ts +15 -7
  127. package/frontend-vue/layers/dms-layout/app/composables/page/usePageRecordDeletion.ts +2 -2
  128. package/frontend-vue/layers/dms-layout/app/composables/profile/useUserLanguage.ts +3 -2
  129. package/frontend-vue/layers/dms-layout/app/composables/useCommandPaletteSources.ts +20 -2
  130. package/frontend-vue/layers/dms-layout/app/custom-pages/settings/roles.vue +5 -1
  131. package/frontend-vue/layers/dms-layout/app/custom-pages/settings/shortcuts.vue +4 -1
  132. package/frontend-vue/layers/dms-layout/app/pages/[...slug].vue +13 -5
  133. package/frontend-vue/layers/dms-layout/app/plugins/command-palette-session.client.ts +8 -8
  134. package/frontend-vue/layers/dms-layout/app/plugins/dms-dev-reload.client.ts +1 -1
  135. package/frontend-vue/layers/dms-layout/app/plugins/dms-mcp-navigate.client.ts +4 -2
  136. package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +3 -3
  137. package/frontend-vue/layers/dms-layout/app/plugins/notification-stream.client.ts +47 -40
  138. package/frontend-vue/layers/dms-layout/app/plugins/permission-preview.client.ts +2 -2
  139. package/frontend-vue/layers/dms-layout/app/plugins/profile-sync.client.ts +3 -10
  140. package/frontend-vue/layers/dms-layout/app/plugins/seo.ts +2 -2
  141. package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +3 -2
  142. package/frontend-vue/layers/dms-layout/server/html-render.ts +5 -1
  143. package/frontend-vue/layers/dms-layout/server/render-token.ts +3 -2
  144. package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/steps/StepPlatform.vue +1 -1
  145. package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/StepRegister.vue +1 -1
  146. package/frontend-vue/layers/dms-onboarding/app/custom-pages/onboarding.vue +2 -1
  147. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEditOverlay.vue +2 -2
  148. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIndex.vue +1 -1
  149. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +3 -2
  150. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspectorField.vue +5 -2
  151. package/frontend-vue/layers/dms-ui/app/build/components/containers/drawer/DynamicDrawer.vue +4 -3
  152. package/frontend-vue/layers/dms-ui/app/build/components/containers/modal/DynamicModal.vue +3 -2
  153. package/frontend-vue/layers/dms-ui/app/build/components/containers/row/RowHeader.vue +2 -1
  154. package/frontend-vue/layers/dms-ui/app/build/components/period/PeriodRangeCalendar.vue +10 -7
  155. package/frontend-vue/layers/dms-ui/app/build/components/sortable/SortableList.vue +2 -2
  156. package/frontend-vue/layers/dms-ui/app/build/components/table/FiltersRow.vue +20 -18
  157. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuColumns.vue +2 -5
  158. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuDensity.vue +3 -4
  159. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuFilter.vue +3 -4
  160. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuImport.vue +2 -5
  161. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuPage.vue +2 -5
  162. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuRoot.vue +3 -4
  163. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuSort.vue +2 -5
  164. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuViewMode.vue +21 -19
  165. package/frontend-vue/layers/dms-ui/app/build/components/table/RowSelection.vue +3 -4
  166. package/frontend-vue/layers/dms-ui/app/build/components/table/Table.types.ts +4 -4
  167. package/frontend-vue/layers/dms-ui/app/build/components/table/TableActions.vue +3 -4
  168. package/frontend-vue/layers/dms-ui/app/build/components/table/TableMenu.vue +3 -4
  169. package/frontend-vue/layers/dms-ui/app/build/components/table/TablePagination.vue +3 -4
  170. package/frontend-vue/layers/dms-ui/app/build/components/table/TableRoot.vue +3 -5
  171. package/frontend-vue/layers/dms-ui/app/build/components/table/TableTabs.vue +2 -5
  172. package/frontend-vue/layers/dms-ui/app/build/components/table/TableViews.vue +3 -4
  173. package/frontend-vue/layers/dms-ui/app/build/components/table/tableComponentFilters.ts +4 -4
  174. package/frontend-vue/layers/dms-ui/app/build/components/table/tableComponentPreferences.ts +4 -3
  175. package/frontend-vue/layers/dms-ui/app/build/components/table/tableComponentRows.ts +4 -3
  176. package/frontend-vue/layers/dms-ui/app/build/components/table/tableComponentTheme.ts +11 -0
  177. package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardsDisplay.vue +35 -9
  178. package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetActions.ts +24 -17
  179. package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetConfirmation.ts +53 -30
  180. package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetHandlers.ts +2 -2
  181. package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetRequests.ts +2 -2
  182. package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetRows.ts +8 -4
  183. package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetTypes.ts +1 -1
  184. package/frontend-vue/layers/dms-ui/app/build/composables/actions/rowNavigation.ts +3 -2
  185. package/frontend-vue/layers/dms-ui/app/build/composables/actions/useActionTargets.ts +9 -2
  186. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +156 -99
  187. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +2 -2
  188. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +194 -161
  189. package/frontend-vue/layers/dms-ui/app/build/composables/blocks/blockDataState.ts +2 -1
  190. package/frontend-vue/layers/dms-ui/app/build/composables/blocks/useGuard.ts +38 -11
  191. package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexRawOptions.ts +34 -5
  192. package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexSeriesStyle.ts +32 -3
  193. package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexTheme.ts +13 -6
  194. package/frontend-vue/layers/dms-ui/app/build/composables/confirm/useActionConfirm.ts +8 -3
  195. package/frontend-vue/layers/dms-ui/app/build/composables/containers/drawerSize.ts +4 -4
  196. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/cellHelpers.ts +23 -1
  197. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultChoiceTypes.ts +11 -11
  198. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDateCells.ts +7 -1
  199. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultIdentityCells.ts +22 -8
  200. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultMediaTypes.ts +5 -5
  201. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +10 -9
  202. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultRelationTypes.ts +8 -8
  203. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/metricCells.ts +12 -6
  204. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/numberSuffix.ts +4 -6
  205. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationRows.ts +2 -2
  206. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationValue.ts +10 -5
  207. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/twoLineCell.ts +21 -3
  208. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +6 -4
  209. package/frontend-vue/layers/dms-ui/app/build/composables/detach.ts +9 -0
  210. package/frontend-vue/layers/dms-ui/app/build/composables/files/useFileMetadata.ts +1 -1
  211. package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldComponentProps.ts +38 -14
  212. package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldSaved.ts +6 -8
  213. package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldValueRule.ts +19 -2
  214. package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentCancel.ts +2 -1
  215. package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentErrors.ts +3 -2
  216. package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentRealtime.ts +28 -8
  217. package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentValidation.ts +5 -6
  218. package/frontend-vue/layers/dms-ui/app/build/composables/form/formState.ts +15 -7
  219. package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +12 -3
  220. package/frontend-vue/layers/dms-ui/app/build/composables/form/registerFormFunctions.ts +7 -8
  221. package/frontend-vue/layers/dms-ui/app/build/composables/form/stringSet.ts +6 -0
  222. package/frontend-vue/layers/dms-ui/app/build/composables/form/useFormModel.ts +60 -16
  223. package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +5 -4
  224. package/frontend-vue/layers/dms-ui/app/build/composables/instant-save/useInstantSave.ts +13 -9
  225. package/frontend-vue/layers/dms-ui/app/build/composables/layout/rowSidePanel.ts +2 -1
  226. package/frontend-vue/layers/dms-ui/app/build/composables/live/currentPageLive.ts +1 -1
  227. package/frontend-vue/layers/dms-ui/app/build/composables/live/liveCadence.ts +2 -2
  228. package/frontend-vue/layers/dms-ui/app/build/composables/live/missedTally.ts +8 -6
  229. package/frontend-vue/layers/dms-ui/app/build/composables/live/pageLiveController.ts +2 -2
  230. package/frontend-vue/layers/dms-ui/app/build/composables/live/usePageDataRefresh.ts +3 -3
  231. package/frontend-vue/layers/dms-ui/app/build/composables/navigation/useNavBadges.ts +1 -1
  232. package/frontend-vue/layers/dms-ui/app/build/composables/period/periodQuery.ts +42 -14
  233. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionDescriptors.ts +63 -46
  234. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionSizing.ts +2 -2
  235. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnStructure.ts +2 -2
  236. package/frontend-vue/layers/dms-ui/app/build/composables/table/useRelationFilterLabels.ts +4 -2
  237. package/frontend-vue/layers/dms-ui/app/build/composables/table/useTable.ts +4 -2
  238. package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableConfigClipboard.ts +71 -9
  239. package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableStates.ts +6 -4
  240. package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/rowId.ts +15 -0
  241. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/registerDefaultFunctions.ts +21 -7
  242. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionBulkRequests.ts +3 -3
  243. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionContainers.ts +1 -17
  244. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionNavigation.ts +12 -7
  245. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionValues.ts +25 -4
  246. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewArrival.ts +8 -5
  247. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewCounts.ts +4 -5
  248. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewDisplayContext.ts +2 -1
  249. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewDisplays.ts +18 -14
  250. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewEvents.ts +4 -3
  251. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewGrouping.ts +2 -2
  252. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewListing.ts +4 -1
  253. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewLive.ts +4 -1
  254. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewQuickActions.ts +4 -3
  255. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewQuickFilters.ts +4 -2
  256. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewRealtime.ts +9 -7
  257. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewTabs.ts +4 -4
  258. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useCardFields.ts +1 -1
  259. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useExpandedRowDetails.ts +6 -3
  260. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useGroupedRows.ts +7 -7
  261. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/usePersistedPagination.ts +2 -1
  262. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useReorderHandles.ts +9 -2
  263. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +4 -2
  264. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLiveHold.ts +2 -6
  265. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTablePreferences.ts +19 -12
  266. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRecordLink.ts +6 -3
  267. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableReorder.ts +7 -7
  268. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +4 -2
  269. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViewRowActions.ts +6 -5
  270. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/bulkActions.ts +3 -1
  271. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/card.ts +14 -12
  272. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/displayOptions.ts +38 -0
  273. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/expandedRows.ts +4 -2
  274. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +12 -10
  275. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/reorder.ts +6 -5
  276. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/sortableColumns.ts +38 -9
  277. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableCounts.ts +8 -3
  278. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +14 -11
  279. package/frontend-vue/layers/dms-ui/app/build/composables/unsaved-changes/formValue.ts +22 -12
  280. package/frontend-vue/layers/dms-ui/app/build/composables/unsaved-changes/registry.ts +27 -6
  281. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +1 -1
  282. package/frontend-vue/layers/dms-ui/app/build/mockups/resync.ts +9 -1
  283. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreview.ts +34 -25
  284. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +52 -26
  285. package/frontend-vue/layers/dms-ui/app/build/utils/calendarDay.ts +4 -1
  286. package/frontend-vue/layers/dms-ui/app/build/utils/characterCount.ts +1 -1
  287. package/frontend-vue/layers/dms-ui/app/build/utils/dispatchQuickActionTarget.ts +16 -11
  288. package/frontend-vue/layers/dms-ui/app/build/utils/fieldOptionsI18n.ts +23 -21
  289. package/frontend-vue/layers/dms-ui/app/build/utils/json.ts +74 -0
  290. package/frontend-vue/layers/dms-ui/app/build/utils/link.ts +2 -2
  291. package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +4 -4
  292. package/frontend-vue/layers/dms-ui/app/build/utils/mockupCatalog.ts +59 -50
  293. package/frontend-vue/layers/dms-ui/app/build/utils/mockupDrop.ts +1 -1
  294. package/frontend-vue/layers/dms-ui/app/build/utils/mockupEdit.ts +8 -6
  295. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +34 -28
  296. package/frontend-vue/layers/dms-ui/app/build/utils/mockupStamp.ts +11 -3
  297. package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +5 -2
  298. package/frontend-vue/layers/dms-ui/app/build/utils/streamHighlight.ts +8 -6
  299. package/frontend-vue/layers/dms-ui/app/build/utils/urlVariables.ts +2 -1
  300. package/frontend-vue/layers/dms-ui/app/components/RecursiveComponent.vue +3 -6
  301. package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +5 -4
  302. package/frontend-vue/layers/dms-ui/app/components/blocks/BannerBlock.vue +1 -2
  303. package/frontend-vue/layers/dms-ui/app/components/card/NavCard.vue +4 -1
  304. package/frontend-vue/layers/dms-ui/app/components/chart/ApexChartHost.vue +62 -13
  305. package/frontend-vue/layers/dms-ui/app/components/chart/ChartBlock.vue +18 -6
  306. package/frontend-vue/layers/dms-ui/app/components/code-snippet/CodeSnippet.vue +9 -4
  307. package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +9 -6
  308. package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +16 -18
  309. package/frontend-vue/layers/dms-ui/app/components/form/FormBlock.vue +4 -9
  310. package/frontend-vue/layers/dms-ui/app/components/form/LocalizedField.vue +2 -2
  311. package/frontend-vue/layers/dms-ui/app/components/form/components/InputAddress.vue +2 -2
  312. package/frontend-vue/layers/dms-ui/app/components/form/components/InputImage.vue +5 -8
  313. package/frontend-vue/layers/dms-ui/app/components/form/components/RichText.vue +3 -2
  314. package/frontend-vue/layers/dms-ui/app/components/master-detail/MasterDetail.vue +3 -1
  315. package/frontend-vue/layers/dms-ui/app/components/period/usePeriodSelectorInteraction.ts +9 -7
  316. package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +11 -6
  317. package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanDisplay.vue +40 -3
  318. package/frontend-vue/layers/dms-ui/app/composables/chart/apexDatetimeBuckets.ts +9 -5
  319. package/frontend-vue/layers/dms-ui/app/composables/chart/events.ts +6 -3
  320. package/frontend-vue/layers/dms-ui/app/composables/chart/heatmapColors.ts +1 -1
  321. package/frontend-vue/layers/dms-ui/app/composables/chart/localizeSeries.ts +13 -2
  322. package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.ts +27 -4
  323. package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.types.ts +3 -2
  324. package/frontend-vue/layers/dms-ui/app/composables/chart/useChartFetch.ts +3 -4
  325. package/frontend-vue/layers/dms-ui/app/composables/confirm/types.ts +5 -1
  326. package/frontend-vue/layers/dms-ui/app/composables/containers/openDynamicContainer.ts +6 -6
  327. package/frontend-vue/layers/dms-ui/app/composables/containers/types.ts +1 -1
  328. package/frontend-vue/layers/dms-ui/app/composables/containers/useDrawer.ts +8 -5
  329. package/frontend-vue/layers/dms-ui/app/composables/containers/useModal.ts +1 -1
  330. package/frontend-vue/layers/dms-ui/app/composables/form/types/props.ts +5 -2
  331. package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +80 -39
  332. package/frontend-vue/layers/dms-ui/app/composables/live/usePageLiveRefresh.ts +1 -1
  333. package/frontend-vue/layers/dms-ui/app/composables/resolveDmsComponent.ts +9 -2
  334. package/frontend-vue/layers/dms-ui/app/composables/tab/useTab.ts +2 -2
  335. package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewShiftA.ts +2 -2
  336. package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +2 -1
  337. package/frontend-vue/layers/dms-ui/app/composables/table-view/types/column.ts +3 -1
  338. package/frontend-vue/layers/dms-ui/app/composables/table-view/types/display.ts +6 -2
  339. package/frontend-vue/layers/dms-ui/app/composables/table-view/useTableViewExport.ts +6 -5
  340. package/frontend-vue/layers/dms-ui/app/composables/unsaved-changes/useUnsavedChanges.ts +1 -1
  341. package/frontend-vue/layers/dms-ui/app/composables/useExportJob.ts +21 -9
  342. package/frontend-vue/layers/dms-ui/app/utils/blockRefresh.ts +8 -2
  343. package/frontend-vue/layers/dms-ui/app/utils/cascader.ts +18 -8
  344. package/frontend-vue/layers/dms-ui/app/utils/metadataRetry.ts +1 -1
  345. package/frontend-vue/lazy-plugin.ts +1 -1
  346. package/frontend-vue/package.json +5 -4
  347. package/frontend-vue/scripts/check-api-error-presentation.mjs +257 -117
  348. package/frontend-vue/scripts/check-autoimport-boundaries.mjs +143 -27
  349. package/frontend-vue/scripts/check-disable-blocks.mjs +26 -4
  350. package/frontend-vue/scripts/check-dms-components.mjs +152 -246
  351. package/frontend-vue/scripts/check-invariants.mjs +100 -42
  352. package/frontend-vue/scripts/check-page-invariants.mjs +103 -40
  353. package/frontend-vue/scripts/dms-components-dependencies.mjs +106 -13
  354. package/frontend-vue/scripts/dms-components-script.mjs +375 -0
  355. package/frontend-vue/scripts/eslint-test-quality.mjs +126 -0
  356. package/frontend-vue/scripts/jsconfig.json +10 -0
  357. package/frontend-vue/scripts/probes/capture-frontend-probe.cjs +4 -2
  358. package/frontend-vue/scripts/probes/frontend-behavior.cjs +217 -47
  359. package/frontend-vue/scripts/probes/frontend-legacy.cjs +159 -8
  360. package/frontend-vue/scripts/probes/frontend-probe-controls.cjs +89 -10
  361. package/frontend-vue/scripts/prove-comment-emit.mjs +33 -4
  362. package/frontend-vue/scripts/prove-component-registration.mjs +110 -24
  363. package/frontend-vue/scripts/test-autoimport-boundaries.mjs +37 -6
  364. package/frontend-vue/scripts/test-dms-components.mjs +70 -5
  365. package/frontend-vue/server/request-body.ts +29 -5
  366. package/package.json +5 -3
  367. package/frontend-vue/eslint-test-quality.mjs +0 -62
@@ -3,7 +3,7 @@ import type {
3
3
  CommandPaletteItem,
4
4
  DashboardSearchProps,
5
5
  } from "@nuxt/ui";
6
- import { isFunction } from "#dms-core/app/utils/type-check";
6
+ import { isFunction, isObject, isString } from "#dms-core/app/utils/type-check";
7
7
 
8
8
  /**
9
9
  * A contributor of command-palette (Ctrl/Cmd+K) groups. Like
@@ -73,10 +73,28 @@ function isSearchTextMatch(match: CommandPaletteSearchMatch): boolean {
73
73
  return match.key === COMMAND_PALETTE_SEARCH_TEXT_KEY;
74
74
  }
75
75
 
76
+ function isSearchMatch(value: unknown): value is CommandPaletteSearchMatch {
77
+ return (
78
+ value !== null &&
79
+ isObject(value) &&
80
+ (value.key === undefined || isString(value.key))
81
+ );
82
+ }
83
+
84
+ /** The matches the palette's search left on an item, each one a search match. */
85
+ function searchMatchesOf(
86
+ item: CommandPaletteItem,
87
+ ): CommandPaletteSearchMatch[] | undefined {
88
+ const matches: unknown = item.matches;
89
+ if (!Array.isArray(matches)) return undefined;
90
+ const checked: unknown[] = matches;
91
+ return checked.every(isSearchMatch) ? checked : undefined;
92
+ }
93
+
76
94
  function withoutSearchTextMatches(
77
95
  item: CommandPaletteItem,
78
96
  ): CommandPaletteItem {
79
- const matches: CommandPaletteSearchMatch[] | undefined = item.matches;
97
+ const matches = searchMatchesOf(item);
80
98
  if (!matches?.some(isSearchTextMatch)) {
81
99
  return item;
82
100
  }
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { useTemplateRef } from "vue";
3
+ import { isString } from "#dms-core/app/utils/type-check";
3
4
  import UButton from "@nuxt/ui/components/Button.vue";
4
5
  import RoleEditor from "../../build/components/pages/settings/roles/RoleEditor.vue";
5
6
  import RoleOwnerPanel from "../../build/components/pages/settings/roles/RoleOwnerPanel.vue";
@@ -230,7 +231,10 @@ async function requestDelete(): Promise<void> {
230
231
  {
231
232
  urlParams: { id: encodeURIComponent(role._id) },
232
233
  run: (values) =>
233
- deleteRole(role, (values.reassignTo as string | null) ?? null),
234
+ deleteRole(
235
+ role,
236
+ isString(values.reassignTo) ? values.reassignTo : null,
237
+ ),
234
238
  },
235
239
  );
236
240
  }
@@ -33,6 +33,8 @@ watch(detectedPlatform, (next) => {
33
33
  });
34
34
  const query = ref("");
35
35
 
36
+ const KEYBOARD_PLATFORMS: readonly KeyboardPlatform[] = ["mac", "other"];
37
+
36
38
  const platformItems = computed(() => [
37
39
  {
38
40
  value: "mac",
@@ -53,7 +55,8 @@ usePageHeaderActions(() =>
53
55
  size: "xs",
54
56
  ariaLabel: t("page.settings.shortcuts.layout_label"),
55
57
  "onUpdate:modelValue": (value: string | number | undefined) => {
56
- if (value !== undefined) platform.value = value as KeyboardPlatform;
58
+ const picked = KEYBOARD_PLATFORMS.find((known) => known === value);
59
+ if (picked) platform.value = picked;
57
60
  },
58
61
  }),
59
62
  );
@@ -7,13 +7,17 @@ import { usePageDataRefresh } from "#dms-ui/app/entries/composables/live/usePage
7
7
  import { usePageRecordDeletion } from "../composables/page/usePageRecordDeletion";
8
8
  import { pageValidationRedirect } from "../build/utils/pageValidationRedirect";
9
9
  import { resolveComponentChildren } from "#dms-ui/app/utils/componentTree";
10
- import { isFunction } from "#dms-core/app/utils/type-check";
10
+ import { isFunction, isObject, isString } from "#dms-core/app/utils/type-check";
11
11
  import type { ValidationRouteContext } from "#dms-core/app/utils/query-validation";
12
12
 
13
13
  defineOptions({ inheritAttrs: false });
14
14
 
15
15
  const devReloading = import.meta.env.DEV ? useDevReloading() : ref(false);
16
16
 
17
+ function isComponentEventData(value: unknown): value is ComponentEventData {
18
+ return value !== null && isObject(value) && isString(value.component);
19
+ }
20
+
17
21
  function normalizePath(path: string): string {
18
22
  return withoutTrailingSlash(path) || "/";
19
23
  }
@@ -108,8 +112,12 @@ function isPageValid(
108
112
  query,
109
113
  );
110
114
 
111
- const getValidationFunction = (id: string) =>
112
- getFunction(id) as ValidationFunction | undefined;
115
+ const getValidationFunction = (
116
+ id: string,
117
+ ): ValidationFunction | undefined => {
118
+ const validate = getFunction(id);
119
+ return validate && ((route) => validate(route) === true);
120
+ };
113
121
 
114
122
  const isCustomValid = runCustomValidation(
115
123
  validation.customFunctionId,
@@ -244,8 +252,8 @@ function buildPageSetupContext(
244
252
  },
245
253
  on(component, event, handler) {
246
254
  const listener = (e: Event) => {
247
- const detail = (e as CustomEvent<ComponentEventData>).detail;
248
- if (!detail || detail.component !== component) {
255
+ const detail: unknown = e instanceof CustomEvent ? e.detail : null;
256
+ if (!isComponentEventData(detail) || detail.component !== component) {
249
257
  return;
250
258
  }
251
259
  handler(detail.data);
@@ -34,7 +34,7 @@ export default defineDmsPlugin(() => {
34
34
  const { $i18n: i18n } = useDmsApp();
35
35
  const { t } = getAppTranslation();
36
36
  const toast = useToast();
37
- const { presentError } = useApiErrorPresenter();
37
+ const errorPresenter = useApiErrorPresenter();
38
38
  const { logout } = useLogout();
39
39
  const { changeLanguage } = useUserLanguage();
40
40
  const { copy } = useClipboard({ legacy: true });
@@ -43,8 +43,8 @@ export default defineDmsPlugin(() => {
43
43
  uniqueByCode(i18n.locales.value).map((locale) => ({
44
44
  label: locale.name ?? locale.code,
45
45
  active: i18n.locale.value === locale.code,
46
- onSelect: () => {
47
- void changeLanguage(locale.code);
46
+ onSelect: async () => {
47
+ await changeLanguage(locale.code);
48
48
  },
49
49
  }));
50
50
 
@@ -53,7 +53,7 @@ export default defineDmsPlugin(() => {
53
53
  await copy(window.location.href);
54
54
  toast.add({ title: t("commandPalette.session.urlCopied") });
55
55
  } catch (error) {
56
- presentError(error, {
56
+ errorPresenter.presentError(error, {
57
57
  fallbackKey: "commandPalette.session.copyFailed",
58
58
  });
59
59
  }
@@ -73,15 +73,15 @@ export default defineDmsPlugin(() => {
73
73
  {
74
74
  label: t("commandPalette.session.copyUrl"),
75
75
  icon: COPY_URL_ICON,
76
- onSelect: () => {
77
- void copyCurrentUrl();
76
+ onSelect: async () => {
77
+ await copyCurrentUrl();
78
78
  },
79
79
  },
80
80
  {
81
81
  label: t("button.logout"),
82
82
  icon: LOGOUT_ICON,
83
- onSelect: () => {
84
- void logout();
83
+ onSelect: async () => {
84
+ await logout();
85
85
  },
86
86
  },
87
87
  ],
@@ -30,7 +30,7 @@ export default defineDmsPlugin(() => {
30
30
  {
31
31
  endpoint,
32
32
  onReload: () => {
33
- void coordinator.requestRefresh().catch((err) => {
33
+ void coordinator.requestRefresh().catch((err: unknown) => {
34
34
  console.error("[dms-dev-reload] Reload handler failed:", err);
35
35
  });
36
36
  },
@@ -1,3 +1,5 @@
1
+ import { isString } from "#dms-core/app/utils/type-check";
2
+
1
3
  const NAVIGATE_TOPIC = "dms:navigate";
2
4
 
3
5
  /**
@@ -6,8 +8,8 @@ const NAVIGATE_TOPIC = "dms:navigate";
6
8
  */
7
9
  export default defineDmsPlugin(() => {
8
10
  const router = useDmsRouter();
9
- useUserRealtime().subscribe(NAVIGATE_TOPIC, (event) => {
11
+ useUserRealtime().subscribe(NAVIGATE_TOPIC, async (event) => {
10
12
  const path = "payload" in event ? event.payload?.path : undefined;
11
- if (typeof path === "string") void router.push(path);
13
+ if (isString(path)) await router.push(path);
12
14
  });
13
15
  });
@@ -37,13 +37,13 @@ export default defineDmsPlugin(() => {
37
37
  permissions.fetchPermissions(),
38
38
  ]);
39
39
  })
40
- .catch((error) => {
40
+ .catch((error: unknown) => {
41
41
  console.error("[dms-menu-sync] Menu resync failed:", error);
42
42
  });
43
43
 
44
- const onMenuEvent: RealtimeTopicHandler = (event) => {
44
+ const onMenuEvent: RealtimeTopicHandler = async (event) => {
45
45
  if (!("type" in event) || event.type !== MENU_CHANGED_EVENT_TYPE) return;
46
- void refresh();
46
+ await refresh();
47
47
  };
48
48
 
49
49
  watchRealtimeReconnects(realtime.sessionId, () => void refresh());
@@ -1,9 +1,10 @@
1
- import type {
2
- FeedCounts,
3
- UserNotification,
4
- } from "../composables/notification/useNotifications";
5
1
  import type { RealtimeEvent } from "#dms-core/app/composables/realtime/useUserRealtime";
6
- import { isObject, isString } from "#dms-core/app/utils/type-check";
2
+ import { isString } from "#dms-core/app/utils/type-check";
3
+ import {
4
+ feedCountsOf,
5
+ isIdList,
6
+ isUserNotification,
7
+ } from "../build/utils/notificationPayload";
7
8
 
8
9
  const NOTIFICATION_TOPIC_PREFIX = "notifications:user:";
9
10
  const NOTIFICATION_NEW_TYPE = "notification:new";
@@ -11,19 +12,7 @@ const NOTIFICATION_READ_TYPE = "notification:read";
11
12
  const NOTIFICATION_ALL_READ_TYPE = "notification:all-read";
12
13
  const NOTIFICATION_UNREAD_TYPE = "notification:unread";
13
14
 
14
- interface IncomingPayload {
15
- notification?: UserNotification;
16
- ids?: string[];
17
- /** The whole feed's counts after a read state change. */
18
- counts?: FeedCounts;
19
- }
20
-
21
- const isNotificationEvent = (
22
- event: unknown,
23
- ): event is { type: string; payload?: IncomingPayload } =>
24
- !!event && isObject(event) && isString(event.type);
25
-
26
- type Handler = (payload: IncomingPayload | undefined) => void | Promise<void>;
15
+ type Handler = (payload: RealtimeEvent["payload"]) => void | Promise<void>;
27
16
 
28
17
  export default defineDmsPlugin(() => {
29
18
  const { user, loggedIn } = useDmsUserSession();
@@ -35,23 +24,41 @@ export default defineDmsPlugin(() => {
35
24
  } = useNotifications();
36
25
  const realtime = useUserRealtime();
37
26
 
38
- const handlers: Record<RealtimeEvent["type"], Handler> = {
39
- [NOTIFICATION_NEW_TYPE]: (payload) => {
40
- if (payload?.notification)
41
- handleIncomingNotification(payload.notification);
42
- },
43
- [NOTIFICATION_READ_TYPE]: async (payload) => {
44
- if (Array.isArray(payload?.ids))
45
- await handleRemoteRead(payload.ids, payload.counts);
46
- },
47
- [NOTIFICATION_UNREAD_TYPE]: async (payload) => {
48
- if (Array.isArray(payload?.ids))
49
- await handleRemoteUnread(payload.ids, payload.counts);
50
- },
51
- [NOTIFICATION_ALL_READ_TYPE]: async (payload) => {
52
- await handleRemoteAllRead(payload?.counts);
53
- },
54
- };
27
+ const handlers = new Map<RealtimeEvent["type"], Handler>([
28
+ [
29
+ NOTIFICATION_NEW_TYPE,
30
+ (payload) => {
31
+ const notification = payload?.notification;
32
+ if (isUserNotification(notification)) {
33
+ handleIncomingNotification(notification);
34
+ }
35
+ },
36
+ ],
37
+ [
38
+ NOTIFICATION_READ_TYPE,
39
+ async (payload) => {
40
+ const ids = payload?.ids;
41
+ if (isIdList(ids)) {
42
+ await handleRemoteRead(ids, feedCountsOf(payload?.counts));
43
+ }
44
+ },
45
+ ],
46
+ [
47
+ NOTIFICATION_UNREAD_TYPE,
48
+ async (payload) => {
49
+ const ids = payload?.ids;
50
+ if (isIdList(ids)) {
51
+ await handleRemoteUnread(ids, feedCountsOf(payload?.counts));
52
+ }
53
+ },
54
+ ],
55
+ [
56
+ NOTIFICATION_ALL_READ_TYPE,
57
+ async (payload) => {
58
+ await handleRemoteAllRead(feedCountsOf(payload?.counts));
59
+ },
60
+ ],
61
+ ]);
55
62
 
56
63
  let unsubscribe: (() => void) | undefined;
57
64
 
@@ -60,14 +67,14 @@ export default defineDmsPlugin(() => {
60
67
  (userId) => {
61
68
  unsubscribe?.();
62
69
  unsubscribe = undefined;
63
- if (!userId) return;
70
+ if (!isString(userId) || userId === "") return;
64
71
  unsubscribe = realtime.subscribe(
65
72
  `${NOTIFICATION_TOPIC_PREFIX}${userId}`,
66
- (event) => {
67
- if (!isNotificationEvent(event)) return;
68
- const handler = handlers[event.type];
73
+ async (event) => {
74
+ if (!("type" in event)) return;
75
+ const handler = handlers.get(event.type);
69
76
  if (!handler) return;
70
- void handler(event.payload);
77
+ await handler(event.payload);
71
78
  },
72
79
  );
73
80
  },
@@ -18,11 +18,11 @@ export default defineDmsPlugin(() => {
18
18
  let isFirstRefresh = true;
19
19
  watch(
20
20
  [() => route.path, () => preview.session.value?.permissions],
21
- ([path]) => {
21
+ async ([path]) => {
22
22
  const refresh = preview.refresh(path);
23
23
  if (!isFirstRefresh) return;
24
24
  isFirstRefresh = false;
25
- void refresh.finally(() => nextTick(releasePrePaintHold));
25
+ await refresh.finally(() => nextTick(releasePrePaintHold));
26
26
  },
27
27
  { immediate: true },
28
28
  );
@@ -1,10 +1,6 @@
1
1
  import { pageRoutePath } from "#dms-core/app/utils/pageRoutes";
2
2
  import { FormEvents } from "#dms-ui/app/composables/form/types/events";
3
- import type { ComponentEventData } from "#dms-core/app/types/component";
4
-
5
- interface FormSubmitSuccessPayload {
6
- submitUrl?: string;
7
- }
3
+ import { submittedUrlOf } from "../build/utils/submittedUrl";
8
4
 
9
5
  const REGION_PREFERENCES_ROUTE = pageRoutePath(
10
6
  "/settings/user/region",
@@ -24,11 +20,8 @@ export default defineDmsPlugin(() => {
24
20
  const { refresh } = useCurrentUser();
25
21
 
26
22
  window.addEventListener(FormEvents.SUBMIT_SUCCESS, (event) => {
27
- const detail = (event as CustomEvent<ComponentEventData>).detail;
28
- const payload = detail?.data as FormSubmitSuccessPayload | undefined;
29
- if (!payload?.submitUrl || !SESSION_FORM_ROUTES.has(payload.submitUrl)) {
30
- return;
31
- }
23
+ const submitUrl = submittedUrlOf(event);
24
+ if (!submitUrl || !SESSION_FORM_ROUTES.has(submitUrl)) return;
32
25
  void refresh().catch(() => undefined);
33
26
  });
34
27
  });
@@ -28,8 +28,8 @@ export default defineDmsPlugin(async () => {
28
28
  });
29
29
 
30
30
  if (typeof window !== "undefined")
31
- watch(metaTitle, (title) => {
32
- if (!title) void refresh();
31
+ watch(metaTitle, async (title) => {
32
+ if (!title) await refresh();
33
33
  });
34
34
 
35
35
  if (!metaTitle.value) await refresh();
@@ -1,4 +1,4 @@
1
- import { isString } from "../../../dms-core/app/utils/type-check";
1
+ import { isObject, isString } from "../../../dms-core/app/utils/type-check";
2
2
  import type { PageValidation } from "#dms-core/app/types/page";
3
3
  import type { MenuRouteState } from "#dms-core/app/types/menu";
4
4
 
@@ -62,7 +62,8 @@ export interface FoldedCrumbs<T> {
62
62
  export function isFoldedCrumbs<T>(
63
63
  crumb: T | FoldedCrumbs<T>,
64
64
  ): crumb is FoldedCrumbs<T> {
65
- return (crumb as Partial<FoldedCrumbs<T>>).isFolded === true;
65
+ const value: unknown = crumb;
66
+ return value !== null && isObject(value) && value.isFolded === true;
66
67
  }
67
68
 
68
69
  /**
@@ -47,7 +47,11 @@ export async function renderHtml(event: DmsServerEvent): Promise<Response> {
47
47
  { locale: event.request.headers.get("x-content-language") ?? undefined },
48
48
  );
49
49
  return Response.json({ html });
50
- } catch {
50
+ } catch (error) {
51
+ console.error(
52
+ `[dms] Render of the e-mail template "${input.templateName}" failed:`,
53
+ error,
54
+ );
51
55
  return failure(
52
56
  404,
53
57
  `Template "${input.templateName}" not found or render failed`,
@@ -1,4 +1,4 @@
1
- import { isString } from "../../dms-core/app/utils/type-check";
1
+ import { isObject, isString } from "../../dms-core/app/utils/type-check";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
 
4
4
  const RENDER_TOKEN_LIFETIME_SECONDS = 5 * 60;
@@ -84,9 +84,10 @@ export function validRenderToken(
84
84
  if (parts.length !== 3) return false;
85
85
  if (!signatureValid(parts, secret)) return false;
86
86
  try {
87
- const payload: Parameters<typeof claimsValid>[0] = JSON.parse(
87
+ const payload: unknown = JSON.parse(
88
88
  Buffer.from(parts[1], "base64url").toString("utf8"),
89
89
  );
90
+ if (payload === null || !isObject(payload)) return false;
90
91
  const now = Math.floor(Date.now() / 1000);
91
92
  if (!claimsValid(payload, now)) return false;
92
93
  if (usedRenderTokens.has(payload.jti)) return false;
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { useTemplateRef } from "vue";
3
- import * as z from "zod";
3
+ import { z } from "zod";
4
4
  import type { SelectItem } from "@nuxt/ui";
5
5
  import StageCard from "#dms-layout/app/entries/components/layout/StageCard";
6
6
  import type { OnboardingPlatform } from "../../../composables/onboarding/steps";
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { useTemplateRef } from "vue";
3
- import * as z from "zod";
3
+ import { z } from "zod";
4
4
  import type { FormSubmitEvent } from "@nuxt/ui";
5
5
  import striptags from "striptags";
6
6
  import StageCard from "#dms-layout/app/entries/components/layout/StageCard";
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { isString } from "#dms-core/app/utils/type-check";
2
3
  import StepIndicator from "../build/components/onboarding/StepIndicator.vue";
3
4
  import Platform from "../build/components/onboarding/steps/StepPlatform.vue";
4
5
  import Ready from "../build/components/onboarding/steps/StepReady.vue";
@@ -34,7 +35,7 @@ useHead({ meta: [{ name: "referrer", content: "no-referrer" }] });
34
35
 
35
36
  onMounted(() => {
36
37
  const { token, ...query } = route.query;
37
- if (typeof token !== "string" || !token) return;
38
+ if (!isString(token) || !token) return;
38
39
  setupToken.value = token;
39
40
  void router.replace({ query });
40
41
  });
@@ -61,7 +61,7 @@ watch(
61
61
  },
62
62
  );
63
63
 
64
- function box(rect: PreviewRect): Record<string, string> {
64
+ function box(rect: PreviewRect) {
65
65
  return {
66
66
  left: `${rect.x}px`,
67
67
  top: `${rect.y}px`,
@@ -98,7 +98,7 @@ const textStyle = computed(() => {
98
98
  };
99
99
  });
100
100
 
101
- function pointOf(event: DragEvent): { x: number; y: number } {
101
+ function pointOf(event: DragEvent) {
102
102
  const target = event.currentTarget;
103
103
  const origin =
104
104
  target instanceof Element
@@ -22,7 +22,7 @@ function viewerLink(name: string): string {
22
22
 
23
23
  onMounted(async () => {
24
24
  try {
25
- const answer = await $authFetch(MOCKUP_LIST_ENDPOINT);
25
+ const answer: unknown = await $authFetch(MOCKUP_LIST_ENDPOINT);
26
26
  const list = parseMockupList(answer);
27
27
  hasFailed.value = list === undefined;
28
28
  mockups.value = list ?? [];
@@ -13,6 +13,7 @@ import {
13
13
  type MockupSpecDocument,
14
14
  } from "../../utils/mockupSpec";
15
15
  import type { MockupIssue } from "../../utils/mockup";
16
+ import type { JsonValue } from "../../../../../dms-core/app/types/json";
16
17
  import MockupInspectorField from "./MockupInspectorField.vue";
17
18
  import MockupIssues from "./MockupIssues.vue";
18
19
  import MockupPageInspector from "./MockupPageInspector.vue";
@@ -62,12 +63,12 @@ const hasData = computed(() => {
62
63
  );
63
64
  });
64
65
 
65
- function optionValue(key: string): unknown {
66
+ function optionValue(key: string): JsonValue | undefined {
66
67
  const options = node.value?.options ?? {};
67
68
  return Object.hasOwn(options, key) ? options[key] : undefined;
68
69
  }
69
70
 
70
- function setOption(key: string, value: unknown): void {
71
+ function setOption(key: string, value: JsonValue | undefined): void {
71
72
  const pointer = props.selection;
72
73
  if (!pointer) return;
73
74
  emit("edit", { kind: "setOption", pointer, key, value }, `${pointer}:${key}`);
@@ -5,6 +5,7 @@ import {
5
5
  isNumber,
6
6
  isString,
7
7
  } from "../../../../../dms-core/app/utils/type-check";
8
+ import type { JsonValue } from "../../../../../dms-core/app/types/json";
8
9
  import type { MockupInspectorField } from "../../utils/mockupInspector";
9
10
 
10
11
  /**
@@ -15,7 +16,7 @@ const props = defineProps<{
15
16
  field: MockupInspectorField;
16
17
  value: unknown;
17
18
  }>();
18
- const emit = defineEmits<{ update: [value: unknown] }>();
19
+ const emit = defineEmits<{ update: [value: JsonValue | undefined] }>();
19
20
 
20
21
  const UNSET = "\u0000unset";
21
22
  const COLOR_PATTERN = /^#[0-9a-f]{6}$/i;
@@ -60,7 +61,9 @@ const selected = computed(() =>
60
61
  : UNSET,
61
62
  );
62
63
 
63
- function emitChoice(next: unknown): void {
64
+ function emitChoice(
65
+ next: MockupInspectorField["choices"][number]["value"],
66
+ ): void {
64
67
  emit("update", next === UNSET ? undefined : next);
65
68
  }
66
69
 
@@ -15,6 +15,7 @@ import { useWindowSize } from "@vueuse/core";
15
15
  import type {
16
16
  ContainerColor,
17
17
  ContainerInstance,
18
+ ContainerOptions,
18
19
  DrawerDirection,
19
20
  } from "../../../../composables/containers/types";
20
21
  import type { ModalSize } from "../../../../types/modal";
@@ -42,11 +43,11 @@ interface DynamicDrawerProps {
42
43
  description?: string;
43
44
  containerId: string;
44
45
  component: Component;
45
- componentOptions?: Record<string, unknown>;
46
+ componentOptions?: ContainerOptions["componentOptions"];
46
47
  /** Mounts the body component anew when it changes. */
47
48
  componentKey?: string;
48
49
  headerComponent?: Component;
49
- headerComponentOptions?: Record<string, unknown>;
50
+ headerComponentOptions?: ContainerOptions["headerComponentOptions"];
50
51
  direction?: DrawerDirection;
51
52
  /**
52
53
  * Width a side drawer opens at, from `lg`: a modal's width at that size;
@@ -95,7 +96,7 @@ const NUXT_UI_FORM_KEYS: symbol[] = [
95
96
  ];
96
97
  const drawerInstance = currentInstanceProvides();
97
98
  if (drawerInstance && props.callerProvides) {
98
- drawerInstance.provides = Object.create(toRaw(props.callerProvides));
99
+ drawerInstance.provides = { __proto__: toRaw(props.callerProvides) };
99
100
 
100
101
  for (const key of NUXT_UI_FORM_KEYS) provide(key, undefined);
101
102
  }
@@ -5,6 +5,7 @@ import type { ModalSize } from "../../../../types/modal";
5
5
  import type {
6
6
  ContainerColor,
7
7
  ContainerInstance,
8
+ ContainerOptions,
8
9
  } from "../../../../composables/containers/types";
9
10
  import DmsIconWell from "../../../../components/icon-well/IconWell.vue";
10
11
  import {
@@ -20,11 +21,11 @@ interface DynamicModalProps {
20
21
  size?: ModalSize;
21
22
  containerId: string;
22
23
  component: Component;
23
- componentOptions?: Record<string, unknown>;
24
+ componentOptions?: ContainerOptions["componentOptions"];
24
25
  /** Mounts the body component anew when it changes. */
25
26
  componentKey?: string;
26
27
  headerComponent?: Component;
27
- headerComponentOptions?: Record<string, unknown>;
28
+ headerComponentOptions?: ContainerOptions["headerComponentOptions"];
28
29
  icon?: string;
29
30
  color?: ContainerColor;
30
31
  }
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import { computed } from "vue";
10
10
  import type { Component } from "vue";
11
+ import type { ContainerOptions } from "../../../../composables/containers/types";
11
12
  import type { RowNavigation } from "../../../../types/row-navigation";
12
13
 
13
14
  interface RowHeaderProps {
@@ -25,7 +26,7 @@ interface RowHeaderProps {
25
26
  subtitleClass?: string;
26
27
  /** Drawn under the position line (pills, hints). */
27
28
  component?: Component;
28
- componentOptions?: Record<string, unknown>;
29
+ componentOptions?: ContainerOptions["componentOptions"];
29
30
  }
30
31
 
31
32
  const props = withDefaults(defineProps<RowHeaderProps>(), {