@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.
- package/CHANGELOG.md +73 -0
- package/README.md +2 -2
- package/data/mockup-spec.schema.json +303 -223
- package/dist/implementations/dms-auth/account-emails.js +2 -2
- package/dist/implementations/dms-auth/account-emails.js.map +1 -1
- package/dist/implementations/dms-auth/index.js +1 -2
- package/dist/implementations/dms-auth/index.js.map +1 -1
- package/dist/implementations/dms-base/group-order.d.ts +18 -0
- package/dist/implementations/dms-base/group-order.js +66 -0
- package/dist/implementations/dms-base/group-order.js.map +1 -0
- package/dist/implementations/dms-base/search-route.js +8 -5
- package/dist/implementations/dms-base/search-route.js.map +1 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js +4 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.js +5 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-emit.js +4 -0
- package/dist/implementations/dms-builder/engine/resource-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/theme-assets.js +5 -17
- package/dist/implementations/dms-builder/engine/theme-assets.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +0 -1
- package/dist/mcp/index.js +0 -5
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/page-verify/index.d.ts +0 -14
- package/dist/mcp/page-verify/index.js +5 -9
- package/dist/mcp/page-verify/index.js.map +1 -1
- package/dist/mcp/page-verify/mockup.d.ts +1 -2
- package/dist/mcp/page-verify/mockup.js +0 -1
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/page-verify/playwright.d.ts +4 -22
- package/dist/mcp/page-verify/playwright.js.map +1 -1
- package/dist/mcp/tools/mockup-apply-to-page.js +1 -1
- package/dist/mcp/tools/mockup-apply-to-page.js.map +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-read-spec.js +3 -10
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-write-spec.js +1 -1
- package/dist/mcp/tools/mockup-write-spec.js.map +1 -1
- package/dist/mcp/tools/mockup.js +0 -2
- package/dist/mcp/tools/mockup.js.map +1 -1
- package/dist/mcp/tools/page-verify.d.ts +0 -1
- package/dist/mcp/tools/page-verify.js +1 -5
- package/dist/mcp/tools/page-verify.js.map +1 -1
- package/dist/mockup/apply-notes.d.ts +1 -1
- package/dist/mockup/apply-notes.js +2 -1
- package/dist/mockup/apply-notes.js.map +1 -1
- package/dist/mockup/apply-plan.js +3 -0
- package/dist/mockup/apply-plan.js.map +1 -1
- package/dist/mockup/{fixture-routes.d.ts → capture-routes.d.ts} +6 -11
- package/dist/mockup/capture-routes.js +101 -0
- package/dist/mockup/capture-routes.js.map +1 -0
- package/dist/mockup/capture.d.ts +10 -0
- package/dist/mockup/capture.js +64 -0
- package/dist/mockup/capture.js.map +1 -0
- package/dist/mockup/compile.d.ts +1 -6
- package/dist/mockup/compile.js +25 -29
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/controller-blocks.js +62 -10
- package/dist/mockup/controller-blocks.js.map +1 -1
- package/dist/mockup/display-values.js +1 -1
- package/dist/mockup/display-values.js.map +1 -1
- package/dist/mockup/files.d.ts +2 -2
- package/dist/mockup/files.js +2 -2
- package/dist/mockup/files.js.map +1 -1
- package/dist/mockup/fixture-answers.d.ts +0 -1
- package/dist/mockup/fixture-answers.js +1 -1
- package/dist/mockup/fixture-answers.js.map +1 -1
- package/dist/mockup/fixtures.d.ts +3 -1
- package/dist/mockup/fixtures.js +25 -2
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/form-fields.js +10 -1
- package/dist/mockup/form-fields.js.map +1 -1
- package/dist/mockup/generate.js +1 -4
- package/dist/mockup/generate.js.map +1 -1
- package/dist/mockup/header-action.d.ts +47 -0
- package/dist/mockup/header-action.js +46 -0
- package/dist/mockup/header-action.js.map +1 -0
- package/dist/mockup/history-routes.js +17 -2
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/index.d.ts +0 -3
- package/dist/mockup/index.js +0 -3
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema-header.d.ts +2 -0
- package/dist/mockup/json-schema-header.js +69 -0
- package/dist/mockup/json-schema-header.js.map +1 -0
- package/dist/mockup/json-schema-layout.d.ts +2 -0
- package/dist/mockup/json-schema-layout.js +61 -0
- package/dist/mockup/json-schema-layout.js.map +1 -0
- package/dist/mockup/json-schema.js +24 -23
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/manage.js +1 -1
- package/dist/mockup/manage.js.map +1 -1
- package/dist/mockup/model.d.ts +255 -106
- package/dist/mockup/model.js +82 -86
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/modules.d.ts +9 -20
- package/dist/mockup/modules.js +22 -146
- package/dist/mockup/modules.js.map +1 -1
- package/dist/mockup/page-links.d.ts +2 -1
- package/dist/mockup/page-links.js +14 -3
- package/dist/mockup/page-links.js.map +1 -1
- package/dist/mockup/refusals.d.ts +1 -4
- package/dist/mockup/refusals.js +1 -15
- package/dist/mockup/refusals.js.map +1 -1
- package/dist/mockup/routes.d.ts +5 -1
- package/dist/mockup/routes.js +171 -9
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/sample-rows.js +4 -0
- package/dist/mockup/sample-rows.js.map +1 -1
- package/dist/mockup/store.d.ts +2 -1
- package/dist/mockup/store.js +22 -16
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/{store-summary.js → summary-fields.js} +1 -1
- package/dist/mockup/summary-fields.js.map +1 -0
- package/dist/mockup/table-columns.js +9 -3
- package/dist/mockup/table-columns.js.map +1 -1
- package/dist/mockup/table-options.d.ts +4 -1
- package/dist/mockup/table-options.js +40 -2
- package/dist/mockup/table-options.js.map +1 -1
- package/dist/mockup/table-param-filters.d.ts +52 -0
- package/dist/mockup/table-param-filters.js +83 -0
- package/dist/mockup/table-param-filters.js.map +1 -0
- package/dist/mockup/table-row-actions.d.ts +2 -0
- package/dist/mockup/table-row-actions.js +85 -0
- package/dist/mockup/table-row-actions.js.map +1 -0
- package/dist/mockup/unknown-keys.d.ts +3 -0
- package/dist/mockup/unknown-keys.js +45 -0
- package/dist/mockup/unknown-keys.js.map +1 -0
- package/dist/mockup/validate.d.ts +7 -1
- package/dist/mockup/validate.js +76 -3
- package/dist/mockup/validate.js.map +1 -1
- package/dist/pages/account.d.ts +1 -0
- package/dist/pages/account.js +1 -0
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/settings/overview/account-summary.d.ts +2 -0
- package/dist/pages/settings/overview/account-summary.js +17 -8
- package/dist/pages/settings/overview/account-summary.js.map +1 -1
- package/dist/pages/settings/settings-index.js +2 -1
- package/dist/pages/settings/settings-index.js.map +1 -1
- package/dist/realtime/sse.js +2 -4
- package/dist/realtime/sse.js.map +1 -1
- package/dist/store/internal/frontend/dev-reload.js +7 -1
- package/dist/store/internal/frontend/dev-reload.js.map +1 -1
- package/dist/utils/account-notifications.js +1 -0
- package/dist/utils/account-notifications.js.map +1 -1
- package/dist/utils/email-change-mail.js +2 -2
- package/dist/utils/email-change-mail.js.map +1 -1
- package/dist/utils/email-plain-text.d.ts +1 -0
- package/dist/utils/email-plain-text.js +95 -0
- package/dist/utils/email-plain-text.js.map +1 -0
- package/dist/utils/export-jobs.js +2 -2
- package/dist/utils/export-jobs.js.map +1 -1
- package/dist/utils/html-email.d.ts +8 -0
- package/dist/utils/html-email.js +9 -0
- package/dist/utils/html-email.js.map +1 -0
- package/dist/utils/image-signatures.d.ts +3 -0
- package/dist/utils/image-signatures.js +22 -0
- package/dist/utils/image-signatures.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/sse-keepalive/index.d.ts +3 -0
- package/dist/utils/sse-keepalive/index.js +8 -0
- package/dist/utils/sse-keepalive/index.js.map +1 -0
- package/dist/validation/allowed-keys.d.ts +2 -0
- package/dist/validation/allowed-keys.js +16 -0
- package/dist/validation/allowed-keys.js.map +1 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +1 -0
- package/dist/validation/index.js.map +1 -1
- package/frontend-vue/eslint-globals.generated.mjs +2 -2
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/login.vue +4 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +17 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +3 -0
- package/frontend-vue/layers/dms-auth/i18n/locales/auth-fr-FR.json +10 -10
- package/frontend-vue/layers/dms-core/app/build/composables/api-error.ts +8 -0
- package/frontend-vue/layers/dms-core/app/build/composables/field-errors.ts +485 -0
- package/frontend-vue/layers/dms-core/app/build/composables/useHydrated.ts +27 -0
- package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +3 -2
- package/frontend-vue/layers/dms-core/app/composables/translation/useUniqueLocales.ts +23 -5
- package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +1 -0
- package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +12 -443
- package/frontend-vue/layers/dms-core/app/entries/composables/useHydrated.ts +1 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +8 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +8 -0
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/app.config.ts +1 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +7 -4
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +14 -29
- package/frontend-vue/layers/dms-layout/app/build/components/layout/EmptyLayoutBrand.vue +49 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/LayoutFooter.vue +2 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +6 -21
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +19 -3
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +9 -110
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +8 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +6 -9
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixCategory.vue +6 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixSubject.vue +27 -22
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +8 -10
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/notificationDisplay.ts +39 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +38 -5
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfilePreferences.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/build/utils/dev-reload-stream.ts +23 -4
- package/frontend-vue/layers/dms-layout/app/custom-layouts/EmptyLayout.vue +39 -31
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +60 -9
- package/frontend-vue/layers/dms-layout/app/entries/components/pages/settings/shell/SettingsShell.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/error.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +7 -1
- package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +14 -1
- package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +13 -0
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +1 -1
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +5 -5
- package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/steps/StepPlatform.vue +3 -0
- package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/StepRegister.vue +3 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupHeaderActions.vue +1 -4
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIssues.vue +22 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +6 -11
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +125 -182
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewArrows.vue +110 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewFrameImage.vue +75 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +114 -12
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewZoom.vue +67 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +10 -4
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +8 -76
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +9 -65
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/ExpandedRowDetail.vue +26 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +247 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCaptureAssets.ts +181 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +8 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewRaster.ts +45 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +46 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +109 -35
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +5 -18
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +4 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +3 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +0 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +137 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +68 -13
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewLinks.ts +17 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/fetchedConfirmDialog.ts +6 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDisplayComponents.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +38 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerFieldTypes.ts +69 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +20 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/form/keyValueRows.ts +36 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewGrouping.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewListing.ts +21 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewSorting.ts +8 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useGroupedRows.ts +32 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/displayOptions.ts +16 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +67 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +73 -48
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +18 -11
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupThumbnail.vue +35 -124
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +7 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewCapture.ts +96 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +84 -149
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +61 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/dotGrid.ts +37 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/legalIdentifier.ts +279 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +43 -72
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +130 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +8 -92
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +35 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +44 -17
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +3 -14
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +26 -14
- package/frontend-vue/layers/dms-ui/app/build/utils/previewHeader.ts +154 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +149 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +42 -0
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +56 -6
- package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +0 -3
- package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +7 -7
- package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +4 -7
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputIdentifier.vue +90 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPhone.vue +5 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/KeyValue.vue +2 -20
- package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +51 -15
- package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +3 -8
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCapture.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCaptureAssets.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePreviewFrame.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/table-view/utils/displayOptions.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/mockups/manage.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/legalIdentifier.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupCaptures.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/types/table/query.ts +5 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +2 -28
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +12 -38
- package/frontend-vue/package.json +3 -3
- package/frontend-vue/scripts/check-invariants.mjs +101 -0
- package/package.json +9 -8
- package/skills/dms/SKILL.md +4 -2
- package/skills/dms-module/SKILL.md +3 -0
- package/dist/mcp/mockup-export/capture.d.ts +0 -15
- package/dist/mcp/mockup-export/capture.js +0 -97
- package/dist/mcp/mockup-export/capture.js.map +0 -1
- package/dist/mcp/mockup-export/document.d.ts +0 -4
- package/dist/mcp/mockup-export/document.js +0 -199
- package/dist/mcp/mockup-export/document.js.map +0 -1
- package/dist/mcp/mockup-export/index.d.ts +0 -23
- package/dist/mcp/mockup-export/index.js +0 -90
- package/dist/mcp/mockup-export/index.js.map +0 -1
- package/dist/mcp/mockup-export/plan.d.ts +0 -78
- package/dist/mcp/mockup-export/plan.js +0 -257
- package/dist/mcp/mockup-export/plan.js.map +0 -1
- package/dist/mcp/mockup-export/route.d.ts +0 -13
- package/dist/mcp/mockup-export/route.js +0 -66
- package/dist/mcp/mockup-export/route.js.map +0 -1
- package/dist/mcp/tools/mockup-export-pdf.d.ts +0 -1
- package/dist/mcp/tools/mockup-export-pdf.js +0 -71
- package/dist/mcp/tools/mockup-export-pdf.js.map +0 -1
- package/dist/mockup/database-manifest.d.ts +0 -2
- package/dist/mockup/database-manifest.js +0 -75
- package/dist/mockup/database-manifest.js.map +0 -1
- package/dist/mockup/entities.d.ts +0 -20
- package/dist/mockup/entities.js +0 -213
- package/dist/mockup/entities.js.map +0 -1
- package/dist/mockup/fixture-routes.js +0 -155
- package/dist/mockup/fixture-routes.js.map +0 -1
- package/dist/mockup/json-schema-entities.d.ts +0 -5
- package/dist/mockup/json-schema-entities.js +0 -141
- package/dist/mockup/json-schema-entities.js.map +0 -1
- package/dist/mockup/json.d.ts +0 -8
- package/dist/mockup/json.js +0 -20
- package/dist/mockup/json.js.map +0 -1
- package/dist/mockup/manifest-blocks.d.ts +0 -19
- package/dist/mockup/manifest-blocks.js +0 -65
- package/dist/mockup/manifest-blocks.js.map +0 -1
- package/dist/mockup/module-manifests.d.ts +0 -22
- package/dist/mockup/module-manifests.js +0 -28
- package/dist/mockup/module-manifests.js.map +0 -1
- package/dist/mockup/modules-schema.d.ts +0 -2
- package/dist/mockup/modules-schema.js +0 -42
- package/dist/mockup/modules-schema.js.map +0 -1
- package/dist/mockup/saas-manifest.d.ts +0 -2
- package/dist/mockup/saas-manifest.js +0 -496
- package/dist/mockup/saas-manifest.js.map +0 -1
- package/dist/mockup/state.d.ts +0 -76
- package/dist/mockup/state.js +0 -22
- package/dist/mockup/state.js.map +0 -1
- package/dist/mockup/store-summary.js.map +0 -1
- package/dist/mockup/tenancy.d.ts +0 -19
- package/dist/mockup/tenancy.js +0 -73
- package/dist/mockup/tenancy.js.map +0 -1
- package/dist/mockup/tenant-rows.d.ts +0 -4
- package/dist/mockup/tenant-rows.js +0 -19
- package/dist/mockup/tenant-rows.js.map +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +0 -165
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTenantBanner.vue +0 -48
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +0 -142
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +0 -175
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +0 -76
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +0 -63
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +0 -119
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +0 -80
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +0 -177
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +0 -151
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +0 -23
- package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +0 -15
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupTenantBanner.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupWorkspaceSwitcher.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupPdfExport.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupTenancy.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenancy.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenants.ts +0 -1
- /package/dist/mockup/{store-summary.d.ts → summary-fields.d.ts} +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isBoolean,
|
|
3
|
+
isObject,
|
|
4
|
+
isString,
|
|
5
|
+
} from "../../../../dms-core/app/utils/type-check";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The layouts a mockup page is drawn in, named after their factories:
|
|
9
|
+
* `DefaultLayout`, `FormPageLayout`, `SettingsLayout` and `EmptyLayout`.
|
|
10
|
+
*/
|
|
11
|
+
export const PREVIEW_PAGE_LAYOUTS = [
|
|
12
|
+
"default",
|
|
13
|
+
"form-page",
|
|
14
|
+
"settings",
|
|
15
|
+
"empty",
|
|
16
|
+
] as const;
|
|
17
|
+
export type PreviewPageLayoutType = (typeof PREVIEW_PAGE_LAYOUTS)[number];
|
|
18
|
+
|
|
19
|
+
/** The options of a layout, each one the layout's factory takes. */
|
|
20
|
+
export interface PreviewPageLayoutOptions {
|
|
21
|
+
fullWidth?: boolean;
|
|
22
|
+
hideHeader?: boolean;
|
|
23
|
+
fillHeight?: boolean;
|
|
24
|
+
hideBrand?: boolean;
|
|
25
|
+
hideFooter?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const LAYOUT_TYPES: ReadonlySet<unknown> = new Set(PREVIEW_PAGE_LAYOUTS);
|
|
29
|
+
|
|
30
|
+
const LAYOUT_OPTION_KEYS: readonly string[] = [
|
|
31
|
+
"fullWidth",
|
|
32
|
+
"hideHeader",
|
|
33
|
+
"fillHeight",
|
|
34
|
+
"hideBrand",
|
|
35
|
+
"hideFooter",
|
|
36
|
+
] satisfies (keyof PreviewPageLayoutOptions)[];
|
|
37
|
+
|
|
38
|
+
/** The layout a page is drawn in, with its options. */
|
|
39
|
+
export interface PreviewPageLayout {
|
|
40
|
+
type: PreviewPageLayoutType;
|
|
41
|
+
options?: PreviewPageLayoutOptions;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** What the preview draws around a page's blocks. */
|
|
45
|
+
export interface PreviewFrame {
|
|
46
|
+
/** The dashboard's sidebar and top bar. */
|
|
47
|
+
dashboard: boolean;
|
|
48
|
+
/** The page header: title, icon, description and buttons. */
|
|
49
|
+
header: boolean;
|
|
50
|
+
/** The blocks span the panel, else a readable column. */
|
|
51
|
+
fullWidth: boolean;
|
|
52
|
+
/** The settings navigation beside the page. */
|
|
53
|
+
settings: boolean;
|
|
54
|
+
/** The page fills the frame's height, its last block taking what is left. */
|
|
55
|
+
fillHeight: boolean;
|
|
56
|
+
/** Without the dashboard: the app logo and the theme toggle above the page. */
|
|
57
|
+
brand: boolean;
|
|
58
|
+
/** Without the dashboard: the footer under the page. */
|
|
59
|
+
footer: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function isRecord(
|
|
63
|
+
value: Parameters<typeof isObject>[0],
|
|
64
|
+
): value is Record<string, unknown> {
|
|
65
|
+
return isObject(value) && value !== null && !Array.isArray(value);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function isLayoutType(value: unknown): value is PreviewPageLayoutType {
|
|
69
|
+
return LAYOUT_TYPES.has(value);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function isOptionalBoolean(value: Parameters<typeof isBoolean>[0]): boolean {
|
|
73
|
+
return value === undefined || isBoolean(value);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function isLayoutOptions(value: unknown): value is PreviewPageLayoutOptions {
|
|
77
|
+
return (
|
|
78
|
+
isRecord(value) &&
|
|
79
|
+
Object.keys(value).every((key) => LAYOUT_OPTION_KEYS.includes(key)) &&
|
|
80
|
+
isOptionalBoolean(value.fullWidth) &&
|
|
81
|
+
isOptionalBoolean(value.hideHeader) &&
|
|
82
|
+
isOptionalBoolean(value.fillHeight) &&
|
|
83
|
+
isOptionalBoolean(value.hideBrand) &&
|
|
84
|
+
isOptionalBoolean(value.hideFooter)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Whether `value` is a layout a page is drawn in, each option a boolean the layouts take. */
|
|
89
|
+
export function isPreviewPageLayout(
|
|
90
|
+
value: unknown,
|
|
91
|
+
): value is PreviewPageLayout {
|
|
92
|
+
return (
|
|
93
|
+
isRecord(value) &&
|
|
94
|
+
isLayoutType(value.type) &&
|
|
95
|
+
(value.options === undefined || isLayoutOptions(value.options))
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Whether `value` is absent, or a layout a page is drawn in. */
|
|
100
|
+
export function isOptionalPreviewPageLayout(
|
|
101
|
+
value: unknown,
|
|
102
|
+
): value is PreviewPageLayout | undefined {
|
|
103
|
+
return value === undefined || isPreviewPageLayout(value);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Whether `value` is absent, or an object of strings, as a render's `params` and `query` are. */
|
|
107
|
+
export function isOptionalStringRecord(
|
|
108
|
+
value: Parameters<typeof isObject>[0],
|
|
109
|
+
): boolean {
|
|
110
|
+
return (
|
|
111
|
+
value === undefined ||
|
|
112
|
+
(isObject(value) &&
|
|
113
|
+
value !== null &&
|
|
114
|
+
!Array.isArray(value) &&
|
|
115
|
+
Object.values(value).every(isString))
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* What the preview draws around a page in `layout`, as the layout draws a
|
|
121
|
+
* real page: the dashboard frame of `DefaultLayout()` when there is none.
|
|
122
|
+
*/
|
|
123
|
+
export function previewFrameOf(
|
|
124
|
+
layout: PreviewPageLayout | undefined,
|
|
125
|
+
): PreviewFrame {
|
|
126
|
+
const options = layout?.options ?? {};
|
|
127
|
+
const fillHeight = options.fillHeight ?? false;
|
|
128
|
+
if (layout?.type === "empty") {
|
|
129
|
+
return {
|
|
130
|
+
dashboard: false,
|
|
131
|
+
header: false,
|
|
132
|
+
fullWidth: true,
|
|
133
|
+
settings: false,
|
|
134
|
+
fillHeight,
|
|
135
|
+
brand: !(options.hideBrand ?? false),
|
|
136
|
+
footer: !(options.hideFooter ?? false),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
const type = layout?.type ?? "default";
|
|
140
|
+
return {
|
|
141
|
+
dashboard: true,
|
|
142
|
+
header: !(options.hideHeader ?? false),
|
|
143
|
+
fullWidth: type === "default" && (options.fullWidth ?? true),
|
|
144
|
+
settings: type === "settings",
|
|
145
|
+
fillHeight,
|
|
146
|
+
brand: false,
|
|
147
|
+
footer: false,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FIXTURES_ONLY_QUERY } from "./previewFixturesOnly";
|
|
2
|
+
|
|
3
|
+
/** The query `/dms-preview` reads its first state from. */
|
|
4
|
+
export const STATE_QUERY = "state";
|
|
5
|
+
|
|
6
|
+
/** The parameters the preview reads itself, which a page's query never replaces. */
|
|
7
|
+
const PREVIEW_QUERY_KEYS: ReadonlySet<string> = new Set([
|
|
8
|
+
STATE_QUERY,
|
|
9
|
+
FIXTURES_ONLY_QUERY,
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
type QueryValue = string | null | readonly (string | null)[];
|
|
13
|
+
|
|
14
|
+
type RouteQuery = Readonly<Record<string, QueryValue | undefined>>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The query `/dms-preview` takes so its blocks read `page`, the query of the
|
|
18
|
+
* page they are drawn on, from the route as a page's blocks do: the preview's
|
|
19
|
+
* own parameters, then each of `page`'s. Undefined when `current` holds that
|
|
20
|
+
* already, so the route is replaced only when the page's query changes.
|
|
21
|
+
*/
|
|
22
|
+
export function previewRouteQuery(
|
|
23
|
+
current: RouteQuery,
|
|
24
|
+
page: Readonly<Record<string, string>> | undefined,
|
|
25
|
+
): Record<string, QueryValue> | undefined {
|
|
26
|
+
const held = new Map(
|
|
27
|
+
Object.entries(current).flatMap(([key, value]) =>
|
|
28
|
+
value === undefined ? [] : [[key, value] as const],
|
|
29
|
+
),
|
|
30
|
+
);
|
|
31
|
+
const next = new Map<string, QueryValue>();
|
|
32
|
+
for (const [key, value] of held) {
|
|
33
|
+
if (PREVIEW_QUERY_KEYS.has(key)) next.set(key, value);
|
|
34
|
+
}
|
|
35
|
+
for (const [key, value] of Object.entries(page ?? {})) {
|
|
36
|
+
if (!PREVIEW_QUERY_KEYS.has(key)) next.set(key, value);
|
|
37
|
+
}
|
|
38
|
+
const same =
|
|
39
|
+
held.size === next.size &&
|
|
40
|
+
[...next].every(([key, value]) => held.get(key) === value);
|
|
41
|
+
return same ? undefined : Object.fromEntries(next);
|
|
42
|
+
}
|
|
@@ -3,7 +3,10 @@ import { isString } from "../../../../dms-core/app/utils/type-check";
|
|
|
3
3
|
import { markRaw, type Component } from "vue";
|
|
4
4
|
import BlockPreviewIssue from "../../build/components/block-preview/BlockPreviewIssue.vue";
|
|
5
5
|
import BlockPreviewSketch from "../../build/components/block-preview/BlockPreviewSketch.vue";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
previewHeader,
|
|
8
|
+
previewPageLayout,
|
|
9
|
+
} from "../../build/composables/block-preview/previewNavigation";
|
|
7
10
|
import { useBlockPreviewEmbed } from "../../build/composables/block-preview/useBlockPreviewEmbed";
|
|
8
11
|
import {
|
|
9
12
|
collectPreviewIssues,
|
|
@@ -14,10 +17,16 @@ import {
|
|
|
14
17
|
type PreviewResolvedNode,
|
|
15
18
|
type PreviewTree,
|
|
16
19
|
} from "../../build/utils/blockPreview";
|
|
20
|
+
import { previewFrameOf } from "../../build/utils/previewPageLayout";
|
|
17
21
|
import {
|
|
18
22
|
FIXTURES_ONLY_QUERY,
|
|
19
23
|
FIXTURES_ONLY_VALUE,
|
|
20
24
|
} from "../../build/utils/previewFixturesOnly";
|
|
25
|
+
import {
|
|
26
|
+
previewRouteQuery,
|
|
27
|
+
STATE_QUERY,
|
|
28
|
+
} from "../../build/utils/previewPageQuery";
|
|
29
|
+
import { detach } from "../../build/composables/detach";
|
|
21
30
|
import { childComponentId } from "../../utils/componentId";
|
|
22
31
|
|
|
23
32
|
const { resolveError } = useApiErrorPresenter();
|
|
@@ -57,7 +66,6 @@ const props = withDefaults(
|
|
|
57
66
|
);
|
|
58
67
|
|
|
59
68
|
const BLOCK_TYPES_ENDPOINT = "/api/block-preview/types";
|
|
60
|
-
const STATE_QUERY = "state";
|
|
61
69
|
|
|
62
70
|
const { t, locale, locales, setLocale } = useI18n();
|
|
63
71
|
const route = useDmsRoute();
|
|
@@ -86,13 +94,36 @@ const embed = props.embed
|
|
|
86
94
|
|
|
87
95
|
const PAGE_HEADER_COMPONENT = "DmsPreviewPageHeader";
|
|
88
96
|
|
|
89
|
-
/**
|
|
97
|
+
/** How the page's layout frames it; the dashboard frame outside a mockup. */
|
|
98
|
+
const frame = computed(() =>
|
|
99
|
+
previewFrameOf(embed ? previewPageLayout.value : undefined),
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
/** The dashboard's page header, when a mockup's render asked the preview to draw one above the blocks and its layout has one. */
|
|
90
103
|
const headerComponent = computed(() =>
|
|
91
|
-
embed && previewHeader.value
|
|
104
|
+
embed && previewHeader.value && frame.value.header
|
|
92
105
|
? resolveDmsComponent(PAGE_HEADER_COMPONENT)
|
|
93
106
|
: undefined,
|
|
94
107
|
);
|
|
95
108
|
|
|
109
|
+
/** The padding of the dashboard's page region, and of `EmptyLayout`'s page under its logo or at the top of the window. */
|
|
110
|
+
const DASHBOARD_PADDING_CLASS = "p-4 sm:p-6";
|
|
111
|
+
const EMPTY_PADDING_CLASS = "px-3 pb-8 sm:px-5 sm:pb-10";
|
|
112
|
+
const EMPTY_TOP_PADDING_CLASS = "pt-3 sm:pt-5";
|
|
113
|
+
/** The flex column a page filling its frame is laid out in, down to its last block. */
|
|
114
|
+
const FILL_COLUMN_CLASS = "flex min-h-0 flex-1 flex-col";
|
|
115
|
+
|
|
116
|
+
const paddingClass = computed(() => {
|
|
117
|
+
if (!isPadded.value) return undefined;
|
|
118
|
+
if (frame.value.dashboard) return DASHBOARD_PADDING_CLASS;
|
|
119
|
+
return frame.value.brand
|
|
120
|
+
? EMPTY_PADDING_CLASS
|
|
121
|
+
: [EMPTY_PADDING_CLASS, EMPTY_TOP_PADDING_CLASS];
|
|
122
|
+
});
|
|
123
|
+
const fillClass = computed(() =>
|
|
124
|
+
frame.value.fillHeight ? FILL_COLUMN_CLASS : undefined,
|
|
125
|
+
);
|
|
126
|
+
|
|
96
127
|
const fetchedBlockTypes = ref<PreviewBlockTypes>();
|
|
97
128
|
const blockTypes = computed(() => props.blockTypes ?? fetchedBlockTypes.value);
|
|
98
129
|
const tree = computed(() => (embed ? embed.tree.value : props.tree));
|
|
@@ -103,6 +134,14 @@ const isPadded = computed(
|
|
|
103
134
|
() => embed?.padding.value ?? (props.embed || props.padding),
|
|
104
135
|
);
|
|
105
136
|
|
|
137
|
+
watch(
|
|
138
|
+
() => embed?.query.value,
|
|
139
|
+
(pageQuery) => {
|
|
140
|
+
const next = previewRouteQuery(route.query, pageQuery);
|
|
141
|
+
if (next) detach(useDmsRouter().replace({ query: next }));
|
|
142
|
+
},
|
|
143
|
+
);
|
|
144
|
+
|
|
106
145
|
const resolved = computed<PreviewResolvedNode[]>(() =>
|
|
107
146
|
tree.value && blockTypes.value
|
|
108
147
|
? resolvePreviewTree(tree.value, blockTypes.value)
|
|
@@ -136,6 +175,11 @@ function toPageComponent(node: PreviewResolvedNode): ResolvedComponentInfo {
|
|
|
136
175
|
|
|
137
176
|
const components = computed(() => resolved.value.map(toPageComponent));
|
|
138
177
|
|
|
178
|
+
/** The block that takes the height left, when the page fills its frame. */
|
|
179
|
+
const fillingId = computed(() =>
|
|
180
|
+
frame.value.fillHeight ? components.value.at(-1)?.id : undefined,
|
|
181
|
+
);
|
|
182
|
+
|
|
139
183
|
function describeIssue(issue: PreviewIssue): string {
|
|
140
184
|
return t(`dms.block_preview.${issue.key}`, {
|
|
141
185
|
name: issue.name,
|
|
@@ -174,7 +218,7 @@ onMounted(async () => {
|
|
|
174
218
|
data-dms-block-preview
|
|
175
219
|
:data-dms-preview-transparent="isTransparent || undefined"
|
|
176
220
|
:data-dms-inspecting="embed?.inspecting.value || undefined"
|
|
177
|
-
:class="
|
|
221
|
+
:class="[paddingClass, fillClass]"
|
|
178
222
|
>
|
|
179
223
|
<component
|
|
180
224
|
:is="headerComponent"
|
|
@@ -194,11 +238,17 @@ onMounted(async () => {
|
|
|
194
238
|
>
|
|
195
239
|
{{ t("dms.block_preview.empty") }}
|
|
196
240
|
</p>
|
|
197
|
-
<div
|
|
241
|
+
<div
|
|
242
|
+
v-else
|
|
243
|
+
:key="revision"
|
|
244
|
+
class="dms-page-stack space-y-6"
|
|
245
|
+
:class="fillClass"
|
|
246
|
+
>
|
|
198
247
|
<div
|
|
199
248
|
v-for="component in components"
|
|
200
249
|
:key="component.id"
|
|
201
250
|
class="empty:hidden"
|
|
251
|
+
:class="component.id === fillingId && FILL_COLUMN_CLASS"
|
|
202
252
|
data-dms-preview-block
|
|
203
253
|
>
|
|
204
254
|
<DmsRecursiveComponent
|
|
@@ -12,8 +12,6 @@ const route = useDmsRoute();
|
|
|
12
12
|
const name = readQueryValue(route.query.name);
|
|
13
13
|
const width = readQueryValue(route.query.width);
|
|
14
14
|
const data = readQueryValue(route.query.data);
|
|
15
|
-
const tenancy = readQueryValue(route.query.tenancy);
|
|
16
|
-
const tenant = readQueryValue(route.query.tenant);
|
|
17
15
|
</script>
|
|
18
16
|
|
|
19
17
|
<template>
|
|
@@ -23,7 +21,6 @@ const tenant = readQueryValue(route.query.tenant);
|
|
|
23
21
|
:name="name"
|
|
24
22
|
:initial-width="isMockupWidth(width) ? width : undefined"
|
|
25
23
|
:initial-data="isMockupDataMode(data) ? data : undefined"
|
|
26
|
-
:initial-tenancy="{ saas: tenancy === 'saas', tenant }"
|
|
27
24
|
/>
|
|
28
25
|
<div v-else class="p-4 sm:p-6">
|
|
29
26
|
<MockupIndex :base-path="route.path" />
|
|
@@ -27,7 +27,10 @@ import {
|
|
|
27
27
|
} from "../../composables/confirm/types";
|
|
28
28
|
import { isConfirmTextMatch } from "../../build/composables/confirm/confirmTextMatch";
|
|
29
29
|
import type { ConfirmDialogField } from "#dms-core/app/types/confirm-dialog";
|
|
30
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
fieldErrorMessage,
|
|
32
|
+
resolveFieldErrors,
|
|
33
|
+
} from "#dms-core/app/composables/useFieldErrors";
|
|
31
34
|
|
|
32
35
|
interface ConfirmModalProps {
|
|
33
36
|
title: string;
|
|
@@ -267,12 +270,9 @@ function showFieldErrors(
|
|
|
267
270
|
});
|
|
268
271
|
if (resolved.fields.length === 0) return false;
|
|
269
272
|
fieldErrors.value = Object.fromEntries(
|
|
270
|
-
resolved.fields.map((
|
|
271
|
-
field,
|
|
272
|
-
|
|
273
|
-
fallbackKey: fallbackKey ?? "dms.field_errors.invalid",
|
|
274
|
-
params,
|
|
275
|
-
})?.message,
|
|
273
|
+
resolved.fields.map((entry) => [
|
|
274
|
+
entry.field,
|
|
275
|
+
fieldErrorMessage(entry, resolveError),
|
|
276
276
|
]),
|
|
277
277
|
);
|
|
278
278
|
return !resolved.hasUnmatched;
|
|
@@ -15,10 +15,7 @@ import { MiniMap } from "@vue-flow/minimap";
|
|
|
15
15
|
import type { Component } from "vue";
|
|
16
16
|
import { computed, useId, useSlots } from "vue";
|
|
17
17
|
import { isString } from "#dms-core/app/utils/type-check";
|
|
18
|
-
|
|
19
|
-
const DMS_GRID_GAP = 24;
|
|
20
|
-
const DMS_GRID_DOT_SIZE = 1.2;
|
|
21
|
-
const DMS_GRID_COLOR = "rgba(127, 140, 170, 0.25)";
|
|
18
|
+
import { DOT_GRID } from "../../build/utils/dotGrid";
|
|
22
19
|
|
|
23
20
|
const ZOOM_RESET_LEVEL = 1;
|
|
24
21
|
const ZOOM_TRANSITION_MS = 200;
|
|
@@ -105,9 +102,9 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
105
102
|
nodeTypes: undefined,
|
|
106
103
|
edgeTypes: undefined,
|
|
107
104
|
grid: "dots",
|
|
108
|
-
gridGap:
|
|
109
|
-
gridSize:
|
|
110
|
-
gridColor:
|
|
105
|
+
gridGap: DOT_GRID.gap,
|
|
106
|
+
gridSize: DOT_GRID.size,
|
|
107
|
+
gridColor: DOT_GRID.color,
|
|
111
108
|
controls: true,
|
|
112
109
|
minimap: false,
|
|
113
110
|
fitViewOnInit: true,
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useFormField } from "@nuxt/ui/composables/useFormField";
|
|
3
|
+
import { useControlError } from "../../../composables/form/useControlError";
|
|
4
|
+
import {
|
|
5
|
+
formatIdentifier,
|
|
6
|
+
type IdentifierKind,
|
|
7
|
+
identifierErrorKey,
|
|
8
|
+
readIdentifier,
|
|
9
|
+
} from "../../../build/utils/legalIdentifier";
|
|
10
|
+
|
|
11
|
+
interface InputIdentifierProps {
|
|
12
|
+
id?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Which identifier the field holds, and so which rule it checks. */
|
|
16
|
+
identifier: IdentifierKind;
|
|
17
|
+
/** `vat_number`: the country a number typed without its code is read in. */
|
|
18
|
+
defaultCountry?: string;
|
|
19
|
+
/** `company_number`: the country whose register the number belongs to. */
|
|
20
|
+
country?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const props = defineProps<InputIdentifierProps>();
|
|
24
|
+
const model = defineModel<string | null | undefined>();
|
|
25
|
+
const { t } = useI18n();
|
|
26
|
+
const { report } = useControlError();
|
|
27
|
+
const {
|
|
28
|
+
id,
|
|
29
|
+
size,
|
|
30
|
+
color,
|
|
31
|
+
highlight,
|
|
32
|
+
disabled,
|
|
33
|
+
ariaAttrs,
|
|
34
|
+
emitFormBlur,
|
|
35
|
+
emitFormInput,
|
|
36
|
+
} = useFormField(props);
|
|
37
|
+
|
|
38
|
+
const text = ref("");
|
|
39
|
+
let emitted: string | null | undefined;
|
|
40
|
+
|
|
41
|
+
function shown(value: string | null | undefined): string {
|
|
42
|
+
return value ? formatIdentifier(value, props) : "";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
text.value = shown(model.value);
|
|
46
|
+
|
|
47
|
+
watch(model, (value) => {
|
|
48
|
+
if (value !== emitted) text.value = shown(value);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
function onInput(next: string | number | null | undefined): void {
|
|
52
|
+
text.value = String(next ?? "");
|
|
53
|
+
const read = readIdentifier(text.value, props);
|
|
54
|
+
emitted = read ?? text.value.trim();
|
|
55
|
+
model.value = emitted;
|
|
56
|
+
emitFormInput();
|
|
57
|
+
if (read !== undefined || !text.value.trim()) report(undefined);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function onBlur(): void {
|
|
61
|
+
const read = readIdentifier(text.value, props);
|
|
62
|
+
if (read !== undefined) text.value = shown(read);
|
|
63
|
+
report(
|
|
64
|
+
read === undefined && text.value.trim()
|
|
65
|
+
? t(identifierErrorKey(props.identifier))
|
|
66
|
+
: undefined,
|
|
67
|
+
);
|
|
68
|
+
emitFormBlur();
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<UInput
|
|
74
|
+
v-bind="ariaAttrs"
|
|
75
|
+
:id="id"
|
|
76
|
+
:model-value="text"
|
|
77
|
+
autocomplete="off"
|
|
78
|
+
spellcheck="false"
|
|
79
|
+
:placeholder="props.placeholder"
|
|
80
|
+
:size="size"
|
|
81
|
+
:color="color"
|
|
82
|
+
:highlight="highlight"
|
|
83
|
+
:disabled="disabled"
|
|
84
|
+
class="w-full"
|
|
85
|
+
:ui="{ base: 'tabular-nums uppercase' }"
|
|
86
|
+
:data-identifier="props.identifier"
|
|
87
|
+
@update:model-value="onInput"
|
|
88
|
+
@blur="onBlur"
|
|
89
|
+
/>
|
|
90
|
+
</template>
|
|
@@ -38,6 +38,10 @@ const {
|
|
|
38
38
|
emitFormInput,
|
|
39
39
|
} = useFormField(props);
|
|
40
40
|
|
|
41
|
+
const countryId = computed(() =>
|
|
42
|
+
id.value ? `${id.value}-country` : undefined,
|
|
43
|
+
);
|
|
44
|
+
|
|
41
45
|
const isStrict = computed(
|
|
42
46
|
() => !!props.requiredPrefix || !!props.defaultCountry,
|
|
43
47
|
);
|
|
@@ -118,6 +122,7 @@ const selected = computed(() =>
|
|
|
118
122
|
<template>
|
|
119
123
|
<div class="flex w-full">
|
|
120
124
|
<USelectMenu
|
|
125
|
+
:id="countryId"
|
|
121
126
|
:model-value="country"
|
|
122
127
|
:items="countryItems"
|
|
123
128
|
value-key="value"
|
|
@@ -4,6 +4,7 @@ import type { ComponentOptionsData } from "#dms-core/app/types/component";
|
|
|
4
4
|
import { useControlError } from "../../../composables/form/useControlError";
|
|
5
5
|
import {
|
|
6
6
|
type KeyValueRow,
|
|
7
|
+
keyValueColumns,
|
|
7
8
|
keyValueProblem,
|
|
8
9
|
keyValueRows,
|
|
9
10
|
keyValueObject,
|
|
@@ -32,26 +33,7 @@ const model = defineModel<
|
|
|
32
33
|
const { t } = useI18n();
|
|
33
34
|
const { report } = useControlError();
|
|
34
35
|
|
|
35
|
-
const
|
|
36
|
-
const TOGGLE_COMPONENT = { componentName: "dms-input-checkbox" };
|
|
37
|
-
|
|
38
|
-
const columns = computed(() => [
|
|
39
|
-
...(props.toggleable
|
|
40
|
-
? [{ id: "enabled", type: "boolean", component: TOGGLE_COMPONENT }]
|
|
41
|
-
: []),
|
|
42
|
-
{
|
|
43
|
-
id: "key",
|
|
44
|
-
label: props.keyLabel || t("dms.form.key_value.key"),
|
|
45
|
-
type: "string",
|
|
46
|
-
component: KEY_COMPONENT,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: "value",
|
|
50
|
-
label: props.valueLabel || t("dms.form.key_value.value"),
|
|
51
|
-
type: props.value.type,
|
|
52
|
-
component: props.value.component,
|
|
53
|
-
},
|
|
54
|
-
]);
|
|
36
|
+
const columns = computed(() => keyValueColumns(props, t));
|
|
55
37
|
|
|
56
38
|
const rows = ref<KeyValueRow[]>(keyValueRows(model.value, props.toggleable));
|
|
57
39
|
let emitted = JSON.stringify(model.value ?? {});
|
|
@@ -39,6 +39,11 @@ export interface KeyValueItem {
|
|
|
39
39
|
copy?: boolean;
|
|
40
40
|
/** Text the copy button copies instead of the shown value; implies `copy`. */
|
|
41
41
|
copyValue?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The row spans every column, its value under its label: a long value wraps
|
|
44
|
+
* and keeps its line breaks.
|
|
45
|
+
*/
|
|
46
|
+
fullWidth?: boolean;
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
interface KeyValueListProps {
|
|
@@ -79,24 +84,52 @@ const COLUMN_CLASSES: Record<
|
|
|
79
84
|
NonNullable<KeyValueListProps["columns"]>,
|
|
80
85
|
string
|
|
81
86
|
> = {
|
|
82
|
-
1: "
|
|
83
|
-
2: "gap-x-8 @min-[560px]:grid-cols-2
|
|
84
|
-
3: "gap-x-8 @min-[560px]:grid-cols-2 @min-[840px]:grid-cols-3
|
|
87
|
+
1: "",
|
|
88
|
+
2: "gap-x-8 @min-[560px]:grid-cols-2",
|
|
89
|
+
3: "gap-x-8 @min-[560px]:grid-cols-2 @min-[840px]:grid-cols-3",
|
|
85
90
|
};
|
|
86
91
|
|
|
87
92
|
const { locale, t } = useI18n();
|
|
88
93
|
|
|
89
|
-
const
|
|
90
|
-
()
|
|
91
|
-
COLUMN_CLASSES[
|
|
92
|
-
Math.min(MAX_COLUMNS, Math.max(1, Math.round(props.columns)))
|
|
93
|
-
],
|
|
94
|
+
const columnCount = computed(() =>
|
|
95
|
+
Math.min(MAX_COLUMNS, Math.max(1, Math.round(props.columns))),
|
|
94
96
|
);
|
|
95
97
|
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
const columnClass = computed(() => COLUMN_CLASSES[columnCount.value]);
|
|
99
|
+
|
|
100
|
+
/** Where the row at each position joins the first line, which has no rule above it. */
|
|
101
|
+
const FIRST_LINE_CLASSES = [
|
|
102
|
+
"border-t-0",
|
|
103
|
+
"@min-[560px]:border-t-0",
|
|
104
|
+
"@min-[840px]:border-t-0",
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
const fullWidthIndex = computed(() => {
|
|
108
|
+
const index = props.items.findIndex((item) => item.fullWidth);
|
|
109
|
+
return index === -1 ? props.items.length : index;
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
function firstLineClass(index: number): string | undefined {
|
|
113
|
+
const isOnFirstLine =
|
|
114
|
+
index === 0 || (index < columnCount.value && index < fullWidthIndex.value);
|
|
115
|
+
return isOnFirstLine ? FIRST_LINE_CLASSES[index] : undefined;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const FULL_WIDTH_CLASS = "col-span-full flex-col items-stretch";
|
|
119
|
+
const INLINE_CLASS = "flex-wrap items-center gap-x-3";
|
|
120
|
+
const FULL_WIDTH_VALUE_CLASS = "wrap-anywhere whitespace-pre-line";
|
|
121
|
+
const INLINE_VALUE_CLASS =
|
|
122
|
+
"ms-auto flex flex-wrap items-center justify-end gap-x-1.5 gap-y-0.5 text-end";
|
|
123
|
+
|
|
124
|
+
function rowClass(index: number, isFullWidth = false): (string | undefined)[] {
|
|
125
|
+
return [
|
|
126
|
+
"border-muted flex gap-y-0.5",
|
|
127
|
+
isFullWidth ? FULL_WIDTH_CLASS : INLINE_CLASS,
|
|
128
|
+
props.dense ? "min-h-8 py-1" : "min-h-[38px] py-1.5",
|
|
129
|
+
"border-t",
|
|
130
|
+
firstLineClass(index),
|
|
131
|
+
];
|
|
132
|
+
}
|
|
100
133
|
const showPlaceholders = computed(
|
|
101
134
|
() => props.loading && props.items.length === 0,
|
|
102
135
|
);
|
|
@@ -184,7 +217,7 @@ function keyOf(item: KeyValueItem, index: number): string {
|
|
|
184
217
|
<div
|
|
185
218
|
v-for="index in props.skeletonCount"
|
|
186
219
|
:key="index"
|
|
187
|
-
:class="rowClass"
|
|
220
|
+
:class="rowClass(index - 1)"
|
|
188
221
|
>
|
|
189
222
|
<dt class="min-w-[120px] flex-none">
|
|
190
223
|
<USkeleton :aria-label="t('dms.a11y.loading')" class="h-3 w-20" />
|
|
@@ -198,11 +231,14 @@ function keyOf(item: KeyValueItem, index: number): string {
|
|
|
198
231
|
<div
|
|
199
232
|
v-for="(item, index) in props.items"
|
|
200
233
|
:key="keyOf(item, index)"
|
|
201
|
-
:class="rowClass"
|
|
234
|
+
:class="rowClass(index, item.fullWidth)"
|
|
202
235
|
>
|
|
203
236
|
<dt class="text-muted min-w-[120px] flex-none">{{ item.label }}</dt>
|
|
204
237
|
<dd
|
|
205
|
-
class="
|
|
238
|
+
class="min-w-0"
|
|
239
|
+
:class="
|
|
240
|
+
item.fullWidth ? FULL_WIDTH_VALUE_CLASS : INLINE_VALUE_CLASS
|
|
241
|
+
"
|
|
206
242
|
>
|
|
207
243
|
<USkeleton
|
|
208
244
|
v-if="props.loading || item.loading"
|
|
@@ -8,6 +8,7 @@ import { resolveResponseToast } from "../../build/utils/responseWarning";
|
|
|
8
8
|
import { isJsonObject } from "../../build/utils/json";
|
|
9
9
|
import { resolveLinkVariables } from "../../build/utils/urlVariables";
|
|
10
10
|
import type { I18nTranslate } from "#dms-core/app/composables/translation/useTranslation";
|
|
11
|
+
import { fieldErrorMessage } from "#dms-core/app/composables/useFieldErrors";
|
|
11
12
|
import {
|
|
12
13
|
isNull,
|
|
13
14
|
isNumber,
|
|
@@ -186,16 +187,10 @@ function createFormNotices(
|
|
|
186
187
|
name: entry.field,
|
|
187
188
|
message: entry.values?.length
|
|
188
189
|
? t("dms.field_errors.with_values", {
|
|
189
|
-
message: presenter.resolveError
|
|
190
|
-
fallbackKey: entry.fallbackKey ?? "dms.field_errors.invalid",
|
|
191
|
-
params: entry.params,
|
|
192
|
-
})?.message,
|
|
190
|
+
message: fieldErrorMessage(entry, presenter.resolveError),
|
|
193
191
|
values: entry.values.join(", "),
|
|
194
192
|
})
|
|
195
|
-
: (presenter.resolveError
|
|
196
|
-
fallbackKey: entry.fallbackKey ?? "dms.field_errors.invalid",
|
|
197
|
-
params: entry.params,
|
|
198
|
-
})?.message ?? ""),
|
|
193
|
+
: (fieldErrorMessage(entry, presenter.resolveError) ?? ""),
|
|
199
194
|
values: entry.values,
|
|
200
195
|
path: entry.path,
|
|
201
196
|
})),
|