@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
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
import type { JsonValue } from "../../../../../dms-core/app/types/json";
|
|
10
10
|
import {
|
|
11
11
|
parsePreviewOutboundMessage,
|
|
12
|
-
previewCaptureRequestMessage,
|
|
13
12
|
type PreviewBlockRect,
|
|
14
13
|
type PreviewInboundMessage,
|
|
15
14
|
type PreviewOutboundMessage,
|
|
@@ -31,6 +30,8 @@ interface PreviewFrameOptions {
|
|
|
31
30
|
onText?: (text: PreviewTextMessage) => void;
|
|
32
31
|
/** An entry of the preview's sidebar, or a link to a page of the mockup, was picked: the page's id, and the row a link from a row passes. */
|
|
33
32
|
onNavigate?: (id: string, record?: string) => void;
|
|
33
|
+
/** The preview's workspace switcher picked a tenant, by its id. */
|
|
34
|
+
onTenant?: (id: string) => void;
|
|
34
35
|
/** Escape was pressed in the preview, and nothing of its page took it. */
|
|
35
36
|
onEscape?: () => void;
|
|
36
37
|
/** The preview's sidebar changed its sections. */
|
|
@@ -44,21 +45,6 @@ export interface PreviewFrame {
|
|
|
44
45
|
isReady: Ref<boolean>;
|
|
45
46
|
/** Hands the preview a message; dropped until the preview is ready. */
|
|
46
47
|
post: (message: PreviewInboundMessage) => void;
|
|
47
|
-
/**
|
|
48
|
-
* Has the preview draw its frame to an image, as it is now. It rejects when
|
|
49
|
-
* the preview is not ready, fails to draw, is replaced or goes away, or
|
|
50
|
-
* does not answer within {@link CAPTURE_TIMEOUT_MS}.
|
|
51
|
-
*/
|
|
52
|
-
capture: () => Promise<Blob>;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** How long a capture waits for the preview's answer: its page may still be loading data, which it waits for. */
|
|
56
|
-
export const CAPTURE_TIMEOUT_MS = 30_000;
|
|
57
|
-
|
|
58
|
-
/** A `capture` request waiting for its answer. */
|
|
59
|
-
interface PendingCapture {
|
|
60
|
-
resolve: (image: Blob) => void;
|
|
61
|
-
reject: (reason: Error) => void;
|
|
62
48
|
}
|
|
63
49
|
|
|
64
50
|
/**
|
|
@@ -72,13 +58,6 @@ interface PendingCapture {
|
|
|
72
58
|
export function usePreviewFrame(options: PreviewFrameOptions): PreviewFrame {
|
|
73
59
|
const height = ref<number>();
|
|
74
60
|
const isReady = ref(false);
|
|
75
|
-
const pending = new Map<number, PendingCapture>();
|
|
76
|
-
let lastCaptureId = 0;
|
|
77
|
-
|
|
78
|
-
function settleCaptures(reason: Error): void {
|
|
79
|
-
for (const capture of pending.values()) capture.reject(reason);
|
|
80
|
-
pending.clear();
|
|
81
|
-
}
|
|
82
61
|
|
|
83
62
|
const handlers: Record<
|
|
84
63
|
PreviewOutboundMessage["type"],
|
|
@@ -92,13 +71,6 @@ export function usePreviewFrame(options: PreviewFrameOptions): PreviewFrame {
|
|
|
92
71
|
if (message.type === "resize") height.value = message.height;
|
|
93
72
|
},
|
|
94
73
|
error: () => {},
|
|
95
|
-
capture: (message) => {
|
|
96
|
-
if (message.type !== "capture") return;
|
|
97
|
-
const waiting = pending.get(message.id);
|
|
98
|
-
pending.delete(message.id);
|
|
99
|
-
if ("image" in message) waiting?.resolve(message.image);
|
|
100
|
-
else waiting?.reject(new Error(message.error));
|
|
101
|
-
},
|
|
102
74
|
select: (message) => {
|
|
103
75
|
if (message.type === "select") options.onSelect(message.path);
|
|
104
76
|
},
|
|
@@ -114,6 +86,9 @@ export function usePreviewFrame(options: PreviewFrameOptions): PreviewFrame {
|
|
|
114
86
|
options.onNavigate?.(message.id, message.record);
|
|
115
87
|
}
|
|
116
88
|
},
|
|
89
|
+
tenant: (message) => {
|
|
90
|
+
if (message.type === "tenant") options.onTenant?.(message.id);
|
|
91
|
+
},
|
|
117
92
|
escape: () => options.onEscape?.(),
|
|
118
93
|
"section-edit": (message) => {
|
|
119
94
|
if (message.type === "section-edit")
|
|
@@ -136,49 +111,19 @@ export function usePreviewFrame(options: PreviewFrameOptions): PreviewFrame {
|
|
|
136
111
|
|
|
137
112
|
watch(options.frame, () => {
|
|
138
113
|
isReady.value = false;
|
|
139
|
-
settleCaptures(new Error("The preview was replaced"));
|
|
140
114
|
});
|
|
141
115
|
onMounted(() => window.addEventListener("message", onMessage));
|
|
142
|
-
onBeforeUnmount(() =>
|
|
143
|
-
window.removeEventListener("message", onMessage);
|
|
144
|
-
settleCaptures(new Error("The preview is gone"));
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
function post(message: PreviewInboundMessage): void {
|
|
148
|
-
if (!isReady.value) return;
|
|
149
|
-
options.frame.value?.contentWindow?.postMessage(
|
|
150
|
-
message,
|
|
151
|
-
window.location.origin,
|
|
152
|
-
);
|
|
153
|
-
}
|
|
116
|
+
onBeforeUnmount(() => window.removeEventListener("message", onMessage));
|
|
154
117
|
|
|
155
118
|
return {
|
|
156
119
|
height,
|
|
157
120
|
isReady,
|
|
158
|
-
post
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
lastCaptureId += 1;
|
|
166
|
-
const id = lastCaptureId;
|
|
167
|
-
const timer = setTimeout(() => {
|
|
168
|
-
pending.delete(id);
|
|
169
|
-
reject(new Error("The preview did not answer"));
|
|
170
|
-
}, CAPTURE_TIMEOUT_MS);
|
|
171
|
-
pending.set(id, {
|
|
172
|
-
resolve: (image) => {
|
|
173
|
-
clearTimeout(timer);
|
|
174
|
-
resolve(image);
|
|
175
|
-
},
|
|
176
|
-
reject: (reason) => {
|
|
177
|
-
clearTimeout(timer);
|
|
178
|
-
reject(reason);
|
|
179
|
-
},
|
|
180
|
-
});
|
|
181
|
-
post(previewCaptureRequestMessage(id));
|
|
182
|
-
}),
|
|
121
|
+
post: (message) => {
|
|
122
|
+
if (!isReady.value) return;
|
|
123
|
+
options.frame.value?.contentWindow?.postMessage(
|
|
124
|
+
message,
|
|
125
|
+
window.location.origin,
|
|
126
|
+
);
|
|
127
|
+
},
|
|
183
128
|
};
|
|
184
129
|
}
|
|
@@ -33,19 +33,11 @@ function isRecord(
|
|
|
33
33
|
return isObject(value) && value !== null;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/** The
|
|
37
|
-
|
|
38
|
-
url: URL;
|
|
39
|
-
/** Set when the router fetches the page ahead, on hover, without opening it. */
|
|
40
|
-
prefetch: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/** The visit an Inertia `before` event announces. */
|
|
44
|
-
function visitOf(event: Event): PendingVisit | undefined {
|
|
36
|
+
/** The URL an Inertia visit goes to, as its `before` event carries it. */
|
|
37
|
+
function visitUrlOf(event: Event): URL | undefined {
|
|
45
38
|
if (!(event instanceof CustomEvent) || !isRecord(event.detail)) return;
|
|
46
39
|
const visit = event.detail.visit;
|
|
47
|
-
|
|
48
|
-
return { url: visit.url, prefetch: visit.prefetch === true };
|
|
40
|
+
return isRecord(visit) && visit.url instanceof URL ? visit.url : undefined;
|
|
49
41
|
}
|
|
50
42
|
|
|
51
43
|
/** The page of the mockup the link under `target` opens, when it is one. */
|
|
@@ -69,8 +61,7 @@ function isPlainClick(event: MouseEvent): boolean {
|
|
|
69
61
|
/**
|
|
70
62
|
* Keeps the preview on its page, as a frame of the mockup viewer: a visit to
|
|
71
63
|
* another page is cancelled, and when it goes to a page of the mockup, the
|
|
72
|
-
* embedding page opens that page instead. A
|
|
73
|
-
* cancelled and opens nothing. A plain click on a link to a page of
|
|
64
|
+
* embedding page opens that page instead. A plain click on a link to a page of
|
|
74
65
|
* the mockup does the same while the page is not inspected; an Inertia link
|
|
75
66
|
* would visit it, a plain anchor would load it in the frame. Escape is handed
|
|
76
67
|
* to the embedding page when no menu or dialog of the page is open.
|
|
@@ -81,11 +72,10 @@ export function usePreviewLinks(options: PreviewLinksOptions): PreviewLinks {
|
|
|
81
72
|
}
|
|
82
73
|
|
|
83
74
|
function onVisit(event: Event): void {
|
|
84
|
-
const
|
|
85
|
-
if (!
|
|
75
|
+
const url = visitUrlOf(event);
|
|
76
|
+
if (!url || url.pathname === window.location.pathname) return;
|
|
86
77
|
event.preventDefault();
|
|
87
|
-
|
|
88
|
-
const link = mockupLinkOf(visit.url.href, window.location.href);
|
|
78
|
+
const link = mockupLinkOf(url.href, window.location.href);
|
|
89
79
|
if (link) follow(link);
|
|
90
80
|
}
|
|
91
81
|
|
|
@@ -45,12 +45,6 @@ const REQUEST_FREE_INPUTS: ReadonlyMap<string, ReadonlySet<string>> = new Map(
|
|
|
45
45
|
"dms-input-number": NUMBER_KEYS,
|
|
46
46
|
"dms-input-percentage": NUMBER_KEYS,
|
|
47
47
|
"dms-input-phone": ["placeholder", "requiredPrefix", "defaultCountry"],
|
|
48
|
-
"dms-input-identifier": [
|
|
49
|
-
"identifier",
|
|
50
|
-
"placeholder",
|
|
51
|
-
"defaultCountry",
|
|
52
|
-
"country",
|
|
53
|
-
],
|
|
54
48
|
"dms-input-password": [
|
|
55
49
|
"placeholder",
|
|
56
50
|
"minLength",
|
package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDisplayComponents.ts
CHANGED
|
@@ -12,10 +12,6 @@ export const CascaderPath = defineAsyncComponent(
|
|
|
12
12
|
() => import("../../../components/table-view/CascaderPath.vue"),
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
export const RepeaterTable = defineAsyncComponent(
|
|
16
|
-
() => import("../../../components/form/components/RepeaterTable.vue"),
|
|
17
|
-
);
|
|
18
|
-
|
|
19
15
|
export const DisplayRichText = defineAsyncComponent(
|
|
20
16
|
() => import("../../../components/form/components/DisplayRichText.vue"),
|
|
21
17
|
);
|
package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts
CHANGED
|
@@ -12,10 +12,6 @@ import {
|
|
|
12
12
|
import { formatDuration } from "#dms-core/app/utils/formatter";
|
|
13
13
|
import { withNumberSuffix } from "./numberSuffix";
|
|
14
14
|
import { formatPhone } from "../../utils/phoneNumber";
|
|
15
|
-
import {
|
|
16
|
-
formatIdentifier,
|
|
17
|
-
type IdentifierKind,
|
|
18
|
-
} from "../../utils/legalIdentifier";
|
|
19
15
|
import { DMS_TONE_TEXT } from "../../utils/tone";
|
|
20
16
|
import { getAppTranslation } from "../../../../../dms-core/app/composables/translation/useTranslation";
|
|
21
17
|
|
|
@@ -104,31 +100,6 @@ function renderText(
|
|
|
104
100
|
return h("span", { class: DMS_TONE_TEXT[tone] }, [childOf(value)]);
|
|
105
101
|
}
|
|
106
102
|
|
|
107
|
-
const IDENTIFIER_KINDS: readonly IdentifierKind[] = [
|
|
108
|
-
"iban",
|
|
109
|
-
"bic",
|
|
110
|
-
"vat_number",
|
|
111
|
-
"company_number",
|
|
112
|
-
];
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* An identifier as it is printed (an IBAN in groups of four, a company
|
|
116
|
-
* number as its country writes it), read with its input's `country`.
|
|
117
|
-
*/
|
|
118
|
-
function formatIdentifierCell(
|
|
119
|
-
value: CellValue,
|
|
120
|
-
identifier: IdentifierKind,
|
|
121
|
-
options: CellOptions,
|
|
122
|
-
): ReturnType<DataTypeFormatter> {
|
|
123
|
-
if (value === "") return null;
|
|
124
|
-
if (!isString(value)) return value;
|
|
125
|
-
const country =
|
|
126
|
-
isObject(options) && isString(options.country)
|
|
127
|
-
? options.country
|
|
128
|
-
: undefined;
|
|
129
|
-
return formatIdentifier(value, { identifier, country });
|
|
130
|
-
}
|
|
131
|
-
|
|
132
103
|
export const registerPrimitiveTypes = (
|
|
133
104
|
registerDataType: (dataType: DataType) => void,
|
|
134
105
|
) => {
|
|
@@ -150,15 +121,6 @@ export const registerPrimitiveTypes = (
|
|
|
150
121
|
},
|
|
151
122
|
},
|
|
152
123
|
});
|
|
153
|
-
for (const identifier of IDENTIFIER_KINDS) {
|
|
154
|
-
registerDataType({
|
|
155
|
-
id: identifier,
|
|
156
|
-
formatter: {
|
|
157
|
-
default: (value, _locale, options) =>
|
|
158
|
-
formatIdentifierCell(value, identifier, options),
|
|
159
|
-
},
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
124
|
registerDataType({
|
|
163
125
|
id: "price",
|
|
164
126
|
formatter: { default: withNumberSuffix(formatPrice) },
|
|
@@ -4,14 +4,6 @@ import type {
|
|
|
4
4
|
DataTypeFormatter,
|
|
5
5
|
} from "#dms-core/app/composables/data-types/useDataType";
|
|
6
6
|
import { isObject, isString } from "#dms-core/app/utils/type-check";
|
|
7
|
-
import { processFieldI18n } from "../../utils/fieldOptionsI18n";
|
|
8
|
-
import {
|
|
9
|
-
type KeyValueColumnOptions,
|
|
10
|
-
keyValueColumns,
|
|
11
|
-
keyValueRows,
|
|
12
|
-
} from "../form/keyValueRows";
|
|
13
|
-
import type { RepeaterTableColumn } from "../form/repeaterTable";
|
|
14
|
-
import { RepeaterTable } from "./defaultDisplayComponents";
|
|
15
7
|
import { getAppTranslation } from "../../../../../dms-core/app/composables/translation/useTranslation";
|
|
16
8
|
|
|
17
9
|
const SECRET_TAIL = 4;
|
|
@@ -20,8 +12,6 @@ const TAG_CLASS =
|
|
|
20
12
|
"inline-flex h-5 items-center rounded-[5px] border border-default bg-elevated px-1.5 text-[11.5px]";
|
|
21
13
|
const TAGS_CLASS = "inline-flex flex-wrap items-center gap-1";
|
|
22
14
|
const CODE_CLASS = "font-mono text-[12px] truncate";
|
|
23
|
-
const CODE_FULL_CLASS =
|
|
24
|
-
"font-mono text-[12px] wrap-anywhere whitespace-pre-wrap";
|
|
25
15
|
|
|
26
16
|
const countOf = (value: Parameters<DataTypeFormatter>[0]): number => {
|
|
27
17
|
if (Array.isArray(value)) return value.length;
|
|
@@ -37,49 +27,6 @@ function renderCount(key: string) {
|
|
|
37
27
|
};
|
|
38
28
|
}
|
|
39
29
|
|
|
40
|
-
/** The options of a field's control, with their texts in the reader's language. */
|
|
41
|
-
function translatedOptions<O extends object>(options: O): O {
|
|
42
|
-
const { processI18n } = getAppTranslation();
|
|
43
|
-
return processFieldI18n({ component: { options } }, processI18n).component
|
|
44
|
-
.options;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const renderArrayCount = renderCount("dms.form.repeater.count");
|
|
48
|
-
const renderPairCount = renderCount("dms.form.key_value.count");
|
|
49
|
-
|
|
50
|
-
function isRow(
|
|
51
|
-
item: Parameters<DataTypeFormatter>[0],
|
|
52
|
-
): item is NonNullable<Parameters<DataTypeFormatter>[3]> {
|
|
53
|
-
return !!item && isObject(item);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function renderArrayRows(
|
|
57
|
-
value: Parameters<DataTypeFormatter>[0],
|
|
58
|
-
options: Parameters<DataTypeFormatter>[2],
|
|
59
|
-
) {
|
|
60
|
-
const { columns }: { columns?: RepeaterTableColumn[] } = translatedOptions(
|
|
61
|
-
options ?? {},
|
|
62
|
-
);
|
|
63
|
-
const rows = Array.isArray(value) ? value.filter(isRow) : [];
|
|
64
|
-
if (!columns || rows.length === 0) return renderArrayCount(value);
|
|
65
|
-
return h(RepeaterTable, { columns, rows });
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function renderPairs(
|
|
69
|
-
value: Parameters<DataTypeFormatter>[0],
|
|
70
|
-
options: Parameters<DataTypeFormatter>[2],
|
|
71
|
-
) {
|
|
72
|
-
const { value: valueField, ...rest }: Partial<KeyValueColumnOptions> =
|
|
73
|
-
translatedOptions(options ?? {});
|
|
74
|
-
if (!valueField || !value || !isObject(value) || countOf(value) === 0)
|
|
75
|
-
return renderPairCount(value);
|
|
76
|
-
const { t } = getAppTranslation();
|
|
77
|
-
return h(RepeaterTable, {
|
|
78
|
-
columns: keyValueColumns({ ...rest, value: valueField }, t),
|
|
79
|
-
rows: keyValueRows(value, rest.toggleable).map((row) => ({ ...row })),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
30
|
function renderSecret(value: Parameters<DataTypeFormatter>[0]): string {
|
|
84
31
|
return isString(value) && value
|
|
85
32
|
? `${SECRET_MASK}${value.slice(-SECRET_TAIL)}`
|
|
@@ -92,10 +39,6 @@ function renderCode(value: Parameters<DataTypeFormatter>[0]) {
|
|
|
92
39
|
return h("span", { class: CODE_CLASS, title: value }, firstLine);
|
|
93
40
|
}
|
|
94
41
|
|
|
95
|
-
function renderFullCode(value: Parameters<DataTypeFormatter>[0]) {
|
|
96
|
-
return isString(value) ? h("pre", { class: CODE_FULL_CLASS }, value) : "";
|
|
97
|
-
}
|
|
98
|
-
|
|
99
42
|
function renderTags(value: Parameters<DataTypeFormatter>[0]) {
|
|
100
43
|
if (!Array.isArray(value)) return "";
|
|
101
44
|
return h(
|
|
@@ -111,22 +54,13 @@ export function registerFieldTypes(
|
|
|
111
54
|
): void {
|
|
112
55
|
registerDataType({
|
|
113
56
|
id: "array",
|
|
114
|
-
formatter: {
|
|
115
|
-
default: renderArrayCount,
|
|
116
|
-
full: (value, _locale, options) => renderArrayRows(value, options),
|
|
117
|
-
},
|
|
57
|
+
formatter: { default: renderCount("dms.form.repeater.count") },
|
|
118
58
|
});
|
|
119
59
|
registerDataType({
|
|
120
60
|
id: "key_value",
|
|
121
|
-
formatter: {
|
|
122
|
-
default: renderPairCount,
|
|
123
|
-
full: (value, _locale, options) => renderPairs(value, options),
|
|
124
|
-
},
|
|
61
|
+
formatter: { default: renderCount("dms.form.key_value.count") },
|
|
125
62
|
});
|
|
126
63
|
registerDataType({ id: "secret", formatter: { default: renderSecret } });
|
|
127
|
-
registerDataType({
|
|
128
|
-
id: "code",
|
|
129
|
-
formatter: { default: renderCode, full: renderFullCode },
|
|
130
|
-
});
|
|
64
|
+
registerDataType({ id: "code", formatter: { default: renderCode } });
|
|
131
65
|
registerDataType({ id: "tags", formatter: { default: renderTags } });
|
|
132
66
|
}
|
package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { h, type VNodeChild } from "vue";
|
|
2
2
|
import { get } from "@nuxt/ui/runtime/utils/index.js";
|
|
3
|
-
import type {
|
|
4
|
-
DataType,
|
|
5
|
-
DataTypeFormatter,
|
|
6
|
-
} from "#dms-core/app/composables/data-types/useDataType";
|
|
3
|
+
import type { DataTypeFormatter } from "#dms-core/app/composables/data-types/useDataType";
|
|
7
4
|
import { isNumber, isString } from "#dms-core/app/utils/type-check";
|
|
8
5
|
import { childOf } from "./cellHelpers";
|
|
9
6
|
|
|
@@ -40,19 +37,8 @@ const DATE_CELL_CLASS = "font-mono text-xs text-muted tabular-nums";
|
|
|
40
37
|
const DEFAULT_FALLBACK = "-";
|
|
41
38
|
const DETAIL_FALLBACK = "—";
|
|
42
39
|
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
* that shows the whole value gets the `full` one.
|
|
46
|
-
*/
|
|
47
|
-
export type ColumnValueSurface = "cell" | "detail" | "full";
|
|
48
|
-
|
|
49
|
-
function formatterFor(
|
|
50
|
-
formatter: DataType["formatter"],
|
|
51
|
-
surface: ColumnValueSurface,
|
|
52
|
-
): DataTypeFormatter | undefined {
|
|
53
|
-
const own = surface === "detail" ? undefined : formatter?.[surface];
|
|
54
|
-
return own ?? formatter?.default;
|
|
55
|
-
}
|
|
40
|
+
/** Where a value is drawn: a grid cell gets the `cell` formatter first. */
|
|
41
|
+
export type ColumnValueSurface = "cell" | "detail";
|
|
56
42
|
|
|
57
43
|
function renderEmptyFallback(
|
|
58
44
|
options: ResolvedColumnRenderer["options"],
|
|
@@ -61,7 +47,7 @@ function renderEmptyFallback(
|
|
|
61
47
|
): VNodeChild {
|
|
62
48
|
const fallback =
|
|
63
49
|
childOf(options?.fallback) ??
|
|
64
|
-
(surface === "
|
|
50
|
+
(surface === "detail" ? DETAIL_FALLBACK : DEFAULT_FALLBACK);
|
|
65
51
|
return isNumeric
|
|
66
52
|
? h("span", { class: NUMERIC_EMPTY_CELL_CLASS }, fallback)
|
|
67
53
|
: fallback;
|
|
@@ -102,7 +88,7 @@ export function useColumnValueRenderer() {
|
|
|
102
88
|
surface: ColumnValueSurface = "cell",
|
|
103
89
|
): VNodeChild => {
|
|
104
90
|
const { typeId, options } = resolveRenderer(column);
|
|
105
|
-
const isNumeric =
|
|
91
|
+
const isNumeric = isNumericColumn(column);
|
|
106
92
|
const formatter = typeId ? getDataType(typeId)?.formatter : undefined;
|
|
107
93
|
|
|
108
94
|
if (value === null || value === undefined) {
|
|
@@ -112,7 +98,8 @@ export function useColumnValueRenderer() {
|
|
|
112
98
|
return renderEmptyFallback(options, surface, isNumeric);
|
|
113
99
|
}
|
|
114
100
|
|
|
115
|
-
const format =
|
|
101
|
+
const format =
|
|
102
|
+
(surface === "cell" ? formatter?.cell : undefined) ?? formatter?.default;
|
|
116
103
|
const formatted = format
|
|
117
104
|
? format(value, locale.value, options, row)
|
|
118
105
|
: value;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { RepeaterTableColumn } from "./repeaterTable";
|
|
2
|
-
|
|
3
1
|
/** A pair as the key-value editor shows it: a row of the repeater. */
|
|
4
2
|
export interface KeyValueRow {
|
|
5
3
|
key?: string;
|
|
@@ -8,22 +6,12 @@ export interface KeyValueRow {
|
|
|
8
6
|
enabled?: boolean;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
|
-
/** The options of a key-value editor its columns come from. */
|
|
12
|
-
export interface KeyValueColumnOptions {
|
|
13
|
-
value: Pick<RepeaterTableColumn, "type" | "component">;
|
|
14
|
-
toggleable?: boolean;
|
|
15
|
-
keyLabel?: string;
|
|
16
|
-
valueLabel?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
9
|
/** A pair's value in a `toggleable` editor. */
|
|
20
10
|
interface ToggledValue {
|
|
21
11
|
value: unknown;
|
|
22
12
|
enabled: boolean;
|
|
23
13
|
}
|
|
24
14
|
|
|
25
|
-
const KEY_COMPONENT = { componentName: "dms-input-text" };
|
|
26
|
-
const TOGGLE_COMPONENT = { componentName: "dms-input-checkbox" };
|
|
27
15
|
const KEY_MISSING = "$dms.field_errors.key_missing";
|
|
28
16
|
const KEY_DUPLICATE = "$dms.field_errors.key_duplicate";
|
|
29
17
|
|
|
@@ -33,30 +21,6 @@ const isBlank = (value: KeyValueRow["value"]): boolean =>
|
|
|
33
21
|
const isUnfilled = (row: KeyValueRow): boolean =>
|
|
34
22
|
!nameOf(row) && isBlank(row.value);
|
|
35
23
|
|
|
36
|
-
/** The columns of a key-value list: the box of a `toggleable` one, the name, the value. */
|
|
37
|
-
export function keyValueColumns(
|
|
38
|
-
options: KeyValueColumnOptions,
|
|
39
|
-
t: (key: string) => string,
|
|
40
|
-
): RepeaterTableColumn[] {
|
|
41
|
-
return [
|
|
42
|
-
...(options.toggleable
|
|
43
|
-
? [{ id: "enabled", type: "boolean", component: TOGGLE_COMPONENT }]
|
|
44
|
-
: []),
|
|
45
|
-
{
|
|
46
|
-
id: "key",
|
|
47
|
-
label: options.keyLabel || t("dms.form.key_value.key"),
|
|
48
|
-
type: "string",
|
|
49
|
-
component: KEY_COMPONENT,
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: "value",
|
|
53
|
-
label: options.valueLabel || t("dms.form.key_value.value"),
|
|
54
|
-
type: options.value.type,
|
|
55
|
-
component: options.value.component,
|
|
56
|
-
},
|
|
57
|
-
];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
24
|
/** The rows of a key-value object, in its order. */
|
|
61
25
|
export function keyValueRows(
|
|
62
26
|
value: Record<string, KeyValueRow["value"]> | null | undefined,
|
|
@@ -9,11 +9,10 @@ import type { TableViewScope } from "./tableViewScope";
|
|
|
9
9
|
export function useTableViewRows<T extends Data>(
|
|
10
10
|
scope: Pick<
|
|
11
11
|
TableViewScope<T>,
|
|
12
|
-
"configuration" | "arrival" | "props" | "deferred"
|
|
12
|
+
"configuration" | "arrival" | "props" | "deferred"
|
|
13
13
|
>,
|
|
14
14
|
) {
|
|
15
15
|
const { location } = scope.configuration;
|
|
16
|
-
const pinsGroups = !!scope.displayOptions.groupedOptions?.pinned;
|
|
17
16
|
const { route } = scope.arrival;
|
|
18
17
|
const { props } = scope;
|
|
19
18
|
const { deferred } = scope;
|
|
@@ -30,9 +29,7 @@ export function useTableViewRows<T extends Data>(
|
|
|
30
29
|
}),
|
|
31
30
|
|
|
32
31
|
pinnedRows: () =>
|
|
33
|
-
deferred.isGroupedDisplay.value
|
|
34
|
-
? undefined
|
|
35
|
-
: props.pinnedRows,
|
|
32
|
+
deferred.isGroupedDisplay.value ? undefined : props.pinnedRows,
|
|
36
33
|
});
|
|
37
34
|
return { $authFetch, tableRows };
|
|
38
35
|
}
|
|
@@ -49,12 +46,8 @@ export function useTableViewQuery<T extends Data>(
|
|
|
49
46
|
>,
|
|
50
47
|
) {
|
|
51
48
|
const { paginationState } = scope.urlFilters;
|
|
52
|
-
const {
|
|
53
|
-
|
|
54
|
-
effectiveColumnFilters,
|
|
55
|
-
effectiveGlobalFilter,
|
|
56
|
-
groupOrder,
|
|
57
|
-
} = scope.querySorting;
|
|
49
|
+
const { effectiveSorting, effectiveColumnFilters, effectiveGlobalFilter } =
|
|
50
|
+
scope.querySorting;
|
|
58
51
|
const { hiddenFilters } = scope.queryFilters;
|
|
59
52
|
const { showArchived } = scope.filterState;
|
|
60
53
|
const { archiveMode } = scope.configuration;
|
|
@@ -80,7 +73,6 @@ export function useTableViewQuery<T extends Data>(
|
|
|
80
73
|
columnFilters: effectiveColumnFilters.value,
|
|
81
74
|
hiddenFilters: hiddenFilters.value,
|
|
82
75
|
globalFilter: effectiveGlobalFilter.value,
|
|
83
|
-
groupOrder: groupOrder.value,
|
|
84
76
|
}),
|
|
85
77
|
);
|
|
86
78
|
const archiveQuery = computed(() =>
|
|
@@ -108,10 +100,8 @@ export function useTableViewListState<T extends Data>(
|
|
|
108
100
|
| "groupingOptions"
|
|
109
101
|
| "querySorting"
|
|
110
102
|
| "urlFilters"
|
|
111
|
-
| "props"
|
|
112
103
|
>,
|
|
113
104
|
) {
|
|
114
|
-
const { props } = scope;
|
|
115
105
|
const { componentId, pageId } = scope.configuration;
|
|
116
106
|
const { tableRows } = scope.rows;
|
|
117
107
|
const { queryRequest, archiveQuery } = scope.query;
|
|
@@ -166,13 +156,7 @@ export function useTableViewListState<T extends Data>(
|
|
|
166
156
|
const results = shownData.value?.results;
|
|
167
157
|
const grouped = activeGroupedOptions.value;
|
|
168
158
|
return results && isGroupedDisplay.value && grouped
|
|
169
|
-
? orderGroupedRows(
|
|
170
|
-
results,
|
|
171
|
-
grouped,
|
|
172
|
-
pickedSorting.value,
|
|
173
|
-
locale.value,
|
|
174
|
-
grouped.pinned ? props.pinnedRows : undefined,
|
|
175
|
-
)
|
|
159
|
+
? orderGroupedRows(results, grouped, pickedSorting.value, locale.value)
|
|
176
160
|
: results;
|
|
177
161
|
});
|
|
178
162
|
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
} from "./utils/sortableColumns";
|
|
14
14
|
import {
|
|
15
15
|
groupedOptionsFor,
|
|
16
|
-
groupValueOrder,
|
|
17
16
|
listTableSorting,
|
|
18
17
|
pickedTableSorting,
|
|
19
18
|
type TableSortingInput,
|
|
@@ -138,11 +137,9 @@ export function useTableViewQuerySorting<T extends Data>(
|
|
|
138
137
|
| "displayOptions"
|
|
139
138
|
| "groupingOptions"
|
|
140
139
|
| "defaultSorting"
|
|
141
|
-
| "configuration"
|
|
142
140
|
>,
|
|
143
141
|
) {
|
|
144
142
|
const { activeCapabilities, reorderConfig } = scope.displayComponent;
|
|
145
|
-
const { allColumns } = scope.configuration;
|
|
146
143
|
const { columnFilters, globalFilterDebounced } = scope.filterState;
|
|
147
144
|
const { activeDisplayId, groupedOptions } = scope.displayOptions;
|
|
148
145
|
const { activeGroupedOptions, sortableIds } = scope.groupingOptions;
|
|
@@ -174,13 +171,8 @@ export function useTableViewQuerySorting<T extends Data>(
|
|
|
174
171
|
? listed
|
|
175
172
|
: sanitizeSorting(listed, sortableIds.value);
|
|
176
173
|
});
|
|
177
|
-
const groupOrder = computed(() => {
|
|
178
|
-
const grouped = sortingInput.value.grouped;
|
|
179
|
-
return grouped && groupValueOrder(grouped, allColumns);
|
|
180
|
-
});
|
|
181
174
|
return {
|
|
182
175
|
isGroupedDisplay,
|
|
183
|
-
groupOrder,
|
|
184
176
|
effectiveSorting,
|
|
185
177
|
effectiveColumnFilters,
|
|
186
178
|
effectiveGlobalFilter,
|