@antelopejs/dms 0.19.3 → 0.19.5
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 +55 -0
- package/README.md +1 -1
- package/dist/attachments/bindings.js +4 -2
- package/dist/attachments/bindings.js.map +1 -1
- package/dist/attachments/fields.d.ts +2 -2
- package/dist/attachments/fields.js +3 -2
- package/dist/attachments/fields.js.map +1 -1
- package/dist/attachments/save.d.ts +1 -1
- package/dist/attachments/save.js +2 -2
- package/dist/attachments/save.js.map +1 -1
- package/dist/attachments/table-view.js +13 -4
- package/dist/attachments/table-view.js.map +1 -1
- package/dist/automation/actions.js +2 -1
- package/dist/automation/actions.js.map +1 -1
- package/dist/automation/events.d.ts +5 -1
- package/dist/automation/events.js +10 -7
- package/dist/automation/events.js.map +1 -1
- package/dist/automation/send-notification.d.ts +2 -2
- package/dist/automation/send-notification.js +4 -3
- package/dist/automation/send-notification.js.map +1 -1
- package/dist/automation/sources.js.map +1 -1
- package/dist/automation/triggers.js +3 -5
- package/dist/automation/triggers.js.map +1 -1
- package/dist/db/guard-row.d.ts +2 -1
- package/dist/db/guard-row.js.map +1 -1
- package/dist/db/models/userNotificationPreferences.model.js +2 -1
- package/dist/db/models/userNotificationPreferences.model.js.map +1 -1
- package/dist/db/models/userNotifications.model.js +2 -1
- package/dist/db/models/userNotifications.model.js.map +1 -1
- package/dist/dev/module-update-notifications.js +10 -4
- package/dist/dev/module-update-notifications.js.map +1 -1
- package/dist/hooks/internal/workspace-notifications.js +8 -5
- package/dist/hooks/internal/workspace-notifications.js.map +1 -1
- package/dist/implementations/dms/menu-categories.d.ts +4 -4
- package/dist/implementations/dms/menu-categories.js +1 -0
- package/dist/implementations/dms/menu-categories.js.map +1 -1
- package/dist/implementations/dms/page/module-catalog.js +2 -1
- package/dist/implementations/dms/page/module-catalog.js.map +1 -1
- package/dist/implementations/dms/page/preview-models.d.ts +82 -6
- package/dist/implementations/dms/page/preview-models.js +43 -22
- package/dist/implementations/dms/page/preview-models.js.map +1 -1
- package/dist/implementations/dms/page/preview-pages.js +1 -1
- package/dist/implementations/dms/page/preview-pages.js.map +1 -1
- package/dist/implementations/dms/page/types.d.ts +0 -1
- package/dist/implementations/dms/permission-preview.d.ts +9 -3
- package/dist/implementations/dms/permission-preview.js +29 -2
- package/dist/implementations/dms/permission-preview.js.map +1 -1
- package/dist/implementations/dms-auth/index.d.ts +8 -1
- package/dist/implementations/dms-auth/index.js +40 -16
- package/dist/implementations/dms-auth/index.js.map +1 -1
- package/dist/implementations/dms-auth/session-handoff.js +4 -3
- package/dist/implementations/dms-auth/session-handoff.js.map +1 -1
- package/dist/implementations/dms-auth/token-session.js +2 -1
- package/dist/implementations/dms-auth/token-session.js.map +1 -1
- package/dist/implementations/dms-base/bulk-selection.js +2 -1
- package/dist/implementations/dms-base/bulk-selection.js.map +1 -1
- package/dist/implementations/dms-base/filter-tokens.js +2 -3
- package/dist/implementations/dms-base/filter-tokens.js.map +1 -1
- package/dist/implementations/dms-base/footer-summary.js.map +1 -1
- package/dist/implementations/dms-base/search-route.d.ts +3 -3
- package/dist/implementations/dms-base/search-route.js +4 -3
- package/dist/implementations/dms-base/search-route.js.map +1 -1
- package/dist/implementations/dms-base/table-view.d.ts +7 -7
- package/dist/implementations/dms-base/table-view.js +5 -4
- package/dist/implementations/dms-base/table-view.js.map +1 -1
- package/dist/implementations/dms-notifications/delivery-guard.js +2 -1
- package/dist/implementations/dms-notifications/delivery-guard.js.map +1 -1
- package/dist/pages/public/preview/block-types.d.ts +2 -1
- package/dist/pages/settings/overview/account-summary.js.map +1 -1
- package/dist/pages/settings/users/account-activity-feed.js +2 -1
- package/dist/pages/settings/users/account-activity-feed.js.map +1 -1
- package/dist/pages/settings/users/account-activity.js +29 -1
- package/dist/pages/settings/users/account-activity.js.map +1 -1
- package/dist/pages/settings/users/account-data.d.ts +54 -5
- package/dist/pages/settings/users/account-data.js.map +1 -1
- package/dist/pages/settings/users/member-change-notifications.d.ts +3 -1
- package/dist/pages/settings/users/member-change-notifications.js.map +1 -1
- package/dist/pages/settings/users/member-invite-batch.js +2 -1
- package/dist/pages/settings/users/member-invite-batch.js.map +1 -1
- package/dist/pages/settings/users/member-management.d.ts +2 -2
- package/dist/pages/settings/users/member-management.js.map +1 -1
- package/dist/pages/settings/users/members.js +2 -3
- package/dist/pages/settings/users/members.js.map +1 -1
- package/dist/pages/settings/users/notifications.js.map +1 -1
- package/dist/pages/settings/users/profile-helpers.js +9 -1
- package/dist/pages/settings/users/profile-helpers.js.map +1 -1
- package/dist/pages/settings/users/profile.js +18 -2
- package/dist/pages/settings/users/profile.js.map +1 -1
- package/dist/pages/settings/users/regional-preferences.js +6 -2
- package/dist/pages/settings/users/regional-preferences.js.map +1 -1
- package/dist/pages/settings/users/role-editor-store.d.ts +2 -2
- package/dist/pages/settings/users/role-editor-store.js.map +1 -1
- package/dist/pages/settings/users/two-factor-operations.js +1 -0
- package/dist/pages/settings/users/two-factor-operations.js.map +1 -1
- package/dist/realtime/broker.d.ts +2 -1
- package/dist/realtime/broker.js.map +1 -1
- package/dist/routes/auth/oauth/config.js +2 -1
- package/dist/routes/auth/oauth/config.js.map +1 -1
- package/dist/routes/auth/oauth/providers.d.ts +21 -1
- package/dist/routes/auth/oauth/providers.js +2 -2
- package/dist/routes/auth/oauth/providers.js.map +1 -1
- package/dist/store/declarations.d.ts +1 -8
- package/dist/store/declarations.js +2 -3
- package/dist/store/declarations.js.map +1 -1
- package/dist/store/internal/frontend/frontend-backend-proxies.js +3 -2
- package/dist/store/internal/frontend/frontend-backend-proxies.js.map +1 -1
- package/dist/store/internal/frontend/frontend-modules.js +3 -2
- package/dist/store/internal/frontend/frontend-modules.js.map +1 -1
- package/dist/store/internal/frontend/frontend-public-endpoints.js +8 -9
- package/dist/store/internal/frontend/frontend-public-endpoints.js.map +1 -1
- package/dist/store/internal/frontend/manifest.js +5 -4
- package/dist/store/internal/frontend/manifest.js.map +1 -1
- package/dist/store/operations.js.map +1 -1
- package/dist/store/registry.js +19 -7
- package/dist/store/registry.js.map +1 -1
- package/dist/store/types.d.ts +2 -1
- package/dist/utils/account-notifications.js +8 -5
- package/dist/utils/account-notifications.js.map +1 -1
- package/dist/utils/admin-invite-email.js.map +1 -1
- package/dist/utils/client-ip.js +2 -1
- package/dist/utils/client-ip.js.map +1 -1
- package/dist/utils/email-subjects.js.map +1 -1
- package/dist/utils/export-jobs-run.js +1 -1
- package/dist/utils/export-jobs-run.js.map +1 -1
- package/dist/utils/export-jobs.js +1 -4
- package/dist/utils/export-jobs.js.map +1 -1
- package/dist/utils/row-action-rule-evaluator.d.ts +2 -1
- package/dist/utils/row-action-rule-evaluator.js.map +1 -1
- package/dist/utils/sign-in-country.d.ts +1 -1
- package/dist/utils/sign-in-country.js +2 -1
- package/dist/utils/sign-in-country.js.map +1 -1
- package/dist/utils/tenant-instances.js +1 -1
- package/dist/utils/tenant-instances.js.map +1 -1
- package/dist/utils/two-factor-codes.d.ts +1 -0
- package/dist/utils/two-factor-codes.js +6 -0
- package/dist/utils/two-factor-codes.js.map +1 -1
- package/dist/utils/upload-token.js +7 -6
- package/dist/utils/upload-token.js.map +1 -1
- package/dist/utils/user-agent.js.map +1 -1
- package/dist/validation/store.schema.d.ts +3 -0
- package/dist/validation/store.schema.js +2 -1
- package/dist/validation/store.schema.js.map +1 -1
- package/frontend-vue/eslint-globals.generated.d.mts +8 -0
- package/frontend-vue/eslint-globals.generated.mjs +942 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +1 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +1 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +1 -2
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +1 -1
- package/frontend-vue/layers/dms-auth/server/accounts.ts +0 -1
- package/frontend-vue/layers/dms-auth/server/actions.ts +0 -2
- package/frontend-vue/layers/dms-auth/server/oauth.ts +0 -2
- package/frontend-vue/layers/dms-auth/server/session.ts +0 -2
- package/frontend-vue/layers/dms-core/app/build/composables/user/preferencesCookie.ts +0 -1
- package/frontend-vue/layers/dms-core/app/build/composables/user/tablePreferences.ts +0 -2
- package/frontend-vue/layers/dms-core/app/build/utils/crossTab.ts +0 -1
- package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +0 -1
- package/frontend-vue/layers/dms-core/app/build/utils/sharedRealtimeConnection.ts +0 -4
- package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +11 -7
- package/frontend-vue/layers/dms-core/app/composables/auth/useMultiAccount.ts +2 -5
- package/frontend-vue/layers/dms-core/app/composables/auth/useSessionRecovery.ts +0 -1
- package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +0 -2
- package/frontend-vue/layers/dms-core/app/composables/page/useSiteLayout.ts +41 -25
- package/frontend-vue/layers/dms-core/app/composables/realtime/useSseStream.ts +0 -2
- package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +0 -1
- package/frontend-vue/layers/dms-core/app/composables/useEventedAction.ts +0 -1
- package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +0 -2
- package/frontend-vue/layers/dms-core/app/composables/useTrailingDeduper.ts +10 -11
- package/frontend-vue/layers/dms-core/app/composables/user/usePreferences.ts +0 -1
- package/frontend-vue/layers/dms-core/app/composables/watch/useWatch.ts +0 -1
- package/frontend-vue/layers/dms-core/app/types/module-store.ts +0 -1
- package/frontend-vue/layers/dms-core/app/types/page.ts +0 -2
- package/frontend-vue/layers/dms-core/app/types/watch.ts +0 -1
- package/frontend-vue/layers/dms-core/app/utils/composedText.ts +34 -26
- package/frontend-vue/layers/dms-core/app/utils/dedupedRefresh.ts +0 -2
- package/frontend-vue/layers/dms-core/app/utils/formatter.ts +0 -2
- package/frontend-vue/layers/dms-core/app/utils/menu.ts +0 -1
- package/frontend-vue/layers/dms-core/app/utils/pageQuery.ts +0 -1
- package/frontend-vue/layers/dms-core/app/utils/query-validation.ts +0 -1
- package/frontend-vue/layers/dms-core/app/utils/stringTypeParser.ts +0 -1
- package/frontend-vue/layers/dms-core/app/utils/type-check.ts +0 -3
- package/frontend-vue/layers/dms-layout/app/build/components/layout/CommandPaletteAssistantAnswer.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +8 -3
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +1 -2
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +1 -5
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageSkeleton.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +0 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/members/MemberRolePicker.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/profile/ProfilePersonalInfo.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/profile/ProfileSummaryRow.vue +2 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityEmail.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityPassword.vue +4 -4
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecuritySessions.vue +1 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityTwoFactor.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/AppearanceAccessibility.vue +2 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/AppearanceDeveloper.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/AppearanceSidebar.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/CssVariablesList.vue +0 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/navigation/useVisitNavBadges.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityFormat.ts +0 -3
- package/frontend-vue/layers/dms-layout/app/build/utils/modules-catalog.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/composables/page/useModuleHistory.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/composables/page/useModulesListing.ts +0 -3
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageComponentPreload.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/custom-pages/settings/roles.vue +0 -1
- package/frontend-vue/layers/dms-layout/app/custom-pages/settings/shortcuts.vue +0 -1
- package/frontend-vue/layers/dms-layout/app/emails/components/EmailLayout.vue +2 -2
- package/frontend-vue/layers/dms-layout/app/pages/[...slug].vue +0 -2
- package/frontend-vue/layers/dms-layout/app/plugins/profile-sync.client.ts +0 -2
- package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +0 -1
- package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/StepIndicator.vue +12 -6
- package/frontend-vue/layers/dms-ui/app/build/components/chart/internal/ChartSkeleton.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/containers/drawer/DynamicDrawer.vue +10 -16
- package/frontend-vue/layers/dms-ui/app/build/components/containers/modal/DynamicModal.vue +0 -2
- package/frontend-vue/layers/dms-ui/app/build/components/containers/row/RowHeader.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/period/PeriodRangeCalendar.vue +0 -4
- package/frontend-vue/layers/dms-ui/app/build/components/skeleton/RowSkeleton.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/sortable/SortableList.vue +0 -2
- package/frontend-vue/layers/dms-ui/app/build/components/stat/StatCell.vue +5 -5
- package/frontend-vue/layers/dms-ui/app/build/components/table/Actions.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/FiltersRow.vue +0 -4
- package/frontend-vue/layers/dms-ui/app/build/components/table/Menu.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuColumns.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuDensity.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuFilter.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuImport.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuPage.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuRoot.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuSort.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuViewMode.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/Pagination.vue +1 -2
- package/frontend-vue/layers/dms-ui/app/build/components/table/RowSelection.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/Table.vue +12 -9
- package/frontend-vue/layers/dms-ui/app/build/components/table/TableBody.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/Tabs.vue +1 -2
- package/frontend-vue/layers/dms-ui/app/build/components/table/Views.vue +1 -2
- package/frontend-vue/layers/dms-ui/app/build/components/table/tableComponentPinning.ts +4 -2
- package/frontend-vue/layers/dms-ui/app/build/components/table/tableComponentScroll.ts +7 -7
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardGridSkeleton.vue +2 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardsDisplay.vue +0 -2
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/ExpandedRowDetail.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/actions/actionTargetRows.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/blocks/useGuard.ts +0 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexRawOptions.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexSeriesStyle.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/chart/apexTheme.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/useActionConfirm.ts +5 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/containers/closingLayers.ts +2 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/containers/drawerSize.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/containers/instanceProvides.ts +14 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultChoiceTypes.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDateCells.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultIdentityCells.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultMediaTypes.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultRelationTypes.ts +1 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/metricCells.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/numberSuffix.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationRows.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationValue.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/twoLineCell.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldSaved.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentRealtime.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formComponentValidation.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formState.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +2 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/form/registerFormFunctions.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/form/repeaterTable.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useFormModel.ts +0 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/instant-save/useInstantSave.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/layout/rowSidePanel.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/layout/sidePanelState.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/live/missedTally.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/live/pageLiveController.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodQuery.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionSizing.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnStructure.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/registerDefaultFunctions.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionContainers.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionValues.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewDisplays.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewRealtime.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewTabs.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/usePersistedPagination.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useReorderHandles.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableLiveHold.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTablePreferences.ts +7 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableReorder.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/bulkActions.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/card.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/expandedRows.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/reorder.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/sortableColumns.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/unsaved-changes/formValue.ts +0 -9
- package/frontend-vue/layers/dms-ui/app/build/composables/unsaved-changes/registry.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/accessibilityPreferences.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreview.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/build/utils/calendarDay.ts +18 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/dispatchQuickActionTarget.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/fetchNotFound.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/fieldOptionsI18n.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/rowClickTrigger.ts +5 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/streamHighlight.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/urlVariables.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/components/PasswordStrength.vue +14 -21
- package/frontend-vue/layers/dms-ui/app/components/RecursiveComponent.vue +0 -2
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +0 -2
- package/frontend-vue/layers/dms-ui/app/components/blocks/BannerBlock.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/components/blocks/CodeBlock.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/components/card/NavCard.vue +1 -2
- package/frontend-vue/layers/dms-ui/app/components/chart/ApexChartHost.vue +0 -4
- package/frontend-vue/layers/dms-ui/app/components/chart/Chart.vue +1 -4
- package/frontend-vue/layers/dms-ui/app/components/chart/ChartCard.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/components/chart/internal/TrendBadge.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/code-snippet/CodeSnippet.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +5 -5
- package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +0 -3
- package/frontend-vue/layers/dms-ui/app/components/form/Form.vue +1 -4
- package/frontend-vue/layers/dms-ui/app/components/form/components/Calendar.vue +51 -41
- package/frontend-vue/layers/dms-ui/app/components/form/components/Cascader.vue +3 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +31 -24
- package/frontend-vue/layers/dms-ui/app/components/form/components/Display.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/Image.vue +4 -5
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputAddress.vue +20 -11
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputNumber.vue +2 -2
- package/frontend-vue/layers/dms-ui/app/components/form/components/Relation.vue +8 -7
- package/frontend-vue/layers/dms-ui/app/components/form/components/imageItems.ts +22 -33
- package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/components/kpi/KpiCard.vue +2 -2
- package/frontend-vue/layers/dms-ui/app/components/master-detail/MasterDetail.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/components/meter/MeterBlock.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/components/period/usePeriodSelectorInteraction.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +2 -3
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanDisplay.vue +0 -1
- package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/components/top-list/TopListCard.vue +3 -3
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexDatetimeBuckets.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/composables/chart/events.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/composables/chart/localizeSeries.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.ts +2 -8
- package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.types.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/composables/chart/useChartFetch.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/composables/confirm/types.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/composables/containers/openDynamicContainer.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/composables/containers/useDrawer.ts +3 -8
- package/frontend-vue/layers/dms-ui/app/composables/form/types/props.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +1 -7
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/column.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/display.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/composables/table-view/useTableViewExport.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/composables/useExportJob.ts +0 -3
- package/frontend-vue/layers/dms-ui/app/utils/blockRefresh.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/utils/cascader.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/utils/metadataRetry.ts +0 -1
- package/frontend-vue/package.json +2 -0
- package/frontend-vue/scripts/probes/frontend-legacy.cjs +0 -2
- package/package.json +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.19.5
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.19.4...v0.19.5)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **frontend:** Publish @antelopejs/dms/eslint-globals for the layer's auto-imports ([#869](https://github.com/AntelopeJS/dms/pull/869))
|
|
10
|
+
|
|
11
|
+
### 💅 Refactors
|
|
12
|
+
|
|
13
|
+
- **frontend:** Drop oxlint directives no linter reads ([#862](https://github.com/AntelopeJS/dms/pull/862))
|
|
14
|
+
- Type unpublished dictionaries from their owners ([#863](https://github.com/AntelopeJS/dms/pull/863))
|
|
15
|
+
- Narrow with type guards instead of runtime typeof ([#864](https://github.com/AntelopeJS/dms/pull/864))
|
|
16
|
+
- Type unknown parameters and returns from their owners ([#865](https://github.com/AntelopeJS/dms/pull/865))
|
|
17
|
+
- Remove type assertions or give each a SAFETY reason ([#867](https://github.com/AntelopeJS/dms/pull/867))
|
|
18
|
+
- Remove the type assertions behind existing SAFETY comments ([#874](https://github.com/AntelopeJS/dms/pull/874))
|
|
19
|
+
- Keep lookup tables' known types instead of widening them ([#875](https://github.com/AntelopeJS/dms/pull/875))
|
|
20
|
+
- Replace ts-expect-error with type-level assertions where a type can carry the check ([#876](https://github.com/AntelopeJS/dms/pull/876))
|
|
21
|
+
|
|
22
|
+
### 📖 Documentation
|
|
23
|
+
|
|
24
|
+
- Name MySQL and MariaDB as database modules the DMS runs on ([#878](https://github.com/AntelopeJS/dms/pull/878))
|
|
25
|
+
|
|
26
|
+
### 📦 Build
|
|
27
|
+
|
|
28
|
+
- **lint:** Remove the config rule offs whose findings are fixed ([#877](https://github.com/AntelopeJS/dms/pull/877))
|
|
29
|
+
|
|
30
|
+
### 🏡 Chore
|
|
31
|
+
|
|
32
|
+
- **release:** @antelopejs/interface-dms v0.13.3 ([396200e3](https://github.com/AntelopeJS/dms/commit/396200e3))
|
|
33
|
+
|
|
34
|
+
### ❤️ Contributors
|
|
35
|
+
|
|
36
|
+
- Antony Rizzitelli ([@Upd4ting](http://github.com/Upd4ting))
|
|
37
|
+
|
|
38
|
+
## v0.19.4
|
|
39
|
+
|
|
40
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.19.3...v0.19.4)
|
|
41
|
+
|
|
42
|
+
### 🔥 Performance
|
|
43
|
+
|
|
44
|
+
- **table:** Stop re-rendering every row after the table mounts ([#860](https://github.com/AntelopeJS/dms/pull/860))
|
|
45
|
+
|
|
46
|
+
### 🩹 Fixes
|
|
47
|
+
|
|
48
|
+
- **release:** Regenerate the dms README table when interface-dms bumps ([#855](https://github.com/AntelopeJS/dms/pull/855))
|
|
49
|
+
|
|
50
|
+
### 📦 Build
|
|
51
|
+
|
|
52
|
+
- **deps:** Take tooling-configs 0.5.3 so checks orders typecheck before lint ([#856](https://github.com/AntelopeJS/dms/pull/856))
|
|
53
|
+
|
|
54
|
+
### ❤️ Contributors
|
|
55
|
+
|
|
56
|
+
- Antony Rizzitelli ([@Upd4ting](http://github.com/Upd4ting))
|
|
57
|
+
|
|
3
58
|
## v0.19.3
|
|
4
59
|
|
|
5
60
|
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.19.2...v0.19.3)
|
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ export class SalesPage extends PageController("sales", {
|
|
|
86
86
|
| `@antelopejs/interface-data-api` | `>=0.6.0 <1.0.0` | `0.6.0` |
|
|
87
87
|
| `@antelopejs/interface-database` | `>=0.3.0 <1.0.0` | `0.3.1` |
|
|
88
88
|
| `@antelopejs/interface-database-decorators` | `>=0.3.1 <1.0.0` | `0.3.1` |
|
|
89
|
-
| `@antelopejs/interface-dms` | `>=0.13.0 <0.14.0` | `
|
|
89
|
+
| `@antelopejs/interface-dms` | `>=0.13.0 <0.14.0` | `workspace` |
|
|
90
90
|
| `@antelopejs/interface-dms-automation` | `>=0.6.0 <1.0.0` | `0.6.1` |
|
|
91
91
|
| `@antelopejs/interface-email` | `>=0.0.6 <1.0.0` | `0.0.6` |
|
|
92
92
|
| `@antelopejs/interface-file-storage` | `>=0.1.4 <1.0.0` | `0.1.4` |
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tableAttachmentFields = tableAttachmentFields;
|
|
4
4
|
const data_types_1 = require("@antelopejs/interface-dms/base/data-types");
|
|
5
|
+
const metadata_uploads_1 = require("@antelopejs/interface-dms/page/internal/metadata-uploads");
|
|
6
|
+
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
5
7
|
function tableAttachmentFields(meta, scope) {
|
|
6
8
|
return Object.entries(meta.columns).flatMap(([key, column]) => {
|
|
7
9
|
const kind = (0, data_types_1.getDataTypeId)(column.type);
|
|
@@ -13,11 +15,11 @@ function tableAttachmentFields(meta, scope) {
|
|
|
13
15
|
id: `${scope}#${key}`,
|
|
14
16
|
key,
|
|
15
17
|
kind,
|
|
16
|
-
storage: options?.storage,
|
|
18
|
+
storage: (0, type_check_1.isString)(options?.storage) ? options.storage : undefined,
|
|
17
19
|
visibility: options?.visibility === "public"
|
|
18
20
|
? "public"
|
|
19
21
|
: "private",
|
|
20
|
-
constraints: options
|
|
22
|
+
constraints: (0, metadata_uploads_1.readUploadConstraints)(options ?? {}),
|
|
21
23
|
},
|
|
22
24
|
];
|
|
23
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../src/attachments/bindings.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../src/attachments/bindings.ts"],"names":[],"mappings":";;AAMA,sDAsBC;AA3BD,0EAA0E;AAE1E,+FAAiG;AACjG,oFAA+E;AAE/E,SAAgB,qBAAqB,CACnC,IAAmB,EACnB,KAAa;IAEb,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE;QAC5D,MAAM,IAAI,GAAG,IAAA,0BAAa,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACpC,OAAO;YACL;gBACE,EAAE,EAAE,GAAG,KAAK,IAAI,GAAG,EAAE;gBACrB,GAAG;gBACH,IAAI;gBACJ,OAAO,EAAE,IAAA,qBAAQ,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;gBACjE,UAAU,EACR,OAAO,EAAE,UAAU,KAAK,QAAQ;oBAC9B,CAAC,CAAE,QAAkB;oBACrB,CAAC,CAAE,SAAmB;gBAC1B,WAAW,EAAE,IAAA,wCAAqB,EAAC,OAAO,IAAI,EAAE,CAAC;aAClD;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AttachmentField } from "@antelopejs/interface-dms/attachments";
|
|
1
|
+
import type { AttachmentField, AttachmentSaveResult } from "@antelopejs/interface-dms/attachments";
|
|
2
2
|
export interface AttachmentReference {
|
|
3
3
|
key: string;
|
|
4
4
|
field: AttachmentField;
|
|
5
5
|
}
|
|
6
|
-
export declare function collectAttachments(fields: AttachmentField[], document:
|
|
6
|
+
export declare function collectAttachments(fields: AttachmentField[], document: AttachmentSaveResult<unknown>["document"]): AttachmentReference[];
|
|
7
7
|
export declare function containsAttachment(references: AttachmentReference[], reference: AttachmentReference): boolean;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.collectAttachments = collectAttachments;
|
|
4
4
|
exports.containsAttachment = containsAttachment;
|
|
5
5
|
const own_value_1 = require("../utils/own-value");
|
|
6
|
+
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
6
7
|
function isRecord(value) {
|
|
7
8
|
return typeof value === "object" && value !== null;
|
|
8
9
|
}
|
|
@@ -12,13 +13,13 @@ function collectAttachments(fields, document) {
|
|
|
12
13
|
const pending = [(0, own_value_1.ownValue)(document, field.key)];
|
|
13
14
|
while (pending.length > 0) {
|
|
14
15
|
const item = pending.pop();
|
|
15
|
-
if (field.kind === "file" &&
|
|
16
|
+
if (field.kind === "file" && (0, type_check_1.isString)(item)) {
|
|
16
17
|
if (item)
|
|
17
18
|
keys.add(item);
|
|
18
19
|
}
|
|
19
20
|
else if (isRecord(item)) {
|
|
20
21
|
if (!Array.isArray(item) && field.kind === "image" && "key" in item) {
|
|
21
|
-
if (
|
|
22
|
+
if ((0, type_check_1.isString)(item.key) && item.key)
|
|
22
23
|
keys.add(item.key);
|
|
23
24
|
}
|
|
24
25
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../src/attachments/fields.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../src/attachments/fields.ts"],"names":[],"mappings":";;AAgBA,gDAuBC;AAED,gDASC;AA9CD,kDAA8C;AAC9C,oFAA+E;AAO/E,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACrD,CAAC;AAED,SAAgB,kBAAkB,CAChC,MAAyB,EACzB,QAAmD;IAEnD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,MAAM,OAAO,GAAc,CAAC,IAAA,oBAAQ,EAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3D,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;YAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,IAAA,qBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC;gBAC5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|
|
2
|
-
export declare function SaveComponentFiles<T>(request: AttachmentSaveRequest, save: (
|
|
2
|
+
export declare function SaveComponentFiles<T>(request: AttachmentSaveRequest, save: (promoted: AttachmentSaveRequest["submitted"]) => Promise<AttachmentSaveResult<T>>): Promise<T>;
|
package/dist/attachments/save.js
CHANGED
|
@@ -55,9 +55,9 @@ function remapValue(value, map) {
|
|
|
55
55
|
for (const [index, key] of node.keys.entries()) {
|
|
56
56
|
const item = node.values[index];
|
|
57
57
|
let remapped = item;
|
|
58
|
-
if (
|
|
58
|
+
if ((0, type_check_1.isString)(item))
|
|
59
59
|
remapped = map.get(item) ?? item;
|
|
60
|
-
else if (item &&
|
|
60
|
+
else if (item && (0, type_check_1.isObject)(item)) {
|
|
61
61
|
const copy = Array.isArray(item) ? Array.from(item) : {};
|
|
62
62
|
const source = Array.isArray(copy) ? copy : item;
|
|
63
63
|
pending.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save.js","sourceRoot":"","sources":["../../src/attachments/save.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"save.js","sourceRoot":"","sources":["../../src/attachments/save.ts"],"names":[],"mappings":";;AA4MA,gDAWC;AAvND,6DAAuD;AACvD,gEAA6D;AAC7D,+EAM4C;AAM5C,qCAAkD;AAClD,oFAI6D;AAC7D,+CAAwD;AACxD,qCAIkB;AAClB,yCAA4E;AAE5E,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AAQtD,KAAK,UAAU,eAAe,CAAC,GAAwB;IACrD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAA,oCAAW,EAAC,GAAG,CAAC,GAAG,CAAC;YAC9B,CAAC,CAAC,CAAC,MAAM,IAAA,oCAAW,EAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW;YAC7D,CAAC,CAAC,GAAG,CAAC,GAAG,CA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I,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QAC1D,IAAI,CAAC,IAAA,qBAAQ,EAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAA,mBAAM,EAAC,IAAI,CAAC,KAAK,CAAC;YAAE,SAAS;QAC1D,IAAI,IAAI,CAAC,KAAK,GAAG,cAAc;YAC7B,MAAM,IAAI,0BAAU,CAClB,WAAW,EACX,iCAAiC,cAAc,eAAe,CAC/D,CAAC;QACJ,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YAC1C,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAOM,KAAK,UAAU,kBAAkB,CACtC,OAA8B,EAC9B,IAEqC;IAErC,eAAe,CAAC,OAAO,CAAC,CAAC;IACzB,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC,MAAM,CAAC;AACtB,CAAC"}
|
|
@@ -11,6 +11,7 @@ const bindings_1 = require("./bindings");
|
|
|
11
11
|
const fields_1 = require("./fields");
|
|
12
12
|
const registry_1 = require("./registry");
|
|
13
13
|
const save_1 = require("./save");
|
|
14
|
+
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
14
15
|
function isFieldHolder(row) {
|
|
15
16
|
return typeof row === "object" && row !== null;
|
|
16
17
|
}
|
|
@@ -36,7 +37,9 @@ async function loadDocument(controller, fields, id) {
|
|
|
36
37
|
async function SaveTableViewAttachments(request) {
|
|
37
38
|
const { controller, route, context, params, args, mode, componentIds } = request;
|
|
38
39
|
const fields = (0, bindings_1.tableAttachmentFields)((0, meta_1.getTableViewMetaFor)(controller), (0, meta_1.getControllerLocation)(controller));
|
|
39
|
-
const documentId = params
|
|
40
|
+
const documentId = (0, type_check_1.isObject)(params) && params !== null && "id" in params && (0, type_check_1.isString)(params.id)
|
|
41
|
+
? params.id
|
|
42
|
+
: undefined;
|
|
40
43
|
if (mode === "delete") {
|
|
41
44
|
return deleteDocuments({ ...request, fields });
|
|
42
45
|
}
|
|
@@ -57,7 +60,7 @@ async function SaveTableViewAttachments(request) {
|
|
|
57
60
|
}, async (promoted) => {
|
|
58
61
|
const result = await route.func.call(controller, context, params, promoted, ...args.slice(1));
|
|
59
62
|
const id = documentId || (isSavedRow(result) ? result._id : undefined);
|
|
60
|
-
if (
|
|
63
|
+
if (!(0, type_check_1.isString)(id) || !id)
|
|
61
64
|
(0, registry_1.denyAttachment)();
|
|
62
65
|
const document = await loadDocument(controller, fields, id);
|
|
63
66
|
if (!document)
|
|
@@ -67,8 +70,14 @@ async function SaveTableViewAttachments(request) {
|
|
|
67
70
|
}
|
|
68
71
|
async function deleteDocuments(request) {
|
|
69
72
|
const { controller, route, context, params, args, fields, componentIds } = request;
|
|
70
|
-
const ids = params
|
|
71
|
-
|
|
73
|
+
const ids = (0, type_check_1.isObject)(params) && params !== null && "id" in params
|
|
74
|
+
? params.id
|
|
75
|
+
: undefined;
|
|
76
|
+
const deleted = Array.isArray(ids) ? ids : [ids];
|
|
77
|
+
if (!deleted.every(type_check_1.isString)) {
|
|
78
|
+
throw new TypeError("A delete request's parameters name no string ids");
|
|
79
|
+
}
|
|
80
|
+
const rows = await Promise.all(deleted.map((id) => loadDocument(controller, fields, id)));
|
|
72
81
|
const before = Object.fromEntries(fields.map((field) => [
|
|
73
82
|
field.key,
|
|
74
83
|
rows.map((row) => (row ? (0, own_value_1.ownValue)(row, field.key) : undefined)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-view.js","sourceRoot":"","sources":["../../src/attachments/table-view.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"table-view.js","sourceRoot":"","sources":["../../src/attachments/table-view.ts"],"names":[],"mappings":";;AA6DA,4DAkDC;AA/GD,uEAAuE;AACvE,6FAImD;AACnD,8BAAyC;AACzC,kDAA8C;AAG9C,sFAA2F;AAC3F,kFAGiE;AACjE,yCAAmD;AACnD,qCAA8C;AAC9C,yCAA4C;AAC5C,iCAA4C;AAC5C,oFAG6D;AAG7D,SAAS,aAAa,CAAC,GAAY;IACjC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,CAAC;AACjD,CAAC;AAGD,SAAS,UAAU,CAAC,MAAe;IACjC,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,KAAK,IAAI,MAAM,CAAC;AAC1E,CAAC;AAED,KAAK,UAAU,YAAY,CACzB,UAAwD,EACxD,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,qBAAgB,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,IAAI,CAA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I,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;QAC5D,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IAC7C,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -10,6 +10,7 @@ const invites_1 = require("@antelopejs/interface-dms/invites");
|
|
|
10
10
|
const db_2 = require("@antelopejs/interface-dms/auth/db");
|
|
11
11
|
const i18n_1 = require("./i18n");
|
|
12
12
|
const send_notification_1 = require("./send-notification");
|
|
13
|
+
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
13
14
|
exports.SEND_EMAIL_ACTION_ID = "dms.send-email";
|
|
14
15
|
const SEND_EMAIL_TEXTS = "actions.sendEmail";
|
|
15
16
|
async function recipientLanguage(email) {
|
|
@@ -19,7 +20,7 @@ async function recipientLanguage(email) {
|
|
|
19
20
|
async function bodyTemplate(input) {
|
|
20
21
|
const template = input.template?.trim();
|
|
21
22
|
if (!template) {
|
|
22
|
-
if (
|
|
23
|
+
if ((0, type_check_1.isString)(input.html))
|
|
23
24
|
return undefined;
|
|
24
25
|
throw new Error(`${exports.SEND_EMAIL_ACTION_ID} requires html or a template`);
|
|
25
26
|
}
|
|
@@ -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,uEAG+C;AAC/C,+DAG2C;AAC3C,0DAA8D;AAE9D,iCAA+D;AAC/D,2DAA6D;
|
|
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,2DAA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AM,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"}
|
|
@@ -44,7 +44,11 @@ interface AutomationEventPayloads {
|
|
|
44
44
|
"dms.record-deleted": RecordMutationEvent;
|
|
45
45
|
}
|
|
46
46
|
export type AutomationEventName = keyof AutomationEventPayloads;
|
|
47
|
+
export type RecordEventName = "dms.record-created" | "dms.record-updated" | "dms.record-deleted";
|
|
47
48
|
export type AutomationEventListener = Parameters<TriggerType["activate"]>[1];
|
|
48
|
-
|
|
49
|
+
type AutomationEventListeners = {
|
|
50
|
+
[E in AutomationEventName]: Set<(payload: AutomationEventPayloads[E]) => void>;
|
|
51
|
+
};
|
|
52
|
+
export declare function listenersFor<E extends AutomationEventName>(event: E): AutomationEventListeners[E];
|
|
49
53
|
export declare function emitAutomationEvent<E extends AutomationEventName>(event: E, payload: AutomationEventPayloads[E]): void;
|
|
50
54
|
export {};
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.listenersFor = listenersFor;
|
|
4
4
|
exports.emitAutomationEvent = emitAutomationEvent;
|
|
5
|
-
const eventListeners =
|
|
5
|
+
const eventListeners = {
|
|
6
|
+
"dms.member-added": new Set(),
|
|
7
|
+
"dms.member-removed": new Set(),
|
|
8
|
+
"dms.invite-created": new Set(),
|
|
9
|
+
"dms.user-registered": new Set(),
|
|
10
|
+
"dms.record-created": new Set(),
|
|
11
|
+
"dms.record-updated": new Set(),
|
|
12
|
+
"dms.record-deleted": new Set(),
|
|
13
|
+
};
|
|
6
14
|
function listenersFor(event) {
|
|
7
|
-
|
|
8
|
-
if (existing)
|
|
9
|
-
return existing;
|
|
10
|
-
const created = new Set();
|
|
11
|
-
eventListeners.set(event, created);
|
|
12
|
-
return created;
|
|
15
|
+
return eventListeners[event];
|
|
13
16
|
}
|
|
14
17
|
function emitAutomationEvent(event, payload) {
|
|
15
18
|
for (const listener of listenersFor(event)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/automation/events.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/automation/events.ts"],"names":[],"mappings":";;AAiFA,oCAIC;AAOD,kDAWC;AAhCD,MAAM,cAAc,GAA6B;IAC/C,kBAAkB,EAAE,IAAI,GAAG,EAAE;IAC7B,oBAAoB,EAAE,IAAI,GAAG,EAAE;IAC/B,oBAAoB,EAAE,IAAI,GAAG,EAAE;IAC/B,qBAAqB,EAAE,IAAI,GAAG,EAAE;IAChC,oBAAoB,EAAE,IAAI,GAAG,EAAE;IAC/B,oBAAoB,EAAE,IAAI,GAAG,EAAE;IAC/B,oBAAoB,EAAE,IAAI,GAAG,EAAE;CAChC,CAAC;AAEF,SAAgB,YAAY,CAC1B,KAAQ;IAER,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAOD,SAAgB,mBAAmB,CACjC,KAAQ,EACR,OAAmC;IAEnC,KAAK,MAAM,QAAQ,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QAE3C,IAAI,CAAC;YACH,QAAQ,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC;QAAC,MAAM,CAAC;QACT,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActionType } from "@antelopejs/interface-dms-automation";
|
|
1
|
+
import type { ActionType, JsonValue } from "@antelopejs/interface-dms-automation";
|
|
2
2
|
export declare const SEND_NOTIFICATION_ACTION_ID = "dms.send-notification";
|
|
3
3
|
export declare const NOTIFICATION_TONES: readonly ["neutral", "primary", "success", "warning", "error"];
|
|
4
4
|
interface SendNotificationInput {
|
|
@@ -8,7 +8,7 @@ interface SendNotificationInput {
|
|
|
8
8
|
tenantId?: string;
|
|
9
9
|
title: string;
|
|
10
10
|
description?: string;
|
|
11
|
-
params?:
|
|
11
|
+
params?: JsonValue;
|
|
12
12
|
tone?: string;
|
|
13
13
|
icon?: string;
|
|
14
14
|
linkTo?: string;
|
|
@@ -5,6 +5,7 @@ const constants_1 = require("@antelopejs/interface-dms/constants");
|
|
|
5
5
|
const notifications_1 = require("@antelopejs/interface-dms/notifications");
|
|
6
6
|
const sendable_1 = require("@antelopejs/interface-dms/notifications/sendable");
|
|
7
7
|
const i18n_1 = require("./i18n");
|
|
8
|
+
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
8
9
|
exports.SEND_NOTIFICATION_ACTION_ID = "dms.send-notification";
|
|
9
10
|
const SEND_NOTIFICATION_TEXTS = "actions.sendNotification";
|
|
10
11
|
const DEFAULT_NOTIFICATION_ICON = "i-ph-bell";
|
|
@@ -23,17 +24,17 @@ function toNotificationParams(input, ctx) {
|
|
|
23
24
|
const { params } = input;
|
|
24
25
|
if (params === undefined || params === null)
|
|
25
26
|
return undefined;
|
|
26
|
-
if (
|
|
27
|
+
if (!(0, type_check_1.isObject)(params) || Array.isArray(params)) {
|
|
27
28
|
throw new Error(`${exports.SEND_NOTIFICATION_ACTION_ID}: params must be an object of strings and numbers`);
|
|
28
29
|
}
|
|
29
30
|
const result = {};
|
|
30
31
|
for (const [key, value] of Object.entries(params)) {
|
|
31
32
|
if (value === undefined || value === null)
|
|
32
33
|
continue;
|
|
33
|
-
if (
|
|
34
|
+
if ((0, type_check_1.isString)(value) || (0, type_check_1.isNumber)(value)) {
|
|
34
35
|
result[key] = value;
|
|
35
36
|
}
|
|
36
|
-
else if (
|
|
37
|
+
else if ((0, type_check_1.isBoolean)(value)) {
|
|
37
38
|
result[key] = String(value);
|
|
38
39
|
}
|
|
39
40
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-notification.js","sourceRoot":"","sources":["../../src/automation/send-notification.ts"],"names":[],"mappings":";;;AAAA,mEAAwE;AACxE,2EAKiD;AACjD,+EAAwF;
|
|
1
|
+
{"version":3,"file":"send-notification.js","sourceRoot":"","sources":["../../src/automation/send-notification.ts"],"names":[],"mappings":";;;AAAA,mEAAwE;AACxE,2EAKiD;AACjD,+EAAwF;AAMxF,iCAA+D;AAC/D,oFAK6D;AAEhD,QAAA,2BAA2B,GAAG,uBAAuB,CAAC;AACnE,MAAM,uBAAuB,GAAG,0BAA0B,CAAC;AAE3D,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAGjC,QAAA,kBAAkB,GAAG;IAChC,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,OAAO;CACuC,CAAC;AA2BjD,SAAS,kBAAkB,CAAC,KAAa;IACvC,MAAM,KAAK,GAAsB,0BAAkB,CAAC;IACpD,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAOD,SAAS,oBAAoB,CAC3B,KAA4B,EAC5B,GAAiB;IAEjB,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC9D,IAAI,CAAC,IAAA,qBAAQ,EAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CACb,GAAG,mCAA2B,mDAAmD,CAClF,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAuB,EAAE,CA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OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,WAAW,CACnE,KAAK,EACL,GAAG,CACJ,CAAC;QACF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YACpB,MAAM,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC5D,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IACtB,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources.js","sourceRoot":"","sources":["../../src/automation/sources.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sources.js","sourceRoot":"","sources":["../../src/automation/sources.ts"],"names":[],"mappings":";;AAwFA,sEAMC;AAED,4EAMC;AAtGD,2DAKyC;AACzC,0EAKmD;AACnD,qCAKkB;AAElB,MAAM,GAAG,GAAG,GAAW,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAEnD,MAAM,aAAa,GAAmC,CAAC,OAAO,EAAE,EAAE;IAChE,MAAM,KAAK,GAAqB;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,EAAE,EAAE,GAAG,EAAE;KACV,CAAC;IACF,IAAI,OAAO,CAAC,UAAU;QAAE,KAAK,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAC9D,IAAA,4BAAmB,EAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAC/C,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,eAAe,GAAqC,CAAC,OAAO,EAAE,EAAE;IACpE,IAAA,4B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SAAS,CAAC,EAAE;QACtD,QAAQ,EAAE,OAAO,CAAC,kBAAkB;QACpC,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE;QAC1B,SAAS,EAAE,OAAO,CAAC,KAAK,EAAE,WAAW;QACrC,EAAE,EAAE,GAAG,EAAE;KACV,CAAC,CAAC;AACL,CAAC,CAAC;AAOF,SAAgB,6BAA6B;IAC3C,IAAA,oBAAY,EAAC,YAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IAC/C,IAAA,oBAAY,EAAC,YAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IACnD,IAAA,oBAAY,EAAC,YAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IACnD,IAAA,oBAAY,EAAC,YAAI,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IACrD,IAAA,6CAAgC,EAAC,gBAAgB,CAAC,CAAC;AACrD,CAAC;AAED,SAAgB,gCAAgC;IAC9C,IAAA,sBAAc,EAAC,YAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IACjD,IAAA,sBAAc,EAAC,YAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IACrD,IAAA,sBAAc,EAAC,YAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IACrD,IAAA,sBAAc,EAAC,YAAI,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IACvD,IAAA,+CAAkC,EAAC,gBAAgB,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -3,15 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TRIGGERS = void 0;
|
|
4
4
|
const events_1 = require("./events");
|
|
5
5
|
const i18n_1 = require("./i18n");
|
|
6
|
+
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
6
7
|
const EMPTY_CONFIG_SCHEMA = { type: "object", properties: {} };
|
|
7
8
|
const TENANT_ID_PROPERTY = { type: "string" };
|
|
8
9
|
const AT_PROPERTY = { type: "string" };
|
|
9
10
|
const removeListener = (event) => async function deactivate(handle) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (listener === handle)
|
|
13
|
-
listeners.delete(listener);
|
|
14
|
-
}
|
|
11
|
+
if ((0, type_check_1.isFunction)(handle))
|
|
12
|
+
(0, events_1.listenersFor)(event).delete(handle);
|
|
15
13
|
};
|
|
16
14
|
function createEventTrigger(spec) {
|
|
17
15
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers.js","sourceRoot":"","sources":["../../src/automation/triggers.ts"],"names":[],"mappings":";;;AAIA,
|
|
1
|
+
{"version":3,"file":"triggers.js","sourceRoot":"","sources":["../../src/automation/triggers.ts"],"names":[],"mappings":";;;AAIA,qCAMkB;AAClB,iCAA+D;AAC/D,oFAAiF;AAEjF,MAAM,mBAAmB,GAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;AAE3E,MAAM,kBAAkB,GAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC1D,MAAM,WAAW,GAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAGnD,MAAM,cAAc,GAAG,CACrB,KAA0B,EACC,EAAE,CAC7B,KAAK,UAAU,UAAU,CAAC,MAAM;IAC9B,IAAI,IAAA,uBAAU,EAAC,MAAM,CAAC;QAAE,IAAA,qBAAY,EAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC7D,CAAC,CAAC;AAcJ,SAAS,kBAAkB,CAAC,IAAyB;IACnD,OAAO;QACL,EAAE,EAAE,IAAI,CAAC,KAAK;QACd,IAAI,EAAE,IAAA,eAAQ,EAAC,YAAY,IAAI,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC;QAChD,WAAW,EAAE,IAAA,eAAQ,EAAC,YAAY,IAAI,CAAC,KAAK,EAAE,EAAE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{ type DataControllerInstance } from "@antelopejs/interface-data-api";
|
|
2
|
-
|
|
2
|
+
import type { RowFields } from "@antelopejs/interface-data-api/metadata";
|
|
3
|
+
export declare function fetchRowForGuard(controller: DataControllerInstance, id: string, idField: string): Promise<RowFields | undefined>;
|
package/dist/db/guard-row.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard-row.js","sourceRoot":"","sources":["../../src/db/guard-row.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"guard-row.js","sourceRoot":"","sources":["../../src/db/guard-row.ts"],"names":[],"mappings":";;AAOA,4CASC;AAhBD,uEAGwC;AACxC,0EAAkE;AAG3D,KAAK,UAAU,gBAAgB,CACpC,UAAkC,EAClC,EAAU,EACV,OAAe;IAEf,MAAM,kBAAkB,GAAG,IAAA,0CAAqB,EAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,KAAK,GAAG,kBAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IACrD,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.UserNotificationPreferencesModel = void 0;
|
|
|
4
4
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
5
5
|
const index_1 = require("../../utils/notification-registry/index");
|
|
6
6
|
const tables_1 = require("../tables");
|
|
7
|
+
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
7
8
|
const buildDefaultPreferences = () => {
|
|
8
9
|
const subjects = (0, index_1.getRegisteredSubjects)();
|
|
9
10
|
const preferences = {};
|
|
@@ -75,7 +76,7 @@ class UserNotificationPreferencesModel extends (0, interface_database_decorators
|
|
|
75
76
|
async getOrCreatePreferences(userId) {
|
|
76
77
|
const existing = await this.getByUserId(userId);
|
|
77
78
|
const hasValidPreferences = existing &&
|
|
78
|
-
|
|
79
|
+
(0, type_check_1.isObject)(existing.preferences) &&
|
|
79
80
|
existing.preferences !== null;
|
|
80
81
|
if (hasValidPreferences) {
|
|
81
82
|
return existing;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userNotificationPreferences.model.js","sourceRoot":"","sources":["../../../src/db/models/userNotificationPreferences.model.ts"],"names":[],"mappings":";;;AAAA,6FAA2E;AAC3E,mEAAgF;AAChF,sCAGmB;
|
|
1
|
+
{"version":3,"file":"userNotificationPreferences.model.js","sourceRoot":"","sources":["../../../src/db/models/userNotificationPreferences.model.ts"],"names":[],"mappings":";;;AAAA,6FAA2E;AAC3E,mEAAgF;AAChF,sCAGmB;AACnB,oFAA+E;AAE/E,MAAM,uBAAuB,GAC3B,GAA+C,EAAE;IAC/C,MAAM,QAAQ,GAAG,IAAA,6BAAqB,GAAE,CAAC;IACzC,MAAM,WAAW,GAA4B,EAAE,CAAC;IAEhD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;QACnD,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEJ,MAAa,gCAAiC,SAAQ,IAAA,8CAAc,EAClE,oCAA2B,EAC3B,6CAAoC,CACrC;IACC,KAAK,CAAC,WAAW,CACf,MAAc;QAEd,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK;aAC5B,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;aACxB,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,SAAS,CAAC;aAClB,GAAG,EAAE,CAAC;QAET,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC;QACnB,CA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IAAI,CAAC,KAAK;aACb,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;aACxB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAChB,WAAW,EAAE,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;YAClD,SAAS,EAAE,IAAI,IAAI,EAAE;SACtB,CAAC,CAAC;aACF,GAAG,EAAE,CAAC;QAET,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC9C,OAAO,MAAM,EAAE,WAAW,IAAI,OAAO,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,sBAAsB,CAC1B,MAAc;QAEd,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAEhD,MAAM,mBAAmB,GACvB,QAAQ;YACR,IAAA,qBAAQ,EAAC,QAAQ,CAAC,WAAW,CAAC;YAC9B,QAAQ,CAAC,WAAW,KAAK,IAAI,CAAC;QAEhC,IAAI,mBAAmB,EAAE,CAAC;YACxB,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,kBAAkB,GAAG,uBAAuB,EAAE,CAAC;YACrD,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;YAGzD,OAAO,EAAE,GAAG,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;QAC1D,CAAC;QAED,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;CACF;AArHD,4EAqHC"}
|
|
@@ -9,6 +9,7 @@ const tables_1 = require("../tables");
|
|
|
9
9
|
const nav_badges_1 = require("@antelopejs/interface-dms/page/internal/nav-badges");
|
|
10
10
|
const notification_tones_1 = require("../../utils/notification-tones");
|
|
11
11
|
const notification_feed_filter_1 = require("./notification-feed-filter");
|
|
12
|
+
const type_check_1 = require("@antelopejs/interface-dms/utils/internal/type-check");
|
|
12
13
|
const SHARED_GROUP_UPDATE_BATCH_SIZE = 10;
|
|
13
14
|
function buildNewUserNotification(userId, data, groupId) {
|
|
14
15
|
return {
|
|
@@ -103,7 +104,7 @@ class UserNotificationsModel extends (0, interface_database_decorators_1.BasicDa
|
|
|
103
104
|
.map((subjectId) => ({ categoryId, subjectId }));
|
|
104
105
|
}));
|
|
105
106
|
const messageKeys = [...new Set([...titles, ...descriptions])]
|
|
106
|
-
.filter((value) =>
|
|
107
|
+
.filter((value) => (0, type_check_1.isString)(value) && value.startsWith("$"))
|
|
107
108
|
.map((value) => value.slice(1))
|
|
108
109
|
.sort();
|
|
109
110
|
return { messageKeys, subjects: subjects.flat() };
|