@antelopejs/dms 0.25.8-next.1175.g5f8cc4d → 0.25.8
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 +48 -0
- package/README.md +2 -2
- package/data/mockup-example/spec.json +0 -11
- package/data/mockup-spec.schema.json +16 -399
- package/dist/e2e/index.d.mts +1 -2
- package/dist/implementations/dms-builder/engine/table-view-settings.js +33 -9
- package/dist/implementations/dms-builder/engine/table-view-settings.js.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +0 -2
- package/dist/mcp/index.js +0 -9
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/page-verify/index.d.ts +0 -15
- package/dist/mcp/page-verify/index.js +6 -16
- package/dist/mcp/page-verify/index.js.map +1 -1
- package/dist/mcp/page-verify/mockup.d.ts +1 -3
- package/dist/mcp/page-verify/mockup.js +1 -5
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/page-verify/page-probe.d.ts +0 -5
- package/dist/mcp/page-verify/page-probe.js +0 -2
- package/dist/mcp/page-verify/page-probe.js.map +1 -1
- package/dist/mcp/page-verify/playwright.d.ts +4 -22
- package/dist/mcp/page-verify/playwright.js.map +1 -1
- package/dist/mcp/page-verify/report.d.ts +0 -1
- package/dist/mcp/tools/mockup-read-spec.js +3 -2
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
- package/dist/mcp/tools/mockup.js +0 -4
- package/dist/mcp/tools/mockup.js.map +1 -1
- package/dist/mcp/tools/page-verify.d.ts +0 -1
- package/dist/mcp/tools/page-verify.js +2 -6
- package/dist/mcp/tools/page-verify.js.map +1 -1
- package/dist/mockup/annotations.js +2 -2
- package/dist/mockup/annotations.js.map +1 -1
- package/dist/mockup/apply-notes.js +1 -1
- package/dist/mockup/apply-notes.js.map +1 -1
- package/dist/mockup/compile.d.ts +10 -6
- package/dist/mockup/compile.js +290 -31
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/files.d.ts +1 -2
- package/dist/mockup/files.js +1 -2
- package/dist/mockup/files.js.map +1 -1
- package/dist/mockup/fixture-answers.d.ts +0 -1
- package/dist/mockup/fixture-answers.js +1 -1
- package/dist/mockup/fixture-answers.js.map +1 -1
- package/dist/mockup/fixtures.d.ts +27 -0
- package/dist/mockup/fixtures.js +111 -0
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/from-page.js +9 -2
- package/dist/mockup/from-page.js.map +1 -1
- package/dist/mockup/generate.js +1 -4
- package/dist/mockup/generate.js.map +1 -1
- package/dist/mockup/history-routes.d.ts +4 -2
- package/dist/mockup/history-routes.js +36 -27
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/history.js +1 -2
- package/dist/mockup/history.js.map +1 -1
- package/dist/mockup/index.d.ts +0 -10
- package/dist/mockup/index.js +0 -10
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema-layout.d.ts +0 -1
- package/dist/mockup/json-schema-layout.js +2 -95
- package/dist/mockup/json-schema-layout.js.map +1 -1
- package/dist/mockup/json-schema.js +19 -40
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/manage-routes.d.ts +1 -3
- package/dist/mockup/manage-routes.js +1 -38
- package/dist/mockup/manage-routes.js.map +1 -1
- package/dist/mockup/manage.js +1 -1
- package/dist/mockup/manage.js.map +1 -1
- package/dist/mockup/model.d.ts +100 -137
- package/dist/mockup/model.js +86 -102
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/modules.d.ts +9 -6
- package/dist/mockup/modules.js +24 -105
- package/dist/mockup/modules.js.map +1 -1
- package/dist/mockup/presence-board.js +1 -1
- package/dist/mockup/presence-board.js.map +1 -1
- package/dist/mockup/presence-routes.js +2 -2
- package/dist/mockup/presence-routes.js.map +1 -1
- package/dist/mockup/refusals.d.ts +0 -5
- package/dist/mockup/refusals.js +0 -16
- package/dist/mockup/refusals.js.map +1 -1
- package/dist/mockup/routes.d.ts +5 -3
- package/dist/mockup/routes.js +162 -19
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/row-filters.d.ts +8 -0
- package/dist/mockup/row-filters.js +107 -0
- package/dist/mockup/row-filters.js.map +1 -0
- package/dist/mockup/sketch-limits.d.ts +0 -1
- package/dist/mockup/sketch-limits.js +1 -2
- package/dist/mockup/sketch-limits.js.map +1 -1
- package/dist/mockup/sketch.d.ts +2 -2
- package/dist/mockup/sketch.js +1 -2
- package/dist/mockup/sketch.js.map +1 -1
- package/dist/mockup/source-routes.d.ts +4 -5
- package/dist/mockup/source-routes.js +17 -26
- package/dist/mockup/source-routes.js.map +1 -1
- package/dist/mockup/source.js +1 -2
- package/dist/mockup/source.js.map +1 -1
- package/dist/mockup/store.d.ts +37 -16
- package/dist/mockup/store.js +200 -85
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/table-archive.d.ts +1 -0
- package/dist/mockup/table-archive.js +16 -0
- package/dist/mockup/table-archive.js.map +1 -1
- package/e2e/index.mjs +2 -3
- package/frontend-vue/eslint-globals.generated.mjs +38 -40
- package/frontend-vue/layers/dms-core/app/build/utils/asyncDataScope.ts +31 -3
- package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +2 -8
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +0 -3
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +0 -3
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +30 -110
- package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +6 -21
- package/frontend-vue/layers/dms-layout/app/build/components/layout/SidebarUserMenu.vue +7 -19
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +9 -79
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsNav.vue +4 -17
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +0 -12
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/useSettingsNavigation.ts +0 -39
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-mockups.ts +2 -12
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-toast.ts +1 -9
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +6 -53
- package/frontend-vue/layers/dms-layout/app/theme/actions.ts +7 -11
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +5 -31
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupCanvasChrome.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +47 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +33 -59
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +12 -58
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/{MockupZoomControls.vue → MockupOverviewZoom.vue} +15 -23
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPagesList.vue +0 -21
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinCard.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +9 -77
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +45 -130
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +3 -70
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +4 -44
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +2 -14
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +36 -256
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +1 -13
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameSize.ts +5 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +23 -50
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +29 -82
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPins.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRealData.ts +3 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +14 -60
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +3 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +2 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupToolModes.ts +7 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +8 -29
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +2 -13
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +10 -39
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +0 -41
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +3 -37
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +1 -20
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +8 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +103 -167
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +0 -22
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +173 -75
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +9 -118
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +8 -123
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +2 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +3 -21
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPageTree.ts +0 -15
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPins.ts +8 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRealData.ts +5 -18
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +6 -17
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +2 -17
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupVersions.ts +7 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/previewFixturesOnly.ts +0 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +6 -108
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/build/utils/sketch.ts +10 -40
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +6 -23
- package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +0 -2
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +4 -53
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +4 -53
- package/frontend-vue/package.json +2 -2
- package/package.json +5 -6
- package/E2E.md +0 -138
- package/dist/mcp/mockup-export/capture.d.ts +0 -19
- package/dist/mcp/mockup-export/capture.js +0 -99
- package/dist/mcp/mockup-export/capture.js.map +0 -1
- package/dist/mcp/mockup-export/document.d.ts +0 -4
- package/dist/mcp/mockup-export/document.js +0 -199
- package/dist/mcp/mockup-export/document.js.map +0 -1
- package/dist/mcp/mockup-export/index.d.ts +0 -20
- package/dist/mcp/mockup-export/index.js +0 -110
- package/dist/mcp/mockup-export/index.js.map +0 -1
- package/dist/mcp/mockup-export/jobs.d.ts +0 -32
- package/dist/mcp/mockup-export/jobs.js +0 -49
- package/dist/mcp/mockup-export/jobs.js.map +0 -1
- package/dist/mcp/mockup-export/plan.d.ts +0 -78
- package/dist/mcp/mockup-export/plan.js +0 -292
- package/dist/mcp/mockup-export/plan.js.map +0 -1
- package/dist/mcp/mockup-export/route.d.ts +0 -23
- package/dist/mcp/mockup-export/route.js +0 -91
- package/dist/mcp/mockup-export/route.js.map +0 -1
- package/dist/mcp/page-verify/modules.d.ts +0 -8
- package/dist/mcp/page-verify/modules.js +0 -49
- package/dist/mcp/page-verify/modules.js.map +0 -1
- package/dist/mcp/tools/mockup-export-pdf.d.ts +0 -1
- package/dist/mcp/tools/mockup-export-pdf.js +0 -69
- package/dist/mcp/tools/mockup-export-pdf.js.map +0 -1
- package/dist/mcp/tools/mockup-module-catalog.d.ts +0 -1
- package/dist/mcp/tools/mockup-module-catalog.js +0 -36
- package/dist/mcp/tools/mockup-module-catalog.js.map +0 -1
- package/dist/mockup/compile-layouts.d.ts +0 -5
- package/dist/mockup/compile-layouts.js +0 -74
- package/dist/mockup/compile-layouts.js.map +0 -1
- package/dist/mockup/compile-nodes.d.ts +0 -11
- package/dist/mockup/compile-nodes.js +0 -119
- package/dist/mockup/compile-nodes.js.map +0 -1
- package/dist/mockup/compile-pages.d.ts +0 -18
- package/dist/mockup/compile-pages.js +0 -189
- package/dist/mockup/compile-pages.js.map +0 -1
- package/dist/mockup/create.d.ts +0 -16
- package/dist/mockup/create.js +0 -78
- package/dist/mockup/create.js.map +0 -1
- package/dist/mockup/created-watch.d.ts +0 -18
- package/dist/mockup/created-watch.js +0 -110
- package/dist/mockup/created-watch.js.map +0 -1
- package/dist/mockup/entities.d.ts +0 -20
- package/dist/mockup/entities.js +0 -213
- package/dist/mockup/entities.js.map +0 -1
- package/dist/mockup/etag.d.ts +0 -1
- package/dist/mockup/etag.js +0 -10
- package/dist/mockup/etag.js.map +0 -1
- package/dist/mockup/extensions.d.ts +0 -18
- package/dist/mockup/extensions.js +0 -61
- package/dist/mockup/extensions.js.map +0 -1
- package/dist/mockup/fixture-batch.d.ts +0 -21
- package/dist/mockup/fixture-batch.js +0 -111
- package/dist/mockup/fixture-batch.js.map +0 -1
- package/dist/mockup/fixture-routes.d.ts +0 -21
- package/dist/mockup/fixture-routes.js +0 -136
- package/dist/mockup/fixture-routes.js.map +0 -1
- package/dist/mockup/json-schema-entities.d.ts +0 -5
- package/dist/mockup/json-schema-entities.js +0 -141
- package/dist/mockup/json-schema-entities.js.map +0 -1
- package/dist/mockup/json.d.ts +0 -8
- package/dist/mockup/json.js +0 -20
- package/dist/mockup/json.js.map +0 -1
- package/dist/mockup/layout-model.d.ts +0 -156
- package/dist/mockup/layout-model.js +0 -96
- package/dist/mockup/layout-model.js.map +0 -1
- package/dist/mockup/layouts.d.ts +0 -9
- package/dist/mockup/layouts.js +0 -40
- package/dist/mockup/layouts.js.map +0 -1
- package/dist/mockup/module-manifests.d.ts +0 -99
- package/dist/mockup/module-manifests.js +0 -95
- package/dist/mockup/module-manifests.js.map +0 -1
- package/dist/mockup/module-states.d.ts +0 -10
- package/dist/mockup/module-states.js +0 -85
- package/dist/mockup/module-states.js.map +0 -1
- package/dist/mockup/modules-schema.d.ts +0 -2
- package/dist/mockup/modules-schema.js +0 -39
- package/dist/mockup/modules-schema.js.map +0 -1
- package/dist/mockup/page-capture-routes.d.ts +0 -19
- package/dist/mockup/page-capture-routes.js +0 -92
- package/dist/mockup/page-capture-routes.js.map +0 -1
- package/dist/mockup/page-captures.d.ts +0 -61
- package/dist/mockup/page-captures.js +0 -252
- package/dist/mockup/page-captures.js.map +0 -1
- package/dist/mockup/parse-spec.d.ts +0 -10
- package/dist/mockup/parse-spec.js +0 -62
- package/dist/mockup/parse-spec.js.map +0 -1
- package/dist/mockup/places.d.ts +0 -17
- package/dist/mockup/places.js +0 -75
- package/dist/mockup/places.js.map +0 -1
- package/dist/mockup/slug.d.ts +0 -3
- package/dist/mockup/slug.js +0 -7
- package/dist/mockup/slug.js.map +0 -1
- package/dist/mockup/state-patch.d.ts +0 -22
- package/dist/mockup/state-patch.js +0 -75
- package/dist/mockup/state-patch.js.map +0 -1
- package/dist/mockup/state.d.ts +0 -112
- package/dist/mockup/state.js +0 -22
- package/dist/mockup/state.js.map +0 -1
- package/dist/mockup/store-list.d.ts +0 -28
- package/dist/mockup/store-list.js +0 -89
- package/dist/mockup/store-list.js.map +0 -1
- package/dist/mockup/tenancy.d.ts +0 -19
- package/dist/mockup/tenancy.js +0 -73
- package/dist/mockup/tenancy.js.map +0 -1
- package/dist/mockup/tenant-rows.d.ts +0 -4
- package/dist/mockup/tenant-rows.js +0 -19
- package/dist/mockup/tenant-rows.js.map +0 -1
- package/frontend-vue/layers/dms-core/app/utils/localFetchAnswers.ts +0 -124
- package/frontend-vue/layers/dms-core/app/utils/textDigest.ts +0 -29
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupWidgets.ts +0 -65
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +0 -153
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEmptyState.vue +0 -23
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModuleStore.vue +0 -164
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSectionLabel.vue +0 -51
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupReconnecting.vue +0 -17
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTenantBanner.vue +0 -48
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +0 -142
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useFixtureBatches.ts +0 -154
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupActivation.ts +0 -157
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +0 -165
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameRender.ts +0 -126
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageZoom.ts +0 -138
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +0 -124
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +0 -37
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerActivation.ts +0 -56
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerExport.ts +0 -46
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePersistedCaptures.ts +0 -151
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCreateModal.vue +0 -130
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +0 -332
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupActivation.ts +0 -100
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupAnnotations.ts +0 -146
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +0 -80
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupModuleNavigation.ts +0 -171
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupModules.ts +0 -138
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverviewSections.ts +0 -66
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +0 -177
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStatePatch.ts +0 -179
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +0 -143
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +0 -23
- package/frontend-vue/layers/dms-ui/app/build/utils/previewFixtureAnswers.ts +0 -156
- package/frontend-vue/layers/dms-ui/app/build/utils/previewRows.ts +0 -400
- package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +0 -15
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupModuleStore.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupTenantBanner.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupWorkspaceSwitcher.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useFixtureBatches.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupActivation.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupOverview.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupPdfExport.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupRoutePage.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupSession.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupTenancy.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePersistedCaptures.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/json.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupActivation.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupAnnotations.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupModuleNavigation.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupOverviewSections.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupStatePatch.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenancy.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenants.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/previewFixtureAnswers.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/previewRows.ts +0 -1
|
@@ -14,16 +14,12 @@ import {
|
|
|
14
14
|
} from "./mockupMenu";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* The sidebar's menu of a mockup
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* `editable`, the spec's sections are edited in place, as in the viewer's
|
|
24
|
-
* page list, and each change is handed to the embedding page, which writes
|
|
25
|
-
* the spec; the module and Settings rows are never edited. Otherwise the
|
|
26
|
-
* menu only navigates.
|
|
17
|
+
* The sidebar's menu of a mockup: the spec's own sections and pages alone,
|
|
18
|
+
* the default section under the real menu's Pages header, drawn by the
|
|
19
|
+
* dashboard's own menu (see `mockupMenu`). Picking a page tells the embedding page, which draws it. While the navigation is
|
|
20
|
+
* `editable`, the sections are edited in place, as in the viewer's page
|
|
21
|
+
* list, and each change is handed to the embedding page, which writes the
|
|
22
|
+
* spec; otherwise the menu only navigates.
|
|
27
23
|
*/
|
|
28
24
|
const props = defineProps<{
|
|
29
25
|
navigation: PreviewNavigation;
|
|
@@ -51,7 +47,6 @@ const isEditable = computed(() => props.navigation.editable === true);
|
|
|
51
47
|
const menu = computed(() =>
|
|
52
48
|
mockupMenu(props.navigation, {
|
|
53
49
|
defaultSection: t("menu.section.pages"),
|
|
54
|
-
settingsSection: t("menu.section.settings"),
|
|
55
50
|
select: requestPreviewPage,
|
|
56
51
|
}),
|
|
57
52
|
);
|
|
@@ -174,16 +169,6 @@ function holdDrop(event: DragEvent): void {
|
|
|
174
169
|
</template>
|
|
175
170
|
</template>
|
|
176
171
|
|
|
177
|
-
<template #mockup-settings-label="{ item }">
|
|
178
|
-
<span
|
|
179
|
-
class="flex min-w-0 items-center gap-1.5"
|
|
180
|
-
data-dms-preview-settings
|
|
181
|
-
>
|
|
182
|
-
<UIcon v-if="item.icon" :name="item.icon" class="size-4 shrink-0" />
|
|
183
|
-
<span class="truncate">{{ item.label }}</span>
|
|
184
|
-
</span>
|
|
185
|
-
</template>
|
|
186
|
-
|
|
187
172
|
<template #mockup-page="{ item, active, ui }">
|
|
188
173
|
<template v-for="entry in [pageOf(item)]" :key="entry?.page">
|
|
189
174
|
<span
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import UserIdentity from "./UserIdentity.vue";
|
|
3
3
|
import { useSidebarState } from "./sidebarState";
|
|
4
4
|
import type { DropdownMenuItem } from "@nuxt/ui";
|
|
5
|
-
import { previewPreferences } from "#dms-ui/app/entries/composables/block-preview/previewNavigation";
|
|
6
5
|
|
|
7
6
|
interface Props {
|
|
8
7
|
collapsed?: boolean;
|
|
@@ -52,21 +51,6 @@ const isOnSettings = computed(
|
|
|
52
51
|
route.path.startsWith(`${SETTINGS_ROUTE}/`),
|
|
53
52
|
);
|
|
54
53
|
|
|
55
|
-
/** In a mockup, a pick changes the preview alone and never the user's settings. */
|
|
56
|
-
const shownColorMode = computed(
|
|
57
|
-
() => previewPreferences.value?.colorMode.value ?? colorModePreference.value,
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
function pickColorMode(mode: ColorModePreference): void {
|
|
61
|
-
if (previewPreferences.value) previewPreferences.value.setColorMode(mode);
|
|
62
|
-
else colorModePreference.value = mode;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function pickLanguage(code: string): void {
|
|
66
|
-
if (previewPreferences.value) previewPreferences.value.setLocale(code);
|
|
67
|
-
else void changeLanguage(code);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
54
|
const preferenceItems = computed<DropdownMenuItem[]>(() => [
|
|
71
55
|
{
|
|
72
56
|
label: t("page.settings.appearance.theme_title"),
|
|
@@ -74,8 +58,10 @@ const preferenceItems = computed<DropdownMenuItem[]>(() => [
|
|
|
74
58
|
children: COLOR_MODE_ENTRIES.map((entry) => ({
|
|
75
59
|
label: t(entry.labelKey),
|
|
76
60
|
type: "checkbox" as const,
|
|
77
|
-
checked:
|
|
78
|
-
onSelect: () =>
|
|
61
|
+
checked: colorModePreference.value === entry.value,
|
|
62
|
+
onSelect: () => {
|
|
63
|
+
colorModePreference.value = entry.value;
|
|
64
|
+
},
|
|
79
65
|
})),
|
|
80
66
|
},
|
|
81
67
|
{
|
|
@@ -85,7 +71,9 @@ const preferenceItems = computed<DropdownMenuItem[]>(() => [
|
|
|
85
71
|
label: language.name,
|
|
86
72
|
type: "checkbox" as const,
|
|
87
73
|
checked: locale.value === language.code,
|
|
88
|
-
onSelect: () =>
|
|
74
|
+
onSelect: () => {
|
|
75
|
+
void changeLanguage(language.code);
|
|
76
|
+
},
|
|
89
77
|
})),
|
|
90
78
|
},
|
|
91
79
|
]);
|
|
@@ -12,13 +12,8 @@ export const MOCKUP_SECTION_SLOT = "mockup-section";
|
|
|
12
12
|
/** The menu slot drawing a mockup page's row. */
|
|
13
13
|
export const MOCKUP_PAGE_SLOT = "mockup-page";
|
|
14
14
|
|
|
15
|
-
/** The menu slot drawing the header of the read-only Settings group. */
|
|
16
|
-
export const MOCKUP_SETTINGS_SLOT = "mockup-settings";
|
|
17
|
-
|
|
18
15
|
const SECTION_ID_PREFIX = "mockup-section:";
|
|
19
16
|
const PAGE_ID_PREFIX = "mockup-page:";
|
|
20
|
-
const SETTINGS_ID = "mockup-settings";
|
|
21
|
-
const SETTINGS_ICON = "i-ph-gear-light";
|
|
22
17
|
|
|
23
18
|
/** A mockup section's header: the default section's has no category. */
|
|
24
19
|
export interface MockupMenuSection {
|
|
@@ -42,11 +37,7 @@ export interface MockupMenuPage {
|
|
|
42
37
|
|
|
43
38
|
export type MockupMenuEntry = MockupMenuSection | MockupMenuPage;
|
|
44
39
|
|
|
45
|
-
/**
|
|
46
|
-
* A mockup's menu: the groups the sidebar draws, and what each entry of the
|
|
47
|
-
* spec's own sections stands for. The rows of a module and of Settings are in
|
|
48
|
-
* `groups` alone: they are read-only, so no entry stands for them.
|
|
49
|
-
*/
|
|
40
|
+
/** A mockup's sections as the sidebar's menu lists them, and what each entry stands for. */
|
|
50
41
|
export interface MockupMenu {
|
|
51
42
|
groups: NavigationMenuItem[][];
|
|
52
43
|
entries: ReadonlyMap<string, MockupMenuEntry>;
|
|
@@ -55,8 +46,6 @@ export interface MockupMenu {
|
|
|
55
46
|
interface MockupMenuOptions {
|
|
56
47
|
/** The default section's header: the real menu's title for its built-in Pages section. */
|
|
57
48
|
defaultSection: string;
|
|
58
|
-
/** The header of the group of pages that extend a page of Settings. */
|
|
59
|
-
settingsSection: string;
|
|
60
49
|
/** Picks the page `id`. */
|
|
61
50
|
select: (id: string) => void;
|
|
62
51
|
}
|
|
@@ -98,76 +87,20 @@ function pageItem(
|
|
|
98
87
|
}
|
|
99
88
|
|
|
100
89
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
): NavigationMenuItem {
|
|
109
|
-
return {
|
|
110
|
-
label: item.label,
|
|
111
|
-
icon: item.icon ?? DEFAULT_PAGE_ICON,
|
|
112
|
-
active: isActive,
|
|
113
|
-
"aria-label": item.label,
|
|
114
|
-
"aria-current": isActive ? "page" : undefined,
|
|
115
|
-
"data-dms-preview-page": item.id,
|
|
116
|
-
onSelect: () => select(item.id),
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/** The group of the pages that extend a page of Settings: a Settings header with its gear, then a row for each. */
|
|
121
|
-
function settingsGroup(
|
|
122
|
-
items: readonly PreviewNavigationItem[],
|
|
123
|
-
active: string | undefined,
|
|
124
|
-
options: MockupMenuOptions,
|
|
125
|
-
): NavigationMenuItem[] {
|
|
126
|
-
return [
|
|
127
|
-
{
|
|
128
|
-
id: SETTINGS_ID,
|
|
129
|
-
type: "label",
|
|
130
|
-
label: options.settingsSection,
|
|
131
|
-
icon: SETTINGS_ICON,
|
|
132
|
-
slot: MOCKUP_SETTINGS_SLOT,
|
|
133
|
-
"data-dms-preview-settings": "",
|
|
134
|
-
},
|
|
135
|
-
...items.map((item) =>
|
|
136
|
-
readOnlyPageItem(item, item.id === active, options.select),
|
|
137
|
-
),
|
|
138
|
-
];
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* The sidebar's menu of a mockup, drawn after the app's own menu. While a
|
|
143
|
-
* page of a module is current, the sidebar is inside that module, as the
|
|
144
|
-
* dashboard draws it: one group of the module's pages, read-only, the active
|
|
145
|
-
* one marked. Otherwise: the spec's own sections, then the Settings group.
|
|
146
|
-
* A section is a label over its pages, the default one (pages without
|
|
147
|
-
* category) under the real menu's Pages header, and each page a row with its
|
|
148
|
-
* icon, the active one highlighted. A section with no page is left out,
|
|
149
|
-
* except while editing, when every category is listed. The default section
|
|
150
|
-
* is the root category: it shows only when it holds a page. The pages that
|
|
151
|
-
* extend a page of Settings follow under a Settings header, read-only: a row
|
|
152
|
-
* picks its page and highlights while active, but is not draggable, and no
|
|
153
|
-
* editing entry stands for it.
|
|
90
|
+
* The sidebar's menu of a mockup: the spec's own sections alone, none of the
|
|
91
|
+
* app's entries, so a mockup of an existing app starts empty and lists only
|
|
92
|
+
* its own pages. Each section is a label over its pages, the default one
|
|
93
|
+
* (pages without category) under the real menu's Pages header, and each page
|
|
94
|
+
* a row with its icon, the active one highlighted. A section with no page is
|
|
95
|
+
* left out, except while editing, when every category is listed. The default
|
|
96
|
+
* section is the root category: it shows only when it holds a page.
|
|
154
97
|
*/
|
|
155
98
|
export function mockupMenu(
|
|
156
99
|
navigation: PreviewNavigation,
|
|
157
100
|
options: MockupMenuOptions,
|
|
158
101
|
): MockupMenu {
|
|
159
|
-
const entries = new Map<string, MockupMenuEntry>();
|
|
160
|
-
if (navigation.module) {
|
|
161
|
-
return {
|
|
162
|
-
groups: [
|
|
163
|
-
navigation.module.items.map((item) =>
|
|
164
|
-
readOnlyPageItem(item, item.id === navigation.active, options.select),
|
|
165
|
-
),
|
|
166
|
-
],
|
|
167
|
-
entries,
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
102
|
const isEditable = navigation.editable === true;
|
|
103
|
+
const entries = new Map<string, MockupMenuEntry>();
|
|
171
104
|
const groups: NavigationMenuItem[][] = [];
|
|
172
105
|
navigation.sections.forEach((section, index) => {
|
|
173
106
|
const isEmpty = section.items.length === 0;
|
|
@@ -196,8 +129,5 @@ export function mockupMenu(
|
|
|
196
129
|
});
|
|
197
130
|
groups.push(group);
|
|
198
131
|
});
|
|
199
|
-
if (navigation.settings && navigation.settings.length > 0) {
|
|
200
|
-
groups.push(settingsGroup(navigation.settings, navigation.active, options));
|
|
201
|
-
}
|
|
202
132
|
return { groups, entries };
|
|
203
133
|
}
|
package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsNav.vue
CHANGED
|
@@ -58,24 +58,12 @@ const theme = tv({
|
|
|
58
58
|
|
|
59
59
|
const SETTINGS_INDEX_ID = "settings";
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* The navigation of the settings pages the viewer can open, from the
|
|
63
|
-
* site layout. A caller that draws another app's settings, as a mockup
|
|
64
|
-
* preview does, gives its own `groups` in place of them, and the id of the
|
|
65
|
-
* page `active` among them in place of the route's path.
|
|
66
|
-
*/
|
|
67
|
-
const props = defineProps<{
|
|
68
|
-
groups?: SettingsNavGroup[];
|
|
69
|
-
active?: string;
|
|
70
|
-
}>();
|
|
71
|
-
|
|
72
61
|
const ui = computed(() => theme());
|
|
73
62
|
|
|
74
63
|
const { t } = useI18n();
|
|
75
64
|
const { processI18n } = useTranslation();
|
|
76
65
|
const route = useDmsRoute();
|
|
77
|
-
const
|
|
78
|
-
const groups = computed(() => props.groups ?? siteGroups.value);
|
|
66
|
+
const { groups } = useSettingsNavigation();
|
|
79
67
|
|
|
80
68
|
const query = ref("");
|
|
81
69
|
|
|
@@ -101,8 +89,7 @@ const activePath = computed(() =>
|
|
|
101
89
|
groups.value.flatMap((group) => group.pages.map((page) => page.to)),
|
|
102
90
|
),
|
|
103
91
|
);
|
|
104
|
-
const isActive = (
|
|
105
|
-
props.groups ? page.fullId === props.active : activePath.value === page.to;
|
|
92
|
+
const isActive = (to: string): boolean => activePath.value === to;
|
|
106
93
|
|
|
107
94
|
const navRoot = useTemplateRef<HTMLElement>("navRoot");
|
|
108
95
|
function revealActiveItem(): void {
|
|
@@ -187,11 +174,11 @@ const previewStateLabel = (
|
|
|
187
174
|
:to="page.to"
|
|
188
175
|
:class="
|
|
189
176
|
ui.item({
|
|
190
|
-
active: isActive(page),
|
|
177
|
+
active: isActive(page.to),
|
|
191
178
|
previewState: preview.entryState(page.fullId) ?? undefined,
|
|
192
179
|
})
|
|
193
180
|
"
|
|
194
|
-
:aria-current="isActive(page) ? 'page' : undefined"
|
|
181
|
+
:aria-current="isActive(page.to) ? 'page' : undefined"
|
|
195
182
|
>
|
|
196
183
|
<UIcon :name="page.icon" :class="ui.itemIcon()" />
|
|
197
184
|
<span :class="ui.itemLabel()">{{ processI18n(page.label) }}</span>
|
package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { SettingsNavGroup } from "../../../../composables/settings/useSettingsNavigation";
|
|
3
2
|
import SettingsNav from "./SettingsNav.vue";
|
|
4
3
|
|
|
5
4
|
interface Props {
|
|
@@ -10,20 +9,11 @@ interface Props {
|
|
|
10
9
|
nav?: "live" | "inert" | "none";
|
|
11
10
|
/** The page takes the height the shell is given (`fillHeight`). */
|
|
12
11
|
fillHeight?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The navigation's groups, in place of the settings pages the site layout
|
|
15
|
-
* lists: another app's settings, as a mockup preview draws them.
|
|
16
|
-
*/
|
|
17
|
-
groups?: SettingsNavGroup[];
|
|
18
|
-
/** With `groups`, the `fullId` of the page drawn as the current one. */
|
|
19
|
-
active?: string;
|
|
20
12
|
}
|
|
21
13
|
|
|
22
14
|
const props = withDefaults(defineProps<Props>(), {
|
|
23
15
|
nav: "live",
|
|
24
16
|
fillHeight: false,
|
|
25
|
-
groups: undefined,
|
|
26
|
-
active: undefined,
|
|
27
17
|
});
|
|
28
18
|
|
|
29
19
|
const GRID_CLASS =
|
|
@@ -52,8 +42,6 @@ const contentClass = computed(() => [
|
|
|
52
42
|
<div :class="rootClass">
|
|
53
43
|
<SettingsNav
|
|
54
44
|
v-if="props.nav !== 'none'"
|
|
55
|
-
:groups="props.groups"
|
|
56
|
-
:active="props.active"
|
|
57
45
|
:inert="props.nav === 'inert' || undefined"
|
|
58
46
|
class="lg:sticky lg:top-0 lg:self-start"
|
|
59
47
|
/>
|
package/frontend-vue/layers/dms-layout/app/build/composables/settings/useSettingsNavigation.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { MenuItemStatus } from "#dms-core/app/types/menu";
|
|
2
2
|
import type { SiteLayoutTree } from "#dms-core/app/types/page";
|
|
3
|
-
import type { PreviewNavigation } from "#dms-ui/app/entries/utils/blockPreview";
|
|
4
3
|
import {
|
|
5
4
|
listCategoryPages,
|
|
6
5
|
listPagesAmong,
|
|
@@ -70,44 +69,6 @@ export function buildSettingsGroups(root: SiteLayoutTree): SettingsNavGroup[] {
|
|
|
70
69
|
return groups.filter((group) => group.pages.length > 0);
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
/** The path a settings page of id `id` opens: `settings.workspace.billing` is `/settings/workspace/billing`. */
|
|
74
|
-
function settingsPathOf(id: string): string {
|
|
75
|
-
return `/settings/${id.replace(/^settings\./, "").replaceAll(".", "/")}`;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/** The settings navigation a mockup preview draws: the groups, and the `fullId` of the page that is open. */
|
|
79
|
-
export interface PreviewSettingsNav {
|
|
80
|
-
groups: SettingsNavGroup[];
|
|
81
|
-
active?: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* The settings navigation of a mockup's `navigation`, in place of the host
|
|
86
|
-
* app's: each group an entry the navigation carries, a page under its id,
|
|
87
|
-
* which is the one marked as the current page. None without a navigation, so
|
|
88
|
-
* a preview that has none draws the host's. A navigation with no group has an
|
|
89
|
-
* empty one, so the host's pages are never drawn for a mockup.
|
|
90
|
-
*/
|
|
91
|
-
export function previewSettingsNav(
|
|
92
|
-
navigation: PreviewNavigation | undefined,
|
|
93
|
-
): PreviewSettingsNav | undefined {
|
|
94
|
-
if (!navigation) return undefined;
|
|
95
|
-
const groups = (navigation.settingsNav ?? []).map(
|
|
96
|
-
(group, index): SettingsNavGroup => ({
|
|
97
|
-
id: `preview-${index}`,
|
|
98
|
-
label: group.label,
|
|
99
|
-
pages: group.items.map((item) => ({
|
|
100
|
-
fullId: item.id,
|
|
101
|
-
label: item.label,
|
|
102
|
-
description: "",
|
|
103
|
-
icon: item.icon ?? DEFAULT_SETTINGS_ICON,
|
|
104
|
-
to: settingsPathOf(item.id),
|
|
105
|
-
})),
|
|
106
|
-
}),
|
|
107
|
-
);
|
|
108
|
-
return { groups, active: navigation.active };
|
|
109
|
-
}
|
|
110
|
-
|
|
111
72
|
/**
|
|
112
73
|
* The settings pages the current user can open, grouped the way the settings
|
|
113
74
|
* navigation shows them.
|
|
@@ -17,16 +17,12 @@ export interface CreatedMockup {
|
|
|
17
17
|
|
|
18
18
|
/** What the dashboard does about a created mockup. */
|
|
19
19
|
export type CreatedReaction =
|
|
20
|
-
| { kind: "none" }
|
|
21
20
|
| { kind: "navigate"; path: string }
|
|
22
21
|
| { kind: "toast"; title: string; path: string };
|
|
23
22
|
|
|
24
|
-
/** The path of the mockup viewer, which `?name=<mockup>` points at one mockup. */
|
|
25
|
-
export const VIEWER_PATH = "/mockup";
|
|
26
|
-
|
|
27
23
|
/** The viewer of the mockup called `name`. */
|
|
28
24
|
export function viewerPath(name: string): string {
|
|
29
|
-
return
|
|
25
|
+
return `/mockup?name=${encodeURIComponent(name)}`;
|
|
30
26
|
}
|
|
31
27
|
|
|
32
28
|
/** The text of a `created` event as a {@link CreatedMockup}; undefined when it is not one. */
|
|
@@ -54,19 +50,13 @@ export function isOnList(path: string, listPath: string): boolean {
|
|
|
54
50
|
/**
|
|
55
51
|
* What to do about `created` while the dashboard shows `currentPath`: open
|
|
56
52
|
* its viewer from the Mockups list page, where the user asked for it, and
|
|
57
|
-
* anywhere else leave the user where they are and offer it.
|
|
58
|
-
* the user already views it (`viewing` is the name the viewer shows, if
|
|
59
|
-
* `currentPath` is the viewer): the "New mockup" form opened it.
|
|
53
|
+
* anywhere else leave the user where they are and offer it.
|
|
60
54
|
*/
|
|
61
55
|
export function reactionTo(
|
|
62
56
|
created: CreatedMockup,
|
|
63
57
|
currentPath: string,
|
|
64
58
|
listPath: string,
|
|
65
|
-
viewing?: string,
|
|
66
59
|
): CreatedReaction {
|
|
67
|
-
if (currentPath === VIEWER_PATH && viewing === created.name) {
|
|
68
|
-
return { kind: "none" };
|
|
69
|
-
}
|
|
70
60
|
const path = viewerPath(created.name);
|
|
71
61
|
return isOnList(currentPath, listPath)
|
|
72
62
|
? { kind: "navigate", path }
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { watch } from "vue";
|
|
2
2
|
import { isPreviewFrame } from "#dms-core/app/entries/utils/previewFrame";
|
|
3
|
-
import { isString } from "#dms-core/app/utils/type-check";
|
|
4
3
|
import { MOCKUPS_PATH } from "./header-action";
|
|
5
4
|
import {
|
|
6
5
|
CREATED_ENDPOINT,
|
|
@@ -31,14 +30,7 @@ export default defineDmsPlugin(() => {
|
|
|
31
30
|
const { t } = getAppTranslation();
|
|
32
31
|
|
|
33
32
|
async function handle(created: CreatedMockup): Promise<void> {
|
|
34
|
-
const
|
|
35
|
-
const reaction = reactionTo(
|
|
36
|
-
created,
|
|
37
|
-
route.path,
|
|
38
|
-
MOCKUPS_PATH,
|
|
39
|
-
isString(viewing) ? viewing : undefined,
|
|
40
|
-
);
|
|
41
|
-
if (reaction.kind === "none") return;
|
|
33
|
+
const reaction = reactionTo(created, route.path, MOCKUPS_PATH);
|
|
42
34
|
if (reaction.kind === "navigate") {
|
|
43
35
|
await router.push(reaction.path);
|
|
44
36
|
return;
|
|
@@ -4,10 +4,7 @@ import EmptyLayoutBrand from "../build/components/layout/EmptyLayoutBrand.vue";
|
|
|
4
4
|
import LayoutFooter from "../build/components/layout/LayoutFooter.vue";
|
|
5
5
|
import PreviewTopBar from "../build/components/layout/PreviewTopBar.vue";
|
|
6
6
|
import { useSidebarState } from "../build/components/layout/sidebarState";
|
|
7
|
-
import MockupTenantBanner from "#dms-ui/app/entries/components/block-preview/MockupTenantBanner";
|
|
8
7
|
import SettingsShell from "../build/components/pages/settings/shell/SettingsShell.vue";
|
|
9
|
-
import { previewSettingsNav } from "../build/composables/settings/useSettingsNavigation";
|
|
10
|
-
import BlockPreviewSketch from "#dms-ui/app/entries/components/block-preview/BlockPreviewSketch";
|
|
11
8
|
import {
|
|
12
9
|
PREVIEW_FRAME_ATTRIBUTE,
|
|
13
10
|
previewHeader,
|
|
@@ -49,8 +46,6 @@ const EMPTY_STAGE_CLASS = "bg-muted relative isolate flex flex-1 flex-col";
|
|
|
49
46
|
/** `FormPageLayout`'s readable column, the width of `UContainer`. */
|
|
50
47
|
const READABLE_COLUMN_CLASS = "mx-auto w-full max-w-(--ui-container)";
|
|
51
48
|
|
|
52
|
-
const settingsNav = computed(() => previewSettingsNav(previewNavigation.value));
|
|
53
|
-
|
|
54
49
|
const mainClass = computed(() =>
|
|
55
50
|
frame.value.fillHeight || !frame.value.dashboard
|
|
56
51
|
? FLEX_COLUMN_CLASS
|
|
@@ -60,21 +55,9 @@ const stageClass = computed(() => {
|
|
|
60
55
|
if (!frame.value.dashboard) return EMPTY_STAGE_CLASS;
|
|
61
56
|
return frame.value.fillHeight ? PAGE_FILL_HEIGHT_CLASSES.column : undefined;
|
|
62
57
|
});
|
|
63
|
-
/** What holds the page's column and a custom layout's aside, side by side. */
|
|
64
|
-
const BODY_ROW_CLASS = "flex min-h-0 items-start gap-4";
|
|
65
|
-
const customHeader = computed(() => frame.value.custom?.header);
|
|
66
|
-
const customAside = computed(() => frame.value.custom?.aside);
|
|
67
|
-
const customFooter = computed(() => frame.value.custom?.footer);
|
|
68
|
-
const bodyClass = computed(() => {
|
|
69
|
-
if (customAside.value) {
|
|
70
|
-
return [BODY_ROW_CLASS, frame.value.fillHeight && "flex-1"];
|
|
71
|
-
}
|
|
72
|
-
return frame.value.fillHeight && PAGE_FILL_HEIGHT_CLASSES.column;
|
|
73
|
-
});
|
|
74
58
|
const columnClass = computed(() => [
|
|
75
59
|
!frame.value.fullWidth && READABLE_COLUMN_CLASS,
|
|
76
60
|
frame.value.fillHeight && PAGE_FILL_HEIGHT_CLASSES.column,
|
|
77
|
-
customAside.value && "min-w-0 flex-1",
|
|
78
61
|
]);
|
|
79
62
|
</script>
|
|
80
63
|
|
|
@@ -98,10 +81,6 @@ const columnClass = computed(() => [
|
|
|
98
81
|
v-if="previewNavigation && frame.dashboard"
|
|
99
82
|
:title="previewHeader?.title ?? previewNavigation.title ?? ''"
|
|
100
83
|
/>
|
|
101
|
-
<MockupTenantBanner
|
|
102
|
-
v-if="previewNavigation?.workspace"
|
|
103
|
-
:workspace="previewNavigation.workspace"
|
|
104
|
-
/>
|
|
105
84
|
<div :class="stageClass" data-dms-preview-stage>
|
|
106
85
|
<EmptyLayoutBrand
|
|
107
86
|
v-if="!frame.dashboard"
|
|
@@ -109,39 +88,13 @@ const columnClass = computed(() => [
|
|
|
109
88
|
inert
|
|
110
89
|
data-dms-preview-brand
|
|
111
90
|
/>
|
|
112
|
-
<div
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<aside
|
|
117
|
-
v-if="customAside?.side === 'start'"
|
|
118
|
-
class="shrink-0"
|
|
119
|
-
:style="{ width: `${customAside.width}px` }"
|
|
120
|
-
data-dms-preview-layout-aside
|
|
121
|
-
>
|
|
122
|
-
<BlockPreviewSketch :sketch="customAside" />
|
|
123
|
-
</aside>
|
|
124
|
-
<div :class="columnClass">
|
|
125
|
-
<SettingsShell
|
|
126
|
-
:nav="frame.settings ? 'inert' : 'none'"
|
|
127
|
-
:fill-height="frame.fillHeight"
|
|
128
|
-
:groups="settingsNav?.groups"
|
|
129
|
-
:active="settingsNav?.active"
|
|
130
|
-
>
|
|
131
|
-
<slot />
|
|
132
|
-
</SettingsShell>
|
|
133
|
-
</div>
|
|
134
|
-
<aside
|
|
135
|
-
v-if="customAside?.side === 'end'"
|
|
136
|
-
class="shrink-0"
|
|
137
|
-
:style="{ width: `${customAside.width}px` }"
|
|
138
|
-
data-dms-preview-layout-aside
|
|
91
|
+
<div :class="columnClass">
|
|
92
|
+
<SettingsShell
|
|
93
|
+
:nav="frame.settings ? 'inert' : 'none'"
|
|
94
|
+
:fill-height="frame.fillHeight"
|
|
139
95
|
>
|
|
140
|
-
<
|
|
141
|
-
</
|
|
142
|
-
</div>
|
|
143
|
-
<div v-if="customFooter" class="mt-auto" data-dms-preview-layout-footer>
|
|
144
|
-
<BlockPreviewSketch :sketch="customFooter" />
|
|
96
|
+
<slot />
|
|
97
|
+
</SettingsShell>
|
|
145
98
|
</div>
|
|
146
99
|
<div v-if="frame.footer" inert class="mt-auto" data-dms-preview-footer>
|
|
147
100
|
<LayoutFooter />
|
|
@@ -145,34 +145,30 @@ const buttonTheme = {
|
|
|
145
145
|
],
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
/**
|
|
149
|
-
* v2 badges: pill heights 16/18/22/26/28 px, semibold 10-13 px labels. Each
|
|
150
|
-
* size sets `leading-none` after its text size, since tailwind-merge drops a
|
|
151
|
-
* `leading-*` that comes before a later `text-*` size.
|
|
152
|
-
*/
|
|
148
|
+
/** v2 badges: pill heights 16/18/22/26/28 px, semibold 10-13 px labels. */
|
|
153
149
|
const BADGE_SIZES = {
|
|
154
150
|
xs: {
|
|
155
|
-
base: "h-4 px-1.5 py-0 text-[10px]
|
|
151
|
+
base: "h-4 px-1.5 py-0 text-[10px] gap-1 rounded-full",
|
|
156
152
|
leadingIcon: "size-[11px]",
|
|
157
153
|
trailingIcon: "size-[11px]",
|
|
158
154
|
},
|
|
159
155
|
sm: {
|
|
160
|
-
base: "h-[18px] px-1.5 py-0 text-[10.5px]
|
|
156
|
+
base: "h-[18px] px-1.5 py-0 text-[10.5px] gap-1 rounded-full",
|
|
161
157
|
leadingIcon: "size-3",
|
|
162
158
|
trailingIcon: "size-3",
|
|
163
159
|
},
|
|
164
160
|
md: {
|
|
165
|
-
base: "h-[22px] px-2 py-0 text-[11.5px]
|
|
161
|
+
base: "h-[22px] px-2 py-0 text-[11.5px] gap-[5px] rounded-full",
|
|
166
162
|
leadingIcon: "size-[13px]",
|
|
167
163
|
trailingIcon: "size-[13px]",
|
|
168
164
|
},
|
|
169
165
|
lg: {
|
|
170
|
-
base: "h-[26px] px-2.5 py-0 text-[12.5px]
|
|
166
|
+
base: "h-[26px] px-2.5 py-0 text-[12.5px] gap-1.5 rounded-full",
|
|
171
167
|
leadingIcon: "size-3.5",
|
|
172
168
|
trailingIcon: "size-3.5",
|
|
173
169
|
},
|
|
174
170
|
xl: {
|
|
175
|
-
base: "h-7 px-3 py-0 text-[13px]
|
|
171
|
+
base: "h-7 px-3 py-0 text-[13px] gap-1.5 rounded-full",
|
|
176
172
|
leadingIcon: "size-[15px]",
|
|
177
173
|
trailingIcon: "size-[15px]",
|
|
178
174
|
},
|
|
@@ -192,7 +188,7 @@ const BADGE_SQUARE_COMPOUNDS = [
|
|
|
192
188
|
|
|
193
189
|
const badgeTheme = {
|
|
194
190
|
slots: {
|
|
195
|
-
base: "font-semibold whitespace-nowrap",
|
|
191
|
+
base: "font-semibold leading-none whitespace-nowrap",
|
|
196
192
|
},
|
|
197
193
|
variants: {
|
|
198
194
|
size: BADGE_SIZES,
|
package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue
CHANGED
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, onBeforeUnmount, onMounted, ref, useTemplateRef } from "vue";
|
|
3
3
|
import type { PreviewSketch } from "../../utils/blockPreview";
|
|
4
|
-
import { mockupLinkOf } from "../../utils/mockupLinks";
|
|
5
4
|
import {
|
|
6
5
|
buildSketchDocument,
|
|
7
6
|
computedStyleReader,
|
|
8
7
|
currentSketchScheme,
|
|
9
|
-
sketchLinkHref,
|
|
10
8
|
sketchSandbox,
|
|
11
9
|
sketchTokensCss,
|
|
12
10
|
} from "../../utils/sketch";
|
|
13
|
-
import {
|
|
14
|
-
previewSketchesFramed,
|
|
15
|
-
requestPreviewPage,
|
|
16
|
-
} from "../../composables/block-preview/previewNavigation";
|
|
17
11
|
|
|
18
12
|
defineOptions({ inheritAttrs: false });
|
|
19
13
|
|
|
20
14
|
/**
|
|
21
15
|
* Draws a sketch node: static HTML and CSS of a part that is not a DMS block,
|
|
22
|
-
* in a sandboxed frame, marked as custom so it is never mistaken for a block
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* `routeParams` names when it passes one.
|
|
16
|
+
* in a sandboxed frame, marked as custom so it is never mistaken for a block.
|
|
17
|
+
* A link of the sketch to a page of the mockup opens it in the window holding
|
|
18
|
+
* the dashboard, on the row `routeParams` names when it passes one.
|
|
26
19
|
*/
|
|
27
20
|
const props = defineProps<{
|
|
28
21
|
sketch: PreviewSketch;
|
|
@@ -33,20 +26,10 @@ const OBSERVED_ATTRIBUTES = ["class", "style"];
|
|
|
33
26
|
|
|
34
27
|
const { t } = useI18n();
|
|
35
28
|
const host = useTemplateRef<HTMLElement>("host");
|
|
36
|
-
const frame = useTemplateRef<HTMLIFrameElement>("frame");
|
|
37
|
-
const isFramed = previewSketchesFramed;
|
|
38
29
|
const themeRevision = ref(0);
|
|
39
30
|
let observer: MutationObserver | undefined;
|
|
40
31
|
|
|
41
|
-
function onMessage(event: MessageEvent): void {
|
|
42
|
-
if (!frame.value || event.source !== frame.value.contentWindow) return;
|
|
43
|
-
const href = sketchLinkHref(event.data);
|
|
44
|
-
const link = href && mockupLinkOf(href, window.location.href);
|
|
45
|
-
if (link) requestPreviewPage(link.page, link.record);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
32
|
onMounted(() => {
|
|
49
|
-
window.addEventListener("message", onMessage);
|
|
50
33
|
themeRevision.value += 1;
|
|
51
34
|
observer = new MutationObserver(() => {
|
|
52
35
|
themeRevision.value += 1;
|
|
@@ -56,10 +39,7 @@ onMounted(() => {
|
|
|
56
39
|
attributeFilter: OBSERVED_ATTRIBUTES,
|
|
57
40
|
});
|
|
58
41
|
});
|
|
59
|
-
onBeforeUnmount(() =>
|
|
60
|
-
window.removeEventListener("message", onMessage);
|
|
61
|
-
observer?.disconnect();
|
|
62
|
-
});
|
|
42
|
+
onBeforeUnmount(() => observer?.disconnect());
|
|
63
43
|
|
|
64
44
|
const label = computed(() => t("dms.block_preview.sketch_label"));
|
|
65
45
|
const srcdoc = computed(() => {
|
|
@@ -79,15 +59,10 @@ const sandbox = computed(() => sketchSandbox(props.sketch.html));
|
|
|
79
59
|
<template>
|
|
80
60
|
<figure
|
|
81
61
|
ref="host"
|
|
82
|
-
class="m-0"
|
|
83
|
-
:class="{
|
|
84
|
-
'space-y-2 rounded-(--dms-radius-card) bg-[repeating-linear-gradient(-45deg,color-mix(in_srgb,var(--ui-warning)_22%,transparent)_0_6px,transparent_6px_12px)] pt-2 outline-1 -outline-offset-1 outline-(--ui-border-accented) outline-dashed':
|
|
85
|
-
isFramed,
|
|
86
|
-
}"
|
|
62
|
+
class="m-0 space-y-2 rounded-(--dms-radius-card) bg-[repeating-linear-gradient(-45deg,color-mix(in_srgb,var(--ui-warning)_22%,transparent)_0_6px,transparent_6px_12px)] pt-2 outline-1 -outline-offset-1 outline-(--ui-border-accented) outline-dashed"
|
|
87
63
|
data-dms-preview-sketch
|
|
88
64
|
>
|
|
89
65
|
<figcaption
|
|
90
|
-
v-if="isFramed"
|
|
91
66
|
class="text-muted flex items-center gap-2 font-mono text-[10.5px] font-[650] tracking-[0.08em] uppercase"
|
|
92
67
|
>
|
|
93
68
|
<span data-dms-preview-sketch-label>{{ label }}</span>
|
|
@@ -101,7 +76,6 @@ const sandbox = computed(() => sketchSandbox(props.sketch.html));
|
|
|
101
76
|
</figcaption>
|
|
102
77
|
<iframe
|
|
103
78
|
v-if="srcdoc"
|
|
104
|
-
ref="frame"
|
|
105
79
|
:sandbox="sandbox"
|
|
106
80
|
referrerpolicy="no-referrer"
|
|
107
81
|
class="bg-default block w-full rounded-md border-0"
|