@ssiriuss/core 0.0.0-stage → 0.0.1
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/README.md +68 -2
- package/dist/app/App.d.ts +7 -0
- package/dist/app/App.js +1 -0
- package/dist/app/Moved.d.ts +4 -0
- package/dist/app/Moved.js +1 -0
- package/dist/app/RequireAccess.d.ts +7 -0
- package/dist/app/RequireAccess.js +1 -0
- package/dist/app/WorkspaceRoutes.d.ts +3 -0
- package/dist/app/WorkspaceRoutes.js +1 -0
- package/dist/app/control-tower.d.ts +3 -0
- package/dist/app/control-tower.js +1 -0
- package/dist/app/paths.d.ts +73 -0
- package/dist/app/paths.js +1 -0
- package/dist/app/staleChunkReload.d.ts +6 -0
- package/dist/app/staleChunkReload.js +1 -0
- package/dist/app/start.d.ts +8 -0
- package/dist/app/start.js +1 -0
- package/dist/boxes/core.d.ts +2 -0
- package/dist/boxes/core.js +1 -0
- package/dist/features/administration/README.md +13 -0
- package/dist/features/administration/components/LogFilesPanel.d.ts +6 -0
- package/dist/features/administration/components/LogFilesPanel.js +1 -0
- package/dist/features/administration/components/NewRoleForm.d.ts +7 -0
- package/dist/features/administration/components/NewRoleForm.js +1 -0
- package/dist/features/administration/components/RoleEditor.d.ts +8 -0
- package/dist/features/administration/components/RoleEditor.js +1 -0
- package/dist/features/administration/components/RoleList.d.ts +7 -0
- package/dist/features/administration/components/RoleList.js +1 -0
- package/dist/features/administration/hooks/useAccess.d.ts +55 -0
- package/dist/features/administration/hooks/useAccess.js +1 -0
- package/dist/features/administration/hooks/useAdministration.d.ts +30 -0
- package/dist/features/administration/hooks/useAdministration.js +1 -0
- package/dist/features/administration/index.d.ts +2 -0
- package/dist/features/administration/index.js +1 -0
- package/dist/features/administration/model/roleKinds.d.ts +3 -0
- package/dist/features/administration/model/roleKinds.js +1 -0
- package/dist/features/administration/model/roleOrigin.d.ts +13 -0
- package/dist/features/administration/model/roleOrigin.js +1 -0
- package/dist/features/administration/pages/AccessPage.d.ts +5 -0
- package/dist/features/administration/pages/AccessPage.js +1 -0
- package/dist/features/administration/pages/LoggingPage.d.ts +1 -0
- package/dist/features/administration/pages/LoggingPage.js +1 -0
- package/dist/features/api-reference/README.md +10 -0
- package/dist/features/api-reference/index.d.ts +1 -0
- package/dist/features/api-reference/index.js +1 -0
- package/dist/features/api-reference/pages/ApiReferencePage.d.ts +1 -0
- package/dist/features/api-reference/pages/ApiReferencePage.js +1 -0
- package/dist/features/auth/README.md +13 -0
- package/dist/features/auth/index.d.ts +2 -0
- package/dist/features/auth/index.js +1 -0
- package/dist/features/auth/pages/LoginPage.d.ts +1 -0
- package/dist/features/auth/pages/LoginPage.js +1 -0
- package/dist/features/auth/pages/PasswordPage.d.ts +1 -0
- package/dist/features/auth/pages/PasswordPage.js +1 -0
- package/dist/features/events/README.md +13 -0
- package/dist/features/events/components/DefinitionViews.d.ts +13 -0
- package/dist/features/events/components/DefinitionViews.js +1 -0
- package/dist/features/events/components/Listeners.d.ts +8 -0
- package/dist/features/events/components/Listeners.js +1 -0
- package/dist/features/events/components/ProducerBindings.d.ts +9 -0
- package/dist/features/events/components/ProducerBindings.js +1 -0
- package/dist/features/events/components/RenameDialog.d.ts +9 -0
- package/dist/features/events/components/RenameDialog.js +1 -0
- package/dist/features/events/components/ReroutePanel.d.ts +9 -0
- package/dist/features/events/components/ReroutePanel.js +1 -0
- package/dist/features/events/components/RevisionDialog.d.ts +27 -0
- package/dist/features/events/components/RevisionDialog.js +1 -0
- package/dist/features/events/components/SimulationPanel.d.ts +10 -0
- package/dist/features/events/components/SimulationPanel.js +1 -0
- package/dist/features/events/components/SubscriptionDialog.d.ts +24 -0
- package/dist/features/events/components/SubscriptionDialog.js +1 -0
- package/dist/features/events/components/parts.d.ts +4 -0
- package/dist/features/events/components/parts.js +1 -0
- package/dist/features/events/hooks/useEventCatalog.d.ts +212 -0
- package/dist/features/events/hooks/useEventCatalog.js +1 -0
- package/dist/features/events/hooks/useEventLog.d.ts +106 -0
- package/dist/features/events/hooks/useEventLog.js +1 -0
- package/dist/features/events/hooks/useLiveEvents.d.ts +9 -0
- package/dist/features/events/hooks/useLiveEvents.js +1 -0
- package/dist/features/events/hooks/useSubscriptions.d.ts +151 -0
- package/dist/features/events/hooks/useSubscriptions.js +1 -0
- package/dist/features/events/index.d.ts +5 -0
- package/dist/features/events/index.js +1 -0
- package/dist/features/events/model/definition-labels.d.ts +6 -0
- package/dist/features/events/model/definition-labels.js +1 -0
- package/dist/features/events/model/presentation.d.ts +3 -0
- package/dist/features/events/model/presentation.js +1 -0
- package/dist/features/events/pages/DeliveriesPage.d.ts +2 -0
- package/dist/features/events/pages/DeliveriesPage.js +1 -0
- package/dist/features/events/pages/EventCatalogPage.d.ts +2 -0
- package/dist/features/events/pages/EventCatalogPage.js +1 -0
- package/dist/features/events/pages/EventLogPage.d.ts +2 -0
- package/dist/features/events/pages/EventLogPage.js +1 -0
- package/dist/features/events/pages/LegalHoldsPage.d.ts +5 -0
- package/dist/features/events/pages/LegalHoldsPage.js +1 -0
- package/dist/features/events/pages/SubscriptionsPage.d.ts +2 -0
- package/dist/features/events/pages/SubscriptionsPage.js +1 -0
- package/dist/features/home/README.md +13 -0
- package/dist/features/home/index.d.ts +1 -0
- package/dist/features/home/index.js +1 -0
- package/dist/features/home/model/presentation.d.ts +6 -0
- package/dist/features/home/model/presentation.js +1 -0
- package/dist/features/home/pages/HomePage.d.ts +5 -0
- package/dist/features/home/pages/HomePage.js +1 -0
- package/dist/features/menus/README.md +13 -0
- package/dist/features/menus/components/MenuEntryPanel.d.ts +14 -0
- package/dist/features/menus/components/MenuEntryPanel.js +1 -0
- package/dist/features/menus/index.d.ts +1 -0
- package/dist/features/menus/index.js +1 -0
- package/dist/features/menus/model/menu-board.d.ts +41 -0
- package/dist/features/menus/model/menu-board.js +1 -0
- package/dist/features/menus/pages/MenusPage.d.ts +6 -0
- package/dist/features/menus/pages/MenusPage.js +1 -0
- package/dist/features/platform/README.md +9 -0
- package/dist/features/platform/index.d.ts +1 -0
- package/dist/features/platform/index.js +1 -0
- package/dist/features/platform/pages/PlatformHomePage.d.ts +5 -0
- package/dist/features/platform/pages/PlatformHomePage.js +1 -0
- package/dist/features/status/README.md +11 -0
- package/dist/features/status/index.d.ts +1 -0
- package/dist/features/status/index.js +1 -0
- package/dist/features/status/pages/StatusPage.d.ts +6 -0
- package/dist/features/status/pages/StatusPage.js +1 -0
- package/dist/features/tenants/README.md +14 -0
- package/dist/features/tenants/components/BrandingForm.d.ts +15 -0
- package/dist/features/tenants/components/BrandingForm.js +1 -0
- package/dist/features/tenants/components/DeploymentForm.d.ts +6 -0
- package/dist/features/tenants/components/DeploymentForm.js +1 -0
- package/dist/features/tenants/components/SignInPageForm.d.ts +11 -0
- package/dist/features/tenants/components/SignInPageForm.js +1 -0
- package/dist/features/tenants/components/TenantAdministrators.d.ts +8 -0
- package/dist/features/tenants/components/TenantAdministrators.js +1 -0
- package/dist/features/tenants/index.d.ts +3 -0
- package/dist/features/tenants/index.js +1 -0
- package/dist/features/tenants/model/branding-draft.d.ts +32 -0
- package/dist/features/tenants/model/branding-draft.js +1 -0
- package/dist/features/tenants/model/deployment-draft.d.ts +35 -0
- package/dist/features/tenants/model/deployment-draft.js +1 -0
- package/dist/features/tenants/model/onboarding.d.ts +31 -0
- package/dist/features/tenants/model/onboarding.js +1 -0
- package/dist/features/tenants/pages/TenantBrandingPage.d.ts +2 -0
- package/dist/features/tenants/pages/TenantBrandingPage.js +1 -0
- package/dist/features/tenants/pages/TenantOnboardPage.d.ts +5 -0
- package/dist/features/tenants/pages/TenantOnboardPage.js +1 -0
- package/dist/features/tenants/pages/TenantsPage.d.ts +2 -0
- package/dist/features/tenants/pages/TenantsPage.js +1 -0
- package/dist/features/users/README.md +13 -0
- package/dist/features/users/components/AccountActions.d.ts +8 -0
- package/dist/features/users/components/AccountActions.js +1 -0
- package/dist/features/users/components/AccountCreate.d.ts +8 -0
- package/dist/features/users/components/AccountCreate.js +1 -0
- package/dist/features/users/components/AccountDialog.d.ts +8 -0
- package/dist/features/users/components/AccountDialog.js +1 -0
- package/dist/features/users/components/AccountEditor.d.ts +20 -0
- package/dist/features/users/components/AccountEditor.js +1 -0
- package/dist/features/users/components/AccountGroups.d.ts +15 -0
- package/dist/features/users/components/AccountGroups.js +1 -0
- package/dist/features/users/components/AccountStatus.d.ts +4 -0
- package/dist/features/users/components/AccountStatus.js +1 -0
- package/dist/features/users/components/CredentialReveal.d.ts +5 -0
- package/dist/features/users/components/CredentialReveal.js +1 -0
- package/dist/features/users/components/RolePicker.d.ts +9 -0
- package/dist/features/users/components/RolePicker.js +1 -0
- package/dist/features/users/hooks/useTenantNames.d.ts +5 -0
- package/dist/features/users/hooks/useTenantNames.js +1 -0
- package/dist/features/users/hooks/useUsers.d.ts +70 -0
- package/dist/features/users/hooks/useUsers.js +1 -0
- package/dist/features/users/index.d.ts +3 -0
- package/dist/features/users/index.js +1 -0
- package/dist/features/users/model/format.d.ts +6 -0
- package/dist/features/users/model/format.js +1 -0
- package/dist/features/users/pages/UserCreatePage.d.ts +2 -0
- package/dist/features/users/pages/UserCreatePage.js +1 -0
- package/dist/features/users/pages/UserPage.d.ts +2 -0
- package/dist/features/users/pages/UserPage.js +1 -0
- package/dist/features/users/pages/UsersPage.d.ts +1 -0
- package/dist/features/users/pages/UsersPage.js +1 -0
- package/dist/index.css +390 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/shared/api/.gitkeep +0 -0
- package/dist/shared/api/administration.d.ts +127 -0
- package/dist/shared/api/administration.js +1 -0
- package/dist/shared/api/ai-assets.d.ts +240 -0
- package/dist/shared/api/ai-assets.js +1 -0
- package/dist/shared/api/applications.d.ts +13 -0
- package/dist/shared/api/applications.js +1 -0
- package/dist/shared/api/auth-transport.d.ts +14 -0
- package/dist/shared/api/auth-transport.js +1 -0
- package/dist/shared/api/branding.d.ts +14 -0
- package/dist/shared/api/branding.js +1 -0
- package/dist/shared/api/client.d.ts +25 -0
- package/dist/shared/api/client.js +1 -0
- package/dist/shared/api/event-catalog.d.ts +175 -0
- package/dist/shared/api/event-catalog.js +1 -0
- package/dist/shared/api/event-legal-holds.d.ts +34 -0
- package/dist/shared/api/event-legal-holds.js +1 -0
- package/dist/shared/api/event-log.d.ts +141 -0
- package/dist/shared/api/event-log.js +1 -0
- package/dist/shared/api/event-stream.d.ts +26 -0
- package/dist/shared/api/event-stream.js +6 -0
- package/dist/shared/api/event-subscriptions.d.ts +108 -0
- package/dist/shared/api/event-subscriptions.js +1 -0
- package/dist/shared/api/generated/schema.d.ts +40069 -0
- package/dist/shared/api/gridLayouts.d.ts +9 -0
- package/dist/shared/api/gridLayouts.js +1 -0
- package/dist/shared/api/http.d.ts +19 -0
- package/dist/shared/api/http.js +1 -0
- package/dist/shared/api/human-tasks.d.ts +44 -0
- package/dist/shared/api/human-tasks.js +1 -0
- package/dist/shared/api/integrations.d.ts +886 -0
- package/dist/shared/api/integrations.js +1 -0
- package/dist/shared/api/menus.d.ts +19 -0
- package/dist/shared/api/menus.js +1 -0
- package/dist/shared/api/openapi.json +56653 -0
- package/dist/shared/api/pages.d.ts +10 -0
- package/dist/shared/api/pages.js +1 -0
- package/dist/shared/api/people.d.ts +9 -0
- package/dist/shared/api/people.js +1 -0
- package/dist/shared/api/platform.d.ts +4 -0
- package/dist/shared/api/platform.js +1 -0
- package/dist/shared/api/playbooks.d.ts +68 -0
- package/dist/shared/api/playbooks.js +1 -0
- package/dist/shared/api/preferences.d.ts +17 -0
- package/dist/shared/api/preferences.js +1 -0
- package/dist/shared/api/reference.d.ts +8 -0
- package/dist/shared/api/reference.js +2 -0
- package/dist/shared/api/roles.d.ts +19 -0
- package/dist/shared/api/roles.js +1 -0
- package/dist/shared/api/run-settings.d.ts +10 -0
- package/dist/shared/api/run-settings.js +1 -0
- package/dist/shared/api/session.d.ts +22 -0
- package/dist/shared/api/session.js +1 -0
- package/dist/shared/api/tasks.d.ts +590 -0
- package/dist/shared/api/tasks.js +1 -0
- package/dist/shared/api/tenants.d.ts +25 -0
- package/dist/shared/api/tenants.js +1 -0
- package/dist/shared/api/users.d.ts +50 -0
- package/dist/shared/api/users.js +1 -0
- package/dist/shared/api/workflow-designs.d.ts +27 -0
- package/dist/shared/api/workflow-designs.js +1 -0
- package/dist/shared/api/workflow-packs.d.ts +417 -0
- package/dist/shared/api/workflow-packs.js +1 -0
- package/dist/shared/assets/avatars/300-1.png +0 -0
- package/dist/shared/assets/avatars/300-10.png +0 -0
- package/dist/shared/assets/avatars/300-11.png +0 -0
- package/dist/shared/assets/avatars/300-12.png +0 -0
- package/dist/shared/assets/avatars/300-13.png +0 -0
- package/dist/shared/assets/avatars/300-14.png +0 -0
- package/dist/shared/assets/avatars/300-15.png +0 -0
- package/dist/shared/assets/avatars/300-16.png +0 -0
- package/dist/shared/assets/avatars/300-17.png +0 -0
- package/dist/shared/assets/avatars/300-18.png +0 -0
- package/dist/shared/assets/avatars/300-19.png +0 -0
- package/dist/shared/assets/avatars/300-2.png +0 -0
- package/dist/shared/assets/avatars/300-20.png +0 -0
- package/dist/shared/assets/avatars/300-21.png +0 -0
- package/dist/shared/assets/avatars/300-22.png +0 -0
- package/dist/shared/assets/avatars/300-23.png +0 -0
- package/dist/shared/assets/avatars/300-24.png +0 -0
- package/dist/shared/assets/avatars/300-25.png +0 -0
- package/dist/shared/assets/avatars/300-26.png +0 -0
- package/dist/shared/assets/avatars/300-27.png +0 -0
- package/dist/shared/assets/avatars/300-28.png +0 -0
- package/dist/shared/assets/avatars/300-29.png +0 -0
- package/dist/shared/assets/avatars/300-3.png +0 -0
- package/dist/shared/assets/avatars/300-30.png +0 -0
- package/dist/shared/assets/avatars/300-31.png +0 -0
- package/dist/shared/assets/avatars/300-32.png +0 -0
- package/dist/shared/assets/avatars/300-33.png +0 -0
- package/dist/shared/assets/avatars/300-34.png +0 -0
- package/dist/shared/assets/avatars/300-4.png +0 -0
- package/dist/shared/assets/avatars/300-5.png +0 -0
- package/dist/shared/assets/avatars/300-6.png +0 -0
- package/dist/shared/assets/avatars/300-7.png +0 -0
- package/dist/shared/assets/avatars/300-8.png +0 -0
- package/dist/shared/assets/avatars/300-9.png +0 -0
- package/dist/shared/assets/avatars/blank.png +0 -0
- package/dist/shared/assets/avatars/gray-1.png +0 -0
- package/dist/shared/assets/avatars/gray-2.png +0 -0
- package/dist/shared/assets/avatars/gray-3.png +0 -0
- package/dist/shared/assets/avatars/gray-4.png +0 -0
- package/dist/shared/assets/avatars/gray-5.png +0 -0
- package/dist/shared/assets/platform-mark-white.png +0 -0
- package/dist/shared/assets/platform-mark.png +0 -0
- package/dist/shared/auth/SessionProvider.d.ts +4 -0
- package/dist/shared/auth/SessionProvider.js +1 -0
- package/dist/shared/auth/login-tenant.d.ts +5 -0
- package/dist/shared/auth/login-tenant.js +1 -0
- package/dist/shared/auth/page-access.d.ts +348 -0
- package/dist/shared/auth/page-access.js +1 -0
- package/dist/shared/auth/permissions.d.ts +3 -0
- package/dist/shared/auth/permissions.js +1 -0
- package/dist/shared/auth/session-context.d.ts +20 -0
- package/dist/shared/auth/session-context.js +1 -0
- package/dist/shared/auth/workspaces.d.ts +39 -0
- package/dist/shared/auth/workspaces.js +1 -0
- package/dist/shared/components/canvas/EdgeDeleteButton.d.ts +6 -0
- package/dist/shared/components/canvas/EdgeDeleteButton.js +1 -0
- package/dist/shared/components/charts/charts.d.ts +49 -0
- package/dist/shared/components/charts/charts.js +1 -0
- package/dist/shared/components/charts/exposure-scale.d.ts +8 -0
- package/dist/shared/components/charts/exposure-scale.js +1 -0
- package/dist/shared/components/charts/more-charts.d.ts +55 -0
- package/dist/shared/components/charts/more-charts.js +1 -0
- package/dist/shared/components/charts/use-am-chart.d.ts +25 -0
- package/dist/shared/components/charts/use-am-chart.js +1 -0
- package/dist/shared/components/documents/DocumentPreview.d.ts +23 -0
- package/dist/shared/components/documents/DocumentPreview.js +1 -0
- package/dist/shared/components/documents/ExtractionWorkspace.d.ts +22 -0
- package/dist/shared/components/documents/ExtractionWorkspace.js +1 -0
- package/dist/shared/components/documents/PdfPage.d.ts +14 -0
- package/dist/shared/components/documents/PdfPage.js +1 -0
- package/dist/shared/components/documents/extraction-fields.d.ts +25 -0
- package/dist/shared/components/documents/extraction-fields.js +1 -0
- package/dist/shared/components/documents/source-markers.d.ts +10 -0
- package/dist/shared/components/documents/source-markers.js +1 -0
- package/dist/shared/components/layout/.gitkeep +0 -0
- package/dist/shared/components/layout/AccountMenu.d.ts +5 -0
- package/dist/shared/components/layout/AccountMenu.js +1 -0
- package/dist/shared/components/layout/AppShell.d.ts +4 -0
- package/dist/shared/components/layout/AppShell.js +1 -0
- package/dist/shared/components/layout/AvatarPicker.d.ts +7 -0
- package/dist/shared/components/layout/AvatarPicker.js +1 -0
- package/dist/shared/components/layout/Brand.d.ts +10 -0
- package/dist/shared/components/layout/Brand.js +1 -0
- package/dist/shared/components/layout/ErrorNotice.d.ts +8 -0
- package/dist/shared/components/layout/ErrorNotice.js +1 -0
- package/dist/shared/components/layout/FavoritesMenu.d.ts +6 -0
- package/dist/shared/components/layout/FavoritesMenu.js +1 -0
- package/dist/shared/components/layout/ImpersonationBadge.d.ts +2 -0
- package/dist/shared/components/layout/ImpersonationBadge.js +1 -0
- package/dist/shared/components/layout/PageBoundary.d.ts +10 -0
- package/dist/shared/components/layout/PageBoundary.js +2 -0
- package/dist/shared/components/layout/PageCrumbProvider.d.ts +5 -0
- package/dist/shared/components/layout/PageCrumbProvider.js +1 -0
- package/dist/shared/components/layout/PreferencesDialog.d.ts +12 -0
- package/dist/shared/components/layout/PreferencesDialog.js +1 -0
- package/dist/shared/components/layout/PreferredToaster.d.ts +5 -0
- package/dist/shared/components/layout/PreferredToaster.js +1 -0
- package/dist/shared/components/layout/ScrollToTop.d.ts +5 -0
- package/dist/shared/components/layout/ScrollToTop.js +1 -0
- package/dist/shared/components/layout/SidebarContent.d.ts +9 -0
- package/dist/shared/components/layout/SidebarContent.js +1 -0
- package/dist/shared/components/layout/SiriusLogo.d.ts +5 -0
- package/dist/shared/components/layout/SiriusLogo.js +1 -0
- package/dist/shared/components/layout/ThemeToggle.d.ts +1 -0
- package/dist/shared/components/layout/ThemeToggle.js +1 -0
- package/dist/shared/components/layout/TopMenu.d.ts +7 -0
- package/dist/shared/components/layout/TopMenu.js +1 -0
- package/dist/shared/components/layout/UserAvatar.d.ts +6 -0
- package/dist/shared/components/layout/UserAvatar.js +1 -0
- package/dist/shared/components/layout/navigation.d.ts +129 -0
- package/dist/shared/components/layout/navigation.js +1 -0
- package/dist/shared/components/layout/page-crumb.d.ts +8 -0
- package/dist/shared/components/layout/page-crumb.js +1 -0
- package/dist/shared/components/layout/useImpersonation.d.ts +29 -0
- package/dist/shared/components/layout/useImpersonation.js +1 -0
- package/dist/shared/components/layout/useNavigationModules.d.ts +7 -0
- package/dist/shared/components/layout/useNavigationModules.js +1 -0
- package/dist/shared/components/reui/alert.d.ts +9 -0
- package/dist/shared/components/reui/alert.js +1 -0
- package/dist/shared/components/sign-in/SignInStory.d.ts +19 -0
- package/dist/shared/components/sign-in/SignInStory.js +1 -0
- package/dist/shared/components/sign-in/sign-in-content.d.ts +9 -0
- package/dist/shared/components/sign-in/sign-in-content.js +1 -0
- package/dist/shared/components/ui/badge.d.ts +7 -0
- package/dist/shared/components/ui/badge.js +1 -0
- package/dist/shared/components/ui/button.d.ts +8 -0
- package/dist/shared/components/ui/button.js +1 -0
- package/dist/shared/components/ui/chart.d.ts +44 -0
- package/dist/shared/components/ui/chart.js +7 -0
- package/dist/shared/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/shared/components/ui/dropdown-menu.js +1 -0
- package/dist/shared/components/ui/input.d.ts +3 -0
- package/dist/shared/components/ui/input.js +1 -0
- package/dist/shared/components/ui/sonner.d.ts +3 -0
- package/dist/shared/components/ui/sonner.js +1 -0
- package/dist/shared/components/ui/switch.d.ts +5 -0
- package/dist/shared/components/ui/switch.js +1 -0
- package/dist/shared/components/ui/textarea.d.ts +3 -0
- package/dist/shared/components/ui/textarea.js +1 -0
- package/dist/shared/components/workspace/BackLink.d.ts +15 -0
- package/dist/shared/components/workspace/BackLink.js +1 -0
- package/dist/shared/components/workspace/CatalogCombobox.d.ts +18 -0
- package/dist/shared/components/workspace/CatalogCombobox.js +1 -0
- package/dist/shared/components/workspace/ChooseTenant.d.ts +4 -0
- package/dist/shared/components/workspace/ChooseTenant.js +1 -0
- package/dist/shared/components/workspace/ClassificationPill.d.ts +15 -0
- package/dist/shared/components/workspace/ClassificationPill.js +1 -0
- package/dist/shared/components/workspace/ColumnResizer.d.ts +12 -0
- package/dist/shared/components/workspace/ColumnResizer.js +1 -0
- package/dist/shared/components/workspace/ConditionRows.d.ts +33 -0
- package/dist/shared/components/workspace/ConditionRows.js +1 -0
- package/dist/shared/components/workspace/ConfirmButton.d.ts +26 -0
- package/dist/shared/components/workspace/ConfirmButton.js +1 -0
- package/dist/shared/components/workspace/ConfirmDialog.d.ts +21 -0
- package/dist/shared/components/workspace/ConfirmDialog.js +1 -0
- package/dist/shared/components/workspace/ControlHeader.d.ts +29 -0
- package/dist/shared/components/workspace/ControlHeader.js +1 -0
- package/dist/shared/components/workspace/CopyValue.d.ts +7 -0
- package/dist/shared/components/workspace/CopyValue.js +1 -0
- package/dist/shared/components/workspace/CreateWorkButton.d.ts +5 -0
- package/dist/shared/components/workspace/CreateWorkButton.js +1 -0
- package/dist/shared/components/workspace/DataTable.d.ts +29 -0
- package/dist/shared/components/workspace/DataTable.js +1 -0
- package/dist/shared/components/workspace/DeletePack.d.ts +13 -0
- package/dist/shared/components/workspace/DeletePack.js +1 -0
- package/dist/shared/components/workspace/EnabledSwitch.d.ts +11 -0
- package/dist/shared/components/workspace/EnabledSwitch.js +1 -0
- package/dist/shared/components/workspace/GridColumnSettings.d.ts +12 -0
- package/dist/shared/components/workspace/GridColumnSettings.js +1 -0
- package/dist/shared/components/workspace/GridHeader.d.ts +12 -0
- package/dist/shared/components/workspace/GridHeader.js +1 -0
- package/dist/shared/components/workspace/GridOptions.d.ts +49 -0
- package/dist/shared/components/workspace/GridOptions.js +1 -0
- package/dist/shared/components/workspace/GridPreferenceProvider.d.ts +8 -0
- package/dist/shared/components/workspace/GridPreferenceProvider.js +1 -0
- package/dist/shared/components/workspace/GridSortSelect.d.ts +11 -0
- package/dist/shared/components/workspace/GridSortSelect.js +1 -0
- package/dist/shared/components/workspace/JsonEditor.d.ts +14 -0
- package/dist/shared/components/workspace/JsonEditor.js +1 -0
- package/dist/shared/components/workspace/JsonField.d.ts +12 -0
- package/dist/shared/components/workspace/JsonField.js +1 -0
- package/dist/shared/components/workspace/Modal.d.ts +10 -0
- package/dist/shared/components/workspace/Modal.js +1 -0
- package/dist/shared/components/workspace/MoreMenu.d.ts +11 -0
- package/dist/shared/components/workspace/MoreMenu.js +1 -0
- package/dist/shared/components/workspace/NumberInput.d.ts +14 -0
- package/dist/shared/components/workspace/NumberInput.js +1 -0
- package/dist/shared/components/workspace/PageActions.d.ts +9 -0
- package/dist/shared/components/workspace/PageActions.js +1 -0
- package/dist/shared/components/workspace/PageActionsProvider.d.ts +5 -0
- package/dist/shared/components/workspace/PageActionsProvider.js +1 -0
- package/dist/shared/components/workspace/PageTabs.d.ts +15 -0
- package/dist/shared/components/workspace/PageTabs.js +1 -0
- package/dist/shared/components/workspace/Pager.d.ts +14 -0
- package/dist/shared/components/workspace/Pager.js +1 -0
- package/dist/shared/components/workspace/PersonName.d.ts +18 -0
- package/dist/shared/components/workspace/PersonName.js +1 -0
- package/dist/shared/components/workspace/RefreshButton.d.ts +11 -0
- package/dist/shared/components/workspace/RefreshButton.js +1 -0
- package/dist/shared/components/workspace/RunSettingsFields.d.ts +15 -0
- package/dist/shared/components/workspace/RunSettingsFields.js +1 -0
- package/dist/shared/components/workspace/SearchInput.d.ts +13 -0
- package/dist/shared/components/workspace/SearchInput.js +1 -0
- package/dist/shared/components/workspace/SegmentedControl.d.ts +17 -0
- package/dist/shared/components/workspace/SegmentedControl.js +1 -0
- package/dist/shared/components/workspace/SettingsFeedback.d.ts +5 -0
- package/dist/shared/components/workspace/SettingsFeedback.js +1 -0
- package/dist/shared/components/workspace/SidePanel.d.ts +21 -0
- package/dist/shared/components/workspace/SidePanel.js +1 -0
- package/dist/shared/components/workspace/SortHeader.d.ts +16 -0
- package/dist/shared/components/workspace/SortHeader.js +1 -0
- package/dist/shared/components/workspace/SplitButton.d.ts +28 -0
- package/dist/shared/components/workspace/SplitButton.js +1 -0
- package/dist/shared/components/workspace/StatStrip.d.ts +15 -0
- package/dist/shared/components/workspace/StatStrip.js +1 -0
- package/dist/shared/components/workspace/ToneChip.d.ts +9 -0
- package/dist/shared/components/workspace/ToneChip.js +1 -0
- package/dist/shared/components/workspace/ViewToggle.d.ts +6 -0
- package/dist/shared/components/workspace/ViewToggle.js +1 -0
- package/dist/shared/components/workspace/WorkspaceTabStrip.d.ts +22 -0
- package/dist/shared/components/workspace/WorkspaceTabStrip.js +1 -0
- package/dist/shared/components/workspace/activity/BlockBoundary.d.ts +15 -0
- package/dist/shared/components/workspace/activity/BlockBoundary.js +1 -0
- package/dist/shared/components/workspace/activity/BlockCard.d.ts +9 -0
- package/dist/shared/components/workspace/activity/BlockCard.js +1 -0
- package/dist/shared/components/workspace/activity/ComponentPalette.d.ts +8 -0
- package/dist/shared/components/workspace/activity/ComponentPalette.js +1 -0
- package/dist/shared/components/workspace/activity/PagePreview.d.ts +6 -0
- package/dist/shared/components/workspace/activity/PagePreview.js +1 -0
- package/dist/shared/components/workspace/activity/PageView.d.ts +17 -0
- package/dist/shared/components/workspace/activity/PageView.js +1 -0
- package/dist/shared/components/workspace/activity/bindings.d.ts +14 -0
- package/dist/shared/components/workspace/activity/bindings.js +1 -0
- package/dist/shared/components/workspace/activity/categories.d.ts +7 -0
- package/dist/shared/components/workspace/activity/categories.js +1 -0
- package/dist/shared/components/workspace/activity/data.d.ts +32 -0
- package/dist/shared/components/workspace/activity/data.js +1 -0
- package/dist/shared/components/workspace/activity/docs.d.ts +15 -0
- package/dist/shared/components/workspace/activity/docs.js +1 -0
- package/dist/shared/components/workspace/activity/kinds/content.d.ts +28 -0
- package/dist/shared/components/workspace/activity/kinds/content.js +1 -0
- package/dist/shared/components/workspace/activity/kinds/decision.d.ts +70 -0
- package/dist/shared/components/workspace/activity/kinds/decision.js +1 -0
- package/dist/shared/components/workspace/activity/kinds/insight.d.ts +41 -0
- package/dist/shared/components/workspace/activity/kinds/insight.js +1 -0
- package/dist/shared/components/workspace/activity/kinds/page.d.ts +77 -0
- package/dist/shared/components/workspace/activity/kinds/page.js +1 -0
- package/dist/shared/components/workspace/activity/kinds/records.d.ts +95 -0
- package/dist/shared/components/workspace/activity/kinds/records.js +1 -0
- package/dist/shared/components/workspace/activity/kinds/review.d.ts +86 -0
- package/dist/shared/components/workspace/activity/kinds/review.js +1 -0
- package/dist/shared/components/workspace/activity/kinds/summary.d.ts +70 -0
- package/dist/shared/components/workspace/activity/kinds/summary.js +1 -0
- package/dist/shared/components/workspace/activity/kinds/visual.d.ts +53 -0
- package/dist/shared/components/workspace/activity/kinds/visual.js +1 -0
- package/dist/shared/components/workspace/activity/manifests.d.ts +29 -0
- package/dist/shared/components/workspace/activity/manifests.js +1 -0
- package/dist/shared/components/workspace/activity/page.d.ts +69 -0
- package/dist/shared/components/workspace/activity/page.js +1 -0
- package/dist/shared/components/workspace/activity/parts.d.ts +18 -0
- package/dist/shared/components/workspace/activity/parts.js +1 -0
- package/dist/shared/components/workspace/activity/registry.d.ts +46 -0
- package/dist/shared/components/workspace/activity/registry.js +1 -0
- package/dist/shared/components/workspace/activity/row-actions.d.ts +3 -0
- package/dist/shared/components/workspace/activity/row-actions.js +1 -0
- package/dist/shared/components/workspace/activity/samples.d.ts +36 -0
- package/dist/shared/components/workspace/activity/samples.js +19 -0
- package/dist/shared/components/workspace/activity/slot.d.ts +4 -0
- package/dist/shared/components/workspace/activity/slot.js +1 -0
- package/dist/shared/components/workspace/activity/styles.d.ts +16 -0
- package/dist/shared/components/workspace/activity/styles.js +1 -0
- package/dist/shared/components/workspace/activity/types.d.ts +41 -0
- package/dist/shared/components/workspace/activity/types.js +1 -0
- package/dist/shared/components/workspace/column-fields.d.ts +4 -0
- package/dist/shared/components/workspace/column-fields.js +1 -0
- package/dist/shared/components/workspace/columnSizing.d.ts +25 -0
- package/dist/shared/components/workspace/columnSizing.js +1 -0
- package/dist/shared/components/workspace/header-favorite.d.ts +4 -0
- package/dist/shared/components/workspace/header-favorite.js +1 -0
- package/dist/shared/components/workspace/insight-grid/InsightGrid.d.ts +48 -0
- package/dist/shared/components/workspace/insight-grid/InsightGrid.js +1 -0
- package/dist/shared/components/workspace/insight-grid/Sparkline.d.ts +16 -0
- package/dist/shared/components/workspace/insight-grid/Sparkline.js +1 -0
- package/dist/shared/components/workspace/insight-grid/index.d.ts +3 -0
- package/dist/shared/components/workspace/insight-grid/index.js +1 -0
- package/dist/shared/components/workspace/insight-grid/trend.d.ts +9 -0
- package/dist/shared/components/workspace/insight-grid/trend.js +1 -0
- package/dist/shared/components/workspace/layouts/Choice.d.ts +7 -0
- package/dist/shared/components/workspace/layouts/Choice.js +1 -0
- package/dist/shared/components/workspace/layouts/LayoutCanvas.d.ts +41 -0
- package/dist/shared/components/workspace/layouts/LayoutCanvas.js +1 -0
- package/dist/shared/components/workspace/layouts/LayoutFrame.d.ts +13 -0
- package/dist/shared/components/workspace/layouts/LayoutFrame.js +1 -0
- package/dist/shared/components/workspace/layouts/LayoutGlyph.d.ts +6 -0
- package/dist/shared/components/workspace/layouts/LayoutGlyph.js +1 -0
- package/dist/shared/components/workspace/layouts/LayoutPalette.d.ts +9 -0
- package/dist/shared/components/workspace/layouts/LayoutPalette.js +1 -0
- package/dist/shared/components/workspace/layouts/LayoutSettings.d.ts +6 -0
- package/dist/shared/components/workspace/layouts/LayoutSettings.js +1 -0
- package/dist/shared/components/workspace/layouts/LayoutView.d.ts +10 -0
- package/dist/shared/components/workspace/layouts/LayoutView.js +1 -0
- package/dist/shared/components/workspace/layouts/Palette.d.ts +23 -0
- package/dist/shared/components/workspace/layouts/Palette.js +1 -0
- package/dist/shared/components/workspace/layouts/PlaceSettings.d.ts +9 -0
- package/dist/shared/components/workspace/layouts/PlaceSettings.js +1 -0
- package/dist/shared/components/workspace/layouts/catalog.d.ts +128 -0
- package/dist/shared/components/workspace/layouts/catalog.js +1 -0
- package/dist/shared/components/workspace/layouts/model.d.ts +55 -0
- package/dist/shared/components/workspace/layouts/model.js +1 -0
- package/dist/shared/components/workspace/layouts/problems.d.ts +4 -0
- package/dist/shared/components/workspace/layouts/problems.js +1 -0
- package/dist/shared/components/workspace/layouts/tree.d.ts +41 -0
- package/dist/shared/components/workspace/layouts/tree.js +1 -0
- package/dist/shared/components/workspace/open-tabs.d.ts +22 -0
- package/dist/shared/components/workspace/open-tabs.js +1 -0
- package/dist/shared/components/workspace/page-actions.d.ts +6 -0
- package/dist/shared/components/workspace/page-actions.js +1 -0
- package/dist/shared/components/workspace/page-builder/BlockEditor.d.ts +18 -0
- package/dist/shared/components/workspace/page-builder/BlockEditor.js +1 -0
- package/dist/shared/components/workspace/page-builder/DataPalette.d.ts +8 -0
- package/dist/shared/components/workspace/page-builder/DataPalette.js +1 -0
- package/dist/shared/components/workspace/page-builder/NodeSettings.d.ts +18 -0
- package/dist/shared/components/workspace/page-builder/NodeSettings.js +1 -0
- package/dist/shared/components/workspace/page-builder/PageComposer.d.ts +16 -0
- package/dist/shared/components/workspace/page-builder/PageComposer.js +1 -0
- package/dist/shared/components/workspace/page-builder/PagePalette.d.ts +14 -0
- package/dist/shared/components/workspace/page-builder/PagePalette.js +1 -0
- package/dist/shared/components/workspace/page-builder/TemplatesPanel.d.ts +7 -0
- package/dist/shared/components/workspace/page-builder/TemplatesPanel.js +1 -0
- package/dist/shared/components/workspace/page-builder/blocks.d.ts +25 -0
- package/dist/shared/components/workspace/page-builder/blocks.js +1 -0
- package/dist/shared/components/workspace/playbook/Playbook.d.ts +20 -0
- package/dist/shared/components/workspace/playbook/Playbook.js +1 -0
- package/dist/shared/components/workspace/playbook/RecordHeader.d.ts +34 -0
- package/dist/shared/components/workspace/playbook/RecordHeader.js +1 -0
- package/dist/shared/components/workspace/playbook/RecordTabs.d.ts +14 -0
- package/dist/shared/components/workspace/playbook/RecordTabs.js +1 -0
- package/dist/shared/components/workspace/playbook/TaskPanel.d.ts +18 -0
- package/dist/shared/components/workspace/playbook/TaskPanel.js +1 -0
- package/dist/shared/components/workspace/playbook/ui.d.ts +105 -0
- package/dist/shared/components/workspace/playbook/ui.js +1 -0
- package/dist/shared/components/workspace/playbook-runs/ActivityPage.d.ts +7 -0
- package/dist/shared/components/workspace/playbook-runs/ActivityPage.js +1 -0
- package/dist/shared/components/workspace/playbook-runs/PlaybookRunView.d.ts +10 -0
- package/dist/shared/components/workspace/playbook-runs/PlaybookRunView.js +1 -0
- package/dist/shared/components/workspace/tab-styles.d.ts +4 -0
- package/dist/shared/components/workspace/tab-styles.js +1 -0
- package/dist/shared/components/workspace/templates/CaseTemplate.d.ts +47 -0
- package/dist/shared/components/workspace/templates/CaseTemplate.js +1 -0
- package/dist/shared/components/workspace/templates/EventNote.d.ts +5 -0
- package/dist/shared/components/workspace/templates/EventNote.js +1 -0
- package/dist/shared/components/workspace/templates/PageTemplatePreview.d.ts +6 -0
- package/dist/shared/components/workspace/templates/PageTemplatePreview.js +1 -0
- package/dist/shared/components/workspace/templates/QueueTemplate.d.ts +11 -0
- package/dist/shared/components/workspace/templates/QueueTemplate.js +1 -0
- package/dist/shared/components/workspace/templates/TaskTemplate.d.ts +27 -0
- package/dist/shared/components/workspace/templates/TaskTemplate.js +1 -0
- package/dist/shared/components/workspace/templates/definitions.d.ts +35 -0
- package/dist/shared/components/workspace/templates/definitions.js +1 -0
- package/dist/shared/components/workspace/templates/page-templates.d.ts +12 -0
- package/dist/shared/components/workspace/templates/page-templates.js +1 -0
- package/dist/shared/components/workspace/templates/steps.d.ts +10 -0
- package/dist/shared/components/workspace/templates/steps.js +1 -0
- package/dist/shared/config/env.d.ts +13 -0
- package/dist/shared/config/env.js +1 -0
- package/dist/shared/config/platform-brand.d.ts +12 -0
- package/dist/shared/config/platform-brand.js +1 -0
- package/dist/shared/extension-points/app-blocks.d.ts +19 -0
- package/dist/shared/extension-points/app-blocks.js +1 -0
- package/dist/shared/extension-points/app-module.d.ts +17 -0
- package/dist/shared/extension-points/app-module.js +1 -0
- package/dist/shared/extension-points/box-module.d.ts +22 -0
- package/dist/shared/extension-points/box-module.js +1 -0
- package/dist/shared/hooks/.gitkeep +0 -0
- package/dist/shared/hooks/useApplications.d.ts +20 -0
- package/dist/shared/hooks/useApplications.js +1 -0
- package/dist/shared/hooks/useBranding.d.ts +26 -0
- package/dist/shared/hooks/useBranding.js +1 -0
- package/dist/shared/hooks/useDarkTheme.d.ts +2 -0
- package/dist/shared/hooks/useDarkTheme.js +1 -0
- package/dist/shared/hooks/useDebouncedValue.d.ts +2 -0
- package/dist/shared/hooks/useDebouncedValue.js +1 -0
- package/dist/shared/hooks/useFlowTables.d.ts +5 -0
- package/dist/shared/hooks/useFlowTables.js +1 -0
- package/dist/shared/hooks/useGoBack.d.ts +9 -0
- package/dist/shared/hooks/useGoBack.js +1 -0
- package/dist/shared/hooks/useGrid.d.ts +87 -0
- package/dist/shared/hooks/useGrid.js +1 -0
- package/dist/shared/hooks/useGridPreference.d.ts +38 -0
- package/dist/shared/hooks/useGridPreference.js +1 -0
- package/dist/shared/hooks/useMailboxes.d.ts +19 -0
- package/dist/shared/hooks/useMailboxes.js +1 -0
- package/dist/shared/hooks/usePacks.d.ts +161 -0
- package/dist/shared/hooks/usePacks.js +1 -0
- package/dist/shared/hooks/usePersonNames.d.ts +11 -0
- package/dist/shared/hooks/usePersonNames.js +1 -0
- package/dist/shared/hooks/usePreferences.d.ts +28 -0
- package/dist/shared/hooks/usePreferences.js +1 -0
- package/dist/shared/hooks/useProfileSignIn.d.ts +14 -0
- package/dist/shared/hooks/useProfileSignIn.js +1 -0
- package/dist/shared/hooks/useSidebarPreference.d.ts +12 -0
- package/dist/shared/hooks/useSidebarPreference.js +1 -0
- package/dist/shared/hooks/useTenantScope.d.ts +25 -0
- package/dist/shared/hooks/useTenantScope.js +1 -0
- package/dist/shared/hooks/useTheme.d.ts +7 -0
- package/dist/shared/hooks/useTheme.js +1 -0
- package/dist/shared/hooks/useViewMode.d.ts +3 -0
- package/dist/shared/hooks/useViewMode.js +1 -0
- package/dist/shared/lib/avatars.d.ts +7 -0
- package/dist/shared/lib/avatars.js +1 -0
- package/dist/shared/lib/brand-theme.d.ts +39 -0
- package/dist/shared/lib/brand-theme.js +2 -0
- package/dist/shared/lib/cron.d.ts +6 -0
- package/dist/shared/lib/cron.js +1 -0
- package/dist/shared/lib/csv.d.ts +3 -0
- package/dist/shared/lib/csv.js +2 -0
- package/dist/shared/lib/datetime.d.ts +26 -0
- package/dist/shared/lib/datetime.js +1 -0
- package/dist/shared/lib/format.d.ts +10 -0
- package/dist/shared/lib/format.js +1 -0
- package/dist/shared/lib/greeting.d.ts +5 -0
- package/dist/shared/lib/greeting.js +1 -0
- package/dist/shared/lib/initials.d.ts +2 -0
- package/dist/shared/lib/initials.js +1 -0
- package/dist/shared/lib/intents.d.ts +2 -0
- package/dist/shared/lib/intents.js +1 -0
- package/dist/shared/lib/json-format.d.ts +2 -0
- package/dist/shared/lib/json-format.js +1 -0
- package/dist/shared/lib/mailbox-types.d.ts +9 -0
- package/dist/shared/lib/mailbox-types.js +1 -0
- package/dist/shared/lib/notify.d.ts +23 -0
- package/dist/shared/lib/notify.js +1 -0
- package/dist/shared/lib/person-name.d.ts +18 -0
- package/dist/shared/lib/person-name.js +1 -0
- package/dist/shared/lib/received-at.d.ts +3 -0
- package/dist/shared/lib/received-at.js +1 -0
- package/dist/shared/lib/return-to.d.ts +6 -0
- package/dist/shared/lib/return-to.js +1 -0
- package/dist/shared/lib/search.d.ts +10 -0
- package/dist/shared/lib/search.js +1 -0
- package/dist/shared/lib/slug.d.ts +2 -0
- package/dist/shared/lib/slug.js +1 -0
- package/dist/shared/lib/stale-bundle.d.ts +2 -0
- package/dist/shared/lib/stale-bundle.js +1 -0
- package/dist/shared/lib/status-tones.d.ts +14 -0
- package/dist/shared/lib/status-tones.js +1 -0
- package/dist/shared/lib/task-classes.d.ts +5 -0
- package/dist/shared/lib/task-classes.js +1 -0
- package/dist/shared/lib/utils.d.ts +1 -0
- package/dist/shared/lib/utils.js +1 -0
- package/dist/shared/lib/uuid7.d.ts +2 -0
- package/dist/shared/lib/uuid7.js +1 -0
- package/dist/shared/styles/metronic-layout.css +59 -0
- package/dist/shared/styles/motion.css +55 -0
- package/dist/shared/styles/platform-look.css +195 -0
- package/dist/shared/styles/sign-in.css +24 -0
- package/dist/shared/styles/workspace.css +146 -0
- package/dist/vite-env.d.ts +18 -0
- package/dist/vite.js +2 -0
- package/package.json +54 -4
package/README.md
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sirius UI core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The base of every Sirius UI: the app shell and start-up, sign-in, homes, users, tenants, access, events, logging, menus, the API reference and the `siriusBoxes` Vite plugin.
|
|
4
|
+
|
|
5
|
+
`@ssiriuss/core` is one of the five Sirius UI packages.
|
|
6
|
+
|
|
7
|
+
## What's inside
|
|
8
|
+
|
|
9
|
+
- **The app shell**: sign-in, tenant sign-in, workspace and role homes, system status, password change, route guards.
|
|
10
|
+
- **Pages**: events, users, tenants, access, logging, menus, API reference.
|
|
11
|
+
- **Shared code** the other packages use: the API client and generated contract types, auth, components (shadcn/ui), hooks, formatting.
|
|
12
|
+
- **`@ssiriuss/core/vite`**: the `siriusBoxes` plugin that assembles the installed packages.
|
|
13
|
+
- **Extension points**: `AppModule` for your own applications (routes, page blocks, menu entries) and `BoxModule` for packages.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
React 19, Vite and Tailwind CSS 4. List core and every package you use (your code imports
|
|
18
|
+
core directly):
|
|
19
|
+
|
|
20
|
+
```shell
|
|
21
|
+
npm install @ssiriuss/core
|
|
22
|
+
npm install -D vite @vitejs/plugin-react @tailwindcss/vite typescript
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`vite.config.ts`:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
29
|
+
import react from '@vitejs/plugin-react'
|
|
30
|
+
import { defineConfig } from 'vite'
|
|
31
|
+
import { siriusBoxes } from '@ssiriuss/core/vite'
|
|
32
|
+
|
|
33
|
+
export default defineConfig({ plugins: [siriusBoxes(import.meta.dirname), react(), tailwindcss()] })
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`src/main.tsx`:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { startSirius } from '@/app/start'
|
|
40
|
+
|
|
41
|
+
startSirius([]) // your own application modules: routes, page blocks, menu entries
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`siriusBoxes` finds the installed `@ssiriuss/*` packages, resolves `@/` imports across
|
|
45
|
+
them, and gives core's shell their pages. In `tsconfig.json`, map `@/*` to
|
|
46
|
+
`./node_modules/@ssiriuss/<package>/dist/*` for each installed package, then `./src/*`.
|
|
47
|
+
The app needs the Sirius API running (the `siriuss-*` Python packages).
|
|
48
|
+
|
|
49
|
+
## The Sirius UI packages
|
|
50
|
+
|
|
51
|
+
Sirius is a platform for building business applications. The UI is a React app made of
|
|
52
|
+
five packages that match the Python packages of the Sirius API (`siriuss-*`) and talk to
|
|
53
|
+
its `/api/v1` only. Install only what you need; each package brings the ones it is built on.
|
|
54
|
+
|
|
55
|
+
| Package | What it adds | Built on |
|
|
56
|
+
| ---------------------- | ------------------------------------------------------------------------------ | -------- |
|
|
57
|
+
| `@ssiriuss/core` | the app shell, sign-in, users, tenants, access, events, menus, the Vite plugin | (base) |
|
|
58
|
+
| `@ssiriuss/connectors` | Integration Studio, mailboxes | core |
|
|
59
|
+
| `@ssiriuss/ai` | AI Studio, control tower, agent and analyzer designers | core |
|
|
60
|
+
| `@ssiriuss/builder` | component library, pages, playbooks, flows, tables, tasks, human tasks | core |
|
|
61
|
+
| `@ssiriuss/intake` | workbench, inbox, AI insights, document queue | all four |
|
|
62
|
+
|
|
63
|
+
Each package registers its own pages; core's shell shows the pages of the packages that
|
|
64
|
+
are installed, and nothing of the ones that are not.
|
|
65
|
+
|
|
66
|
+
## Status
|
|
67
|
+
|
|
68
|
+
Pre-release (`0.0.x`): pages and extension points may still change between versions.
|
|
69
|
+
All five packages are released together with the same version.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AppModule } from '@/shared/extension-points/app-module';
|
|
2
|
+
import type { BoxModule } from '@/shared/extension-points/box-module';
|
|
3
|
+
export declare function App({ apps, boxes, }: {
|
|
4
|
+
apps?: readonly AppModule[];
|
|
5
|
+
/** The installed packages; tests may pass their own. */
|
|
6
|
+
boxes?: readonly BoxModule[];
|
|
7
|
+
}): import("react").JSX.Element;
|
package/dist/app/App.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{lazy as e,Suspense as t,useMemo as n}from"react";import{Navigate as r,Route as i,Routes as a}from"react-router-dom";import{BOXES as o}from"virtual:siriuss-boxes";import{pageAccess as s}from"@/shared/auth/page-access";import{SessionProvider as c}from"@/shared/auth/SessionProvider";import{PreferredToaster as l}from"@/shared/components/layout/PreferredToaster";import{AppBlocks as u}from"@/shared/extension-points/app-blocks";import{Moved as d}from"./Moved";import{movedPaths as f,paths as p}from"@/app/paths";import{RequireAccess as m}from"./RequireAccess";import{jsx as h,jsxs as g}from"react/jsx-runtime";const _=(e,t)=>e?h(m,{access:e,children:t}):t,v=e(()=>import(`./WorkspaceRoutes`).then(e=>({default:e.AuthenticatedWorkspace}))),y=e(()=>import(`./WorkspaceRoutes`).then(e=>({default:e.DefaultHome}))),b=e(()=>import(`./WorkspaceRoutes`).then(e=>({default:e.RoleHome}))),x=e(()=>import(`@/features/status`).then(e=>({default:e.StatusPage}))),S=e(()=>import(`@/features/auth`).then(e=>({default:e.LoginPage}))),C=e(()=>import(`@/features/auth`).then(e=>({default:e.PasswordPage})));export function App({apps:e=[],boxes:m=o}){let w=n(()=>new Map(e.flatMap(e=>e.blocks.map(e=>[e.id,e]))),[e]),T=n(()=>[...m].sort((e,t)=>e.order-t.order),[m]),E=T.flatMap(e=>e.statusPanels??[]);return h(c,{children:g(u.Provider,{value:w,children:[h(l,{}),h(t,{fallback:h(`output`,{className:`block py-12 text-center text-sm text-muted-foreground`,children:`Opening workspace…`}),children:g(a,{children:[h(i,{path:`/login`,element:h(S,{})}),h(i,{path:`/:tenant/login`,element:h(S,{})}),g(i,{element:h(v,{}),children:[h(i,{path:`/`,element:h(y,{})}),h(i,{path:`/home/:workspace`,element:h(b,{})}),e.flatMap(e=>(e.routes??[]).map(t=>h(i,{path:t.path,element:t.element},`${e.code}:${t.path}`))),T.flatMap(e=>e.routes.map(t=>h(i,{path:t.path,element:_(t.access,t.page)},`${e.name}:${t.path}`))),h(i,{path:p.status,element:_(s.status,h(x,{panels:E.length?E:void 0}))}),h(i,{path:`/account/password`,element:h(C,{})}),f.map(([e,t])=>h(i,{path:e,element:h(d,{to:t})},e)),h(i,{path:`*`,element:h(r,{to:`/`,replace:!0})})]})]})})]})})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{generatePath as e,Navigate as t,useLocation as n,useParams as r}from"react-router-dom";import{jsx as i}from"react/jsx-runtime";export function Moved({to:a}){let o=r(),{search:s,hash:c}=n(),[l=``,u]=a.split(`?`),d=new URLSearchParams(u);new URLSearchParams(s).forEach((e,t)=>d.set(t,e));let f=d.toString();return i(t,{replace:!0,to:{pathname:e(l,o),search:f?`?${f}`:``,hash:c}})}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type PageAccess } from '@/shared/auth/page-access';
|
|
3
|
+
/** Renders the page only with its permission; a typed URL gets a clear refusal instead. */
|
|
4
|
+
export declare function RequireAccess({ access, children }: {
|
|
5
|
+
access: PageAccess;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ShieldX as e}from"lucide-react";import{Link as t}from"react-router-dom";import{canOpen as n}from"@/shared/auth/page-access";import{useSession as r}from"@/shared/auth/session-context";import{jsx as i,jsxs as a}from"react/jsx-runtime";export function RequireAccess({access:o,children:s}){let{can:c,user:l}=r();return n(o,c,l)?s:a(`section`,{role:`alert`,className:`mx-auto mt-6 flex max-w-xl items-start gap-4 rounded-2xl border bg-card p-6`,children:[i(`span`,{className:`grid size-10 shrink-0 place-items-center rounded-xl border border-destructive/30 bg-destructive/10 text-destructive`,children:i(e,{className:`size-5`,"aria-hidden":`true`})}),a(`div`,{children:[i(`h1`,{className:`text-lg font-semibold`,children:`You don't have access to this page`}),i(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Your role does not include this area. Ask an administrator to grant it in Roles & access.`}),i(t,{to:`/`,className:`mt-3 inline-block text-sm font-medium text-primary`,children:`Go to your home`})]})]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Navigate as e,Outlet as t,useLocation as n,useParams as r,Link as i}from"react-router-dom";import{useSession as a}from"@/shared/auth/session-context";import{availableWorkspaces as o,primaryWorkspace as s}from"@/shared/auth/workspaces";import{AppShell as c}from"@/shared/components/layout/AppShell";import{ErrorNotice as l}from"@/shared/components/layout/ErrorNotice";import{HomePage as u}from"@/features/home";import{PlatformHomePage as d}from"@/features/platform";import{paths as f}from"@/app/paths";import{loginPath as p}from"@/shared/auth/login-tenant";import{useApplications as m}from"@/shared/hooks/useApplications";import{jsx as h,jsxs as g}from"react/jsx-runtime";const _=e=>e.target_kind===`page`?`${f.pages}/${e.target}`:e.target;export function AuthenticatedWorkspace(){let r=a(),i=n(),s=m(),u=(s.data??[]).some(e=>e.menu.length>0);if(r.isChecking)return h(`output`,{className:`flex min-h-svh items-center justify-center text-sm text-muted-foreground`,children:`Opening your workspace…`});if(r.error)return g(`div`,{className:`mx-auto max-w-lg space-y-4 p-8`,children:[h(l,{error:r.error,retry:r.retry}),h(`button`,{onClick:r.signOut,className:`rounded-lg bg-primary px-4 py-3 text-sm text-primary-foreground`,children:`Return to sign-in`})]});if(!r.user)return h(e,{to:p(),replace:!0,state:{returnTo:`${i.pathname}${i.search}`}});if(r.user.can_change_password&&r.user.password_change_required&&i.pathname!==`/account/password`)return h(e,{to:`/account/password`,replace:!0});if(i.pathname===`/account/password`)return h(t,{});let d=o(r.user).length===0&&!u;return d&&s.isPending&&s.fetchStatus!==`idle`?h(`output`,{className:`flex min-h-svh items-center justify-center text-sm text-muted-foreground`,children:`Opening your workspace…`}):d?g(`section`,{className:`mx-auto flex min-h-svh max-w-lg flex-col justify-center gap-5 p-8`,children:[h(`h1`,{className:`text-2xl font-semibold`,children:`This account does not have access to this application`}),h(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:r.user.roles.length===0?`Your account is awaiting application role assignment. An administrator must grant access before you can enter a workspace.`:`This application supports Admin, HITL, and Analyst users. Ask your administrator to check your assigned role.`}),h(`button`,{onClick:r.signOut,className:`self-start rounded-xl bg-primary px-5 py-3 text-sm text-primary-foreground`,children:`Sign out`})]}):h(c,{children:h(t,{})})}export function DefaultHome(){let{user:t}=a(),r=n(),i=m();if(r.search)return h(e,{to:`${f.playground}${r.search}`,replace:!0});if(t?.tenant_id===null)return h(d,{});let o=i.isPending&&i.fetchStatus!==`idle`,c=i.data?.find(e=>e.home_page)?.home_page;if(c)return h(e,{to:`${f.pages}/${c}`,replace:!0});let l=s(t);if(l&&!o)return h(e,{to:`/home/${l}`,replace:!0});let u=i.data?.flatMap(e=>e.menu)[0];return u?h(e,{to:_(u),replace:!0}):h(`output`,{className:`flex min-h-[50svh] items-center justify-center text-sm text-muted-foreground`,children:`Opening your home…`})}export function RoleHome(){let{user:e}=a(),{workspace:t}=r(),n=o(e).find(e=>e.id===t);return n?h(u,{workspace:n.id}):g(`section`,{className:`mx-auto max-w-xl rounded-2xl border bg-card p-8`,children:[h(`h1`,{className:`text-2xl font-semibold`,children:`This workspace is not assigned to you`}),h(`p`,{className:`mt-3 text-sm leading-6 text-muted-foreground`,children:`Choose a workspace available to your account. Ask your administrator if your role needs to change.`}),h(i,{to:`/`,className:`mt-6 inline-block rounded-lg bg-primary px-4 py-3 text-sm text-primary-foreground`,children:`Go to your home`})]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{KeyRound as e,ShieldCheck as t}from"lucide-react";export const controlTowerTabs=[{id:`llms`,label:`LLM providers`,icon:e},{id:`guardrails`,label:`Guardrails`,icon:t}];
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every page URL, named after where the page sits in the menu (Home, AI Studio,
|
|
3
|
+
* Integration, Admin, Setup). The router, the menu and in-app links read them from here.
|
|
4
|
+
*/
|
|
5
|
+
export declare const paths: {
|
|
6
|
+
readonly home: '/';
|
|
7
|
+
readonly inbox: '/inbox';
|
|
8
|
+
readonly myWork: '/work';
|
|
9
|
+
readonly teamWork: '/work/team';
|
|
10
|
+
readonly approvals: '/work/approvals';
|
|
11
|
+
readonly allWork: '/work/all';
|
|
12
|
+
readonly humanTasks: '/work/human-tasks';
|
|
13
|
+
readonly workspaceClearance: '/workspace/clearance';
|
|
14
|
+
readonly workspaceRisk: '/workspace/risk';
|
|
15
|
+
readonly workspaceExposure: '/workspace/exposure';
|
|
16
|
+
readonly workspaceTasks: '/workspace/tasks';
|
|
17
|
+
readonly aiStudio: '/ai-studio';
|
|
18
|
+
readonly aiInsights: '/ai-studio/insights';
|
|
19
|
+
readonly controlTower: '/ai-studio/control-tower';
|
|
20
|
+
readonly guardrails: '/ai-studio/control-tower/guardrails';
|
|
21
|
+
readonly llmProviders: '/ai-studio/control-tower/llm-providers';
|
|
22
|
+
readonly agenticFlows: '/ai-studio/flows';
|
|
23
|
+
readonly hitlStudio: '/ai-studio/hitl';
|
|
24
|
+
readonly aiAgents: '/ai-studio/agents';
|
|
25
|
+
readonly aiSkills: '/ai-studio/skills';
|
|
26
|
+
readonly aiTools: '/ai-studio/tools';
|
|
27
|
+
readonly mcp: '/ai-studio/mcp';
|
|
28
|
+
readonly a2a: '/ai-studio/a2a';
|
|
29
|
+
readonly remoteAgents: '/ai-studio/remote-agents';
|
|
30
|
+
readonly mcpServers: '/ai-studio/mcp/servers';
|
|
31
|
+
readonly mcpClients: '/ai-studio/mcp/clients';
|
|
32
|
+
readonly designer: '/ai-studio/designer';
|
|
33
|
+
readonly playground: '/ai-studio/playground';
|
|
34
|
+
readonly analyzers: '/ai-studio/analyzers';
|
|
35
|
+
readonly classifiers: '/ai-studio/classifiers';
|
|
36
|
+
readonly systems: '/integration/systems';
|
|
37
|
+
readonly connectorLibrary: '/integration/connector-library';
|
|
38
|
+
readonly credentials: '/integration/credentials';
|
|
39
|
+
readonly databases: '/integration/databases';
|
|
40
|
+
readonly dbQueries: '/integration/databases/queries';
|
|
41
|
+
readonly mappings: '/integration/mappings';
|
|
42
|
+
readonly mailboxes: '/integration/mailboxes';
|
|
43
|
+
readonly eventCatalog: '/integration/events';
|
|
44
|
+
readonly eventSubscriptions: '/integration/subscriptions';
|
|
45
|
+
readonly eventLog: '/integration/event-log';
|
|
46
|
+
readonly eventDeliveries: '/integration/deliveries';
|
|
47
|
+
readonly legalHolds: '/integration/legal-holds';
|
|
48
|
+
readonly users: '/setup/users';
|
|
49
|
+
readonly tenants: '/setup/tenants';
|
|
50
|
+
readonly access: '/setup/access';
|
|
51
|
+
readonly logging: '/setup/logging';
|
|
52
|
+
readonly groups: '/setup/groups';
|
|
53
|
+
readonly assignmentRules: '/setup/assignment-rules';
|
|
54
|
+
readonly schedules: '/setup/schedules';
|
|
55
|
+
readonly slas: '/setup/slas';
|
|
56
|
+
readonly tables: '/builder/tables';
|
|
57
|
+
readonly menus: '/builder/menus';
|
|
58
|
+
readonly pages: '/pages';
|
|
59
|
+
readonly builderPlaybooks: '/builder/playbooks';
|
|
60
|
+
readonly builderActivities: '/builder/activities';
|
|
61
|
+
readonly builderPages: '/builder/pages';
|
|
62
|
+
readonly builderTemplates: '/builder/page-templates';
|
|
63
|
+
readonly builderLayouts: '/builder/layouts';
|
|
64
|
+
readonly builderComponents: '/builder/components';
|
|
65
|
+
readonly status: '/setup/status';
|
|
66
|
+
readonly scheduledJobs: '/setup/scheduled-jobs';
|
|
67
|
+
readonly apiReference: '/setup/api';
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* URLs used before the menu was finalised; each redirects to its page so bookmarks,
|
|
71
|
+
* favorites and shared links keep working. `:name` parameters carry over.
|
|
72
|
+
*/
|
|
73
|
+
export declare const movedPaths: readonly (readonly [from: string, to: string])[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const paths={home:`/`,inbox:`/inbox`,myWork:`/work`,teamWork:`/work/team`,approvals:`/work/approvals`,allWork:`/work/all`,humanTasks:`/work/human-tasks`,workspaceClearance:`/workspace/clearance`,workspaceRisk:`/workspace/risk`,workspaceExposure:`/workspace/exposure`,workspaceTasks:`/workspace/tasks`,aiStudio:`/ai-studio`,aiInsights:`/ai-studio/insights`,controlTower:`/ai-studio/control-tower`,guardrails:`/ai-studio/control-tower/guardrails`,llmProviders:`/ai-studio/control-tower/llm-providers`,agenticFlows:`/ai-studio/flows`,hitlStudio:`/ai-studio/hitl`,aiAgents:`/ai-studio/agents`,aiSkills:`/ai-studio/skills`,aiTools:`/ai-studio/tools`,mcp:`/ai-studio/mcp`,a2a:`/ai-studio/a2a`,remoteAgents:`/ai-studio/remote-agents`,mcpServers:`/ai-studio/mcp/servers`,mcpClients:`/ai-studio/mcp/clients`,designer:`/ai-studio/designer`,playground:`/ai-studio/playground`,analyzers:`/ai-studio/analyzers`,classifiers:`/ai-studio/classifiers`,systems:`/integration/systems`,connectorLibrary:`/integration/connector-library`,credentials:`/integration/credentials`,databases:`/integration/databases`,dbQueries:`/integration/databases/queries`,mappings:`/integration/mappings`,mailboxes:`/integration/mailboxes`,eventCatalog:`/integration/events`,eventSubscriptions:`/integration/subscriptions`,eventLog:`/integration/event-log`,eventDeliveries:`/integration/deliveries`,legalHolds:`/integration/legal-holds`,users:`/setup/users`,tenants:`/setup/tenants`,access:`/setup/access`,logging:`/setup/logging`,groups:`/setup/groups`,assignmentRules:`/setup/assignment-rules`,schedules:`/setup/schedules`,slas:`/setup/slas`,tables:`/builder/tables`,menus:`/builder/menus`,pages:`/pages`,builderPlaybooks:`/builder/playbooks`,builderActivities:`/builder/activities`,builderPages:`/builder/pages`,builderTemplates:`/builder/page-templates`,builderLayouts:`/builder/layouts`,builderComponents:`/builder/components`,status:`/setup/status`,scheduledJobs:`/setup/scheduled-jobs`,apiReference:`/setup/api`};export const movedPaths=[[`/tasks/my-work`,paths.myWork],[`/analytics`,`/`],[`/tasks/queue`,paths.teamWork],[`/tasks/approvals`,paths.approvals],[`/review/tasks`,paths.humanTasks],[`/work/hitl`,paths.humanTasks],[`/review/extraction`,paths.humanTasks],[`/workflows/designer`,paths.designer],[`/workbench`,paths.playground],[`/admin/analyzers`,paths.analyzers],[`/admin/classifiers`,paths.classifiers],[`/integration-studio`,paths.systems],[`/admin`,paths.mailboxes],[`/admin/mailboxes`,paths.mailboxes],[`/admin/users`,paths.users],[`/admin/access`,paths.access],[`/admin/access/:code`,`${paths.access}/:code`],[`/admin/logging`,paths.logging],[`/tasks/groups`,paths.groups],[`/tasks/assignment-rules`,paths.assignmentRules],[`/tasks/schedules`,paths.schedules],[`/tasks/slas`,paths.slas],[`/status`,paths.status],[`/api`,paths.apiReference]];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* After a deployment, an open tab still runs the previous build and its lazy chunks no
|
|
3
|
+
* longer exist (404), which would leave a blank page. Reload once to load the new build;
|
|
4
|
+
* the interval guard stops a reload loop when the chunk is missing for another reason.
|
|
5
|
+
*/
|
|
6
|
+
export declare function installStaleChunkReload(target?: Window): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`sirius-stale-chunk-reload`;export function installStaleChunkReload(t=window){t.addEventListener(`vite:preloadError`,n=>{let r=Date.now(),i;try{i=Number(t.sessionStorage.getItem(e))||0,t.sessionStorage.setItem(e,String(r))}catch{return}r-i<1e4||(n.preventDefault(),t.location.reload())})}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '@/index.css';
|
|
2
|
+
import type { AppModule } from '@/shared/extension-points/app-module';
|
|
3
|
+
/**
|
|
4
|
+
* Start the Sirius UI in `#root` with the installed applications. A customer project's
|
|
5
|
+
* `main.tsx` calls this with its own applications (`startSirius([CRM])`); the
|
|
6
|
+
* platform alone starts with none.
|
|
7
|
+
*/
|
|
8
|
+
export declare function startSirius(apps?: readonly AppModule[]): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{StrictMode as e}from"react";import{createRoot as t}from"react-dom/client";import{QueryClient as n,QueryClientProvider as r}from"@tanstack/react-query";import{BrowserRouter as i}from"react-router-dom";import"@/index.css";import{App as a}from"@/app/App";import{installStaleChunkReload as o}from"@/app/staleChunkReload";import{jsx as s}from"react/jsx-runtime";export function startSirius(c=[]){o();let l=document.getElementById(`root`);if(!l)throw Error(`Root element #root not found`);let u=new n({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});t(l).render(s(e,{children:s(r,{client:u,children:s(i,{children:s(a,{apps:c})})})}))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{lazy as e}from"react";import{paths as t}from"@/app/paths";import{pageAccess as n}from"@/shared/auth/page-access";import{jsx as r}from"react/jsx-runtime";const i=e(()=>import(`@/features/events`).then(e=>({default:e.LegalHoldsPage}))),a=e(()=>import(`@/features/events`).then(e=>({default:e.DeliveriesPage}))),o=e(()=>import(`@/features/events`).then(e=>({default:e.EventLogPage}))),s=e(()=>import(`@/features/events`).then(e=>({default:e.SubscriptionsPage}))),c=e(()=>import(`@/features/events`).then(e=>({default:e.EventCatalogPage}))),l=e(()=>import(`@/features/users`).then(e=>({default:e.UsersPage}))),u=e(()=>import(`@/features/users`).then(e=>({default:e.UserPage}))),d=e(()=>import(`@/features/users`).then(e=>({default:e.UserCreatePage}))),f=e(()=>import(`@/features/tenants`).then(e=>({default:e.TenantsPage}))),p=e(()=>import(`@/features/tenants`).then(e=>({default:e.TenantOnboardPage}))),m=e(()=>import(`@/features/tenants`).then(e=>({default:e.TenantBrandingPage}))),h=e(()=>import(`@/features/administration`).then(e=>({default:e.AccessPage}))),g=e(()=>import(`@/features/administration`).then(e=>({default:e.LoggingPage}))),_=e(()=>import(`@/features/menus`).then(e=>({default:e.MenusPage}))),v=e(()=>import(`@/features/api-reference`).then(e=>({default:e.ApiReferencePage})));export const BOX={name:`core`,order:0,routes:[{path:t.legalHolds,page:r(i,{}),access:n.legalHolds},{path:t.eventDeliveries,page:r(a,{}),access:n.eventDeliveries},{path:t.eventLog,page:r(o,{}),access:n.eventLog},{path:t.eventSubscriptions,page:r(s,{}),access:n.eventSubscriptions},{path:t.eventCatalog,page:r(c,{}),access:n.eventCatalog},{path:t.users,page:r(l,{}),access:n.users},{path:`${t.users}/new`,page:r(d,{}),access:n.users},{path:`${t.users}/:userId`,page:r(u,{}),access:n.users},{path:t.tenants,page:r(f,{}),access:n.tenants},{path:`${t.tenants}/new`,page:r(p,{}),access:n.tenants},{path:`${t.tenants}/:tenantId`,page:r(m,{}),access:n.tenants},{path:t.access,page:r(h,{}),access:n.access},{path:`${t.access}/:code`,page:r(h,{}),access:n.access},{path:t.logging,page:r(g,{}),access:n.logging},{path:t.menus,page:r(_,{}),access:n.menus},{path:t.apiReference,page:r(v,{}),access:n.reference}]};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Administration
|
|
2
|
+
|
|
3
|
+
Routes import only `index.ts` (AccessPage, LoggingPage, MailboxesPage). Features never import each other; shared code
|
|
4
|
+
lives in `src/shared/`.
|
|
5
|
+
|
|
6
|
+
| Folder | What lives there |
|
|
7
|
+
| ------------- | ------------------------------------------------------------------------ |
|
|
8
|
+
| `pages/` | Routed pages (exported through `index.ts`) |
|
|
9
|
+
| `components/` | The feature's UI parts, grouped in subfolders where they belong together |
|
|
10
|
+
| `model/` | Pure logic: data shapes, presentation, charts, forms, query keys |
|
|
11
|
+
| `hooks/` | React hooks: queries, mutations and feature state |
|
|
12
|
+
|
|
13
|
+
Tests live in `src/test/features/administration/`, mirroring these folders.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only view of this deployment's log files: newest records first, filtered on the
|
|
3
|
+
* server; the complete file is a download. Logs are operational data, not live chat:
|
|
4
|
+
* reloads are explicit so nobody streams a production log by accident.
|
|
5
|
+
*/
|
|
6
|
+
export declare function LogFilesPanel(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useGrid as e}from"@/shared/hooks/useGrid";import{GridSortSelect as t}from"@/shared/components/workspace/GridSortSelect";import{useDebouncedValue as n}from"@/shared/hooks/useDebouncedValue";import{useState as r}from"react";import{Download as i,FileText as a}from"lucide-react";import{downloadLogFile as o}from"@/shared/api/administration";import{ErrorNotice as s}from"@/shared/components/layout/ErrorNotice";import{Button as c}from"@/shared/components/ui/button";import{Input as l}from"@/shared/components/ui/input";import{cn as u}from"@/shared/lib/utils";import{useLogFiles as d,useLogTail as f}from"../hooks/useAdministration";import{RefreshButton as p}from"@/shared/components/workspace/RefreshButton";import{jsxs as m,jsx as h,Fragment as g}from"react/jsx-runtime";const _=[`DEBUG`,`INFO`,`WARNING`,`ERROR`],v={CRITICAL:`border-destructive/40 text-destructive`,ERROR:`border-destructive/40 text-destructive`,WARNING:`border-warning/40 text-warning`};function y(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KiB`:`${(e/1024/1024).toFixed(1)} MiB`}export function LogFilesPanel(){let b=d(!0),[x,S]=r(null),[C,w]=r(``),[T,E]=r(``),D=n(T),[O,k]=r(null),[A,j]=r(!1),M=x??b.data?.[0]?.name??null,N=f(M,{level:C||void 0,contains:D},b.isSuccess),P=e({level:e=>e.level,text:e=>e.text}),F=P.apply([...N.data?.entries??[]].reverse());async function I(){if(M){k(null),j(!0);try{await o(M)}catch(e){k(e instanceof Error?e:Error(`Download failed`))}finally{j(!1)}}}let L=`h-8 rounded-lg border border-input bg-card px-2.5 text-xs`;return m(`section`,{"aria-labelledby":`log-files-title`,className:`mt-5 rounded-2xl border bg-card`,children:[m(`div`,{className:`flex flex-wrap items-center gap-2 border-b px-4 py-3`,children:[m(`h2`,{id:`log-files-title`,className:`mr-auto flex items-center gap-2 text-sm font-semibold`,title:`Newest records from the serving process. Download a file for its complete history.`,children:[h(a,{className:`size-4 text-primary`,"aria-hidden":`true`}),` Log files`]}),b.isSuccess&&b.data.length>0&&m(g,{children:[h(`label`,{className:`sr-only`,htmlFor:`log-file`,children:`File`}),h(`select`,{id:`log-file`,value:M??``,onChange:e=>S(e.target.value),className:L,children:b.data.map(e=>m(`option`,{value:e.name,children:[e.name,` · `,y(e.size_bytes),e.current?` · current`:``]},e.name))}),h(`label`,{className:`sr-only`,htmlFor:`log-level`,children:`Minimum level`}),m(`select`,{id:`log-level`,value:C,onChange:e=>w(e.target.value),className:L,children:[h(`option`,{value:``,children:`All levels`}),_.map(e=>m(`option`,{value:e,children:[e,` and above`]},e))]}),m(`div`,{className:`flex min-w-56 flex-1 items-center gap-2 sm:flex-none`,children:[h(`label`,{className:`sr-only`,htmlFor:`log-contains`,children:`Contains`}),h(l,{id:`log-contains`,value:T,onChange:e=>E(e.target.value),maxLength:200,placeholder:`Correlation ID, logger or text…`,className:`h-8 sm:w-64`})]})]}),h(t,{sort:P.sort,onSort:P.toggleSort,columns:[{value:`level`,label:`Level`},{value:`text`,label:`Message`}]}),h(p,{fetching:b.isFetching||N.isFetching,onRefresh:()=>{b.refetch(),N.refetch()}}),m(c,{size:`sm`,onClick:()=>void I(),disabled:!M||A,children:[h(i,{"aria-hidden":`true`}),` `,A?`Downloading…`:`Download`]})]}),b.isPending?h(`output`,{className:`block p-5 text-sm text-muted-foreground`,children:`Loading log files…`}):b.isError?h(`div`,{className:`p-5`,children:h(s,{error:b.error,retry:()=>void b.refetch()})}):b.data.length===0?h(`p`,{className:`p-5 text-sm text-muted-foreground`,children:`File logging is off for this deployment, so there is nothing to show. Records still go to the console and your hosting platform’s log service.`}):m(g,{children:[O&&h(`div`,{className:`px-5 pt-4`,children:h(s,{error:O})}),N.isPending?h(`output`,{className:`block p-5 text-sm text-muted-foreground`,children:`Reading log…`}):N.isError?h(`div`,{className:`p-5`,children:h(s,{error:N.error,retry:()=>void N.refetch()})}):F.length===0?h(`p`,{className:`p-5 text-sm text-muted-foreground`,children:`No records match these filters.`}):m(g,{children:[h(`ol`,{"aria-label":P.sort.by?`Log records`:`Log records, newest first`,className:`divide-y text-xs leading-5 break-all`,children:F.map((e,t)=>m(`li`,{className:`flex gap-3 px-5 py-2`,children:[h(`span`,{className:u(`mt-0.5 h-5 w-[4.5rem] shrink-0 rounded border text-center text-[12px] leading-[1.125rem] font-semibold`,v[e.level??``]??`text-muted-foreground`),children:e.level??`TEXT`}),h(`pre`,{className:`min-w-0 flex-1 break-words whitespace-pre-wrap`,children:e.text})]},`${t}:${e.text.slice(0,40)}`))}),m(`p`,{className:`border-t px-5 py-3 text-xs text-muted-foreground`,children:[F.length,` record`,F.length===1?``:`s`,N.data.truncated&&` · older records not shown; download for everything`]})]})]})]})}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RoleCreate } from '@/shared/api/roles';
|
|
2
|
+
/** One-row form for a custom role; grants are ticked in the matrix after creating it. */
|
|
3
|
+
export declare function NewRoleForm({ busy, onCreate, onCancel, }: {
|
|
4
|
+
busy: boolean;
|
|
5
|
+
onCreate: (role: RoleCreate) => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e}from"react";import{Bot as t,Users as n,X as r}from"lucide-react";import{Button as i}from"@/shared/components/ui/button";import{Input as a}from"@/shared/components/ui/input";import{SegmentedControl as o}from"@/shared/components/workspace/SegmentedControl";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^[^a-z]+|_+$/g,``).slice(0,63);export function NewRoleForm({busy:u,onCreate:d,onCancel:f}){let[p,m]=e(``),[h,g]=e(``),[_,v]=e(!1),[y,b]=e(``),[x,S]=e(`user`),C=_?h:l(p),w=p.trim().length>0&&/^[a-z][a-z0-9_]{1,62}$/.test(C);return c(`form`,{"aria-label":`New role`,className:`flex flex-wrap items-end gap-3 p-5`,onSubmit:e=>{e.preventDefault(),w&&d({code:C,name:p.trim(),description:y,kind:x,permissions:[]})},children:[c(`label`,{htmlFor:`new-role-name`,className:`grid min-w-44 flex-1 gap-1 text-xs font-medium`,children:[`Name`,s(a,{id:`new-role-name`,className:`h-9`,value:p,maxLength:80,placeholder:`CRM integration`,onChange:e=>m(e.target.value)})]}),c(`label`,{htmlFor:`new-role-code`,className:`grid min-w-40 gap-1 text-xs font-medium`,children:[`Code`,s(a,{id:`new-role-code`,className:`h-9 text-xs`,value:C,maxLength:63,placeholder:`crm_integration`,onChange:e=>{v(!0),g(e.target.value)}})]}),c(`label`,{htmlFor:`new-role-description`,className:`grid min-w-56 flex-[2] gap-1 text-xs font-medium`,children:[`Description`,s(a,{id:`new-role-description`,className:`h-9`,value:y,maxLength:300,placeholder:`What this role is for`,onChange:e=>b(e.target.value)})]}),s(o,{label:`Role type`,value:x,onChange:S,segments:[{value:`user`,label:`UI role (people)`,icon:n},{value:`service`,label:`API role (machines)`,icon:t}]}),s(i,{type:`submit`,size:`sm`,disabled:!w||u,children:u?`Creating…`:`Create role`}),s(i,{variant:`ghost`,size:`icon`,"aria-label":`Cancel new role`,onClick:f,children:s(r,{})})]})}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One role. A UI role (people) is granted pages and the actions on them; the API endpoints
|
|
3
|
+
* those pages use follow from the same permissions. An API role (machines) is granted API
|
|
4
|
+
* operation groups, shown with their endpoints.
|
|
5
|
+
*/
|
|
6
|
+
export declare function RoleEditor({ code }: {
|
|
7
|
+
code: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useId as e,useState as t}from"react";import{useMutation as n,useQueryClient as r}from"@tanstack/react-query";import{ChevronDown as i,LockKeyhole as a,RotateCcw as o,Save as s,Trash2 as c,Undo2 as l,X as u}from"lucide-react";import{useNavigate as d}from"react-router-dom";import{deleteRole as f,updateRoleContains as ee,updateRolePermissions as te}from"@/shared/api/roles";import{listedPages as ne,moduleLabels as p}from"@/shared/auth/page-access";import{permissionLabels as m}from"@/shared/auth/permissions";import{useSession as re}from"@/shared/auth/session-context";import{ErrorNotice as h}from"@/shared/components/layout/ErrorNotice";import{Button as g}from"@/shared/components/ui/button";import{PageActions as ie}from"@/shared/components/workspace/PageActions";import{SearchInput as ae}from"@/shared/components/workspace/SearchInput";import{notify as _}from"@/shared/lib/notify";import{matchesSearch as v}from"@/shared/lib/search";import{cn as y}from"@/shared/lib/utils";import{useApplicationNames as oe}from"@/shared/hooks/useApplications";import{roleOrigin as b,roleOriginClass as se}from"../model/roleOrigin";import{roleKindLabel as ce}from"../model/roleKinds";import{useAccessData as le,useStoreRole as ue}from"../hooks/useAccess";import{paths as de}from"@/app/paths";import{jsx as x,jsxs as S,Fragment as fe}from"react/jsx-runtime";const C=Object.keys(p),pe={GET:`text-success-foreground`,POST:`text-workspace`,PATCH:`text-info-foreground`,PUT:`text-info-foreground`,DELETE:`text-destructive`};function me({role:t,roles:n,contains:r,disabled:i,onChange:a}){let o=e(),s=e=>n.find(t=>t.code===e)?.name??e,c=n.filter(e=>e.kind===t.kind&&e.code!==t.code&&e.code!==`admin`&&!r.includes(e.code)&&!(e.contains??[]).includes(t.code)).toSorted((e,t)=>e.name.localeCompare(t.name)),l=t.inherited_permissions??[];return S(`section`,{"aria-label":`Contains roles`,className:`mb-3 flex flex-wrap items-center gap-2 rounded-xl border bg-card px-4 py-2.5 text-xs`,children:[x(`span`,{className:`font-semibold`,children:`Contains roles`}),r.length===0&&x(`span`,{className:`text-muted-foreground`,children:`None`}),r.map(e=>S(`span`,{className:`inline-flex items-center gap-1 rounded-badge bg-muted px-2 py-0.5 ring-1 ring-border ring-inset`,children:[s(e),x(`button`,{type:`button`,"aria-label":`Remove role ${s(e)}`,disabled:i,className:`rounded-full text-muted-foreground hover:text-foreground disabled:opacity-50`,onClick:()=>a(r.filter(t=>t!==e)),children:x(u,{className:`size-3`,"aria-hidden":`true`})})]},e)),x(`label`,{htmlFor:o,className:`sr-only`,children:`Add a contained role`}),S(`select`,{id:o,value:``,disabled:i||c.length===0,className:`h-7 rounded-md border bg-card px-2 text-xs`,onChange:e=>{e.target.value&&a([...r,e.target.value])},children:[x(`option`,{value:``,children:`Add a role…`}),c.map(e=>x(`option`,{value:e.code,children:e.name},e.code))]}),l.length>0&&x(`span`,{className:`text-muted-foreground`,children:l.length===1?`Holders also get 1 permission from contained roles.`:`Holders also get ${l.length} permissions from contained roles.`})]})}function he({label:e,state:t,disabled:n,onChange:r}){return x(`input`,{type:`checkbox`,"aria-label":e,checked:t===`all`,ref:e=>{e&&(e.indeterminate=t===`some`)},disabled:n,onChange:()=>r(t!==`all`),className:`size-4 shrink-0 cursor-pointer accent-primary disabled:cursor-default`})}function ge({module:n,state:r,disabled:a,onSelect:o,children:s,searching:c}){let[l,u]=t(!0),d=e(),f=c||l;return S(`section`,{className:`overflow-hidden rounded-xl border bg-card`,children:[S(`h3`,{className:`flex items-center gap-2 border-b bg-muted/30 px-3 py-1 text-[12px] font-semibold tracking-wider text-primary uppercase`,children:[x(he,{label:`Select all in ${p[n]}`,state:r,disabled:a,onChange:o}),S(`button`,{type:`button`,"aria-expanded":f,"aria-controls":d,onClick:()=>u(!f),className:`flex flex-1 items-center justify-between gap-2 rounded-sm text-left uppercase outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[p[n],x(i,{"aria-hidden":`true`,className:y(`size-4 transition-transform`,!f&&`-rotate-90`)})]})]}),x(`ul`,{id:d,hidden:!f,className:`divide-y`,children:s})]})}function w({label:e,checked:t,disabled:n,onChange:r,className:i}){return S(`label`,{className:y(`flex items-center gap-2`,!n&&`cursor-pointer`,i),children:[x(`input`,{type:`checkbox`,checked:t,disabled:n,onChange:r,"aria-label":e,className:`size-4 shrink-0 accent-primary`}),e]})}function _e(){return x(`span`,{className:`rounded border px-1.5 text-[12px] text-muted-foreground`,children:`Not licensed`})}export function RoleEditor({code:e}){let i=oe(),{can:u}=re(),p=u(`admin.access.write`),ve=d(),ye=r(),be=ue(),{roles:T,catalog:E,licensed:D}=le(p),O=T.data?.find(t=>t.code===e),[k,A]=t(null),[j,M]=t(null),[N,xe]=t(``),P=n({mutationFn:async({current:e,next:t,contains:n})=>{let r=e;return t!==void 0&&(r=await te(r,t)),n!==void 0&&(r=await ee(r,n)),r},onSuccess:(e,{next:t,contains:n})=>{be(e),_.success(t===null?`Role reset to default.`:`Role saved.`),A(null),M(null);let r=T.data?.some(t=>t.contains?.includes(e.code));(n!==void 0||r)&&ye.invalidateQueries({queryKey:[`roles`]})},retry:!1}),F=n({mutationFn:f,onSuccess:(e,t)=>{ye.setQueryData([`roles`],e=>e?.filter(e=>e.code!==t.code)),_.success(`Role deleted.`),ve(de.access)},retry:!1});if(!p)return x(`p`,{role:`alert`,children:`You do not have access to roles and access administration.`});if(T.isPending||E.isPending)return x(`output`,{className:`block rounded-2xl border bg-card p-6 text-sm`,children:`Loading role…`});if(T.isError||E.isError)return x(h,{error:T.error??E.error,retry:()=>void T.refetch()});if(!O)return S(`p`,{role:`alert`,children:[`No role with code `,e,`.`]});let I=O.code===`admin`,L=O.kind===`service`,R=k??O.permissions,z=O.contains??[],B=j??z,V=k!==null&&(k.length!==O.permissions.length||k.some(e=>!O.permissions.includes(e))),H=j!==null&&(j.length!==z.length||j.some(e=>!z.includes(e))),U=V||H,W=P.isPending||F.isPending,G=e=>I||R.includes(e),K=e=>!I&&!W&&D(e),q=(e,...t)=>e.filter(e=>!t.includes(e)),J=e=>A(R.includes(e)?q(R,e):[...R,e]),Se=e=>A(R.includes(e.permission)?q(R,e.permission,...(e.actions??[]).map(e=>e.permission)):[...R,e.permission]),Y=e=>{let t=e.filter(G).length;return t===0?`none`:t===e.length?`all`:`some`},X=(e,t)=>A(t?[...new Set([...R,...e.filter(e=>D(e))])]:q(R,...e)),Z=e=>e.flatMap(e=>[e.permission,...(e.actions??[]).map(e=>e.permission)]),Ce=N.trim().toLowerCase(),we=C.map(e=>({module:e,pages:ne.filter(t=>t.module===e&&v(N,[t.label,...(t.actions??[]).map(e=>e.label)]))})).filter(e=>e.pages.length),Q=C.map(e=>({module:e,items:E.data.filter(t=>t.module===e&&t.endpoints.length>0&&v(N,[m[t.code],t.code,...t.endpoints.map(e=>`${e.method} ${e.path} ${e.summary}`)])).toSorted((e,t)=>e.code.localeCompare(t.code))})).filter(e=>e.items.length),$=L?Q.flatMap(e=>e.items.map(e=>e.code)):Z(we.flatMap(e=>e.pages));return S(`section`,{"aria-label":`Role ${O.name}`,className:`min-w-0`,children:[S(`div`,{className:`mb-3 flex flex-wrap items-start justify-between gap-3`,children:[S(`div`,{className:`min-w-0`,children:[S(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[x(`h2`,{className:`text-lg font-semibold tracking-tight`,children:O.name}),x(`span`,{className:y(`rounded-badge px-2.5 py-1 text-xs font-medium`,se(b(O,i))),children:b(O,i).label}),O.customized&&x(`span`,{className:`rounded-badge bg-warning/15 px-2.5 py-1 text-xs font-medium text-warning-foreground ring-warning/30`,children:`Modified`}),U&&x(`span`,{className:`rounded-badge bg-primary/12 px-2.5 py-1 text-xs font-medium text-primary ring-primary/25`,children:`Unsaved changes`})]}),S(`p`,{className:`text-xs text-muted-foreground`,children:[ce(O.kind),` · `,x(`code`,{children:O.code}),O.description?` · ${O.description}`:``]})]}),S(ie,{children:[!I&&S(fe,{children:[S(g,{variant:`outline`,disabled:!U||W,onClick:()=>{A(null),M(null)},children:[x(l,{}),`Discard`]}),S(g,{disabled:!U||W,onClick:()=>P.mutate({current:O,next:V?R:void 0,contains:H?B:void 0}),children:[x(s,{}),P.isPending?`Saving…`:`Save`]})]}),O.customized&&S(g,{variant:`outline`,disabled:W,onClick:()=>P.mutate({current:O,next:null}),children:[x(o,{}),`Reset to default`]}),!O.built_in&&S(g,{variant:`destructive`,disabled:W,onClick:()=>F.mutate(O),children:[x(c,{}),`Delete role`]})]})]}),(P.error||F.error)&&x(`div`,{className:`mb-3`,children:x(h,{error:P.error??F.error})}),I&&S(`p`,{className:`mb-3 flex items-center gap-2 text-xs text-muted-foreground`,children:[x(a,{className:`size-3.5`,"aria-hidden":`true`}),`The administrator role always holds every permission and cannot be changed.`]}),!I&&x(me,{role:O,roles:T.data??[],contains:B,disabled:W,onChange:M}),S(`div`,{className:`mb-3 flex flex-wrap items-center gap-x-4 gap-y-2`,children:[S(`span`,{className:`flex items-center gap-2 text-xs font-medium`,children:[x(he,{label:`Select all`,state:Y($),disabled:I||W||!$.length,onChange:e=>X($,e)}),`Select all`]}),x(ae,{className:`min-w-56 flex-1`,label:L?`Search endpoints`:`Search pages`,value:N,onChange:xe,placeholder:L?`Search method, path or summary…`:`Search pages or actions…`})]}),x(`div`,{className:y(`grid items-start gap-3`,!L&&`lg:grid-cols-2 2xl:grid-cols-3`),children:L?Q.map(({module:e,items:t})=>x(ge,{module:e,searching:!!Ce,state:Y(t.map(e=>e.code)),disabled:I||W,onSelect:e=>X(t.map(e=>e.code),e),children:t.map(e=>S(`li`,{className:y(`px-3 py-1.5`,!D(e.code)&&`opacity-50`),children:[S(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[x(w,{label:m[e.code],checked:G(e.code),disabled:!K(e.code),onChange:()=>J(e.code)}),x(`code`,{className:`text-[12px] text-muted-foreground`,children:e.code}),!D(e.code)&&x(_e,{})]}),x(`div`,{className:`mt-1 ml-6 grid gap-0.5`,children:e.endpoints.map(e=>S(`span`,{className:`flex min-w-0 items-baseline gap-2 text-[12px]`,children:[x(`span`,{className:y(`w-12 shrink-0 font-semibold`,pe[e.method]),children:e.method}),x(`span`,{className:`shrink-0`,children:e.path}),x(`span`,{className:`truncate font-sans text-muted-foreground`,children:e.summary})]},`${e.method} ${e.path}`))})]},e.code))},e)):we.map(({module:e,pages:t})=>x(ge,{module:e,searching:!!Ce,state:Y(Z(t)),disabled:I||W,onSelect:e=>X(Z(t),e),children:t.map(e=>{let t=G(e.permission);return S(`li`,{className:y(`flex flex-wrap items-center gap-x-4 gap-y-1 px-3 py-1.5`,!D(e.permission)&&`opacity-50`),children:[S(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[x(w,{label:e.label,checked:t,disabled:!K(e.permission),onChange:()=>Se(e)}),!D(e.permission)&&x(_e,{})]}),e.actions&&x(`div`,{className:`ml-auto flex flex-wrap justify-end gap-x-4 gap-y-1 text-xs`,children:e.actions.map(e=>x(w,{label:e.label,checked:G(e.permission),disabled:!t||!K(e.permission),onChange:()=>J(e.permission),className:t?void 0:`text-muted-foreground`},e.permission))})]},e.label)})},e))})]})}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RoleInfo } from '@/shared/api/roles';
|
|
2
|
+
/** Search for the role navigation; the grid's headings sort it. */
|
|
3
|
+
export declare function RoleList({ roles, applicationNames, }: {
|
|
4
|
+
roles: RoleInfo[];
|
|
5
|
+
/** Application names by code, so a role an application brought says which. */
|
|
6
|
+
applicationNames?: ReadonlyMap<string, string>;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GridHeader as e,GridHeaderSlot as t}from"@/shared/components/workspace/GridHeader";import{useState as n,useEffect as r,useRef as i}from"react";import{DataTable as a}from"@/shared/components/workspace/DataTable";import{Bot as o,Users as s}from"lucide-react";import{Link as c,useNavigationType as l,useSearchParams as u}from"react-router-dom";import{Button as d}from"@/shared/components/ui/button";import{SearchInput as f}from"@/shared/components/workspace/SearchInput";import{cn as p}from"@/shared/lib/utils";import{roleKindLabel as m}from"../model/roleKinds";import{roleOrigin as h,roleOriginClass as g}from"../model/roleOrigin";import{paths as _}from"@/app/paths";import{ViewToggle as v}from"@/shared/components/workspace/ViewToggle";import{useViewMode as y}from"@/shared/hooks/useViewMode";import{matchesSearch as b}from"@/shared/lib/search";import{jsx as x,jsxs as S}from"react/jsx-runtime";const C=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`});export function RoleList({roles:w,applicationNames:T}){let[E,D]=n(null),[O,k]=u(),[A,j]=y(`sirius-roles-view`),M=l(),N=i(null);r(()=>{(M!==`REPLACE`||N.current?.toString()===O.toString())&&(N.current=null)},[O,M]);let P=O.get(`roleSearch`)??``,F=(e,t)=>{let n=new URLSearchParams(N.current??O);t?n.set(e,t):n.delete(e),N.current=n,k(n,{replace:!0})},I=w.filter(e=>b(P,[e.name,e.code,m(e.kind),h(e,T).label,e.customized?`customized modified`:``])).sort((e,t)=>C.compare(e.name,t.name));return S(`nav`,{"aria-label":`Roles`,className:`min-w-0 overflow-hidden rounded-xl border bg-card`,children:[S(e,{children:[x(f,{className:`w-64 max-w-full`,label:`Search roles`,value:P,onChange:e=>F(`roleSearch`,e),placeholder:`Search roles…`}),x(t,{ref:D}),x(v,{mode:A,onChange:j})]}),I.length&&A===`list`?S(a,{columnsToolbar:E,externalSearch:!0,className:`w-full text-sm`,children:[x(`caption`,{className:`sr-only`,children:`Roles`}),x(`thead`,{className:`bg-card text-xs text-muted-foreground`,children:S(`tr`,{className:`border-b text-left`,children:[x(`th`,{className:`px-3 py-1.5 font-medium`,children:`Role`}),x(`th`,{className:`px-3 py-1.5 font-medium`,children:`For`}),x(`th`,{className:`px-3 py-1.5 font-medium`,children:`Type`}),x(`th`,{className:`px-3 py-1.5 text-right font-medium`,children:`Permissions`}),x(`th`,{className:`px-3 py-1.5 font-medium`,children:`Changes`})]})}),x(`tbody`,{className:`divide-y`,children:I.map(e=>S(`tr`,{className:`hover:bg-muted/50`,children:[S(`td`,{className:`px-3 py-1.5`,children:[x(c,{to:{pathname:`${_.access}/${e.code}`,search:O.toString()},className:`font-semibold text-primary outline-none hover:underline focus-visible:underline`,children:e.name}),x(`span`,{className:`block font-mono text-[11px] text-muted-foreground`,children:e.code})]}),x(`td`,{className:`px-3 py-1.5 text-xs`,children:e.kind===`service`?`Machines`:`People`}),x(`td`,{className:`px-3 py-1.5`,children:x(`span`,{className:p(`rounded-badge px-2.5 py-1 text-xs font-medium`,g(h(e,T))),children:h(e,T).label})}),x(`td`,{className:`px-3 py-1.5 text-right tabular-nums`,children:e.permissions.length}),x(`td`,{className:`px-3 py-1.5 text-xs`,children:e.customized?x(`span`,{className:`rounded-badge bg-warning/10 px-2.5 py-1 font-medium text-warning-foreground`,children:`Modified`}):x(`span`,{className:`text-muted-foreground`,children:`—`})})]},e.code))})]}):I.length?x(`ul`,{className:`grid gap-2 p-2 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4`,children:I.map(e=>{let t=e.kind===`service`?o:s;return x(`li`,{children:S(c,{to:{pathname:`${_.access}/${e.code}`,search:O.toString()},className:`flex h-full min-w-0 items-start gap-3 rounded-lg border p-2.5 transition-colors outline-none hover:border-primary/25 hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,children:[x(`span`,{className:p(`grid size-9 shrink-0 place-items-center rounded-lg ring-1 ring-inset`,e.kind===`service`?`bg-viz-3/12 text-viz-3 ring-viz-3/25`:`bg-viz-2/12 text-viz-2 ring-viz-2/25`),children:x(t,{className:`size-4`,"aria-hidden":`true`})}),S(`span`,{className:`min-w-0 flex-1`,children:[x(`span`,{className:`block text-sm leading-5 font-medium wrap-anywhere`,children:e.name}),S(`span`,{className:`mt-1.5 flex flex-wrap items-center gap-x-1.5 gap-y-1 text-xs text-muted-foreground`,children:[x(`span`,{children:e.kind===`service`?`Machines`:`People`}),x(`span`,{"aria-hidden":`true`,children:`·`}),x(`span`,{children:h(e,T).label}),e.customized&&x(`span`,{className:`rounded-badge bg-warning/10 px-2.5 py-1 font-medium text-warning-foreground`,children:`Modified`})]})]})]})},e.code)})}):S(`div`,{className:`px-4 py-8 text-center`,children:[x(`p`,{className:`text-sm font-medium`,children:`No matching roles`}),x(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Try another name.`}),x(d,{variant:`ghost`,size:`sm`,className:`mt-3`,onClick:()=>{let e=new URLSearchParams(N.current??O);for(let t of[`roleSearch`,`roleType`,`roleOrder`])e.delete(t);N.current=e,k(e,{replace:!0})},children:`Clear filters`})]})]})}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Permission } from '@/shared/api/client';
|
|
2
|
+
import { type RoleInfo } from '@/shared/api/roles';
|
|
3
|
+
/** Roles, the permission catalog and the license, shared by the role-access pages. */
|
|
4
|
+
export declare function useAccessData(enabled: boolean): {
|
|
5
|
+
roles: import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
code: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
kind: import("../../../shared/api/generated/schema").components["schemas"]["PrincipalKind"];
|
|
10
|
+
built_in: boolean;
|
|
11
|
+
platform: boolean;
|
|
12
|
+
source: string | null;
|
|
13
|
+
permissions: import("../../../shared/api/generated/schema").components["schemas"]["Permission"][];
|
|
14
|
+
contains?: string[];
|
|
15
|
+
inherited_permissions?: import("../../../shared/api/generated/schema").components["schemas"]["Permission"][];
|
|
16
|
+
customized: boolean;
|
|
17
|
+
version: number;
|
|
18
|
+
created_at: number;
|
|
19
|
+
created_by: string;
|
|
20
|
+
updated_at: number;
|
|
21
|
+
updated_by: string;
|
|
22
|
+
}[], Error>;
|
|
23
|
+
catalog: import("@tanstack/react-query").UseQueryResult<{
|
|
24
|
+
code: import("../../../shared/api/generated/schema").components["schemas"]["Permission"];
|
|
25
|
+
module: string;
|
|
26
|
+
endpoints: import("../../../shared/api/generated/schema").components["schemas"]["EndpointRead"][];
|
|
27
|
+
}[], Error>;
|
|
28
|
+
license: import("@tanstack/react-query").UseQueryResult<{
|
|
29
|
+
status: import("../../../shared/api/generated/schema").components["schemas"]["LicenseStatus"];
|
|
30
|
+
customer: string | null;
|
|
31
|
+
modules: import("../../../shared/api/generated/schema").components["schemas"]["LicenseModule"][];
|
|
32
|
+
expires_at: number | null;
|
|
33
|
+
permissions: import("../../../shared/api/generated/schema").components["schemas"]["Permission"][];
|
|
34
|
+
}, Error>;
|
|
35
|
+
licensed: (permission: Permission) => boolean;
|
|
36
|
+
};
|
|
37
|
+
/** Replace one role in the cached role list after a save. */
|
|
38
|
+
export declare function useStoreRole(): (saved: RoleInfo) => NoInfer<{
|
|
39
|
+
code: string;
|
|
40
|
+
name: string;
|
|
41
|
+
description: string;
|
|
42
|
+
kind: import("../../../shared/api/generated/schema").components["schemas"]["PrincipalKind"];
|
|
43
|
+
built_in: boolean;
|
|
44
|
+
platform: boolean;
|
|
45
|
+
source: string | null;
|
|
46
|
+
permissions: import("../../../shared/api/generated/schema").components["schemas"]["Permission"][];
|
|
47
|
+
contains?: string[];
|
|
48
|
+
inherited_permissions?: import("../../../shared/api/generated/schema").components["schemas"]["Permission"][];
|
|
49
|
+
customized: boolean;
|
|
50
|
+
version: number;
|
|
51
|
+
created_at: number;
|
|
52
|
+
created_by: string;
|
|
53
|
+
updated_at: number;
|
|
54
|
+
updated_by: string;
|
|
55
|
+
}[]> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useQuery as e,useQueryClient as t}from"@tanstack/react-query";import{getLicense as n,getPermissionCatalog as r,getRoles as i}from"@/shared/api/roles";export function useAccessData(t){let a=e({queryKey:[`roles`],queryFn:({signal:e})=>i(e),enabled:t,retry:!1}),o=e({queryKey:[`permissions`],queryFn:({signal:e})=>r(e),enabled:t,staleTime:1/0,retry:!1}),s=e({queryKey:[`license`],queryFn:({signal:e})=>n(e),enabled:t,retry:!1});return{roles:a,catalog:o,license:s,licensed:e=>!s.data||s.data.permissions.includes(e)}}export function useStoreRole(){let e=t();return t=>e.setQueryData([`roles`],e=>e?.map(e=>e.code===t.code?t:e))}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type LogLevel } from '@/shared/api/administration';
|
|
2
|
+
export declare function useLogging(enabled: boolean): import("@tanstack/react-query").UseQueryResult<import("@/shared/api/administration").Versioned<{
|
|
3
|
+
level: import("../../../shared/api/generated/schema").components["schemas"]["LogLevel"];
|
|
4
|
+
max_bytes: number;
|
|
5
|
+
backup_count: number;
|
|
6
|
+
version: number;
|
|
7
|
+
persistent: true;
|
|
8
|
+
scope: "deployment";
|
|
9
|
+
refresh_seconds: number;
|
|
10
|
+
created_at: number;
|
|
11
|
+
created_by: string;
|
|
12
|
+
updated_at: number;
|
|
13
|
+
updated_by: string;
|
|
14
|
+
runtime: import("../../../shared/api/generated/schema").components["schemas"]["LoggingRuntimeRead"];
|
|
15
|
+
}>, Error>;
|
|
16
|
+
/** Log files change constantly: no cache across visits; refresh is explicit. */
|
|
17
|
+
export declare function useLogFiles(enabled: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
18
|
+
name: string;
|
|
19
|
+
size_bytes: number;
|
|
20
|
+
modified_at: number;
|
|
21
|
+
current: boolean;
|
|
22
|
+
}[], Error>;
|
|
23
|
+
export declare function useLogTail(name: string | null, filters: {
|
|
24
|
+
level?: LogLevel;
|
|
25
|
+
contains?: string;
|
|
26
|
+
}, enabled: boolean): import("@tanstack/react-query").UseQueryResult<{
|
|
27
|
+
file: import("../../../shared/api/generated/schema").components["schemas"]["LogFileRead"];
|
|
28
|
+
entries: import("../../../shared/api/generated/schema").components["schemas"]["LogEntryRead"][];
|
|
29
|
+
truncated: boolean;
|
|
30
|
+
}, Error>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useQuery as e}from"@tanstack/react-query";import{getLogFiles as t,getLogging as n,getLogTail as r}from"@/shared/api/administration";export function useLogging(t){return e({queryKey:[`admin`,`logging`],queryFn:({signal:e})=>n(e),enabled:t,staleTime:1/0,refetchOnWindowFocus:!1})}export function useLogFiles(n){return e({queryKey:[`admin`,`log-files`],queryFn:({signal:e})=>t(e),enabled:n,staleTime:0,gcTime:0,refetchOnWindowFocus:!1})}export function useLogTail(t,n,i){return e({queryKey:[`admin`,`log-tail`,t,n.level??null,n.contains??``],queryFn:({signal:e})=>r(t??``,n,e),enabled:i&&!!t,staleTime:0,gcTime:0,refetchOnWindowFocus:!1})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AccessPage}from"./pages/AccessPage";export{LoggingPage}from"./pages/LoggingPage";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const roleKindLabel=e=>e===`service`?`API role (machines)`:`UI role (people)`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RoleInfo } from '@/shared/api/roles';
|
|
2
|
+
import { type StatusHue } from '@/shared/lib/status-tones';
|
|
3
|
+
/** Where a role comes from, as the role list and editor say it. */
|
|
4
|
+
export type RoleOrigin = {
|
|
5
|
+
label: string;
|
|
6
|
+
hue: StatusHue;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A role's origin: a platform role, the tenant's built-in administrator, a role an
|
|
10
|
+
* application brought (named after the application), or one an administrator created.
|
|
11
|
+
*/
|
|
12
|
+
export declare function roleOrigin(role: Pick<RoleInfo, 'platform' | 'source'>, applicationNames?: ReadonlyMap<string, string>): RoleOrigin;
|
|
13
|
+
export declare const roleOriginClass: (origin: RoleOrigin) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hueToneClass as e}from"@/shared/lib/status-tones";export function roleOrigin(e,t=new Map){return e.platform?{label:`Platform`,hue:`violet`}:e.source===`tenant`?{label:`Built-in`,hue:`blue`}:e.source?{label:`From ${t.get(e.source)??e.source}`,hue:`teal`}:{label:`Custom`,hue:`amber`}}export const roleOriginClass=t=>e(t.hue);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e}from"react";import{useMutation as t,useQueryClient as n}from"@tanstack/react-query";import{Plus as r}from"lucide-react";import{useLocation as i,useNavigate as a,useParams as o}from"react-router-dom";import{createRole as s}from"@/shared/api/roles";import{useSession as c}from"@/shared/auth/session-context";import{ErrorNotice as l}from"@/shared/components/layout/ErrorNotice";import{Button as u}from"@/shared/components/ui/button";import{ControlHeader as d}from"@/shared/components/workspace/ControlHeader";import{SidePanel as f}from"@/shared/components/workspace/SidePanel";import{NewRoleForm as p}from"../components/NewRoleForm";import{RoleEditor as m}from"../components/RoleEditor";import{RoleList as h}from"../components/RoleList";import{useApplicationNames as g}from"@/shared/hooks/useApplications";import{useAccessData as _}from"../hooks/useAccess";import{paths as v}from"@/app/paths";import{notify as y}from"@/shared/lib/notify";import{BackLink as b}from"@/shared/components/workspace/BackLink";import{jsx as x,jsxs as S,Fragment as C}from"react/jsx-runtime";export function AccessPage(){let{can:w}=c(),T=w(`admin.access.write`),{code:E}=o(),D=g(),O=a(),{search:k}=i(),A=n(),{roles:j}=_(T),[M,N]=e(!1),P=t({mutationFn:s,onSuccess:e=>{A.setQueryData([`roles`],t=>[...t??[],e].sort((e,t)=>e.name.localeCompare(t.name))),N(!1),y.success(`Role created.`),O({pathname:`${v.access}/${e.code}`,search:k},{replace:!0})},retry:!1}),F=j.data??[];return S(`div`,{className:`workspace-admin`,children:[x(d,{title:`Roles & access`,description:`Decide what each role may see and do: pages for people, API groups for machines.`,actions:T&&S(u,{onClick:()=>N(!0),children:[x(r,{}),`Role`]})}),T?j.isPending?x(`output`,{className:`block rounded-2xl border bg-card p-6 text-sm`,children:`Loading roles…`}):j.isError?x(l,{error:j.error,retry:()=>void j.refetch()}):S(C,{children:[x(`p`,{className:`mb-3 text-xs text-muted-foreground`}),M&&S(f,{label:`New role`,size:`md`,onClose:()=>N(!1),children:[x(p,{busy:P.isPending,onCreate:e=>P.mutate(e),onCancel:()=>N(!1)}),P.error&&x(`div`,{className:`px-5 pb-5`,children:x(l,{error:P.error})})]}),E?S(C,{children:[x(b,{to:{pathname:v.access,search:k},children:`All roles`}),x(m,{code:E},E)]}):x(h,{roles:F,applicationNames:D})]}):x(`p`,{role:`alert`,children:`You do not have access to roles and access administration.`})]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function LoggingPage(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e}from"react";import{useMutation as t,useQueryClient as n}from"@tanstack/react-query";import{Check as r,Cpu as i,Gauge as a,GitCommitVertical as o,HardDrive as s,RefreshCw as c,Save as l,TimerReset as u,TriangleAlert as d}from"lucide-react";import{useSession as f}from"@/shared/auth/session-context";import{updateLogging as p}from"@/shared/api/administration";import{Button as m}from"@/shared/components/ui/button";import{Input as h}from"@/shared/components/ui/input";import{ErrorNotice as g}from"@/shared/components/layout/ErrorNotice";import{LogFilesPanel as _}from"../components/LogFilesPanel";import{ControlHeader as v}from"@/shared/components/workspace/ControlHeader";import{PageActions as y}from"@/shared/components/workspace/PageActions";import{SettingsFeedback as b}from"@/shared/components/workspace/SettingsFeedback";import{StatStrip as x}from"@/shared/components/workspace/StatStrip";import{usePersonName as S}from"@/shared/hooks/usePersonNames";import{notify as C}from"@/shared/lib/notify";import{cn as w}from"@/shared/lib/utils";import{useLogging as T}from"../hooks/useAdministration";import{formatInstant as E}from"@/shared/lib/datetime";import{formatNumber as D}from"@/shared/lib/format";import{jsx as O,jsxs as k}from"react/jsx-runtime";const A=[{value:`DEBUG`,label:`Debug`,description:`Fine-grained diagnostics`,tone:`bg-info`},{value:`INFO`,label:`Info`,description:`Normal operations`,tone:`bg-success`,recommended:!0},{value:`WARNING`,label:`Warning`,description:`Unexpected conditions`,tone:`bg-warning`},{value:`ERROR`,label:`Error`,description:`Failures only`,tone:`bg-destructive`}],j=1048576;function M({saved:f,writable:g,reload:_}){let[v,T]=e(f.data.level),[M,N]=e(String(f.data.max_bytes/j)),[P,F]=e(String(f.data.backup_count)),I=n(),L=S(f.data.updated_by),R=t({mutationFn:()=>p({level:v,max_bytes:Math.round(Number(M)*j),backup_count:Number(P)},f.etag),onSuccess:e=>{I.setQueryData([`admin`,`logging`],e),C.success(`Logging settings saved.`)},retry:!1}),z=Number(M)>0&&Math.round(Number(M)*j)<=0x7fffffff&&Number.isInteger(Number(P))&&Number(P)>=1&&Number(P)<=100,B=v!==f.data.level||Math.round(Number(M)*j)!==f.data.max_bytes||Number(P)!==f.data.backup_count,V=R.isPending,{runtime:H}=f.data,U=H.applied_version===f.data.version&&H.level===f.data.level,W=z?`${D(Number(M)*(Number(P)+1),{maximumFractionDigits:2})} MiB`:`—`;return k(`form`,{id:`logging-configuration`,onSubmit:e=>{e.preventDefault(),z&&B&&g&&R.mutate()},className:`space-y-5`,children:[k(y,{children:[k(m,{variant:`outline`,disabled:V,onClick:_,children:[O(c,{}),B?`Discard changes`:`Refresh`]}),k(m,{type:`submit`,form:`logging-configuration`,disabled:!g||!B||!z||V,children:[O(l,{}),V?`Saving…`:`Save configuration`]})]}),O(x,{label:`Runtime status`,stats:[{icon:a,label:`Serving level`,value:H.level,note:k(`span`,{className:`inline-flex items-center gap-1.5`,children:[O(`span`,{"aria-hidden":`true`,className:w(`size-1.5 rounded-full`,U?`bg-success`:`bg-warning`)}),U?`Saved version applied`:`Waiting for saved version`]})},{icon:o,label:`Saved version`,value:k(`span`,{children:[`v`,f.data.version]}),note:`${E(f.data.updated_at)} · ${L}`},{icon:u,label:`Propagation`,value:`${f.data.refresh_seconds}s`,note:`Stored in the database; other processes refresh`},{icon:i,label:`Process ${H.process_id}`,value:H.file_enabled?`File + console`:`Console only`,note:`Deployment-wide · the process serving you`}]}),k(`section`,{"aria-label":`Logging configuration`,className:`rounded-2xl border bg-card`,children:[k(`div`,{className:`grid lg:grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)]`,children:[k(`fieldset`,{disabled:!g||V,className:`min-w-0 p-5 lg:border-r`,children:[O(`legend`,{className:`sr-only`,children:`Log level`}),k(`div`,{className:`mb-4 flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1`,children:[O(`h2`,{className:`text-sm font-semibold`,children:`Verbosity`}),O(`p`,{className:`text-xs text-muted-foreground`,children:`Minimum severity to record`})]}),O(`div`,{className:`grid grid-cols-2 gap-2 sm:grid-cols-4`,children:A.map(e=>{let t=v===e.value;return k(`label`,{className:w(`flex cursor-pointer flex-col rounded-xl border px-3 py-2.5 transition-colors has-focus-visible:ring-2 has-focus-visible:ring-ring`,t?`border-primary bg-accent ring-1 ring-primary`:`hover:border-primary/40 hover:bg-muted/40`,!g&&`cursor-default`),children:[O(`input`,{type:`radio`,name:`log-level`,value:e.value,checked:t,onChange:()=>T(e.value),className:`sr-only`}),k(`span`,{className:`flex items-center gap-2`,children:[O(`span`,{"aria-hidden":`true`,className:w(`size-2 rounded-full`,e.tone)}),O(`span`,{className:`text-sm font-semibold`,children:e.label}),t&&O(r,{className:`ml-auto size-4 text-primary`,"aria-hidden":`true`})]}),O(`span`,{className:`mt-1 text-xs text-muted-foreground`,children:e.description}),`recommended`in e&&O(`span`,{className:`mt-0.5 text-xs font-medium text-primary`,children:`Recommended`})]},e.value)})}),v===`DEBUG`&&k(`p`,{className:`mt-3 flex items-center gap-2 text-xs text-warning-foreground`,children:[O(d,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),`Debug increases log volume. Return to Info after investigating.`]})]}),k(`fieldset`,{disabled:!g||V,className:`min-w-0 border-t p-5 lg:border-t-0`,children:[O(`legend`,{className:`sr-only`,children:`File rotation limits`}),k(`div`,{className:`mb-4 flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1`,children:[O(`h2`,{className:`text-sm font-semibold`,children:`Rotation & retention`}),O(`p`,{className:`text-xs text-muted-foreground`,children:`Full logs roll into backups`})]}),k(`div`,{className:`grid grid-cols-2 gap-3`,children:[k(`label`,{htmlFor:`log-file-size`,className:`grid gap-1.5 text-xs font-medium`,children:[k(`span`,{children:[`Maximum file size `,O(`span`,{className:`font-normal text-muted-foreground`,children:`(MiB)`})]}),O(h,{id:`log-file-size`,type:`number`,step:`any`,min:`0.000001`,max:`2047.999999`,value:M,onChange:e=>N(e.target.value),required:!0})]}),k(`label`,{htmlFor:`log-backups`,className:`grid gap-1.5 text-xs font-medium`,children:[k(`span`,{children:[`Backup files `,O(`span`,{className:`font-normal text-muted-foreground`,children:`(1–100)`})]}),O(h,{id:`log-backups`,type:`number`,min:`1`,max:`100`,step:`1`,value:P,onChange:e=>F(e.target.value),required:!0})]})]}),k(`p`,{className:`mt-3 flex items-center gap-2 text-xs text-muted-foreground`,children:[O(s,{className:`size-3.5 shrink-0 text-primary`,"aria-hidden":`true`}),k(`span`,{children:[`Up to `,O(`strong`,{className:`text-foreground`,children:W}),` per process, including the active file.`]})]}),Number(P)<f.data.backup_count&&O(`p`,{className:`mt-2 text-xs text-warning-foreground`,children:`Saving a lower limit immediately removes surplus backups.`})]})]}),R.error&&O(`div`,{className:`border-t p-5`,children:O(b,{error:R.error,reload:_})}),O(`div`,{className:`flex flex-wrap items-center justify-between gap-3 rounded-b-2xl border-t bg-muted/20 px-5 py-3`,children:k(`output`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[O(`span`,{className:w(`size-2 rounded-full`,B?`bg-warning`:`bg-success`)}),g?B?`Unsaved configuration changes`:`All changes saved`:`Read-only access`]})})]})]})}export function LoggingPage(){let{can:t,user:n}=f(),r=t(`admin.logging.read`)&&n?.tenant_id===null,i=T(r),[a,o]=e(0),s=async()=>{(await i.refetch()).data&&o(e=>e+1)};return k(`div`,{className:`workspace-admin`,children:[O(v,{title:`Runtime logging`,description:`Tune diagnostic detail and retention. Saved once, applied across your deployment.`}),r?i.isPending?O(`output`,{children:`Loading logging configuration…`}):i.isError?O(g,{error:i.error,retry:()=>void i.refetch()}):O(M,{saved:i.data,writable:t(`admin.logging.write`),reload:()=>void s()},`${i.data.data.version}:${a}`):O(`p`,{role:`alert`,children:`You do not have access to logging administration.`}),r&&O(_,{})]})}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# API reference
|
|
2
|
+
|
|
3
|
+
Routes import only `index.ts` (ApiReferencePage). Features never import each other; shared
|
|
4
|
+
code lives in `src/shared/`.
|
|
5
|
+
|
|
6
|
+
| Folder | What lives there |
|
|
7
|
+
| -------- | ------------------------------------------ |
|
|
8
|
+
| `pages/` | Routed pages (exported through `index.ts`) |
|
|
9
|
+
|
|
10
|
+
Tests live in `src/test/features/api-reference/`, mirroring these folders.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ApiReferencePage } from './pages/ApiReferencePage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{ApiReferencePage}from"./pages/ApiReferencePage";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ApiReferencePage(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useGrid as e}from"@/shared/hooks/useGrid";import{GridSortSelect as t}from"@/shared/components/workspace/GridSortSelect";import{ArrowUpRight as n}from"lucide-react";import{endpoints as r}from"@/shared/api/reference";import{ControlHeader as i}from"@/shared/components/workspace/ControlHeader";import{SearchInput as a}from"@/shared/components/workspace/SearchInput";import{useSession as o}from"@/shared/auth/session-context";import{env as s}from"@/shared/config/env";import{cn as c}from"@/shared/lib/utils";import{jsx as l,jsxs as u,Fragment as d}from"react/jsx-runtime";const f={GET:`border-success/30 bg-success/10 text-success-foreground`,POST:`border-workspace/30 bg-workspace/10 text-workspace`,PUT:`border-info/30 bg-info/10 text-info-foreground`,PATCH:`border-info/30 bg-info/10 text-info-foreground`,DELETE:`border-destructive/30 bg-destructive/10 text-destructive`};export function ApiReferencePage(){let{can:p}=o(),m=e({method:e=>e.method,path:e=>e.path,title:e=>e.title,description:e=>e.description}),h=m.apply(r);return u(`div`,{className:`workspace-admin max-w-5xl`,children:[l(i,{title:`API reference`,description:`Every published application endpoint. Open any row in the interactive docs to try it.`,actions:l(d,{children:u(`a`,{href:s.apiDocsUrl,target:`_blank`,rel:`noreferrer`,className:`inline-flex h-8 items-center gap-1.5 rounded-lg border px-3 text-xs font-medium text-primary hover:bg-muted/40`,children:[`Open interactive docs`,l(n,{className:`size-3.5`,"aria-hidden":`true`})]})})}),p(`platform.reference.read`)?u(`section`,{"aria-label":`Endpoints`,className:`rounded-2xl border bg-card`,children:[u(`div`,{className:`flex gap-2 border-b p-2.5`,children:[l(a,{label:`Search endpoints`,value:m.search,onChange:m.setSearch,placeholder:`Filter across all columns...`}),l(t,{sort:m.sort,onSort:m.toggleSort,columns:[{value:`method`,label:`Method`},{value:`path`,label:`Path`},{value:`title`,label:`Summary`}]})]}),u(`div`,{className:`divide-y`,children:[h.map(e=>u(`article`,{className:`flex items-center gap-3 px-4 py-2 hover:bg-muted/30`,children:[l(`span`,{className:c(`w-16 shrink-0 rounded-md border py-0.5 text-center text-[12px] font-semibold`,f[e.method]??`text-muted-foreground`),children:e.method}),u(`div`,{className:`min-w-0 flex-1`,children:[u(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[l(`code`,{className:`shrink-0 truncate text-xs`,children:e.path}),l(`h2`,{className:`truncate text-xs font-semibold`,children:e.title})]}),l(`p`,{className:`truncate text-xs text-muted-foreground`,title:e.description,children:e.description})]}),l(`a`,{href:`${s.apiDocsUrl}${e.anchor}`,target:`_blank`,rel:`noreferrer`,"aria-label":`Open documentation for ${e.title}`,title:`Open in interactive docs`,className:`grid size-7 shrink-0 place-items-center rounded-md text-primary hover:bg-secondary`,children:l(n,{className:`size-4`,"aria-hidden":`true`})})]},`${e.method}:${e.path}`)),!h.length&&l(`p`,{className:`p-6 text-center text-xs text-muted-foreground`,children:`No endpoints match.`})]})]}):l(`p`,{role:`alert`,children:`You do not have access to the API reference.`})]})}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Auth
|
|
2
|
+
|
|
3
|
+
Routes import only `index.ts` (LoginPage, PasswordPage). Session and permissions live in
|
|
4
|
+
`src/shared/auth/`; features never import each other.
|
|
5
|
+
|
|
6
|
+
| Folder | What lives there |
|
|
7
|
+
| -------- | ------------------------------------------ |
|
|
8
|
+
| `pages/` | Routed pages (exported through `index.ts`) |
|
|
9
|
+
|
|
10
|
+
The sign-in story panel and its words live in `src/shared/components/sign-in/`: tenant
|
|
11
|
+
configuration previews them too.
|
|
12
|
+
|
|
13
|
+
Tests live in `src/test/features/auth/`, mirroring these folders.
|