@endora-commerce/admin-shell 0.0.0-stage → 0.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +49 -2
- package/dist/AdminRoot.d.ts +45 -0
- package/dist/AdminRoot.d.ts.map +1 -0
- package/dist/AdminRoot.js +39 -0
- package/dist/AdminRoot.js.map +1 -0
- package/dist/App.d.ts +42 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +94 -0
- package/dist/App.js.map +1 -0
- package/dist/components/AppShell.d.ts +5 -0
- package/dist/components/AppShell.d.ts.map +1 -0
- package/dist/components/AppShell.js +1259 -0
- package/dist/components/AppShell.js.map +1 -0
- package/dist/components/BrandLogo.d.ts +21 -0
- package/dist/components/BrandLogo.d.ts.map +1 -0
- package/dist/components/BrandLogo.js +21 -0
- package/dist/components/BrandLogo.js.map +1 -0
- package/dist/components/FederatedSignIn.d.ts +42 -0
- package/dist/components/FederatedSignIn.d.ts.map +1 -0
- package/dist/components/FederatedSignIn.js +56 -0
- package/dist/components/FederatedSignIn.js.map +1 -0
- package/dist/components/FileDropzone.d.ts +17 -0
- package/dist/components/FileDropzone.d.ts.map +1 -0
- package/dist/components/FileDropzone.js +17 -0
- package/dist/components/FileDropzone.js.map +1 -0
- package/dist/components/IdleLogout.d.ts +2 -0
- package/dist/components/IdleLogout.d.ts.map +1 -0
- package/dist/components/IdleLogout.js +90 -0
- package/dist/components/IdleLogout.js.map +1 -0
- package/dist/components/ImpersonationBanner.d.ts +13 -0
- package/dist/components/ImpersonationBanner.d.ts.map +1 -0
- package/dist/components/ImpersonationBanner.js +10 -0
- package/dist/components/ImpersonationBanner.js.map +1 -0
- package/dist/components/LanguagePicker.d.ts +3 -0
- package/dist/components/LanguagePicker.d.ts.map +1 -0
- package/dist/components/LanguagePicker.js +127 -0
- package/dist/components/LanguagePicker.js.map +1 -0
- package/dist/components/LoginPage.d.ts +11 -0
- package/dist/components/LoginPage.d.ts.map +1 -0
- package/dist/components/LoginPage.js +44 -0
- package/dist/components/LoginPage.js.map +1 -0
- package/dist/components/PaginationFooter.d.ts +18 -0
- package/dist/components/PaginationFooter.d.ts.map +1 -0
- package/dist/components/PaginationFooter.js +17 -0
- package/dist/components/PaginationFooter.js.map +1 -0
- package/dist/components/ResponsiveTable.d.ts +18 -0
- package/dist/components/ResponsiveTable.d.ts.map +1 -0
- package/dist/components/ResponsiveTable.js +17 -0
- package/dist/components/ResponsiveTable.js.map +1 -0
- package/dist/components/RowActionMenu.d.ts +18 -0
- package/dist/components/RowActionMenu.d.ts.map +1 -0
- package/dist/components/RowActionMenu.js +17 -0
- package/dist/components/RowActionMenu.js.map +1 -0
- package/dist/components/SpeechToTextButton.d.ts +14 -0
- package/dist/components/SpeechToTextButton.d.ts.map +1 -0
- package/dist/components/SpeechToTextButton.js +19 -0
- package/dist/components/SpeechToTextButton.js.map +1 -0
- package/dist/components/StickyFormActions.d.ts +18 -0
- package/dist/components/StickyFormActions.d.ts.map +1 -0
- package/dist/components/StickyFormActions.js +17 -0
- package/dist/components/StickyFormActions.js.map +1 -0
- package/dist/components/TouchReorderButtons.d.ts +18 -0
- package/dist/components/TouchReorderButtons.d.ts.map +1 -0
- package/dist/components/TouchReorderButtons.js +17 -0
- package/dist/components/TouchReorderButtons.js.map +1 -0
- package/dist/components/admin-user-picker/AdminUserPicker.d.ts +18 -0
- package/dist/components/admin-user-picker/AdminUserPicker.d.ts.map +1 -0
- package/dist/components/admin-user-picker/AdminUserPicker.js +17 -0
- package/dist/components/admin-user-picker/AdminUserPicker.js.map +1 -0
- package/dist/components/asset-picker/AssetFieldPicker.d.ts +21 -0
- package/dist/components/asset-picker/AssetFieldPicker.d.ts.map +1 -0
- package/dist/components/asset-picker/AssetFieldPicker.js +20 -0
- package/dist/components/asset-picker/AssetFieldPicker.js.map +1 -0
- package/dist/components/category-picker/CategorySelect.d.ts +18 -0
- package/dist/components/category-picker/CategorySelect.d.ts.map +1 -0
- package/dist/components/category-picker/CategorySelect.js +17 -0
- package/dist/components/category-picker/CategorySelect.js.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.d.ts +18 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.d.ts.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.js +17 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.js.map +1 -0
- package/dist/components/category-tree-picker/category-tree-utils.d.ts +18 -0
- package/dist/components/category-tree-picker/category-tree-utils.d.ts.map +1 -0
- package/dist/components/category-tree-picker/category-tree-utils.js +17 -0
- package/dist/components/category-tree-picker/category-tree-utils.js.map +1 -0
- package/dist/components/category-tree-picker/index.d.ts +18 -0
- package/dist/components/category-tree-picker/index.d.ts.map +1 -0
- package/dist/components/category-tree-picker/index.js +17 -0
- package/dist/components/category-tree-picker/index.js.map +1 -0
- package/dist/components/charts/echart.d.ts +18 -0
- package/dist/components/charts/echart.d.ts.map +1 -0
- package/dist/components/charts/echart.js +17 -0
- package/dist/components/charts/echart.js.map +1 -0
- package/dist/components/cms-picker/CmsBlockPicker.d.ts +19 -0
- package/dist/components/cms-picker/CmsBlockPicker.d.ts.map +1 -0
- package/dist/components/cms-picker/CmsBlockPicker.js +18 -0
- package/dist/components/cms-picker/CmsBlockPicker.js.map +1 -0
- package/dist/components/cms-picker/CmsPagePicker.d.ts +19 -0
- package/dist/components/cms-picker/CmsPagePicker.d.ts.map +1 -0
- package/dist/components/cms-picker/CmsPagePicker.js +18 -0
- package/dist/components/cms-picker/CmsPagePicker.js.map +1 -0
- package/dist/components/country-select/index.d.ts +18 -0
- package/dist/components/country-select/index.d.ts.map +1 -0
- package/dist/components/country-select/index.js +17 -0
- package/dist/components/country-select/index.js.map +1 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.d.ts +18 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.d.ts.map +1 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.js +17 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.js.map +1 -0
- package/dist/components/customer-picker/CustomerPicker.d.ts +18 -0
- package/dist/components/customer-picker/CustomerPicker.d.ts.map +1 -0
- package/dist/components/customer-picker/CustomerPicker.js +17 -0
- package/dist/components/customer-picker/CustomerPicker.js.map +1 -0
- package/dist/components/hooks/useFocusTrap.d.ts +17 -0
- package/dist/components/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/components/hooks/useFocusTrap.js +17 -0
- package/dist/components/hooks/useFocusTrap.js.map +1 -0
- package/dist/components/hooks/useSpeechToText.d.ts +15 -0
- package/dist/components/hooks/useSpeechToText.d.ts.map +1 -0
- package/dist/components/hooks/useSpeechToText.js +63 -0
- package/dist/components/hooks/useSpeechToText.js.map +1 -0
- package/dist/components/hooks/useViewportTier.d.ts +18 -0
- package/dist/components/hooks/useViewportTier.d.ts.map +1 -0
- package/dist/components/hooks/useViewportTier.js +17 -0
- package/dist/components/hooks/useViewportTier.js.map +1 -0
- package/dist/components/notifications/NotificationBell.d.ts +13 -0
- package/dist/components/notifications/NotificationBell.d.ts.map +1 -0
- package/dist/components/notifications/NotificationBell.js +154 -0
- package/dist/components/notifications/NotificationBell.js.map +1 -0
- package/dist/components/notifications/index.d.ts +3 -0
- package/dist/components/notifications/index.d.ts.map +1 -0
- package/dist/components/notifications/index.js +3 -0
- package/dist/components/notifications/index.js.map +1 -0
- package/dist/components/notifications/useAdminNotifications.d.ts +41 -0
- package/dist/components/notifications/useAdminNotifications.d.ts.map +1 -0
- package/dist/components/notifications/useAdminNotifications.js +86 -0
- package/dist/components/notifications/useAdminNotifications.js.map +1 -0
- package/dist/components/organization-picker/OrganizationPicker.d.ts +19 -0
- package/dist/components/organization-picker/OrganizationPicker.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationPicker.js +18 -0
- package/dist/components/organization-picker/OrganizationPicker.js.map +1 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.d.ts +19 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.js +18 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.js.map +1 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.d.ts +19 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.js +18 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.js.map +1 -0
- package/dist/components/organization-picker/index.d.ts +19 -0
- package/dist/components/organization-picker/index.d.ts.map +1 -0
- package/dist/components/organization-picker/index.js +18 -0
- package/dist/components/organization-picker/index.js.map +1 -0
- package/dist/components/organization-picker/useOrganizationsQuery.d.ts +19 -0
- package/dist/components/organization-picker/useOrganizationsQuery.d.ts.map +1 -0
- package/dist/components/organization-picker/useOrganizationsQuery.js +18 -0
- package/dist/components/organization-picker/useOrganizationsQuery.js.map +1 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.d.ts +17 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.d.ts.map +1 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.js +17 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.js.map +1 -0
- package/dist/components/prompt-actions/PromptModePanel.d.ts +24 -0
- package/dist/components/prompt-actions/PromptModePanel.d.ts.map +1 -0
- package/dist/components/prompt-actions/PromptModePanel.js +115 -0
- package/dist/components/prompt-actions/PromptModePanel.js.map +1 -0
- package/dist/components/prompt-actions/PromptPlanPreview.d.ts +20 -0
- package/dist/components/prompt-actions/PromptPlanPreview.d.ts.map +1 -0
- package/dist/components/prompt-actions/PromptPlanPreview.js +12 -0
- package/dist/components/prompt-actions/PromptPlanPreview.js.map +1 -0
- package/dist/components/reorder/ReorderAnnouncer.d.ts +18 -0
- package/dist/components/reorder/ReorderAnnouncer.d.ts.map +1 -0
- package/dist/components/reorder/ReorderAnnouncer.js +17 -0
- package/dist/components/reorder/ReorderAnnouncer.js.map +1 -0
- package/dist/components/reorder/useReorderList.d.ts +18 -0
- package/dist/components/reorder/useReorderList.d.ts.map +1 -0
- package/dist/components/reorder/useReorderList.js +17 -0
- package/dist/components/reorder/useReorderList.js.map +1 -0
- package/dist/components/rule-builder/RuleBuilder.d.ts +18 -0
- package/dist/components/rule-builder/RuleBuilder.d.ts.map +1 -0
- package/dist/components/rule-builder/RuleBuilder.js +17 -0
- package/dist/components/rule-builder/RuleBuilder.js.map +1 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.d.ts +19 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.d.ts.map +1 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.js +18 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.js.map +1 -0
- package/dist/components/scope-notice/ScopeNotice.d.ts +18 -0
- package/dist/components/scope-notice/ScopeNotice.d.ts.map +1 -0
- package/dist/components/scope-notice/ScopeNotice.js +17 -0
- package/dist/components/scope-notice/ScopeNotice.js.map +1 -0
- package/dist/components/ui/alert.d.ts +18 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +17 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/badge.d.ts +18 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +17 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.d.ts +18 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +17 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/card.d.ts +17 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +17 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +17 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +17 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +5 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/color-picker.d.ts +17 -0
- package/dist/components/ui/color-picker.d.ts.map +1 -0
- package/dist/components/ui/color-picker.js +17 -0
- package/dist/components/ui/color-picker.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +18 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +17 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/input.d.ts +17 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +17 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +17 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +17 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/multi-select.d.ts +18 -0
- package/dist/components/ui/multi-select.d.ts.map +1 -0
- package/dist/components/ui/multi-select.js +17 -0
- package/dist/components/ui/multi-select.js.map +1 -0
- package/dist/components/ui/page-header.d.ts +18 -0
- package/dist/components/ui/page-header.d.ts.map +1 -0
- package/dist/components/ui/page-header.js +17 -0
- package/dist/components/ui/page-header.js.map +1 -0
- package/dist/components/ui/route-tabs.d.ts +18 -0
- package/dist/components/ui/route-tabs.d.ts.map +1 -0
- package/dist/components/ui/route-tabs.js +17 -0
- package/dist/components/ui/route-tabs.js.map +1 -0
- package/dist/components/ui/save-button-group.d.ts +18 -0
- package/dist/components/ui/save-button-group.d.ts.map +1 -0
- package/dist/components/ui/save-button-group.js +17 -0
- package/dist/components/ui/save-button-group.js.map +1 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +17 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +17 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +17 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/table.d.ts +17 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +17 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +17 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +17 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/i18n/TranslationProvider.d.ts +18 -0
- package/dist/i18n/TranslationProvider.d.ts.map +1 -0
- package/dist/i18n/TranslationProvider.js +17 -0
- package/dist/i18n/TranslationProvider.js.map +1 -0
- package/dist/i18n/app-language-context.d.ts +18 -0
- package/dist/i18n/app-language-context.d.ts.map +1 -0
- package/dist/i18n/app-language-context.js +17 -0
- package/dist/i18n/app-language-context.js.map +1 -0
- package/dist/i18n/interpolate.d.ts +17 -0
- package/dist/i18n/interpolate.d.ts.map +1 -0
- package/dist/i18n/interpolate.js +17 -0
- package/dist/i18n/interpolate.js.map +1 -0
- package/dist/i18n/language-storage.d.ts +17 -0
- package/dist/i18n/language-storage.d.ts.map +1 -0
- package/dist/i18n/language-storage.js +17 -0
- package/dist/i18n/language-storage.js.map +1 -0
- package/dist/i18n/preauth-login-copy.d.ts +36 -0
- package/dist/i18n/preauth-login-copy.d.ts.map +1 -0
- package/dist/i18n/preauth-login-copy.js +36 -0
- package/dist/i18n/preauth-login-copy.js.map +1 -0
- package/dist/i18n/resolver.d.ts +18 -0
- package/dist/i18n/resolver.d.ts.map +1 -0
- package/dist/i18n/resolver.js +17 -0
- package/dist/i18n/resolver.js.map +1 -0
- package/dist/i18n/types.d.ts +17 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +2 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/i18n/useTranslation.d.ts +17 -0
- package/dist/i18n/useTranslation.d.ts.map +1 -0
- package/dist/i18n/useTranslation.js +17 -0
- package/dist/i18n/useTranslation.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/admin-actions/AdminActionsProvider.d.ts +29 -0
- package/dist/lib/admin-actions/AdminActionsProvider.d.ts.map +1 -0
- package/dist/lib/admin-actions/AdminActionsProvider.js +51 -0
- package/dist/lib/admin-actions/AdminActionsProvider.js.map +1 -0
- package/dist/lib/admin-actions/api.d.ts +10 -0
- package/dist/lib/admin-actions/api.d.ts.map +1 -0
- package/dist/lib/admin-actions/api.js +13 -0
- package/dist/lib/admin-actions/api.js.map +1 -0
- package/dist/lib/admin-actions/icon-map.d.ts +17 -0
- package/dist/lib/admin-actions/icon-map.d.ts.map +1 -0
- package/dist/lib/admin-actions/icon-map.js +17 -0
- package/dist/lib/admin-actions/icon-map.js.map +1 -0
- package/dist/lib/admin-actions/useAdminActions.d.ts +17 -0
- package/dist/lib/admin-actions/useAdminActions.d.ts.map +1 -0
- package/dist/lib/admin-actions/useAdminActions.js +34 -0
- package/dist/lib/admin-actions/useAdminActions.js.map +1 -0
- package/dist/lib/api-client.d.ts +17 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +17 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/auth.d.ts +18 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +17 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/federated-sign-in/api.d.ts +4 -0
- package/dist/lib/federated-sign-in/api.d.ts.map +1 -0
- package/dist/lib/federated-sign-in/api.js +38 -0
- package/dist/lib/federated-sign-in/api.js.map +1 -0
- package/dist/lib/federated-sign-in/index.d.ts +4 -0
- package/dist/lib/federated-sign-in/index.d.ts.map +1 -0
- package/dist/lib/federated-sign-in/index.js +4 -0
- package/dist/lib/federated-sign-in/index.js.map +1 -0
- package/dist/lib/federated-sign-in/resolve.d.ts +47 -0
- package/dist/lib/federated-sign-in/resolve.d.ts.map +1 -0
- package/dist/lib/federated-sign-in/resolve.js +24 -0
- package/dist/lib/federated-sign-in/resolve.js.map +1 -0
- package/dist/lib/federated-sign-in/useFederatedSignIn.d.ts +15 -0
- package/dist/lib/federated-sign-in/useFederatedSignIn.d.ts.map +1 -0
- package/dist/lib/federated-sign-in/useFederatedSignIn.js +37 -0
- package/dist/lib/federated-sign-in/useFederatedSignIn.js.map +1 -0
- package/dist/lib/format.d.ts +17 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +17 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/module-presence/index.d.ts +19 -0
- package/dist/lib/module-presence/index.d.ts.map +1 -0
- package/dist/lib/module-presence/index.js +18 -0
- package/dist/lib/module-presence/index.js.map +1 -0
- package/dist/lib/module-registry/index.d.ts +84 -0
- package/dist/lib/module-registry/index.d.ts.map +1 -0
- package/dist/lib/module-registry/index.js +104 -0
- package/dist/lib/module-registry/index.js.map +1 -0
- package/dist/lib/money.d.ts +17 -0
- package/dist/lib/money.d.ts.map +1 -0
- package/dist/lib/money.js +17 -0
- package/dist/lib/money.js.map +1 -0
- package/dist/lib/prompt-actions/api.d.ts +10 -0
- package/dist/lib/prompt-actions/api.d.ts.map +1 -0
- package/dist/lib/prompt-actions/api.js +41 -0
- package/dist/lib/prompt-actions/api.js.map +1 -0
- package/dist/lib/prompt-actions/usePromptRequest.d.ts +26 -0
- package/dist/lib/prompt-actions/usePromptRequest.d.ts.map +1 -0
- package/dist/lib/prompt-actions/usePromptRequest.js +113 -0
- package/dist/lib/prompt-actions/usePromptRequest.js.map +1 -0
- package/dist/lib/surface-visibility.d.ts +15 -0
- package/dist/lib/surface-visibility.d.ts.map +1 -0
- package/dist/lib/surface-visibility.js +14 -0
- package/dist/lib/surface-visibility.js.map +1 -0
- package/dist/lib/text-normalization.d.ts +17 -0
- package/dist/lib/text-normalization.d.ts.map +1 -0
- package/dist/lib/text-normalization.js +17 -0
- package/dist/lib/text-normalization.js.map +1 -0
- package/dist/lib/use-page-size-preference.d.ts +16 -0
- package/dist/lib/use-page-size-preference.d.ts.map +1 -0
- package/dist/lib/use-page-size-preference.js +15 -0
- package/dist/lib/use-page-size-preference.js.map +1 -0
- package/dist/lib/use-unsaved-changes-prompt.d.ts +17 -0
- package/dist/lib/use-unsaved-changes-prompt.d.ts.map +1 -0
- package/dist/lib/use-unsaved-changes-prompt.js +17 -0
- package/dist/lib/use-unsaved-changes-prompt.js.map +1 -0
- package/dist/lib/utils.d.ts +17 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +17 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/uuid.d.ts +17 -0
- package/dist/lib/uuid.d.ts.map +1 -0
- package/dist/lib/uuid.js +17 -0
- package/dist/lib/uuid.js.map +1 -0
- package/dist/modules/home/HomePage.d.ts +3 -0
- package/dist/modules/home/HomePage.d.ts.map +1 -0
- package/dist/modules/home/HomePage.js +137 -0
- package/dist/modules/home/HomePage.js.map +1 -0
- package/dist/modules/home/RecentActivityCard.d.ts +3 -0
- package/dist/modules/home/RecentActivityCard.d.ts.map +1 -0
- package/dist/modules/home/RecentActivityCard.js +94 -0
- package/dist/modules/home/RecentActivityCard.js.map +1 -0
- package/dist/modules/home/activity-render.d.ts +69 -0
- package/dist/modules/home/activity-render.d.ts.map +1 -0
- package/dist/modules/home/activity-render.js +53 -0
- package/dist/modules/home/activity-render.js.map +1 -0
- package/dist/modules/home/useRecentActivity.d.ts +41 -0
- package/dist/modules/home/useRecentActivity.d.ts.map +1 -0
- package/dist/modules/home/useRecentActivity.js +57 -0
- package/dist/modules/home/useRecentActivity.js.map +1 -0
- package/dist/modules/platform/ModuleActivationControl.d.ts +28 -0
- package/dist/modules/platform/ModuleActivationControl.d.ts.map +1 -0
- package/dist/modules/platform/ModuleActivationControl.js +88 -0
- package/dist/modules/platform/ModuleActivationControl.js.map +1 -0
- package/dist/modules/platform/ModulesPage.d.ts +76 -0
- package/dist/modules/platform/ModulesPage.d.ts.map +1 -0
- package/dist/modules/platform/ModulesPage.js +175 -0
- package/dist/modules/platform/ModulesPage.js.map +1 -0
- package/dist/modules/platform/RecentActivityVisibilityControl.d.ts +38 -0
- package/dist/modules/platform/RecentActivityVisibilityControl.d.ts.map +1 -0
- package/dist/modules/platform/RecentActivityVisibilityControl.js +26 -0
- package/dist/modules/platform/RecentActivityVisibilityControl.js.map +1 -0
- package/dist/modules/platform/api.d.ts +27 -0
- package/dist/modules/platform/api.d.ts.map +1 -0
- package/dist/modules/platform/api.js +33 -0
- package/dist/modules/platform/api.js.map +1 -0
- package/dist/modules/profile/ProfilePage.d.ts +11 -0
- package/dist/modules/profile/ProfilePage.d.ts.map +1 -0
- package/dist/modules/profile/ProfilePage.js +140 -0
- package/dist/modules/profile/ProfilePage.js.map +1 -0
- package/dist/registerSw.d.ts +7 -0
- package/dist/registerSw.d.ts.map +1 -0
- package/dist/registerSw.js +20 -0
- package/dist/registerSw.js.map +1 -0
- package/package.json +74 -3
- package/tailwind.css +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Endora sp. z o.o. and the Endora Commerce contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- Generated by `pnpm --filter backend run manifests:generate`. Delete this line to take the file over; a README without it is never regenerated. -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# @endora-commerce/admin-shell
|
|
4
|
+
|
|
5
|
+
The admin application itself (feature 110, FR-016) — the router, the sidebar and palette shell, the sign-in screen and the host's own screens. An instance depends on it and holds only index.html, main.tsx, the configuration, the brand assets, the theme overrides and the generated contribution registry.
|
|
6
|
+
|
|
7
|
+
## What this is
|
|
8
|
+
|
|
9
|
+
A shared library package of **Endora Commerce**, the modular B2B/B2C commerce platform. It declares no module manifest, so the platform composes nothing from it: what is published here is what the platform and the modules built on it compile against.
|
|
10
|
+
|
|
11
|
+
## Entry points
|
|
12
|
+
|
|
13
|
+
- `@endora-commerce/admin-shell`
|
|
14
|
+
- `@endora-commerce/admin-shell/tailwind.css`
|
|
15
|
+
|
|
16
|
+
## Depends on
|
|
17
|
+
|
|
18
|
+
Everything below is a **peer** dependency, so the application resolves exactly one copy of each — two copies of a host or of React are a runtime failure rather than a type error. An entry marked *optional* is needed only by the layers that use it.
|
|
19
|
+
|
|
20
|
+
**Endora packages**
|
|
21
|
+
|
|
22
|
+
- `@endora-commerce/admin-kit`
|
|
23
|
+
- `@endora-commerce/contracts`
|
|
24
|
+
|
|
25
|
+
**Third-party**
|
|
26
|
+
|
|
27
|
+
- `@radix-ui/react-collapsible` ^1.1.12
|
|
28
|
+
- `@tailwindcss/vite` ^4.2.4 — *optional*
|
|
29
|
+
- `@vitejs/plugin-react` ^5.2.0 — *optional*
|
|
30
|
+
- `lucide-react` ^1.11.0
|
|
31
|
+
- `react` ^19.0.0
|
|
32
|
+
- `react-dom` ^19.0.0
|
|
33
|
+
- `react-router-dom` ^7.18.2
|
|
34
|
+
- `tailwindcss` ^4.2.4 — *optional*
|
|
35
|
+
- `vite` ^7.3.2 — *optional*
|
|
36
|
+
|
|
37
|
+
## What the tarball carries
|
|
38
|
+
|
|
39
|
+
- `dist/` — the compiled JavaScript and its type declarations
|
|
40
|
+
- `tailwind.css` — the Tailwind source declaration
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pnpm add @endora-commerce/admin-shell
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Licence
|
|
49
|
+
|
|
50
|
+
MIT — the text is in `LICENSE`, beside this file.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The whole of an admin entry point, in one element
|
|
3
|
+
* (`specs/110-instance-repository/contracts/instance-tree.md` §2.4, R1.4).
|
|
4
|
+
*
|
|
5
|
+
* ## Why the shell composes this and not each project
|
|
6
|
+
*
|
|
7
|
+
* Mounting {@link App} takes four wrappers in a fixed order — strict mode, the
|
|
8
|
+
* router, the session provider, the app — and **three of the four are the
|
|
9
|
+
* shell's own requirements rather than the project's**. The router flag is the
|
|
10
|
+
* sharpest: every module screen is `lazy()` inside `ModuleRoute`, and React
|
|
11
|
+
* Router 7's default `startTransition` update leaves `useLocation()` on the
|
|
12
|
+
* previous module while `history` has already moved, so the URL changes and the
|
|
13
|
+
* outlet does not. A project that mounts `<BrowserRouter>` without
|
|
14
|
+
* `useTransitions={false}` gets an admin whose sidebar navigates
|
|
15
|
+
* nowhere, with no error anywhere — and until this component existed, every
|
|
16
|
+
* instance's `main.tsx` had to carry that flag from memory.
|
|
17
|
+
*
|
|
18
|
+
* R1.4 is the second reason and it is a bound rather than a preference: the
|
|
19
|
+
* wiring `endora new instance` writes is capped, and a client's entry point is
|
|
20
|
+
* one of the files inside the cap. Four wrappers a package can supply are four
|
|
21
|
+
* lines of a budget that exists to stop a second composition root growing in a
|
|
22
|
+
* client's tree.
|
|
23
|
+
*
|
|
24
|
+
* ## What a project keeps
|
|
25
|
+
*
|
|
26
|
+
* The one fact the shell cannot derive — the generated contribution registry —
|
|
27
|
+
* and whatever that project wants around it. {@link App} and {@link AuthProvider}
|
|
28
|
+
* stay exported for a project composing its own tree; this is the default, not
|
|
29
|
+
* the only door.
|
|
30
|
+
*/
|
|
31
|
+
import { type ReactNode } from 'react';
|
|
32
|
+
import type { AdminRegistryEntry } from './lib/module-registry/index.js';
|
|
33
|
+
export interface AdminRootProps {
|
|
34
|
+
/**
|
|
35
|
+
* The generated registry of the module packages this project installed.
|
|
36
|
+
*
|
|
37
|
+
* Required, and forwarded verbatim to {@link App}, whose own prop carries the
|
|
38
|
+
* argument for why it is a prop at all: Vite is a static build, so the module
|
|
39
|
+
* set has to enter the bundle from the project being built, and a package
|
|
40
|
+
* cannot name a file in the project that consumes it.
|
|
41
|
+
*/
|
|
42
|
+
readonly contributions: readonly AdminRegistryEntry[];
|
|
43
|
+
}
|
|
44
|
+
export declare function AdminRoot({ contributions }: AdminRootProps): ReactNode;
|
|
45
|
+
//# sourceMappingURL=AdminRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminRoot.d.ts","sourceRoot":"","sources":["../src/AdminRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACvD;AAED,wBAAgB,SAAS,CAAC,EAAE,aAAa,EAAE,EAAE,cAAc,GAAG,SAAS,CAoBtE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The whole of an admin entry point, in one element
|
|
4
|
+
* (`specs/110-instance-repository/contracts/instance-tree.md` §2.4, R1.4).
|
|
5
|
+
*
|
|
6
|
+
* ## Why the shell composes this and not each project
|
|
7
|
+
*
|
|
8
|
+
* Mounting {@link App} takes four wrappers in a fixed order — strict mode, the
|
|
9
|
+
* router, the session provider, the app — and **three of the four are the
|
|
10
|
+
* shell's own requirements rather than the project's**. The router flag is the
|
|
11
|
+
* sharpest: every module screen is `lazy()` inside `ModuleRoute`, and React
|
|
12
|
+
* Router 7's default `startTransition` update leaves `useLocation()` on the
|
|
13
|
+
* previous module while `history` has already moved, so the URL changes and the
|
|
14
|
+
* outlet does not. A project that mounts `<BrowserRouter>` without
|
|
15
|
+
* `useTransitions={false}` gets an admin whose sidebar navigates
|
|
16
|
+
* nowhere, with no error anywhere — and until this component existed, every
|
|
17
|
+
* instance's `main.tsx` had to carry that flag from memory.
|
|
18
|
+
*
|
|
19
|
+
* R1.4 is the second reason and it is a bound rather than a preference: the
|
|
20
|
+
* wiring `endora new instance` writes is capped, and a client's entry point is
|
|
21
|
+
* one of the files inside the cap. Four wrappers a package can supply are four
|
|
22
|
+
* lines of a budget that exists to stop a second composition root growing in a
|
|
23
|
+
* client's tree.
|
|
24
|
+
*
|
|
25
|
+
* ## What a project keeps
|
|
26
|
+
*
|
|
27
|
+
* The one fact the shell cannot derive — the generated contribution registry —
|
|
28
|
+
* and whatever that project wants around it. {@link App} and {@link AuthProvider}
|
|
29
|
+
* stay exported for a project composing its own tree; this is the default, not
|
|
30
|
+
* the only door.
|
|
31
|
+
*/
|
|
32
|
+
import { StrictMode } from 'react';
|
|
33
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
34
|
+
import { App } from './App.js';
|
|
35
|
+
import { AuthProvider } from './lib/auth.js';
|
|
36
|
+
export function AdminRoot({ contributions }) {
|
|
37
|
+
return (_jsx(StrictMode, { children: _jsx(BrowserRouter, { useTransitions: false, children: _jsx(AuthProvider, { children: _jsx(App, { contributions: contributions }) }) }) }));
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=AdminRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminRoot.js","sourceRoot":"","sources":["../src/AdminRoot.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAe7C,MAAM,UAAU,SAAS,CAAC,EAAE,aAAa,EAAkB;IACzD,OAAO,CACL,KAAC,UAAU,cAWT,KAAC,aAAa,IAAC,cAAc,EAAE,KAAK,YAClC,KAAC,YAAY,cACX,KAAC,GAAG,IAAC,aAAa,EAAE,aAAa,GAAI,GACxB,GACD,GACL,CACd,CAAC;AACJ,CAAC"}
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { AdminModulePresenceResponse } from '@endora-commerce/contracts';
|
|
3
|
+
import { type AdminRegistryEntry } from './lib/module-registry/index.js';
|
|
4
|
+
export interface AppProps {
|
|
5
|
+
/**
|
|
6
|
+
* The generated contribution registry — every installed module's admin layer.
|
|
7
|
+
*
|
|
8
|
+
* It is a **prop** because the artefact is the admin project's and this file
|
|
9
|
+
* is the shell package's (feature 110, T120): `admin/src/modules.generated.ts`
|
|
10
|
+
* in this repository, `src/modules.generated.ts` in a client's instance, and
|
|
11
|
+
* a package cannot name either. That is R3.2's consequence carried one layer
|
|
12
|
+
* up — Vite is a static build, so the module set has to enter the bundle from
|
|
13
|
+
* the project being built — and it is the same seam D-207 gives the backend,
|
|
14
|
+
* where which modules compose is the instance's `dependencies` and how they
|
|
15
|
+
* compose is the platform's.
|
|
16
|
+
*
|
|
17
|
+
* Required rather than defaulted: an `App` with no registry renders the
|
|
18
|
+
* host's four routes and none of the modules', which is a blank product that
|
|
19
|
+
* looks like a working one.
|
|
20
|
+
*/
|
|
21
|
+
readonly contributions: readonly AdminRegistryEntry[];
|
|
22
|
+
/**
|
|
23
|
+
* The effective enabled-set, when the caller already has it.
|
|
24
|
+
*
|
|
25
|
+
* Forwarded verbatim to `ModulePresenceProvider`'s own `initial`, which has
|
|
26
|
+
* carried the same prop since feature 073. It exists here because this
|
|
27
|
+
* provider is mounted **inside** the auth gate below and deliberately so —
|
|
28
|
+
* an anonymous visitor on the login page must not fetch
|
|
29
|
+
* `/api/v1/admin/module-presence` — which leaves a caller rendering `<App/>`
|
|
30
|
+
* with no way to reach it.
|
|
31
|
+
*
|
|
32
|
+
* The caller that needs it is a test asserting a route gate: feature 091's
|
|
33
|
+
* P3 put `useSurfaceVisibility` and `useModulePresence` in one package, so
|
|
34
|
+
* replacing either module leaves the predicate reading a provider nobody
|
|
35
|
+
* mounted. Seeding the real provider is the repair, and it is the better
|
|
36
|
+
* test — the gate under assertion is then the real one rather than a stub of
|
|
37
|
+
* it.
|
|
38
|
+
*/
|
|
39
|
+
readonly modulePresence?: AdminModulePresenceResponse;
|
|
40
|
+
}
|
|
41
|
+
export declare function App({ contributions, modulePresence }: AppProps): ReactNode;
|
|
42
|
+
//# sourceMappingURL=App.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAa9E,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AA4ExC,MAAM,WAAW,QAAQ;IACvB;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACtD;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,2BAA2B,CAAC;CACvD;AAED,wBAAgB,GAAG,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,QAAQ,GAAG,SAAS,CAoN1E"}
|
package/dist/App.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, lazy, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { Route, Routes } from 'react-router-dom';
|
|
4
|
+
import { AppShell } from './components/AppShell.js';
|
|
5
|
+
import { LoginPage } from './components/LoginPage.js';
|
|
6
|
+
import { IdleLogout } from './components/IdleLogout.js';
|
|
7
|
+
import { useAuth } from './lib/auth.js';
|
|
8
|
+
import { TranslationProvider } from './i18n/TranslationProvider.js';
|
|
9
|
+
import { useTranslation } from './i18n/useTranslation.js';
|
|
10
|
+
import { appBootstrapCopy } from './i18n/preauth-login-copy.js';
|
|
11
|
+
import { AdminActionsProvider } from './lib/admin-actions/AdminActionsProvider.js';
|
|
12
|
+
import { ModulePresenceProvider } from './lib/module-presence/index.js';
|
|
13
|
+
import { AppLanguageContext } from './i18n/app-language-context.js';
|
|
14
|
+
import { AdminContributionsProvider } from '@endora-commerce/admin-kit/zones';
|
|
15
|
+
import { AdminRegistryProvider, registryRoutes, } from './lib/module-registry/index.js';
|
|
16
|
+
import { useSurfaceVisibility, } from './lib/surface-visibility.js';
|
|
17
|
+
import { HomePage } from './modules/home/HomePage.js';
|
|
18
|
+
import { ModulesPage as PlatformModulesPage } from './modules/platform/ModulesPage.js';
|
|
19
|
+
import { ProfilePage } from './modules/profile/ProfilePage.js';
|
|
20
|
+
function NotFoundPage() {
|
|
21
|
+
const t = useTranslation('core');
|
|
22
|
+
return (_jsx("div", { className: "rounded-md border border-amber-500/40 bg-amber-50 p-4 text-amber-900 dark:bg-amber-950 dark:text-amber-100", children: t('app.notFound') }));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One module-contributed route, gated and lazily loaded (feature 091, FR-011).
|
|
26
|
+
*
|
|
27
|
+
* **The gate is here and not in the module**, which is the whole reason a
|
|
28
|
+
* contribution is a declaration rather than a component. `useSurfaceVisibility`
|
|
29
|
+
* is the one predicate the sidebar, the palette and the dashboard already share
|
|
30
|
+
* (issue #230 — three surfaces answering the visibility question three ways),
|
|
31
|
+
* and it reads the server's effective enabled-set, so an operator switching a
|
|
32
|
+
* module off withdraws its screens without a rebuild. A module that gated its
|
|
33
|
+
* own screen would be a fourth answer, in a package, where nothing could see it
|
|
34
|
+
* drift.
|
|
35
|
+
*
|
|
36
|
+
* A hidden route renders the admin's own not-found treatment rather than a
|
|
37
|
+
* blank frame: an operator following a stale deep-link into a module their role
|
|
38
|
+
* cannot open, or into one that is switched off, gets the same answer as any
|
|
39
|
+
* other unknown path — which is what the surface is already telling them by not
|
|
40
|
+
* listing it.
|
|
41
|
+
*/
|
|
42
|
+
function ModuleRoute({ module, requiredPermission, load, }) {
|
|
43
|
+
const isVisible = useSurfaceVisibility();
|
|
44
|
+
// `lazy` is memoised per mounted route: calling it on every render would
|
|
45
|
+
// build a new component type each time and remount the screen underneath the
|
|
46
|
+
// operator, losing their form state.
|
|
47
|
+
const Screen = useMemo(() => lazy(async () => ({ default: (await load()).default })), [load]);
|
|
48
|
+
// `exactOptionalPropertyTypes` is on, so an absent requirement is an absent
|
|
49
|
+
// property rather than an explicit `undefined` — the distinction the flag
|
|
50
|
+
// exists for, and the reason this is a spread and not a field.
|
|
51
|
+
const surface = {
|
|
52
|
+
module,
|
|
53
|
+
...(requiredPermission === undefined ? {} : { requiredPermission }),
|
|
54
|
+
};
|
|
55
|
+
if (!isVisible(surface))
|
|
56
|
+
return _jsx(NotFoundPage, {});
|
|
57
|
+
return (_jsx(Suspense, { fallback: _jsx(ModuleScreenFallback, {}), children: _jsx(Screen, {}) }));
|
|
58
|
+
}
|
|
59
|
+
/** The frame shown while a module's chunk is in flight. */
|
|
60
|
+
function ModuleScreenFallback() {
|
|
61
|
+
const t = useTranslation('core');
|
|
62
|
+
return _jsx("p", { className: "text-sm text-muted-foreground", children: t('app.moduleScreenLoading') });
|
|
63
|
+
}
|
|
64
|
+
export function App({ contributions, modulePresence }) {
|
|
65
|
+
const { status, me } = useAuth();
|
|
66
|
+
// Feature 019 — admin-side language state. Seeded from the session
|
|
67
|
+
// payload's `preferredLanguage`; falls back to English (FR-003).
|
|
68
|
+
// Lives at App scope so changes to it (driven by ProfilePage's
|
|
69
|
+
// language selector) re-render the whole authenticated tree.
|
|
70
|
+
const initialLanguage = (me?.adminUser.preferredLanguage ?? 'en');
|
|
71
|
+
const [language, setLanguage] = useState(initialLanguage);
|
|
72
|
+
// `useState` reads `initialLanguage` only on first mount, when `me` is
|
|
73
|
+
// still null (auth is loading) — so without this sync the language is
|
|
74
|
+
// locked to 'en' even when the session payload that arrives next carries
|
|
75
|
+
// `preferredLanguage: 'pl'`. Re-sync whenever `me.preferredLanguage`
|
|
76
|
+
// flips, but only when the user hasn't already chosen a different one
|
|
77
|
+
// via ProfilePage in this same session.
|
|
78
|
+
const sessionLanguage = me?.adminUser.preferredLanguage ?? null;
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (sessionLanguage && sessionLanguage !== language) {
|
|
81
|
+
setLanguage(sessionLanguage);
|
|
82
|
+
}
|
|
83
|
+
// We intentionally depend only on sessionLanguage — re-running on every
|
|
84
|
+
// `language` change would clobber the user's in-session override.
|
|
85
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
|
+
}, [sessionLanguage]);
|
|
87
|
+
if (status === 'loading') {
|
|
88
|
+
return (_jsx("div", { className: "grid min-h-screen place-items-center bg-muted/40", children: _jsx("p", { className: "text-sm text-muted-foreground", children: appBootstrapCopy.loading }) }));
|
|
89
|
+
}
|
|
90
|
+
if (status === 'unauthenticated')
|
|
91
|
+
return _jsx(LoginPage, {});
|
|
92
|
+
return (_jsx(TranslationProvider, { language: language, children: _jsx(AppLanguageContext.Provider, { value: { language, setLanguage }, children: _jsx(ModulePresenceProvider, { ...(modulePresence === undefined ? {} : { initial: modulePresence }), children: _jsx(AdminRegistryProvider, { entries: contributions, children: _jsx(AdminContributionsProvider, { entries: contributions, children: _jsxs(AdminActionsProvider, { language: language, children: [_jsx(IdleLogout, {}), _jsx(Routes, { children: _jsxs(Route, { element: _jsx(AppShell, {}), children: [_jsx(Route, { index: true, element: _jsx(HomePage, {}) }), _jsx(Route, { path: "/platform/modules", element: _jsx(PlatformModulesPage, {}) }), _jsx(Route, { path: "/profile", element: _jsx(ProfilePage, {}) }), registryRoutes(contributions).map((route) => (_jsx(Route, { path: route.path, element: _jsx(ModuleRoute, { module: route.module, requiredPermission: route.requiredPermission, load: route.component }) }, route.path))), _jsx(Route, { path: "*", element: _jsx(NotFoundPage, {}) })] }) })] }) }) }) }) }) }));
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=App.js.map
|
package/dist/App.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAsC,MAAM,OAAO,CAAC;AAEzG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,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AAK,IAEJ,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,OAAO,EACL,KAAC,WAAW,IACV,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAC5C,IAAI,EAAE,KAAK,CAAC,SAAS,GACrB,IAPC,KAAK,CAAC,IAAI,CASf,CACH,CAAC,EACF,KAAC,KAAK,IACJ,IAAI,EAAC,GAAG,EACR,OAAO,EAAE,KAAC,YAAY,KAAG,GACzB,IACQ,GACD,IACc,GACM,GACL,GACC,GACG,GACV,CACvB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export declare function AppShell(): ReactNode;
|
|
3
|
+
/** Test seam — interaction tests exercise multiple capability states. */
|
|
4
|
+
export declare function resetPromptCapabilityCacheForTesting(): void;
|
|
5
|
+
//# sourceMappingURL=AppShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/components/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA0/B1F,wBAAgB,QAAQ,IAAI,SAAS,CA2YpC;AA4KD,yEAAyE;AACzE,wBAAgB,oCAAoC,IAAI,IAAI,CAE3D"}
|