@antelopejs/dms 0.25.6 → 0.25.7-next.1111.gaba637e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -60
- package/README.md +1 -1
- package/data/mockup-spec.schema.json +223 -303
- 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 +2 -1
- package/dist/implementations/dms-auth/index.js.map +1 -1
- package/dist/implementations/dms-base/search-route.js +5 -8
- package/dist/implementations/dms-base/search-route.js.map +1 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js +1 -4
- package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.js +1 -5
- package/dist/implementations/dms-builder/engine/mapped-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-emit.js +0 -4
- package/dist/implementations/dms-builder/engine/resource-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/theme-assets.js +17 -5
- package/dist/implementations/dms-builder/engine/theme-assets.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +5 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/mockup-export/capture.d.ts +15 -0
- package/dist/mcp/mockup-export/capture.js +97 -0
- package/dist/mcp/mockup-export/capture.js.map +1 -0
- package/dist/mcp/mockup-export/document.d.ts +4 -0
- package/dist/mcp/mockup-export/document.js +199 -0
- package/dist/mcp/mockup-export/document.js.map +1 -0
- package/dist/mcp/mockup-export/index.d.ts +23 -0
- package/dist/mcp/mockup-export/index.js +90 -0
- package/dist/mcp/mockup-export/index.js.map +1 -0
- package/dist/mcp/mockup-export/plan.d.ts +78 -0
- package/dist/mcp/mockup-export/plan.js +257 -0
- package/dist/mcp/mockup-export/plan.js.map +1 -0
- package/dist/mcp/mockup-export/route.d.ts +13 -0
- package/dist/mcp/mockup-export/route.js +66 -0
- package/dist/mcp/mockup-export/route.js.map +1 -0
- package/dist/mcp/page-verify/index.d.ts +14 -0
- package/dist/mcp/page-verify/index.js +9 -5
- package/dist/mcp/page-verify/index.js.map +1 -1
- package/dist/mcp/page-verify/mockup.d.ts +2 -1
- package/dist/mcp/page-verify/mockup.js +1 -0
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/page-verify/playwright.d.ts +22 -4
- 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-export-pdf.d.ts +1 -0
- package/dist/mcp/tools/mockup-export-pdf.js +71 -0
- package/dist/mcp/tools/mockup-export-pdf.js.map +1 -0
- 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 +10 -3
- 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 +2 -0
- package/dist/mcp/tools/mockup.js.map +1 -1
- package/dist/mcp/tools/page-verify.d.ts +1 -0
- package/dist/mcp/tools/page-verify.js +5 -1
- 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 +1 -2
- package/dist/mockup/apply-notes.js.map +1 -1
- package/dist/mockup/apply-plan.js +0 -3
- package/dist/mockup/apply-plan.js.map +1 -1
- package/dist/mockup/compile.d.ts +6 -1
- package/dist/mockup/compile.js +29 -25
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/controller-blocks.js +10 -62
- package/dist/mockup/controller-blocks.js.map +1 -1
- package/dist/mockup/database-manifest.d.ts +2 -0
- package/dist/mockup/database-manifest.js +75 -0
- package/dist/mockup/database-manifest.js.map +1 -0
- package/dist/mockup/display-values.js +1 -1
- package/dist/mockup/display-values.js.map +1 -1
- package/dist/mockup/entities.d.ts +20 -0
- package/dist/mockup/entities.js +213 -0
- package/dist/mockup/entities.js.map +1 -0
- 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 +1 -0
- package/dist/mockup/fixture-answers.js +1 -1
- package/dist/mockup/fixture-answers.js.map +1 -1
- package/dist/mockup/{capture-routes.d.ts → fixture-routes.d.ts} +11 -6
- package/dist/mockup/fixture-routes.js +155 -0
- package/dist/mockup/fixture-routes.js.map +1 -0
- package/dist/mockup/fixtures.d.ts +1 -3
- package/dist/mockup/fixtures.js +2 -25
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/form-fields.js +1 -10
- package/dist/mockup/form-fields.js.map +1 -1
- package/dist/mockup/generate.js +4 -1
- package/dist/mockup/generate.js.map +1 -1
- package/dist/mockup/history-routes.js +2 -17
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/index.d.ts +3 -0
- package/dist/mockup/index.js +3 -0
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema-entities.d.ts +5 -0
- package/dist/mockup/json-schema-entities.js +141 -0
- package/dist/mockup/json-schema-entities.js.map +1 -0
- package/dist/mockup/json-schema.js +23 -24
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/json.d.ts +8 -0
- package/dist/mockup/json.js +20 -0
- package/dist/mockup/json.js.map +1 -0
- package/dist/mockup/manage.js +1 -1
- package/dist/mockup/manage.js.map +1 -1
- package/dist/mockup/manifest-blocks.d.ts +19 -0
- package/dist/mockup/manifest-blocks.js +65 -0
- package/dist/mockup/manifest-blocks.js.map +1 -0
- package/dist/mockup/model.d.ts +106 -255
- package/dist/mockup/model.js +86 -82
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/module-manifests.d.ts +22 -0
- package/dist/mockup/module-manifests.js +28 -0
- package/dist/mockup/module-manifests.js.map +1 -0
- package/dist/mockup/modules-schema.d.ts +2 -0
- package/dist/mockup/modules-schema.js +42 -0
- package/dist/mockup/modules-schema.js.map +1 -0
- package/dist/mockup/modules.d.ts +20 -9
- package/dist/mockup/modules.js +146 -22
- package/dist/mockup/modules.js.map +1 -1
- package/dist/mockup/page-links.d.ts +1 -2
- package/dist/mockup/page-links.js +3 -14
- package/dist/mockup/page-links.js.map +1 -1
- package/dist/mockup/refusals.d.ts +4 -1
- package/dist/mockup/refusals.js +15 -1
- package/dist/mockup/refusals.js.map +1 -1
- package/dist/mockup/routes.d.ts +1 -5
- package/dist/mockup/routes.js +9 -171
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/saas-manifest.d.ts +2 -0
- package/dist/mockup/saas-manifest.js +496 -0
- package/dist/mockup/saas-manifest.js.map +1 -0
- package/dist/mockup/sample-rows.js +0 -4
- package/dist/mockup/sample-rows.js.map +1 -1
- package/dist/mockup/state.d.ts +76 -0
- package/dist/mockup/state.js +22 -0
- package/dist/mockup/state.js.map +1 -0
- package/dist/mockup/{summary-fields.js → store-summary.js} +1 -1
- package/dist/mockup/store-summary.js.map +1 -0
- package/dist/mockup/store.d.ts +1 -2
- package/dist/mockup/store.js +16 -22
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/table-columns.js +3 -9
- package/dist/mockup/table-columns.js.map +1 -1
- package/dist/mockup/table-options.d.ts +1 -4
- package/dist/mockup/table-options.js +2 -40
- package/dist/mockup/table-options.js.map +1 -1
- package/dist/mockup/tenancy.d.ts +19 -0
- package/dist/mockup/tenancy.js +73 -0
- package/dist/mockup/tenancy.js.map +1 -0
- package/dist/mockup/tenant-rows.d.ts +4 -0
- package/dist/mockup/tenant-rows.js +19 -0
- package/dist/mockup/tenant-rows.js.map +1 -0
- package/dist/mockup/validate.d.ts +1 -7
- package/dist/mockup/validate.js +3 -76
- package/dist/mockup/validate.js.map +1 -1
- package/dist/pages/account.d.ts +0 -1
- package/dist/pages/account.js +0 -1
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/settings/overview/account-summary.d.ts +0 -2
- package/dist/pages/settings/overview/account-summary.js +8 -17
- package/dist/pages/settings/overview/account-summary.js.map +1 -1
- package/dist/pages/settings/settings-index.js +1 -2
- package/dist/pages/settings/settings-index.js.map +1 -1
- package/dist/realtime/sse.js +4 -2
- package/dist/realtime/sse.js.map +1 -1
- package/dist/store/internal/frontend/dev-reload.js +1 -7
- package/dist/store/internal/frontend/dev-reload.js.map +1 -1
- package/dist/utils/account-notifications.js +0 -1
- 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/export-jobs.js +2 -2
- package/dist/utils/export-jobs.js.map +1 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/validation/index.d.ts +0 -1
- package/dist/validation/index.js +0 -1
- 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 +0 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +0 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +0 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot.vue +0 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/login.vue +1 -4
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +0 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +1 -17
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +0 -3
- 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 +0 -8
- package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +2 -3
- package/frontend-vue/layers/dms-core/app/composables/translation/useUniqueLocales.ts +5 -23
- package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +0 -1
- package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +443 -12
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +0 -8
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +0 -8
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +0 -2
- package/frontend-vue/layers/dms-layout/app/app.config.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +4 -7
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +29 -14
- package/frontend-vue/layers/dms-layout/app/build/components/layout/LayoutFooter.vue +0 -2
- package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +21 -6
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +3 -19
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +110 -9
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +2 -8
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +9 -6
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixCategory.vue +2 -6
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixSubject.vue +22 -27
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +10 -8
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/notificationDisplay.ts +3 -39
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +5 -38
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfilePreferences.ts +3 -1
- package/frontend-vue/layers/dms-layout/app/build/utils/dev-reload-stream.ts +4 -23
- package/frontend-vue/layers/dms-layout/app/custom-layouts/EmptyLayout.vue +31 -39
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +9 -60
- package/frontend-vue/layers/dms-layout/app/error.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +1 -7
- package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +1 -14
- package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +0 -13
- 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 +0 -3
- package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/StepRegister.vue +1 -3
- 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/MockupDatabase.vue +165 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupHeaderActions.vue +4 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +1 -2
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIssues.vue +1 -22
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +11 -6
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +182 -125
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +12 -114
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +4 -10
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTenantBanner.vue +48 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +76 -8
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +65 -9
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +142 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/ExpandedRowDetail.vue +6 -26
- 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/useBlockPreviewEmbed.ts +6 -46
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +175 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +35 -109
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +18 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +76 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +63 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +1 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +6 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +13 -68
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewLinks.ts +7 -17
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/fetchedConfirmDialog.ts +0 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDisplayComponents.ts +0 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +0 -38
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerFieldTypes.ts +3 -69
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +7 -20
- package/frontend-vue/layers/dms-ui/app/build/composables/form/keyValueRows.ts +0 -36
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +0 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewGrouping.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewListing.ts +5 -21
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewSorting.ts +0 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useGroupedRows.ts +4 -32
- 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 +2 -14
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +6 -68
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +0 -5
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +48 -73
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +11 -18
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupThumbnail.vue +125 -34
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +3 -7
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +149 -84
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +119 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +72 -43
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +80 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +92 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +1 -35
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +17 -44
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +177 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +14 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +14 -26
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +151 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +23 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +6 -56
- package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +3 -0
- 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 +7 -4
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPhone.vue +0 -5
- package/frontend-vue/layers/dms-ui/app/components/form/components/KeyValue.vue +20 -2
- package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +15 -51
- package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +8 -3
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +0 -10
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupTenantBanner.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupWorkspaceSwitcher.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupPdfExport.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupTenancy.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenancy.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenants.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/types/table/query.ts +0 -5
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +28 -2
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +38 -12
- package/frontend-vue/scripts/check-invariants.mjs +0 -101
- package/package.json +5 -5
- package/skills/dms/SKILL.md +2 -4
- package/skills/dms-module/SKILL.md +0 -3
- package/dist/implementations/dms-base/group-order.d.ts +0 -18
- package/dist/implementations/dms-base/group-order.js +0 -66
- package/dist/implementations/dms-base/group-order.js.map +0 -1
- package/dist/mockup/capture-routes.js +0 -101
- package/dist/mockup/capture-routes.js.map +0 -1
- package/dist/mockup/capture.d.ts +0 -10
- package/dist/mockup/capture.js +0 -64
- package/dist/mockup/capture.js.map +0 -1
- package/dist/mockup/header-action.d.ts +0 -47
- package/dist/mockup/header-action.js +0 -46
- package/dist/mockup/header-action.js.map +0 -1
- package/dist/mockup/json-schema-header.d.ts +0 -2
- package/dist/mockup/json-schema-header.js +0 -69
- package/dist/mockup/json-schema-header.js.map +0 -1
- package/dist/mockup/json-schema-layout.d.ts +0 -2
- package/dist/mockup/json-schema-layout.js +0 -61
- package/dist/mockup/json-schema-layout.js.map +0 -1
- package/dist/mockup/summary-fields.js.map +0 -1
- package/dist/mockup/table-param-filters.d.ts +0 -52
- package/dist/mockup/table-param-filters.js +0 -83
- package/dist/mockup/table-param-filters.js.map +0 -1
- package/dist/mockup/table-row-actions.d.ts +0 -2
- package/dist/mockup/table-row-actions.js +0 -85
- package/dist/mockup/table-row-actions.js.map +0 -1
- package/dist/mockup/unknown-keys.d.ts +0 -3
- package/dist/mockup/unknown-keys.js +0 -45
- package/dist/mockup/unknown-keys.js.map +0 -1
- package/dist/utils/email-plain-text.d.ts +0 -1
- package/dist/utils/email-plain-text.js +0 -95
- package/dist/utils/email-plain-text.js.map +0 -1
- package/dist/utils/html-email.d.ts +0 -8
- package/dist/utils/html-email.js +0 -9
- package/dist/utils/html-email.js.map +0 -1
- package/dist/utils/image-signatures.d.ts +0 -3
- package/dist/utils/image-signatures.js +0 -22
- package/dist/utils/image-signatures.js.map +0 -1
- package/dist/utils/sse-keepalive/index.d.ts +0 -3
- package/dist/utils/sse-keepalive/index.js +0 -8
- package/dist/utils/sse-keepalive/index.js.map +0 -1
- package/dist/validation/allowed-keys.d.ts +0 -2
- package/dist/validation/allowed-keys.js +0 -16
- package/dist/validation/allowed-keys.js.map +0 -1
- package/frontend-vue/layers/dms-core/app/build/composables/field-errors.ts +0 -485
- package/frontend-vue/layers/dms-core/app/build/composables/useHydrated.ts +0 -27
- package/frontend-vue/layers/dms-core/app/entries/composables/useHydrated.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/build/components/layout/EmptyLayoutBrand.vue +0 -49
- package/frontend-vue/layers/dms-layout/app/entries/components/pages/settings/shell/SettingsShell.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewArrows.vue +0 -110
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewFrameImage.vue +0 -75
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewZoom.vue +0 -67
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +0 -247
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCaptureAssets.ts +0 -181
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewRaster.ts +0 -45
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +0 -136
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewCapture.ts +0 -96
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +0 -10
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +0 -61
- package/frontend-vue/layers/dms-ui/app/build/utils/dotGrid.ts +0 -37
- package/frontend-vue/layers/dms-ui/app/build/utils/legalIdentifier.ts +0 -279
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +0 -130
- package/frontend-vue/layers/dms-ui/app/build/utils/previewHeader.ts +0 -154
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +0 -149
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +0 -42
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputIdentifier.vue +0 -90
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCapture.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCaptureAssets.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePreviewFrame.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/table-view/utils/displayOptions.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/mockups/manage.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/legalIdentifier.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupCaptures.ts +0 -1
- /package/dist/mockup/{summary-fields.d.ts → store-summary.d.ts} +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import type { JsonObject, JsonWritableObject } from "./json";
|
|
2
|
+
import type {
|
|
3
|
+
MockupEntityField,
|
|
4
|
+
MockupEntityState,
|
|
5
|
+
MockupFieldType,
|
|
6
|
+
} from "./mockupEntities";
|
|
7
|
+
|
|
8
|
+
/** The name `@antelopejs/dms-database` registers its schema explorer under. */
|
|
9
|
+
export const SCHEMA_EXPLORER_COMPONENT = "DmsDatabaseSchemaExplorer";
|
|
10
|
+
|
|
11
|
+
/** The package that registers {@link SCHEMA_EXPLORER_COMPONENT}. */
|
|
12
|
+
export const SCHEMA_EXPLORER_PACKAGE = "@antelopejs/dms-database";
|
|
13
|
+
|
|
14
|
+
/** The id of the one schema the spec's entities make up. */
|
|
15
|
+
export const MOCKUP_SCHEMA_ID = "mockup";
|
|
16
|
+
|
|
17
|
+
/** The badge the diagram draws in the header of a tenant-scoped entity's table. */
|
|
18
|
+
export const TENANT_SCOPED_BADGE = "Tenant-scoped";
|
|
19
|
+
|
|
20
|
+
/** What the explorer needs of the schema's field descriptors, as `@antelopejs/dms-database` declares them. */
|
|
21
|
+
export type FieldDescriptor =
|
|
22
|
+
| { kind: "string" }
|
|
23
|
+
| { kind: "number" }
|
|
24
|
+
| { kind: "boolean" }
|
|
25
|
+
| { kind: "date" }
|
|
26
|
+
| { kind: "literal"; value: string | number | boolean }
|
|
27
|
+
| { kind: "union"; members: FieldDescriptor[] }
|
|
28
|
+
| { kind: "refinement"; base: FieldDescriptor; name: string };
|
|
29
|
+
|
|
30
|
+
export interface RelationDeclaration {
|
|
31
|
+
fromField: string;
|
|
32
|
+
toSchema: string;
|
|
33
|
+
toTable: string;
|
|
34
|
+
toField: string;
|
|
35
|
+
many: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface TableSummary {
|
|
39
|
+
name: string;
|
|
40
|
+
fields: Record<string, FieldDescriptor>;
|
|
41
|
+
indexes: Record<string, { fields?: string[]; multi?: boolean }>;
|
|
42
|
+
relations: RelationDeclaration[];
|
|
43
|
+
modifiers?: Record<string, string[]>;
|
|
44
|
+
/** Labels the diagram draws in the table's header. */
|
|
45
|
+
badges?: string[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SchemaSummary {
|
|
49
|
+
id: string;
|
|
50
|
+
options: Record<string, never>;
|
|
51
|
+
tables: TableSummary[];
|
|
52
|
+
label?: { text: string; color?: string };
|
|
53
|
+
stats: { tableCount: number; elementCount: number; instanceCount: number };
|
|
54
|
+
instances: string[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Where the explorer reads its schema: the one it is given, with its rows, or the connection it introspects. */
|
|
58
|
+
export type SchemaExplorerSource =
|
|
59
|
+
| {
|
|
60
|
+
kind: "static";
|
|
61
|
+
schema: SchemaSummary;
|
|
62
|
+
rows: Record<string, JsonObject[]>;
|
|
63
|
+
}
|
|
64
|
+
| { kind: "connection"; connection: string };
|
|
65
|
+
|
|
66
|
+
/** The views of the explorer. */
|
|
67
|
+
export type SchemaExplorerView = "diagram" | "data";
|
|
68
|
+
|
|
69
|
+
const STRING: FieldDescriptor = { kind: "string" };
|
|
70
|
+
const NUMBER: FieldDescriptor = { kind: "number" };
|
|
71
|
+
|
|
72
|
+
function refined(base: FieldDescriptor, name: string): FieldDescriptor {
|
|
73
|
+
return { kind: "refinement", base, name };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** The descriptor each field type draws as: an `email`, a `url` and a `price` are refinements of their base, an `enum` is the union of its values, a `ref` the string key it holds. */
|
|
77
|
+
const DESCRIBE: Record<
|
|
78
|
+
MockupFieldType,
|
|
79
|
+
(field: MockupEntityField) => FieldDescriptor
|
|
80
|
+
> = {
|
|
81
|
+
string: () => STRING,
|
|
82
|
+
number: () => NUMBER,
|
|
83
|
+
price: () => refined(NUMBER, "price"),
|
|
84
|
+
boolean: () => ({ kind: "boolean" }),
|
|
85
|
+
date: () => ({ kind: "date" }),
|
|
86
|
+
email: () => refined(STRING, "email"),
|
|
87
|
+
url: () => refined(STRING, "url"),
|
|
88
|
+
enum: (field) => ({
|
|
89
|
+
kind: "union",
|
|
90
|
+
members: (field.values ?? []).map((value) => ({ kind: "literal", value })),
|
|
91
|
+
}),
|
|
92
|
+
ref: () => STRING,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
function relationOf(
|
|
96
|
+
field: MockupEntityField,
|
|
97
|
+
known: ReadonlySet<string>,
|
|
98
|
+
): RelationDeclaration[] {
|
|
99
|
+
if (field.to === undefined || !known.has(field.to)) return [];
|
|
100
|
+
return [
|
|
101
|
+
{
|
|
102
|
+
fromField: field.name,
|
|
103
|
+
toSchema: MOCKUP_SCHEMA_ID,
|
|
104
|
+
toTable: field.to,
|
|
105
|
+
toField: "id",
|
|
106
|
+
many: false,
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function tableOf(
|
|
112
|
+
entity: MockupEntityState,
|
|
113
|
+
known: ReadonlySet<string>,
|
|
114
|
+
): TableSummary {
|
|
115
|
+
return {
|
|
116
|
+
name: entity.name,
|
|
117
|
+
fields: Object.fromEntries(
|
|
118
|
+
entity.fields.map((field) => [field.name, DESCRIBE[field.type](field)]),
|
|
119
|
+
),
|
|
120
|
+
indexes: { id: { fields: ["id"] } },
|
|
121
|
+
relations: entity.fields.flatMap((field) => relationOf(field, known)),
|
|
122
|
+
...(entity.tenantScoped && {
|
|
123
|
+
badges: [TENANT_SCOPED_BADGE],
|
|
124
|
+
}),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The explorer's source for the spec's entities: one table per entity with
|
|
130
|
+
* `id` indexed, a relation for each `ref` whose target is an entity, and the
|
|
131
|
+
* rows the entities hold, keyed by entity name.
|
|
132
|
+
*/
|
|
133
|
+
export function entitiesSource(
|
|
134
|
+
entities: readonly MockupEntityState[],
|
|
135
|
+
): Extract<SchemaExplorerSource, { kind: "static" }> {
|
|
136
|
+
const known = new Set(entities.map((entity) => entity.name));
|
|
137
|
+
return {
|
|
138
|
+
kind: "static",
|
|
139
|
+
schema: {
|
|
140
|
+
id: MOCKUP_SCHEMA_ID,
|
|
141
|
+
options: {},
|
|
142
|
+
tables: entities.map((entity) => tableOf(entity, known)),
|
|
143
|
+
stats: {
|
|
144
|
+
tableCount: entities.length,
|
|
145
|
+
elementCount: entities.reduce(
|
|
146
|
+
(count, entity) => count + entity.rows.length,
|
|
147
|
+
0,
|
|
148
|
+
),
|
|
149
|
+
instanceCount: 0,
|
|
150
|
+
},
|
|
151
|
+
instances: [],
|
|
152
|
+
},
|
|
153
|
+
rows: Object.fromEntries(
|
|
154
|
+
entities.map((entity) => [entity.name, entity.rows]),
|
|
155
|
+
),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** The entities as `spec.json` writes them once serialized: keyed by name, each field keyed by its name, with `tenantScoped`, `to` and `values` only where they are set. */
|
|
160
|
+
export function entitiesSpec(
|
|
161
|
+
entities: readonly MockupEntityState[],
|
|
162
|
+
): JsonWritableObject {
|
|
163
|
+
return Object.fromEntries(
|
|
164
|
+
entities.map((entity) => [
|
|
165
|
+
entity.name,
|
|
166
|
+
{
|
|
167
|
+
tenantScoped: entity.tenantScoped,
|
|
168
|
+
fields: Object.fromEntries(
|
|
169
|
+
entity.fields.map((field) => [
|
|
170
|
+
field.name,
|
|
171
|
+
{ type: field.type, to: field.to, values: field.values },
|
|
172
|
+
]),
|
|
173
|
+
),
|
|
174
|
+
},
|
|
175
|
+
]),
|
|
176
|
+
);
|
|
177
|
+
}
|
|
@@ -31,11 +31,17 @@ export interface MockupCombo {
|
|
|
31
31
|
/**
|
|
32
32
|
* What the canvas shows: one page of the mockup as it is now, or of a past
|
|
33
33
|
* version of it, read-only; every page of either side by side, in the
|
|
34
|
-
* overview;
|
|
35
|
-
* reaches the page
|
|
34
|
+
* overview; a page as the dashboard runs it, in Preview, where a click
|
|
35
|
+
* reaches the page; or the DB explorer over the canvas, where no key reaches
|
|
36
|
+
* the page behind it.
|
|
36
37
|
*/
|
|
37
38
|
export type MockupView =
|
|
38
|
-
|
|
39
|
+
| "current"
|
|
40
|
+
| "version"
|
|
41
|
+
| "overview"
|
|
42
|
+
| "overview_version"
|
|
43
|
+
| "preview"
|
|
44
|
+
| "database";
|
|
39
45
|
|
|
40
46
|
const PAGE_VIEWS: readonly MockupView[] = ["current", "version"];
|
|
41
47
|
const OVERVIEW_VIEWS: readonly MockupView[] = ["overview", "overview_version"];
|
|
@@ -130,6 +136,11 @@ export const MOCKUP_SHORTCUTS = {
|
|
|
130
136
|
combos: [{ key: "escape" }],
|
|
131
137
|
views: ["preview"],
|
|
132
138
|
},
|
|
139
|
+
close_database: {
|
|
140
|
+
group: "panels",
|
|
141
|
+
combos: [{ key: "escape" }],
|
|
142
|
+
views: ["database"],
|
|
143
|
+
},
|
|
133
144
|
} as const satisfies Record<string, MockupShortcut>;
|
|
134
145
|
|
|
135
146
|
export type MockupShortcutId = keyof typeof MOCKUP_SHORTCUTS;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { JsonValue } from "../../../../dms-core/app/types/json";
|
|
2
2
|
import { isNumber, isString } from "../../../../dms-core/app/utils/type-check";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
isHeaderVariant,
|
|
6
|
-
type PreviewHeaderAction,
|
|
7
|
-
} from "./previewHeader";
|
|
3
|
+
import type { PreviewHeaderAction } from "./blockPreviewMessages";
|
|
4
|
+
import { isHeaderColor, isHeaderVariant } from "./blockPreviewMessages";
|
|
8
5
|
import {
|
|
9
6
|
isJsonObject,
|
|
10
7
|
isJsonValue,
|
|
@@ -102,17 +99,8 @@ function isOptional<Value extends JsonValue>(
|
|
|
102
99
|
return value === undefined || guard(value);
|
|
103
100
|
}
|
|
104
101
|
|
|
105
|
-
/**
|
|
106
|
-
|
|
107
|
-
* page inspector edits, and what else the spec writes on it (its target, its
|
|
108
|
-
* confirmation), kept as written.
|
|
109
|
-
*/
|
|
110
|
-
export interface MockupHeaderAction extends Pick<
|
|
111
|
-
PreviewHeaderAction,
|
|
112
|
-
"label" | "icon" | "color" | "variant"
|
|
113
|
-
> {
|
|
114
|
-
kept?: JsonObject;
|
|
115
|
-
}
|
|
102
|
+
/** A button right of a page's title, as a spec page holds it. */
|
|
103
|
+
export type MockupHeaderAction = PreviewHeaderAction;
|
|
116
104
|
|
|
117
105
|
/** The header buttons a page holds, in order, as far as each reads cleanly. */
|
|
118
106
|
export function pageHeaderActions(page: MockupSpecPage): MockupHeaderAction[] {
|
|
@@ -120,15 +108,15 @@ export function pageHeaderActions(page: MockupSpecPage): MockupHeaderAction[] {
|
|
|
120
108
|
if (!Array.isArray(headerActions)) return [];
|
|
121
109
|
return headerActions.flatMap((entry): MockupHeaderAction[] => {
|
|
122
110
|
if (!isJsonObject(entry)) return [];
|
|
123
|
-
const { label, icon, color, variant
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
111
|
+
const { label, icon, color, variant } = entry;
|
|
112
|
+
return [
|
|
113
|
+
{
|
|
114
|
+
label: isString(label) ? label : "",
|
|
115
|
+
icon: isString(icon) ? icon : undefined,
|
|
116
|
+
color: isHeaderColor(color) ? color : undefined,
|
|
117
|
+
variant: isHeaderVariant(variant) ? variant : undefined,
|
|
118
|
+
},
|
|
119
|
+
];
|
|
132
120
|
});
|
|
133
121
|
}
|
|
134
122
|
|
|
@@ -138,7 +126,7 @@ export function headerActionJson(action: MockupHeaderAction): JsonObject {
|
|
|
138
126
|
if (action.icon) written.icon = action.icon;
|
|
139
127
|
if (action.color) written.color = action.color;
|
|
140
128
|
if (action.variant) written.variant = action.variant;
|
|
141
|
-
return
|
|
129
|
+
return written;
|
|
142
130
|
}
|
|
143
131
|
|
|
144
132
|
/** The text field `name` of a page, empty when it holds none. */
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { PreviewNode } from "./blockPreview";
|
|
2
|
+
import type {
|
|
3
|
+
PreviewHiddenRows,
|
|
4
|
+
PreviewWorkspace,
|
|
5
|
+
} from "./blockPreviewNavigation";
|
|
6
|
+
import {
|
|
7
|
+
isWritableObject,
|
|
8
|
+
type JsonWritable,
|
|
9
|
+
type JsonWritableObject,
|
|
10
|
+
} from "./json";
|
|
11
|
+
import { isString } from "../../../../dms-core/app/utils/type-check";
|
|
12
|
+
import { mockupEndpoint } from "./mockup";
|
|
13
|
+
import type { MockupEntityState } from "./mockupEntities";
|
|
14
|
+
import type { MockupTenant } from "./mockupTenants";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* How the viewer shows the mockup: as written, or as one workspace of a SaaS
|
|
18
|
+
* app sees it. `tenant` is the id of that workspace, and is absent when the
|
|
19
|
+
* spec lists no tenant.
|
|
20
|
+
*/
|
|
21
|
+
export type MockupTenancy =
|
|
22
|
+
{ mode: "single" } | { mode: "saas"; tenant?: string };
|
|
23
|
+
|
|
24
|
+
/** The id of the module whose presence in a spec turns SaaS mode on. */
|
|
25
|
+
export const SAAS_MODULE_ID = "saas";
|
|
26
|
+
|
|
27
|
+
export const SINGLE_TENANCY: MockupTenancy = { mode: "single" };
|
|
28
|
+
|
|
29
|
+
/** The tenant `tenancy` shows: none in single-tenant mode, and in SaaS mode for a spec that lists no tenant. */
|
|
30
|
+
export function tenantOf(tenancy: MockupTenancy): string | undefined {
|
|
31
|
+
return tenancy.mode === "saas" ? tenancy.tenant : undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The tenant SaaS mode shows: `preferred` while the spec still lists it, else
|
|
36
|
+
* the first one; undefined when the spec lists none.
|
|
37
|
+
*/
|
|
38
|
+
export function activeTenantId(
|
|
39
|
+
tenants: readonly MockupTenant[],
|
|
40
|
+
preferred: string | undefined,
|
|
41
|
+
): string | undefined {
|
|
42
|
+
return tenants.some((tenant) => tenant.id === preferred)
|
|
43
|
+
? preferred
|
|
44
|
+
: tenants[0]?.id;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function scopedFields(
|
|
48
|
+
fields: JsonWritableObject,
|
|
49
|
+
from: string,
|
|
50
|
+
to: string,
|
|
51
|
+
): JsonWritableObject {
|
|
52
|
+
return Object.fromEntries(
|
|
53
|
+
Object.entries(fields).map(([key, field]) => [
|
|
54
|
+
key,
|
|
55
|
+
field === undefined ? undefined : scopedJson(field, from, to),
|
|
56
|
+
]),
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function scopedJson(
|
|
61
|
+
value: JsonWritable,
|
|
62
|
+
from: string,
|
|
63
|
+
to: string,
|
|
64
|
+
): JsonWritable {
|
|
65
|
+
if (isString(value)) {
|
|
66
|
+
return value.startsWith(from) ? `${to}${value.slice(from.length)}` : value;
|
|
67
|
+
}
|
|
68
|
+
if (Array.isArray(value)) {
|
|
69
|
+
return value.map((item) => scopedJson(item, from, to));
|
|
70
|
+
}
|
|
71
|
+
return isWritableObject(value) ? scopedFields(value, from, to) : value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function scopedNode(node: PreviewNode, from: string, to: string): PreviewNode {
|
|
75
|
+
return {
|
|
76
|
+
...node,
|
|
77
|
+
...(node.options && { options: scopedFields(node.options, from, to) }),
|
|
78
|
+
...(node.children && {
|
|
79
|
+
children: node.children.map((child) => scopedNode(child, from, to)),
|
|
80
|
+
}),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* `tree` with every string that starts at the mockup's fixture routes,
|
|
86
|
+
* `/api/mockup/<name>/pages/`, moved under the tenant's,
|
|
87
|
+
* `/api/mockup/<name>/tenants/<tenant>/pages/`, at any depth. What follows
|
|
88
|
+
* the prefix, a suffix or a query, stays as it is; any other string stays too.
|
|
89
|
+
*/
|
|
90
|
+
export function withTenantFixtures(
|
|
91
|
+
tree: readonly PreviewNode[],
|
|
92
|
+
name: string,
|
|
93
|
+
tenant: string,
|
|
94
|
+
): PreviewNode[] {
|
|
95
|
+
const from = mockupEndpoint(name, "/pages/");
|
|
96
|
+
const to = mockupEndpoint(
|
|
97
|
+
name,
|
|
98
|
+
`/tenants/${encodeURIComponent(tenant)}/pages/`,
|
|
99
|
+
);
|
|
100
|
+
return tree.map((node) => scopedNode(node, from, to));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Each tenant-scoped entity the page `page` holds, with the rows of the
|
|
105
|
+
* tenant `tenant` it shows out of all its rows; empty for a page that holds
|
|
106
|
+
* none.
|
|
107
|
+
*/
|
|
108
|
+
export function hiddenRows(
|
|
109
|
+
entities: readonly MockupEntityState[] | undefined,
|
|
110
|
+
page: string | undefined,
|
|
111
|
+
tenant: string,
|
|
112
|
+
): PreviewHiddenRows[] {
|
|
113
|
+
return (entities ?? []).flatMap((entity) =>
|
|
114
|
+
entity.tenantScoped === true &&
|
|
115
|
+
page !== undefined &&
|
|
116
|
+
entity.pages.includes(page)
|
|
117
|
+
? [
|
|
118
|
+
{
|
|
119
|
+
entity: entity.name,
|
|
120
|
+
shown: entity.rows.filter((row) => row.tenantId === tenant).length,
|
|
121
|
+
total: entity.rows.length,
|
|
122
|
+
},
|
|
123
|
+
]
|
|
124
|
+
: [],
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* What the preview's sidebar and banner draw of SaaS mode: the tenants, the
|
|
130
|
+
* active one and the rows hidden on `page`. Undefined in single-tenant mode
|
|
131
|
+
* and for a spec that lists no tenant.
|
|
132
|
+
*/
|
|
133
|
+
export function mockupWorkspace(
|
|
134
|
+
tenants: readonly MockupTenant[] | undefined,
|
|
135
|
+
tenancy: MockupTenancy,
|
|
136
|
+
entities: readonly MockupEntityState[] | undefined,
|
|
137
|
+
page: string | undefined,
|
|
138
|
+
): PreviewWorkspace | undefined {
|
|
139
|
+
if (
|
|
140
|
+
tenancy.mode !== "saas" ||
|
|
141
|
+
tenancy.tenant === undefined ||
|
|
142
|
+
!tenants?.length
|
|
143
|
+
) {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
tenants: [...tenants],
|
|
148
|
+
active: tenancy.tenant,
|
|
149
|
+
hidden: hiddenRows(entities, page, tenancy.tenant),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isString } from "../../../../dms-core/app/utils/type-check";
|
|
2
|
+
import { isOptionalString, isRecord } from "./recordGuards";
|
|
3
|
+
|
|
4
|
+
/** A workspace of the mockup's SaaS mode: one of `fixtures.tenants` of the spec. */
|
|
5
|
+
export interface MockupTenant {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
plan?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function isTenant(value: unknown): value is MockupTenant {
|
|
12
|
+
return (
|
|
13
|
+
isRecord(value) &&
|
|
14
|
+
isString(value.id) &&
|
|
15
|
+
isString(value.name) &&
|
|
16
|
+
isOptionalString(value.plan)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Whether `value` is a list of tenants, each read. */
|
|
21
|
+
export function isMockupTenants(value: unknown): value is MockupTenant[] {
|
|
22
|
+
return Array.isArray(value) && value.every(isTenant);
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isObject, isString } from "../../../../dms-core/app/utils/type-check";
|
|
2
|
+
|
|
3
|
+
/** Whether `value` is a plain record: an object that is neither `null` nor a list. */
|
|
4
|
+
export function isRecord(
|
|
5
|
+
value: Parameters<typeof isObject>[0],
|
|
6
|
+
): value is Record<string, unknown> {
|
|
7
|
+
return isObject(value) && value !== null && !Array.isArray(value);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Whether `value` is absent or a string. */
|
|
11
|
+
export function isOptionalString(
|
|
12
|
+
value: Parameters<typeof isString>[0],
|
|
13
|
+
): boolean {
|
|
14
|
+
return value === undefined || isString(value);
|
|
15
|
+
}
|
|
@@ -3,10 +3,7 @@ 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 {
|
|
7
|
-
previewHeader,
|
|
8
|
-
previewPageLayout,
|
|
9
|
-
} from "../../build/composables/block-preview/previewNavigation";
|
|
6
|
+
import { previewHeader } from "../../build/composables/block-preview/previewNavigation";
|
|
10
7
|
import { useBlockPreviewEmbed } from "../../build/composables/block-preview/useBlockPreviewEmbed";
|
|
11
8
|
import {
|
|
12
9
|
collectPreviewIssues,
|
|
@@ -17,16 +14,10 @@ import {
|
|
|
17
14
|
type PreviewResolvedNode,
|
|
18
15
|
type PreviewTree,
|
|
19
16
|
} from "../../build/utils/blockPreview";
|
|
20
|
-
import { previewFrameOf } from "../../build/utils/previewPageLayout";
|
|
21
17
|
import {
|
|
22
18
|
FIXTURES_ONLY_QUERY,
|
|
23
19
|
FIXTURES_ONLY_VALUE,
|
|
24
20
|
} from "../../build/utils/previewFixturesOnly";
|
|
25
|
-
import {
|
|
26
|
-
previewRouteQuery,
|
|
27
|
-
STATE_QUERY,
|
|
28
|
-
} from "../../build/utils/previewPageQuery";
|
|
29
|
-
import { detach } from "../../build/composables/detach";
|
|
30
21
|
import { childComponentId } from "../../utils/componentId";
|
|
31
22
|
|
|
32
23
|
const { resolveError } = useApiErrorPresenter();
|
|
@@ -66,6 +57,7 @@ const props = withDefaults(
|
|
|
66
57
|
);
|
|
67
58
|
|
|
68
59
|
const BLOCK_TYPES_ENDPOINT = "/api/block-preview/types";
|
|
60
|
+
const STATE_QUERY = "state";
|
|
69
61
|
|
|
70
62
|
const { t, locale, locales, setLocale } = useI18n();
|
|
71
63
|
const route = useDmsRoute();
|
|
@@ -94,36 +86,13 @@ const embed = props.embed
|
|
|
94
86
|
|
|
95
87
|
const PAGE_HEADER_COMPONENT = "DmsPreviewPageHeader";
|
|
96
88
|
|
|
97
|
-
/**
|
|
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. */
|
|
89
|
+
/** The dashboard's page header, when a mockup's render asked the preview to draw one above the blocks. */
|
|
103
90
|
const headerComponent = computed(() =>
|
|
104
|
-
embed && previewHeader.value
|
|
91
|
+
embed && previewHeader.value
|
|
105
92
|
? resolveDmsComponent(PAGE_HEADER_COMPONENT)
|
|
106
93
|
: undefined,
|
|
107
94
|
);
|
|
108
95
|
|
|
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
|
-
|
|
127
96
|
const fetchedBlockTypes = ref<PreviewBlockTypes>();
|
|
128
97
|
const blockTypes = computed(() => props.blockTypes ?? fetchedBlockTypes.value);
|
|
129
98
|
const tree = computed(() => (embed ? embed.tree.value : props.tree));
|
|
@@ -134,14 +103,6 @@ const isPadded = computed(
|
|
|
134
103
|
() => embed?.padding.value ?? (props.embed || props.padding),
|
|
135
104
|
);
|
|
136
105
|
|
|
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
|
-
|
|
145
106
|
const resolved = computed<PreviewResolvedNode[]>(() =>
|
|
146
107
|
tree.value && blockTypes.value
|
|
147
108
|
? resolvePreviewTree(tree.value, blockTypes.value)
|
|
@@ -175,11 +136,6 @@ function toPageComponent(node: PreviewResolvedNode): ResolvedComponentInfo {
|
|
|
175
136
|
|
|
176
137
|
const components = computed(() => resolved.value.map(toPageComponent));
|
|
177
138
|
|
|
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
|
-
|
|
183
139
|
function describeIssue(issue: PreviewIssue): string {
|
|
184
140
|
return t(`dms.block_preview.${issue.key}`, {
|
|
185
141
|
name: issue.name,
|
|
@@ -218,7 +174,7 @@ onMounted(async () => {
|
|
|
218
174
|
data-dms-block-preview
|
|
219
175
|
:data-dms-preview-transparent="isTransparent || undefined"
|
|
220
176
|
:data-dms-inspecting="embed?.inspecting.value || undefined"
|
|
221
|
-
:class="
|
|
177
|
+
:class="{ 'p-4 sm:p-6': isPadded }"
|
|
222
178
|
>
|
|
223
179
|
<component
|
|
224
180
|
:is="headerComponent"
|
|
@@ -238,17 +194,11 @@ onMounted(async () => {
|
|
|
238
194
|
>
|
|
239
195
|
{{ t("dms.block_preview.empty") }}
|
|
240
196
|
</p>
|
|
241
|
-
<div
|
|
242
|
-
v-else
|
|
243
|
-
:key="revision"
|
|
244
|
-
class="dms-page-stack space-y-6"
|
|
245
|
-
:class="fillClass"
|
|
246
|
-
>
|
|
197
|
+
<div v-else :key="revision" class="dms-page-stack space-y-6">
|
|
247
198
|
<div
|
|
248
199
|
v-for="component in components"
|
|
249
200
|
:key="component.id"
|
|
250
201
|
class="empty:hidden"
|
|
251
|
-
:class="component.id === fillingId && FILL_COLUMN_CLASS"
|
|
252
202
|
data-dms-preview-block
|
|
253
203
|
>
|
|
254
204
|
<DmsRecursiveComponent
|
|
@@ -12,6 +12,8 @@ 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);
|
|
15
17
|
</script>
|
|
16
18
|
|
|
17
19
|
<template>
|
|
@@ -21,6 +23,7 @@ const data = readQueryValue(route.query.data);
|
|
|
21
23
|
:name="name"
|
|
22
24
|
:initial-width="isMockupWidth(width) ? width : undefined"
|
|
23
25
|
:initial-data="isMockupDataMode(data) ? data : undefined"
|
|
26
|
+
:initial-tenancy="{ saas: tenancy === 'saas', tenant }"
|
|
24
27
|
/>
|
|
25
28
|
<div v-else class="p-4 sm:p-6">
|
|
26
29
|
<MockupIndex :base-path="route.path" />
|
|
@@ -27,10 +27,7 @@ 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 {
|
|
31
|
-
fieldErrorMessage,
|
|
32
|
-
resolveFieldErrors,
|
|
33
|
-
} from "#dms-core/app/composables/useFieldErrors";
|
|
30
|
+
import { resolveFieldErrors } from "#dms-core/app/composables/useFieldErrors";
|
|
34
31
|
|
|
35
32
|
interface ConfirmModalProps {
|
|
36
33
|
title: string;
|
|
@@ -270,9 +267,12 @@ function showFieldErrors(
|
|
|
270
267
|
});
|
|
271
268
|
if (resolved.fields.length === 0) return false;
|
|
272
269
|
fieldErrors.value = Object.fromEntries(
|
|
273
|
-
resolved.fields.map((
|
|
274
|
-
|
|
275
|
-
|
|
270
|
+
resolved.fields.map(({ field, message, params, fallbackKey }) => [
|
|
271
|
+
field,
|
|
272
|
+
resolveError(message, {
|
|
273
|
+
fallbackKey: fallbackKey ?? "dms.field_errors.invalid",
|
|
274
|
+
params,
|
|
275
|
+
})?.message,
|
|
276
276
|
]),
|
|
277
277
|
);
|
|
278
278
|
return !resolved.hasUnmatched;
|
|
@@ -15,7 +15,10 @@ 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
|
-
|
|
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)";
|
|
19
22
|
|
|
20
23
|
const ZOOM_RESET_LEVEL = 1;
|
|
21
24
|
const ZOOM_TRANSITION_MS = 200;
|
|
@@ -102,9 +105,9 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
102
105
|
nodeTypes: undefined,
|
|
103
106
|
edgeTypes: undefined,
|
|
104
107
|
grid: "dots",
|
|
105
|
-
gridGap:
|
|
106
|
-
gridSize:
|
|
107
|
-
gridColor:
|
|
108
|
+
gridGap: DMS_GRID_GAP,
|
|
109
|
+
gridSize: DMS_GRID_DOT_SIZE,
|
|
110
|
+
gridColor: DMS_GRID_COLOR,
|
|
108
111
|
controls: true,
|
|
109
112
|
minimap: false,
|
|
110
113
|
fitViewOnInit: true,
|
|
@@ -38,10 +38,6 @@ const {
|
|
|
38
38
|
emitFormInput,
|
|
39
39
|
} = useFormField(props);
|
|
40
40
|
|
|
41
|
-
const countryId = computed(() =>
|
|
42
|
-
id.value ? `${id.value}-country` : undefined,
|
|
43
|
-
);
|
|
44
|
-
|
|
45
41
|
const isStrict = computed(
|
|
46
42
|
() => !!props.requiredPrefix || !!props.defaultCountry,
|
|
47
43
|
);
|
|
@@ -122,7 +118,6 @@ const selected = computed(() =>
|
|
|
122
118
|
<template>
|
|
123
119
|
<div class="flex w-full">
|
|
124
120
|
<USelectMenu
|
|
125
|
-
:id="countryId"
|
|
126
121
|
:model-value="country"
|
|
127
122
|
:items="countryItems"
|
|
128
123
|
value-key="value"
|