@antelopejs/dms 0.8.3 → 0.9.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 +20 -0
- package/dist/implementations/dms/frontend-backend-proxies.d.ts +3 -0
- package/dist/implementations/dms/frontend-backend-proxies.js +39 -0
- package/dist/implementations/dms/frontend-backend-proxies.js.map +1 -0
- package/dist/implementations/dms/frontend-bootstrap.d.ts +1 -0
- package/dist/implementations/dms/frontend-bootstrap.js +13 -0
- package/dist/implementations/dms/frontend-bootstrap.js.map +1 -1
- package/dist/implementations/dms/frontend-modules.d.ts +4 -2
- package/dist/implementations/dms/frontend-modules.js +8 -7
- package/dist/implementations/dms/frontend-modules.js.map +1 -1
- package/dist/implementations/dms/manifest.d.ts +6 -0
- package/dist/implementations/dms/manifest.js +13 -0
- package/dist/implementations/dms/manifest.js.map +1 -1
- package/dist/implementations/dms/menu-categories.d.ts +16 -0
- package/dist/implementations/dms/menu-categories.js +30 -0
- package/dist/implementations/dms/menu-categories.js.map +1 -0
- package/dist/implementations/dms/nav-badges.d.ts +0 -8
- package/dist/implementations/dms/nav-badges.js +0 -16
- package/dist/implementations/dms/nav-badges.js.map +1 -1
- package/dist/implementations/dms/page.d.ts +11 -5
- package/dist/implementations/dms/page.js +56 -41
- package/dist/implementations/dms/page.js.map +1 -1
- package/dist/implementations/dms-html-render/index.js +5 -2
- package/dist/implementations/dms-html-render/index.js.map +1 -1
- package/dist/implementations/dms-notifications/index.d.ts +4 -3
- package/dist/implementations/dms-notifications/index.js +14 -6
- package/dist/implementations/dms-notifications/index.js.map +1 -1
- package/dist/pages/settings/settings-index.js +3 -2
- package/dist/pages/settings/settings-index.js.map +1 -1
- package/dist/pages/settings/users/invites.js +2 -2
- package/dist/pages/settings/users/invites.js.map +1 -1
- package/dist/pages/settings/users/member-change-notifications.js +17 -6
- package/dist/pages/settings/users/member-change-notifications.js.map +1 -1
- package/dist/pages/settings/users/member-invite-form.d.ts +3 -2
- package/dist/pages/settings/users/member-invite-form.js +7 -4
- package/dist/pages/settings/users/member-invite-form.js.map +1 -1
- package/dist/pages/settings/users/member-roles-field.js +2 -1
- package/dist/pages/settings/users/member-roles-field.js.map +1 -1
- package/dist/pages/settings/users/members.js +4 -1
- package/dist/pages/settings/users/members.js.map +1 -1
- package/dist/pages/settings/users/notifications.d.ts +6 -0
- package/dist/pages/settings/users/notifications.js +23 -15
- package/dist/pages/settings/users/notifications.js.map +1 -1
- package/dist/pages/settings/users/profile.js +1 -1
- package/dist/pages/settings/users/profile.js.map +1 -1
- package/dist/pages/settings/users/region-form.d.ts +1 -1
- package/dist/pages/settings/users/region-form.js +2 -1
- package/dist/pages/settings/users/region-form.js.map +1 -1
- package/dist/pages/settings/users/role-editor-store.d.ts +3 -1
- package/dist/pages/settings/users/role-editor-store.js +17 -4
- package/dist/pages/settings/users/role-editor-store.js.map +1 -1
- package/dist/pages/settings/users/roles.js +1 -0
- package/dist/pages/settings/users/roles.js.map +1 -1
- package/dist/realtime/registry.d.ts +1 -0
- package/dist/realtime/registry.js +5 -0
- package/dist/realtime/registry.js.map +1 -1
- package/dist/routes/realtime.d.ts +5 -1
- package/dist/routes/realtime.js +16 -9
- package/dist/routes/realtime.js.map +1 -1
- package/dist/test/integration/account-deletion.test.js +2 -2
- package/dist/test/integration/account-deletion.test.js.map +1 -1
- package/dist/test/integration/auth/auth-key-rotation.test.js +2 -1
- package/dist/test/integration/auth/auth-key-rotation.test.js.map +1 -1
- package/dist/test/integration/auth/current-password.test.js +2 -1
- package/dist/test/integration/auth/current-password.test.js.map +1 -1
- package/dist/test/integration/auth/session-revocation.test.js +2 -1
- package/dist/test/integration/auth/session-revocation.test.js.map +1 -1
- package/dist/test/integration/auth/sign-in-country.test.js +2 -1
- package/dist/test/integration/auth/sign-in-country.test.js.map +1 -1
- package/dist/test/integration/auth/two-factor-codes.test.js +2 -1
- package/dist/test/integration/auth/two-factor-codes.test.js.map +1 -1
- package/dist/test/integration/auth/two-factor-password.test.js +3 -2
- package/dist/test/integration/auth/two-factor-password.test.js.map +1 -1
- package/dist/test/integration/email-change.test.js +2 -1
- package/dist/test/integration/email-change.test.js.map +1 -1
- package/dist/test/integration/files/component-files.test.js +2 -2
- package/dist/test/integration/files/component-files.test.js.map +1 -1
- package/dist/test/integration/member-settings-access.test.js +8 -7
- package/dist/test/integration/member-settings-access.test.js.map +1 -1
- package/dist/test/integration/menu-access-events.test.d.ts +1 -0
- package/dist/test/integration/menu-access-events.test.js +148 -0
- package/dist/test/integration/menu-access-events.test.js.map +1 -0
- package/dist/test/integration/notification-inbox.test.js +4 -1
- package/dist/test/integration/notification-inbox.test.js.map +1 -1
- package/dist/test/integration/notification-locked-subjects.test.js +3 -2
- package/dist/test/integration/notification-locked-subjects.test.js.map +1 -1
- package/dist/test/integration/notification-unread-badge.test.js +51 -5
- package/dist/test/integration/notification-unread-badge.test.js.map +1 -1
- package/dist/test/integration/page-layout-route-guard.test.d.ts +1 -0
- package/dist/test/integration/page-layout-route-guard.test.js +56 -0
- package/dist/test/integration/page-layout-route-guard.test.js.map +1 -0
- package/dist/test/integration/permission-warnings.test.js +3 -2
- package/dist/test/integration/permission-warnings.test.js.map +1 -1
- package/dist/test/integration/removed-member-notifications.test.js +3 -2
- package/dist/test/integration/removed-member-notifications.test.js.map +1 -1
- package/dist/test/integration/role-delete-reassign.test.js +2 -1
- package/dist/test/integration/role-delete-reassign.test.js.map +1 -1
- package/dist/test/integration/role-permission-ancestors.test.js +2 -1
- package/dist/test/integration/role-permission-ancestors.test.js.map +1 -1
- package/dist/test/unit/frontend-bootstrap.test.js +13 -0
- package/dist/test/unit/frontend-bootstrap.test.js.map +1 -1
- package/dist/test/unit/implementations/dms/category-slug-registry.test.js +14 -5
- package/dist/test/unit/implementations/dms/category-slug-registry.test.js.map +1 -1
- package/dist/test/unit/implementations/dms/frontend-backend-proxies.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/frontend-backend-proxies.test.js +66 -0
- package/dist/test/unit/implementations/dms/frontend-backend-proxies.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/manifest-strip.test.js +26 -0
- package/dist/test/unit/implementations/dms/manifest-strip.test.js.map +1 -1
- package/dist/test/unit/implementations/dms/nav-badges.test.js +23 -9
- package/dist/test/unit/implementations/dms/nav-badges.test.js.map +1 -1
- package/dist/test/unit/implementations/dms-html-render/generate-html.test.js +22 -4
- package/dist/test/unit/implementations/dms-html-render/generate-html.test.js.map +1 -1
- package/dist/test/unit/interfaces/dms/page-layout-query.test.js +12 -0
- package/dist/test/unit/interfaces/dms/page-layout-query.test.js.map +1 -1
- package/dist/test/unit/interfaces/dms/page-teardown.test.js +1 -1
- package/dist/test/unit/interfaces/dms/page-teardown.test.js.map +1 -1
- package/dist/test/unit/pages/settings/member-roles-field.test.js +1 -1
- package/dist/test/unit/pages/settings/member-roles-field.test.js.map +1 -1
- package/dist/test/unit/pages/settings/role-delete-confirm.test.js.map +1 -1
- package/dist/test/unit/realtime/menu-topics.test.d.ts +1 -0
- package/dist/test/unit/realtime/menu-topics.test.js +26 -0
- package/dist/test/unit/realtime/menu-topics.test.js.map +1 -0
- package/frontend-vue/deferred-plugins.ts +3 -4
- package/frontend-vue/dms.email.ts +5 -1
- package/frontend-vue/dms.frontend.ts +15 -5
- package/frontend-vue/dms.server.ts +74 -0
- package/frontend-vue/layers/dms-auth/app/composables/useLogout.ts +1 -1
- package/frontend-vue/layers/dms-auth/app/composables/usePostLoginRedirect.ts +16 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +3 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +3 -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/oauth-complete.vue +26 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +1 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +22 -25
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +1 -1
- package/frontend-vue/layers/dms-auth/app/middleware/auth.ts +5 -7
- package/frontend-vue/layers/dms-auth/app/plugins/permissions-preload.ts +17 -0
- package/frontend-vue/layers/dms-auth/server/accounts.ts +135 -0
- package/frontend-vue/layers/dms-auth/server/actions.ts +251 -0
- package/frontend-vue/layers/dms-auth/server/oauth.ts +260 -0
- package/frontend-vue/layers/dms-auth/server/session.ts +158 -0
- package/frontend-vue/layers/dms-core/app/build/utils/asyncDataScope.ts +47 -0
- package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +6 -2
- package/frontend-vue/layers/dms-core/app/composables/auth/useApiData.ts +148 -0
- package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +7 -20
- package/frontend-vue/layers/dms-core/app/composables/auth/useCurrentUser.ts +2 -2
- package/frontend-vue/layers/dms-core/app/composables/auth/useMultiAccount.ts +18 -5
- package/frontend-vue/layers/dms-core/app/composables/auth/usePermissions.ts +35 -6
- package/frontend-vue/layers/dms-core/app/composables/auth/useSessionRecovery.ts +1 -1
- package/frontend-vue/layers/dms-core/app/composables/period/compareResolvers.ts +20 -14
- package/frontend-vue/layers/dms-core/app/composables/period/periodClock.ts +121 -0
- package/frontend-vue/layers/dms-core/app/composables/period/periodRenderNow.ts +42 -0
- package/frontend-vue/layers/dms-core/app/composables/period/periodTimeZone.ts +31 -0
- package/frontend-vue/layers/dms-core/app/composables/period/presetResolvers.ts +48 -19
- package/frontend-vue/layers/dms-core/app/composables/period/usePeriod.ts +33 -4
- package/frontend-vue/layers/dms-core/app/composables/period/usePeriodScope.ts +78 -25
- package/frontend-vue/layers/dms-core/app/composables/realtime/usePageRealtime.ts +3 -0
- package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +36 -6
- package/frontend-vue/layers/dms-core/app/composables/user/useUserRegionalPreferences.ts +1 -1
- package/frontend-vue/layers/dms-core/app/plugins/async-data-scope.ts +26 -0
- package/frontend-vue/layers/dms-core/app/utils/pageRoutes.ts +22 -0
- package/frontend-vue/layers/dms-core/app/utils/regional.ts +36 -3
- package/frontend-vue/layers/dms-core/app/utils/trailingDeduper.ts +10 -1
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +48 -4
- package/frontend-vue/layers/dms-layout/app/app.config.ts +42 -23
- package/frontend-vue/layers/dms-layout/app/assets/css/main.css +72 -20
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardFrame.vue +9 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +0 -3
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +9 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/members/MemberRolePicker.vue +13 -12
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxDisplay.vue +17 -7
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +0 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/profile/ProfilePersonalInfo.vue +36 -33
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/profile/ProfileSecuritySummary.vue +1 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-types.ts +5 -4
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecuritySessions.vue +35 -28
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityStatus.vue +0 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityTwoFactor.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/dev-reload/useDevReloadHolder.ts +7 -6
- package/frontend-vue/layers/dms-layout/app/build/composables/layout/sidePanelState.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/navigation/useVisitNavBadges.ts +26 -0
- package/frontend-vue/layers/dms-layout/app/build/composables/notification/useNotificationCatalog.ts +25 -23
- package/frontend-vue/layers/dms-layout/app/build/composables/notification/useNotificationPreferences.ts +44 -23
- package/frontend-vue/layers/dms-layout/app/build/composables/security/useSessionHandoff.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/preferencesSummary.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useAccountData.ts +3 -2
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfileAvatar.ts +1 -18
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfilePreferences.ts +19 -23
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityFormat.ts +6 -3
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityOverview.ts +13 -18
- package/frontend-vue/layers/dms-layout/app/build/utils/modules-catalog.ts +8 -6
- package/frontend-vue/layers/dms-layout/app/build/utils/publicErrorMessage.ts +19 -0
- package/frontend-vue/layers/dms-layout/app/components/navigation/CollapsedMenuItem.vue +0 -11
- package/frontend-vue/layers/dms-layout/app/components/navigation/NavigationMenu.vue +3 -13
- package/frontend-vue/layers/dms-layout/app/composables/general/useSystemState.ts +7 -11
- package/frontend-vue/layers/dms-layout/app/composables/notification/useNotifications.ts +103 -22
- package/frontend-vue/layers/dms-layout/app/composables/page/useModulesListing.ts +25 -102
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageComponentPreload.ts +0 -10
- package/frontend-vue/layers/dms-layout/app/composables/page/useSiteLayout.ts +177 -96
- package/frontend-vue/layers/dms-layout/app/composables/profile/useUserLanguage.ts +3 -2
- package/frontend-vue/layers/dms-layout/app/custom-pages/modules.vue +6 -28
- package/frontend-vue/layers/dms-layout/app/emails/components/EmailLayout.vue +31 -11
- package/frontend-vue/layers/dms-layout/app/error.vue +5 -2
- package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/middleware/page-leave-guard.global.ts +2 -2
- package/frontend-vue/layers/dms-layout/app/pages/[...slug].vue +12 -9
- package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +31 -3
- package/frontend-vue/layers/dms-layout/app/plugins/favicon.ts +58 -0
- package/frontend-vue/layers/dms-layout/app/plugins/notification-stream.client.ts +15 -7
- package/frontend-vue/layers/dms-layout/app/plugins/profile-sync.client.ts +5 -1
- package/frontend-vue/layers/dms-layout/app/plugins/regional-preferences.ts +10 -4
- package/frontend-vue/layers/dms-layout/app/plugins/time-zone-cookie.client.ts +12 -0
- package/frontend-vue/layers/dms-layout/app/types/page.ts +13 -0
- package/frontend-vue/layers/dms-layout/server/html-render.ts +58 -0
- package/frontend-vue/layers/dms-layout/server/render-token.ts +95 -0
- package/frontend-vue/layers/dms-onboarding/app/composables/onboarding/useOnboarding.ts +25 -21
- package/frontend-vue/layers/dms-onboarding/app/middleware/onboarding.global.ts +1 -1
- package/frontend-vue/layers/dms-onboarding/app/plugins/onboarding-preload.ts +9 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerDefaults.ts +4 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/files/useFileMetadata.ts +162 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formRecordLoad.ts +23 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/live/usePageDataRefresh.ts +101 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/navigation/useNavBadges.ts +33 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodDisplay.ts +19 -16
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodQuery.ts +40 -20
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +6 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableListData.ts +42 -14
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +19 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViews.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/components/chart/ChartCard.vue +5 -2
- package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +9 -9
- package/frontend-vue/layers/dms-ui/app/components/form/Form.vue +20 -18
- package/frontend-vue/layers/dms-ui/app/components/form/components/Cascader.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/File.vue +26 -132
- package/frontend-vue/layers/dms-ui/app/components/form/components/Image.vue +40 -105
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputAddress.vue +2 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Relation.vue +4 -4
- package/frontend-vue/layers/dms-ui/app/components/period/PeriodSelector.vue +9 -13
- package/frontend-vue/layers/dms-ui/app/components/table-view/CascaderPath.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/table-view/FilePreview.vue +12 -24
- package/frontend-vue/layers/dms-ui/app/components/table-view/ImagePreview.vue +17 -29
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +7 -3
- package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +20 -8
- package/frontend-vue/layers/dms-ui/app/components/top-list/TopListCard.vue +8 -11
- package/frontend-vue/layers/dms-ui/app/composables/chart/useChartFetch.ts +146 -182
- package/frontend-vue/layers/dms-ui/app/composables/live/usePageLiveRefresh.ts +8 -2
- package/frontend-vue/layers/dms-ui/app/composables/useFileReadUrls.ts +11 -99
- package/frontend-vue/layers/dms-ui/app/utils/blockRefresh.ts +32 -3
- package/frontend-vue/package.json +2 -2
- package/frontend-vue/pnpm-lock.yaml +5 -5
- package/frontend-vue/server/private-options.ts +27 -0
- package/frontend-vue/tests/async-data-scope.test.ts +121 -0
- package/frontend-vue/tests/auth-middleware-error.test.ts +3 -3
- package/frontend-vue/tests/banner-block-fetch.test.ts +3 -0
- package/frontend-vue/tests/block-fetch-options-forwarding.test.ts +3 -0
- package/frontend-vue/tests/block-items-period-realtime.test.ts +3 -0
- package/frontend-vue/tests/block-not-found.test.ts +16 -2
- package/frontend-vue/tests/block-page-refresh.test.ts +3 -0
- package/frontend-vue/tests/block-route-params.test.ts +3 -0
- package/frontend-vue/tests/branding-defaults.test.ts +34 -0
- package/frontend-vue/tests/builtin-emails.test.ts +23 -2
- package/frontend-vue/tests/chart-live-pause.test.ts +4 -1
- package/frontend-vue/tests/chart-value-propagation.test.ts +4 -1
- package/frontend-vue/tests/composed-text-blocks.test.ts +3 -0
- package/frontend-vue/tests/email-layout.test.ts +66 -4
- package/frontend-vue/tests/error-page-message.test.ts +25 -2
- package/frontend-vue/tests/favicon.test.ts +131 -0
- package/frontend-vue/tests/file-fields-ssr.test.ts +145 -0
- package/frontend-vue/tests/file-read-urls.test.ts +145 -34
- package/frontend-vue/tests/file-unavailable.test.ts +5 -1
- package/frontend-vue/tests/fixtures/dataEngine.ts +44 -0
- package/frontend-vue/tests/form-load-error.test.ts +55 -1
- package/frontend-vue/tests/helpers/api-data-runtime.ts +77 -0
- package/frontend-vue/tests/image-hydration-ids.test.ts +21 -16
- package/frontend-vue/tests/image-reference-preservation.test.ts +59 -53
- package/frontend-vue/tests/input-number-adjust.test.ts +14 -0
- package/frontend-vue/tests/key-value-list-copy.test.ts +3 -0
- package/frontend-vue/tests/member-role-picker.test.ts +4 -2
- package/frontend-vue/tests/menu-sync-reconnect.test.ts +47 -0
- package/frontend-vue/tests/metadata-retry.test.ts +5 -1
- package/frontend-vue/tests/module-routing.test.ts +2 -5
- package/frontend-vue/tests/modules-catalog.test.ts +17 -4
- package/frontend-vue/tests/modules-listing-transfer.test.ts +95 -0
- package/frontend-vue/tests/multi-account-validate.test.ts +23 -1
- package/frontend-vue/tests/nav-badge-tones.test.ts +66 -3
- package/frontend-vue/tests/notification-counts-from-writes.test.ts +223 -0
- package/frontend-vue/tests/notification-counts-transfer.test.ts +88 -0
- package/frontend-vue/tests/notification-inbox-display.test.ts +57 -5
- package/frontend-vue/tests/notification-popover-errors.test.ts +21 -1
- package/frontend-vue/tests/oauth-complete-handoff.test.ts +209 -0
- package/frontend-vue/tests/onboarding-middleware.test.ts +1 -1
- package/frontend-vue/tests/onboarding-transfer.test.ts +106 -0
- package/frontend-vue/tests/page-data-refresh.test.ts +141 -0
- package/frontend-vue/tests/page-fill-height.test.ts +16 -3
- package/frontend-vue/tests/page-no-visible-blocks.test.ts +12 -2
- package/frontend-vue/tests/page-realtime-remount.test.ts +1 -1
- package/frontend-vue/tests/page-record-label.test.ts +0 -7
- package/frontend-vue/tests/page-validation-redirect.test.ts +12 -2
- package/frontend-vue/tests/period-hydration-now.test.ts +185 -0
- package/frontend-vue/tests/period-live-pause.test.ts +3 -0
- package/frontend-vue/tests/period-reader-zone.test.ts +137 -0
- package/frontend-vue/tests/period-scope-first-fetch.test.ts +17 -1
- package/frontend-vue/tests/period-ssr.test.ts +195 -0
- package/frontend-vue/tests/permission-preview-partial.test.ts +0 -2
- package/frontend-vue/tests/permissions-transfer.test.ts +194 -0
- package/frontend-vue/tests/post-login-redirect.test.ts +10 -5
- package/frontend-vue/tests/profile-personal-info-ssr.test.ts +150 -0
- package/frontend-vue/tests/profile-preferences-summary.test.ts +15 -11
- package/frontend-vue/tests/realtime-reconnect.test.ts +22 -3
- package/frontend-vue/tests/roles-name-errors.test.ts +1 -1
- package/frontend-vue/tests/row-side-panel.test.ts +1 -1
- package/frontend-vue/tests/security-sessions-load-error.test.ts +3 -1
- package/frontend-vue/tests/server-routes-vs-pages.test.ts +26 -0
- package/frontend-vue/tests/server-routes.test.ts +582 -0
- package/frontend-vue/tests/session-handoff.test.ts +1 -1
- package/frontend-vue/tests/settings-reads-ssr.test.ts +232 -0
- package/frontend-vue/tests/side-panels.test.ts +8 -1
- package/frontend-vue/tests/sign-in-exit-history.test.ts +219 -0
- package/frontend-vue/tests/signup-invitation-link.test.ts +56 -8
- package/frontend-vue/tests/site-layout-categories.test.ts +42 -0
- package/frontend-vue/tests/site-layout-hydration.test.ts +3 -3
- package/frontend-vue/tests/site-layout-rendered.test.ts +103 -0
- package/frontend-vue/tests/site-layout-resync.test.ts +87 -0
- package/frontend-vue/tests/ssr-guard-preload.test.ts +188 -0
- package/frontend-vue/tests/table-cell-tones.test.ts +36 -1
- package/frontend-vue/tests/table-data-ssr.test.ts +195 -0
- package/frontend-vue/tests/table-list-data-requests.test.ts +154 -0
- package/frontend-vue/tests/table-retry-loading.test.ts +37 -0
- package/frontend-vue/tests/table-source-navigation.test.ts +0 -1
- package/frontend-vue/tests/table-source-period-scope.test.ts +0 -1
- package/frontend-vue/tests/table-view-views.test.ts +1 -1
- package/frontend-vue/tests/top-list-card-actions.test.ts +3 -0
- package/frontend-vue/tests/top-list-card-period-badge.test.ts +79 -0
- package/frontend-vue/tests/top-list-card-value-suffix.test.ts +3 -0
- package/frontend-vue/tests/trailing-deduper.test.ts +22 -0
- package/frontend-vue/tests/use-api-data-update.test.ts +119 -0
- package/frontend-vue/tests/use-api-data.test.ts +410 -0
- package/frontend-vue/tests/user-language.test.ts +8 -5
- package/frontend-vue/tests/widget-label-i18n.test.ts +4 -1
- package/frontend-vue/vitest.config.ts +6 -0
- package/package.json +2 -2
- package/skills/dms/SKILL.md +2 -1
- package/skills/dms-module/SKILL.md +1 -1
- package/skills/dms-pages/SKILL.md +4 -1
- package/frontend-vue/layers/dms-core/app/build/composables/page/usePageRecordLabel.ts +0 -9
- package/frontend-vue/layers/dms-layout/app/composables/page/usePrefetch.ts +0 -21
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useControlError.ts +0 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useServerRenderedAsyncData.ts +0 -23
- package/frontend-vue/tests/control-error-path.test.ts +0 -11
- package/frontend-vue/tests/modules-listing-per-request.test.ts +0 -104
- package/frontend-vue/tests/page-layout-background-refresh.test.ts +0 -321
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.9.0
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.8.3...v0.9.0)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- ⚠️ Dms 0.9.0 and interface-dms 0.7.0, server rendering on renderer 0.6 ([#299](https://github.com/AntelopeJS/dms/pull/299))
|
|
10
|
+
|
|
11
|
+
### 🏡 Chore
|
|
12
|
+
|
|
13
|
+
- **release:** @antelopejs/interface-dms v0.7.0 ([81a00fa9](https://github.com/AntelopeJS/dms/commit/81a00fa9))
|
|
14
|
+
|
|
15
|
+
#### ⚠️ Breaking Changes
|
|
16
|
+
|
|
17
|
+
- ⚠️ Dms 0.9.0 and interface-dms 0.7.0, server rendering on renderer 0.6 ([#299](https://github.com/AntelopeJS/dms/pull/299))
|
|
18
|
+
|
|
19
|
+
### ❤️ Contributors
|
|
20
|
+
|
|
21
|
+
- Antony Rizzitelli <rizzitelli.antony@pm.me>
|
|
22
|
+
|
|
3
23
|
## v0.8.3
|
|
4
24
|
|
|
5
25
|
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.8.2...v0.8.3)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AddFrontendModuleOptions, FrontendBackendProxy } from "@antelopejs/interface-dms/page";
|
|
2
|
+
export declare function resolveBackendProxies(config: AddFrontendModuleOptions): Required<FrontendBackendProxy>[];
|
|
3
|
+
export declare function copyBackendProxies(proxies: Required<FrontendBackendProxy>[]): Required<FrontendBackendProxy>[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveBackendProxies = resolveBackendProxies;
|
|
4
|
+
exports.copyBackendProxies = copyBackendProxies;
|
|
5
|
+
const SEGMENT = "(?:\\*|[A-Za-z0-9][A-Za-z0-9._~-]*)";
|
|
6
|
+
const PROXY_PATH = new RegExp(`^/[A-Za-z0-9][A-Za-z0-9._~-]*(?:/${SEGMENT})*(?:/\\*\\*)?$`);
|
|
7
|
+
const RENDERER_PREFIXES = ["/api/_dms", "/@", "/assets", "/node_modules"];
|
|
8
|
+
const AUTH_MODES = new Set(["session", "none"]);
|
|
9
|
+
const DEFAULT_AUTH = "session";
|
|
10
|
+
function isRendererPath(path) {
|
|
11
|
+
return RENDERER_PREFIXES.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));
|
|
12
|
+
}
|
|
13
|
+
function isValidBackendProxy(proxy) {
|
|
14
|
+
return (typeof proxy === "object" &&
|
|
15
|
+
proxy !== null &&
|
|
16
|
+
typeof proxy.path === "string" &&
|
|
17
|
+
PROXY_PATH.test(proxy.path) &&
|
|
18
|
+
!isRendererPath(proxy.path) &&
|
|
19
|
+
(proxy.auth === undefined || AUTH_MODES.has(proxy.auth)));
|
|
20
|
+
}
|
|
21
|
+
function resolveBackendProxies(config) {
|
|
22
|
+
const declared = config.backendProxies ?? [];
|
|
23
|
+
const invalid = declared.filter((proxy) => !isValidBackendProxy(proxy));
|
|
24
|
+
if (invalid.length > 0) {
|
|
25
|
+
throw new Error(`Frontend module "${config.name}" declares invalid backendProxies: ` +
|
|
26
|
+
`${invalid.map((proxy) => JSON.stringify(proxy)).join(", ")}. ` +
|
|
27
|
+
'Each entry is { path: "/x", "/x/*" or "/x/**" (first segment ' +
|
|
28
|
+
"literal, outside /api/_dms, /@, /assets and /node_modules), auth?: " +
|
|
29
|
+
'"session" | "none" }.');
|
|
30
|
+
}
|
|
31
|
+
return declared.map((proxy) => ({
|
|
32
|
+
path: proxy.path,
|
|
33
|
+
auth: proxy.auth ?? DEFAULT_AUTH,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
function copyBackendProxies(proxies) {
|
|
37
|
+
return proxies.map((proxy) => ({ path: proxy.path, auth: proxy.auth }));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=frontend-backend-proxies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend-backend-proxies.js","sourceRoot":"","sources":["../../../src/implementations/dms/frontend-backend-proxies.ts"],"names":[],"mappings":";;AA+CA,sDAkBC;AAGD,gDAIC;AA9DD,MAAM,OAAO,GA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OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAC/D,+DAA+D;YAC/D,qEAAqE;YACrE,uBAAuB,CAC1B,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,YAAY;KACjC,CAAC,CAAC,CAAC;AACN,CAAC;AAGD,SAAgB,kBAAkB,CAChC,OAAyC;IAEzC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -9,3 +9,4 @@ export declare function resolveBootstrapOutcome(presented: string | undefined):
|
|
|
9
9
|
export type LayerAccessDecision = "allow" | "refuse" | "degrade";
|
|
10
10
|
export declare function decideLayerAccess(outcome: BootstrapOutcome, hasConfiguredSecret?: boolean, enforcement?: BootstrapEnforcement): LayerAccessDecision;
|
|
11
11
|
export declare function assertFrontendBootstrap(outcome: BootstrapOutcome): void;
|
|
12
|
+
export declare function degradedLayerAccessWarning(route: string, droppedProxies?: string[]): string;
|
|
@@ -8,6 +8,7 @@ exports.matchesFrontendBootstrap = matchesFrontendBootstrap;
|
|
|
8
8
|
exports.resolveBootstrapOutcome = resolveBootstrapOutcome;
|
|
9
9
|
exports.decideLayerAccess = decideLayerAccess;
|
|
10
10
|
exports.assertFrontendBootstrap = assertFrontendBootstrap;
|
|
11
|
+
exports.degradedLayerAccessWarning = degradedLayerAccessWarning;
|
|
11
12
|
const node_crypto_1 = require("node:crypto");
|
|
12
13
|
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
13
14
|
const config_1 = require("../../config");
|
|
@@ -49,4 +50,16 @@ function decideLayerAccess(outcome, hasConfiguredSecret = hasConfiguredFrontendB
|
|
|
49
50
|
function assertFrontendBootstrap(outcome) {
|
|
50
51
|
(0, interface_api_util_1.assert)(outcome === "authenticated", HTTP_UNAUTHORIZED, BOOTSTRAP_REQUIRED_MESSAGE);
|
|
51
52
|
}
|
|
53
|
+
function degradedLayerAccessWarning(route, droppedProxies = []) {
|
|
54
|
+
const proxies = droppedProxies.length > 0
|
|
55
|
+
? ` The declared backend proxies were dropped as well, so the frontend server ` +
|
|
56
|
+
`will not forward them: ${droppedProxies.join(", ")}.`
|
|
57
|
+
: "";
|
|
58
|
+
return (`[DMS] ${route} was served to a caller presenting no valid bootstrap credential, ` +
|
|
59
|
+
"because this instance configures none. Private layer options were withheld, so " +
|
|
60
|
+
"server-side HTML rendering and OAuth login will fail in a frontend built from this " +
|
|
61
|
+
`response.${proxies} Set frontend.bootstrapSecret in the backend config and ` +
|
|
62
|
+
"DMS_BOOTSTRAP_SECRET where the frontend is built; the route is then refused to " +
|
|
63
|
+
"unauthenticated callers.");
|
|
64
|
+
}
|
|
52
65
|
//# sourceMappingURL=frontend-bootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend-bootstrap.js","sourceRoot":"","sources":["../../../src/implementations/dms/frontend-bootstrap.ts"],"names":[],"mappings":";;;AAwBA,kEAGC;AAED,gEAEC;AAUD,oFAEC;AAuBD,4DAMC;AAED,0DAIC;AA6BD,8CASC;AAOD,0DAMC;
|
|
1
|
+
{"version":3,"file":"frontend-bootstrap.js","sourceRoot":"","sources":["../../../src/implementations/dms/frontend-bootstrap.ts"],"names":[],"mappings":";;;AAwBA,kEAGC;AAED,gEAEC;AAUD,oFAEC;AAuBD,4DAMC;AAED,0DAIC;AA6BD,8CASC;AAOD,0DAMC;AAUD,gEAiBC;AA5JD,6CAAuE;AACvE,uEAAwD;AAC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iB,CAC/B,OAAyB,EACzB,sBAA+B,oCAAoC,EAAE,EACrE,cAAoC,IAAA,0BAAiB,GAAE,CAAC,gBAAgB;IACtE,MAAM;IAER,IAAI,OAAO,KAAK,eAAe;QAAE,OAAO,OAAO,CAAC;IAChD,IAAI,mBAAmB,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IACtE,OAAO,SAAS,CAAC;AACnB,CAAC;AAOD,SAAgB,uBAAuB,CAAC,OAAyB;IAC/D,IAAA,2BAAM,EACJ,OAAO,KAAK,eAAe,EAC3B,iBAAiB,EACjB,0BAA0B,CAC3B,CAAC;AACJ,CAAC;AAUD,SAAgB,0BAA0B,CACxC,KAAa,EACb,iBAA2B,EAAE;IAE7B,MAAM,OAAO,GACX,cAAc,CAAC,MAAM,GAAG,CAAC;QACvB,CAAC,CAAC,6EAA6E;YAC7E,0BAA0B,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QACxD,CAAC,CAAC,EAAE,CAAC;IACT,OAAO,CACL,SAAS,KAAK,oEAAoE;QAClF,iFAAiF;QACjF,qFAAqF;QACrF,YAAY,OAAO,0DAA0D;QAC7E,iFAAiF;QACjF,0BAA0B,CAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PassThrough } from "node:stream";
|
|
2
2
|
import type { RequestContext } from "@antelopejs/interface-api";
|
|
3
|
-
import type { AddFrontendModuleOptions, FrontendModuleMetadata, FrontendPublicEndpoint, FrontendModuleOptions } from "@antelopejs/interface-dms/page";
|
|
3
|
+
import type { AddFrontendModuleOptions, FrontendBackendProxy, FrontendModuleMetadata, FrontendPublicEndpoint, FrontendModuleOptions } from "@antelopejs/interface-dms/page";
|
|
4
4
|
import { type FrontendManifest } from "./manifest";
|
|
5
5
|
interface FrontendModule {
|
|
6
6
|
name: string;
|
|
@@ -13,11 +13,13 @@ interface FrontendModule {
|
|
|
13
13
|
renderer: AddFrontendModuleOptions["renderer"];
|
|
14
14
|
authEstablishEndpoints: string[];
|
|
15
15
|
publicEndpoints: Required<FrontendPublicEndpoint>[];
|
|
16
|
+
backendProxies: Required<FrontendBackendProxy>[];
|
|
16
17
|
}
|
|
17
|
-
type ServedModule = Omit<FrontendModule, "path" | "authEstablishEndpoints" | "publicEndpoints"> & {
|
|
18
|
+
type ServedModule = Omit<FrontendModule, "path" | "authEstablishEndpoints" | "publicEndpoints" | "backendProxies"> & {
|
|
18
19
|
path?: string;
|
|
19
20
|
authEstablishEndpoints?: string[];
|
|
20
21
|
publicEndpoints?: Required<FrontendPublicEndpoint>[];
|
|
22
|
+
backendProxies?: Required<FrontendBackendProxy>[];
|
|
21
23
|
};
|
|
22
24
|
export declare function createIgnoreFilter(modulePath: string): (entryData: any) => any;
|
|
23
25
|
export declare function AddFrontendModule(config: AddFrontendModuleOptions): void;
|
|
@@ -22,6 +22,7 @@ const frontend_bootstrap_1 = require("./frontend-bootstrap");
|
|
|
22
22
|
const manifest_1 = require("./manifest");
|
|
23
23
|
const warn_once_1 = require("./warn-once");
|
|
24
24
|
const frontend_public_endpoints_1 = require("./frontend-public-endpoints");
|
|
25
|
+
const frontend_backend_proxies_1 = require("./frontend-backend-proxies");
|
|
25
26
|
const BUILD_ARTIFACT_PATTERNS = [
|
|
26
27
|
"node_modules/",
|
|
27
28
|
"dist/",
|
|
@@ -137,6 +138,7 @@ function AddFrontendModule(config) {
|
|
|
137
138
|
const identity = moduleIdentity(config);
|
|
138
139
|
const authEstablishEndpoints = resolveAuthEstablishEndpoints(config);
|
|
139
140
|
const publicEndpoints = (0, frontend_public_endpoints_1.resolvePublicEndpoints)(config);
|
|
141
|
+
const backendProxies = (0, frontend_backend_proxies_1.resolveBackendProxies)(config);
|
|
140
142
|
const registeredModule = modules[identity];
|
|
141
143
|
if (registeredModule && registeredModule.priority > (config.priority ?? 0)) {
|
|
142
144
|
return;
|
|
@@ -152,6 +154,7 @@ function AddFrontendModule(config) {
|
|
|
152
154
|
renderer: config.renderer,
|
|
153
155
|
authEstablishEndpoints,
|
|
154
156
|
publicEndpoints,
|
|
157
|
+
backendProxies,
|
|
155
158
|
};
|
|
156
159
|
(0, dev_reload_1.scheduleBroadcast)();
|
|
157
160
|
}
|
|
@@ -177,19 +180,17 @@ function GetFrontendModules() {
|
|
|
177
180
|
options: copyFrontendOptions(module.options ?? {}),
|
|
178
181
|
authEstablishEndpoints: [...module.authEstablishEndpoints],
|
|
179
182
|
publicEndpoints: (0, frontend_public_endpoints_1.copyPublicEndpoints)(module.publicEndpoints),
|
|
183
|
+
backendProxies: (0, frontend_backend_proxies_1.copyBackendProxies)(module.backendProxies),
|
|
180
184
|
}));
|
|
181
185
|
}
|
|
182
|
-
function enforceLayerAccess(outcome, route) {
|
|
186
|
+
function enforceLayerAccess(outcome, route, droppedProxies = () => []) {
|
|
183
187
|
const decision = (0, frontend_bootstrap_1.decideLayerAccess)(outcome);
|
|
184
188
|
if (decision === "allow")
|
|
185
189
|
return;
|
|
186
190
|
if (decision === "refuse")
|
|
187
191
|
(0, frontend_bootstrap_1.assertFrontendBootstrap)(outcome);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
"server-side HTML rendering and OAuth login will fail in a frontend built from this " +
|
|
191
|
-
"response. Set frontend.bootstrapSecret in the backend config and DMS_BOOTSTRAP_SECRET " +
|
|
192
|
-
"where the frontend is built; the route is then refused to unauthenticated callers.");
|
|
192
|
+
const dropped = droppedProxies();
|
|
193
|
+
(0, warn_once_1.warnOnceFor)(modules, `${route} ${dropped.join(",")}`, (0, frontend_bootstrap_1.degradedLayerAccessWarning)(route, dropped));
|
|
193
194
|
}
|
|
194
195
|
function resolveManifestFieldPolicy(outcome, dev) {
|
|
195
196
|
const authenticated = outcome === "authenticated";
|
|
@@ -213,7 +214,7 @@ function applyDevManifestOverrides(manifest, requestContext, clientUrl, outcome)
|
|
|
213
214
|
}
|
|
214
215
|
async function buildFrontendManifest(requestContext, clientUrl, renderer, rendererVersion, bootstrapHeader) {
|
|
215
216
|
const outcome = (0, frontend_bootstrap_1.resolveBootstrapOutcome)(bootstrapHeader);
|
|
216
|
-
enforceLayerAccess(outcome, "GET /dms/frontend");
|
|
217
|
+
enforceLayerAccess(outcome, "GET /dms/frontend", () => (0, manifest_1.listDroppedBackendProxies)(selectedModules(resolveFrontendSelection(renderer, rendererVersion)), resolveManifestFieldPolicy(outcome, false)));
|
|
217
218
|
const selection = resolveFrontendSelection(renderer, rendererVersion);
|
|
218
219
|
const { dev } = await (0, runtime_1.GetRuntimeInfo)();
|
|
219
220
|
let shaped = (0, manifest_1.stripPrivateManifestFields)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend-modules.js","sourceRoot":"","sources":["../../../src/implementations/dms/frontend-modules.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"frontend-modules.js","sourceRoot":"","sources":["../../../src/implementations/dms/frontend-modules.ts"],"names":[],"mappings":";;;;;AAiIA,gDAWC;AAqHD,8CAwBC;AAoBD,gDAWC;AAmDD,sDAoCC;AAED,oDAmBC;AApaD,qCAAmD;AACnD,yCAAiC;AAEjC,qDAA+C;AAE/C,uEAAwD;AACxD,gEAAoE;AASpE,wDAAgC;AAChC,oDAA4B;AAC5B,mCAAuC;AACvC,yCAAgF;AAChF,6CAAiD;AACjD,6DAM8B;AAC9B,yCAUoB;AACpB,2CAA0C;AAC1C,2EAGqC;AACrC,yEAGoC;AAgCpC,MAAM,uBAAuB,GAAG;IAC9B,eAAe;IACf,OAAO;IACP,UAAU;IACV,QAAQ;IACR,OAAO;IACP,WAAW;IACX,eAAe;IACf,iBAAiB;CAClB,CAAC;AACF,MAAM,uBAAuB,GAAG;IAC9B,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,OAAO;IACP,mBAAmB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ChB,QAA4B,EAC5B,eAAmC,EACnC,eAAmC;IAEnC,kBAAkB,CAChB,IAAA,4CAAuB,EAAC,eAAe,CAAC,EACxC,2BAA2B,CAC5B,CAAC;IACF,MAAM,SAAS,GAAG,wBAAwB,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IACtE,MAAM,GAAG,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IACpC,IACE,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC;QAC/B,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EACrC,CAAC;QACD,MAAM,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IACD,GAAG,CAAC,GAAG,CAAC,MAAM,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -5,6 +5,7 @@ export interface ManifestModuleEntry {
|
|
|
5
5
|
path?: string;
|
|
6
6
|
authEstablishEndpoints?: string[];
|
|
7
7
|
publicEndpoints?: unknown[];
|
|
8
|
+
backendProxies?: unknown[];
|
|
8
9
|
}
|
|
9
10
|
export interface ModuleManifestShape<T extends ManifestModuleEntry = ManifestModuleEntry> {
|
|
10
11
|
pack: string;
|
|
@@ -28,3 +29,8 @@ export interface ManifestFieldPolicy {
|
|
|
28
29
|
authEstablishEndpoints: boolean;
|
|
29
30
|
}
|
|
30
31
|
export declare function stripPrivateManifestFields<T extends ManifestModuleEntry>(manifest: ModuleManifestShape<T>, keep: ManifestFieldPolicy): ModuleManifestShape<T>;
|
|
32
|
+
interface NamedManifestModule extends ManifestModuleEntry {
|
|
33
|
+
name: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function listDroppedBackendProxies(modules: NamedManifestModule[], keep: ManifestFieldPolicy): string[];
|
|
36
|
+
export {};
|
|
@@ -4,6 +4,7 @@ exports.resolveRequestOrigin = resolveRequestOrigin;
|
|
|
4
4
|
exports.resolveClientOrigin = resolveClientOrigin;
|
|
5
5
|
exports.applyDevManifestUrls = applyDevManifestUrls;
|
|
6
6
|
exports.stripPrivateManifestFields = stripPrivateManifestFields;
|
|
7
|
+
exports.listDroppedBackendProxies = listDroppedBackendProxies;
|
|
7
8
|
const HTTP_PROTOCOLS = new Set(["http:", "https:"]);
|
|
8
9
|
function resolveRequestOrigin(request) {
|
|
9
10
|
const host = request.headers.host;
|
|
@@ -86,6 +87,7 @@ function applyFieldPolicy(module, keep) {
|
|
|
86
87
|
if (!keep.authEstablishEndpoints) {
|
|
87
88
|
delete shaped.authEstablishEndpoints;
|
|
88
89
|
delete shaped.publicEndpoints;
|
|
90
|
+
delete shaped.backendProxies;
|
|
89
91
|
}
|
|
90
92
|
return shaped;
|
|
91
93
|
}
|
|
@@ -97,4 +99,15 @@ function stripPrivateManifestFields(manifest, keep) {
|
|
|
97
99
|
modules: manifest.modules.map((module) => applyFieldPolicy(module, keep)),
|
|
98
100
|
};
|
|
99
101
|
}
|
|
102
|
+
function proxyPath(proxy) {
|
|
103
|
+
if (!proxy || typeof proxy !== "object")
|
|
104
|
+
return undefined;
|
|
105
|
+
const { path } = proxy;
|
|
106
|
+
return typeof path === "string" ? path : undefined;
|
|
107
|
+
}
|
|
108
|
+
function listDroppedBackendProxies(modules, keep) {
|
|
109
|
+
if (keep.authEstablishEndpoints)
|
|
110
|
+
return [];
|
|
111
|
+
return modules.flatMap((module) => (module.backendProxies ?? []).map((proxy) => `${module.name} ${proxyPath(proxy) ?? "(no path)"}`));
|
|
112
|
+
}
|
|
100
113
|
//# sourceMappingURL=manifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/implementations/dms/manifest.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/implementations/dms/manifest.ts"],"names":[],"mappings":";;AAmCA,oDAQC;AAED,kDAWC;AAwED,oDAaC;AA0CD,gEAUC;AAoBD,8DAUC;AAlMD,MAAM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,CAAC,IAAI,IAAI,IAAI,CAAC,sBAAsB;QACjE,OAAO,QAAQ,CAAC;IAClB,OAAO;QACL,GAAG,QAAQ;QACX,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KAC1E,CAAC;AACJ,CAAC;AAMD,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC1D,MAAM,EAAE,IAAI,EAAE,GAAG,KAA2B,CAAC;IAC7C,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AACrD,CAAC;AAUD,SAAgB,yBAAyB,CACvC,OAA8B,EAC9B,IAAyB;IAEzB,IAAI,IAAI,CAAC,sBAAsB;QAAE,OAAO,EAAE,CAAC;IAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAChC,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,GAAG,CAC/B,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,WAAW,EAAE,CAC/D,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type WithCategoryRef<T> = Omit<T, "category"> & {
|
|
2
|
+
categoryId?: string;
|
|
3
|
+
};
|
|
4
|
+
interface CategorizedEntry {
|
|
5
|
+
category?: unknown;
|
|
6
|
+
}
|
|
7
|
+
interface CategorizedTree extends CategorizedEntry {
|
|
8
|
+
children: Record<string, CategorizedTree>;
|
|
9
|
+
}
|
|
10
|
+
export type TreeWithCategoryRefs<T extends CategorizedTree> = WithCategoryRef<Omit<T, "children">> & {
|
|
11
|
+
children: Record<string, TreeWithCategoryRefs<T>>;
|
|
12
|
+
};
|
|
13
|
+
export declare function withCategoryRef<T extends CategorizedEntry>(entry: T): WithCategoryRef<T>;
|
|
14
|
+
export declare function withCategoryRefs<T extends CategorizedEntry>(record: Record<string, T>): Record<string, WithCategoryRef<T>>;
|
|
15
|
+
export declare function treeWithCategoryRefs<T extends CategorizedTree>(node: T): TreeWithCategoryRefs<T>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withCategoryRef = withCategoryRef;
|
|
4
|
+
exports.withCategoryRefs = withCategoryRefs;
|
|
5
|
+
exports.treeWithCategoryRefs = treeWithCategoryRefs;
|
|
6
|
+
function isIdentified(category) {
|
|
7
|
+
return (typeof category === "object" &&
|
|
8
|
+
category !== null &&
|
|
9
|
+
typeof category.fullId === "string");
|
|
10
|
+
}
|
|
11
|
+
function withCategoryRef(entry) {
|
|
12
|
+
const { category, ...rest } = entry;
|
|
13
|
+
return isIdentified(category)
|
|
14
|
+
? { ...rest, categoryId: category.fullId }
|
|
15
|
+
: rest;
|
|
16
|
+
}
|
|
17
|
+
function withCategoryRefs(record) {
|
|
18
|
+
return Object.fromEntries(Object.entries(record).map(([key, entry]) => [key, withCategoryRef(entry)]));
|
|
19
|
+
}
|
|
20
|
+
function treeWithCategoryRefs(node) {
|
|
21
|
+
const { children, ...rest } = node;
|
|
22
|
+
return {
|
|
23
|
+
...withCategoryRef(rest),
|
|
24
|
+
children: Object.fromEntries(Object.entries(children).map(([key, child]) => [
|
|
25
|
+
key,
|
|
26
|
+
treeWithCategoryRefs(child),
|
|
27
|
+
])),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=menu-categories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-categories.js","sourceRoot":"","sources":["../../../src/implementations/dms/menu-categories.ts"],"names":[],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dms/auth/db";
|
|
3
|
-
import type { Tone } from "@antelopejs/interface-dms/base/types/tone";
|
|
4
3
|
import { type ResolvedNavBadges } from "@antelopejs/interface-dms/page/internal/nav-badges";
|
|
5
4
|
interface BadgedEntry {
|
|
6
5
|
fullId: string;
|
|
7
|
-
badge?: string;
|
|
8
|
-
badgeTone?: Tone;
|
|
9
6
|
hasAccess?: boolean;
|
|
10
7
|
}
|
|
11
|
-
interface BadgedTree extends BadgedEntry {
|
|
12
|
-
children: Record<string, BadgedTree>;
|
|
13
|
-
}
|
|
14
8
|
export declare function resolveMenuNavBadges(ctx: RequestContext | undefined, user: User | undefined, entries: BadgedEntry[]): Promise<ResolvedNavBadges>;
|
|
15
|
-
export declare function withNavBadge<T extends BadgedEntry>(entry: T, badges: ResolvedNavBadges): T;
|
|
16
|
-
export declare function withTreeNavBadges<T extends BadgedTree>(node: T, badges: ResolvedNavBadges): T;
|
|
17
9
|
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveMenuNavBadges = resolveMenuNavBadges;
|
|
4
|
-
exports.withNavBadge = withNavBadge;
|
|
5
|
-
exports.withTreeNavBadges = withTreeNavBadges;
|
|
6
4
|
const nav_badges_1 = require("@antelopejs/interface-dms/page/internal/nav-badges");
|
|
7
5
|
const resolver_timeout_1 = require("./resolver-timeout");
|
|
8
6
|
async function resolveMenuNavBadges(ctx, user, entries) {
|
|
@@ -18,18 +16,4 @@ async function resolveMenuNavBadges(ctx, user, entries) {
|
|
|
18
16
|
return {};
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
|
-
function withNavBadge(entry, badges) {
|
|
22
|
-
const resolved = badges[entry.fullId];
|
|
23
|
-
if (resolved === undefined || entry.badge !== undefined)
|
|
24
|
-
return entry;
|
|
25
|
-
const { badge, tone } = resolved;
|
|
26
|
-
return tone ? { ...entry, badge, badgeTone: tone } : { ...entry, badge };
|
|
27
|
-
}
|
|
28
|
-
function withTreeNavBadges(node, badges) {
|
|
29
|
-
const children = Object.fromEntries(Object.entries(node.children).map(([key, child]) => [
|
|
30
|
-
key,
|
|
31
|
-
withTreeNavBadges(child, badges),
|
|
32
|
-
]));
|
|
33
|
-
return { ...withNavBadge(node, badges), children };
|
|
34
|
-
}
|
|
35
19
|
//# sourceMappingURL=nav-badges.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-badges.js","sourceRoot":"","sources":["../../../src/implementations/dms/nav-badges.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"nav-badges.js","sourceRoot":"","sources":["../../../src/implementations/dms/nav-badges.ts"],"names":[],"mappings":";;AAuBA,oDAkBC;AAlCD,mFAG4D;AAC5D,yDAAyD;AAYlD,KAAK,UAAU,oBAAoB,CACxC,GAA+B,EAC/B,IAAsB,EACtB,OAAsB;IAEtB,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAC7B,MAAM,SAAS,GAAG,IAAI,GAAG,CACvB,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CACxE,CAAC;IACF,IAAI,SAAS,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,sCAAmB,EAC9B,IAAA,mCAAsB,EAAC,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,EAC5C,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -6,6 +6,8 @@ import type { User } from "@antelopejs/interface-dms/auth/db";
|
|
|
6
6
|
import type { FrontendManifest, ManifestModuleEntry } from "./manifest";
|
|
7
7
|
import { type QuickActionsPayload } from "./quick-actions";
|
|
8
8
|
import { type LayoutBannerSerialized } from "./layout-banners";
|
|
9
|
+
import { type TreeWithCategoryRefs, type WithCategoryRef } from "./menu-categories";
|
|
10
|
+
import type { ResolvedNavBadges } from "@antelopejs/interface-dms/page/internal/nav-badges";
|
|
9
11
|
export { AddFrontendModule, createIgnoreFilter, GetFrontendModules, } from "./frontend-modules";
|
|
10
12
|
type SiteLayoutTree = Omit<PageInfo, "layoutUrl"> & {
|
|
11
13
|
children: Record<string, SiteLayoutTree>;
|
|
@@ -20,6 +22,7 @@ export declare function GetMenuOrder(): Map<string, number>;
|
|
|
20
22
|
export declare function GetCategoryPermissionIds(): Set<string>;
|
|
21
23
|
export declare function GetMenuEntryPermissionIds(): Set<string>;
|
|
22
24
|
export declare function NotifyMenuChanged(tenantId?: string): void;
|
|
25
|
+
export declare function notifyMenuAccessChanged(tenantId: string, userIds: Iterable<string>): void;
|
|
23
26
|
export declare function cancelPendingMenuNotifications(): void;
|
|
24
27
|
export declare namespace internal {
|
|
25
28
|
const RegisterCategory: {
|
|
@@ -60,22 +63,24 @@ export declare class DMSController extends DMSController_base {
|
|
|
60
63
|
interface AccessFlag {
|
|
61
64
|
hasAccess: boolean;
|
|
62
65
|
}
|
|
66
|
+
type ServedPage = WithCategoryRef<PageInfo & AccessFlag>;
|
|
63
67
|
interface SiteLayoutWithAccess {
|
|
64
|
-
pages: Record<string,
|
|
65
|
-
categories: Record<string, CategoryInfo & AccessFlag
|
|
68
|
+
pages: Record<string, ServedPage>;
|
|
69
|
+
categories: Record<string, WithCategoryRef<CategoryInfo & AccessFlag>>;
|
|
66
70
|
banners: LayoutBannerSerialized[];
|
|
67
71
|
}
|
|
68
72
|
export interface SiteLayoutPayload {
|
|
69
73
|
siteLayout: SiteLayoutWithAccess;
|
|
70
|
-
siteLayoutTree: SiteLayoutTree
|
|
74
|
+
siteLayoutTree: TreeWithCategoryRefs<SiteLayoutTree>;
|
|
71
75
|
quickActions: QuickActionsPayload;
|
|
72
76
|
modules: Record<string, ModuleInfo & AccessFlag>;
|
|
73
77
|
isOwner: boolean;
|
|
74
78
|
}
|
|
75
79
|
export interface PagePayload {
|
|
76
|
-
route:
|
|
80
|
+
route: ServedPage;
|
|
77
81
|
shared: SiteLayoutPayload;
|
|
78
82
|
layout: PageLayout;
|
|
83
|
+
navBadges: ResolvedNavBadges;
|
|
79
84
|
}
|
|
80
85
|
export interface PageResponsePayload extends Omit<PagePayload, "shared"> {
|
|
81
86
|
shared?: SiteLayoutPayload;
|
|
@@ -126,7 +131,8 @@ export interface PermissionPreviewRequest {
|
|
|
126
131
|
export declare function resolvePermissionPreviewAccess(request: PermissionPreviewRequest): Promise<PermissionPreviewAccess>;
|
|
127
132
|
export declare function filterPermissionsForBypassedSurfaces(permissions: Set<string>, surfaces: Map<string, boolean>): Set<string>;
|
|
128
133
|
export declare function resolveUserPermissions(user: User | undefined, memberModel: TenantMemberModel, roleModel: RoleModel, tenantId: string): Promise<string[]>;
|
|
129
|
-
export declare function buildSiteLayoutPayload(user: User | undefined, memberModel: TenantMemberModel, roleModel: RoleModel, tenantId: string
|
|
134
|
+
export declare function buildSiteLayoutPayload(user: User | undefined, memberModel: TenantMemberModel, roleModel: RoleModel, tenantId: string): Promise<SiteLayoutPayload>;
|
|
135
|
+
export declare function buildNavBadges(user: User | undefined, memberModel: TenantMemberModel, roleModel: RoleModel, tenantId: string, requestContext: RequestContext | undefined): Promise<ResolvedNavBadges>;
|
|
130
136
|
type ModuleCatalogEntry = Omit<ModuleInfo, "status" | "readout"> & {
|
|
131
137
|
hasAccess: boolean;
|
|
132
138
|
landingSlug: string;
|