@antelopejs/dms 0.9.8 → 0.11.0
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 +171 -0
- package/README.md +1 -1
- package/data/module-store/catalog.json +2 -2
- package/dist/attachments/table-view.js +2 -2
- package/dist/attachments/table-view.js.map +1 -1
- package/dist/automation/actions.d.ts +2 -0
- package/dist/automation/actions.js +116 -71
- package/dist/automation/actions.js.map +1 -1
- package/dist/automation/i18n.d.ts +4 -0
- package/dist/automation/i18n.js +19 -0
- package/dist/automation/i18n.js.map +1 -0
- package/dist/automation/send-notification.d.ts +21 -0
- package/dist/automation/send-notification.js +163 -0
- package/dist/automation/send-notification.js.map +1 -0
- package/dist/automation/triggers.js +19 -25
- package/dist/automation/triggers.js.map +1 -1
- package/dist/client-origin-cors.d.ts +1 -0
- package/dist/client-origin-cors.js +19 -0
- package/dist/client-origin-cors.js.map +1 -0
- package/dist/config.d.ts +3 -2
- package/dist/config.js +5 -7
- package/dist/config.js.map +1 -1
- package/dist/frontend-module.d.ts +4 -0
- package/dist/frontend-module.js +37 -0
- package/dist/frontend-module.js.map +1 -0
- package/dist/implementations/dms/client-ip.js +1 -1
- package/dist/implementations/dms/client-ip.js.map +1 -1
- package/dist/implementations/dms/dev-reload.d.ts +5 -0
- package/dist/implementations/dms/dev-reload.js +23 -3
- package/dist/implementations/dms/dev-reload.js.map +1 -1
- package/dist/implementations/dms/frontend-modules.d.ts +2 -4
- package/dist/implementations/dms/frontend-modules.js +38 -94
- package/dist/implementations/dms/frontend-modules.js.map +1 -1
- package/dist/implementations/dms/frontend-ready.d.ts +12 -2
- package/dist/implementations/dms/frontend-ready.js +34 -4
- package/dist/implementations/dms/frontend-ready.js.map +1 -1
- package/dist/implementations/dms/layout-banners.d.ts +2 -1
- package/dist/implementations/dms/layout-banners.js +9 -0
- package/dist/implementations/dms/layout-banners.js.map +1 -1
- package/dist/implementations/dms/manifest.d.ts +7 -2
- package/dist/implementations/dms/manifest.js +12 -7
- package/dist/implementations/dms/manifest.js.map +1 -1
- package/dist/implementations/dms/page.d.ts +4 -3
- package/dist/implementations/dms/page.js +49 -18
- package/dist/implementations/dms/page.js.map +1 -1
- package/dist/implementations/dms/permissions-resolver.d.ts +2 -2
- package/dist/implementations/dms/permissions-resolver.js +2 -2
- package/dist/implementations/dms/permissions-resolver.js.map +1 -1
- package/dist/implementations/dms/realtime.js +1 -0
- package/dist/implementations/dms/realtime.js.map +1 -1
- package/dist/implementations/dms-base/bulk-selection.d.ts +1 -1
- package/dist/implementations/dms-base/bulk-selection.js +23 -1
- package/dist/implementations/dms-base/bulk-selection.js.map +1 -1
- package/dist/implementations/dms-base/filter-tokens.js +5 -3
- package/dist/implementations/dms-base/filter-tokens.js.map +1 -1
- package/dist/implementations/dms-base/search-route.d.ts +1 -0
- package/dist/implementations/dms-base/search-route.js +35 -13
- package/dist/implementations/dms-base/search-route.js.map +1 -1
- package/dist/implementations/dms-base/table-view.js +11 -6
- package/dist/implementations/dms-base/table-view.js.map +1 -1
- package/dist/implementations/dms-notifications/index.d.ts +2 -2
- package/dist/implementations/dms-notifications/index.js +5 -5
- package/dist/implementations/dms-notifications/index.js.map +1 -1
- package/dist/index.js +32 -55
- package/dist/index.js.map +1 -1
- package/dist/pages/modules/index.d.ts +1 -0
- package/dist/pages/modules/index.js +1 -0
- package/dist/pages/modules/index.js.map +1 -1
- package/dist/pages/modules/modules-store.d.ts +9 -0
- package/dist/pages/modules/modules-store.js +30 -0
- package/dist/pages/modules/modules-store.js.map +1 -0
- package/dist/pages/settings/users/account-credentials.js +2 -2
- package/dist/pages/settings/users/account-credentials.js.map +1 -1
- package/dist/pages/settings/users/account-data-store.js +25 -8
- package/dist/pages/settings/users/account-data-store.js.map +1 -1
- package/dist/pages/settings/users/invite-extension-routes.js +9 -3
- package/dist/pages/settings/users/invite-extension-routes.js.map +1 -1
- package/dist/pages/settings/users/member-management.js +13 -14
- package/dist/pages/settings/users/member-management.js.map +1 -1
- package/dist/pages/settings/users/profile.d.ts +1 -4
- package/dist/pages/settings/users/profile.js +0 -35
- package/dist/pages/settings/users/profile.js.map +1 -1
- package/dist/pages/settings/users/role-editor-store.js +26 -18
- package/dist/pages/settings/users/role-editor-store.js.map +1 -1
- package/dist/pages/settings/users/role-editor.d.ts +0 -1
- package/dist/pages/settings/users/role-editor.js +1 -2
- package/dist/pages/settings/users/role-editor.js.map +1 -1
- package/dist/pages/settings/users/role-preview.js +1 -2
- package/dist/pages/settings/users/role-preview.js.map +1 -1
- package/dist/pages/settings/users/roles.js +2 -2
- package/dist/pages/settings/users/roles.js.map +1 -1
- package/dist/pages/settings/users/two-factor-operations.js.map +1 -1
- package/dist/realtime/broker.d.ts +6 -0
- package/dist/realtime/broker.js +8 -1
- package/dist/realtime/broker.js.map +1 -1
- package/dist/realtime/presence.d.ts +8 -3
- package/dist/realtime/presence.js +8 -4
- package/dist/realtime/presence.js.map +1 -1
- package/dist/realtime/sessions.d.ts +11 -1
- package/dist/realtime/sessions.js +21 -3
- package/dist/realtime/sessions.js.map +1 -1
- package/dist/realtime/table-view.d.ts +2 -2
- package/dist/realtime/table-view.js +4 -3
- package/dist/realtime/table-view.js.map +1 -1
- package/dist/routes/auth/client-ip.d.ts +1 -0
- package/dist/routes/auth/client-ip.js +18 -0
- package/dist/routes/auth/client-ip.js.map +1 -1
- package/dist/routes/auth/oauth/config.d.ts +2 -1
- package/dist/routes/auth/oauth/config.js +5 -1
- package/dist/routes/auth/oauth/config.js.map +1 -1
- package/dist/routes/auth/session-handoff.d.ts +0 -1
- package/dist/routes/auth/session-handoff.js +0 -2
- package/dist/routes/auth/session-handoff.js.map +1 -1
- package/dist/routes/auth.js +3 -2
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/index.d.ts +0 -1
- package/dist/routes/index.js +0 -1
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/realtime.d.ts +13 -1
- package/dist/routes/realtime.js +114 -29
- package/dist/routes/realtime.js.map +1 -1
- package/dist/startup-config.d.ts +2 -0
- package/dist/startup-config.js +62 -0
- package/dist/startup-config.js.map +1 -0
- package/dist/store/interfaces.d.ts +3 -2
- package/dist/store/interfaces.js +16 -6
- package/dist/store/interfaces.js.map +1 -1
- package/dist/store/listing.js +25 -15
- package/dist/store/listing.js.map +1 -1
- package/dist/store/operations.js +5 -2
- package/dist/store/operations.js.map +1 -1
- package/dist/store/requirements.js +3 -2
- package/dist/store/requirements.js.map +1 -1
- package/dist/store/runtime.d.ts +10 -1
- package/dist/store/runtime.js +33 -6
- package/dist/store/runtime.js.map +1 -1
- package/dist/store/types.d.ts +10 -0
- package/dist/utils/ensure-default-tenant.d.ts +2 -1
- package/dist/utils/ensure-default-tenant.js +13 -1
- package/dist/utils/ensure-default-tenant.js.map +1 -1
- package/dist/utils/export-jobs.js +2 -1
- package/dist/utils/export-jobs.js.map +1 -1
- package/dist/validation/auth.schema.d.ts +2 -2
- package/dist/validation/member-invite.schema.d.ts +2 -10
- package/dist/validation/member-invite.schema.js +2 -15
- package/dist/validation/member-invite.schema.js.map +1 -1
- package/frontend-vue/dms.frontend.ts +24 -5
- package/frontend-vue/dms.server.ts +17 -0
- package/frontend-vue/layers/dms-auth/server/accounts.ts +3 -4
- package/frontend-vue/layers/dms-core/app/build/composables/renderNow.ts +33 -0
- package/frontend-vue/layers/dms-core/app/build/composables/user/tablePreferences.ts +5 -1
- package/frontend-vue/layers/dms-core/app/build/utils/crossTab.ts +199 -0
- package/frontend-vue/layers/dms-core/app/build/utils/sharedRealtimeConnection.ts +410 -0
- package/frontend-vue/layers/dms-core/app/composables/auth/useApiData.ts +77 -12
- package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +26 -0
- package/frontend-vue/layers/dms-core/app/composables/live/livePauseSource.ts +29 -0
- package/frontend-vue/layers/dms-core/app/composables/period/compareResolvers.ts +150 -9
- package/frontend-vue/layers/dms-core/app/composables/period/usePeriod.ts +6 -4
- package/frontend-vue/layers/dms-core/app/composables/period/usePeriodScope.ts +27 -1
- package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +256 -119
- package/frontend-vue/layers/dms-core/app/composables/translation/useComposedText.ts +21 -8
- package/frontend-vue/layers/dms-core/app/composables/translation/useTranslation.ts +25 -5
- package/frontend-vue/layers/dms-core/app/composables/useApiError.ts +3 -5
- package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +61 -26
- package/frontend-vue/layers/dms-core/app/plugins/dev-error-log.ts +16 -0
- package/frontend-vue/layers/dms-core/app/types/user.ts +6 -0
- package/frontend-vue/layers/dms-core/app/utils/composedText.ts +7 -2
- package/frontend-vue/layers/dms-core/app/utils/formatter.ts +134 -35
- package/frontend-vue/layers/dms-core/app/utils/url-interpolation.ts +18 -1
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +136 -2
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +136 -2
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +0 -2
- package/frontend-vue/layers/dms-layout/app/app.config.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/assets/css/main.css +11 -1
- package/frontend-vue/layers/dms-layout/app/assets/fonts/Geist-Italic-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/app/assets/fonts/Geist-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/app/assets/fonts/GeistMono-Italic-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/app/assets/fonts/GeistMono-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardBanners.vue +3 -2
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +41 -21
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardPageBody.vue +6 -2
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +4 -19
- package/frontend-vue/layers/dms-layout/app/build/components/layout/Footer.vue +11 -107
- package/frontend-vue/layers/dms-layout/app/build/components/layout/GithubStarPrompt.vue +18 -7
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionsOutlet.vue +4 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/RowSidePanel.vue +43 -82
- package/frontend-vue/layers/dms-layout/app/build/components/layout/SidebarUserMenu.vue +44 -3
- package/frontend-vue/layers/dms-layout/app/build/components/layout/UserIdentity.vue +11 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleCatalogTile.vue +132 -35
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleManageMenu.vue +59 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleSourceLabel.vue +25 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleStoreBanners.vue +73 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleStoreOperation.vue +116 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleStoreRequirements.vue +8 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleStoreTile.vue +85 -207
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleTile.vue +10 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleTileSkeleton.vue +68 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxDisplay.vue +24 -8
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +8 -5
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/region/RegionTimeZoneInput.vue +1 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-permissions.ts +19 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/useRoleEditor.ts +2 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/layout/useSidePanelWidth.ts +31 -70
- package/frontend-vue/layers/dms-layout/app/build/composables/notification/useNotificationGroupsOpen.ts +11 -1
- package/frontend-vue/layers/dms-layout/app/build/utils/dev-reload-stream.ts +81 -0
- package/frontend-vue/layers/dms-layout/app/build/utils/github-repository.ts +2 -2
- package/frontend-vue/layers/dms-layout/app/build/utils/module-store-catalog.ts +232 -36
- package/frontend-vue/layers/dms-layout/app/build/utils/modules-catalog.ts +122 -14
- package/frontend-vue/layers/dms-layout/app/composables/layout/useLayoutBanners.ts +32 -3
- package/frontend-vue/layers/dms-layout/app/composables/layout/useServedHeaderActions.ts +49 -11
- package/frontend-vue/layers/dms-layout/app/composables/page/useModuleHistory.ts +3 -2
- package/frontend-vue/layers/dms-layout/app/composables/page/useModuleStore.ts +59 -4
- package/frontend-vue/layers/dms-layout/app/composables/page/useModuleStoreActions.ts +194 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageComponentPreload.ts +23 -3
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageLayout.ts +4 -2
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageRecordDeletion.ts +162 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useSiteLayout.ts +6 -1
- package/frontend-vue/layers/dms-layout/app/custom-layouts/DefaultLayout.vue +6 -2
- package/frontend-vue/layers/dms-layout/app/custom-layouts/SettingsLayout.vue +6 -2
- package/frontend-vue/layers/dms-layout/app/custom-pages/modules-store.vue +291 -0
- package/frontend-vue/layers/dms-layout/app/custom-pages/modules.vue +87 -474
- package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +3 -0
- package/frontend-vue/layers/dms-layout/app/pages/[...slug].vue +13 -22
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-navigation.client.ts +11 -10
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-personal-pages.client.ts +22 -52
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-quick-actions.client.ts +7 -7
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-session.client.ts +11 -10
- package/frontend-vue/layers/dms-layout/app/plugins/dms-dev-reload.client.ts +14 -9
- package/frontend-vue/layers/dms-layout/app/theme/actions.ts +5 -4
- package/frontend-vue/layers/dms-layout/app/theme/form-controls.ts +9 -4
- package/frontend-vue/layers/dms-layout/app/theme/surfaces.ts +22 -6
- package/frontend-vue/layers/dms-layout/app/types/module-store.ts +9 -0
- package/frontend-vue/layers/dms-layout/app/types/page.ts +15 -1
- package/frontend-vue/layers/dms-layout/app/utils/account-menu.ts +11 -0
- package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +57 -0
- package/frontend-vue/layers/dms-layout/app/utils/pageQuery.ts +26 -0
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +45 -18
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +44 -17
- package/frontend-vue/layers/dms-ui/app/build/components/containers/TargetComponentTree.vue +31 -0
- package/frontend-vue/layers/dms-ui/app/build/components/containers/constants.ts +25 -0
- package/frontend-vue/layers/dms-ui/app/build/components/containers/drawer/DynamicDrawer.vue +244 -15
- package/frontend-vue/layers/dms-ui/app/build/components/containers/modal/DynamicModal.vue +42 -25
- package/frontend-vue/layers/dms-ui/app/build/components/containers/row/RowHeader.vue +153 -0
- package/frontend-vue/layers/dms-ui/app/build/components/containers/row/RowNotFound.vue +44 -0
- package/frontend-vue/layers/dms-ui/app/build/components/containers/row/drawerRowHeader.ts +35 -0
- package/frontend-vue/layers/dms-ui/app/build/components/form/FormEntries.vue +44 -9
- package/frontend-vue/layers/dms-ui/app/build/components/form/FormErrorSummary.vue +11 -4
- package/frontend-vue/layers/dms-ui/app/build/components/form/FormFieldControl.vue +38 -5
- package/frontend-vue/layers/dms-ui/app/build/components/form/FormFieldNotes.vue +29 -5
- package/frontend-vue/layers/dms-ui/app/build/components/form/FormLoadError.vue +5 -1
- package/frontend-vue/layers/dms-ui/app/build/components/form/FormSectionNav.vue +3 -1
- package/frontend-vue/layers/dms-ui/app/build/components/form/FormSections.vue +106 -27
- package/frontend-vue/layers/dms-ui/app/build/components/table/Actions.vue +12 -4
- package/frontend-vue/layers/dms-ui/app/build/components/table/Empty.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/build/components/table/FiltersRow.vue +48 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/Pagination.vue +55 -54
- package/frontend-vue/layers/dms-ui/app/build/components/table/RowSelection.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/Table.vue +396 -288
- package/frontend-vue/layers/dms-ui/app/build/components/table/Tabs.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/Views.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardAvatar.vue +59 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardGridSkeleton.vue +19 -2
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardRowActions.vue +38 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardsDisplay.vue +148 -104
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/LiveHoldBanner.vue +17 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/bulkSelection.ts +43 -9
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/rowComponentOptions.ts +76 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/rowNavigation.ts +172 -27
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/useActionTargets.ts +270 -46
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/actionError.ts +6 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/confirmDialogTexts.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/containers/closingLayers.ts +186 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/containers/context.ts +14 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/containers/drawerSize.ts +229 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/containers/useResizableSize.ts +175 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/metricCells.ts +18 -35
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/numberSuffix.ts +44 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerDefaults.ts +123 -27
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerFieldTypes.ts +2 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationFilter.ts +75 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationRows.ts +92 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationValue.ts +39 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/twoLineCell.ts +3 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +6 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/form/createFormFields.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldSaved.ts +40 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldValueRule.ts +62 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formEntryContext.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formFooter.ts +42 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formLayout.ts +106 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formRecordLoad.ts +11 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formSections.ts +32 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +36 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/form/readonlyValue.ts +19 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/registerFormFunctions.ts +27 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/repeaterTable.ts +78 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/serverFieldErrors.ts +49 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/toasterClearance.ts +118 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +12 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/live/currentPageLive.ts +41 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/live/livePoller.ts +10 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/live/pageReadClock.ts +28 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/live/shortcuts.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/live/usePageLiveHost.ts +17 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/live/useUpdatedLabel.ts +38 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/page-toolbar/pageToolbarContext.ts +75 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/page-toolbar/toolbarControlHeight.ts +29 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodComparison.ts +52 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodDisplay.ts +21 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodShortLabels.ts +28 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/period/usePeriodDraft.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useRelationFilterLabels.ts +97 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useRowScrollAnchor.ts +106 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useTable.ts +9 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableColumns.ts +1 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/archivedCount.ts +31 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/filterEditorValue.ts +38 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/formatFilterValue.ts +33 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/scrollEdges.ts +31 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useCardFields.ts +33 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useMobileDisplay.ts +48 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useScrolledPastTop.ts +41 -18
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +3 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLinkedVisit.ts +78 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLiveHold.ts +135 -22
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +56 -25
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViewRowActions.ts +90 -35
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViews.ts +86 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/bulkActions.ts +14 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/card.ts +127 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/compareValues.ts +13 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/expandedRows.ts +28 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +114 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/linkedArrival.ts +308 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/locateRow.ts +106 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/pageArrival.ts +34 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/pinnedRows.ts +17 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/quickFilters.ts +41 -33
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/recordLink.ts +24 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableCounts.ts +113 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +27 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/views.ts +22 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/writeError.ts +21 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/addressSuggestions.ts +49 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/codeHighlight.ts +67 -29
- package/frontend-vue/layers/dms-ui/app/build/utils/eyebrow.ts +12 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/fieldOptionsI18n.ts +51 -11
- package/frontend-vue/layers/dms-ui/app/build/utils/htmlGrammar.ts +79 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/inputWidth.ts +53 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/numberAdjustment.ts +6 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/relativeDate.ts +19 -5
- package/frontend-vue/layers/dms-ui/app/build/utils/scrollWithin.ts +99 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/shellParser.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/streamHighlight.ts +90 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/urlVariables.ts +36 -14
- package/frontend-vue/layers/dms-ui/app/components/PasswordStrength.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/components/RecursiveComponent.vue +9 -1
- package/frontend-vue/layers/dms-ui/app/components/blocks/LiveToggleBlock.vue +80 -32
- package/frontend-vue/layers/dms-ui/app/components/blocks/PageToolbarBlock.vue +137 -0
- package/frontend-vue/layers/dms-ui/app/components/blocks/StatGroupBlock.vue +5 -0
- package/frontend-vue/layers/dms-ui/app/components/chart/ApexChartHost.vue +16 -2
- package/frontend-vue/layers/dms-ui/app/components/chart/Chart.vue +24 -5
- package/frontend-vue/layers/dms-ui/app/components/chart/ChartCard.vue +41 -23
- package/frontend-vue/layers/dms-ui/app/components/code-snippet/CodeSnippet.vue +23 -12
- package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/components/container-footer/ContainerFooter.vue +34 -0
- package/frontend-vue/layers/dms-ui/app/components/field-row/FieldRow.vue +25 -2
- package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +2 -2
- package/frontend-vue/layers/dms-ui/app/components/form/Form.vue +119 -36
- package/frontend-vue/layers/dms-ui/app/components/form/components/Cascader.vue +53 -22
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +20 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/Display.vue +13 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/Image.vue +8 -3
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputAddress.vue +53 -5
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputCode.vue +29 -5
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputNumber.vue +45 -8
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPercentage.vue +28 -5
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputSecret.vue +5 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputText.vue +19 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputTime.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/Relation.vue +226 -65
- package/frontend-vue/layers/dms-ui/app/components/form/components/Repeater.vue +80 -30
- package/frontend-vue/layers/dms-ui/app/components/form/components/RepeaterTable.vue +210 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Select.vue +4 -2
- package/frontend-vue/layers/dms-ui/app/components/grid/GridRow.vue +11 -2
- package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +79 -70
- package/frontend-vue/layers/dms-ui/app/components/kpi/KpiCard.vue +117 -21
- package/frontend-vue/layers/dms-ui/app/components/meter/Meter.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/period/PeriodSelector.vue +113 -34
- package/frontend-vue/layers/dms-ui/app/components/save-bar/SaveBar.vue +14 -2
- package/frontend-vue/layers/dms-ui/app/components/section-header/Eyebrow.vue +6 -1
- package/frontend-vue/layers/dms-ui/app/components/segmented/Segmented.vue +13 -0
- package/frontend-vue/layers/dms-ui/app/components/stat-group/StatGroup.vue +52 -3
- package/frontend-vue/layers/dms-ui/app/components/tab/Tab.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/table-view/CascaderPath.vue +74 -25
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +48 -44
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanDisplay.vue +4 -1
- package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +426 -97
- package/frontend-vue/layers/dms-ui/app/components/top-list/TopListCard.vue +33 -5
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexCategoryLabels.ts +68 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexDatetimeBuckets.ts +306 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/formatValue.ts +4 -3
- package/frontend-vue/layers/dms-ui/app/composables/chart/heatmapColors.ts +93 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/localizeSeries.ts +62 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.ts +116 -8
- package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.types.ts +7 -0
- package/frontend-vue/layers/dms-ui/app/composables/containers/types.ts +84 -1
- package/frontend-vue/layers/dms-ui/app/composables/containers/useDrawer.ts +69 -8
- package/frontend-vue/layers/dms-ui/app/composables/form/types/field-saved.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/field.ts +16 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/functions.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +189 -28
- package/frontend-vue/layers/dms-ui/app/composables/live/usePageLive.ts +29 -12
- package/frontend-vue/layers/dms-ui/app/composables/page-toolbar/usePageToolbarSize.ts +30 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/kanban.ts +4 -2
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +22 -3
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/display.ts +24 -1
- package/frontend-vue/layers/dms-ui/app/plugins/closing-layers.client.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/plugins/live-pause-source.ts +15 -0
- package/frontend-vue/layers/dms-ui/app/plugins/register.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/types/input-number.ts +3 -2
- package/frontend-vue/layers/dms-ui/app/types/page-toolbar.ts +7 -0
- package/frontend-vue/layers/dms-ui/app/types/row-action.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/types/row-navigation.ts +17 -0
- package/frontend-vue/layers/dms-ui/app/types/table/query.ts +2 -1
- package/frontend-vue/layers/dms-ui/app/utils/blockRefresh.ts +3 -1
- package/frontend-vue/layers/dms-ui/app/utils/cascader.ts +94 -3
- package/frontend-vue/layers/dms-ui/app/utils/componentTree.ts +24 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +20 -5
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +20 -5
- package/frontend-vue/package.json +6 -2
- package/package.json +11 -10
- package/skills/dms/SKILL.md +1 -1
- package/skills/dms-auth/SKILL.md +5 -3
- package/skills/dms-best-practices/REFERENCE.md +2 -0
- package/skills/dms-best-practices/SKILL.md +4 -0
- package/skills/dms-module/SKILL.md +3 -2
- package/skills/dms-pages/REFERENCE.md +129 -16
- package/skills/dms-pages/SKILL.md +1 -1
- package/skills/dms-project/DEV-SERVERS.md +23 -1
- package/skills/dms-project/REFERENCE.md +1 -1
- package/skills/dms-project/SKILL.md +4 -1
- package/skills/dms-project/scripts/dms-dev.sh +205 -17
- package/dist/hooks/tenant-instances.d.ts +0 -1
- package/dist/hooks/tenant-instances.js +0 -13
- package/dist/hooks/tenant-instances.js.map +0 -1
- package/dist/routes/startup-gate.d.ts +0 -7
- package/dist/routes/startup-gate.js +0 -39
- package/dist/routes/startup-gate.js.map +0 -1
- package/frontend-vue/layers/dms-core/app/composables/period/periodRenderNow.ts +0 -42
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,176 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.11.0
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.10.0...v0.11.0)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **frontend:** List the origins the dev manifest rewrites ([#434](https://github.com/AntelopeJS/dms/pull/434))
|
|
10
|
+
- **store:** ⚠️ Changing modules from the store is reserved to development ([#418](https://github.com/AntelopeJS/dms/pull/418))
|
|
11
|
+
- **relation:** "Not found" for unanswered ids, cascader read by ?ids=, lists need the Foreign join ([#421](https://github.com/AntelopeJS/dms/pull/421))
|
|
12
|
+
- **tenants:** Provision the default tenant through TENANT_BEING_PROVISIONED ([#420](https://github.com/AntelopeJS/dms/pull/420))
|
|
13
|
+
- **page:** Read the page's record with its layout, in PageLayoutRequest's context ([#426](https://github.com/AntelopeJS/dms/pull/426))
|
|
14
|
+
- **page:** Leave a detail page whose record was deleted; 404 shown as not found ([#432](https://github.com/AntelopeJS/dms/pull/432))
|
|
15
|
+
- **dms-layout:** ⚠️ Remove the GitHub star button from the footer ([#428](https://github.com/AntelopeJS/dms/pull/428))
|
|
16
|
+
- **forms:** Require the fallback language of a localized field ([#427](https://github.com/AntelopeJS/dms/pull/427))
|
|
17
|
+
- **table-view:** VisibleWhen and disabledWhen column conditions ([#431](https://github.com/AntelopeJS/dms/pull/431))
|
|
18
|
+
- **errors:** Read the data API's { code, fields } field errors ([#433](https://github.com/AntelopeJS/dms/pull/433))
|
|
19
|
+
|
|
20
|
+
### 🔥 Performance
|
|
21
|
+
|
|
22
|
+
- **dms-ui:** Load each code snippet's grammar alone, without the editor ([#403](https://github.com/AntelopeJS/dms/pull/403))
|
|
23
|
+
|
|
24
|
+
### 🩹 Fixes
|
|
25
|
+
|
|
26
|
+
- **export:** Quote the CSV header line ([#419](https://github.com/AntelopeJS/dms/pull/419))
|
|
27
|
+
- **format:** Draw the narrow no-break space in Geist, and keep the locale's ([#422](https://github.com/AntelopeJS/dms/pull/422))
|
|
28
|
+
- **playground:** Hydration and invite-extension warnings of the playground pages ([#429](https://github.com/AntelopeJS/dms/pull/429))
|
|
29
|
+
- **tabs:** Take the pill tabs' corners from the theme radius ([#359](https://github.com/AntelopeJS/dms/pull/359))
|
|
30
|
+
- **modules:** Wait for the listing's background read on a return to the page ([#436](https://github.com/AntelopeJS/dms/pull/436))
|
|
31
|
+
|
|
32
|
+
### 💅 Refactors
|
|
33
|
+
|
|
34
|
+
- **i18n:** Translate outside setup through getAppTranslation only ([#423](https://github.com/AntelopeJS/dms/pull/423))
|
|
35
|
+
- **hydration:** Read the runtime's isDmsHydrating, drop isHydratingComponent ([#424](https://github.com/AntelopeJS/dms/pull/424))
|
|
36
|
+
|
|
37
|
+
### 📖 Documentation
|
|
38
|
+
|
|
39
|
+
- **changelog:** Upgrade notes of dms 0.10.0 ([#417](https://github.com/AntelopeJS/dms/pull/417))
|
|
40
|
+
- **deployment:** Require affinity on the realtime routes across instances ([#430](https://github.com/AntelopeJS/dms/pull/430))
|
|
41
|
+
|
|
42
|
+
### 📦 Build
|
|
43
|
+
|
|
44
|
+
- **deps:** Dms-frontend 0.9, interface-data-api 0.4, decorators 0.1.10 ([#437](https://github.com/AntelopeJS/dms/pull/437))
|
|
45
|
+
|
|
46
|
+
### 🏡 Chore
|
|
47
|
+
|
|
48
|
+
- **release:** @antelopejs/interface-dms v0.9.0 ([555267de](https://github.com/AntelopeJS/dms/commit/555267de))
|
|
49
|
+
|
|
50
|
+
### ✅ Tests
|
|
51
|
+
|
|
52
|
+
- Run the backend tests without Ethereal ([#435](https://github.com/AntelopeJS/dms/pull/435))
|
|
53
|
+
- **hydration:** Give the live tests isDmsHydrating ([#438](https://github.com/AntelopeJS/dms/pull/438))
|
|
54
|
+
|
|
55
|
+
#### ⚠️ Breaking Changes
|
|
56
|
+
|
|
57
|
+
- **store:** ⚠️ Changing modules from the store is reserved to development ([#418](https://github.com/AntelopeJS/dms/pull/418))
|
|
58
|
+
- **dms-layout:** ⚠️ Remove the GitHub star button from the footer ([#428](https://github.com/AntelopeJS/dms/pull/428))
|
|
59
|
+
|
|
60
|
+
### ❤️ Contributors
|
|
61
|
+
|
|
62
|
+
- Antony Rizzitelli <rizzitelli.antony@pm.me>
|
|
63
|
+
- Glastis ([@Glastis](http://github.com/Glastis))
|
|
64
|
+
- Alessandro Aloisio ([@alessaloisio](http://github.com/alessaloisio))
|
|
65
|
+
|
|
66
|
+
## v0.10.0
|
|
67
|
+
|
|
68
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.9.8...v0.10.0)
|
|
69
|
+
|
|
70
|
+
### Upgrade notes
|
|
71
|
+
|
|
72
|
+
- Implements `@antelopejs/interface-dms` 0.8 (`>=0.8.0 <0.9.0`); modules raise their floor to `@antelopejs/interface-dms >=0.8.0` and `@antelopejs/dms >=0.10.0`. See [Migrate from 0.7 to 0.8](https://github.com/AntelopeJS/dms/blob/main/packages/dms/docs/02.building/16.migration-0-7-to-0-8.md).
|
|
73
|
+
- `KpiCard`: `showPreviousValue` defaults to `true`, so a card whose data carries `previousValue` prints it beside the change; set `false` to keep a card compact ([#352](https://github.com/AntelopeJS/dms/pull/352)).
|
|
74
|
+
- A `RelationType` / `CascaderRelationType` with `multiple: true` filters with `include` / `exclude` instead of `is` / `is_not`: a saved view or a link filtering it with `is:` lists nothing until saved again or rewritten as `include:` ([#363](https://github.com/AntelopeJS/dms/pull/363)).
|
|
75
|
+
|
|
76
|
+
### 🚀 Enhancements
|
|
77
|
+
|
|
78
|
+
- **config:** Refuse a production start on public secrets or without the dashboard origin ([#401](https://github.com/AntelopeJS/dms/pull/401))
|
|
79
|
+
- **auth:** Take the client address from the header the hosting platform writes (auth.clientIpHeader) ([#405](https://github.com/AntelopeJS/dms/pull/405))
|
|
80
|
+
- **frontend:** Proxy the storage's signed URLs through the frontend server ([#406](https://github.com/AntelopeJS/dms/pull/406))
|
|
81
|
+
- **tenancy:** ⚠️ Route every member and invite write through changeTenantMembers ([#407](https://github.com/AntelopeJS/dms/pull/407))
|
|
82
|
+
- **frontend:** ⚠️ Compute each frontend module from its config, report served versions ([#408](https://github.com/AntelopeJS/dms/pull/408))
|
|
83
|
+
- **dms-core:** One public hydration check, isHydratingComponent ([#376](https://github.com/AntelopeJS/dms/pull/376))
|
|
84
|
+
- **page:** Route params for header-button availability, breadcrumb parent, one PageLayoutRequest ([#387](https://github.com/AntelopeJS/dms/pull/387))
|
|
85
|
+
- Shared page toolbar for pages with a period or live data ([#351](https://github.com/AntelopeJS/dms/pull/351))
|
|
86
|
+
- **drawer:** Resizable drawers, 600px side default, and side panel row options for row drawers ([#375](https://github.com/AntelopeJS/dms/pull/375))
|
|
87
|
+
- **table-view:** Declare watches on the forms a table view generates ([#379](https://github.com/AntelopeJS/dms/pull/379))
|
|
88
|
+
- **interface-dms:** FrontendModulesChanged event for late frontend modules ([#382](https://github.com/AntelopeJS/dms/pull/382))
|
|
89
|
+
- **data-types:** Filter a tags column on the rows holding a tag ([#380](https://github.com/AntelopeJS/dms/pull/380))
|
|
90
|
+
- **table-view:** ⚠️ Adopt @antelopejs/interface-data-api 0.3 ([#389](https://github.com/AntelopeJS/dms/pull/389))
|
|
91
|
+
- **realtime:** Scope page messages to the tenant they are about ([#353](https://github.com/AntelopeJS/dms/pull/353))
|
|
92
|
+
- **automation:** Configurable texts, tone, tenant and templates for the DMS automation nodes ([#337](https://github.com/AntelopeJS/dms/pull/337))
|
|
93
|
+
- **kpi-card:** Show the comparison value and follow the selected comparison ([#352](https://github.com/AntelopeJS/dms/pull/352))
|
|
94
|
+
- **layout-banners:** Scope layout banners to the application's pages by default ([#348](https://github.com/AntelopeJS/dms/pull/348))
|
|
95
|
+
- **row-navigation:** Steps follow the table's full result, live tables and the kanban ([#375](https://github.com/AntelopeJS/dms/pull/375), [#398](https://github.com/AntelopeJS/dms/pull/398))
|
|
96
|
+
- **layout:** Settings from the account menu only, profile picture in the sidebar ([#374](https://github.com/AntelopeJS/dms/pull/374))
|
|
97
|
+
- **form:** Dependent relation options and field value rules ([#346](https://github.com/AntelopeJS/dms/pull/346))
|
|
98
|
+
- **table-view:** Require a table's list for the actions reached from its rows ([#371](https://github.com/AntelopeJS/dms/pull/371))
|
|
99
|
+
- **automation:** Dry-run the DMS actions in a builder test run ([#388](https://github.com/AntelopeJS/dms/pull/388))
|
|
100
|
+
|
|
101
|
+
### 🩹 Fixes
|
|
102
|
+
|
|
103
|
+
- **tenant-lifecycle:** Refuse admission under a barrier with 409, not 500 ([#409](https://github.com/AntelopeJS/dms/pull/409))
|
|
104
|
+
- **auth:** A session outlives the browser only when written persistent ([#377](https://github.com/AntelopeJS/dms/pull/377))
|
|
105
|
+
- **layout:** Store a signed-in user's footer language switch on their profile ([#383](https://github.com/AntelopeJS/dms/pull/383))
|
|
106
|
+
- **skills:** Make dms-dev.sh stop, status and restart work on Windows Git Bash ([#384](https://github.com/AntelopeJS/dms/pull/384))
|
|
107
|
+
- **layout:** Translated close / select labels and a readable phone header ([#386](https://github.com/AntelopeJS/dms/pull/386))
|
|
108
|
+
- **notifications:** Stop Mark read clicks from landing on Delete in the inbox ([#342](https://github.com/AntelopeJS/dms/pull/342))
|
|
109
|
+
- **grid:** Lay a row nested in a cell out on its own children ([#350](https://github.com/AntelopeJS/dms/pull/350))
|
|
110
|
+
- Onboarding SSR read, and row action, row token and action-target container fixes for block-built pages ([#332](https://github.com/AntelopeJS/dms/pull/332))
|
|
111
|
+
- **chart:** Chart and widget fixes for block-built dashboards ([#334](https://github.com/AntelopeJS/dms/pull/334))
|
|
112
|
+
- **save-bar:** Lift the toasts above a save bar on the bottom edge ([#372](https://github.com/AntelopeJS/dms/pull/372))
|
|
113
|
+
- **table-view:** Row containers, grouped display, cards, bulk row runs, wide tables and calendar period comparisons ([#344](https://github.com/AntelopeJS/dms/pull/344))
|
|
114
|
+
- **realtime:** Share one realtime connection between a browser's tabs ([#335](https://github.com/AntelopeJS/dms/pull/335))
|
|
115
|
+
- **form:** Generic form and i18n fixes (nested options, secret rotation, group labels, module-default note) ([#333](https://github.com/AntelopeJS/dms/pull/333))
|
|
116
|
+
- **data-types:** Keep formatters out of component setup and log dev errors ([#338](https://github.com/AntelopeJS/dms/pull/338))
|
|
117
|
+
- **data-types:** Read a null array as empty in include and exclude filters ([#341](https://github.com/AntelopeJS/dms/pull/341))
|
|
118
|
+
- **form:** Keep a refused submit's field error while its value is unchanged ([#360](https://github.com/AntelopeJS/dms/pull/360))
|
|
119
|
+
- **form:** Label a relation's ids from its select route, in the picker and the filter chips ([#378](https://github.com/AntelopeJS/dms/pull/378))
|
|
120
|
+
- **table:** Write a number field's unit wherever its value is drawn ([#381](https://github.com/AntelopeJS/dms/pull/381))
|
|
121
|
+
- **modules:** Modules page and module store polish (installed tiles, store view, working copies) ([#345](https://github.com/AntelopeJS/dms/pull/345))
|
|
122
|
+
- **format:** Read durations as written, let a number step drive the steppers, group every figure ([#391](https://github.com/AntelopeJS/dms/pull/391))
|
|
123
|
+
- **form:** Address suggestions, relation add entry, confirm Close and date picker close ([#392](https://github.com/AntelopeJS/dms/pull/392))
|
|
124
|
+
- **roles:** Preview a role as a non-owner member, and tell resolvers it is a preview ([#356](https://github.com/AntelopeJS/dms/pull/356))
|
|
125
|
+
- **form:** Forms and KeyValueList follow the container's width in drawers and modals ([#375](https://github.com/AntelopeJS/dms/pull/375), [#399](https://github.com/AntelopeJS/dms/pull/399))
|
|
126
|
+
- **table:** Count the archive without agreeing with a noun, let a table view name it ([#394](https://github.com/AntelopeJS/dms/pull/394))
|
|
127
|
+
- **form:** Show a read-only list as a table of values, a URL as its image ([#395](https://github.com/AntelopeJS/dms/pull/395))
|
|
128
|
+
- **dialog:** Closing any dialog gives the page its clicks at once ([#375](https://github.com/AntelopeJS/dms/pull/375), [#400](https://github.com/AntelopeJS/dms/pull/400))
|
|
129
|
+
- **data-types:** Multiple relation include; date greater than excludes the picked day; order filters skip empty values; typed chip editor ([#363](https://github.com/AntelopeJS/dms/pull/363))
|
|
130
|
+
- **table-view:** Combine views with tabs, date chips for relative filters, and keep the tab on reload ([#358](https://github.com/AntelopeJS/dms/pull/358))
|
|
131
|
+
- **form:** Narrow date fields and repeater rows, and relation labels in change notes ([#361](https://github.com/AntelopeJS/dms/pull/361))
|
|
132
|
+
- **frontend:** Refresh counts after a kanban move, no header sort on a hand-ordered table ([#362](https://github.com/AntelopeJS/dms/pull/362))
|
|
133
|
+
- **frontend:** Configured add label in every placement, bulk toast counts what the route changed ([#364](https://github.com/AntelopeJS/dms/pull/364))
|
|
134
|
+
- **table-view:** Warn at registration about a quick filter with no values to pick ([#370](https://github.com/AntelopeJS/dms/pull/370))
|
|
135
|
+
- **form:** Create, cancel and save behaviour of forms, section scroll, error summary ([#343](https://github.com/AntelopeJS/dms/pull/343))
|
|
136
|
+
- No layout shift from the live toggle, fetched banners, KPI and table skeletons, and live rows ([#354](https://github.com/AntelopeJS/dms/pull/354))
|
|
137
|
+
- **table-view:** Links open on the table's defaults, global nav badges, kept view search ([#365](https://github.com/AntelopeJS/dms/pull/365))
|
|
138
|
+
- **table-view:** Tab and view counters count what a click would list ([#373](https://github.com/AntelopeJS/dms/pull/373))
|
|
139
|
+
- **table-view:** Generic TableView fixes from block-built pages ([#336](https://github.com/AntelopeJS/dms/pull/336))
|
|
140
|
+
- **table-view:** Per-action access in forms, relative dates while hydrating, expanded rows ([#385](https://github.com/AntelopeJS/dms/pull/385))
|
|
141
|
+
|
|
142
|
+
### 💅 Refactors
|
|
143
|
+
|
|
144
|
+
- **startup:** Rely on the api startup gate instead of a DMS one ([#402](https://github.com/AntelopeJS/dms/pull/402))
|
|
145
|
+
- **table-view:** Keep a table view's row actions schema in its own module ([#393](https://github.com/AntelopeJS/dms/pull/393))
|
|
146
|
+
- **dms:** ⚠️ Remove the compatibility paths of #119 and #172, restore the migration guides ([#390](https://github.com/AntelopeJS/dms/pull/390), [#119](https://github.com/AntelopeJS/dms/issues/119), [#172](https://github.com/AntelopeJS/dms/issues/172))
|
|
147
|
+
|
|
148
|
+
### 📖 Documentation
|
|
149
|
+
|
|
150
|
+
- **file-storage:** Uploads stop at 100 MB at the Cloudflare edge on AntelopeJS Cloud ([#410](https://github.com/AntelopeJS/dms/pull/410))
|
|
151
|
+
- **migration:** Note the KPI compared-figure default and include on multiple relations ([#415](https://github.com/AntelopeJS/dms/pull/415))
|
|
152
|
+
|
|
153
|
+
### 🏡 Chore
|
|
154
|
+
|
|
155
|
+
- **release:** @antelopejs/interface-dms v0.8.0 ([43489c4e](https://github.com/AntelopeJS/dms/commit/43489c4e))
|
|
156
|
+
|
|
157
|
+
### ✅ Tests
|
|
158
|
+
|
|
159
|
+
- Pin file-storage-local 0.1.11, mongodb 1.4.4 and api with interface-api 0.0.16 in the harness ([#411](https://github.com/AntelopeJS/dms/pull/411))
|
|
160
|
+
- **realtime:** Bind the verified tenant as the auth decorator does ([#414](https://github.com/AntelopeJS/dms/pull/414))
|
|
161
|
+
|
|
162
|
+
#### ⚠️ Breaking Changes
|
|
163
|
+
|
|
164
|
+
- **tenancy:** ⚠️ Route every member and invite write through changeTenantMembers ([#407](https://github.com/AntelopeJS/dms/pull/407))
|
|
165
|
+
- **frontend:** ⚠️ Compute each frontend module from its config, report served versions ([#408](https://github.com/AntelopeJS/dms/pull/408))
|
|
166
|
+
- **table-view:** ⚠️ Adopt @antelopejs/interface-data-api 0.3 ([#389](https://github.com/AntelopeJS/dms/pull/389))
|
|
167
|
+
- **dms:** ⚠️ Remove the compatibility paths of #119 and #172, restore the migration guides ([#390](https://github.com/AntelopeJS/dms/pull/390), [#119](https://github.com/AntelopeJS/dms/issues/119), [#172](https://github.com/AntelopeJS/dms/issues/172))
|
|
168
|
+
|
|
169
|
+
### ❤️ Contributors
|
|
170
|
+
|
|
171
|
+
- Antony Rizzitelli <rizzitelli.antony@pm.me>
|
|
172
|
+
- Maxime Westhoven <maxime@altab.be>
|
|
173
|
+
|
|
3
174
|
## v0.9.8
|
|
4
175
|
|
|
5
176
|
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.9.7...v0.9.8)
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ ajs project modules add @antelopejs/dms
|
|
|
39
39
|
pnpm add -D @antelopejs/dms-frontend
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
The DMS also needs an API module, a module implementing the database interface, and an authentication module: see [Installation](https://dms.antelopejs.com/docs/getting-started/installation). Its settings belong in the `config` block of `@antelopejs/dms` in `antelope.config.ts` ([Configuration](https://dms.antelopejs.com/docs/building/configuration)). In production, set strong values for `auth.jwtSecret`, `htmlRender.serviceSecret` and `frontend.bootstrapSecret
|
|
42
|
+
The DMS also needs an API module, a module implementing the database interface, and an authentication module: see [Installation](https://dms.antelopejs.com/docs/getting-started/installation). Its settings belong in the `config` block of `@antelopejs/dms` in `antelope.config.ts` ([Configuration](https://dms.antelopejs.com/docs/building/configuration)). In production, set `clientBaseUrl` and strong values for `auth.jwtSecret`, `htmlRender.serviceSecret` and `frontend.bootstrapSecret` (the DMS refuses to start without the first three), and use Redis for realtime across several backend instances.
|
|
43
43
|
|
|
44
44
|
## Quick start
|
|
45
45
|
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"id": "mailing",
|
|
48
48
|
"package": "@antelopejs/dms-mailing",
|
|
49
49
|
"icon": "i-ph-envelope-simple",
|
|
50
|
-
"category": "
|
|
50
|
+
"category": "communication"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"id": "marketing",
|
|
54
54
|
"package": "@antelopejs/dms-marketing",
|
|
55
55
|
"icon": "i-ph-chart-line-up",
|
|
56
|
-
"category": "
|
|
56
|
+
"category": "analytics"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"id": "media",
|
|
@@ -48,8 +48,8 @@ async function SaveTableViewAttachments(request) {
|
|
|
48
48
|
...(0, guards_1.parseGuardBody)(args[0]),
|
|
49
49
|
},
|
|
50
50
|
}, async (promoted) => {
|
|
51
|
-
const result = await route.func.call(controller, context, params,
|
|
52
|
-
const id = documentId ||
|
|
51
|
+
const result = await route.func.call(controller, context, params, promoted, ...args.slice(1));
|
|
52
|
+
const id = documentId || result?._id;
|
|
53
53
|
if (typeof id !== "string" || !id)
|
|
54
54
|
(0, registry_1.denyAttachment)();
|
|
55
55
|
const document = await loadDocument(controller, fields, id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-view.js","sourceRoot":"","sources":["../../src/attachments/table-view.ts"],"names":[],"mappings":";;AAuDA,
|
|
1
|
+
{"version":3,"file":"table-view.js","sourceRoot":"","sources":["../../src/attachments/table-view.ts"],"names":[],"mappings":";;AAuDA,4DA2CC;AAlGD,uEAAuE;AAEvE,6FAImD;AACnD,uEAA0E;AAG1E,sFAA2F;AAC3F,kFAGiE;AACjE,yCAAmD;AACnD,qCAA8C;AAC9C,yCAA4C;AAC5C,iCAA4C;AAE5C,KAAK,UAAU,YAAY,CACzB,UAAmB,EACnB,MAAyB,EACzB,EAAU;IAEV,MAAM,IAAI,GAAG,IAAA,0CAAqB,EAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,IAAA,0BAAmB,EAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC;IAC1E,MAAM,GAAG,GAAG,MAAM,IAAA,6BAAgB,EAChC,UAAU,EACV,EAAE,EACF,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,OAAO,CACxC,CAAC;IACF,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAA,6CAAa,EAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACnD,IAAA,sCAAM,EAAC,MAAM,EAAE,oDAAoB,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IACrD,OAAO,MAAM,CAAC,WAAW,CACvB,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;QAC1D,GAAG;QACH,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CA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AAC,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACxE,CAAC;IACF,OAAO,IAAA,yBAAkB,EACvB,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,EACxD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,MAAM,EAAE,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACnE,QAAQ,EAAE,EAAE;KACb,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,40 +1,85 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ACTIONS = void 0;
|
|
3
|
+
exports.ACTIONS = exports.INVITE_USER_ACTION_ID = exports.SEND_EMAIL_ACTION_ID = void 0;
|
|
4
4
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
5
5
|
const interface_email_1 = require("@antelopejs/interface-email");
|
|
6
6
|
const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
7
7
|
const db_1 = require("@antelopejs/interface-dms/db");
|
|
8
|
+
const html_render_1 = require("@antelopejs/interface-dms/html-render");
|
|
8
9
|
const invites_1 = require("@antelopejs/interface-dms/invites");
|
|
9
10
|
const db_2 = require("@antelopejs/interface-dms/auth/db");
|
|
10
|
-
const
|
|
11
|
+
const i18n_1 = require("./i18n");
|
|
12
|
+
const send_notification_1 = require("./send-notification");
|
|
13
|
+
exports.SEND_EMAIL_ACTION_ID = "dms.send-email";
|
|
14
|
+
const SEND_EMAIL_TEXTS = "actions.sendEmail";
|
|
15
|
+
async function recipientLanguage(email) {
|
|
16
|
+
const user = await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).getByEmail(email);
|
|
17
|
+
return user?.language || undefined;
|
|
18
|
+
}
|
|
19
|
+
async function bodyTemplate(input) {
|
|
20
|
+
const template = input.template?.trim();
|
|
21
|
+
if (!template) {
|
|
22
|
+
if (typeof input.html === "string")
|
|
23
|
+
return undefined;
|
|
24
|
+
throw new Error(`${exports.SEND_EMAIL_ACTION_ID} requires html or a template`);
|
|
25
|
+
}
|
|
26
|
+
if (!(await (0, html_render_1.GetHtmlTemplate)(template))) {
|
|
27
|
+
throw new Error(`${exports.SEND_EMAIL_ACTION_ID}: no HTML template is registered as "${template}"`);
|
|
28
|
+
}
|
|
29
|
+
return template;
|
|
30
|
+
}
|
|
31
|
+
async function emailBody(input) {
|
|
32
|
+
const template = await bodyTemplate(input);
|
|
33
|
+
if (!template)
|
|
34
|
+
return input.html ?? "";
|
|
35
|
+
const language = input.language?.trim() || (await recipientLanguage(input.to));
|
|
36
|
+
return (0, html_render_1.GenerateHtml)({ name: template }, input.props ?? {}, language);
|
|
37
|
+
}
|
|
11
38
|
const sendEmailAction = {
|
|
12
|
-
id:
|
|
13
|
-
name:
|
|
14
|
-
description:
|
|
39
|
+
id: exports.SEND_EMAIL_ACTION_ID,
|
|
40
|
+
name: (0, i18n_1.nodeText)(SEND_EMAIL_TEXTS, "name"),
|
|
41
|
+
description: (0, i18n_1.nodeText)(SEND_EMAIL_TEXTS, "description"),
|
|
15
42
|
icon: "i-ph-envelope-simple",
|
|
16
43
|
inputSchema: {
|
|
17
44
|
type: "object",
|
|
18
|
-
properties: {
|
|
45
|
+
properties: (0, i18n_1.titledProperties)({
|
|
19
46
|
to: { type: "string" },
|
|
20
47
|
subject: { type: "string" },
|
|
21
48
|
html: { type: "string" },
|
|
22
|
-
|
|
23
|
-
|
|
49
|
+
template: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: (0, i18n_1.fieldHint)(SEND_EMAIL_TEXTS, "template"),
|
|
52
|
+
},
|
|
53
|
+
props: {
|
|
54
|
+
type: "object",
|
|
55
|
+
description: (0, i18n_1.fieldHint)(SEND_EMAIL_TEXTS, "props"),
|
|
56
|
+
},
|
|
57
|
+
language: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: (0, i18n_1.fieldHint)(SEND_EMAIL_TEXTS, "language"),
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
required: ["to", "subject"],
|
|
63
|
+
anyOf: [{ required: ["html"] }, { required: ["template"] }],
|
|
24
64
|
},
|
|
25
65
|
outputSchema: {
|
|
26
66
|
type: "object",
|
|
27
|
-
properties: {
|
|
67
|
+
properties: (0, i18n_1.titledProperties)({
|
|
28
68
|
success: { type: "boolean" },
|
|
29
69
|
messageId: { type: "string" },
|
|
30
70
|
error: { type: "string" },
|
|
31
|
-
},
|
|
71
|
+
}),
|
|
72
|
+
},
|
|
73
|
+
async dryRun(input, ctx) {
|
|
74
|
+
await bodyTemplate(input);
|
|
75
|
+
ctx.log("info", `test run: email to "${input.to}" not sent`);
|
|
76
|
+
return { success: true };
|
|
32
77
|
},
|
|
33
78
|
async execute(input, ctx) {
|
|
34
79
|
const result = await (0, interface_email_1.Send)({
|
|
35
80
|
to: input.to,
|
|
36
81
|
subject: input.subject,
|
|
37
|
-
html: input
|
|
82
|
+
html: await emailBody(input),
|
|
38
83
|
});
|
|
39
84
|
if (!result.success) {
|
|
40
85
|
ctx.log("error", `email to "${input.to}" failed`, result.error?.message);
|
|
@@ -46,86 +91,85 @@ const sendEmailAction = {
|
|
|
46
91
|
};
|
|
47
92
|
},
|
|
48
93
|
};
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const roleIds = input.roleIds ?? [];
|
|
75
|
-
if (userIds.length === 0 && roleIds.length === 0) {
|
|
76
|
-
throw new Error("dms.send-notification requires at least one of userIds / roleIds");
|
|
77
|
-
}
|
|
78
|
-
const base = (0, notifications_1.Notification)()
|
|
79
|
-
.icon(input.icon ?? DEFAULT_NOTIFICATION_ICON)
|
|
80
|
-
.title(input.title)
|
|
81
|
-
.description(input.description)
|
|
82
|
-
.subject(notifications_1.AutomationSubject);
|
|
83
|
-
const sendable = input.linkTo
|
|
84
|
-
? base.linkTo(input.linkTo).build()
|
|
85
|
-
: base.build();
|
|
86
|
-
if (userIds.length > 0)
|
|
87
|
-
await sendable.toUsers(userIds);
|
|
88
|
-
if (roleIds.length > 0)
|
|
89
|
-
await sendable.toRoles(roleIds);
|
|
90
|
-
return { ok: true };
|
|
91
|
-
},
|
|
92
|
-
};
|
|
94
|
+
exports.INVITE_USER_ACTION_ID = "dms.invite-user";
|
|
95
|
+
const INVITE_USER_TEXTS = "actions.inviteUser";
|
|
96
|
+
function invitationDetails(input) {
|
|
97
|
+
const details = {};
|
|
98
|
+
const language = input.language?.trim();
|
|
99
|
+
const firstname = input.firstname?.trim();
|
|
100
|
+
const lastname = input.lastname?.trim();
|
|
101
|
+
const inviterName = input.inviterName?.trim();
|
|
102
|
+
if (language)
|
|
103
|
+
details.language = language;
|
|
104
|
+
if (firstname)
|
|
105
|
+
details.firstname = firstname;
|
|
106
|
+
if (lastname)
|
|
107
|
+
details.lastname = lastname;
|
|
108
|
+
if (inviterName)
|
|
109
|
+
details.inviterName = inviterName;
|
|
110
|
+
return details;
|
|
111
|
+
}
|
|
112
|
+
async function existingMembership(email, tenantId) {
|
|
113
|
+
const user = await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).getByEmail(email);
|
|
114
|
+
if (!user)
|
|
115
|
+
return { member: false };
|
|
116
|
+
const member = await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, tenantId).getByUser(user._id);
|
|
117
|
+
return { userId: user._id, member: Boolean(member) };
|
|
118
|
+
}
|
|
93
119
|
const inviteUserAction = {
|
|
94
|
-
id:
|
|
95
|
-
name:
|
|
96
|
-
description:
|
|
120
|
+
id: exports.INVITE_USER_ACTION_ID,
|
|
121
|
+
name: (0, i18n_1.nodeText)(INVITE_USER_TEXTS, "name"),
|
|
122
|
+
description: (0, i18n_1.nodeText)(INVITE_USER_TEXTS, "description"),
|
|
97
123
|
icon: "i-ph-user-plus",
|
|
98
124
|
inputSchema: {
|
|
99
125
|
type: "object",
|
|
100
|
-
properties: {
|
|
126
|
+
properties: (0, i18n_1.titledProperties)({
|
|
101
127
|
email: { type: "string" },
|
|
102
128
|
tenantId: {
|
|
103
129
|
type: "string",
|
|
104
|
-
description:
|
|
130
|
+
description: (0, i18n_1.fieldHint)(INVITE_USER_TEXTS, "tenantId"),
|
|
105
131
|
},
|
|
106
132
|
roleIds: { type: "array", items: { type: "string" } },
|
|
107
133
|
asTenantOwner: { type: "boolean", default: false },
|
|
108
134
|
sendEmail: { type: "boolean", default: true },
|
|
109
|
-
|
|
135
|
+
language: {
|
|
136
|
+
type: "string",
|
|
137
|
+
description: (0, i18n_1.fieldHint)(INVITE_USER_TEXTS, "language"),
|
|
138
|
+
},
|
|
139
|
+
firstname: { type: "string" },
|
|
140
|
+
lastname: { type: "string" },
|
|
141
|
+
inviterName: {
|
|
142
|
+
type: "string",
|
|
143
|
+
description: (0, i18n_1.fieldHint)(INVITE_USER_TEXTS, "inviterName"),
|
|
144
|
+
},
|
|
145
|
+
}),
|
|
110
146
|
required: ["email"],
|
|
111
147
|
},
|
|
112
148
|
outputSchema: {
|
|
113
149
|
type: "object",
|
|
114
|
-
properties: {
|
|
150
|
+
properties: (0, i18n_1.titledProperties)({
|
|
115
151
|
kind: { type: "string", enum: ["added", "invited", "already-member"] },
|
|
116
152
|
userId: { type: "string" },
|
|
117
153
|
inviteId: { type: "string" },
|
|
118
|
-
},
|
|
154
|
+
}),
|
|
155
|
+
},
|
|
156
|
+
async dryRun(input, ctx) {
|
|
157
|
+
const tenantId = input.tenantId?.trim() || constants_1.DEFAULT_TENANT_ID;
|
|
158
|
+
const existing = await existingMembership(input.email, tenantId);
|
|
159
|
+
if (existing.member) {
|
|
160
|
+
return { kind: "already-member", userId: existing.userId };
|
|
161
|
+
}
|
|
162
|
+
ctx.log("info", `test run: "${input.email}" not invited to tenant "${tenantId}"`);
|
|
163
|
+
if (existing.userId)
|
|
164
|
+
return { kind: "added", userId: existing.userId };
|
|
165
|
+
return { kind: "invited" };
|
|
119
166
|
},
|
|
120
167
|
async execute(input, ctx) {
|
|
121
168
|
const tenantId = input.tenantId?.trim() || constants_1.DEFAULT_TENANT_ID;
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
ctx.log("warn", `"${input.email}" is already a member of tenant "${tenantId}"; membership left unchanged`);
|
|
127
|
-
return { kind: "already-member", userId: existingUser._id };
|
|
128
|
-
}
|
|
169
|
+
const existing = await existingMembership(input.email, tenantId);
|
|
170
|
+
if (existing.member) {
|
|
171
|
+
ctx.log("warn", `"${input.email}" is already a member of tenant "${tenantId}"; membership left unchanged`);
|
|
172
|
+
return { kind: "already-member", userId: existing.userId };
|
|
129
173
|
}
|
|
130
174
|
const result = await (0, invites_1.inviteUserToTenant)({
|
|
131
175
|
tenantId,
|
|
@@ -133,6 +177,7 @@ const inviteUserAction = {
|
|
|
133
177
|
roleIds: input.roleIds ?? [],
|
|
134
178
|
asTenantOwner: input.asTenantOwner ?? false,
|
|
135
179
|
sendEmail: input.sendEmail ?? true,
|
|
180
|
+
...invitationDetails(input),
|
|
136
181
|
});
|
|
137
182
|
if (result.kind === "added") {
|
|
138
183
|
ctx.log("info", `existing user added to tenant "${tenantId}"`, result.userId);
|
|
@@ -144,7 +189,7 @@ const inviteUserAction = {
|
|
|
144
189
|
};
|
|
145
190
|
exports.ACTIONS = [
|
|
146
191
|
sendEmailAction,
|
|
147
|
-
sendNotificationAction,
|
|
192
|
+
send_notification_1.sendNotificationAction,
|
|
148
193
|
inviteUserAction,
|
|
149
194
|
];
|
|
150
195
|
//# sourceMappingURL=actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/automation/actions.ts"],"names":[],"mappings":";;;AAAA,6FAAqE;AACrE,iEAAmD;AACnD,mEAAwE;AACxE,qDAAiE;AACjE,+
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/automation/actions.ts"],"names":[],"mappings":";;;AAAA,6FAAqE;AACrE,iEAAmD;AACnD,mEAAwE;AACxE,qDAAiE;AACjE,uEAG+C;AAC/C,+DAG2C;AAC3C,0DAA8D;AAE9D,iCAA+D;AAC/D,2DAA6D;AAEhD,QAAA,oBAAoB,GAAG,gBAAgB,CAAC;AACrD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAkB7C,KAAK,UAAU,iBAAiB,CAAC,KAAa;IAC5C,MAAM,IAAI,GAAG,MAAM,IAAA,wCAAQ,EAAC,cAAS,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACzD,OAAO,IAAI,EAAE,QAAQ,IAAI,SAAS,CAAC;AACrC,CAAC;AAOD,KAAK,UAAU,YAAY,CACzB,KAAqB;IAErB,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,GAAG,4BAAoB,8BAA8B,CAAC,CAAC;IACzE,CAAC;IACD,IAAI,CAAC,CAAC,MAAM,IAAA,6BAAe,EAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CACb,GAAG,4BAAoB,wCAAwC,QAAQ,GAAG,CAC3E,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,CAAC,MAAM,EAAE,CAAC;QAC7D,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAkB,EAAC;YACtC,QAAQ;YACR,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;YAC5B,aAAa,EAAE,KAAK,CAAC,aAAa,IAAI,KAAK;YAC3C,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI;YAClC,GAAG,iBAAiB,CAAC,KAAK,CAAC;SAC5B,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC5B,GAAG,CAAC,GAAG,CACL,MAAM,EACN,kCAAkC,QAAQ,GAAG,EAC7C,MAAM,CAAC,MAAM,CACd,CAAC;YACF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;QAClD,CAAC;QACD,GAAG,CAAC,GAAG,CACL,MAAM,EACN,uBAAuB,KAAK,CAAC,KAAK,gBAAgB,QAAQ,GAAG,EAC7D,MAAM,CAAC,QAAQ,CAChB,CAAC;QACF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;IACxD,CAAC;CACF,CAAC;AAEW,QAAA,OAAO,GAAiB;IACnC,eAAe;IACf,0CAAsB;IACtB,gBAAgB;CACjB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { JsonSchema } from "@antelopejs/interface-dms-automation";
|
|
2
|
+
export declare function nodeText(node: string, text: string): string;
|
|
3
|
+
export declare function fieldHint(node: string, field: string): string;
|
|
4
|
+
export declare function titledProperties(properties: Record<string, JsonSchema>): Record<string, JsonSchema>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nodeText = nodeText;
|
|
4
|
+
exports.fieldHint = fieldHint;
|
|
5
|
+
exports.titledProperties = titledProperties;
|
|
6
|
+
const NAMESPACE = "$dms.automation";
|
|
7
|
+
function nodeText(node, text) {
|
|
8
|
+
return `${NAMESPACE}.${node}.${text}`;
|
|
9
|
+
}
|
|
10
|
+
function fieldHint(node, field) {
|
|
11
|
+
return nodeText(node, `fields.${field}`);
|
|
12
|
+
}
|
|
13
|
+
function titledProperties(properties) {
|
|
14
|
+
return Object.fromEntries(Object.entries(properties).map(([name, schema]) => [
|
|
15
|
+
name,
|
|
16
|
+
{ title: `${NAMESPACE}.fields.${name}`, ...schema },
|
|
17
|
+
]));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/automation/i18n.ts"],"names":[],"mappings":";;AAUA,4BAEC;AAGD,8BAEC;AAOD,4CASC;AA1BD,MAAM,SAAS,GAAG,iBAAiB,CAAC;AAGpC,SAAgB,QAAQ,CAAC,IAAY,EAAE,IAAY;IACjD,OAAO,GAAG,SAAS,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;AACxC,CAAC;AAGD,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,OAAO,QAAQ,CAAC,IAAI,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;AAC3C,CAAC;AAOD,SAAgB,gBAAgB,CAC9B,UAAsC;IAEtC,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;QACjD,IAAI;QACJ,EAAE,KAAK,EAAE,GAAG,SAAS,WAAW,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE;KACpD,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ActionType } from "@antelopejs/interface-dms-automation";
|
|
2
|
+
export declare const SEND_NOTIFICATION_ACTION_ID = "dms.send-notification";
|
|
3
|
+
export declare const NOTIFICATION_TONES: readonly ["neutral", "primary", "success", "warning", "error"];
|
|
4
|
+
interface SendNotificationInput {
|
|
5
|
+
userId?: string;
|
|
6
|
+
userIds?: string[];
|
|
7
|
+
roleIds?: string[];
|
|
8
|
+
tenantId?: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
params?: Record<string, unknown>;
|
|
12
|
+
tone?: string;
|
|
13
|
+
icon?: string;
|
|
14
|
+
linkTo?: string;
|
|
15
|
+
idempotencyKey?: string;
|
|
16
|
+
}
|
|
17
|
+
interface SendNotificationOutput {
|
|
18
|
+
ok: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const sendNotificationAction: ActionType<SendNotificationInput, SendNotificationOutput>;
|
|
21
|
+
export {};
|