@antelopejs/dms 0.25.5 → 0.25.6-next.1135.gc1cba20
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/E2E.md +1 -1
- package/README.md +16 -16
- package/data/mockup-spec.schema.json +289 -5
- package/dist/implementations/dms-auth/account-emails.js +2 -2
- package/dist/implementations/dms-auth/account-emails.js.map +1 -1
- package/dist/implementations/dms-auth/index.js +1 -2
- package/dist/implementations/dms-auth/index.js.map +1 -1
- package/dist/implementations/dms-base/group-order.d.ts +18 -0
- package/dist/implementations/dms-base/group-order.js +66 -0
- package/dist/implementations/dms-base/group-order.js.map +1 -0
- package/dist/implementations/dms-base/search-route.js +8 -5
- package/dist/implementations/dms-base/search-route.js.map +1 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js +4 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/dms-database.js.map +1 -1
- package/dist/implementations/dms-builder/engine/driver-probe.d.ts +1 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.js +5 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-emit.js +4 -0
- package/dist/implementations/dms-builder/engine/resource-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/theme-assets.js +5 -17
- package/dist/implementations/dms-builder/engine/theme-assets.js.map +1 -1
- package/dist/mcp/tool.d.ts +1 -1
- package/dist/mcp/tools/mockup-apply-to-page.js +1 -1
- package/dist/mcp/tools/mockup-apply-to-page.js.map +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-write-spec.js +1 -1
- package/dist/mcp/tools/mockup-write-spec.js.map +1 -1
- package/dist/mockup/apply-notes.d.ts +1 -1
- package/dist/mockup/apply-notes.js +2 -1
- package/dist/mockup/apply-notes.js.map +1 -1
- package/dist/mockup/apply-plan.js +3 -0
- package/dist/mockup/apply-plan.js.map +1 -1
- package/dist/mockup/capture-routes.d.ts +18 -0
- package/dist/mockup/capture-routes.js +101 -0
- package/dist/mockup/capture-routes.js.map +1 -0
- package/dist/mockup/capture.d.ts +10 -0
- package/dist/mockup/capture.js +64 -0
- package/dist/mockup/capture.js.map +1 -0
- package/dist/mockup/compile.js +16 -8
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/controller-blocks.js +62 -10
- package/dist/mockup/controller-blocks.js.map +1 -1
- package/dist/mockup/display-values.js +1 -1
- package/dist/mockup/display-values.js.map +1 -1
- package/dist/mockup/files.d.ts +2 -1
- package/dist/mockup/files.js +3 -2
- package/dist/mockup/files.js.map +1 -1
- package/dist/mockup/fixtures.d.ts +3 -1
- package/dist/mockup/fixtures.js +25 -2
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/form-fields.js +10 -1
- package/dist/mockup/form-fields.js.map +1 -1
- package/dist/mockup/header-action.d.ts +47 -0
- package/dist/mockup/header-action.js +46 -0
- package/dist/mockup/header-action.js.map +1 -0
- package/dist/mockup/history-routes.js +8 -1
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/json-schema-header.d.ts +2 -0
- package/dist/mockup/json-schema-header.js +69 -0
- package/dist/mockup/json-schema-header.js.map +1 -0
- package/dist/mockup/json-schema-layout.d.ts +2 -0
- package/dist/mockup/json-schema-layout.js +61 -0
- package/dist/mockup/json-schema-layout.js.map +1 -0
- package/dist/mockup/json-schema.js +5 -16
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/model.d.ts +204 -18
- package/dist/mockup/model.js +46 -12
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/page-links.d.ts +2 -1
- package/dist/mockup/page-links.js +14 -3
- package/dist/mockup/page-links.js.map +1 -1
- package/dist/mockup/refusals.d.ts +1 -0
- package/dist/mockup/refusals.js +1 -0
- package/dist/mockup/refusals.js.map +1 -1
- package/dist/mockup/routes.js +11 -1
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/sample-rows.js +4 -0
- package/dist/mockup/sample-rows.js.map +1 -1
- package/dist/mockup/store.d.ts +1 -0
- package/dist/mockup/store.js +9 -19
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/summary-fields.d.ts +20 -0
- package/dist/mockup/summary-fields.js +22 -0
- package/dist/mockup/summary-fields.js.map +1 -0
- package/dist/mockup/table-columns.js +9 -3
- package/dist/mockup/table-columns.js.map +1 -1
- package/dist/mockup/table-options.d.ts +4 -1
- package/dist/mockup/table-options.js +40 -2
- package/dist/mockup/table-options.js.map +1 -1
- package/dist/mockup/table-param-filters.d.ts +52 -0
- package/dist/mockup/table-param-filters.js +83 -0
- package/dist/mockup/table-param-filters.js.map +1 -0
- package/dist/mockup/table-row-actions.d.ts +2 -0
- package/dist/mockup/table-row-actions.js +85 -0
- package/dist/mockup/table-row-actions.js.map +1 -0
- package/dist/mockup/unknown-keys.d.ts +3 -0
- package/dist/mockup/unknown-keys.js +45 -0
- package/dist/mockup/unknown-keys.js.map +1 -0
- package/dist/mockup/validate.d.ts +7 -1
- package/dist/mockup/validate.js +76 -3
- package/dist/mockup/validate.js.map +1 -1
- package/dist/pages/account.d.ts +1 -0
- package/dist/pages/account.js +1 -0
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/settings/overview/account-summary.d.ts +2 -0
- package/dist/pages/settings/overview/account-summary.js +17 -8
- package/dist/pages/settings/overview/account-summary.js.map +1 -1
- package/dist/pages/settings/settings-index.js +2 -1
- package/dist/pages/settings/settings-index.js.map +1 -1
- package/dist/realtime/sse.js +2 -4
- package/dist/realtime/sse.js.map +1 -1
- package/dist/store/internal/frontend/dev-reload.js +7 -1
- package/dist/store/internal/frontend/dev-reload.js.map +1 -1
- package/dist/utils/account-notifications.js +1 -0
- package/dist/utils/account-notifications.js.map +1 -1
- package/dist/utils/email-change-mail.js +2 -2
- package/dist/utils/email-change-mail.js.map +1 -1
- package/dist/utils/email-plain-text.d.ts +1 -0
- package/dist/utils/email-plain-text.js +95 -0
- package/dist/utils/email-plain-text.js.map +1 -0
- package/dist/utils/export-jobs.js +2 -2
- package/dist/utils/export-jobs.js.map +1 -1
- package/dist/utils/html-email.d.ts +8 -0
- package/dist/utils/html-email.js +9 -0
- package/dist/utils/html-email.js.map +1 -0
- package/dist/utils/image-signatures.d.ts +3 -0
- package/dist/utils/image-signatures.js +22 -0
- package/dist/utils/image-signatures.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/sse-keepalive/index.d.ts +3 -0
- package/dist/utils/sse-keepalive/index.js +8 -0
- package/dist/utils/sse-keepalive/index.js.map +1 -0
- package/dist/validation/allowed-keys.d.ts +2 -0
- package/dist/validation/allowed-keys.js +16 -0
- package/dist/validation/allowed-keys.js.map +1 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +1 -0
- package/dist/validation/index.js.map +1 -1
- package/frontend-vue/.prettierignore +1 -0
- package/frontend-vue/build/backend-boundary.ts +80 -80
- package/frontend-vue/eslint-globals.generated.mjs +2 -2
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/login.vue +4 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +17 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +3 -0
- package/frontend-vue/layers/dms-auth/i18n/locales/auth-fr-FR.json +10 -10
- package/frontend-vue/layers/dms-auth/server/backend-answers.ts +12 -9
- package/frontend-vue/layers/dms-auth/server/oauth.ts +6 -6
- package/frontend-vue/layers/dms-core/app/build/composables/api-error.ts +8 -0
- package/frontend-vue/layers/dms-core/app/build/composables/field-errors.ts +485 -0
- package/frontend-vue/layers/dms-core/app/build/composables/useHydrated.ts +27 -0
- package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +1 -2
- package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +3 -2
- package/frontend-vue/layers/dms-core/app/composables/period/types.ts +1 -4
- package/frontend-vue/layers/dms-core/app/composables/translation/useUniqueLocales.ts +23 -5
- package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +2 -3
- package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +12 -443
- package/frontend-vue/layers/dms-core/app/composables/useFormValidation.ts +1 -2
- package/frontend-vue/layers/dms-core/app/entries/composables/useHydrated.ts +1 -0
- package/frontend-vue/layers/dms-core/app/types/composed-text.ts +1 -4
- package/frontend-vue/layers/dms-core/app/types/confirm-dialog.ts +1 -2
- package/frontend-vue/layers/dms-core/app/types/data-type.ts +1 -2
- package/frontend-vue/layers/dms-core/app/types/json.ts +1 -3
- package/frontend-vue/layers/dms-core/app/types/module-store.ts +3 -17
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +8 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +8 -0
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/app.config.ts +1 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +7 -4
- package/frontend-vue/layers/dms-layout/app/build/components/layout/EmptyLayoutBrand.vue +49 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/LayoutFooter.vue +2 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +3 -2
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +29 -10
- package/frontend-vue/layers/dms-layout/app/build/components/layout/StageCard.vue +1 -5
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +3 -8
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +11 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +9 -12
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixCategory.vue +6 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixSubject.vue +27 -22
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +8 -10
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/notificationDisplay.ts +39 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-permissions.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +38 -5
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfilePreferences.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityOverview.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/build/utils/dev-reload-stream.ts +23 -4
- package/frontend-vue/layers/dms-layout/app/build/utils/module-store-install.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/composables/notification/useNotifications.ts +1 -5
- package/frontend-vue/layers/dms-layout/app/custom-layouts/EmptyLayout.vue +39 -31
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +60 -4
- package/frontend-vue/layers/dms-layout/app/entries/components/pages/settings/shell/SettingsShell.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/error.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +7 -1
- package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +14 -1
- package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +13 -0
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +1 -1
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +5 -5
- package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/steps/StepPlatform.vue +3 -0
- package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/StepRegister.vue +3 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupHeaderActions.vue +1 -4
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIssues.vue +22 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +125 -178
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewArrows.vue +110 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewFrameImage.vue +75 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +117 -6
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewZoom.vue +67 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +10 -4
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +8 -1
- package/frontend-vue/layers/dms-ui/app/build/components/blocks/BlockActions.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/ExpandedRowDetail.vue +26 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +247 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCaptureAssets.ts +181 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +8 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewRaster.ts +45 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +46 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +109 -35
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRealData.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +4 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSectionEditing.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +3 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +136 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +68 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewLinks.ts +17 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/blocks/useRefreshTriggers.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/fetchedConfirmDialog.ts +6 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDisplayComponents.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +38 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerFieldTypes.ts +69 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +20 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentErrors.ts +1 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentRealtime.ts +4 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentValidation.ts +4 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/form/keyValueRows.ts +36 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodQuery.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewDisplayContext.ts +35 -37
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewGrouping.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewListing.ts +21 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewSorting.ts +8 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useGroupedRows.ts +32 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLiveHold.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/displayOptions.ts +14 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +68 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/recordLink.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +74 -51
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +18 -11
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupThumbnail.vue +34 -124
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +7 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewCapture.ts +96 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +29 -118
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +61 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/dotGrid.ts +37 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/legalIdentifier.ts +279 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +34 -5
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +130 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +7 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +35 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +44 -17
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +26 -14
- package/frontend-vue/layers/dms-ui/app/build/utils/previewHeader.ts +154 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +149 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +42 -0
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +56 -6
- package/frontend-vue/layers/dms-ui/app/components/blocks/BannerBlock.vue +3 -4
- package/frontend-vue/layers/dms-ui/app/components/blocks/KeyValueListBlock.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/blocks/StatGroupBlock.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/code-snippet/CodeSnippet.vue +2 -3
- package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +7 -7
- package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +4 -7
- package/frontend-vue/layers/dms-ui/app/components/form/FormBlock.vue +5 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCalendar.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCode.vue +1 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputIdentifier.vue +90 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPhone.vue +5 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/KeyValue.vue +2 -20
- package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +52 -21
- package/frontend-vue/layers/dms-ui/app/composables/confirm/types.ts +5 -4
- package/frontend-vue/layers/dms-ui/app/composables/containers/types.ts +5 -8
- package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +3 -8
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +4 -2
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +15 -10
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCapture.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCaptureAssets.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePreviewFrame.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/table-view/utils/displayOptions.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/mockups/manage.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/legalIdentifier.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupCaptures.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/types/modal.ts +1 -9
- package/frontend-vue/layers/dms-ui/app/types/quick-actions.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/types/table/query.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/utils/mockupAssistant.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/utils/semanticTint.ts +1 -6
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +2 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +12 -10
- package/frontend-vue/package.json +5 -5
- package/frontend-vue/scripts/check-api-error-presentation.mjs +3 -3
- package/frontend-vue/scripts/check-invariants.mjs +101 -0
- package/frontend-vue/scripts/check-page-invariants.mjs +6 -9
- package/frontend-vue/scripts/dms-components-script.mjs +7 -7
- package/package.json +10 -11
- package/skills/dms/SKILL.md +4 -2
- package/skills/dms-module/SKILL.md +3 -0
package/E2E.md
CHANGED
|
@@ -130,7 +130,7 @@ test("the administrator reads the onboarding state", async () => {
|
|
|
130
130
|
4. Give each journey that needs the development dashboard `frontend: "dev"`, and add `e2e/playwright.dev.config.ts` with `e2eConfig({ frontend: "dev" })`. Run it with `playwright test -c e2e/playwright.dev.config.ts`.
|
|
131
131
|
5. A journey that fails today because of a product finding gets `knownFailures`, never a skip. A journey that changes the run's playground for later backends gets `last: true`.
|
|
132
132
|
6. Tag `@smoke` on about 5 fast journeys, the `smoke` journey first, none that needs `backend: "watch"`, `withBaseBackend`, `standby: false` or `frontend: "dev"`.
|
|
133
|
-
7. Copy the `e2e` and `e2e-report` jobs of
|
|
133
|
+
7. Copy AntelopeJS/dms's `e2e.yml` reusable workflow, which holds the `e2e` and `e2e-report` jobs, and the `e2e` job of its `ci.yml` that calls it with the tier, along with the `e2e` line of its `ubuntu` gate. Nothing runs on a draft or the none tier. A pull request runs `--grep @smoke`. The merge queue, a manual run, a pull request labelled `ci:full` and the nightly schedule run the whole suite with `--shard=i/N --add-reporter=blob`, which keeps the config's reporters, with N chosen so that one shard stays under about 30 minutes, and `e2e-report` merges the shards' blob reports. A dev config runs in the same job, after the build config.
|
|
134
134
|
|
|
135
135
|
## Move off verify.config.ts
|
|
136
136
|
|
package/README.md
CHANGED
|
@@ -77,22 +77,22 @@ export class SalesPage extends PageController("sales", {
|
|
|
77
77
|
|
|
78
78
|
<!-- antelopejs-docs-compat:start -->
|
|
79
79
|
|
|
80
|
-
| Package | Supported
|
|
81
|
-
| ------------------------------------------- |
|
|
82
|
-
| `@antelopejs/core` | `~1.24.5`
|
|
83
|
-
| `@antelopejs/interface-api` | `>=0.3.5 <0.4.0`
|
|
84
|
-
| `@antelopejs/interface-api-util` | `>=0.3.3 <0.4.0`
|
|
85
|
-
| `@antelopejs/interface-core` | `>=0.5.2 <0.6.0`
|
|
86
|
-
| `@antelopejs/interface-data-api` | `>=0.8.2 <0.9.0`
|
|
87
|
-
| `@antelopejs/interface-database` | `>=0.4.
|
|
88
|
-
| `@antelopejs/interface-database-catalog` | `>=0.1.1 <0.2.0`
|
|
89
|
-
| `@antelopejs/interface-database-decorators` | `>=0.5.4 <0.6.0`
|
|
90
|
-
| `@antelopejs/interface-dms` | `^0.17.3`
|
|
91
|
-
| `@antelopejs/interface-dms-automation` | `>=0.7.0 <0.8.0`
|
|
92
|
-
| `@antelopejs/interface-dms-builder` | `^0.6.4`
|
|
93
|
-
| `@antelopejs/interface-email` | `>=0.2.
|
|
94
|
-
| `@antelopejs/interface-file-storage` | `>=0.1.
|
|
95
|
-
| `@antelopejs/interface-redis` | `>=0.0.9 <0.1.0`
|
|
80
|
+
| Package | Supported | Tested with |
|
|
81
|
+
| ------------------------------------------- | ----------------- | ----------- |
|
|
82
|
+
| `@antelopejs/core` | `~1.24.5` | `1.24.12` |
|
|
83
|
+
| `@antelopejs/interface-api` | `>=0.3.5 <0.4.0` | `0.3.5` |
|
|
84
|
+
| `@antelopejs/interface-api-util` | `>=0.3.3 <0.4.0` | `0.3.3` |
|
|
85
|
+
| `@antelopejs/interface-core` | `>=0.5.2 <0.6.0` | `0.5.2` |
|
|
86
|
+
| `@antelopejs/interface-data-api` | `>=0.8.2 <0.9.0` | `0.8.2` |
|
|
87
|
+
| `@antelopejs/interface-database` | `>=0.4.5 <0.5.0` | `0.4.5` |
|
|
88
|
+
| `@antelopejs/interface-database-catalog` | `>=0.1.1 <0.2.0` | `0.1.1` |
|
|
89
|
+
| `@antelopejs/interface-database-decorators` | `>=0.5.4 <0.6.0` | `0.5.4` |
|
|
90
|
+
| `@antelopejs/interface-dms` | `^0.17.3` | `0.17.3` |
|
|
91
|
+
| `@antelopejs/interface-dms-automation` | `>=0.7.0 <0.8.0` | `0.7.2` |
|
|
92
|
+
| `@antelopejs/interface-dms-builder` | `^0.6.4` | `0.6.4` |
|
|
93
|
+
| `@antelopejs/interface-email` | `>=0.2.2 <0.3.0` | `0.2.2` |
|
|
94
|
+
| `@antelopejs/interface-file-storage` | `>=0.1.10 <0.2.0` | `0.1.10` |
|
|
95
|
+
| `@antelopejs/interface-redis` | `>=0.0.9 <0.1.0` | `0.0.11` |
|
|
96
96
|
|
|
97
97
|
<!-- antelopejs-docs-compat:end -->
|
|
98
98
|
|
|
@@ -290,7 +290,7 @@
|
|
|
290
290
|
"route": {
|
|
291
291
|
"type": "string",
|
|
292
292
|
"pattern": "^:[A-Za-z_][A-Za-z0-9_]*$",
|
|
293
|
-
"description": "A route parameter, \":id\": the page shows one row. An option \"fixture:<key>\" naming a parent's rows reads the row whose _id, else id, is the parameter,
|
|
293
|
+
"description": "A route parameter, \":id\": the page shows one row. An option \"fixture:<key>\" naming a parent's rows reads the row whose _id, else id, is the parameter, a \"page:<id>\" link from a table row passes that row's id, and a TableView lists only the rows of a parent's fixture that belong to it with routeParamFilters, { \"id\": { \"field\": \"orderId\" } }. Needs a parent."
|
|
294
294
|
},
|
|
295
295
|
"icon": {
|
|
296
296
|
"type": "string",
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
"label"
|
|
309
309
|
],
|
|
310
310
|
"additionalProperties": false,
|
|
311
|
-
"description": "A button right of the page title, as a PageHeaderButton of DefaultLayout({ headerActions })
|
|
311
|
+
"description": "A button right of the page title, as a PageHeaderButton of DefaultLayout({ headerActions }) writes it: its look, the page of the mockup it opens and the dialog it asks in first.",
|
|
312
312
|
"properties": {
|
|
313
313
|
"label": {
|
|
314
314
|
"type": "string"
|
|
@@ -336,11 +336,238 @@
|
|
|
336
336
|
"ghost",
|
|
337
337
|
"link"
|
|
338
338
|
]
|
|
339
|
+
},
|
|
340
|
+
"target": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"required": [
|
|
343
|
+
"type",
|
|
344
|
+
"url"
|
|
345
|
+
],
|
|
346
|
+
"additionalProperties": false,
|
|
347
|
+
"description": "The page of the mockup the button opens: { \"type\": \"page\", \"url\": \"page:<id>\" }.",
|
|
348
|
+
"properties": {
|
|
349
|
+
"type": {
|
|
350
|
+
"const": "page"
|
|
351
|
+
},
|
|
352
|
+
"url": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"pattern": "^page:"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"confirm": {
|
|
359
|
+
"type": "object",
|
|
360
|
+
"required": [
|
|
361
|
+
"title"
|
|
362
|
+
],
|
|
363
|
+
"additionalProperties": false,
|
|
364
|
+
"description": "The dialog the button asks in before it goes, as a fixed ConfirmDialog writes it; confirming opens its target, cancelling stays. A dialog the server words ({ from }), its fields and its component are code.",
|
|
365
|
+
"properties": {
|
|
366
|
+
"title": {
|
|
367
|
+
"type": "string"
|
|
368
|
+
},
|
|
369
|
+
"description": {
|
|
370
|
+
"type": "string"
|
|
371
|
+
},
|
|
372
|
+
"params": {
|
|
373
|
+
"type": "object",
|
|
374
|
+
"additionalProperties": {
|
|
375
|
+
"type": [
|
|
376
|
+
"string",
|
|
377
|
+
"number"
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
"description": "Values the texts are interpolated with: {name}."
|
|
381
|
+
},
|
|
382
|
+
"icon": {
|
|
383
|
+
"type": "string"
|
|
384
|
+
},
|
|
385
|
+
"color": {
|
|
386
|
+
"enum": [
|
|
387
|
+
"neutral",
|
|
388
|
+
"primary",
|
|
389
|
+
"secondary",
|
|
390
|
+
"success",
|
|
391
|
+
"warning",
|
|
392
|
+
"error",
|
|
393
|
+
"info"
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
"confirmLabel": {
|
|
397
|
+
"type": "string"
|
|
398
|
+
},
|
|
399
|
+
"cancelLabel": {
|
|
400
|
+
"type": "string"
|
|
401
|
+
},
|
|
402
|
+
"impact": {
|
|
403
|
+
"type": "array",
|
|
404
|
+
"items": {
|
|
405
|
+
"type": "object",
|
|
406
|
+
"required": [
|
|
407
|
+
"icon",
|
|
408
|
+
"label"
|
|
409
|
+
],
|
|
410
|
+
"additionalProperties": false,
|
|
411
|
+
"description": "One dependent the action affects, listed above the buttons.",
|
|
412
|
+
"properties": {
|
|
413
|
+
"icon": {
|
|
414
|
+
"type": "string"
|
|
415
|
+
},
|
|
416
|
+
"label": {
|
|
417
|
+
"type": "string"
|
|
418
|
+
},
|
|
419
|
+
"count": {
|
|
420
|
+
"type": [
|
|
421
|
+
"number",
|
|
422
|
+
"string"
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"blocked": {
|
|
429
|
+
"type": "boolean",
|
|
430
|
+
"description": "The action cannot run: the dialog only explains why."
|
|
431
|
+
},
|
|
432
|
+
"confirmText": {
|
|
433
|
+
"type": "string",
|
|
434
|
+
"description": "Text the user types to confirm."
|
|
435
|
+
},
|
|
436
|
+
"confirmTextCaseInsensitive": {
|
|
437
|
+
"type": "boolean"
|
|
438
|
+
}
|
|
439
|
+
}
|
|
339
440
|
}
|
|
340
441
|
}
|
|
341
442
|
},
|
|
342
443
|
"description": "The buttons right of the title, in order, as DefaultLayout({ headerActions }) declares them."
|
|
343
444
|
},
|
|
445
|
+
"layout": {
|
|
446
|
+
"description": "The layout the page is drawn and built in: \"default\" (DefaultLayout, the dashboard frame), \"form-page\" (FormPageLayout, the frame with a readable column), \"settings\" (SettingsLayout, the frame with the settings navigation) or \"empty\" (EmptyLayout, no sidebar, no top bar and no page header). A name, or { type, options } with the layout's options. Absent, the page takes the dashboard frame.",
|
|
447
|
+
"oneOf": [
|
|
448
|
+
{
|
|
449
|
+
"enum": [
|
|
450
|
+
"default",
|
|
451
|
+
"form-page",
|
|
452
|
+
"settings",
|
|
453
|
+
"empty"
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"type": "object",
|
|
458
|
+
"required": [
|
|
459
|
+
"type"
|
|
460
|
+
],
|
|
461
|
+
"additionalProperties": false,
|
|
462
|
+
"properties": {
|
|
463
|
+
"type": {
|
|
464
|
+
"const": "default"
|
|
465
|
+
},
|
|
466
|
+
"options": {
|
|
467
|
+
"type": "object",
|
|
468
|
+
"additionalProperties": false,
|
|
469
|
+
"properties": {
|
|
470
|
+
"fullWidth": {
|
|
471
|
+
"type": "boolean",
|
|
472
|
+
"default": true,
|
|
473
|
+
"description": "The blocks span the whole panel; false keeps them in a readable column."
|
|
474
|
+
},
|
|
475
|
+
"hideHeader": {
|
|
476
|
+
"type": "boolean",
|
|
477
|
+
"description": "Leaves out the page header: its title, icon, description and buttons."
|
|
478
|
+
},
|
|
479
|
+
"fillHeight": {
|
|
480
|
+
"type": "boolean",
|
|
481
|
+
"description": "The page fills the height of the frame, and its last block takes what is left."
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"type": "object",
|
|
489
|
+
"required": [
|
|
490
|
+
"type"
|
|
491
|
+
],
|
|
492
|
+
"additionalProperties": false,
|
|
493
|
+
"properties": {
|
|
494
|
+
"type": {
|
|
495
|
+
"const": "form-page"
|
|
496
|
+
},
|
|
497
|
+
"options": {
|
|
498
|
+
"type": "object",
|
|
499
|
+
"additionalProperties": false,
|
|
500
|
+
"properties": {
|
|
501
|
+
"hideHeader": {
|
|
502
|
+
"type": "boolean",
|
|
503
|
+
"description": "Leaves out the page header: its title, icon, description and buttons."
|
|
504
|
+
},
|
|
505
|
+
"fillHeight": {
|
|
506
|
+
"type": "boolean",
|
|
507
|
+
"description": "The page fills the height of the frame, and its last block takes what is left."
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"type": "object",
|
|
515
|
+
"required": [
|
|
516
|
+
"type"
|
|
517
|
+
],
|
|
518
|
+
"additionalProperties": false,
|
|
519
|
+
"properties": {
|
|
520
|
+
"type": {
|
|
521
|
+
"const": "settings"
|
|
522
|
+
},
|
|
523
|
+
"options": {
|
|
524
|
+
"type": "object",
|
|
525
|
+
"additionalProperties": false,
|
|
526
|
+
"properties": {
|
|
527
|
+
"hideHeader": {
|
|
528
|
+
"type": "boolean",
|
|
529
|
+
"description": "Leaves out the page header: its title, icon, description and buttons."
|
|
530
|
+
},
|
|
531
|
+
"fillHeight": {
|
|
532
|
+
"type": "boolean",
|
|
533
|
+
"description": "The page fills the height of the frame, and its last block takes what is left."
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"type": "object",
|
|
541
|
+
"required": [
|
|
542
|
+
"type"
|
|
543
|
+
],
|
|
544
|
+
"additionalProperties": false,
|
|
545
|
+
"properties": {
|
|
546
|
+
"type": {
|
|
547
|
+
"const": "empty"
|
|
548
|
+
},
|
|
549
|
+
"options": {
|
|
550
|
+
"type": "object",
|
|
551
|
+
"additionalProperties": false,
|
|
552
|
+
"properties": {
|
|
553
|
+
"hideBrand": {
|
|
554
|
+
"type": "boolean",
|
|
555
|
+
"description": "Leaves out the app logo and the theme toggle above the page."
|
|
556
|
+
},
|
|
557
|
+
"hideFooter": {
|
|
558
|
+
"type": "boolean",
|
|
559
|
+
"description": "Leaves out the footer under the page."
|
|
560
|
+
},
|
|
561
|
+
"fillHeight": {
|
|
562
|
+
"type": "boolean",
|
|
563
|
+
"description": "The page fills the height of the window, and its last block takes what is left."
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
]
|
|
570
|
+
},
|
|
344
571
|
"options": {
|
|
345
572
|
"type": "object",
|
|
346
573
|
"additionalProperties": false,
|
|
@@ -10372,6 +10599,12 @@
|
|
|
10372
10599
|
},
|
|
10373
10600
|
"label": {
|
|
10374
10601
|
"type": "string"
|
|
10602
|
+
},
|
|
10603
|
+
"fullWidth": {
|
|
10604
|
+
"type": "boolean"
|
|
10605
|
+
},
|
|
10606
|
+
"hideEmpty": {
|
|
10607
|
+
"type": "boolean"
|
|
10375
10608
|
}
|
|
10376
10609
|
},
|
|
10377
10610
|
"required": [
|
|
@@ -10723,7 +10956,8 @@
|
|
|
10723
10956
|
"required": [
|
|
10724
10957
|
"field"
|
|
10725
10958
|
]
|
|
10726
|
-
}
|
|
10959
|
+
},
|
|
10960
|
+
"description": "Filters the rows by a query parameter of the page's URL, as on a real TableView: { \"<param>\": { field, mode?, visible?, label? } }. In the viewer, the page's query is the viewer's, ?record= included, without the parameters the viewer reads itself: name, page, width, data, state and fixtures. To follow the row a page with a route shows, prefer routeParamFilters."
|
|
10727
10961
|
},
|
|
10728
10962
|
"tabs": {
|
|
10729
10963
|
"type": "array",
|
|
@@ -11063,7 +11297,25 @@
|
|
|
11063
11297
|
"capabilities": {
|
|
11064
11298
|
"type": "object",
|
|
11065
11299
|
"properties": {},
|
|
11066
|
-
"description": "Defaults to search, sort, paginate and filter, all on: the rows route applies tabs, quick filters and column filters. A table that sets it keeps its own value, and tabs, quick filters and queryParamFilters need filter: true."
|
|
11300
|
+
"description": "Defaults to search, sort, paginate and filter, all on: the rows route applies tabs, quick filters and column filters. A table that sets it keeps its own value, and tabs, quick filters, routeParamFilters and queryParamFilters need filter: true."
|
|
11301
|
+
},
|
|
11302
|
+
"routeParamFilters": {
|
|
11303
|
+
"type": "object",
|
|
11304
|
+
"additionalProperties": {
|
|
11305
|
+
"type": "object",
|
|
11306
|
+
"properties": {
|
|
11307
|
+
"field": {
|
|
11308
|
+
"type": "string"
|
|
11309
|
+
},
|
|
11310
|
+
"mode": {
|
|
11311
|
+
"type": "string"
|
|
11312
|
+
}
|
|
11313
|
+
},
|
|
11314
|
+
"required": [
|
|
11315
|
+
"field"
|
|
11316
|
+
]
|
|
11317
|
+
},
|
|
11318
|
+
"description": "Filters the rows by a route parameter of the page, as on a real TableView: { \"<param>\": { field, mode? } }, mode \"is\" by default. On a page with \"route\": \":id\", { \"id\": { \"field\": \"orderId\" } } lists the rows whose orderId is the id of the row the page shows, its sample row until a link names one. The parameter must be the page's route parameter."
|
|
11067
11319
|
},
|
|
11068
11320
|
"formContainer": {
|
|
11069
11321
|
"anyOf": [
|
|
@@ -11293,17 +11545,49 @@
|
|
|
11293
11545
|
"week"
|
|
11294
11546
|
]
|
|
11295
11547
|
},
|
|
11548
|
+
"order": {
|
|
11549
|
+
"anyOf": [
|
|
11550
|
+
{
|
|
11551
|
+
"type": "string",
|
|
11552
|
+
"enum": [
|
|
11553
|
+
"items"
|
|
11554
|
+
]
|
|
11555
|
+
},
|
|
11556
|
+
{
|
|
11557
|
+
"type": "array",
|
|
11558
|
+
"items": {
|
|
11559
|
+
"anyOf": [
|
|
11560
|
+
{
|
|
11561
|
+
"type": "string"
|
|
11562
|
+
},
|
|
11563
|
+
{
|
|
11564
|
+
"type": "number"
|
|
11565
|
+
},
|
|
11566
|
+
{
|
|
11567
|
+
"type": "boolean"
|
|
11568
|
+
}
|
|
11569
|
+
]
|
|
11570
|
+
}
|
|
11571
|
+
}
|
|
11572
|
+
]
|
|
11573
|
+
},
|
|
11296
11574
|
"collapsible": {
|
|
11297
11575
|
"type": "boolean"
|
|
11298
11576
|
},
|
|
11299
11577
|
"count": {
|
|
11300
11578
|
"type": "boolean"
|
|
11579
|
+
},
|
|
11580
|
+
"pinned": {
|
|
11581
|
+
"type": "boolean"
|
|
11582
|
+
},
|
|
11583
|
+
"pinnedLabel": {
|
|
11584
|
+
"type": "string"
|
|
11301
11585
|
}
|
|
11302
11586
|
},
|
|
11303
11587
|
"required": [
|
|
11304
11588
|
"groupByField"
|
|
11305
11589
|
],
|
|
11306
|
-
"description": "The grid with a header row per group of groupByField, a sortable column; by day or week needs a date column."
|
|
11590
|
+
"description": "The grid with a header row per group of groupByField, a sortable column; by day or week needs a date column. order: \"items\" lists the groups in the order of the badge's items, or a list of values gives that order. pinned: true leads it with the rows pinnedRows accepts, under pinnedLabel."
|
|
11307
11591
|
},
|
|
11308
11592
|
"views": {
|
|
11309
11593
|
"type": "object",
|
|
@@ -6,14 +6,14 @@ exports.sendEmailForgotEmail = sendEmailForgotEmail;
|
|
|
6
6
|
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
7
7
|
const html_render_1 = require("@antelopejs/interface-dms/html-render");
|
|
8
8
|
const time_1 = require("@antelopejs/interface-dms/utils/internal/time");
|
|
9
|
-
const interface_email_1 = require("@antelopejs/interface-email");
|
|
10
9
|
const config_1 = require("../../config");
|
|
11
10
|
const email_subjects_1 = require("../../utils/email-subjects");
|
|
11
|
+
const utils_1 = require("../../utils");
|
|
12
12
|
const ResetPasswordTemplate = (0, html_render_1.RegisterHtmlTemplate)("EmailResetPassword");
|
|
13
13
|
const EmailValidationTemplate = (0, html_render_1.RegisterHtmlTemplate)("EmailUserValidation");
|
|
14
14
|
const TwoFactorEmailTemplate = (0, html_render_1.RegisterHtmlTemplate)("EmailTwoFactor");
|
|
15
15
|
async function sendAccountEmail(user, { subject, label, html }) {
|
|
16
|
-
const result = await (0,
|
|
16
|
+
const result = await (0, utils_1.sendHtmlEmail)({
|
|
17
17
|
to: user.email,
|
|
18
18
|
subject: (0, email_subjects_1.builtInEmailSubject)(subject, user.language),
|
|
19
19
|
html,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-emails.js","sourceRoot":"","sources":["../../../src/implementations/dms-auth/account-emails.ts"],"names":[],"mappings":";;;;;AAAA,gEAA6D;AAE7D,uEAG+C;AAC/C,wEAAsF;AACtF,
|
|
1
|
+
{"version":3,"file":"account-emails.js","sourceRoot":"","sources":["../../../src/implementations/dms-auth/account-emails.ts"],"names":[],"mappings":";;;;;AAAA,gEAA6D;AAE7D,uEAG+C;AAC/C,wEAAsF;AACtF,yCAA6C;AAC7C,+DAGoC;AACpC,uCAA4C;AAgB5C,MAAM,qBAAqB,GACzB,IAAA,kCAAoB,EAAoB,oBAAoB,CAAC,CAAC;AAEhE,MAAM,uBAAuB,GAAG,IAAA,kCAAoB,EAClD,qBAAqB,CACtB,CAAC;AAOF,MAAM,sBAAsB,GAC1B,IAAA,kCAAoB,EAAqB,gBAAgB,CAAC,CAAC;AAS7D,KAAK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Ac,EAAE,IAAI,CAAC,eAAe;QACpC,SAAS,EAAE,GAAG,WAAW,QAAQ;QACjC,cAAc,EAAE,WAAW;KAC5B,EACD,IAAI,CAAC,QAAQ,CACd,CAAC;IACF,MAAM,gBAAgB,CAAC,IAAI,EAAE;QAC3B,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE,YAAY;QACnB,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAEM,KAAK,+BAA+B,IAAU;IACnD,MAAM,WAAW,GACf,IAAA,sBAAa,GAAE,CAAC,4BAA4B,GAAG,4BAAqB,CAAC;IAEvE,MAAM,IAAI,GAAG,MAAM,IAAA,0BAAY,EAC7B,qBAAqB,EACrB;QACE,QAAQ,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK;QACjC,SAAS,EAAE,IAAI,CAAC,mBAAmB;QACnC,SAAS,EAAE,GAAG,WAAW,QAAQ;QACjC,cAAc,EAAE,WAAW;KAC5B,EACD,IAAI,CAAC,QAAQ,CACd,CAAC;IACF,MAAM,gBAAgB,CAAC,IAAI,EAAE;QAC3B,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,gBAAgB;QACvB,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -29,7 +29,6 @@ const node_crypto_1 = require("node:crypto");
|
|
|
29
29
|
const interface_api_1 = require("@antelopejs/interface-api");
|
|
30
30
|
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
31
31
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
32
|
-
const interface_email_1 = require("@antelopejs/interface-email");
|
|
33
32
|
const db_1 = require("@antelopejs/interface-dms/auth/db");
|
|
34
33
|
const types_1 = require("@antelopejs/interface-dms/base/types");
|
|
35
34
|
const html_render_1 = require("@antelopejs/interface-dms/html-render");
|
|
@@ -300,7 +299,7 @@ async function sendAdminInviteEmail(email, token, inviteeName, context = {}) {
|
|
|
300
299
|
expiresInDays: invites_1.INVITE_EXPIRY_DAYS,
|
|
301
300
|
...names,
|
|
302
301
|
}, language);
|
|
303
|
-
const result = await (0,
|
|
302
|
+
const result = await (0, utils_1.sendHtmlEmail)({
|
|
304
303
|
to: email,
|
|
305
304
|
subject: (0, utils_1.buildAdminInviteSubject)(names, language),
|
|
306
305
|
html,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/dms-auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AACzC,6DAAuD;AACvD,gEAA6D;AAC7D,6FAGmD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/dms-auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AACzC,6DAAuD;AACvD,gEAA6D;AAC7D,6FAGmD;AAEnD,0DAAyE;AACzE,gEAAuE;AACvE,uEAAqE;AACrE,mDAAiC;AACjC,uDAAwD;AAExD,yCAA0E;AAC1E,uCAOqB;AACrB,oFAG6D;AAC7D,iDAMwB;AACxB,mDAA4E;AAC5E,2DAA8E;AAC9E,+DAAuE;AAEvE,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,wBAAwB,GAAG,+BAA+B,CAAC;AACjE,MAAM,yBAAyB,GAAG,wCAAwC,CAAC;AAC3E,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAClE,MAAM,qCAAqC,GAAG,iCAAiC,CAAC;AAChF,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;AACjE,MAAM,wBAAwB,GAAG,KAAK,CAAC;AACvC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AACtC,MAAM,qBAAqB,GAAG,SAAS,CAAC;AACxC,MAAM,2BAA2B,GAAG,0CAA0C,CAAC;AAC/E,MAAM,wBAAwB,GAAG,8CAA8C,CAAC;AAqBhF,KAAK,UAAU,i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ACT,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAa,EAAC;QACjC,EAAE,EAAE,KAAK;QACT,OAAO,EAAE,IAAA,+BAAuB,EAAC,KAAK,EAAE,QAAQ,CAAC;QACjD,IAAI;KACL,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,iBAAO,CAAC,KAAK,CACX,8CAA8C,KAAK,MAAM,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,CACjF,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,yBAAyB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,iBAAO,CAAC,IAAI,CAAC,oCAAoC,KAAK,GAAG,CAAC,CAAC;AAC7D,CAAC;AAED,qCAA6D;AAApD,sGAAA,aAAa,OAAiB;AACvC,qCAAmF;AAA1E,iHAAA,wBAAwB,OAA4B;AAC7D,qCAA+D;AAAtD,uGAAA,cAAc,OAAkB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RequestContext } from "@antelopejs/interface-api";
|
|
2
|
+
import type { Parameters } from "@antelopejs/interface-data-api/components";
|
|
3
|
+
import type { DataAPIMeta, StoredRow } from "@antelopejs/interface-data-api/metadata";
|
|
4
|
+
import type { Stream } from "@antelopejs/interface-database";
|
|
5
|
+
import { groupOrderSchema } from "@antelopejs/interface-dms/base/table-view/internal/group-order";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
type GroupValue = z.infer<typeof groupOrderSchema>[number];
|
|
8
|
+
interface GroupOrder {
|
|
9
|
+
field: string;
|
|
10
|
+
values: GroupValue[];
|
|
11
|
+
}
|
|
12
|
+
export declare function readGroupOrder(reqCtx: RequestContext, params: Parameters.ListParameters, meta: DataAPIMeta, pluck: Set<string> | undefined): GroupOrder | undefined;
|
|
13
|
+
export interface PageWindow {
|
|
14
|
+
offset: number;
|
|
15
|
+
limit: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function listGroupedPage<Row>(query: Stream<StoredRow>, order: GroupOrder, window: PageWindow, readPage: (selection: Stream<StoredRow>, page: PageWindow) => Promise<Row[]>): Promise<Row[]>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readGroupOrder = readGroupOrder;
|
|
4
|
+
exports.listGroupedPage = listGroupedPage;
|
|
5
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
6
|
+
const group_order_1 = require("@antelopejs/interface-dms/base/table-view/internal/group-order");
|
|
7
|
+
const GROUP_ORDER_KEY = "groupOrder";
|
|
8
|
+
const HTTP_BAD_REQUEST = 400;
|
|
9
|
+
const DESCENDING = "desc";
|
|
10
|
+
function parseGroupOrder(raw) {
|
|
11
|
+
let json;
|
|
12
|
+
try {
|
|
13
|
+
json = JSON.parse(raw);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
(0, interface_api_util_1.assert)(false, HTTP_BAD_REQUEST, `${GROUP_ORDER_KEY} is not JSON.`);
|
|
17
|
+
}
|
|
18
|
+
const parsed = group_order_1.groupOrderSchema.safeParse(json);
|
|
19
|
+
(0, interface_api_util_1.assert)(parsed.success, HTTP_BAD_REQUEST, `${GROUP_ORDER_KEY} must list 1 to ${group_order_1.MAX_GROUP_ORDER_VALUES} strings, numbers or booleans.`);
|
|
20
|
+
return parsed.data;
|
|
21
|
+
}
|
|
22
|
+
function readGroupOrder(reqCtx, params, meta, pluck) {
|
|
23
|
+
const raw = reqCtx.url.searchParams.get(GROUP_ORDER_KEY);
|
|
24
|
+
if (raw === null)
|
|
25
|
+
return undefined;
|
|
26
|
+
const field = params.sortKey;
|
|
27
|
+
(0, interface_api_util_1.assert)(field && meta.fields[field]?.sortable && (!pluck || pluck.has(field)), HTTP_BAD_REQUEST, `${GROUP_ORDER_KEY} orders the values of the sorted field: sort on a sortable, listed field.`);
|
|
28
|
+
const values = parseGroupOrder(raw);
|
|
29
|
+
return {
|
|
30
|
+
field,
|
|
31
|
+
values: params.sortDirection === DESCENDING ? values.reverse() : values,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function groupSelections(query, { field, values }) {
|
|
35
|
+
const valueOf = (row) => row.key(field).default(null);
|
|
36
|
+
const listed = values.map((value) => query.filter((row) => valueOf(row).eq(value)));
|
|
37
|
+
const others = query.filter((row) => {
|
|
38
|
+
const unlisted = values
|
|
39
|
+
.slice(1)
|
|
40
|
+
.reduce((all, value) => all.and(valueOf(row).ne(value)), valueOf(row).ne(values[0]));
|
|
41
|
+
return valueOf(row).eq(null).or(unlisted);
|
|
42
|
+
});
|
|
43
|
+
return [...listed, others];
|
|
44
|
+
}
|
|
45
|
+
async function listGroupedPage(query, order, window, readPage) {
|
|
46
|
+
const selections = groupSelections(query, order);
|
|
47
|
+
const counts = await Promise.all(selections.map((selection) => selection.count().run()));
|
|
48
|
+
const reads = [];
|
|
49
|
+
let skip = window.offset;
|
|
50
|
+
let left = window.limit;
|
|
51
|
+
selections.forEach((selection, index) => {
|
|
52
|
+
const count = counts[index];
|
|
53
|
+
if (left <= 0)
|
|
54
|
+
return;
|
|
55
|
+
if (skip >= count) {
|
|
56
|
+
skip -= count;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const taken = Math.min(left, count - skip);
|
|
60
|
+
reads.push(readPage(selection, { offset: skip, limit: taken }));
|
|
61
|
+
skip = 0;
|
|
62
|
+
left -= taken;
|
|
63
|
+
});
|
|
64
|
+
return (await Promise.all(reads)).flat();
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=group-order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-order.js","sourceRoot":"","sources":["../../../src/implementations/dms-base/group-order.ts"],"names":[],"mappings":";;;;AACA,uEAAwD;AAWxD,gGAGwE;AAOxE,MAAM,eAAe,GAAG,YAAY,CAAC;AAErC,MA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C,GAAG,EAAE,CAAC,CACvD,CAAC;IACF,MAAM,KAAK,GAAqB,EAAE,CAAC;IACnC,IAAI,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;IACzB,IAAI,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;IACxB,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;QACtC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,IAAI,IAAI,CAAC;YAAE,OAAO;QACtB,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;YAClB,IAAI,IAAI,KAAK,CAAC;YACd,OAAO;QACT,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC,CAAC;QAC3C,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAChE,IAAI,GAAG,CAAC,CAAC;QACT,IAAI,IAAI,KAAK,CAAC;IAChB,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3C,CAAC"}
|
|
@@ -18,6 +18,7 @@ const request_tenant_1 = require("@antelopejs/interface-dms/request-tenant");
|
|
|
18
18
|
const base_1 = require("@antelopejs/interface-dms/base");
|
|
19
19
|
const table_view_1 = require("@antelopejs/interface-dms/base/table-view");
|
|
20
20
|
const filter_tokens_1 = require("./filter-tokens");
|
|
21
|
+
const group_order_1 = require("./group-order");
|
|
21
22
|
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
22
23
|
const MIN_SEARCH_LENGTH = 2;
|
|
23
24
|
const IDS_KEY = "ids";
|
|
@@ -182,17 +183,19 @@ async function listWithSearch(thisObj, reqCtx, params, user, permissions) {
|
|
|
182
183
|
}
|
|
183
184
|
const offset = params.offset || 0;
|
|
184
185
|
const limit = params.limit || 10;
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
limit,
|
|
186
|
+
const readPage = (selection, page) => components_1.Query.ListPage(model.database, meta, selection, {
|
|
187
|
+
...page,
|
|
188
188
|
filters,
|
|
189
189
|
sortKey: params.sortKey,
|
|
190
190
|
pluck: params.noPluck ? undefined : pluck,
|
|
191
191
|
noForeign: params.noForeign,
|
|
192
192
|
deferredJoined,
|
|
193
|
-
});
|
|
193
|
+
}).run();
|
|
194
|
+
const groupOrder = (0, group_order_1.readGroupOrder)(reqCtx, params, meta, params.noPluck ? undefined : pluck);
|
|
194
195
|
const [dbResult, dbTotal] = await Promise.all([
|
|
195
|
-
|
|
196
|
+
groupOrder
|
|
197
|
+
? (0, group_order_1.listGroupedPage)(query, groupOrder, { offset, limit }, readPage)
|
|
198
|
+
: readPage(query, { offset, limit }),
|
|
196
199
|
queryTotal.run(),
|
|
197
200
|
]);
|
|
198
201
|
const results = await Promise.all(dbResult.map((entry) => {
|