@antelopejs/dms 0.25.8 → 0.25.9-next.1183.ga9db169
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 -48
- package/E2E.md +138 -0
- package/README.md +2 -2
- package/data/mockup-example/spec.json +13 -0
- package/data/mockup-spec.schema.json +399 -16
- package/dist/e2e/index.d.mts +2 -1
- package/dist/implementations/dms/live-pages.d.ts +6 -0
- package/dist/implementations/dms/live-pages.js +139 -0
- package/dist/implementations/dms/live-pages.js.map +1 -0
- package/dist/implementations/dms/page/notifications.js +2 -0
- package/dist/implementations/dms/page/notifications.js.map +1 -1
- package/dist/implementations/dms/page/registry.js +19 -4
- package/dist/implementations/dms/page/registry.js.map +1 -1
- package/dist/implementations/dms/registry-snapshot.d.ts +32 -0
- package/dist/implementations/dms/registry-snapshot.js +55 -0
- package/dist/implementations/dms/registry-snapshot.js.map +1 -0
- package/dist/implementations/dms/services.d.ts +2 -0
- package/dist/implementations/dms/services.js +2 -0
- package/dist/implementations/dms/services.js.map +1 -1
- package/dist/implementations/dms/tenant-access.d.ts +1 -0
- package/dist/implementations/dms/tenant-access.js +7 -0
- package/dist/implementations/dms/tenant-access.js.map +1 -1
- package/dist/implementations/dms-builder/engine/compose-page.js +1 -1
- package/dist/implementations/dms-builder/engine/compose-page.js.map +1 -1
- package/dist/implementations/dms-builder/engine/map-resources-pages.js +1 -1
- package/dist/implementations/dms-builder/engine/map-resources-pages.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops-blocks.d.ts +2 -1
- package/dist/implementations/dms-builder/engine/ops-blocks.js +12 -1
- package/dist/implementations/dms-builder/engine/ops-blocks.js.map +1 -1
- package/dist/implementations/dms-builder/engine/table-view-settings.js +9 -33
- package/dist/implementations/dms-builder/engine/table-view-settings.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +9 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/mockup-export/capture.d.ts +19 -0
- package/dist/mcp/mockup-export/capture.js +99 -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 +20 -0
- package/dist/mcp/mockup-export/index.js +112 -0
- package/dist/mcp/mockup-export/index.js.map +1 -0
- package/dist/mcp/mockup-export/jobs.d.ts +32 -0
- package/dist/mcp/mockup-export/jobs.js +49 -0
- package/dist/mcp/mockup-export/jobs.js.map +1 -0
- package/dist/mcp/mockup-export/plan.d.ts +78 -0
- package/dist/mcp/mockup-export/plan.js +296 -0
- package/dist/mcp/mockup-export/plan.js.map +1 -0
- package/dist/mcp/mockup-export/route.d.ts +23 -0
- package/dist/mcp/mockup-export/route.js +91 -0
- package/dist/mcp/mockup-export/route.js.map +1 -0
- package/dist/mcp/page-verify/index.d.ts +15 -0
- package/dist/mcp/page-verify/index.js +16 -6
- package/dist/mcp/page-verify/index.js.map +1 -1
- package/dist/mcp/page-verify/mockup.d.ts +3 -1
- package/dist/mcp/page-verify/mockup.js +2 -0
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/page-verify/modules.d.ts +1 -0
- package/dist/mcp/page-verify/modules.js +22 -0
- package/dist/mcp/page-verify/modules.js.map +1 -0
- package/dist/mcp/page-verify/page-probe.d.ts +5 -0
- package/dist/mcp/page-verify/page-probe.js +2 -0
- package/dist/mcp/page-verify/page-probe.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/page-verify/report.d.ts +1 -0
- package/dist/mcp/tools/builder-compose.js +4 -1
- package/dist/mcp/tools/builder-compose.js.map +1 -1
- package/dist/mcp/tools/builder-pages.js +1 -1
- package/dist/mcp/tools/builder-pages.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +2 -0
- package/dist/mcp/tools/index.js +6 -1
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/mockup-export-pdf.d.ts +1 -0
- package/dist/mcp/tools/mockup-export-pdf.js +69 -0
- package/dist/mcp/tools/mockup-export-pdf.js.map +1 -0
- package/dist/mcp/tools/mockup-install-modules.d.ts +9 -0
- package/dist/mcp/tools/mockup-install-modules.js +122 -0
- package/dist/mcp/tools/mockup-install-modules.js.map +1 -0
- package/dist/mcp/tools/mockup-module-catalog.d.ts +3 -0
- package/dist/mcp/tools/mockup-module-catalog.js +52 -0
- package/dist/mcp/tools/mockup-module-catalog.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 +8 -6
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-support.js +18 -5
- package/dist/mcp/tools/mockup-support.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 +6 -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 +6 -2
- package/dist/mcp/tools/page-verify.js.map +1 -1
- package/dist/mcp/tools/pages.d.ts +1 -0
- package/dist/mcp/tools/pages.js +9 -3
- package/dist/mcp/tools/pages.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-layouts.d.ts +5 -0
- package/dist/mockup/compile-layouts.js +74 -0
- package/dist/mockup/compile-layouts.js.map +1 -0
- package/dist/mockup/compile-modules.d.ts +5 -0
- package/dist/mockup/compile-modules.js +40 -0
- package/dist/mockup/compile-modules.js.map +1 -0
- package/dist/mockup/compile-nodes.d.ts +11 -0
- package/dist/mockup/compile-nodes.js +119 -0
- package/dist/mockup/compile-nodes.js.map +1 -0
- package/dist/mockup/compile-pages.d.ts +20 -0
- package/dist/mockup/compile-pages.js +272 -0
- package/dist/mockup/compile-pages.js.map +1 -0
- package/dist/mockup/compile.d.ts +10 -12
- package/dist/mockup/compile.js +36 -292
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/controller-blocks.js +2 -0
- package/dist/mockup/controller-blocks.js.map +1 -1
- package/dist/mockup/create.d.ts +16 -0
- package/dist/mockup/create.js +78 -0
- package/dist/mockup/create.js.map +1 -0
- package/dist/mockup/created-watch.d.ts +18 -0
- package/dist/mockup/created-watch.js +110 -0
- package/dist/mockup/created-watch.js.map +1 -0
- package/dist/mockup/database-routes.d.ts +15 -0
- package/dist/mockup/database-routes.js +58 -0
- package/dist/mockup/database-routes.js.map +1 -0
- package/dist/mockup/database-schema.d.ts +17 -0
- package/dist/mockup/database-schema.js +41 -0
- package/dist/mockup/database-schema.js.map +1 -0
- 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/etag.d.ts +1 -0
- package/dist/mockup/etag.js +10 -0
- package/dist/mockup/etag.js.map +1 -0
- package/dist/mockup/extensions.d.ts +34 -0
- package/dist/mockup/extensions.js +107 -0
- package/dist/mockup/extensions.js.map +1 -0
- package/dist/mockup/files.d.ts +2 -1
- package/dist/mockup/files.js +2 -1
- package/dist/mockup/files.js.map +1 -1
- package/dist/mockup/fixture-answers.d.ts +3 -2
- package/dist/mockup/fixture-answers.js +13 -4
- package/dist/mockup/fixture-answers.js.map +1 -1
- package/dist/mockup/fixture-batch.d.ts +21 -0
- package/dist/mockup/fixture-batch.js +111 -0
- package/dist/mockup/fixture-batch.js.map +1 -0
- package/dist/mockup/fixture-routes.d.ts +21 -0
- package/dist/mockup/fixture-routes.js +136 -0
- package/dist/mockup/fixture-routes.js.map +1 -0
- package/dist/mockup/fixtures.d.ts +2 -29
- package/dist/mockup/fixtures.js +0 -111
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/from-page.js +2 -9
- package/dist/mockup/from-page.js.map +1 -1
- package/dist/mockup/generate.js +4 -1
- package/dist/mockup/generate.js.map +1 -1
- package/dist/mockup/history-routes.d.ts +2 -4
- package/dist/mockup/history-routes.js +30 -39
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/history.js +7 -3
- package/dist/mockup/history.js.map +1 -1
- package/dist/mockup/index.d.ts +14 -0
- package/dist/mockup/index.js +14 -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-layout.d.ts +1 -0
- package/dist/mockup/json-schema-layout.js +95 -2
- package/dist/mockup/json-schema-layout.js.map +1 -1
- package/dist/mockup/json-schema.d.ts +1 -1
- package/dist/mockup/json-schema.js +41 -20
- 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/layout-model.d.ts +156 -0
- package/dist/mockup/layout-model.js +96 -0
- package/dist/mockup/layout-model.js.map +1 -0
- package/dist/mockup/layouts.d.ts +9 -0
- package/dist/mockup/layouts.js +40 -0
- package/dist/mockup/layouts.js.map +1 -0
- package/dist/mockup/manage-routes.d.ts +3 -1
- package/dist/mockup/manage-routes.js +38 -1
- 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 +145 -99
- package/dist/mockup/model.js +101 -86
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/module-context.d.ts +25 -0
- package/dist/mockup/module-context.js +83 -0
- package/dist/mockup/module-context.js.map +1 -0
- package/dist/mockup/module-install.d.ts +22 -0
- package/dist/mockup/module-install.js +71 -0
- package/dist/mockup/module-install.js.map +1 -0
- package/dist/mockup/module-states.d.ts +17 -0
- package/dist/mockup/module-states.js +167 -0
- package/dist/mockup/module-states.js.map +1 -0
- package/dist/mockup/modules-schema.d.ts +2 -0
- package/dist/mockup/modules-schema.js +38 -0
- package/dist/mockup/modules-schema.js.map +1 -0
- package/dist/mockup/modules.d.ts +9 -10
- package/dist/mockup/modules.js +104 -25
- package/dist/mockup/modules.js.map +1 -1
- package/dist/mockup/page-capture-routes.d.ts +19 -0
- package/dist/mockup/page-capture-routes.js +92 -0
- package/dist/mockup/page-capture-routes.js.map +1 -0
- package/dist/mockup/page-captures.d.ts +61 -0
- package/dist/mockup/page-captures.js +252 -0
- package/dist/mockup/page-captures.js.map +1 -0
- package/dist/mockup/page-descriptions.d.ts +2 -0
- package/dist/mockup/page-descriptions.js +18 -0
- package/dist/mockup/page-descriptions.js.map +1 -0
- package/dist/mockup/parse-spec.d.ts +10 -0
- package/dist/mockup/parse-spec.js +62 -0
- package/dist/mockup/parse-spec.js.map +1 -0
- package/dist/mockup/places.d.ts +17 -0
- package/dist/mockup/places.js +75 -0
- package/dist/mockup/places.js.map +1 -0
- 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 +6 -0
- package/dist/mockup/refusals.js +17 -0
- package/dist/mockup/refusals.js.map +1 -1
- package/dist/mockup/routes.d.ts +3 -5
- package/dist/mockup/routes.js +24 -163
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/sketch-limits.d.ts +1 -0
- package/dist/mockup/sketch-limits.js +2 -1
- package/dist/mockup/sketch-limits.js.map +1 -1
- package/dist/mockup/sketch.d.ts +2 -2
- package/dist/mockup/sketch.js +2 -1
- package/dist/mockup/sketch.js.map +1 -1
- package/dist/mockup/slug.d.ts +3 -0
- package/dist/mockup/slug.js +7 -0
- package/dist/mockup/slug.js.map +1 -0
- package/dist/mockup/source-routes.d.ts +5 -4
- package/dist/mockup/source-routes.js +26 -17
- package/dist/mockup/source-routes.js.map +1 -1
- package/dist/mockup/source.d.ts +3 -3
- package/dist/mockup/source.js +4 -3
- package/dist/mockup/source.js.map +1 -1
- package/dist/mockup/state-patch.d.ts +22 -0
- package/dist/mockup/state-patch.js +76 -0
- package/dist/mockup/state-patch.js.map +1 -0
- package/dist/mockup/state.d.ts +163 -0
- package/dist/mockup/state.js +24 -0
- package/dist/mockup/state.js.map +1 -0
- package/dist/mockup/store-list.d.ts +28 -0
- package/dist/mockup/store-list.js +89 -0
- package/dist/mockup/store-list.js.map +1 -0
- package/dist/mockup/store.d.ts +25 -38
- package/dist/mockup/store.js +126 -203
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/table-archive.d.ts +0 -1
- package/dist/mockup/table-archive.js +0 -16
- package/dist/mockup/table-archive.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/unknown-keys.d.ts +2 -2
- package/dist/mockup/unknown-keys.js +8 -4
- package/dist/mockup/unknown-keys.js.map +1 -1
- package/dist/mockup/validate.d.ts +2 -2
- package/dist/mockup/validate.js.map +1 -1
- package/dist/store/catalog.d.ts +5 -1
- package/dist/store/catalog.js +12 -1
- package/dist/store/catalog.js.map +1 -1
- package/dist/store/changes.d.ts +3 -0
- package/dist/store/changes.js +22 -0
- package/dist/store/changes.js.map +1 -0
- package/dist/store/index.d.ts +2 -0
- package/dist/store/index.js +2 -0
- package/dist/store/index.js.map +1 -1
- package/dist/store/listing.js +5 -5
- package/dist/store/listing.js.map +1 -1
- package/dist/store/operations.d.ts +8 -0
- package/dist/store/operations.js +27 -3
- package/dist/store/operations.js.map +1 -1
- package/dist/store/registry.d.ts +1 -0
- package/dist/store/registry.js +9 -0
- package/dist/store/registry.js.map +1 -1
- package/dist/store/types.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/live-pages.d.ts +41 -0
- package/dist/types/live-pages.js +3 -0
- package/dist/types/live-pages.js.map +1 -0
- package/dist/validation/store.schema.d.ts +1 -0
- package/dist/validation/store.schema.js +4 -4
- package/dist/validation/store.schema.js.map +1 -1
- package/e2e/index.mjs +3 -2
- package/frontend-vue/build/viewer-chunks.ts +181 -0
- package/frontend-vue/dms.frontend.build.ts +2 -1
- package/frontend-vue/dms.frontend.ts +7 -0
- package/frontend-vue/eslint-globals.generated.mjs +27 -24
- package/frontend-vue/layers/dms-core/app/build/utils/asyncDataScope.ts +3 -31
- package/frontend-vue/layers/dms-core/app/build/utils/previewFrame.ts +6 -1
- package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +8 -2
- package/frontend-vue/layers/dms-core/app/utils/localFetchAnswers.ts +124 -0
- package/frontend-vue/layers/dms-core/app/utils/textDigest.ts +29 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +4 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +4 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +89 -31
- package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +21 -6
- package/frontend-vue/layers/dms-layout/app/build/components/layout/SidebarUserMenu.vue +61 -8
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +79 -9
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsNav.vue +57 -8
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +12 -0
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/useSettingsNavigation.ts +42 -62
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-mockups.ts +12 -2
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-toast.ts +9 -1
- package/frontend-vue/layers/dms-layout/app/composables/page/useMockupStoreInstaller.ts +85 -0
- package/frontend-vue/layers/dms-layout/app/custom-layouts/MockupLayout.vue +0 -2
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +53 -6
- package/frontend-vue/layers/dms-layout/app/plugins/mockup-store-installer.ts +10 -0
- package/frontend-vue/layers/dms-layout/app/plugins/registered-sidebar-widgets.ts +10 -0
- package/frontend-vue/layers/dms-layout/app/plugins/seo.ts +7 -0
- package/frontend-vue/layers/dms-layout/app/theme/actions.ts +11 -7
- package/frontend-vue/layers/dms-onboarding/app/middleware/onboarding.global.ts +3 -3
- package/frontend-vue/layers/dms-onboarding/app/plugins/onboarding-preload.ts +5 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +31 -5
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupCanvasChrome.vue +2 -2
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +204 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabaseData.vue +288 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabaseDiagram.vue +91 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabaseRelationEdge.vue +40 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabaseTableNode.vue +133 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEmptyState.vue +23 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModuleStore.vue +240 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +54 -33
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSectionLabel.vue +52 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +65 -12
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPagesList.vue +21 -0
- 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/MockupReconnecting.vue +17 -0
- 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/MockupTitle.vue +24 -15
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupToolbar.vue +196 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +200 -179
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWarningsMenu.vue +59 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +152 -57
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +142 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewAdmission.ts +20 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +71 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +44 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewSwapHold.ts +157 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/registeredSidebarWidgets.ts +20 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/storeModuleInstaller.ts +32 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +14 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +309 -41
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useFixtureBatches.ts +154 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupActivation.ts +182 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupConnectionTables.ts +80 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +212 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +13 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameRender.ts +126 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameSize.ts +10 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +50 -23
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +103 -29
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageZoom.ts +146 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +124 -0
- 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 +11 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +60 -14
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +8 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +6 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +36 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupToolModes.ts +5 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerActivation.ts +59 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerExport.ts +46 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +44 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +13 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupWarningFocus.ts +145 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +39 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePersistedCaptures.ts +151 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +41 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +37 -3
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCreateModal.vue +130 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +20 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreview.ts +137 -78
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +1 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +165 -103
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +321 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +22 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +112 -175
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupActivation.ts +120 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupAnnotations.ts +146 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +118 -9
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupDiagram.ts +330 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +80 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +123 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +11 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupModuleNavigation.ts +215 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupModules.ts +240 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +21 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverviewSections.ts +66 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPageTree.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPins.ts +6 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRealData.ts +23 -5
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRows.ts +83 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +173 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSettings.ts +218 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +17 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +20 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStatePatch.ts +180 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +17 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +148 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +23 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTitles.ts +33 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupVersions.ts +2 -7
- package/frontend-vue/layers/dms-ui/app/build/utils/previewFixtureAnswers.ts +156 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewFixturesOnly.ts +37 -19
- package/frontend-vue/layers/dms-ui/app/build/utils/previewOptionRules.ts +129 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +108 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +5 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/previewRows.ts +400 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/settingsGroups.ts +73 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/sketch.ts +68 -12
- package/frontend-vue/layers/dms-ui/app/build/utils/urlVariables.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +61 -12
- package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +4 -1
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupModuleStore.ts +2 -0
- 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/registeredSidebarWidgets.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/storeModuleInstaller.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useFixtureBatches.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupActivation.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupOverview.ts +1 -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/useMockupRoutePage.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupSession.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/composables/block-preview/usePersistedCaptures.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/json.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupActivation.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupAnnotations.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupDiagram.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupModuleNavigation.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupOverviewSections.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupRows.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSettings.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupStatePatch.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/entries/utils/mockupTitles.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/previewFixtureAnswers.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/previewRows.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/settingsGroups.ts +1 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +85 -7
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +85 -7
- package/frontend-vue/package.json +2 -2
- package/frontend-vue/scripts/test-dms-components.mjs +1 -1
- package/package.json +6 -5
- package/dist/mockup/row-filters.d.ts +0 -8
- package/dist/mockup/row-filters.js +0 -107
- package/dist/mockup/row-filters.js.map +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +0 -47
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewZoom.vue +0 -67
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
onBeforeUnmount,
|
|
4
|
+
ref,
|
|
5
|
+
shallowRef,
|
|
6
|
+
watch,
|
|
7
|
+
type Ref,
|
|
8
|
+
} from "vue";
|
|
9
|
+
import { isReducedMotionActive } from "../../../utils/reducedMotion";
|
|
10
|
+
import {
|
|
11
|
+
ACTIVATION_FADE_MS,
|
|
12
|
+
nextActivation,
|
|
13
|
+
type Activation,
|
|
14
|
+
type ActivationEvent,
|
|
15
|
+
} from "../../utils/mockupActivation";
|
|
16
|
+
import type { PageCapture } from "../../utils/mockupCaptures";
|
|
17
|
+
|
|
18
|
+
/** How long the browser may take to find the Overview idle before the page view's frame boots anyway. */
|
|
19
|
+
const IDLE_BOOT_TIMEOUT_MS = 3_000;
|
|
20
|
+
|
|
21
|
+
/** How long a browser without idle callbacks waits, once the Overview settled, before the frame boots. */
|
|
22
|
+
const IDLE_BOOT_FALLBACK_MS = 300;
|
|
23
|
+
|
|
24
|
+
/** How long the frame has, from the moment it was handed the render of the page opened, to acknowledge it drawn before it is shown anyway: a frame that failed to draw it never does. */
|
|
25
|
+
const DRAWN_ACK_TIMEOUT_MS = 2_000;
|
|
26
|
+
|
|
27
|
+
/** What the page view's activation is driven by. */
|
|
28
|
+
interface ActivationOptions {
|
|
29
|
+
/** What the frame is to draw, from `activationScope`; undefined while the Overview shows. */
|
|
30
|
+
scope: Readonly<Ref<string | undefined>>;
|
|
31
|
+
/** The URL the frame loads: a page opened in another document renders behind its capture, since that document drew nothing yet. */
|
|
32
|
+
document: Readonly<Ref<string>>;
|
|
33
|
+
/** The image of the page to open that matches what the frame is to draw, if there is one. */
|
|
34
|
+
capture: Readonly<Ref<PageCapture | undefined>>;
|
|
35
|
+
/** Whether a page is asked for, as the URL names one: the frame boots at once, before the state that holds the page arrived. */
|
|
36
|
+
isRequested: Readonly<Ref<boolean>>;
|
|
37
|
+
/** Whether the Overview has every page drawn, or given up on it: the frame boots once it is idle. */
|
|
38
|
+
isSettled: Readonly<Ref<boolean>>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Calls `task` when the browser is idle, and answers the call that takes it back. */
|
|
42
|
+
function whenIdle(task: () => void): () => void {
|
|
43
|
+
if ("requestIdleCallback" in window) {
|
|
44
|
+
const handle = window.requestIdleCallback(task, {
|
|
45
|
+
timeout: IDLE_BOOT_TIMEOUT_MS,
|
|
46
|
+
});
|
|
47
|
+
return () => window.cancelIdleCallback(handle);
|
|
48
|
+
}
|
|
49
|
+
const handle = setTimeout(task, IDLE_BOOT_FALLBACK_MS);
|
|
50
|
+
return () => clearTimeout(handle);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Opening a page, as a state machine rather than a set of flags
|
|
55
|
+
* ({@link Activation}): the page view's frame is booted once, in idle time
|
|
56
|
+
* once the Overview settled, and then kept, so opening a page is a render to
|
|
57
|
+
* a warm frame. A page opened from the Overview renders: its capture shows in
|
|
58
|
+
* the frame's place at once, and the frame, which may still draw a page that
|
|
59
|
+
* is no longer current, is not seen. A page opened while another is drawn
|
|
60
|
+
* swaps: the frame keeps showing the drawn page, with no image over it, until
|
|
61
|
+
* the new one is drawn. Once the frame acknowledges the render drawn
|
|
62
|
+
* ({@link ActivationEvent}, `acknowledge`), it fades in over the image, which
|
|
63
|
+
* goes when the frame is opaque; a frame that never acknowledges is shown
|
|
64
|
+
* {@link DRAWN_ACK_TIMEOUT_MS} after it was handed the render (`posted`), so
|
|
65
|
+
* a render still waiting for its data never uncovers the page drawn before.
|
|
66
|
+
* A page with no capture shows nothing in the frame's place until the frame
|
|
67
|
+
* fades in.
|
|
68
|
+
*/
|
|
69
|
+
export function useMockupActivation(options: ActivationOptions) {
|
|
70
|
+
const state = shallowRef<Activation>({ phase: "idle" });
|
|
71
|
+
const isCovered = ref(false);
|
|
72
|
+
const isBooted = ref(false);
|
|
73
|
+
let uncover: ReturnType<typeof setTimeout> | undefined;
|
|
74
|
+
let grace: ReturnType<typeof setTimeout> | undefined;
|
|
75
|
+
let cancelIdle: (() => void) | undefined;
|
|
76
|
+
|
|
77
|
+
function send(event: ActivationEvent): void {
|
|
78
|
+
state.value = nextActivation(state.value, event);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
watch(
|
|
82
|
+
[options.scope, options.document],
|
|
83
|
+
([scope, document]) =>
|
|
84
|
+
send(
|
|
85
|
+
scope === undefined
|
|
86
|
+
? { type: "close" }
|
|
87
|
+
: { type: "open", scope, document },
|
|
88
|
+
),
|
|
89
|
+
{ immediate: true },
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
function armGrace(scope: string): void {
|
|
93
|
+
clearTimeout(grace);
|
|
94
|
+
grace = setTimeout(
|
|
95
|
+
() => send({ type: "drawn", scope }),
|
|
96
|
+
DRAWN_ACK_TIMEOUT_MS,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
watch(
|
|
100
|
+
state,
|
|
101
|
+
(now, before) => {
|
|
102
|
+
clearTimeout(uncover);
|
|
103
|
+
clearTimeout(grace);
|
|
104
|
+
if (now.phase === "rendering") {
|
|
105
|
+
isCovered.value = true;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (now.phase === "swapping") {
|
|
109
|
+
armGrace(now.scope);
|
|
110
|
+
isCovered.value = false;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (
|
|
114
|
+
now.phase === "drawn" &&
|
|
115
|
+
before?.phase === "rendering" &&
|
|
116
|
+
!isReducedMotionActive()
|
|
117
|
+
) {
|
|
118
|
+
uncover = setTimeout(() => {
|
|
119
|
+
isCovered.value = false;
|
|
120
|
+
}, ACTIVATION_FADE_MS);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
isCovered.value = false;
|
|
124
|
+
},
|
|
125
|
+
{ immediate: true },
|
|
126
|
+
);
|
|
127
|
+
watch(
|
|
128
|
+
[options.isRequested, options.isSettled],
|
|
129
|
+
([isRequested, isSettled]) => {
|
|
130
|
+
if (isBooted.value) return;
|
|
131
|
+
if (isRequested) {
|
|
132
|
+
isBooted.value = true;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (isSettled && !cancelIdle) {
|
|
136
|
+
cancelIdle = whenIdle(() => {
|
|
137
|
+
isBooted.value = true;
|
|
138
|
+
});
|
|
139
|
+
} else if (!isSettled) {
|
|
140
|
+
cancelIdle?.();
|
|
141
|
+
cancelIdle = undefined;
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{ immediate: true },
|
|
145
|
+
);
|
|
146
|
+
onBeforeUnmount(() => {
|
|
147
|
+
clearTimeout(uncover);
|
|
148
|
+
clearTimeout(grace);
|
|
149
|
+
cancelIdle?.();
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
return {
|
|
153
|
+
phase: computed(() => state.value.phase),
|
|
154
|
+
/** The frame acknowledged the render of the page `scope` names drawn: one of another scope than the page opened, as a late one of the page before, changes nothing. */
|
|
155
|
+
acknowledge: (scope: string): void => send({ type: "drawn", scope }),
|
|
156
|
+
/** The frame was handed the render of the page `scope` names: from now it has {@link DRAWN_ACK_TIMEOUT_MS} to acknowledge it. */
|
|
157
|
+
posted: (scope: string): void => {
|
|
158
|
+
const now = state.value;
|
|
159
|
+
if (
|
|
160
|
+
(now.phase !== "rendering" && now.phase !== "swapping") ||
|
|
161
|
+
now.scope !== scope
|
|
162
|
+
)
|
|
163
|
+
return;
|
|
164
|
+
armGrace(scope);
|
|
165
|
+
},
|
|
166
|
+
/** Whether the frame is to be seen: from the moment it acknowledged the page's render drawn, and while it swaps one page for another, which it keeps showing the page drawn before. */
|
|
167
|
+
isFrameShown: computed(
|
|
168
|
+
() => state.value.phase === "drawn" || state.value.phase === "swapping",
|
|
169
|
+
),
|
|
170
|
+
/** Whether the frame takes clicks: only once it drew the page open, never while it still shows the page before. */
|
|
171
|
+
isFrameInteractive: computed(() => state.value.phase === "drawn"),
|
|
172
|
+
/** The image shown in the frame's place: while the page renders, and until the frame is opaque over it. */
|
|
173
|
+
image: computed(() =>
|
|
174
|
+
isCovered.value ? options.capture.value : undefined,
|
|
175
|
+
),
|
|
176
|
+
/** Whether the frame has its document: a page is open, or the Overview settled and the browser is idle. */
|
|
177
|
+
isBooted,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** The activation of the page view. */
|
|
182
|
+
export type MockupActivation = ReturnType<typeof useMockupActivation>;
|
package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupConnectionTables.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ref, shallowRef, watch, type Ref } from "vue";
|
|
2
|
+
import type { JsonValue } from "../../../../../dms-core/app/types/json";
|
|
3
|
+
import { mockupEndpoint } from "../../utils/mockup";
|
|
4
|
+
import {
|
|
5
|
+
parseExplorerTables,
|
|
6
|
+
type ExplorerTable,
|
|
7
|
+
} from "../../utils/mockupSchema";
|
|
8
|
+
|
|
9
|
+
type AuthFetch = ReturnType<typeof useAuthFetch>["$authFetch"];
|
|
10
|
+
|
|
11
|
+
interface ConnectionTablesOptions {
|
|
12
|
+
/** The mockup's name, which names the endpoint that introspects its connection. */
|
|
13
|
+
name: string;
|
|
14
|
+
authFetch: AuthFetch;
|
|
15
|
+
/** The connection the explorer is showing the tables of: undefined while it shows none, which a connection that changes reads again. */
|
|
16
|
+
reading: Readonly<Ref<string | undefined>>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** The tables of a spec's connection, as the viewer reads them. */
|
|
20
|
+
export interface ConnectionTables {
|
|
21
|
+
/** The tables read, or undefined while they are being read or when the read failed. */
|
|
22
|
+
tables: Readonly<Ref<ExplorerTable[] | undefined>>;
|
|
23
|
+
isLoading: Readonly<Ref<boolean>>;
|
|
24
|
+
hasFailed: Readonly<Ref<boolean>>;
|
|
25
|
+
/** Reads the tables again. */
|
|
26
|
+
retry: () => Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Reads `GET /api/mockup/<name>/database` when {@link ConnectionTablesOptions.reading}
|
|
31
|
+
* gains a connection it holds no tables of, and keeps them while the
|
|
32
|
+
* connection stays the same, so closing and reopening the explorer reads
|
|
33
|
+
* nothing again. When the connection goes, a read in flight is dropped and
|
|
34
|
+
* neither loading nor a failure is left on screen. An answer that is not
|
|
35
|
+
* `{ tables }` of well-formed tables is a failure, and the answer of a read a
|
|
36
|
+
* newer one replaced is ignored, so the last read wins whatever order the
|
|
37
|
+
* answers come in.
|
|
38
|
+
*/
|
|
39
|
+
export function useMockupConnectionTables(
|
|
40
|
+
options: ConnectionTablesOptions,
|
|
41
|
+
): ConnectionTables {
|
|
42
|
+
const tables = shallowRef<ExplorerTable[]>();
|
|
43
|
+
const isLoading = ref(false);
|
|
44
|
+
const hasFailed = ref(false);
|
|
45
|
+
let readFor: string | undefined;
|
|
46
|
+
let reads = 0;
|
|
47
|
+
|
|
48
|
+
async function read(): Promise<void> {
|
|
49
|
+
const connection = options.reading.value;
|
|
50
|
+
if (connection === undefined) return;
|
|
51
|
+
const current = ++reads;
|
|
52
|
+
isLoading.value = true;
|
|
53
|
+
hasFailed.value = false;
|
|
54
|
+
if (connection !== readFor) tables.value = undefined;
|
|
55
|
+
const parsed = await options
|
|
56
|
+
.authFetch<JsonValue>(mockupEndpoint(options.name, "/database"))
|
|
57
|
+
.then(parseExplorerTables, () => undefined);
|
|
58
|
+
if (current !== reads) return;
|
|
59
|
+
isLoading.value = false;
|
|
60
|
+
tables.value = parsed;
|
|
61
|
+
readFor = parsed === undefined ? undefined : connection;
|
|
62
|
+
hasFailed.value = parsed === undefined;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
watch(
|
|
66
|
+
options.reading,
|
|
67
|
+
async (connection) => {
|
|
68
|
+
if (connection === undefined) {
|
|
69
|
+
reads += 1;
|
|
70
|
+
isLoading.value = false;
|
|
71
|
+
hasFailed.value = false;
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (connection !== readFor) await read();
|
|
75
|
+
},
|
|
76
|
+
{ immediate: true },
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
return { tables, isLoading, hasFailed, retry: read };
|
|
80
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { computed, ref, watch, type Ref, type WritableComputedRef } from "vue";
|
|
2
|
+
import type { JsonObject } from "../../utils/json";
|
|
3
|
+
import type { MockupEntityState, MockupState } from "../../utils/mockup";
|
|
4
|
+
import {
|
|
5
|
+
entitiesRows,
|
|
6
|
+
entitiesSpec,
|
|
7
|
+
entitiesTables,
|
|
8
|
+
type ExplorerTable,
|
|
9
|
+
type ExplorerView,
|
|
10
|
+
} from "../../utils/mockupSchema";
|
|
11
|
+
import { useMockupConnectionTables } from "./useMockupConnectionTables";
|
|
12
|
+
|
|
13
|
+
type AuthFetch = ReturnType<typeof useAuthFetch>["$authFetch"];
|
|
14
|
+
|
|
15
|
+
/** Where the explorer reads its schema: the spec's entities, or the database the spec connects to. */
|
|
16
|
+
export type MockupDatabaseSource = "spec" | "connection";
|
|
17
|
+
|
|
18
|
+
interface DatabaseOptions {
|
|
19
|
+
/** The mockup's name, which names the endpoint that introspects its connection. */
|
|
20
|
+
name: string;
|
|
21
|
+
/** The state on screen: the previewed version's, else the current one's. */
|
|
22
|
+
shown: Readonly<Ref<MockupState | undefined>>;
|
|
23
|
+
/** The current state, whose connection is the one the backend introspects. */
|
|
24
|
+
current: Readonly<Ref<MockupState | undefined>>;
|
|
25
|
+
/** Opens the page `id` of the mockup. */
|
|
26
|
+
openPage: (id: string) => void;
|
|
27
|
+
authFetch: AuthFetch;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** A page that holds a fixture of an entity. */
|
|
31
|
+
export interface MockupDatabasePage {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The DB explorer of a mockup: its data model, drawn as a diagram and
|
|
38
|
+
* browsed as data. It is on screen over the canvas while open, and offered
|
|
39
|
+
* only when the state on screen has entities or a connection.
|
|
40
|
+
*/
|
|
41
|
+
export interface MockupDatabase {
|
|
42
|
+
/** Whether the state on screen has a data model to show: entities, or a connection to introspect. */
|
|
43
|
+
isAvailable: Readonly<Ref<boolean>>;
|
|
44
|
+
isOpen: Readonly<Ref<boolean>>;
|
|
45
|
+
toggle: () => void;
|
|
46
|
+
close: () => void;
|
|
47
|
+
/** The sources to pick from, in the toggle's order; the toggle shows when there are two. */
|
|
48
|
+
sources: Readonly<Ref<MockupDatabaseSource[]>>;
|
|
49
|
+
/** The source on screen: the one picked, else the introspected database when the spec has a connection, else the spec's entities. */
|
|
50
|
+
source: WritableComputedRef<MockupDatabaseSource>;
|
|
51
|
+
/** The view on screen, which the explorer's Diagram/Data switch moves. */
|
|
52
|
+
view: Ref<ExplorerView>;
|
|
53
|
+
/** Whether the spec has entities, whose JSON the explorer can show. */
|
|
54
|
+
hasJson: Readonly<Ref<boolean>>;
|
|
55
|
+
/** Whether the entities' JSON is on screen in place of the explorer: never while the spec has none. */
|
|
56
|
+
isJsonShown: WritableComputedRef<boolean>;
|
|
57
|
+
/** The table the explorer has open, by name. */
|
|
58
|
+
table: Ref<string | undefined>;
|
|
59
|
+
/** The tables of the source on screen: none while a connected database is read or when its read failed. */
|
|
60
|
+
tables: Readonly<Ref<ExplorerTable[]>>;
|
|
61
|
+
/** The rows of each table of the spec's entities, by table name; undefined for a connected database, whose rows a mockup does not show. */
|
|
62
|
+
rows: Readonly<Ref<Record<string, JsonObject[]> | undefined>>;
|
|
63
|
+
/** Whether the connected database's tables are being read. */
|
|
64
|
+
isLoading: Readonly<Ref<boolean>>;
|
|
65
|
+
/** Whether the read of the connected database's tables failed. */
|
|
66
|
+
hasFailed: Readonly<Ref<boolean>>;
|
|
67
|
+
/** Reads the connected database's tables again. */
|
|
68
|
+
retry: () => Promise<void>;
|
|
69
|
+
/** The spec's entities as `spec.json` writes them, pretty-printed. */
|
|
70
|
+
json: Readonly<Ref<string>>;
|
|
71
|
+
/** The entity of the open table, while the source is the spec's. */
|
|
72
|
+
entity: Readonly<Ref<MockupEntityState | undefined>>;
|
|
73
|
+
/** The pages holding a fixture of {@link entity}, in the spec's order. */
|
|
74
|
+
usedBy: Readonly<Ref<MockupDatabasePage[]>>;
|
|
75
|
+
/** Closes the explorer and opens the page `id`. */
|
|
76
|
+
openPage: (id: string) => void;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The state of the DB explorer: whether it is open, the source, the view,
|
|
81
|
+
* the JSON and the table it is on. The source defaults to the introspected
|
|
82
|
+
* database when the spec has a connection, else to the spec's entities, and a
|
|
83
|
+
* source or the JSON the state on screen no longer offers falls back to the
|
|
84
|
+
* default, so a past version without entities never leaves the explorer on a
|
|
85
|
+
* dead choice. The connected database's tables are read from
|
|
86
|
+
* `GET /api/mockup/<name>/database`, which introspects the current spec's
|
|
87
|
+
* connection, so a past version on screen offers that source only while it
|
|
88
|
+
* names the same connection.
|
|
89
|
+
*/
|
|
90
|
+
export function useMockupDatabase(options: DatabaseOptions): MockupDatabase {
|
|
91
|
+
const entities = computed(() => options.shown.value?.entities ?? []);
|
|
92
|
+
const connection = computed(() => {
|
|
93
|
+
const shownConnection = options.shown.value?.connection;
|
|
94
|
+
return shownConnection === options.current.value?.connection
|
|
95
|
+
? shownConnection
|
|
96
|
+
: undefined;
|
|
97
|
+
});
|
|
98
|
+
const hasEntities = computed(() => entities.value.length > 0);
|
|
99
|
+
const isAvailable = computed(
|
|
100
|
+
() => hasEntities.value || connection.value !== undefined,
|
|
101
|
+
);
|
|
102
|
+
const isOpen = ref(false);
|
|
103
|
+
watch(isAvailable, (isOffered) => {
|
|
104
|
+
if (!isOffered) isOpen.value = false;
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const sources = computed(() => {
|
|
108
|
+
const offered: MockupDatabaseSource[] = [];
|
|
109
|
+
if (hasEntities.value) offered.push("spec");
|
|
110
|
+
if (connection.value !== undefined) offered.push("connection");
|
|
111
|
+
return offered;
|
|
112
|
+
});
|
|
113
|
+
const pickedSource = ref<MockupDatabaseSource>();
|
|
114
|
+
const source = computed<MockupDatabaseSource>({
|
|
115
|
+
get() {
|
|
116
|
+
const picked = pickedSource.value;
|
|
117
|
+
if (picked !== undefined && sources.value.includes(picked)) return picked;
|
|
118
|
+
return connection.value === undefined ? "spec" : "connection";
|
|
119
|
+
},
|
|
120
|
+
set: (next) => {
|
|
121
|
+
pickedSource.value = next;
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
const table = ref<string>();
|
|
125
|
+
watch(source, () => {
|
|
126
|
+
table.value = undefined;
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
const view = ref<ExplorerView>("diagram");
|
|
130
|
+
const isJsonPicked = ref(false);
|
|
131
|
+
const isJsonShown = computed({
|
|
132
|
+
get: () => isJsonPicked.value && hasEntities.value,
|
|
133
|
+
set: (next: boolean) => {
|
|
134
|
+
isJsonPicked.value = next;
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
const connectionTables = useMockupConnectionTables({
|
|
139
|
+
name: options.name,
|
|
140
|
+
authFetch: options.authFetch,
|
|
141
|
+
reading: computed(() =>
|
|
142
|
+
isOpen.value && source.value === "connection"
|
|
143
|
+
? connection.value
|
|
144
|
+
: undefined,
|
|
145
|
+
),
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const isSpec = computed(() => source.value === "spec");
|
|
149
|
+
const tables = computed(() =>
|
|
150
|
+
isSpec.value
|
|
151
|
+
? entitiesTables(entities.value)
|
|
152
|
+
: (connectionTables.tables.value ?? []),
|
|
153
|
+
);
|
|
154
|
+
const rows = computed(() =>
|
|
155
|
+
isSpec.value ? entitiesRows(entities.value) : undefined,
|
|
156
|
+
);
|
|
157
|
+
watch(tables, (now) => {
|
|
158
|
+
const open = table.value;
|
|
159
|
+
if (
|
|
160
|
+
open !== undefined &&
|
|
161
|
+
!now.some((candidate) => candidate.name === open)
|
|
162
|
+
) {
|
|
163
|
+
table.value = undefined;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
const entity = computed(() =>
|
|
168
|
+
isSpec.value
|
|
169
|
+
? entities.value.find((candidate) => candidate.name === table.value)
|
|
170
|
+
: undefined,
|
|
171
|
+
);
|
|
172
|
+
const usedBy = computed(() => {
|
|
173
|
+
const titles = new Map(
|
|
174
|
+
(options.shown.value?.pages ?? []).map((page) => [page.id, page.title]),
|
|
175
|
+
);
|
|
176
|
+
return (entity.value?.pages ?? []).map((id) => ({
|
|
177
|
+
id,
|
|
178
|
+
title: titles.get(id) ?? id,
|
|
179
|
+
}));
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
function close(): void {
|
|
183
|
+
isOpen.value = false;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
isAvailable,
|
|
188
|
+
isOpen,
|
|
189
|
+
toggle: () => {
|
|
190
|
+
isOpen.value = !isOpen.value && isAvailable.value;
|
|
191
|
+
},
|
|
192
|
+
close,
|
|
193
|
+
sources,
|
|
194
|
+
source,
|
|
195
|
+
view,
|
|
196
|
+
hasJson: hasEntities,
|
|
197
|
+
isJsonShown,
|
|
198
|
+
table,
|
|
199
|
+
tables,
|
|
200
|
+
rows,
|
|
201
|
+
isLoading: connectionTables.isLoading,
|
|
202
|
+
hasFailed: connectionTables.hasFailed,
|
|
203
|
+
retry: connectionTables.retry,
|
|
204
|
+
json: computed(() => JSON.stringify(entitiesSpec(entities.value), null, 2)),
|
|
205
|
+
entity,
|
|
206
|
+
usedBy,
|
|
207
|
+
openPage: (id) => {
|
|
208
|
+
close();
|
|
209
|
+
options.openPage(id);
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
}
|
|
@@ -312,6 +312,18 @@ function positionOf(
|
|
|
312
312
|
return { index: address.steps.at(-1) ?? 0, count: siblings.length };
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
+
/** Whether the open page draws a block of the spec page at `index`: the page itself, or one of the pages extending the same target that the open page merges. */
|
|
316
|
+
function drawsSpecPage(options: EditingOptions, index: number): boolean {
|
|
317
|
+
if (index === options.pageIndex.value) return true;
|
|
318
|
+
const page = options.page.value;
|
|
319
|
+
return (
|
|
320
|
+
page !== undefined &&
|
|
321
|
+
Object.values(page.paths).some(
|
|
322
|
+
(pointer) => parseNodePointer(pointer)?.page === index,
|
|
323
|
+
)
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
|
|
315
327
|
function watchSelection(
|
|
316
328
|
core: EditingCore,
|
|
317
329
|
selectedNode: ComputedRef<MockupSpecNode | undefined>,
|
|
@@ -321,7 +333,7 @@ function watchSelection(
|
|
|
321
333
|
watch([spec, () => options.pageIndex.value], () => {
|
|
322
334
|
if (!selectedNode.value) selection.value = undefined;
|
|
323
335
|
const address = selection.value && parseNodePointer(selection.value);
|
|
324
|
-
if (address && address.page
|
|
336
|
+
if (address && !drawsSpecPage(options, address.page)) {
|
|
325
337
|
selection.value = undefined;
|
|
326
338
|
}
|
|
327
339
|
});
|
package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameRender.ts
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { computed, type Ref } from "vue";
|
|
2
|
+
import type {
|
|
3
|
+
PreviewNavigation,
|
|
4
|
+
PreviewRenderMessage,
|
|
5
|
+
} from "../../utils/blockPreviewMessages";
|
|
6
|
+
import type { MockupPageState } from "../../utils/mockup";
|
|
7
|
+
import { activationScope, STORE_SCOPE } from "../../utils/mockupActivation";
|
|
8
|
+
import {
|
|
9
|
+
mockupPageRender,
|
|
10
|
+
mockupRenderScope,
|
|
11
|
+
mockupStoreRender,
|
|
12
|
+
withRenderData,
|
|
13
|
+
} from "../../utils/mockupFrame";
|
|
14
|
+
import { mockupPageParams } from "../../utils/mockupLinks";
|
|
15
|
+
import { withTenantFixtures } from "../../utils/mockupTenancy";
|
|
16
|
+
import type { PreviewHeader } from "../../utils/previewHeader";
|
|
17
|
+
import {
|
|
18
|
+
fixturesForRender,
|
|
19
|
+
useFixtureBatches,
|
|
20
|
+
useFixtureFailureReport,
|
|
21
|
+
} from "./useFixtureBatches";
|
|
22
|
+
import type { MockupSketchStatesChoice } from "./useMockupSketchStates";
|
|
23
|
+
|
|
24
|
+
/** What the page view's frame is posted for the page on screen. */
|
|
25
|
+
export interface FrameRender {
|
|
26
|
+
message: PreviewRenderMessage;
|
|
27
|
+
/** The activation the render belongs to, as `activationScope` names it. */
|
|
28
|
+
activation: string;
|
|
29
|
+
/** The scope the frame names when it says it drew the render. */
|
|
30
|
+
scope: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** What the render of the page view's frame reads. */
|
|
34
|
+
interface FrameRenderOptions {
|
|
35
|
+
/** The mockup's folder name, which its fixture routes are under. */
|
|
36
|
+
name: string;
|
|
37
|
+
/** The row the page shows. */
|
|
38
|
+
record: Readonly<Ref<string | undefined>>;
|
|
39
|
+
/** The query of the page, as its URL gives it. */
|
|
40
|
+
query: Readonly<Ref<Record<string, string> | undefined>>;
|
|
41
|
+
realData: Readonly<Ref<boolean>>;
|
|
42
|
+
/** The tenant the page is drawn as in SaaS mode, which reads its fixtures as that tenant; none in single-tenant mode. */
|
|
43
|
+
tenant: Readonly<Ref<string | undefined>>;
|
|
44
|
+
navigation: Readonly<Ref<PreviewNavigation>>;
|
|
45
|
+
/** Whether the module store is drawn in place of the page. */
|
|
46
|
+
isStoreOpen: Readonly<Ref<boolean>>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The header the module store is drawn under, in the viewer's language. */
|
|
50
|
+
function useStoreHeader() {
|
|
51
|
+
const { t } = useI18n();
|
|
52
|
+
return computed<PreviewHeader>(() => ({
|
|
53
|
+
title: t("dms.mockup.store_title"),
|
|
54
|
+
icon: "i-ph-squares-four",
|
|
55
|
+
description: t("dms.mockup.store_description"),
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* What the page view's frame draws, as a render to post: the page, as the
|
|
61
|
+
* tenant sees it, with the fixtures it reads from its batch, or the module
|
|
62
|
+
* store while it is open. A page is rendered only once its batch is read,
|
|
63
|
+
* since the frame has no other way to answer its reads.
|
|
64
|
+
*/
|
|
65
|
+
export function useMockupFrameRender(
|
|
66
|
+
options: FrameRenderOptions,
|
|
67
|
+
sketchStates: Pick<MockupSketchStatesChoice, "treeOf">,
|
|
68
|
+
) {
|
|
69
|
+
const batches = useFixtureBatches(useAuthFetch().$authFetch);
|
|
70
|
+
const reportFailure = useFixtureFailureReport();
|
|
71
|
+
const storeHeader = useStoreHeader();
|
|
72
|
+
|
|
73
|
+
function storeRender(page: MockupPageState): FrameRender {
|
|
74
|
+
return {
|
|
75
|
+
message: withRenderData(
|
|
76
|
+
mockupStoreRender(page, options.navigation.value, storeHeader.value),
|
|
77
|
+
{ scope: STORE_SCOPE },
|
|
78
|
+
),
|
|
79
|
+
activation: STORE_SCOPE,
|
|
80
|
+
scope: STORE_SCOPE,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async function pageRender(
|
|
85
|
+
page: MockupPageState,
|
|
86
|
+
): Promise<FrameRender | undefined> {
|
|
87
|
+
const tenant = options.tenant.value;
|
|
88
|
+
const realData = options.realData.value;
|
|
89
|
+
const picked = sketchStates.treeOf(page, realData);
|
|
90
|
+
const tree =
|
|
91
|
+
tenant === undefined
|
|
92
|
+
? picked
|
|
93
|
+
: withTenantFixtures(picked, options.name, tenant);
|
|
94
|
+
const params = mockupPageParams(page, options.record.value);
|
|
95
|
+
const read = await fixturesForRender(batches, page, tenant, reportFailure);
|
|
96
|
+
if (!read) return undefined;
|
|
97
|
+
const scope = mockupRenderScope(page.id, tenant, realData, tree, params);
|
|
98
|
+
return {
|
|
99
|
+
message: withRenderData(
|
|
100
|
+
mockupPageRender(
|
|
101
|
+
page,
|
|
102
|
+
tree,
|
|
103
|
+
options.navigation.value,
|
|
104
|
+
params,
|
|
105
|
+
options.query.value,
|
|
106
|
+
),
|
|
107
|
+
{ scope, fixtures: read.fixtures },
|
|
108
|
+
),
|
|
109
|
+
activation: activationScope(page.id, tenant, realData),
|
|
110
|
+
scope,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
/** The header of the module store, which a change of language redraws. */
|
|
116
|
+
storeHeader,
|
|
117
|
+
/**
|
|
118
|
+
* The render of `page`, or of the module store when it is open; undefined
|
|
119
|
+
* when the page's fixtures could not be read, which is reported.
|
|
120
|
+
*/
|
|
121
|
+
renderOf: (page: MockupPageState): Promise<FrameRender | undefined> =>
|
|
122
|
+
options.isStoreOpen.value
|
|
123
|
+
? Promise.resolve(storeRender(page))
|
|
124
|
+
: pageRender(page),
|
|
125
|
+
};
|
|
126
|
+
}
|
package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameSize.ts
CHANGED
|
@@ -14,10 +14,11 @@ interface FrameSizeOptions {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* The size the page view draws the preview frame at: its true width,
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* scrolls.
|
|
17
|
+
* The size the page view draws the preview frame at: its true width, scaled
|
|
18
|
+
* by the zoom, so the page lays out as on that screen, and at least as tall
|
|
19
|
+
* as the canvas shows, so a short page fills the window and a long one
|
|
20
|
+
* scrolls. Until a zoom is chosen the frame is fitted: shrunk to the canvas's
|
|
21
|
+
* width, never enlarged, and following the canvas as it resizes.
|
|
21
22
|
*/
|
|
22
23
|
export function useMockupFrameSize(options: FrameSizeOptions) {
|
|
23
24
|
const canvasWidth = ref(0);
|
|
@@ -27,11 +28,13 @@ export function useMockupFrameSize(options: FrameSizeOptions) {
|
|
|
27
28
|
canvasHeight.value = entry?.contentRect.height ?? 0;
|
|
28
29
|
});
|
|
29
30
|
const frameWidth = computed(() => MOCKUP_WIDTHS[options.width.value]);
|
|
30
|
-
const
|
|
31
|
+
const zoom = ref<number>();
|
|
32
|
+
const fitScale = computed(() =>
|
|
31
33
|
canvasWidth.value > 0
|
|
32
34
|
? Math.min(1, canvasWidth.value / frameWidth.value)
|
|
33
35
|
: 1,
|
|
34
36
|
);
|
|
37
|
+
const scale = computed(() => zoom.value ?? fitScale.value);
|
|
35
38
|
const fillHeight = computed(() =>
|
|
36
39
|
fillingHeight(canvasHeight.value, scale.value),
|
|
37
40
|
);
|
|
@@ -49,6 +52,8 @@ export function useMockupFrameSize(options: FrameSizeOptions) {
|
|
|
49
52
|
return {
|
|
50
53
|
frameWidth,
|
|
51
54
|
frameHeight,
|
|
55
|
+
zoom,
|
|
56
|
+
fitScale,
|
|
52
57
|
scale,
|
|
53
58
|
fillHeight,
|
|
54
59
|
previewStyle,
|