@plumile/backoffice-react 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -3
- package/lib/esm/auth/AuthRefreshNotice.js +21 -18
- package/lib/esm/auth/AuthRefreshNotice.js.map +1 -1
- package/lib/esm/auth/TotpQrCode.js +20 -12
- package/lib/esm/auth/TotpQrCode.js.map +1 -1
- package/lib/esm/auth/authRefreshNotice.css.js +2 -1
- package/lib/esm/auth/authRefreshNotice.css.js.map +1 -1
- package/lib/esm/auth/login/AuthPanel.js.map +1 -1
- package/lib/esm/auth/login/EmailCapturePanel.js +26 -28
- package/lib/esm/auth/login/EmailCapturePanel.js.map +1 -1
- package/lib/esm/auth/login/LoginFlow.js +11 -11
- package/lib/esm/auth/login/LoginFlow.js.map +1 -1
- package/lib/esm/auth/login/MethodChooser.js +18 -16
- package/lib/esm/auth/login/MethodChooser.js.map +1 -1
- package/lib/esm/auth/login/MfaChallengeForm.js +47 -52
- package/lib/esm/auth/login/MfaChallengeForm.js.map +1 -1
- package/lib/esm/auth/login/OidcButtons.js +3 -2
- package/lib/esm/auth/login/OidcButtons.js.map +1 -1
- package/lib/esm/auth/login/PasskeyLoginForm.js +13 -15
- package/lib/esm/auth/login/PasskeyLoginForm.js.map +1 -1
- package/lib/esm/auth/login/PasswordLoginPanel.js +8 -8
- package/lib/esm/auth/login/PasswordLoginPanel.js.map +1 -1
- package/lib/esm/auth/login/loginPage.css.js +1 -1
- package/lib/esm/auth/login/loginPage.css.js.map +1 -1
- package/lib/esm/auth/pages/AcceptInvitationScreen.js +80 -75
- package/lib/esm/auth/pages/AcceptInvitationScreen.js.map +1 -1
- package/lib/esm/auth/pages/PasswordResetCompleteScreen.js +31 -31
- package/lib/esm/auth/pages/PasswordResetCompleteScreen.js.map +1 -1
- package/lib/esm/auth/pages/PasswordResetRequestScreen.js +33 -29
- package/lib/esm/auth/pages/PasswordResetRequestScreen.js.map +1 -1
- package/lib/esm/auth/pages/VerifyEmailScreen.js +42 -40
- package/lib/esm/auth/pages/VerifyEmailScreen.js.map +1 -1
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +202 -210
- package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js.map +1 -1
- package/lib/esm/components/backoffice/actions/backofficeEntityActionFormDialog.css.js +1 -1
- package/lib/esm/components/backoffice/actions/backofficeEntityActionFormDialog.css.js.map +1 -1
- package/lib/esm/components/backoffice/actions/toastViewAction.js.map +1 -1
- package/lib/esm/components/backoffice/billing/BackofficeBillingUsageChart.js +36 -30
- package/lib/esm/components/backoffice/billing/BackofficeBillingUsageChart.js.map +1 -1
- package/lib/esm/components/backoffice/billing/backofficeBillingUsageChart.css.js +1 -1
- package/lib/esm/components/backoffice/billing/backofficeBillingUsageChart.css.js.map +1 -1
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +36 -33
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailBadgeRow.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailErrorList.js +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeDetailErrorList.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeEntitySummaryHeader.js +24 -20
- package/lib/esm/components/backoffice/detail/BackofficeEntitySummaryHeader.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeTokenUsageBreakdown.js +7 -8
- package/lib/esm/components/backoffice/detail/BackofficeTokenUsageBreakdown.js.map +1 -1
- package/lib/esm/components/backoffice/detail/BackofficeUsageCostBreakdown.js +49 -45
- package/lib/esm/components/backoffice/detail/BackofficeUsageCostBreakdown.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailBadgeRow.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailBadgeRow.css.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailErrorList.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailErrorList.css.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailLayout.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailLayout.css.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailRelationList.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeDetailRelationList.css.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeEntitySummaryHeader.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeEntitySummaryHeader.css.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeRelationsSummaryGrid.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeRelationsSummaryGrid.css.js.map +1 -1
- package/lib/esm/components/backoffice/detail/backofficeUsageCostBreakdown.css.js +1 -1
- package/lib/esm/components/backoffice/detail/backofficeUsageCostBreakdown.css.js.map +1 -1
- package/lib/esm/components/backoffice/errors/BackofficeErrorBoundary.js +1 -1
- package/lib/esm/components/backoffice/errors/BackofficeErrorBoundary.js.map +1 -1
- package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +1 -1
- package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js.map +1 -1
- package/lib/esm/components/backoffice/filters/DeferredFilterSearchInput.js +15 -15
- package/lib/esm/components/backoffice/filters/DeferredFilterSearchInput.js.map +1 -1
- package/lib/esm/components/backoffice/filters/EntityIdFilterField.js +53 -65
- package/lib/esm/components/backoffice/filters/EntityIdFilterField.js.map +1 -1
- package/lib/esm/components/backoffice/filters/backofficeFilterAction.css.js +1 -1
- package/lib/esm/components/backoffice/filters/backofficeFilterAction.css.js.map +1 -1
- package/lib/esm/components/backoffice/filters/deferredFilterSearchInput.css.js +1 -1
- package/lib/esm/components/backoffice/filters/deferredFilterSearchInput.css.js.map +1 -1
- package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js +2 -2
- package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js.map +1 -1
- package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js +6 -6
- package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js.map +1 -1
- package/lib/esm/components/backoffice/hub/backofficeHubTemplate.css.js +1 -1
- package/lib/esm/components/backoffice/hub/backofficeHubTemplate.css.js.map +1 -1
- package/lib/esm/components/backoffice/layout/backofficeSidebarActions.css.js +1 -1
- package/lib/esm/components/backoffice/layout/backofficeSidebarActions.css.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +3 -3
- package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js +1 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js.map +1 -1
- package/lib/esm/components/backoffice/layout/buildSidebarSections.js +152 -172
- package/lib/esm/components/backoffice/layout/buildSidebarSections.js.map +1 -1
- package/lib/esm/components/backoffice/layout/mapViewerToSidebarProfileView.js +2 -5
- package/lib/esm/components/backoffice/layout/mapViewerToSidebarProfileView.js.map +1 -1
- package/lib/esm/components/backoffice/layout/sidebarUtils.js +1 -1
- package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
- package/lib/esm/components/backoffice/links/BackofficeLinkContent.js +1 -1
- package/lib/esm/components/backoffice/links/backofficeLink.css.js +1 -1
- package/lib/esm/components/backoffice/links/backofficeLink.css.js.map +1 -1
- package/lib/esm/components/backoffice/list/RowFlagsCell.css.js +1 -1
- package/lib/esm/components/backoffice/list/RowFlagsCell.css.js.map +1 -1
- package/lib/esm/components/backoffice/overview/BackofficeOverviewLayout.js +1 -1
- package/lib/esm/components/backoffice/overview/BackofficeOverviewLayout.js.map +1 -1
- package/lib/esm/components/backoffice/overview/backofficeOverviewLayout.css.js +1 -1
- package/lib/esm/components/backoffice/overview/backofficeOverviewLayout.css.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +93 -82
- package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
- package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js +1 -1
- package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js.map +1 -1
- package/lib/esm/components/backoffice/refs/backofficeRelatedCountLink.css.js +1 -1
- package/lib/esm/components/backoffice/refs/backofficeRelatedCountLink.css.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeContentError.js +6 -3
- package/lib/esm/components/backoffice/routing/BackofficeContentError.js.map +1 -1
- package/lib/esm/components/backoffice/routing/BackofficeRouteFallback.js +7 -7
- package/lib/esm/components/backoffice/routing/BackofficeRouteFallback.js.map +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentBoundary.css.js +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentBoundary.css.js.map +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentError.css.js +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentError.css.js.map +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentFallback.css.js +1 -1
- package/lib/esm/components/backoffice/routing/backofficeContentFallback.css.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js +3 -2
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +314 -309
- package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js +1 -1
- package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/backofficeEntityListScaffold.css.js +1 -1
- package/lib/esm/components/backoffice/scaffolds/backofficeEntityListScaffold.css.js.map +1 -1
- package/lib/esm/components/backoffice/scaffolds/backofficeTabbedDetailShell.css.js +1 -1
- package/lib/esm/components/backoffice/scaffolds/backofficeTabbedDetailShell.css.js.map +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js +2 -2
- package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js.map +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeInlineFilterRow.js +1 -1
- package/lib/esm/components/backoffice/shared/BackofficeInlineFilterRow.js.map +1 -1
- package/lib/esm/components/backoffice/shared/backofficeFilterableCell.css.js +5 -5
- package/lib/esm/components/backoffice/shared/backofficeFilterableCell.css.js.map +1 -1
- package/lib/esm/components/backoffice/shared/backofficeInlineFilterRow.css.js +1 -1
- package/lib/esm/components/backoffice/shared/backofficeInlineFilterRow.css.js.map +1 -1
- package/lib/esm/components/backoffice/tools/BackofficeToolsDocPanel.js +12 -12
- package/lib/esm/components/backoffice/tools/BackofficeToolsDocPanel.js.map +1 -1
- package/lib/esm/components/backoffice/tools/BackofficeToolsErrorFallback.js +3 -2
- package/lib/esm/components/backoffice/tools/BackofficeToolsErrorFallback.js.map +1 -1
- package/lib/esm/components/backoffice/tools/BackofficeToolsJsonForm.js +15 -19
- package/lib/esm/components/backoffice/tools/BackofficeToolsJsonForm.js.map +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsDocPanel.css.js +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsDocPanel.css.js.map +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsForm.css.js +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsForm.css.js.map +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsJsonForm.css.js +1 -1
- package/lib/esm/components/backoffice/tools/backofficeToolsJsonForm.css.js.map +1 -1
- package/lib/esm/hooks/useBackofficeInfiniteScrollSentinel.js +17 -9
- package/lib/esm/hooks/useBackofficeInfiniteScrollSentinel.js.map +1 -1
- package/lib/esm/hooks/useCopyToClipboard.js +1 -1
- package/lib/esm/hooks/useCopyToClipboard.js.map +1 -1
- package/lib/esm/i18n/locales/en/backofficeReact.js +21 -2
- package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
- package/lib/esm/i18n/locales/fr/backofficeReact.js +21 -2
- package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardPage.js +42 -41
- package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardWidgetContent.js +291 -255
- package/lib/esm/pages/BackofficeDashboardWidgetContent.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +47 -49
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +111 -105
- package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js +213 -213
- package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListDataPage.js +101 -83
- package/lib/esm/pages/BackofficeEntityListDataPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListPage.helpers.js +10 -4
- package/lib/esm/pages/BackofficeEntityListPage.helpers.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListPage.js +55 -54
- package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityListRouteContext.js.map +1 -1
- package/lib/esm/pages/BackofficeHubPage.js +1 -1
- package/lib/esm/pages/BackofficeHubPage.js.map +1 -1
- package/lib/esm/pages/BackofficeLayoutPage.js +64 -56
- package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
- package/lib/esm/pages/backofficeDashboardPage.css.js +1 -1
- package/lib/esm/pages/backofficeDashboardPage.css.js.map +1 -1
- package/lib/esm/pages/backofficeEntityDetailPage.css.js +1 -1
- package/lib/esm/pages/backofficeEntityDetailPage.css.js.map +1 -1
- package/lib/esm/pages/backofficeEntityListPage.css.js +1 -1
- package/lib/esm/pages/backofficeEntityListPage.css.js.map +1 -1
- package/lib/esm/pages/detail/BackofficeEntityDetailLayoutContext.js.map +1 -1
- package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js +11 -11
- package/lib/esm/pages/detail/BackofficeEntityDetailManifestFallback.js.map +1 -1
- package/lib/esm/pages/detail/buildTabsItems.js.map +1 -1
- package/lib/esm/provider/BackofficeProvider.js +41 -39
- package/lib/esm/provider/BackofficeProvider.js.map +1 -1
- package/lib/esm/router/createBackofficeRoutes.js +23 -23
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/esm/storybook/backofficeDashboardPageStory.css.js +6 -0
- package/lib/esm/storybook/backofficeDashboardPageStory.css.js.map +1 -0
- package/lib/esm/storybook/relay/RelayStory.css.js +1 -1
- package/lib/esm/storybook/relay/RelayStory.css.js.map +1 -1
- package/lib/esm/style.css +1 -1
- package/lib/types/auth/AuthRefreshNotice.d.ts +5 -1
- package/lib/types/auth/AuthRefreshNotice.d.ts.map +1 -1
- package/lib/types/auth/TotpQrCode.d.ts +2 -1
- package/lib/types/auth/TotpQrCode.d.ts.map +1 -1
- package/lib/types/auth/authRefreshNotice.css.d.ts.map +1 -1
- package/lib/types/auth/login/AuthPanel.d.ts.map +1 -1
- package/lib/types/auth/login/EmailCapturePanel.d.ts.map +1 -1
- package/lib/types/auth/login/LoginFlow.d.ts.map +1 -1
- package/lib/types/auth/login/MethodChooser.d.ts.map +1 -1
- package/lib/types/auth/login/MfaChallengeForm.d.ts.map +1 -1
- package/lib/types/auth/login/OidcButtons.d.ts.map +1 -1
- package/lib/types/auth/login/PasskeyLoginForm.d.ts.map +1 -1
- package/lib/types/auth/login/PasswordLoginPanel.d.ts +1 -1
- package/lib/types/auth/login/PasswordLoginPanel.d.ts.map +1 -1
- package/lib/types/auth/login/loginPage.css.d.ts.map +1 -1
- package/lib/types/auth/pages/AcceptInvitationScreen.d.ts.map +1 -1
- package/lib/types/auth/pages/PasswordResetCompleteScreen.d.ts.map +1 -1
- package/lib/types/auth/pages/PasswordResetRequestScreen.d.ts.map +1 -1
- package/lib/types/auth/pages/VerifyEmailScreen.d.ts.map +1 -1
- package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts +3 -3
- package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/actions/toastViewAction.d.ts +1 -1
- package/lib/types/components/backoffice/actions/toastViewAction.d.ts.map +1 -1
- package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.d.ts +2 -1
- package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.d.ts.map +1 -1
- package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts +2 -2
- package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeDetailBadgeRow.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeEntitySummaryHeader.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeRelationsSummaryGrid.d.ts +1 -1
- package/lib/types/components/backoffice/detail/BackofficeRelationsSummaryGrid.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeTokenUsageBreakdown.d.ts.map +1 -1
- package/lib/types/components/backoffice/detail/BackofficeUsageCostBreakdown.d.ts +1 -1
- package/lib/types/components/backoffice/detail/BackofficeUsageCostBreakdown.d.ts.map +1 -1
- package/lib/types/components/backoffice/errors/BackofficeErrorBoundary.d.ts +1 -1
- package/lib/types/components/backoffice/errors/BackofficeErrorBoundary.d.ts.map +1 -1
- package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts.map +1 -1
- package/lib/types/components/backoffice/filters/backofficeFilterAction.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/filters/deferredFilterSearchInput.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts +0 -1
- package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/hub/backofficeHubTemplate.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/backofficeSidebarActions.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts +2 -2
- package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/mapViewerToSidebarProfileView.d.ts +1 -1
- package/lib/types/components/backoffice/layout/mapViewerToSidebarProfileView.d.ts.map +1 -1
- package/lib/types/components/backoffice/list/RowFlagsCell.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/overview/backofficeOverviewLayout.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts +3 -3
- package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
- package/lib/types/components/backoffice/refs/backofficeRelatedCountLink.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/routing/BackofficeContentError.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityDetailNotFound.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts +2 -2
- package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.d.ts +1 -1
- package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.d.ts.map +1 -1
- package/lib/types/components/backoffice/shared/backofficeFilterableCell.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/tools/BackofficeToolsErrorFallback.d.ts.map +1 -1
- package/lib/types/components/backoffice/tools/BackofficeToolsJsonForm.d.ts.map +1 -1
- package/lib/types/components/backoffice/tools/backofficeToolsDocPanel.css.d.ts.map +1 -1
- package/lib/types/hooks/useBackofficeInfiniteScrollSentinel.d.ts +1 -2
- package/lib/types/hooks/useBackofficeInfiniteScrollSentinel.d.ts.map +1 -1
- package/lib/types/i18n/resources.d.ts +44 -2
- package/lib/types/i18n/resources.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardWidgetContent.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailLayoutPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts +1 -1
- package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListDataPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListPage.helpers.d.ts +9 -9
- package/lib/types/pages/BackofficeEntityListPage.helpers.d.ts.map +1 -1
- package/lib/types/pages/BackofficeEntityListRouteContext.d.ts +2 -2
- package/lib/types/pages/BackofficeEntityListRouteContext.d.ts.map +1 -1
- package/lib/types/pages/BackofficeLayoutPage.d.ts.map +1 -1
- package/lib/types/pages/backofficeEntityListPage.css.d.ts.map +1 -1
- package/lib/types/pages/detail/BackofficeEntityDetailLayoutContext.d.ts +1 -1
- package/lib/types/pages/detail/BackofficeEntityDetailLayoutContext.d.ts.map +1 -1
- package/lib/types/pages/detail/buildTabsItems.d.ts +1 -1
- package/lib/types/pages/detail/buildTabsItems.d.ts.map +1 -1
- package/lib/types/provider/BackofficeProvider.d.ts.map +1 -1
- package/lib/types/provider/types.d.ts +2 -0
- package/lib/types/provider/types.d.ts.map +1 -1
- package/lib/types/router/createBackofficeRoutes.d.ts +0 -1
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- package/lib/types/storybook/backofficeDashboardPageStory.css.d.ts +2 -0
- package/lib/types/storybook/backofficeDashboardPageStory.css.d.ts.map +1 -0
- package/package.json +17 -17
- package/lib/esm/components/backoffice/technical/TechnicalIdentifierValue.js +0 -2
- package/lib/types/components/backoffice/technical/TechnicalIdentifierValue.d.ts +0 -2
- package/lib/types/components/backoffice/technical/TechnicalIdentifierValue.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
//#region src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "txvbqb5lr txvbqb2nn txvbqbl9n txvbqbe1d txvbqbd73", t = "_80s44h0 txvbqb5lr txvbqb2nn txvbqb6rp txvbqb1rt txvbqbf4t txvbqb1rq txvbqb1cu txvbqbe1d txvbqbd73", n = "txvbqb5ml txvbqb2nn txvbqb6rp txvbqbe1d", r = "txvbqbe7 txvbqb1rn", i = "_80s44h1 qbwcueu qbwcues txvbqb5ml txvbqb2nn txvbqb8o1 txvbqbk9 txvbqbmv txvbqbn1 txvbqb8n txvbqbe7 txvbqbv txvbqbf4t txvbqb7n txvbqb78 txvbqb7y qbwcuet txvbqbmcq txvbqbo82 qbwcuec txvbqbor4 txvbqboxk qbwcue5 qbwcue4 txvbqboz8 txvbqbptg qbwcue3 qbwcue18 qbwcue12 txvbqb1cr txvbqb1rk qbwcue1c qbwcue16 txvbqbkzd txvbqb7u1 txvbqbe3l txvbqbdc3 txvbqb3f", a = "_80s44h2 _80s44h1 qbwcueu qbwcues txvbqb5ml txvbqb2nn txvbqb8o1 txvbqbk9 txvbqbmv txvbqbn1 txvbqb8n txvbqbe7 txvbqbv txvbqbf4t txvbqb7n txvbqb78 txvbqb7y qbwcuet txvbqbmcq txvbqbo82 qbwcuec txvbqbor4 txvbqboxk qbwcue5 qbwcue4 txvbqboz8 txvbqbptg qbwcue3 qbwcue18 qbwcue12 txvbqb1cr txvbqb1rk qbwcue1c qbwcue16 txvbqbkzd txvbqb7u1 txvbqbe3l txvbqbdc3 txvbqb3f txvbqbab txvbqbe6", o = "_4k5f061 _4k5f060 txvbqbk9 txvbqbmv txvbqb1j txvbqb84l txvbqb1t1 txvbqbf3z txvbqbf4t txvbqbk5n txvbqbk71 txvbqb1iq txvbqbl9x", s = "_80s44h3 qbwcue10 qbwcuey txvbqb5ml txvbqb2nn txvbqb6rf txvbqbe6 txvbqb3f txvbqb7n txvbqb76 txvbqb7y qbwcuez txvbqbpw9 qbwcue5 qbwcue4 txvbqboz8 txvbqbptg qbwcue3 txvbqbe7 txvbqb1rn txvbqbe1d txvbqbd73 txvbqb206", c = "txvbqbe6 txvbqb1rn txvbqb1d5 txvbqbe1d txvbqbd73 txvbqb206";
|
|
4
4
|
//#endregion
|
|
5
5
|
export { c as current, a as homeCurrent, o as homeLabel, i as homeLink, n as item, s as link, t as list, e as nav, r as separator };
|
|
6
6
|
|
package/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backofficeTopbarBreadcrumb.css.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport {
|
|
1
|
+
{"version":3,"file":"backofficeTopbarBreadcrumb.css.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport {\n sprinkles,\n vars,\n entityReferenceLink,\n ghostIconButton,\n iconBox,\n visuallyHidden,\n} from '@plumile/ui/theme';\n\nconst INLINE_FLEX = 'inline-flex' as const;\n\nexport const nav = sprinkles({\n display: 'flex',\n alignItems: 'center',\n width: 'full',\n minWidth: 0,\n maxWidth: 'full',\n});\n\nexport const list = style([\n sprinkles({\n display: 'flex',\n alignItems: 'center',\n gap: 2,\n margin: 0,\n padding: 0,\n listStyleType: 'none',\n flexWrap: 'wrap',\n minWidth: 0,\n maxWidth: 'full',\n }),\n {\n fontSize: vars.sidebar.itemFontSize,\n },\n]);\n\nexport const item = sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n gap: 2,\n minWidth: 0,\n});\n\nexport const separator = sprinkles({\n color: 'textSecondary',\n lineHeight: 'normal',\n});\n\nconst homeBase = style([\n ghostIconButton,\n iconBox({ size: 'lg' }),\n sprinkles({\n textDecoration: 'none',\n }),\n]);\n\nexport const homeLink = homeBase;\n\nexport const homeCurrent = style([\n homeBase,\n sprinkles({\n backgroundColor: 'surfaceMuted',\n color: 'text',\n }),\n]);\n\nexport const homeLabel = visuallyHidden;\n\nexport const link = style([\n entityReferenceLink,\n sprinkles({\n color: 'textSecondary',\n lineHeight: 'normal',\n minWidth: 0,\n maxWidth: 'full',\n overflowWrap: 'anywhere',\n }),\n]);\n\nexport const current = sprinkles({\n color: 'text',\n lineHeight: 'normal',\n fontWeight: 'semibold',\n minWidth: 0,\n maxWidth: 'full',\n overflowWrap: 'anywhere',\n});\n"],"mappings":""}
|
|
@@ -2,30 +2,29 @@ import { buildEntityGroupLookup as e, isActivePath as t, joinBackofficePath as n
|
|
|
2
2
|
import { actionButton as c } from "./backofficeSidebarActions.css.js";
|
|
3
3
|
import { findBackofficeDashboardRegistration as l } from "../../../provider/dashboardRegistrations.js";
|
|
4
4
|
import { jsx as u } from "react/jsx-runtime";
|
|
5
|
-
import { SidebarTasksSvg as d } from "@plumile/ui/icons/SidebarTasksSvg
|
|
6
|
-
import { SidebarHomeSvg as f } from "@plumile/ui/icons/SidebarHomeSvg
|
|
7
|
-
import { BackofficeSidebarHistorySvg as p } from "@plumile/ui/icons/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { PinSvg as g } from "@plumile/ui/icons/PinSvg.js";
|
|
5
|
+
import { SidebarTasksSvg as d } from "@plumile/ui/icons/SidebarTasksSvg";
|
|
6
|
+
import { SidebarHomeSvg as f } from "@plumile/ui/icons/SidebarHomeSvg";
|
|
7
|
+
import { BackofficeSidebarHistorySvg as p } from "@plumile/ui/icons/BackofficeSidebarHistorySvg";
|
|
8
|
+
import { PinFilledSvg as m } from "@plumile/ui/icons/PinFilledSvg";
|
|
9
|
+
import { PinSvg as h } from "@plumile/ui/icons/PinSvg";
|
|
11
10
|
//#region src/components/backoffice/layout/buildSidebarSections.tsx
|
|
12
|
-
var
|
|
11
|
+
var g = (e, t, n = 18) => e == null ? t ?? null : /* @__PURE__ */ u(e, {
|
|
13
12
|
width: n,
|
|
14
13
|
height: n,
|
|
15
14
|
"aria-hidden": "true"
|
|
16
15
|
});
|
|
17
|
-
function
|
|
18
|
-
let { basePath:
|
|
19
|
-
if (
|
|
20
|
-
let t =
|
|
21
|
-
return t && (n =
|
|
16
|
+
function _(_) {
|
|
17
|
+
let { basePath: v, pathname: y, entities: b, dashboards: x = [], sidebar: S, permissions: C, searchQuery: w, tApp: T, t: E, pinnedEntityIds: D = [], recentItems: O = [], onTogglePin: k, onReorderPin: A, collapsedByGroupId: j, onGroupCollapsedChange: M, sidebarCollapsed: N = !1 } = _, P = o(b, S), F = Object.entries(P), I = new Set(D), L = E("sidebar.actions.pin"), R = E("sidebar.actions.unpin"), z = e(P, S), B = w?.trim().toLowerCase() ?? "", V = (e) => B === "" || e.toLowerCase().includes(B), H = (e) => {
|
|
18
|
+
if (k == null) return null;
|
|
19
|
+
let t = I.has(e), n = L, r = h;
|
|
20
|
+
return t && (n = R, r = m), /* @__PURE__ */ u("button", {
|
|
22
21
|
type: "button",
|
|
23
22
|
className: c,
|
|
24
23
|
"aria-pressed": t,
|
|
25
24
|
"aria-label": n,
|
|
26
25
|
title: n,
|
|
27
26
|
onClick: (t) => {
|
|
28
|
-
t.preventDefault(), t.stopPropagation(),
|
|
27
|
+
t.preventDefault(), t.stopPropagation(), k(e);
|
|
29
28
|
},
|
|
30
29
|
children: /* @__PURE__ */ u(r, {
|
|
31
30
|
width: 14,
|
|
@@ -33,109 +32,90 @@ function v(v) {
|
|
|
33
32
|
"aria-hidden": "true"
|
|
34
33
|
})
|
|
35
34
|
});
|
|
36
|
-
},
|
|
37
|
-
let
|
|
35
|
+
}, U = (e) => {
|
|
36
|
+
let r = e?.id ?? "dashboard", i = {
|
|
38
37
|
kind: "dashboard",
|
|
39
|
-
id:
|
|
38
|
+
id: r
|
|
40
39
|
};
|
|
41
|
-
if (
|
|
42
|
-
let
|
|
43
|
-
if (
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
label: c,
|
|
55
|
-
href: d,
|
|
56
|
-
icon: _(e?.icon ?? s?.icon, /* @__PURE__ */ u(f, {
|
|
40
|
+
if (S?.isItemVisible?.(i, C) === !1) return null;
|
|
41
|
+
let o = l(x, r), s = e?.label;
|
|
42
|
+
if (s == null && o != null && (s = a(o.label, T)), s ??= E("sidebar.items.dashboard"), !V(s)) return null;
|
|
43
|
+
let c = v, d = "dashboard";
|
|
44
|
+
r !== "dashboard" && (c = n(v, `dashboard/${r}`), d = `dashboard-${r}`);
|
|
45
|
+
let p = t(y, c);
|
|
46
|
+
return r === "dashboard" && (p = y === v || y === `${v}/dashboard`), {
|
|
47
|
+
kind: "link",
|
|
48
|
+
id: d,
|
|
49
|
+
reorderId: r,
|
|
50
|
+
label: s,
|
|
51
|
+
to: c,
|
|
52
|
+
icon: g(e?.icon ?? o?.icon, /* @__PURE__ */ u(f, {
|
|
57
53
|
width: 18,
|
|
58
54
|
height: 18,
|
|
59
55
|
"aria-hidden": "true"
|
|
60
56
|
})),
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
active: p,
|
|
58
|
+
accessibleLabel: s
|
|
63
59
|
};
|
|
64
|
-
},
|
|
65
|
-
let { entityId: n,
|
|
66
|
-
if (
|
|
67
|
-
let
|
|
60
|
+
}, W = (e) => {
|
|
61
|
+
let { entityId: n, groupIcon: r, itemIcon: i, itemLabel: o, sectionId: s } = e, c = b[n];
|
|
62
|
+
if (c == null) return null;
|
|
63
|
+
let l = {
|
|
68
64
|
kind: "entity",
|
|
69
65
|
id: n
|
|
70
66
|
};
|
|
71
|
-
if (
|
|
67
|
+
if (c.kind === "tool" && (l = {
|
|
72
68
|
kind: "tool",
|
|
73
69
|
id: n
|
|
74
|
-
}),
|
|
75
|
-
if (
|
|
76
|
-
let e =
|
|
77
|
-
if (
|
|
78
|
-
let
|
|
79
|
-
return
|
|
70
|
+
}), S?.isItemVisible?.(l, C) === !1) return null;
|
|
71
|
+
if (c.kind === "tool") {
|
|
72
|
+
let e = o ?? a(c.label, T);
|
|
73
|
+
if (B !== "" && !e.toLowerCase().includes(B)) return null;
|
|
74
|
+
let l;
|
|
75
|
+
return s !== "pinned" && I.has(n) && (l = "always"), {
|
|
76
|
+
kind: "link",
|
|
80
77
|
id: `tool-${n}`,
|
|
81
|
-
|
|
82
|
-
kind: "tool",
|
|
83
|
-
id: n,
|
|
84
|
-
groupId: r
|
|
85
|
-
},
|
|
78
|
+
reorderId: n,
|
|
86
79
|
label: e,
|
|
87
|
-
|
|
88
|
-
icon:
|
|
80
|
+
to: c.routes.list,
|
|
81
|
+
icon: g(i ?? r, /* @__PURE__ */ u(d, {
|
|
89
82
|
width: 18,
|
|
90
83
|
height: 18,
|
|
91
84
|
"aria-hidden": "true"
|
|
92
85
|
})),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
actionSlot:
|
|
96
|
-
actionsVisibility:
|
|
86
|
+
active: t(y, c.routes.list),
|
|
87
|
+
accessibleLabel: e,
|
|
88
|
+
actionSlot: H(n),
|
|
89
|
+
actionsVisibility: l
|
|
97
90
|
};
|
|
98
91
|
}
|
|
99
|
-
if (!
|
|
100
|
-
let
|
|
101
|
-
if (
|
|
102
|
-
let
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
height: 14,
|
|
106
|
-
"aria-hidden": "true"
|
|
107
|
-
}));
|
|
108
|
-
let v;
|
|
109
|
-
g != null && (v = B);
|
|
110
|
-
let y;
|
|
111
|
-
return l !== "pinned" && L.has(n) && (y = "always"), {
|
|
92
|
+
if (!c.hasList) return null;
|
|
93
|
+
let f = o ?? a(c.label, T);
|
|
94
|
+
if (B !== "" && !f.toLowerCase().includes(B)) return null;
|
|
95
|
+
let p;
|
|
96
|
+
return s !== "pinned" && I.has(n) && (p = "always"), {
|
|
97
|
+
kind: "link",
|
|
112
98
|
id: n,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
label: h,
|
|
119
|
-
href: f.routes.list,
|
|
120
|
-
icon: _(o ?? i, /* @__PURE__ */ u(d, {
|
|
99
|
+
reorderId: n,
|
|
100
|
+
label: f,
|
|
101
|
+
to: c.routes.list,
|
|
102
|
+
icon: g(i ?? r, /* @__PURE__ */ u(d, {
|
|
121
103
|
width: 18,
|
|
122
104
|
height: 18,
|
|
123
105
|
"aria-hidden": "true"
|
|
124
106
|
})),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
actionSlot:
|
|
128
|
-
actionsVisibility:
|
|
129
|
-
dragHandleSlot: g,
|
|
130
|
-
dragHandleLabel: v
|
|
107
|
+
active: t(y, c.routes.list),
|
|
108
|
+
accessibleLabel: f,
|
|
109
|
+
actionSlot: H(n),
|
|
110
|
+
actionsVisibility: p
|
|
131
111
|
};
|
|
132
|
-
},
|
|
133
|
-
let { hub: n,
|
|
112
|
+
}, G = (e) => {
|
|
113
|
+
let { hub: n, icon: r } = e, o = {
|
|
134
114
|
kind: "hub",
|
|
135
115
|
id: n.id
|
|
136
116
|
};
|
|
137
|
-
if (
|
|
138
|
-
let
|
|
117
|
+
if (S?.isItemVisible?.(o, C) === !1) return null;
|
|
118
|
+
let s = i(n), c = s.map((e) => b[e] ?? null).filter((e) => {
|
|
139
119
|
if (e == null) return !1;
|
|
140
120
|
let t = "entity";
|
|
141
121
|
e.kind === "tool" && (t = "tool");
|
|
@@ -143,128 +123,112 @@ function v(v) {
|
|
|
143
123
|
kind: t,
|
|
144
124
|
id: e.id
|
|
145
125
|
};
|
|
146
|
-
return !(
|
|
126
|
+
return !(S?.isItemVisible?.(n, C) === !1 || e.kind !== "tool" && !e.hasList);
|
|
147
127
|
});
|
|
148
|
-
if (
|
|
149
|
-
let
|
|
150
|
-
if (!
|
|
151
|
-
let
|
|
128
|
+
if (s.length > 0 && c.length === 0) return null;
|
|
129
|
+
let l = a(n.title, T), f = V(l), p = c.some((e) => V(a(e.label, T)));
|
|
130
|
+
if (!f && !p) return null;
|
|
131
|
+
let m = t(y, n.href) || c.some((e) => t(y, e.routes.list));
|
|
152
132
|
return {
|
|
133
|
+
kind: "link",
|
|
153
134
|
id: `hub-${n.id}`,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
},
|
|
159
|
-
label: f,
|
|
160
|
-
href: n.href,
|
|
161
|
-
icon: _(o, /* @__PURE__ */ u(d, {
|
|
135
|
+
reorderId: n.id,
|
|
136
|
+
label: l,
|
|
137
|
+
to: n.href,
|
|
138
|
+
icon: g(r, /* @__PURE__ */ u(d, {
|
|
162
139
|
width: 18,
|
|
163
140
|
height: 18,
|
|
164
141
|
"aria-hidden": "true"
|
|
165
142
|
})),
|
|
166
|
-
|
|
167
|
-
|
|
143
|
+
active: m,
|
|
144
|
+
accessibleLabel: l
|
|
168
145
|
};
|
|
169
|
-
},
|
|
170
|
-
if (
|
|
171
|
-
let e =
|
|
146
|
+
}, K = [], q = S?.primaryItems ?? [];
|
|
147
|
+
if (q.length > 0) {
|
|
148
|
+
let e = q.map((e) => {
|
|
172
149
|
if (e.kind === "dashboard") {
|
|
173
150
|
let t;
|
|
174
|
-
return e.label != null && (t = a(e.label,
|
|
151
|
+
return e.label != null && (t = a(e.label, T)), U({
|
|
175
152
|
id: e.id,
|
|
176
153
|
icon: e.icon,
|
|
177
154
|
label: t
|
|
178
155
|
});
|
|
179
156
|
}
|
|
180
157
|
if (e.kind === "hub") {
|
|
181
|
-
let t = s(e,
|
|
182
|
-
return
|
|
158
|
+
let t = s(e, S);
|
|
159
|
+
return G({
|
|
183
160
|
hub: t,
|
|
184
161
|
icon: e.icon
|
|
185
162
|
});
|
|
186
163
|
}
|
|
187
164
|
let t;
|
|
188
|
-
return e.label != null && (t = a(e.label,
|
|
165
|
+
return e.label != null && (t = a(e.label, T)), W({
|
|
189
166
|
entityId: e.id,
|
|
190
167
|
itemIcon: e.icon,
|
|
191
168
|
itemLabel: t,
|
|
192
169
|
sectionId: "primary"
|
|
193
170
|
});
|
|
194
171
|
}).filter((e) => e != null);
|
|
195
|
-
e.length > 0 &&
|
|
172
|
+
e.length > 0 && K.push({
|
|
196
173
|
id: "primary",
|
|
197
174
|
items: e,
|
|
198
175
|
collapsible: !1
|
|
199
176
|
});
|
|
200
177
|
}
|
|
201
|
-
if (
|
|
202
|
-
let e =
|
|
203
|
-
let t =
|
|
204
|
-
return
|
|
178
|
+
if (D.length > 0) {
|
|
179
|
+
let e = D.map((e) => {
|
|
180
|
+
let t = z.get(e);
|
|
181
|
+
return W({
|
|
205
182
|
entityId: e,
|
|
206
|
-
groupId: t?.groupId,
|
|
207
183
|
groupIcon: t?.groupIcon,
|
|
208
184
|
itemIcon: t?.itemIcon,
|
|
209
|
-
enableReorder: !0,
|
|
210
185
|
sectionId: "pinned"
|
|
211
186
|
});
|
|
212
187
|
}).filter((e) => e != null);
|
|
213
188
|
if (e.length > 0) {
|
|
214
189
|
let t;
|
|
215
|
-
|
|
216
|
-
enabled: !0,
|
|
217
|
-
onReorder: j
|
|
218
|
-
});
|
|
219
|
-
let n = e;
|
|
220
|
-
t ?? (n = e.map((e) => {
|
|
221
|
-
let { dragHandleSlot: t, dragHandleLabel: n, ...r } = e;
|
|
222
|
-
return r;
|
|
223
|
-
})), J.push({
|
|
190
|
+
A != null && e.length > 1 && (t = { onReorder: A }), K.push({
|
|
224
191
|
id: "pinned",
|
|
225
|
-
title:
|
|
226
|
-
icon:
|
|
192
|
+
title: E("sidebar.sections.pinned"),
|
|
193
|
+
icon: g(void 0, /* @__PURE__ */ u(h, {
|
|
227
194
|
width: 16,
|
|
228
195
|
height: 16,
|
|
229
196
|
"aria-hidden": "true"
|
|
230
197
|
})),
|
|
231
|
-
items:
|
|
198
|
+
items: e,
|
|
232
199
|
collapsible: !1,
|
|
233
200
|
reorder: t
|
|
234
201
|
});
|
|
235
202
|
}
|
|
236
203
|
}
|
|
237
|
-
if (
|
|
238
|
-
let e =
|
|
239
|
-
if (
|
|
204
|
+
if (O.length > 0) {
|
|
205
|
+
let e = O.map((e) => {
|
|
206
|
+
if (b[e.id] == null) return null;
|
|
240
207
|
let n = {
|
|
241
208
|
kind: e.kind,
|
|
242
209
|
id: e.id
|
|
243
210
|
};
|
|
244
|
-
if (
|
|
245
|
-
let r =
|
|
211
|
+
if (S?.isItemVisible?.(n, C) === !1 || B !== "" && !e.label.toLowerCase().includes(B)) return null;
|
|
212
|
+
let r = z.get(e.id);
|
|
246
213
|
return {
|
|
214
|
+
kind: "link",
|
|
247
215
|
id: `recent-${e.kind}-${e.id}`,
|
|
248
|
-
|
|
249
|
-
kind: e.kind,
|
|
250
|
-
id: e.id,
|
|
251
|
-
groupId: r?.groupId
|
|
252
|
-
},
|
|
216
|
+
reorderId: e.id,
|
|
253
217
|
label: e.label,
|
|
254
|
-
|
|
255
|
-
icon:
|
|
218
|
+
to: e.href,
|
|
219
|
+
icon: g(r?.itemIcon ?? r?.groupIcon, /* @__PURE__ */ u(d, {
|
|
256
220
|
width: 18,
|
|
257
221
|
height: 18,
|
|
258
222
|
"aria-hidden": "true"
|
|
259
223
|
})),
|
|
260
|
-
|
|
261
|
-
|
|
224
|
+
active: t(y, e.href),
|
|
225
|
+
accessibleLabel: e.label
|
|
262
226
|
};
|
|
263
227
|
}).filter((e) => e != null);
|
|
264
|
-
e.length > 0 &&
|
|
228
|
+
e.length > 0 && K.push({
|
|
265
229
|
id: "recent",
|
|
266
|
-
title:
|
|
267
|
-
icon:
|
|
230
|
+
title: E("sidebar.sections.recent"),
|
|
231
|
+
icon: g(void 0, /* @__PURE__ */ u(p, {
|
|
268
232
|
width: 16,
|
|
269
233
|
height: 16,
|
|
270
234
|
"aria-hidden": "true"
|
|
@@ -273,35 +237,33 @@ function v(v) {
|
|
|
273
237
|
collapsible: !1
|
|
274
238
|
});
|
|
275
239
|
}
|
|
276
|
-
return
|
|
277
|
-
if (t.isVisible != null && !t.isVisible(
|
|
240
|
+
return F.forEach(([e, t]) => {
|
|
241
|
+
if (t.isVisible != null && !t.isVisible(C)) return;
|
|
278
242
|
let n = [], i = r(t);
|
|
279
243
|
i.length > 0 && i.forEach((r) => {
|
|
280
244
|
if (r.kind === "dashboard") {
|
|
281
|
-
let
|
|
282
|
-
r.label != null && (
|
|
283
|
-
let
|
|
245
|
+
let e;
|
|
246
|
+
r.label != null && (e = a(r.label, T));
|
|
247
|
+
let i = U({
|
|
284
248
|
id: r.id,
|
|
285
249
|
icon: r.icon ?? t.icon,
|
|
286
|
-
label:
|
|
287
|
-
}
|
|
288
|
-
|
|
250
|
+
label: e
|
|
251
|
+
});
|
|
252
|
+
i != null && n.push(i);
|
|
289
253
|
return;
|
|
290
254
|
}
|
|
291
255
|
if (r.kind === "hub") {
|
|
292
|
-
let
|
|
293
|
-
hub:
|
|
294
|
-
groupId: e,
|
|
256
|
+
let e = s(r, S), i = G({
|
|
257
|
+
hub: e,
|
|
295
258
|
icon: r.icon ?? t.icon
|
|
296
259
|
});
|
|
297
|
-
|
|
260
|
+
i != null && n.push(i);
|
|
298
261
|
return;
|
|
299
262
|
}
|
|
300
263
|
let i;
|
|
301
|
-
r.label != null && (i = a(r.label,
|
|
302
|
-
let o =
|
|
264
|
+
r.label != null && (i = a(r.label, T));
|
|
265
|
+
let o = W({
|
|
303
266
|
entityId: r.id,
|
|
304
|
-
groupId: e,
|
|
305
267
|
groupIcon: t.icon,
|
|
306
268
|
itemIcon: r.icon,
|
|
307
269
|
itemLabel: i,
|
|
@@ -310,25 +272,43 @@ function v(v) {
|
|
|
310
272
|
o != null && n.push(o);
|
|
311
273
|
});
|
|
312
274
|
let o = n;
|
|
313
|
-
if (
|
|
275
|
+
if (N && t.behavior?.showInCollapsedRail !== !0 && (o = n.filter((e) => e.id.startsWith("dashboard") || e.active === !0)), o.length === 0) return;
|
|
314
276
|
let c;
|
|
315
|
-
t.title != null && (c = a(t.title,
|
|
316
|
-
let l =
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
})
|
|
277
|
+
t.title != null && (c = a(t.title, T));
|
|
278
|
+
let l = j?.[e], u;
|
|
279
|
+
M != null && (u = (t) => {
|
|
280
|
+
M(e, t);
|
|
281
|
+
});
|
|
282
|
+
let d = {
|
|
320
283
|
id: e,
|
|
321
284
|
title: c,
|
|
322
|
-
icon:
|
|
323
|
-
items: o
|
|
324
|
-
|
|
285
|
+
icon: g(t.icon, void 0, 16),
|
|
286
|
+
items: o
|
|
287
|
+
};
|
|
288
|
+
t.behavior?.collapsible === !1 || c == null ? K.push({
|
|
289
|
+
...d,
|
|
290
|
+
collapsible: !1
|
|
291
|
+
}) : l == null ? K.push({
|
|
292
|
+
...d,
|
|
293
|
+
title: c,
|
|
294
|
+
collapsible: !0,
|
|
325
295
|
defaultCollapsed: t.behavior?.defaultCollapsed ?? !0,
|
|
326
|
-
|
|
296
|
+
onCollapsedChange: u
|
|
297
|
+
}) : u == null ? K.push({
|
|
298
|
+
...d,
|
|
299
|
+
title: c,
|
|
300
|
+
collapsible: !0,
|
|
301
|
+
defaultCollapsed: l
|
|
302
|
+
}) : K.push({
|
|
303
|
+
...d,
|
|
304
|
+
title: c,
|
|
305
|
+
collapsible: !0,
|
|
306
|
+
collapsed: l,
|
|
327
307
|
onCollapsedChange: u
|
|
328
308
|
});
|
|
329
|
-
}),
|
|
309
|
+
}), K;
|
|
330
310
|
}
|
|
331
311
|
//#endregion
|
|
332
|
-
export {
|
|
312
|
+
export { _ as buildSidebarSections };
|
|
333
313
|
|
|
334
314
|
//# sourceMappingURL=buildSidebarSections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildSidebarSections.js","names":[],"sources":["../../../../../src/components/backoffice/layout/buildSidebarSections.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport type { TFunction } from 'i18next';\n\nimport type { BackofficeEntityManifestMap } from '@plumile/backoffice-core/types.js';\nimport type {\n BackofficeSidebarConfig,\n BackofficeDashboardRegistration,\n BackofficeSidebarItemDescriptor,\n BackofficeIconComponent,\n BackofficeSidebarRecentItem,\n} from '../../../provider/types.js';\nimport type {\n SidebarNavigationItem,\n SidebarNavigationSection,\n} from '@plumile/ui/components/navigation/sidebar/SidebarNavigation.js';\nimport { BackofficeSidebarHistorySvg } from '@plumile/ui/icons/backoffice/BackofficeSidebarHistorySvg.js';\nimport { GripDotsSvg } from '@plumile/ui/icons/GripDotsSvg.js';\nimport { PinFilledSvg } from '@plumile/ui/icons/PinFilledSvg.js';\nimport { PinSvg } from '@plumile/ui/icons/PinSvg.js';\nimport { SidebarHomeSvg } from '@plumile/ui/icons/SidebarHomeSvg.js';\nimport { SidebarTasksSvg } from '@plumile/ui/icons/SidebarTasksSvg.js';\nimport type { SidebarGroupCollapseState } from '../../../hooks/useSidebarGroupCollapse.js';\nimport { findBackofficeDashboardRegistration } from '../../../provider/dashboardRegistrations.js';\nimport * as styles from './backofficeSidebarActions.css.js';\nimport {\n buildEntityGroupLookup,\n isActivePath,\n joinBackofficePath,\n resolveLabel,\n resolveGroupItems,\n resolveHubEntityIds,\n resolveSidebarHub,\n resolveSidebarGroups,\n} from './sidebarUtils.js';\n\nconst renderIcon = (\n Icon?: BackofficeIconComponent,\n fallback?: ReactNode,\n size = 18,\n): ReactNode => {\n if (Icon != null) {\n return <Icon width={size} height={size} aria-hidden=\"true\" />;\n }\n return fallback ?? null;\n};\n\nexport type BuildSidebarSectionsInput = {\n basePath: string;\n pathname: string;\n entities: BackofficeEntityManifestMap;\n dashboards?: readonly BackofficeDashboardRegistration[];\n sidebar?: BackofficeSidebarConfig;\n permissions: unknown;\n searchQuery?: string;\n tApp: TFunction;\n t: TFunction;\n pinnedEntityIds?: readonly string[];\n recentItems?: readonly BackofficeSidebarRecentItem[];\n onTogglePin?: (entityId: string) => void;\n onReorderPin?: (fromId: string, toId: string) => void;\n collapsedByGroupId?: SidebarGroupCollapseState;\n onGroupCollapsedChange?: (groupId: string, collapsed: boolean) => void;\n sidebarCollapsed?: boolean;\n};\n\n/**\n * Builds the sidebar sections for the backoffice layout.\n */\nexport function buildSidebarSections(\n input: BuildSidebarSectionsInput,\n): readonly SidebarNavigationSection[] {\n const {\n basePath,\n pathname,\n entities,\n dashboards = [],\n sidebar,\n permissions,\n searchQuery,\n tApp,\n t,\n pinnedEntityIds = [],\n recentItems = [],\n onTogglePin,\n onReorderPin,\n collapsedByGroupId,\n onGroupCollapsedChange,\n sidebarCollapsed = false,\n } = input;\n\n const groups = resolveSidebarGroups(entities, sidebar);\n const entries = Object.entries(groups);\n const pinnedSet = new Set(pinnedEntityIds);\n const pinLabel = t('sidebar.actions.pin');\n const unpinLabel = t('sidebar.actions.unpin');\n const reorderLabel = t('sidebar.actions.reorder');\n const entityGroupLookup = buildEntityGroupLookup(groups, sidebar);\n const normalizedQuery = searchQuery?.trim().toLowerCase() ?? '';\n\n const labelMatchesQuery = (label: string): boolean => {\n return (\n normalizedQuery === '' || label.toLowerCase().includes(normalizedQuery)\n );\n };\n\n const renderPinAction = (entityId: string): ReactNode | null => {\n if (onTogglePin == null) {\n return null;\n }\n const isPinned = pinnedSet.has(entityId);\n let label = pinLabel;\n let Icon = PinSvg;\n if (isPinned) {\n label = unpinLabel;\n Icon = PinFilledSvg;\n }\n\n return (\n <button\n type=\"button\"\n className={styles.actionButton}\n aria-pressed={isPinned}\n aria-label={label}\n title={label}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n onTogglePin(entityId);\n }}\n >\n <Icon width={14} height={14} aria-hidden=\"true\" />\n </button>\n );\n };\n\n const buildDashboardItem = (\n inputItem?: {\n id?: string;\n icon?: BackofficeIconComponent;\n label?: string;\n },\n groupId?: string,\n ): SidebarNavigationItem | null => {\n const dashboardId = inputItem?.id ?? 'dashboard';\n const dashboardDescriptor: BackofficeSidebarItemDescriptor = {\n kind: 'dashboard',\n id: dashboardId,\n };\n const isDashboardVisible = sidebar?.isItemVisible?.(\n dashboardDescriptor,\n permissions,\n );\n if (isDashboardVisible === false) {\n return null;\n }\n\n const registration = findBackofficeDashboardRegistration(\n dashboards,\n dashboardId,\n );\n let label = inputItem?.label;\n if (label == null && registration != null) {\n label = resolveLabel(registration.label, tApp);\n }\n label ??= t('sidebar.items.dashboard');\n if (!labelMatchesQuery(label)) {\n return null;\n }\n\n let href = basePath;\n let id = 'dashboard';\n if (dashboardId !== 'dashboard') {\n href = joinBackofficePath(basePath, `dashboard/${dashboardId}`);\n id = `dashboard-${dashboardId}`;\n }\n\n let isActive = isActivePath(pathname, href);\n if (dashboardId === 'dashboard') {\n isActive = pathname === basePath || pathname === `${basePath}/dashboard`;\n }\n\n return {\n id,\n data: {\n kind: 'dashboard',\n id: dashboardId,\n groupId,\n },\n label,\n href,\n icon: renderIcon(\n inputItem?.icon ?? registration?.icon,\n <SidebarHomeSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n isActive,\n ariaLabel: label,\n };\n };\n\n const buildEntityItem = (inputItem: {\n entityId: string;\n groupId?: string;\n groupIcon?: BackofficeIconComponent;\n itemIcon?: BackofficeIconComponent;\n itemLabel?: string;\n enableReorder?: boolean;\n sectionId?: string;\n }): SidebarNavigationItem | null => {\n const {\n entityId,\n groupId,\n groupIcon,\n itemIcon,\n itemLabel,\n enableReorder,\n sectionId,\n } = inputItem;\n const config = entities[entityId];\n if (config == null) {\n return null;\n }\n\n let descriptor: BackofficeSidebarItemDescriptor = {\n kind: 'entity',\n id: entityId,\n };\n if (config.kind === 'tool') {\n descriptor = { kind: 'tool', id: entityId };\n }\n const isEntityVisible = sidebar?.isItemVisible?.(descriptor, permissions);\n if (isEntityVisible === false) {\n return null;\n }\n\n if (config.kind === 'tool') {\n const label = itemLabel ?? resolveLabel(config.label, tApp);\n if (\n normalizedQuery !== '' &&\n !label.toLowerCase().includes(normalizedQuery)\n ) {\n return null;\n }\n\n let actionsVisibility: SidebarNavigationItem['actionsVisibility'];\n if (sectionId !== 'pinned' && pinnedSet.has(entityId)) {\n actionsVisibility = 'always';\n }\n\n return {\n id: `tool-${entityId}`,\n data: {\n kind: 'tool',\n id: entityId,\n groupId,\n },\n label,\n href: config.routes.list,\n icon: renderIcon(\n itemIcon ?? groupIcon,\n <SidebarTasksSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n isActive: isActivePath(pathname, config.routes.list),\n ariaLabel: label,\n actionSlot: renderPinAction(entityId),\n actionsVisibility,\n };\n }\n\n if (!config.hasList) {\n return null;\n }\n\n const label = itemLabel ?? resolveLabel(config.label, tApp);\n if (\n normalizedQuery !== '' &&\n !label.toLowerCase().includes(normalizedQuery)\n ) {\n return null;\n }\n\n let dragHandleSlot: ReactNode | undefined;\n if (enableReorder === true && onReorderPin != null) {\n dragHandleSlot = (\n <GripDotsSvg width={14} height={14} aria-hidden=\"true\" />\n );\n }\n\n let dragHandleLabel: string | undefined;\n if (dragHandleSlot != null) {\n dragHandleLabel = reorderLabel;\n }\n\n let actionsVisibility: SidebarNavigationItem['actionsVisibility'];\n if (sectionId !== 'pinned' && pinnedSet.has(entityId)) {\n actionsVisibility = 'always';\n }\n\n return {\n id: entityId,\n data: {\n kind: 'entity',\n id: entityId,\n groupId,\n },\n label,\n href: config.routes.list,\n icon: renderIcon(\n itemIcon ?? groupIcon,\n <SidebarTasksSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n isActive: isActivePath(pathname, config.routes.list),\n ariaLabel: label,\n actionSlot: renderPinAction(entityId),\n actionsVisibility,\n dragHandleSlot,\n dragHandleLabel,\n };\n };\n\n const buildHubItem = (inputItem: {\n hub: ReturnType<typeof resolveSidebarHub>;\n groupId?: string;\n icon?: BackofficeIconComponent;\n }): SidebarNavigationItem | null => {\n const { hub, groupId, icon } = inputItem;\n const descriptor: BackofficeSidebarItemDescriptor = {\n kind: 'hub',\n id: hub.id,\n };\n const isVisible = sidebar?.isItemVisible?.(descriptor, permissions);\n if (isVisible === false) {\n return null;\n }\n const childEntityIds = resolveHubEntityIds(hub);\n const visibleChildConfigs = childEntityIds\n .map((entityId) => {\n return entities[entityId] ?? null;\n })\n .filter((config): config is BackofficeEntityManifestMap[string] => {\n if (config == null) {\n return false;\n }\n let childKind: BackofficeSidebarItemDescriptor['kind'] = 'entity';\n if (config.kind === 'tool') {\n childKind = 'tool';\n }\n const childDescriptor: BackofficeSidebarItemDescriptor = {\n kind: childKind,\n id: config.id,\n };\n const isChildVisible = sidebar?.isItemVisible?.(\n childDescriptor,\n permissions,\n );\n if (isChildVisible === false) {\n return false;\n }\n if (config.kind !== 'tool' && !config.hasList) {\n return false;\n }\n return true;\n });\n if (childEntityIds.length > 0 && visibleChildConfigs.length === 0) {\n return null;\n }\n const label = resolveLabel(hub.title, tApp);\n const matchesHub = labelMatchesQuery(label);\n const matchesChild = visibleChildConfigs.some((config) => {\n return labelMatchesQuery(resolveLabel(config.label, tApp));\n });\n if (!matchesHub && !matchesChild) {\n return null;\n }\n const isActive =\n isActivePath(pathname, hub.href) ||\n visibleChildConfigs.some((config) => {\n return isActivePath(pathname, config.routes.list);\n });\n return {\n id: `hub-${hub.id}`,\n data: {\n kind: 'hub',\n id: hub.id,\n groupId,\n },\n label,\n href: hub.href,\n icon: renderIcon(\n icon,\n <SidebarTasksSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n isActive,\n ariaLabel: label,\n };\n };\n\n const sections: SidebarNavigationSection[] = [];\n\n const primaryItems = sidebar?.primaryItems ?? [];\n if (primaryItems.length > 0) {\n const primarySectionItems = primaryItems\n .map((primaryItem): SidebarNavigationItem | null => {\n if (primaryItem.kind === 'dashboard') {\n let itemLabel: string | undefined;\n if (primaryItem.label != null) {\n itemLabel = resolveLabel(primaryItem.label, tApp);\n }\n return buildDashboardItem({\n id: primaryItem.id,\n icon: primaryItem.icon,\n label: itemLabel,\n });\n }\n if (primaryItem.kind === 'hub') {\n const hub = resolveSidebarHub(primaryItem, sidebar);\n return buildHubItem({\n hub,\n icon: primaryItem.icon,\n });\n }\n let itemLabel: string | undefined;\n if (primaryItem.label != null) {\n itemLabel = resolveLabel(primaryItem.label, tApp);\n }\n return buildEntityItem({\n entityId: primaryItem.id,\n itemIcon: primaryItem.icon,\n itemLabel,\n sectionId: 'primary',\n });\n })\n .filter((item): item is SidebarNavigationItem => {\n return item != null;\n });\n\n if (primarySectionItems.length > 0) {\n sections.push({\n id: 'primary',\n items: primarySectionItems,\n collapsible: false,\n });\n }\n }\n\n if (pinnedEntityIds.length > 0) {\n const pinnedItems = pinnedEntityIds\n .map((entityId) => {\n const groupMeta = entityGroupLookup.get(entityId);\n return buildEntityItem({\n entityId,\n groupId: groupMeta?.groupId,\n groupIcon: groupMeta?.groupIcon,\n itemIcon: groupMeta?.itemIcon,\n enableReorder: true,\n sectionId: 'pinned',\n });\n })\n .filter((item): item is SidebarNavigationItem => {\n return item != null;\n });\n\n if (pinnedItems.length > 0) {\n let reorder: SidebarNavigationSection['reorder'];\n if (onReorderPin != null && pinnedItems.length > 1) {\n reorder = {\n enabled: true,\n onReorder: onReorderPin,\n };\n }\n let sectionItems = pinnedItems;\n if (reorder == null) {\n sectionItems = pinnedItems.map((item) => {\n const { dragHandleSlot, dragHandleLabel, ...rest } = item;\n return rest;\n });\n }\n\n sections.push({\n id: 'pinned',\n title: t('sidebar.sections.pinned'),\n icon: renderIcon(\n undefined,\n <PinSvg width={16} height={16} aria-hidden=\"true\" />,\n ),\n items: sectionItems,\n collapsible: false,\n reorder,\n });\n }\n }\n\n if (recentItems.length > 0) {\n const recentSectionItems = recentItems\n .map((recentItem): SidebarNavigationItem | null => {\n const config = entities[recentItem.id];\n if (config == null) {\n return null;\n }\n const descriptor: BackofficeSidebarItemDescriptor = {\n kind: recentItem.kind,\n id: recentItem.id,\n };\n const isVisible = sidebar?.isItemVisible?.(descriptor, permissions);\n if (isVisible === false) {\n return null;\n }\n if (\n normalizedQuery !== '' &&\n !recentItem.label.toLowerCase().includes(normalizedQuery)\n ) {\n return null;\n }\n const groupMeta = entityGroupLookup.get(recentItem.id);\n return {\n id: `recent-${recentItem.kind}-${recentItem.id}`,\n data: {\n kind: recentItem.kind,\n id: recentItem.id,\n groupId: groupMeta?.groupId,\n },\n label: recentItem.label,\n href: recentItem.href,\n icon: renderIcon(\n groupMeta?.itemIcon ?? groupMeta?.groupIcon,\n <SidebarTasksSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n isActive: isActivePath(pathname, recentItem.href),\n ariaLabel: recentItem.label,\n } satisfies SidebarNavigationItem;\n })\n .filter((item): item is SidebarNavigationItem => {\n return item != null;\n });\n\n if (recentSectionItems.length > 0) {\n sections.push({\n id: 'recent',\n title: t('sidebar.sections.recent'),\n icon: renderIcon(\n undefined,\n <BackofficeSidebarHistorySvg\n width={16}\n height={16}\n aria-hidden=\"true\"\n />,\n ),\n items: recentSectionItems,\n collapsible: false,\n });\n }\n }\n\n entries.forEach(([groupId, group]) => {\n if (group.isVisible != null && !group.isVisible(permissions)) {\n return;\n }\n\n const items: SidebarNavigationItem[] = [];\n\n const groupItems = resolveGroupItems(group);\n if (groupItems.length > 0) {\n groupItems.forEach((groupItem) => {\n if (groupItem.kind === 'dashboard') {\n let itemLabel: string | undefined;\n if (groupItem.label != null) {\n itemLabel = resolveLabel(groupItem.label, tApp);\n }\n const item = buildDashboardItem(\n {\n id: groupItem.id,\n icon: groupItem.icon ?? group.icon,\n label: itemLabel,\n },\n groupId,\n );\n if (item != null) {\n items.push(item);\n }\n return;\n }\n if (groupItem.kind === 'hub') {\n const hub = resolveSidebarHub(groupItem, sidebar);\n const item = buildHubItem({\n hub,\n groupId,\n icon: groupItem.icon ?? group.icon,\n });\n if (item != null) {\n items.push(item);\n }\n return;\n }\n let itemLabel: string | undefined;\n if (groupItem.label != null) {\n itemLabel = resolveLabel(groupItem.label, tApp);\n }\n const item = buildEntityItem({\n entityId: groupItem.id,\n groupId,\n groupIcon: group.icon,\n itemIcon: groupItem.icon,\n itemLabel,\n sectionId: groupId,\n });\n if (item != null) {\n items.push(item);\n }\n });\n }\n\n let sectionItems: SidebarNavigationItem[] = items;\n if (sidebarCollapsed && group.behavior?.showInCollapsedRail !== true) {\n sectionItems = items.filter((item) => {\n return item.data?.kind === 'dashboard' || item.isActive === true;\n });\n }\n\n if (sectionItems.length === 0) {\n return;\n }\n\n let title: string | undefined;\n if (group.title != null) {\n title = resolveLabel(group.title, tApp);\n }\n\n const isCollapsed = collapsedByGroupId?.[groupId];\n let onCollapsedChange: ((collapsed: boolean) => void) | undefined;\n if (onGroupCollapsedChange != null) {\n onCollapsedChange = (collapsed: boolean) => {\n onGroupCollapsedChange(groupId, collapsed);\n };\n }\n\n sections.push({\n id: groupId,\n title,\n icon: renderIcon(group.icon, undefined, 16),\n items: sectionItems,\n collapsible: group.behavior?.collapsible ?? true,\n defaultCollapsed: group.behavior?.defaultCollapsed ?? true,\n isCollapsed,\n onCollapsedChange,\n });\n });\n\n return sections;\n}\n"],"mappings":";;;;;;;;;;;AAmCA,IAAM,KACJ,GACA,GACA,IAAO,OAEH,KAAQ,OAGL,KAAY,OAFV,kBAAC,GAAD;CAAM,OAAO;CAAM,QAAQ;CAAM,eAAY;AAAQ,CAAA;AA2BhE,SAAgB,EACd,GACqC;CACrC,IAAM,EACJ,aACA,aACA,aACA,gBAAa,CAAC,GACd,YACA,gBACA,gBACA,SACA,MACA,qBAAkB,CAAC,GACnB,iBAAc,CAAC,GACf,gBACA,iBACA,uBACA,2BACA,sBAAmB,OACjB,GAEE,IAAS,EAAqB,GAAU,CAAO,GAC/C,IAAU,OAAO,QAAQ,CAAM,GAC/B,IAAY,IAAI,IAAI,CAAe,GACnC,IAAW,EAAE,qBAAqB,GAClC,IAAa,EAAE,uBAAuB,GACtC,IAAe,EAAE,yBAAyB,GAC1C,IAAoB,EAAuB,GAA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c,IAAqB,IACrC;EAOJ,AANI,KAA0B,SAC5B,KAAqB,MAAuB;GAC1C,EAAuB,GAAS,CAAS;EAC3C,IAGF,EAAS,KAAK;GACZ,IAAI;GACJ;GACA,MAAM,EAAW,EAAM,MAAM,KAAA,GAAW,EAAE;GAC1C,OAAO;GACP,aAAa,EAAM,UAAU,eAAe;GAC5C,kBAAkB,EAAM,UAAU,oBAAoB;GACtD;GACA;EACF,CAAC;CACH,CAAC,GAEM;AACT"}
|
|
1
|
+
{"version":3,"file":"buildSidebarSections.js","names":[],"sources":["../../../../../src/components/backoffice/layout/buildSidebarSections.tsx"],"sourcesContent":["import { type ReactNode } from 'react';\nimport type { TFunction } from 'i18next';\n\nimport type { BackofficeEntityManifestMap } from '@plumile/backoffice-core/types.js';\nimport type {\n BackofficeSidebarConfig,\n BackofficeDashboardRegistration,\n BackofficeSidebarItemDescriptor,\n BackofficeIconComponent,\n BackofficeSidebarRecentItem,\n} from '../../../provider/types.js';\nimport type { SidebarItemConfig, SidebarSectionConfig } from '@plumile/ui';\nimport { BackofficeSidebarHistorySvg } from '@plumile/ui/icons/BackofficeSidebarHistorySvg';\nimport { PinFilledSvg } from '@plumile/ui/icons/PinFilledSvg';\nimport { PinSvg } from '@plumile/ui/icons/PinSvg';\nimport { SidebarHomeSvg } from '@plumile/ui/icons/SidebarHomeSvg';\nimport { SidebarTasksSvg } from '@plumile/ui/icons/SidebarTasksSvg';\nimport type { SidebarGroupCollapseState } from '../../../hooks/useSidebarGroupCollapse.js';\nimport { findBackofficeDashboardRegistration } from '../../../provider/dashboardRegistrations.js';\nimport * as styles from './backofficeSidebarActions.css.js';\nimport {\n buildEntityGroupLookup,\n isActivePath,\n joinBackofficePath,\n resolveLabel,\n resolveGroupItems,\n resolveHubEntityIds,\n resolveSidebarHub,\n resolveSidebarGroups,\n} from './sidebarUtils.js';\n\nconst renderIcon = (\n Icon?: BackofficeIconComponent,\n fallback?: ReactNode,\n size = 18,\n): ReactNode => {\n if (Icon != null) {\n return <Icon width={size} height={size} aria-hidden=\"true\" />;\n }\n return fallback ?? null;\n};\n\nexport type BuildSidebarSectionsInput = {\n basePath: string;\n pathname: string;\n entities: BackofficeEntityManifestMap;\n dashboards?: readonly BackofficeDashboardRegistration[];\n sidebar?: BackofficeSidebarConfig;\n permissions: unknown;\n searchQuery?: string;\n tApp: TFunction;\n t: TFunction;\n pinnedEntityIds?: readonly string[];\n recentItems?: readonly BackofficeSidebarRecentItem[];\n onTogglePin?: (entityId: string) => void;\n onReorderPin?: (fromId: string, toId: string) => void;\n collapsedByGroupId?: SidebarGroupCollapseState;\n onGroupCollapsedChange?: (groupId: string, collapsed: boolean) => void;\n sidebarCollapsed?: boolean;\n};\n\n/**\n * Builds the sidebar sections for the backoffice layout.\n */\nexport function buildSidebarSections(\n input: BuildSidebarSectionsInput,\n): readonly SidebarSectionConfig[] {\n const {\n basePath,\n pathname,\n entities,\n dashboards = [],\n sidebar,\n permissions,\n searchQuery,\n tApp,\n t,\n pinnedEntityIds = [],\n recentItems = [],\n onTogglePin,\n onReorderPin,\n collapsedByGroupId,\n onGroupCollapsedChange,\n sidebarCollapsed = false,\n } = input;\n\n const groups = resolveSidebarGroups(entities, sidebar);\n const entries = Object.entries(groups);\n const pinnedSet = new Set(pinnedEntityIds);\n const pinLabel = t('sidebar.actions.pin');\n const unpinLabel = t('sidebar.actions.unpin');\n const entityGroupLookup = buildEntityGroupLookup(groups, sidebar);\n const normalizedQuery = searchQuery?.trim().toLowerCase() ?? '';\n\n const labelMatchesQuery = (label: string): boolean => {\n return (\n normalizedQuery === '' || label.toLowerCase().includes(normalizedQuery)\n );\n };\n\n const renderPinAction = (entityId: string): ReactNode | null => {\n if (onTogglePin == null) {\n return null;\n }\n const isPinned = pinnedSet.has(entityId);\n let label = pinLabel;\n let Icon = PinSvg;\n if (isPinned) {\n label = unpinLabel;\n Icon = PinFilledSvg;\n }\n\n return (\n <button\n type=\"button\"\n className={styles.actionButton}\n aria-pressed={isPinned}\n aria-label={label}\n title={label}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n onTogglePin(entityId);\n }}\n >\n <Icon width={14} height={14} aria-hidden=\"true\" />\n </button>\n );\n };\n\n const buildDashboardItem = (inputItem?: {\n id?: string;\n icon?: BackofficeIconComponent;\n label?: string;\n }): SidebarItemConfig | null => {\n const dashboardId = inputItem?.id ?? 'dashboard';\n const dashboardDescriptor: BackofficeSidebarItemDescriptor = {\n kind: 'dashboard',\n id: dashboardId,\n };\n const isDashboardVisible = sidebar?.isItemVisible?.(\n dashboardDescriptor,\n permissions,\n );\n if (isDashboardVisible === false) {\n return null;\n }\n\n const registration = findBackofficeDashboardRegistration(\n dashboards,\n dashboardId,\n );\n let label = inputItem?.label;\n if (label == null && registration != null) {\n label = resolveLabel(registration.label, tApp);\n }\n label ??= t('sidebar.items.dashboard');\n if (!labelMatchesQuery(label)) {\n return null;\n }\n\n let href = basePath;\n let id = 'dashboard';\n if (dashboardId !== 'dashboard') {\n href = joinBackofficePath(basePath, `dashboard/${dashboardId}`);\n id = `dashboard-${dashboardId}`;\n }\n\n let isActive = isActivePath(pathname, href);\n if (dashboardId === 'dashboard') {\n isActive = pathname === basePath || pathname === `${basePath}/dashboard`;\n }\n\n return {\n kind: 'link',\n id,\n reorderId: dashboardId,\n label,\n to: href,\n icon: renderIcon(\n inputItem?.icon ?? registration?.icon,\n <SidebarHomeSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n active: isActive,\n accessibleLabel: label,\n };\n };\n\n const buildEntityItem = (inputItem: {\n entityId: string;\n groupIcon?: BackofficeIconComponent;\n itemIcon?: BackofficeIconComponent;\n itemLabel?: string;\n sectionId?: string;\n }): SidebarItemConfig | null => {\n const { entityId, groupIcon, itemIcon, itemLabel, sectionId } = inputItem;\n const config = entities[entityId];\n if (config == null) {\n return null;\n }\n\n let descriptor: BackofficeSidebarItemDescriptor = {\n kind: 'entity',\n id: entityId,\n };\n if (config.kind === 'tool') {\n descriptor = { kind: 'tool', id: entityId };\n }\n const isEntityVisible = sidebar?.isItemVisible?.(descriptor, permissions);\n if (isEntityVisible === false) {\n return null;\n }\n\n if (config.kind === 'tool') {\n const label = itemLabel ?? resolveLabel(config.label, tApp);\n if (\n normalizedQuery !== '' &&\n !label.toLowerCase().includes(normalizedQuery)\n ) {\n return null;\n }\n\n let actionsVisibility: SidebarItemConfig['actionsVisibility'];\n if (sectionId !== 'pinned' && pinnedSet.has(entityId)) {\n actionsVisibility = 'always';\n }\n\n return {\n kind: 'link',\n id: `tool-${entityId}`,\n reorderId: entityId,\n label,\n to: config.routes.list,\n icon: renderIcon(\n itemIcon ?? groupIcon,\n <SidebarTasksSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n active: isActivePath(pathname, config.routes.list),\n accessibleLabel: label,\n actionSlot: renderPinAction(entityId),\n actionsVisibility,\n };\n }\n\n if (!config.hasList) {\n return null;\n }\n\n const label = itemLabel ?? resolveLabel(config.label, tApp);\n if (\n normalizedQuery !== '' &&\n !label.toLowerCase().includes(normalizedQuery)\n ) {\n return null;\n }\n\n let actionsVisibility: SidebarItemConfig['actionsVisibility'];\n if (sectionId !== 'pinned' && pinnedSet.has(entityId)) {\n actionsVisibility = 'always';\n }\n\n return {\n kind: 'link',\n id: entityId,\n reorderId: entityId,\n label,\n to: config.routes.list,\n icon: renderIcon(\n itemIcon ?? groupIcon,\n <SidebarTasksSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n active: isActivePath(pathname, config.routes.list),\n accessibleLabel: label,\n actionSlot: renderPinAction(entityId),\n actionsVisibility,\n };\n };\n\n const buildHubItem = (inputItem: {\n hub: ReturnType<typeof resolveSidebarHub>;\n icon?: BackofficeIconComponent;\n }): SidebarItemConfig | null => {\n const { hub, icon } = inputItem;\n const descriptor: BackofficeSidebarItemDescriptor = {\n kind: 'hub',\n id: hub.id,\n };\n const isVisible = sidebar?.isItemVisible?.(descriptor, permissions);\n if (isVisible === false) {\n return null;\n }\n const childEntityIds = resolveHubEntityIds(hub);\n const visibleChildConfigs = childEntityIds\n .map((entityId) => {\n return entities[entityId] ?? null;\n })\n .filter((config): config is BackofficeEntityManifestMap[string] => {\n if (config == null) {\n return false;\n }\n let childKind: BackofficeSidebarItemDescriptor['kind'] = 'entity';\n if (config.kind === 'tool') {\n childKind = 'tool';\n }\n const childDescriptor: BackofficeSidebarItemDescriptor = {\n kind: childKind,\n id: config.id,\n };\n const isChildVisible = sidebar?.isItemVisible?.(\n childDescriptor,\n permissions,\n );\n if (isChildVisible === false) {\n return false;\n }\n if (config.kind !== 'tool' && !config.hasList) {\n return false;\n }\n return true;\n });\n if (childEntityIds.length > 0 && visibleChildConfigs.length === 0) {\n return null;\n }\n const label = resolveLabel(hub.title, tApp);\n const matchesHub = labelMatchesQuery(label);\n const matchesChild = visibleChildConfigs.some((config) => {\n return labelMatchesQuery(resolveLabel(config.label, tApp));\n });\n if (!matchesHub && !matchesChild) {\n return null;\n }\n const isActive =\n isActivePath(pathname, hub.href) ||\n visibleChildConfigs.some((config) => {\n return isActivePath(pathname, config.routes.list);\n });\n return {\n kind: 'link',\n id: `hub-${hub.id}`,\n reorderId: hub.id,\n label,\n to: hub.href,\n icon: renderIcon(\n icon,\n <SidebarTasksSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n active: isActive,\n accessibleLabel: label,\n };\n };\n\n const sections: SidebarSectionConfig[] = [];\n\n const primaryItems = sidebar?.primaryItems ?? [];\n if (primaryItems.length > 0) {\n const primarySectionItems = primaryItems\n .map((primaryItem): SidebarItemConfig | null => {\n if (primaryItem.kind === 'dashboard') {\n let itemLabel: string | undefined;\n if (primaryItem.label != null) {\n itemLabel = resolveLabel(primaryItem.label, tApp);\n }\n return buildDashboardItem({\n id: primaryItem.id,\n icon: primaryItem.icon,\n label: itemLabel,\n });\n }\n if (primaryItem.kind === 'hub') {\n const hub = resolveSidebarHub(primaryItem, sidebar);\n return buildHubItem({\n hub,\n icon: primaryItem.icon,\n });\n }\n let itemLabel: string | undefined;\n if (primaryItem.label != null) {\n itemLabel = resolveLabel(primaryItem.label, tApp);\n }\n return buildEntityItem({\n entityId: primaryItem.id,\n itemIcon: primaryItem.icon,\n itemLabel,\n sectionId: 'primary',\n });\n })\n .filter((item): item is SidebarItemConfig => {\n return item != null;\n });\n\n if (primarySectionItems.length > 0) {\n sections.push({\n id: 'primary',\n items: primarySectionItems,\n collapsible: false,\n });\n }\n }\n\n if (pinnedEntityIds.length > 0) {\n const pinnedItems = pinnedEntityIds\n .map((entityId) => {\n const groupMeta = entityGroupLookup.get(entityId);\n return buildEntityItem({\n entityId,\n groupIcon: groupMeta?.groupIcon,\n itemIcon: groupMeta?.itemIcon,\n sectionId: 'pinned',\n });\n })\n .filter((item): item is SidebarItemConfig => {\n return item != null;\n });\n\n if (pinnedItems.length > 0) {\n let reorder: SidebarSectionConfig['reorder'];\n if (onReorderPin != null && pinnedItems.length > 1) {\n reorder = {\n onReorder: onReorderPin,\n };\n }\n\n sections.push({\n id: 'pinned',\n title: t('sidebar.sections.pinned'),\n icon: renderIcon(\n undefined,\n <PinSvg width={16} height={16} aria-hidden=\"true\" />,\n ),\n items: pinnedItems,\n collapsible: false,\n reorder,\n });\n }\n }\n\n if (recentItems.length > 0) {\n const recentSectionItems = recentItems\n .map((recentItem): SidebarItemConfig | null => {\n const config = entities[recentItem.id];\n if (config == null) {\n return null;\n }\n const descriptor: BackofficeSidebarItemDescriptor = {\n kind: recentItem.kind,\n id: recentItem.id,\n };\n const isVisible = sidebar?.isItemVisible?.(descriptor, permissions);\n if (isVisible === false) {\n return null;\n }\n if (\n normalizedQuery !== '' &&\n !recentItem.label.toLowerCase().includes(normalizedQuery)\n ) {\n return null;\n }\n const groupMeta = entityGroupLookup.get(recentItem.id);\n return {\n kind: 'link',\n id: `recent-${recentItem.kind}-${recentItem.id}`,\n reorderId: recentItem.id,\n label: recentItem.label,\n to: recentItem.href,\n icon: renderIcon(\n groupMeta?.itemIcon ?? groupMeta?.groupIcon,\n <SidebarTasksSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n active: isActivePath(pathname, recentItem.href),\n accessibleLabel: recentItem.label,\n } satisfies SidebarItemConfig;\n })\n .filter((item): item is SidebarItemConfig => {\n return item != null;\n });\n\n if (recentSectionItems.length > 0) {\n sections.push({\n id: 'recent',\n title: t('sidebar.sections.recent'),\n icon: renderIcon(\n undefined,\n <BackofficeSidebarHistorySvg\n width={16}\n height={16}\n aria-hidden=\"true\"\n />,\n ),\n items: recentSectionItems,\n collapsible: false,\n });\n }\n }\n\n entries.forEach(([groupId, group]) => {\n if (group.isVisible != null && !group.isVisible(permissions)) {\n return;\n }\n\n const items: SidebarItemConfig[] = [];\n\n const groupItems = resolveGroupItems(group);\n if (groupItems.length > 0) {\n groupItems.forEach((groupItem) => {\n if (groupItem.kind === 'dashboard') {\n let itemLabel: string | undefined;\n if (groupItem.label != null) {\n itemLabel = resolveLabel(groupItem.label, tApp);\n }\n const item = buildDashboardItem({\n id: groupItem.id,\n icon: groupItem.icon ?? group.icon,\n label: itemLabel,\n });\n if (item != null) {\n items.push(item);\n }\n return;\n }\n if (groupItem.kind === 'hub') {\n const hub = resolveSidebarHub(groupItem, sidebar);\n const item = buildHubItem({\n hub,\n icon: groupItem.icon ?? group.icon,\n });\n if (item != null) {\n items.push(item);\n }\n return;\n }\n let itemLabel: string | undefined;\n if (groupItem.label != null) {\n itemLabel = resolveLabel(groupItem.label, tApp);\n }\n const item = buildEntityItem({\n entityId: groupItem.id,\n groupIcon: group.icon,\n itemIcon: groupItem.icon,\n itemLabel,\n sectionId: groupId,\n });\n if (item != null) {\n items.push(item);\n }\n });\n }\n\n let sectionItems: SidebarItemConfig[] = items;\n if (sidebarCollapsed && group.behavior?.showInCollapsedRail !== true) {\n sectionItems = items.filter((item) => {\n return item.id.startsWith('dashboard') || item.active === true;\n });\n }\n\n if (sectionItems.length === 0) {\n return;\n }\n\n let title: string | undefined;\n if (group.title != null) {\n title = resolveLabel(group.title, tApp);\n }\n\n const collapsed = collapsedByGroupId?.[groupId];\n let onCollapsedChange: ((collapsed: boolean) => void) | undefined;\n if (onGroupCollapsedChange != null) {\n onCollapsedChange = (collapsed: boolean) => {\n onGroupCollapsedChange(groupId, collapsed);\n };\n }\n\n const commonSection = {\n id: groupId,\n title,\n icon: renderIcon(group.icon, undefined, 16),\n items: sectionItems,\n };\n if (group.behavior?.collapsible === false || title == null) {\n sections.push({ ...commonSection, collapsible: false });\n } else if (collapsed == null) {\n sections.push({\n ...commonSection,\n title,\n collapsible: true,\n defaultCollapsed: group.behavior?.defaultCollapsed ?? true,\n onCollapsedChange,\n });\n } else if (onCollapsedChange != null) {\n sections.push({\n ...commonSection,\n title,\n collapsible: true,\n collapsed,\n onCollapsedChange,\n });\n } else {\n sections.push({\n ...commonSection,\n title,\n collapsible: true,\n defaultCollapsed: collapsed,\n });\n }\n });\n\n return sections;\n}\n"],"mappings":";;;;;;;;;;AA+BA,IAAM,KACJ,GACA,GACA,IAAO,OAEH,KAAQ,OAGL,KAAY,OAFV,kBAAC,GAAD;CAAM,OAAO;CAAM,QAAQ;CAAM,eAAY;AAAQ,CAAA;AA2BhE,SAAgB,EACd,GACiC;CACjC,IAAM,EACJ,aACA,aACA,aACA,gBAAa,CAAC,GACd,YACA,gBACA,gBACA,SACA,MACA,qBAAkB,CAAC,GACnB,iBAAc,CAAC,GACf,gBACA,iBACA,uBACA,2BACA,sBAAmB,OACjB,GAEE,IAAS,EAAqB,GAAU,CAAO,GAC/C,IAAU,OAAO,QAAQ,CAAM,GAC/B,IAAY,IAAI,IAAI,CAAe,GACnC,IAAW,EAAE,qBAAqB,GAClC,IAAa,EAAE,uBAAuB,GACtC,IAAoB,EAAuB,GAAQ,CAAO,GAC1D,IAAkB,GAAa,KAAK,CAAC,CAAC,YAAY,KAAK,IAEvD,KAAqB,MAEvB,MAAoB,MAAM,EAAM,YAAY,CAAC,CAAC,SAAS,CAAe,GAIpE,KAAmB,MAAuC;EAC9D,IAAI,KAAe,MACjB,OAAO;EAET,IAAM,IAAW,EAAU,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