@plumile/backoffice-react 0.1.108 → 0.1.112

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.
Files changed (319) hide show
  1. package/lib/esm/auth/AuthRefreshNotice.js +2 -2
  2. package/lib/esm/auth/AuthRefreshNotice.js.map +1 -1
  3. package/lib/esm/auth/authRefreshNotice.css.js +1 -0
  4. package/lib/esm/auth/authRefreshNotice.css.js.map +1 -1
  5. package/lib/esm/auth/login/EmailCapturePanel.js +12 -9
  6. package/lib/esm/auth/login/EmailCapturePanel.js.map +1 -1
  7. package/lib/esm/auth/login/LoginFlow.js +10 -10
  8. package/lib/esm/auth/login/LoginFlow.js.map +1 -1
  9. package/lib/esm/auth/login/MethodChooser.js +14 -12
  10. package/lib/esm/auth/login/MethodChooser.js.map +1 -1
  11. package/lib/esm/auth/login/MfaChallengeForm.js +13 -10
  12. package/lib/esm/auth/login/MfaChallengeForm.js.map +1 -1
  13. package/lib/esm/auth/login/OidcButtons.js +4 -4
  14. package/lib/esm/auth/login/OidcButtons.js.map +1 -1
  15. package/lib/esm/auth/login/PasskeyLoginForm.js +13 -10
  16. package/lib/esm/auth/login/PasskeyLoginForm.js.map +1 -1
  17. package/lib/esm/auth/login/PasswordLoginPanel.js +8 -8
  18. package/lib/esm/auth/login/PasswordLoginPanel.js.map +1 -1
  19. package/lib/esm/auth/login/loginPage.css.js.map +1 -1
  20. package/lib/esm/auth/pages/AcceptInvitationScreen.js +18 -14
  21. package/lib/esm/auth/pages/AcceptInvitationScreen.js.map +1 -1
  22. package/lib/esm/auth/pages/PasswordResetCompleteScreen.js +16 -12
  23. package/lib/esm/auth/pages/PasswordResetCompleteScreen.js.map +1 -1
  24. package/lib/esm/auth/pages/PasswordResetRequestScreen.js +15 -11
  25. package/lib/esm/auth/pages/PasswordResetRequestScreen.js.map +1 -1
  26. package/lib/esm/auth/pages/VerifyEmailScreen.js +13 -11
  27. package/lib/esm/auth/pages/VerifyEmailScreen.js.map +1 -1
  28. package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +66 -54
  29. package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js.map +1 -1
  30. package/lib/esm/components/backoffice/actions/LazyBackofficeEntityActionFormDialog.js +8 -8
  31. package/lib/esm/components/backoffice/actions/LazyBackofficeEntityActionFormDialog.js.map +1 -1
  32. package/lib/esm/components/backoffice/actions/backofficeEntityActionFormDialog.css.js.map +1 -1
  33. package/lib/esm/components/backoffice/actions/toastViewAction.js.map +1 -1
  34. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +13 -12
  35. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
  36. package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js +3 -3
  37. package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js.map +1 -1
  38. package/lib/esm/components/backoffice/detail/BackofficeDetailBadgeRow.js +8 -8
  39. package/lib/esm/components/backoffice/detail/BackofficeDetailBadgeRow.js.map +1 -1
  40. package/lib/esm/components/backoffice/detail/BackofficeDetailErrorList.js +12 -11
  41. package/lib/esm/components/backoffice/detail/BackofficeDetailErrorList.js.map +1 -1
  42. package/lib/esm/components/backoffice/detail/BackofficeDetailField.js +8 -7
  43. package/lib/esm/components/backoffice/detail/BackofficeDetailField.js.map +1 -1
  44. package/lib/esm/components/backoffice/detail/BackofficeDetailFlagTag.css.js.map +1 -1
  45. package/lib/esm/components/backoffice/detail/BackofficeDetailFlagTag.js +6 -6
  46. package/lib/esm/components/backoffice/detail/BackofficeDetailFlagTag.js.map +1 -1
  47. package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js +3 -3
  48. package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js.map +1 -1
  49. package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js +3 -3
  50. package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js.map +1 -1
  51. package/lib/esm/components/backoffice/detail/BackofficeDetailPayload.js +4 -4
  52. package/lib/esm/components/backoffice/detail/BackofficeDetailPayload.js.map +1 -1
  53. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js +1 -1
  54. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js.map +1 -1
  55. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js +30 -29
  56. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js.map +1 -1
  57. package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js +3 -3
  58. package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js.map +1 -1
  59. package/lib/esm/components/backoffice/detail/BackofficeDetailTaggedValue.js +5 -5
  60. package/lib/esm/components/backoffice/detail/BackofficeDetailTaggedValue.js.map +1 -1
  61. package/lib/esm/components/backoffice/detail/BackofficeEntitySummaryHeader.js +21 -19
  62. package/lib/esm/components/backoffice/detail/BackofficeEntitySummaryHeader.js.map +1 -1
  63. package/lib/esm/components/backoffice/detail/BackofficeKpiStrip.js +9 -6
  64. package/lib/esm/components/backoffice/detail/BackofficeKpiStrip.js.map +1 -1
  65. package/lib/esm/components/backoffice/detail/BackofficeLifecycleTimelineSection.js +7 -7
  66. package/lib/esm/components/backoffice/detail/BackofficeLifecycleTimelineSection.js.map +1 -1
  67. package/lib/esm/components/backoffice/detail/BackofficePayloadInspectorSection.js +8 -8
  68. package/lib/esm/components/backoffice/detail/BackofficePayloadInspectorSection.js.map +1 -1
  69. package/lib/esm/components/backoffice/detail/BackofficeReferenceValue.js +5 -5
  70. package/lib/esm/components/backoffice/detail/BackofficeReferenceValue.js.map +1 -1
  71. package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js +1 -1
  72. package/lib/esm/components/backoffice/detail/BackofficeRelationsSummaryGrid.js.map +1 -1
  73. package/lib/esm/components/backoffice/detail/BackofficeStatusMetaBadge.js +4 -4
  74. package/lib/esm/components/backoffice/detail/BackofficeStatusMetaBadge.js.map +1 -1
  75. package/lib/esm/components/backoffice/detail/BackofficeUsageCostBreakdown.js +1 -1
  76. package/lib/esm/components/backoffice/detail/BackofficeUsageCostBreakdown.js.map +1 -1
  77. package/lib/esm/components/backoffice/detail/backofficeAuditMetadataPanel.css.js.map +1 -1
  78. package/lib/esm/components/backoffice/detail/backofficeDetailBadgeRow.css.js.map +1 -1
  79. package/lib/esm/components/backoffice/detail/backofficeDetailErrorList.css.js.map +1 -1
  80. package/lib/esm/components/backoffice/detail/backofficeDetailField.css.js.map +1 -1
  81. package/lib/esm/components/backoffice/detail/backofficeDetailLayout.css.js.map +1 -1
  82. package/lib/esm/components/backoffice/detail/backofficeDetailRelationLink.css.js.map +1 -1
  83. package/lib/esm/components/backoffice/detail/backofficeDetailRelationList.css.js.map +1 -1
  84. package/lib/esm/components/backoffice/detail/backofficeDetailSection.css.js.map +1 -1
  85. package/lib/esm/components/backoffice/detail/backofficeDetailTaggedValue.css.js.map +1 -1
  86. package/lib/esm/components/backoffice/detail/backofficeEntitySummaryHeader.css.js.map +1 -1
  87. package/lib/esm/components/backoffice/detail/backofficeKpiStrip.css.js.map +1 -1
  88. package/lib/esm/components/backoffice/detail/backofficeLifecycleTimelineSection.css.js.map +1 -1
  89. package/lib/esm/components/backoffice/detail/backofficePayloadInspectorSection.css.js.map +1 -1
  90. package/lib/esm/components/backoffice/detail/backofficeReferenceValue.css.js.map +1 -1
  91. package/lib/esm/components/backoffice/detail/backofficeRelationsSummaryGrid.css.js.map +1 -1
  92. package/lib/esm/components/backoffice/detail/backofficeScopeStack.css.js.map +1 -1
  93. package/lib/esm/components/backoffice/detail/backofficeStatusMetaBadge.css.js.map +1 -1
  94. package/lib/esm/components/backoffice/detail/backofficeUsageCostBreakdown.css.js.map +1 -1
  95. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js +12 -12
  96. package/lib/esm/components/backoffice/filters/BackofficeFilterAction.js.map +1 -1
  97. package/lib/esm/components/backoffice/filters/DeferredFilterSearchInput.js +11 -9
  98. package/lib/esm/components/backoffice/filters/DeferredFilterSearchInput.js.map +1 -1
  99. package/lib/esm/components/backoffice/filters/EntityFilterValue.js +16 -8
  100. package/lib/esm/components/backoffice/filters/EntityFilterValue.js.map +1 -1
  101. package/lib/esm/components/backoffice/filters/EntityIdFilterField.js +86 -53
  102. package/lib/esm/components/backoffice/filters/EntityIdFilterField.js.map +1 -1
  103. package/lib/esm/components/backoffice/filters/backofficeFilterAction.css.js.map +1 -1
  104. package/lib/esm/components/backoffice/filters/deferredFilterSearchInput.css.js.map +1 -1
  105. package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js +2 -2
  106. package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js.map +1 -1
  107. package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js +25 -23
  108. package/lib/esm/components/backoffice/hub/BackofficeHubTemplate.js.map +1 -1
  109. package/lib/esm/components/backoffice/hub/backofficeHubTemplate.css.js.map +1 -1
  110. package/lib/esm/components/backoffice/layout/backofficeSidebarActions.css.js.map +1 -1
  111. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +14 -14
  112. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
  113. package/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js.map +1 -1
  114. package/lib/esm/components/backoffice/layout/buildSidebarSections.js +42 -37
  115. package/lib/esm/components/backoffice/layout/buildSidebarSections.js.map +1 -1
  116. package/lib/esm/components/backoffice/layout/mapViewerToSidebarProfileView.js.map +1 -1
  117. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +1 -1
  118. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -1
  119. package/lib/esm/components/backoffice/links/BackofficeLink.js +1 -1
  120. package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -1
  121. package/lib/esm/components/backoffice/links/backofficeLink.css.js.map +1 -1
  122. package/lib/esm/components/backoffice/lists/BackofficeListToolbar.js +1 -1
  123. package/lib/esm/components/backoffice/lists/BackofficeListToolbar.js.map +1 -1
  124. package/lib/esm/components/backoffice/lists/backofficeListToolbar.css.js.map +1 -1
  125. package/lib/esm/components/backoffice/overview/BackofficeOverviewLayout.js +1 -1
  126. package/lib/esm/components/backoffice/overview/BackofficeOverviewLayout.js.map +1 -1
  127. package/lib/esm/components/backoffice/overview/backofficeOverviewLayout.css.js.map +1 -1
  128. package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +31 -27
  129. package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
  130. package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js +2 -2
  131. package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js.map +1 -1
  132. package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js +26 -20
  133. package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js.map +1 -1
  134. package/lib/esm/components/backoffice/pickers/shared/EntityPickerShell.js +4 -4
  135. package/lib/esm/components/backoffice/pickers/shared/EntityPickerShell.js.map +1 -1
  136. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +1 -1
  137. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
  138. package/lib/esm/components/backoffice/refs/backofficeEntityIdRef.css.js.map +1 -1
  139. package/lib/esm/components/backoffice/refs/backofficeRelatedCountLink.css.js.map +1 -1
  140. package/lib/esm/components/backoffice/routing/BackofficeContentError.js +6 -5
  141. package/lib/esm/components/backoffice/routing/BackofficeContentError.js.map +1 -1
  142. package/lib/esm/components/backoffice/routing/BackofficeContentFallback.js +10 -10
  143. package/lib/esm/components/backoffice/routing/BackofficeContentFallback.js.map +1 -1
  144. package/lib/esm/components/backoffice/routing/BackofficeRouteFallback.js +10 -10
  145. package/lib/esm/components/backoffice/routing/BackofficeRouteFallback.js.map +1 -1
  146. package/lib/esm/components/backoffice/routing/backofficeContentBoundary.css.js.map +1 -1
  147. package/lib/esm/components/backoffice/routing/backofficeContentError.css.js.map +1 -1
  148. package/lib/esm/components/backoffice/routing/backofficeContentFallback.css.js.map +1 -1
  149. package/lib/esm/components/backoffice/routing/backofficeRouteFallback.css.js.map +1 -1
  150. package/lib/esm/components/backoffice/routing/backofficeRoutePendingBar.css.js.map +1 -1
  151. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailScaffold.js +3 -3
  152. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityDetailScaffold.js.map +1 -1
  153. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +198 -181
  154. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
  155. package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js +6 -5
  156. package/lib/esm/components/backoffice/scaffolds/BackofficeTabbedDetailShell.js.map +1 -1
  157. package/lib/esm/components/backoffice/scaffolds/backofficeEntityListScaffold.css.js.map +1 -1
  158. package/lib/esm/components/backoffice/scaffolds/backofficeTabbedDetailShell.css.js.map +1 -1
  159. package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js +10 -9
  160. package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js.map +1 -1
  161. package/lib/esm/components/backoffice/shared/BackofficeInlineFilterRow.js +1 -1
  162. package/lib/esm/components/backoffice/shared/BackofficeInlineFilterRow.js.map +1 -1
  163. package/lib/esm/components/backoffice/shared/backofficeFilterableCell.css.js.map +1 -1
  164. package/lib/esm/components/backoffice/shared/backofficeInlineFilterRow.css.js.map +1 -1
  165. package/lib/esm/components/backoffice/tools/BackofficeToolsDocPanel.js +11 -9
  166. package/lib/esm/components/backoffice/tools/BackofficeToolsDocPanel.js.map +1 -1
  167. package/lib/esm/components/backoffice/tools/BackofficeToolsErrorFallback.js +7 -7
  168. package/lib/esm/components/backoffice/tools/BackofficeToolsErrorFallback.js.map +1 -1
  169. package/lib/esm/components/backoffice/tools/BackofficeToolsJsonForm.js +17 -12
  170. package/lib/esm/components/backoffice/tools/BackofficeToolsJsonForm.js.map +1 -1
  171. package/lib/esm/components/backoffice/tools/BackofficeToolsQueryBoundary.js +10 -10
  172. package/lib/esm/components/backoffice/tools/BackofficeToolsQueryBoundary.js.map +1 -1
  173. package/lib/esm/components/backoffice/tools/backofficeToolsDocPanel.css.js.map +1 -1
  174. package/lib/esm/components/backoffice/tools/backofficeToolsForm.css.js.map +1 -1
  175. package/lib/esm/components/backoffice/tools/backofficeToolsJsonForm.css.js.map +1 -1
  176. package/lib/esm/hooks/useBackofficeListUrlState.js +2 -1
  177. package/lib/esm/hooks/useBackofficeListUrlState.js.map +1 -1
  178. package/lib/esm/pages/BackofficeAcceptInvitationPage.js +1 -1
  179. package/lib/esm/pages/BackofficeAcceptInvitationPage.js.map +1 -1
  180. package/lib/esm/pages/BackofficeDashboardPage.js +72 -68
  181. package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
  182. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +1 -1
  183. package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js.map +1 -1
  184. package/lib/esm/pages/BackofficeEntityDetailPage.js +207 -184
  185. package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
  186. package/lib/esm/pages/BackofficeEntityDetailUnknownPageRedirect.js +1 -1
  187. package/lib/esm/pages/BackofficeEntityDetailUnknownPageRedirect.js.map +1 -1
  188. package/lib/esm/pages/BackofficeEntityListPage.helpers.js.map +1 -1
  189. package/lib/esm/pages/BackofficeEntityListPage.js +143 -139
  190. package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
  191. package/lib/esm/pages/BackofficeHubPage.js +10 -9
  192. package/lib/esm/pages/BackofficeHubPage.js.map +1 -1
  193. package/lib/esm/pages/BackofficeLayoutPage.js +44 -39
  194. package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
  195. package/lib/esm/pages/BackofficeLoginPage.js +1 -1
  196. package/lib/esm/pages/BackofficeLoginPage.js.map +1 -1
  197. package/lib/esm/pages/BackofficePasswordResetCompletePage.js +1 -1
  198. package/lib/esm/pages/BackofficePasswordResetCompletePage.js.map +1 -1
  199. package/lib/esm/pages/BackofficeVerifyEmailPage.js +1 -1
  200. package/lib/esm/pages/BackofficeVerifyEmailPage.js.map +1 -1
  201. package/lib/esm/pages/backofficeDashboardPage.css.js.map +1 -1
  202. package/lib/esm/pages/backofficeEntityDetailPage.css.js.map +1 -1
  203. package/lib/esm/pages/backofficeEntityListPage.css.js.map +1 -1
  204. package/lib/esm/pages/dashboard/DashboardMetricGroup.js +10 -9
  205. package/lib/esm/pages/dashboard/DashboardMetricGroup.js.map +1 -1
  206. package/lib/esm/pages/dashboard/DashboardPanel.js +3 -3
  207. package/lib/esm/pages/dashboard/DashboardPanel.js.map +1 -1
  208. package/lib/esm/pages/dashboard/DashboardQuickActions.js +2 -2
  209. package/lib/esm/pages/dashboard/DashboardQuickActions.js.map +1 -1
  210. package/lib/esm/pages/dashboard/DashboardStatusList.js +1 -1
  211. package/lib/esm/pages/dashboard/DashboardStatusList.js.map +1 -1
  212. package/lib/esm/pages/dashboard/dashboardMetricGroup.css.js.map +1 -1
  213. package/lib/esm/pages/dashboard/dashboardPanel.css.js.map +1 -1
  214. package/lib/esm/pages/dashboard/dashboardQuickActions.css.js.map +1 -1
  215. package/lib/esm/pages/dashboard/dashboardStatusList.css.js.map +1 -1
  216. package/lib/esm/pages/detail/buildTabsItems.js.map +1 -1
  217. package/lib/esm/provider/BackofficeProvider.js +22 -20
  218. package/lib/esm/provider/BackofficeProvider.js.map +1 -1
  219. package/lib/esm/router/createBackofficeRoutes.js +33 -30
  220. package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
  221. package/lib/esm/storybook/relay/RelayStory.css.js.map +1 -1
  222. package/lib/esm/style.css +1 -1
  223. package/lib/types/auth/AuthFlows.stories.d.ts +19 -0
  224. package/lib/types/auth/AuthFlows.stories.d.ts.map +1 -0
  225. package/lib/types/auth/AuthRefreshNotice.d.ts +1 -1
  226. package/lib/types/auth/AuthRefreshNotice.d.ts.map +1 -1
  227. package/lib/types/auth/authRefreshNotice.css.d.ts.map +1 -1
  228. package/lib/types/auth/login/EmailCapturePanel.d.ts.map +1 -1
  229. package/lib/types/auth/login/MethodChooser.d.ts.map +1 -1
  230. package/lib/types/auth/login/MfaChallengeForm.d.ts.map +1 -1
  231. package/lib/types/auth/login/PasskeyLoginForm.d.ts.map +1 -1
  232. package/lib/types/auth/login/PasswordLoginPanel.d.ts +1 -1
  233. package/lib/types/auth/login/PasswordLoginPanel.d.ts.map +1 -1
  234. package/lib/types/auth/login/loginPage.css.d.ts.map +1 -1
  235. package/lib/types/auth/pages/AcceptInvitationScreen.d.ts.map +1 -1
  236. package/lib/types/auth/pages/PasswordResetCompleteScreen.d.ts.map +1 -1
  237. package/lib/types/auth/pages/PasswordResetRequestScreen.d.ts.map +1 -1
  238. package/lib/types/auth/pages/VerifyEmailScreen.d.ts.map +1 -1
  239. package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts.map +1 -1
  240. package/lib/types/components/backoffice/actions/toastViewAction.d.ts +1 -1
  241. package/lib/types/components/backoffice/actions/toastViewAction.d.ts.map +1 -1
  242. package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts +1 -1
  243. package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts.map +1 -1
  244. package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts +1 -1
  245. package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts.map +1 -1
  246. package/lib/types/components/backoffice/detail/BackofficeDetailErrorList.d.ts.map +1 -1
  247. package/lib/types/components/backoffice/detail/BackofficeDetailField.d.ts.map +1 -1
  248. package/lib/types/components/backoffice/detail/BackofficeDetailFlagTag.d.ts +1 -1
  249. package/lib/types/components/backoffice/detail/BackofficeDetailFlagTag.d.ts.map +1 -1
  250. package/lib/types/components/backoffice/detail/BackofficeDetailPrimitives.stories.d.ts +17 -0
  251. package/lib/types/components/backoffice/detail/BackofficeDetailPrimitives.stories.d.ts.map +1 -0
  252. package/lib/types/components/backoffice/detail/BackofficeDetailRelationListBlock.d.ts.map +1 -1
  253. package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts +1 -1
  254. package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts.map +1 -1
  255. package/lib/types/components/backoffice/detail/BackofficeEntitySummaryHeader.d.ts.map +1 -1
  256. package/lib/types/components/backoffice/detail/BackofficeKpiStrip.d.ts.map +1 -1
  257. package/lib/types/components/backoffice/detail/backofficeDetailRelationLink.css.d.ts.map +1 -1
  258. package/lib/types/components/backoffice/filters/DeferredFilterSearchInput.d.ts.map +1 -1
  259. package/lib/types/components/backoffice/filters/EntityFilterValue.d.ts +5 -1
  260. package/lib/types/components/backoffice/filters/EntityFilterValue.d.ts.map +1 -1
  261. package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts +1 -0
  262. package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts.map +1 -1
  263. package/lib/types/components/backoffice/filters/backofficeFilterAction.css.d.ts.map +1 -1
  264. package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts +5 -2
  265. package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts.map +1 -1
  266. package/lib/types/components/backoffice/hub/BackofficeHubTemplate.d.ts.map +1 -1
  267. package/lib/types/components/backoffice/hub/BackofficeHubTemplate.stories.d.ts +48 -0
  268. package/lib/types/components/backoffice/hub/BackofficeHubTemplate.stories.d.ts.map +1 -0
  269. package/lib/types/components/backoffice/hub/backofficeHubTemplate.css.d.ts.map +1 -1
  270. package/lib/types/components/backoffice/layout/backofficeSidebarActions.css.d.ts.map +1 -1
  271. package/lib/types/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.d.ts.map +1 -1
  272. package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts +1 -1
  273. package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts.map +1 -1
  274. package/lib/types/components/backoffice/layout/mapViewerToSidebarProfileView.d.ts +1 -1
  275. package/lib/types/components/backoffice/layout/mapViewerToSidebarProfileView.d.ts.map +1 -1
  276. package/lib/types/components/backoffice/lists/BackofficeListToolbar.stories.d.ts +13 -0
  277. package/lib/types/components/backoffice/lists/BackofficeListToolbar.stories.d.ts.map +1 -0
  278. package/lib/types/components/backoffice/overview/BackofficeOverviewLayout.stories.d.ts.map +1 -1
  279. package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
  280. package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.stories.d.ts +11 -0
  281. package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.stories.d.ts.map +1 -0
  282. package/lib/types/components/backoffice/pickers/entityIdPickerDialog.css.d.ts +2 -0
  283. package/lib/types/components/backoffice/pickers/entityIdPickerDialog.css.d.ts.map +1 -1
  284. package/lib/types/components/backoffice/pickers/shared/EntityPickerList.d.ts.map +1 -1
  285. package/lib/types/components/backoffice/refs/backofficeRelatedCountLink.css.d.ts.map +1 -1
  286. package/lib/types/components/backoffice/routing/BackofficeContentError.d.ts.map +1 -1
  287. package/lib/types/components/backoffice/routing/backofficeRoutePendingBar.css.d.ts.map +1 -1
  288. package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts +1 -1
  289. package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
  290. package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.d.ts +1 -1
  291. package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.d.ts.map +1 -1
  292. package/lib/types/components/backoffice/scaffolds/BackofficeTabbedDetailShell.stories.d.ts.map +1 -1
  293. package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts.map +1 -1
  294. package/lib/types/components/backoffice/shared/backofficeFilterableCell.css.d.ts.map +1 -1
  295. package/lib/types/components/backoffice/tools/BackofficeTools.stories.d.ts +17 -0
  296. package/lib/types/components/backoffice/tools/BackofficeTools.stories.d.ts.map +1 -0
  297. package/lib/types/components/backoffice/tools/BackofficeToolsDocPanel.d.ts.map +1 -1
  298. package/lib/types/components/backoffice/tools/BackofficeToolsJsonForm.d.ts.map +1 -1
  299. package/lib/types/components/backoffice/tools/backofficeToolsDocPanel.css.d.ts.map +1 -1
  300. package/lib/types/hooks/useBackofficeListUrlState.d.ts.map +1 -1
  301. package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
  302. package/lib/types/pages/BackofficeEntityListPage.helpers.d.ts +2 -1
  303. package/lib/types/pages/BackofficeEntityListPage.helpers.d.ts.map +1 -1
  304. package/lib/types/pages/BackofficeHubPage.d.ts.map +1 -1
  305. package/lib/types/pages/BackofficeLayoutPage.d.ts.map +1 -1
  306. package/lib/types/pages/backofficeEntityDetailPage.css.d.ts.map +1 -1
  307. package/lib/types/pages/dashboard/DashboardMetricGroup.d.ts.map +1 -1
  308. package/lib/types/pages/dashboard/dashboardMetricGroup.css.d.ts.map +1 -1
  309. package/lib/types/pages/dashboard/dashboardPanel.css.d.ts.map +1 -1
  310. package/lib/types/pages/dashboard/dashboardQuickActions.css.d.ts.map +1 -1
  311. package/lib/types/pages/dashboard/dashboardStatusList.css.d.ts.map +1 -1
  312. package/lib/types/pages/detail/buildTabsItems.d.ts +1 -1
  313. package/lib/types/pages/detail/buildTabsItems.d.ts.map +1 -1
  314. package/lib/types/provider/BackofficeProvider.d.ts.map +1 -1
  315. package/lib/types/provider/types.d.ts +2 -1
  316. package/lib/types/provider/types.d.ts.map +1 -1
  317. package/lib/types/router/createBackofficeRoutes.d.ts +2 -1
  318. package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
  319. package/package.json +14 -10
@@ -1,61 +1,63 @@
1
1
  import { content as e, grid as t, group as n, groupHeader as r, groupHeading as i, groupTitle as a, groups as o, item as s, itemContent as c, itemIcon as l, itemTitle as u } from "./backofficeHubTemplate.css.js";
2
- import { BackofficeEmptyState as d, GlobalSearchInput as f, SidebarTasksSvg as p } from "@plumile/ui";
3
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
4
- import { Link as g } from "@plumile/router";
2
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
3
+ import { BackofficeEmptyState as p } from "@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js";
4
+ import m from "@plumile/router/routing/Link.js";
5
+ import { GlobalSearchInput as h } from "@plumile/ui/backoffice/molecules/global_search_input/GlobalSearchInput.js";
6
+ import { SidebarTasksSvg as g } from "@plumile/ui/icons/SidebarTasksSvg.js";
5
7
  //#region src/components/backoffice/hub/BackofficeHubTemplate.tsx
6
- var _ = /* @__PURE__ */ m(p, {
8
+ var _ = /* @__PURE__ */ d(g, {
7
9
  width: 20,
8
10
  height: 20,
9
11
  "aria-hidden": "true"
10
- }), v = ({ groups: p, search: v, emptyState: y }) => {
12
+ }), v = ({ groups: g, search: v, emptyState: y }) => {
11
13
  let b;
12
- return b = p.length === 0 ? /* @__PURE__ */ m(d, {
14
+ return b = g.length === 0 ? /* @__PURE__ */ d(p, {
13
15
  title: y.title,
14
16
  description: y.description,
15
17
  icon: y.icon ?? _
16
- }) : /* @__PURE__ */ m("div", {
18
+ }) : /* @__PURE__ */ d("div", {
17
19
  className: o,
18
- children: p.map((e) => /* @__PURE__ */ h("section", {
20
+ children: g.map((e) => /* @__PURE__ */ f("section", {
19
21
  className: n,
20
- children: [/* @__PURE__ */ h("div", {
22
+ children: [/* @__PURE__ */ f("div", {
21
23
  className: r,
22
- children: [e.icon != null && /* @__PURE__ */ m("span", {
24
+ children: [e.icon != null && /* @__PURE__ */ d("span", {
23
25
  className: "u4nszr0 txvbqb9jg txvbqbcp txvbqbdoy txvbqbty7 txvbqbc77 txvbqb1rg txvbqbv45 txvbqb1cp txvbqb1qg txvbqbwp txvbqbva1 txvbqbaj7",
24
26
  "aria-hidden": "true",
25
27
  children: e.icon
26
- }), /* @__PURE__ */ h("span", {
28
+ }), /* @__PURE__ */ f("span", {
27
29
  className: i,
28
- children: [/* @__PURE__ */ m("h2", {
30
+ children: [/* @__PURE__ */ d("h2", {
29
31
  className: a,
30
32
  children: e.title
31
- }), e.description != null && /* @__PURE__ */ m("span", {
33
+ }), e.description != null && /* @__PURE__ */ d("span", {
32
34
  className: "txvbqbva3 txvbqb8y",
33
35
  children: e.description
34
36
  })]
35
37
  })]
36
- }), /* @__PURE__ */ m("div", {
38
+ }), /* @__PURE__ */ d("div", {
37
39
  className: t,
38
40
  children: e.items.map((e) => {
39
41
  let t = e.icon ?? _, n = e.description != null && e.description !== "", r = e.metaLabel != null && e.metaLabel !== "";
40
- return /* @__PURE__ */ h(g, {
42
+ return /* @__PURE__ */ f(m, {
41
43
  to: e.href,
42
44
  className: s,
43
- children: [/* @__PURE__ */ m("span", {
45
+ children: [/* @__PURE__ */ d("span", {
44
46
  className: l,
45
47
  "aria-hidden": "true",
46
48
  children: t
47
- }), /* @__PURE__ */ h("span", {
49
+ }), /* @__PURE__ */ f("span", {
48
50
  className: c,
49
51
  children: [
50
- /* @__PURE__ */ m("span", {
52
+ /* @__PURE__ */ d("span", {
51
53
  className: u,
52
54
  children: e.label
53
55
  }),
54
- n && /* @__PURE__ */ m("span", {
56
+ n && /* @__PURE__ */ d("span", {
55
57
  className: "txvbqbva3 txvbqb8y txvbqbfb7 txvbqbl87",
56
58
  children: e.description
57
59
  }),
58
- r && /* @__PURE__ */ m("span", {
60
+ r && /* @__PURE__ */ d("span", {
59
61
  className: "txvbqbva3 txvbqb8p txvbqbamg txvbqb66 txvbqbeep",
60
62
  children: e.metaLabel
61
63
  })
@@ -65,11 +67,11 @@ var _ = /* @__PURE__ */ m(p, {
65
67
  })
66
68
  })]
67
69
  }, e.id))
68
- }), /* @__PURE__ */ h("div", {
70
+ }), /* @__PURE__ */ f("div", {
69
71
  className: e,
70
- children: [v != null && /* @__PURE__ */ m("div", {
72
+ children: [v != null && /* @__PURE__ */ d("div", {
71
73
  className: "txvbqbjbp",
72
- children: /* @__PURE__ */ m(f, {
74
+ children: /* @__PURE__ */ d(h, {
73
75
  value: v.value,
74
76
  onChange: v.onChange,
75
77
  placeholder: v.placeholder
@@ -1 +1 @@
1
- {"version":3,"file":"BackofficeHubTemplate.js","names":[],"sources":["../../../../../src/components/backoffice/hub/BackofficeHubTemplate.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\nimport { Link } from '@plumile/router';\nimport {\n BackofficeEmptyState,\n GlobalSearchInput,\n SidebarTasksSvg,\n} from '@plumile/ui';\n\nimport * as styles from './backofficeHubTemplate.css.js';\n\nexport type BackofficeHubTemplateItemKind = 'entity' | 'tool';\n\nexport type BackofficeHubTemplateItem = {\n id: string;\n kind: BackofficeHubTemplateItemKind;\n label: string;\n href: string;\n icon?: ReactNode;\n description?: string | null;\n metaLabel?: string | null;\n};\n\nexport type BackofficeHubTemplateGroup = {\n id: string;\n title: string;\n description?: string | null;\n icon?: ReactNode;\n items: readonly BackofficeHubTemplateItem[];\n};\n\nexport type BackofficeHubTemplateEmptyState = {\n title: string;\n description: string;\n icon?: ReactNode;\n};\n\nexport type BackofficeHubTemplateSearch = {\n value: string;\n onChange: (value: string) => void;\n placeholder: string;\n};\n\nexport type BackofficeHubTemplateProps = {\n groups: readonly BackofficeHubTemplateGroup[];\n search?: BackofficeHubTemplateSearch;\n emptyState: BackofficeHubTemplateEmptyState;\n};\n\nconst fallbackIcon = (\n <SidebarTasksSvg width={20} height={20} aria-hidden=\"true\" />\n);\n\nexport const BackofficeHubTemplate = ({\n groups,\n search,\n emptyState,\n}: BackofficeHubTemplateProps): JSX.Element => {\n let body: JSX.Element;\n\n if (groups.length === 0) {\n body = (\n <BackofficeEmptyState\n title={emptyState.title}\n description={emptyState.description}\n icon={emptyState.icon ?? fallbackIcon}\n />\n );\n } else {\n body = (\n <div className={styles.groups}>\n {groups.map((group) => {\n return (\n <section key={group.id} className={styles.group}>\n <div className={styles.groupHeader}>\n {group.icon != null && (\n <span className={styles.groupIcon} aria-hidden=\"true\">\n {group.icon}\n </span>\n )}\n <span className={styles.groupHeading}>\n <h2 className={styles.groupTitle}>{group.title}</h2>\n {group.description != null && (\n <span className={styles.groupDescription}>\n {group.description}\n </span>\n )}\n </span>\n </div>\n <div className={styles.grid}>\n {group.items.map((item) => {\n const icon = item.icon ?? fallbackIcon;\n const hasDescription =\n item.description != null && item.description !== '';\n const hasMetaLabel =\n item.metaLabel != null && item.metaLabel !== '';\n\n return (\n <Link\n key={`${item.kind}-${item.id}`}\n to={item.href}\n className={styles.item}\n >\n <span className={styles.itemIcon} aria-hidden=\"true\">\n {icon}\n </span>\n <span className={styles.itemContent}>\n <span className={styles.itemTitle}>{item.label}</span>\n {hasDescription && (\n <span className={styles.itemDescription}>\n {item.description}\n </span>\n )}\n {hasMetaLabel && (\n <span className={styles.itemMeta}>\n {item.metaLabel}\n </span>\n )}\n </span>\n </Link>\n );\n })}\n </div>\n </section>\n );\n })}\n </div>\n );\n }\n\n return (\n <div className={styles.content}>\n {search != null && (\n <div className={styles.search}>\n <GlobalSearchInput\n value={search.value}\n onChange={search.onChange}\n placeholder={search.placeholder}\n />\n </div>\n )}\n {body}\n </div>\n );\n};\n\nexport default BackofficeHubTemplate;\n"],"mappings":";;;;;AAgDA,IAAM,IACJ,kBAAC,GAAD;CAAiB,OAAO;CAAI,QAAQ;CAAI,eAAY;CAAS,CAAA,EAGlD,KAAyB,EACpC,QAAA,GACA,QAAA,GACA,oBAC6C;CAC7C,IAAI;CAwEJ,OAtEA,AASE,IATE,EAAO,WAAW,IAElB,kBAAC,GAAD;EACE,OAAO,EAAW;EAClB,aAAa,EAAW;EACxB,MAAM,EAAW,QAAQ;EACzB,CAAA,GAIF,kBAAC,OAAD;EAAK,WAAW;YACb,EAAO,KAAK,MAET,kBAAC,WAAD;GAAwB,WAAW;aAAnC,CACE,kBAAC,OAAD;IAAK,WAAW;cAAhB,CACG,EAAM,QAAQ,QACb,kBAAC,QAAD;KAAM,WAAW;KAAkB,eAAY;eAC5C,EAAM;KACF,CAAA,EAET,kBAAC,QAAD;KAAM,WAAW;eAAjB,CACE,kBAAC,MAAD;MAAI,WAAW;gBAAoB,EAAM;MAAW,CAAA,EACnD,EAAM,eAAe,QACpB,kBAAC,QAAD;MAAM,WAAW;gBACd,EAAM;MACF,CAAA,CAEJ;OACH;OACN,kBAAC,OAAD;IAAK,WAAW;cACb,EAAM,MAAM,KAAK,MAAS;KACzB,IAAM,IAAO,EAAK,QAAQ,GACpB,IACJ,EAAK,eAAe,QAAQ,EAAK,gBAAgB,IAC7C,IACJ,EAAK,aAAa,QAAQ,EAAK,cAAc;KAE/C,OACE,kBAAC,GAAD;MAEE,IAAI,EAAK;MACT,WAAW;gBAHb,CAKE,kBAAC,QAAD;OAAM,WAAW;OAAiB,eAAY;iBAC3C;OACI,CAAA,EACP,kBAAC,QAAD;OAAM,WAAW;iBAAjB;QACE,kBAAC,QAAD;SAAM,WAAW;mBAAmB,EAAK;SAAa,CAAA;QACrD,KACC,kBAAC,QAAD;SAAM,WAAW;mBACd,EAAK;SACD,CAAA;QAER,KACC,kBAAC,QAAD;SAAM,WAAW;mBACd,EAAK;SACD,CAAA;QAEJ;SACF;QApBA,GAAG,EAAK,KAAK,GAAG,EAAK,KAoBrB;MAET;IACE,CAAA,CACE;KAlDI,EAAM,GAkDV,CAEZ;EACE,CAAA,EAKR,kBAAC,OAAD;EAAK,WAAW;YAAhB,CACG,KAAU,QACT,kBAAC,OAAD;GAAK,WAAW;aACd,kBAAC,GAAD;IACE,OAAO,EAAO;IACd,UAAU,EAAO;IACjB,aAAa,EAAO;IACpB,CAAA;GACE,CAAA,EAEP,EACG"}
1
+ {"version":3,"file":"BackofficeHubTemplate.js","names":[],"sources":["../../../../../src/components/backoffice/hub/BackofficeHubTemplate.tsx"],"sourcesContent":["import { type JSX, type ReactNode } from 'react';\nimport Link from '@plumile/router/routing/Link.js';\nimport { BackofficeEmptyState } from '@plumile/ui/backoffice/molecules/backoffice_empty_state/BackofficeEmptyState.js';\nimport { GlobalSearchInput } from '@plumile/ui/backoffice/molecules/global_search_input/GlobalSearchInput.js';\nimport { SidebarTasksSvg } from '@plumile/ui/icons/SidebarTasksSvg.js';\n\nimport * as styles from './backofficeHubTemplate.css.js';\n\nexport type BackofficeHubTemplateItemKind = 'entity' | 'tool';\n\nexport type BackofficeHubTemplateItem = {\n id: string;\n kind: BackofficeHubTemplateItemKind;\n label: string;\n href: string;\n icon?: ReactNode;\n description?: string | null;\n metaLabel?: string | null;\n};\n\nexport type BackofficeHubTemplateGroup = {\n id: string;\n title: string;\n description?: string | null;\n icon?: ReactNode;\n items: readonly BackofficeHubTemplateItem[];\n};\n\nexport type BackofficeHubTemplateEmptyState = {\n title: string;\n description: string;\n icon?: ReactNode;\n};\n\nexport type BackofficeHubTemplateSearch = {\n value: string;\n onChange: (value: string) => void;\n placeholder: string;\n};\n\nexport type BackofficeHubTemplateProps = {\n groups: readonly BackofficeHubTemplateGroup[];\n search?: BackofficeHubTemplateSearch;\n emptyState: BackofficeHubTemplateEmptyState;\n};\n\nconst fallbackIcon = (\n <SidebarTasksSvg width={20} height={20} aria-hidden=\"true\" />\n);\n\nexport const BackofficeHubTemplate = ({\n groups,\n search,\n emptyState,\n}: BackofficeHubTemplateProps): JSX.Element => {\n let body: JSX.Element;\n\n if (groups.length === 0) {\n body = (\n <BackofficeEmptyState\n title={emptyState.title}\n description={emptyState.description}\n icon={emptyState.icon ?? fallbackIcon}\n />\n );\n } else {\n body = (\n <div className={styles.groups}>\n {groups.map((group) => {\n return (\n <section key={group.id} className={styles.group}>\n <div className={styles.groupHeader}>\n {group.icon != null && (\n <span className={styles.groupIcon} aria-hidden=\"true\">\n {group.icon}\n </span>\n )}\n <span className={styles.groupHeading}>\n <h2 className={styles.groupTitle}>{group.title}</h2>\n {group.description != null && (\n <span className={styles.groupDescription}>\n {group.description}\n </span>\n )}\n </span>\n </div>\n <div className={styles.grid}>\n {group.items.map((item) => {\n const icon = item.icon ?? fallbackIcon;\n const hasDescription =\n item.description != null && item.description !== '';\n const hasMetaLabel =\n item.metaLabel != null && item.metaLabel !== '';\n\n return (\n <Link\n key={`${item.kind}-${item.id}`}\n to={item.href}\n className={styles.item}\n >\n <span className={styles.itemIcon} aria-hidden=\"true\">\n {icon}\n </span>\n <span className={styles.itemContent}>\n <span className={styles.itemTitle}>{item.label}</span>\n {hasDescription && (\n <span className={styles.itemDescription}>\n {item.description}\n </span>\n )}\n {hasMetaLabel && (\n <span className={styles.itemMeta}>\n {item.metaLabel}\n </span>\n )}\n </span>\n </Link>\n );\n })}\n </div>\n </section>\n );\n })}\n </div>\n );\n }\n\n return (\n <div className={styles.content}>\n {search != null && (\n <div className={styles.search}>\n <GlobalSearchInput\n value={search.value}\n onChange={search.onChange}\n placeholder={search.placeholder}\n />\n </div>\n )}\n {body}\n </div>\n );\n};\n\nexport default BackofficeHubTemplate;\n"],"mappings":";;;;;;;AA8CA,IAAM,IACJ,kBAAC,GAAD;CAAiB,OAAO;CAAI,QAAQ;CAAI,eAAY;CAAS,CAAA,EAGlD,KAAyB,EACpC,QAAA,GACA,QAAA,GACA,oBAC6C;CAC7C,IAAI;CAwEJ,OAtEA,AASE,IATE,EAAO,WAAW,IAElB,kBAAC,GAAD;EACE,OAAO,EAAW;EAClB,aAAa,EAAW;EACxB,MAAM,EAAW,QAAQ;EACzB,CAAA,GAIF,kBAAC,OAAD;EAAK,WAAW;YACb,EAAO,KAAK,MAET,kBAAC,WAAD;GAAwB,WAAW;aAAnC,CACE,kBAAC,OAAD;IAAK,WAAW;cAAhB,CACG,EAAM,QAAQ,QACb,kBAAC,QAAD;KAAM,WAAW;KAAkB,eAAY;eAC5C,EAAM;KACF,CAAA,EAET,kBAAC,QAAD;KAAM,WAAW;eAAjB,CACE,kBAAC,MAAD;MAAI,WAAW;gBAAoB,EAAM;MAAW,CAAA,EACnD,EAAM,eAAe,QACpB,kBAAC,QAAD;MAAM,WAAW;gBACd,EAAM;MACF,CAAA,CAEJ;OACH;OACN,kBAAC,OAAD;IAAK,WAAW;cACb,EAAM,MAAM,KAAK,MAAS;KACzB,IAAM,IAAO,EAAK,QAAQ,GACpB,IACJ,EAAK,eAAe,QAAQ,EAAK,gBAAgB,IAC7C,IACJ,EAAK,aAAa,QAAQ,EAAK,cAAc;KAE/C,OACE,kBAAC,GAAD;MAEE,IAAI,EAAK;MACT,WAAW;gBAHb,CAKE,kBAAC,QAAD;OAAM,WAAW;OAAiB,eAAY;iBAC3C;OACI,CAAA,EACP,kBAAC,QAAD;OAAM,WAAW;iBAAjB;QACE,kBAAC,QAAD;SAAM,WAAW;mBAAmB,EAAK;SAAa,CAAA;QACrD,KACC,kBAAC,QAAD;SAAM,WAAW;mBACd,EAAK;SACD,CAAA;QAER,KACC,kBAAC,QAAD;SAAM,WAAW;mBACd,EAAK;SACD,CAAA;QAEJ;SACF;QApBA,GAAG,EAAK,KAAK,GAAG,EAAK,KAoBrB;MAET;IACE,CAAA,CACE;KAlDI,EAAM,GAkDV,CAEZ;EACE,CAAA,EAKR,kBAAC,OAAD;EAAK,WAAW;YAAhB,CACG,KAAU,QACT,kBAAC,OAAD;GAAK,WAAW;aACd,kBAAC,GAAD;IACE,OAAO,EAAO;IACd,UAAU,EAAO;IACjB,aAAa,EAAO;IACpB,CAAA;GACE,CAAA,EAEP,EACG"}
@@ -1 +1 @@
1
- {"version":3,"file":"backofficeHubTemplate.css.js","names":[],"sources":["../../../../../src/components/backoffice/hub/backofficeHubTemplate.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\n\nimport { sprinkles, vars } from '@plumile/ui';\n\nexport const content = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 5,\n});\n\nexport const search = sprinkles({\n maxWidth: '2xl',\n});\n\nexport const groups = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 6,\n});\n\nexport const group = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 3,\n});\n\nexport const groupHeader = sprinkles({\n display: 'flex',\n alignItems: 'flex-start',\n gap: 3,\n});\n\nexport const groupIcon = style([\n sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 8,\n height: 8,\n borderRadius: 'md',\n backgroundColor: 'surfaceMuted',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'borderSubtle',\n color: 'textSecondary',\n flexShrink: 0,\n }),\n {\n marginTop: '1px',\n },\n]);\n\nexport const groupHeading = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n minWidth: 0,\n});\n\nexport const groupTitle = sprinkles({\n fontSize: 'lg',\n fontWeight: 'semibold',\n color: 'text',\n margin: 0,\n});\n\nexport const groupDescription = sprinkles({\n color: 'textMuted',\n fontSize: 'sm',\n});\n\nexport const grid = sprinkles({\n display: 'grid',\n gridTemplateColumns: 'autoFitMinmax260',\n gap: 3,\n});\n\nexport const item = style([\n sprinkles({\n display: 'flex',\n alignItems: 'flex-start',\n gap: 3,\n padding: 3,\n borderRadius: 'md',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'borderSubtle',\n backgroundColor: 'surface',\n color: 'text',\n textDecoration: 'none',\n minWidth: 0,\n transitionProperty: 'default',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n minHeight: '92px',\n selectors: {\n '&:hover': {\n borderColor: vars.colors.border,\n backgroundColor: vars.colors.surfaceMuted,\n transform: 'translateY(-1px)',\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n },\n },\n]);\n\nexport const itemIcon = sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 9,\n height: 9,\n borderRadius: 'md',\n backgroundColor: 'surfaceMuted',\n color: 'textSecondary',\n flexShrink: 0,\n});\n\nexport const itemContent = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n minWidth: 0,\n});\n\nexport const itemTitle = sprinkles({\n fontWeight: 'semibold',\n color: 'text',\n overflowWrap: 'anywhere',\n});\n\nexport const itemDescription = sprinkles({\n color: 'textMuted',\n fontSize: 'sm',\n lineHeight: 'normal',\n overflowWrap: 'anywhere',\n});\n\nexport const itemMeta = sprinkles({\n color: 'textMuted',\n fontSize: 'xs',\n fontWeight: 'medium',\n textTransform: 'uppercase',\n letterSpacing: 'wide',\n});\n"],"mappings":""}
1
+ {"version":3,"file":"backofficeHubTemplate.css.js","names":[],"sources":["../../../../../src/components/backoffice/hub/backofficeHubTemplate.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\n\nimport { sprinkles } from '@plumile/ui/theme/sprinkles.css.js';\nimport { vars } from '@plumile/ui/theme/themeContract.js';\n\nexport const content = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 5,\n});\n\nexport const search = sprinkles({\n maxWidth: '2xl',\n});\n\nexport const groups = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 6,\n});\n\nexport const group = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 3,\n});\n\nexport const groupHeader = sprinkles({\n display: 'flex',\n alignItems: 'flex-start',\n gap: 3,\n});\n\nexport const groupIcon = style([\n sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 8,\n height: 8,\n borderRadius: 'md',\n backgroundColor: 'surfaceMuted',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'borderSubtle',\n color: 'textSecondary',\n flexShrink: 0,\n }),\n {\n marginTop: '1px',\n },\n]);\n\nexport const groupHeading = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n minWidth: 0,\n});\n\nexport const groupTitle = sprinkles({\n fontSize: 'lg',\n fontWeight: 'semibold',\n color: 'text',\n margin: 0,\n});\n\nexport const groupDescription = sprinkles({\n color: 'textMuted',\n fontSize: 'sm',\n});\n\nexport const grid = sprinkles({\n display: 'grid',\n gridTemplateColumns: 'autoFitMinmax260',\n gap: 3,\n});\n\nexport const item = style([\n sprinkles({\n display: 'flex',\n alignItems: 'flex-start',\n gap: 3,\n padding: 3,\n borderRadius: 'md',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'borderSubtle',\n backgroundColor: 'surface',\n color: 'text',\n textDecoration: 'none',\n minWidth: 0,\n transitionProperty: 'default',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n minHeight: '92px',\n selectors: {\n '&:hover': {\n borderColor: vars.colors.border,\n backgroundColor: vars.colors.surfaceMuted,\n transform: 'translateY(-1px)',\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n },\n },\n]);\n\nexport const itemIcon = sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 9,\n height: 9,\n borderRadius: 'md',\n backgroundColor: 'surfaceMuted',\n color: 'textSecondary',\n flexShrink: 0,\n});\n\nexport const itemContent = sprinkles({\n display: 'flex',\n flexDirection: 'column',\n gap: 1,\n minWidth: 0,\n});\n\nexport const itemTitle = sprinkles({\n fontWeight: 'semibold',\n color: 'text',\n overflowWrap: 'anywhere',\n});\n\nexport const itemDescription = sprinkles({\n color: 'textMuted',\n fontSize: 'sm',\n lineHeight: 'normal',\n overflowWrap: 'anywhere',\n});\n\nexport const itemMeta = sprinkles({\n color: 'textMuted',\n fontSize: 'xs',\n fontWeight: 'medium',\n textTransform: 'uppercase',\n letterSpacing: 'wide',\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"backofficeSidebarActions.css.js","names":[],"sources":["../../../../../src/components/backoffice/layout/backofficeSidebarActions.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\n\nimport { sprinkles, vars } from '@plumile/ui';\n\nexport const actionButton = style([\n sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 6,\n height: 6,\n borderRadius: 'md',\n borderWidth: 0,\n borderStyle: 'none',\n padding: 0,\n backgroundColor: 'transparent',\n color: 'textSecondary',\n cursor: 'pointer',\n transitionProperty: 'colors',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n selectors: {\n '&:hover': {\n backgroundColor: vars.colors.surfaceMuted,\n color: vars.colors.text,\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors['blue-500']}`,\n outlineOffset: 2,\n },\n },\n },\n]);\n"],"mappings":""}
1
+ {"version":3,"file":"backofficeSidebarActions.css.js","names":[],"sources":["../../../../../src/components/backoffice/layout/backofficeSidebarActions.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\n\nimport { sprinkles } from '@plumile/ui/theme/sprinkles.css.js';\nimport { vars } from '@plumile/ui/theme/themeContract.js';\n\nexport const actionButton = style([\n sprinkles({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 6,\n height: 6,\n borderRadius: 'md',\n borderWidth: 0,\n borderStyle: 'none',\n padding: 0,\n backgroundColor: 'transparent',\n color: 'textSecondary',\n cursor: 'pointer',\n transitionProperty: 'colors',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n selectors: {\n '&:hover': {\n backgroundColor: vars.colors.surfaceMuted,\n color: vars.colors.text,\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors['blue-500']}`,\n outlineOffset: 2,\n },\n },\n },\n]);\n"],"mappings":""}
@@ -3,9 +3,9 @@ import { useBackofficeTopbarPortalContext as t } from "./BackofficeTopbarPortalC
3
3
  import { BackofficeLink as n } from "../../links/BackofficeLink.js";
4
4
  import { BackofficeLinkLabel as r } from "../../links/BackofficeLinkLabel.js";
5
5
  import { current as i, homeLabel as a, item as o, link as s, list as c, nav as l, separator as u } from "./backofficeTopbarBreadcrumb.css.js";
6
- import { SidebarHomeSvg as d } from "@plumile/ui";
7
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
8
- import { Link as h } from "@plumile/router";
6
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ import m from "@plumile/router/routing/Link.js";
8
+ import { SidebarHomeSvg as h } from "@plumile/ui/icons/SidebarHomeSvg.js";
9
9
  //#region src/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.tsx
10
10
  var g = (e) => {
11
11
  let { target: t } = e;
@@ -15,27 +15,27 @@ var g = (e) => {
15
15
  _.length === 1 && S != null && (x = S.target.kind === "dashboard" && S.kind === "current");
16
16
  let C = _;
17
17
  x && (C = []);
18
- let w = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, {
18
+ let w = /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(h, {
19
19
  width: 16,
20
20
  height: 16,
21
21
  "aria-hidden": "true"
22
- }), /* @__PURE__ */ p("span", {
22
+ }), /* @__PURE__ */ f("span", {
23
23
  className: a,
24
24
  children: b
25
25
  })] });
26
- return /* @__PURE__ */ p("nav", {
26
+ return /* @__PURE__ */ f("nav", {
27
27
  className: l,
28
28
  "aria-label": v("common.breadcrumb"),
29
- children: /* @__PURE__ */ m("ol", {
29
+ children: /* @__PURE__ */ p("ol", {
30
30
  className: c,
31
- children: [/* @__PURE__ */ m("li", {
31
+ children: [/* @__PURE__ */ p("li", {
32
32
  className: o,
33
- children: [x && /* @__PURE__ */ p("span", {
33
+ children: [x && /* @__PURE__ */ f("span", {
34
34
  className: "_80s44h3 _80s44h1 txvbqb9jg txvbqbcp txvbqbdoy txvbqbty7 txvbqbc77 txvbqb1rg txvbqbva1 txvbqb77 txvbqb6x txvbqb7k txvbqbv45 txvbqbv9z",
35
35
  "aria-current": "page",
36
36
  title: b,
37
37
  children: w
38
- }), !x && /* @__PURE__ */ p(h, {
38
+ }), !x && /* @__PURE__ */ f(m, {
39
39
  to: y,
40
40
  className: "_80s44h2 _80s44h1 txvbqb9jg txvbqbcp txvbqbdoy txvbqbty7 txvbqbc77 txvbqb1rg txvbqbva1 txvbqb77 txvbqb6x txvbqb7k",
41
41
  "aria-label": b,
@@ -46,19 +46,19 @@ var g = (e) => {
46
46
  let a = e.kind === "current", c = g(e), l = "none";
47
47
  t === 0 && (l = "auto");
48
48
  let d;
49
- return d = a ? /* @__PURE__ */ p(r, {
49
+ return d = a ? /* @__PURE__ */ f(r, {
50
50
  target: e.target,
51
51
  label: e.label,
52
52
  className: i,
53
53
  icon: l
54
- }) : /* @__PURE__ */ p(n, {
54
+ }) : /* @__PURE__ */ f(n, {
55
55
  target: e.target,
56
56
  label: e.label,
57
57
  className: s,
58
58
  icon: l
59
- }), /* @__PURE__ */ m("li", {
59
+ }), /* @__PURE__ */ p("li", {
60
60
  className: o,
61
- children: [/* @__PURE__ */ p("span", {
61
+ children: [/* @__PURE__ */ f("span", {
62
62
  className: u,
63
63
  "aria-hidden": "true",
64
64
  children: "/"
@@ -1 +1 @@
1
- {"version":3,"file":"BackofficeTopbarBreadcrumb.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.tsx"],"sourcesContent":["import { type JSX } from 'react';\nimport { Link } from '@plumile/router';\nimport { SidebarHomeSvg } from '@plumile/ui';\n\nimport { BackofficeLink } from '../../links/BackofficeLink.js';\nimport { BackofficeLinkLabel } from '../../links/BackofficeLinkLabel.js';\nimport { useBackofficeReactTranslation } from '../../../../i18n/useBackofficeReactTranslation.js';\nimport type { BackofficeTopbarBreadcrumbItem } from './types.js';\nimport { useBackofficeTopbarPortalContext } from './BackofficeTopbarPortalContext.js';\nimport * as styles from './backofficeTopbarBreadcrumb.css.js';\n\nexport type BackofficeTopbarBreadcrumbProps = {\n items: readonly BackofficeTopbarBreadcrumbItem[];\n};\n\nconst getBreadcrumbItemKey = (item: BackofficeTopbarBreadcrumbItem): string => {\n const { target } = item;\n if (target.kind === 'dashboard') {\n return `${item.kind}-dashboard`;\n }\n if (target.kind === 'entity-list') {\n return `${item.kind}-entity-list-${target.entityId}`;\n }\n if (target.kind === 'entity-detail') {\n return `${item.kind}-entity-detail-${target.entityId}-${target.id}`;\n }\n if (target.kind === 'entity-detail-page') {\n return `${item.kind}-entity-detail-page-${target.entityId}-${target.id}-${target.pageId}`;\n }\n if (target.kind === 'tool') {\n return `${item.kind}-tool-${target.toolId}`;\n }\n if (target.kind === 'hub') {\n return `${item.kind}-hub-${target.hubId}`;\n }\n return `${item.kind}-href-${target.href}`;\n};\n\nexport const BackofficeTopbarBreadcrumb = ({\n items,\n}: BackofficeTopbarBreadcrumbProps): JSX.Element => {\n const { t } = useBackofficeReactTranslation();\n const { dashboardHref, dashboardLabel } = useBackofficeTopbarPortalContext();\n let isDashboardCurrent = false;\n const [firstItem] = items;\n if (items.length === 1 && firstItem != null) {\n isDashboardCurrent =\n firstItem.target.kind === 'dashboard' && firstItem.kind === 'current';\n }\n let visibleItems: readonly BackofficeTopbarBreadcrumbItem[] = items;\n if (isDashboardCurrent) {\n visibleItems = [];\n }\n\n const homeContent = (\n <>\n <SidebarHomeSvg width={16} height={16} aria-hidden=\"true\" />\n <span className={styles.homeLabel}>{dashboardLabel}</span>\n </>\n );\n\n return (\n <nav className={styles.nav} aria-label={t('common.breadcrumb')}>\n <ol className={styles.list}>\n <li className={styles.item}>\n {isDashboardCurrent && (\n <span\n className={styles.homeCurrent}\n aria-current=\"page\"\n title={dashboardLabel}\n >\n {homeContent}\n </span>\n )}\n {!isDashboardCurrent && (\n <Link\n to={dashboardHref}\n className={styles.homeLink}\n aria-label={dashboardLabel}\n title={dashboardLabel}\n >\n {homeContent}\n </Link>\n )}\n </li>\n {visibleItems.map((item, index) => {\n const isCurrent = item.kind === 'current';\n const key = getBreadcrumbItemKey(item);\n let icon: 'auto' | 'none' = 'none';\n if (index === 0) {\n icon = 'auto';\n }\n let content: JSX.Element;\n\n if (!isCurrent) {\n content = (\n <BackofficeLink\n target={item.target}\n label={item.label}\n className={styles.link}\n icon={icon}\n />\n );\n } else {\n content = (\n <BackofficeLinkLabel\n target={item.target}\n label={item.label}\n className={styles.current}\n icon={icon}\n />\n );\n }\n\n return (\n <li key={key} className={styles.item}>\n <span className={styles.separator} aria-hidden=\"true\">\n /\n </span>\n {content}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n};\n\nexport default BackofficeTopbarBreadcrumb;\n"],"mappings":";;;;;;;;;AAeA,IAAM,KAAwB,MAA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jC,IAAM,IAAY,EAAK,SAAS,WAC1B,IAAM,EAAqB,EAAK,EAClC,IAAwB;IAC5B,AAAI,MAAU,MACZ,IAAO;IAET,IAAI;IAsBJ,OApBA,AACE,IADG,IAWD,kBAAC,GAAD;KACE,QAAQ,EAAK;KACb,OAAO,EAAK;KACZ,WAAW;KACL;KACN,CAAA,GAdF,kBAAC,GAAD;KACE,QAAQ,EAAK;KACb,OAAO,EAAK;KACZ,WAAW;KACL;KACN,CAAA,EAcJ,kBAAC,MAAD;KAAc,WAAW;eAAzB,CACE,kBAAC,QAAD;MAAM,WAAW;MAAkB,eAAY;gBAAO;MAE/C,CAAA,EACN,EACE;OALI,EAKJ;KAEP,CACC;;EACD,CAAA"}
1
+ {"version":3,"file":"BackofficeTopbarBreadcrumb.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.tsx"],"sourcesContent":["import { type JSX } from 'react';\nimport Link from '@plumile/router/routing/Link.js';\nimport { SidebarHomeSvg } from '@plumile/ui/icons/SidebarHomeSvg.js';\n\nimport { BackofficeLink } from '../../links/BackofficeLink.js';\nimport { BackofficeLinkLabel } from '../../links/BackofficeLinkLabel.js';\nimport { useBackofficeReactTranslation } from '../../../../i18n/useBackofficeReactTranslation.js';\nimport type { BackofficeTopbarBreadcrumbItem } from './types.js';\nimport { useBackofficeTopbarPortalContext } from './BackofficeTopbarPortalContext.js';\nimport * as styles from './backofficeTopbarBreadcrumb.css.js';\n\nexport type BackofficeTopbarBreadcrumbProps = {\n items: readonly BackofficeTopbarBreadcrumbItem[];\n};\n\nconst getBreadcrumbItemKey = (item: BackofficeTopbarBreadcrumbItem): string => {\n const { target } = item;\n if (target.kind === 'dashboard') {\n return `${item.kind}-dashboard`;\n }\n if (target.kind === 'entity-list') {\n return `${item.kind}-entity-list-${target.entityId}`;\n }\n if (target.kind === 'entity-detail') {\n return `${item.kind}-entity-detail-${target.entityId}-${target.id}`;\n }\n if (target.kind === 'entity-detail-page') {\n return `${item.kind}-entity-detail-page-${target.entityId}-${target.id}-${target.pageId}`;\n }\n if (target.kind === 'tool') {\n return `${item.kind}-tool-${target.toolId}`;\n }\n if (target.kind === 'hub') {\n return `${item.kind}-hub-${target.hubId}`;\n }\n return `${item.kind}-href-${target.href}`;\n};\n\nexport const BackofficeTopbarBreadcrumb = ({\n items,\n}: BackofficeTopbarBreadcrumbProps): JSX.Element => {\n const { t } = useBackofficeReactTranslation();\n const { dashboardHref, dashboardLabel } = useBackofficeTopbarPortalContext();\n let isDashboardCurrent = false;\n const [firstItem] = items;\n if (items.length === 1 && firstItem != null) {\n isDashboardCurrent =\n firstItem.target.kind === 'dashboard' && firstItem.kind === 'current';\n }\n let visibleItems: readonly BackofficeTopbarBreadcrumbItem[] = items;\n if (isDashboardCurrent) {\n visibleItems = [];\n }\n\n const homeContent = (\n <>\n <SidebarHomeSvg width={16} height={16} aria-hidden=\"true\" />\n <span className={styles.homeLabel}>{dashboardLabel}</span>\n </>\n );\n\n return (\n <nav className={styles.nav} aria-label={t('common.breadcrumb')}>\n <ol className={styles.list}>\n <li className={styles.item}>\n {isDashboardCurrent && (\n <span\n className={styles.homeCurrent}\n aria-current=\"page\"\n title={dashboardLabel}\n >\n {homeContent}\n </span>\n )}\n {!isDashboardCurrent && (\n <Link\n to={dashboardHref}\n className={styles.homeLink}\n aria-label={dashboardLabel}\n title={dashboardLabel}\n >\n {homeContent}\n </Link>\n )}\n </li>\n {visibleItems.map((item, index) => {\n const isCurrent = item.kind === 'current';\n const key = getBreadcrumbItemKey(item);\n let icon: 'auto' | 'none' = 'none';\n if (index === 0) {\n icon = 'auto';\n }\n let content: JSX.Element;\n\n if (!isCurrent) {\n content = (\n <BackofficeLink\n target={item.target}\n label={item.label}\n className={styles.link}\n icon={icon}\n />\n );\n } else {\n content = (\n <BackofficeLinkLabel\n target={item.target}\n label={item.label}\n className={styles.current}\n icon={icon}\n />\n );\n }\n\n return (\n <li key={key} className={styles.item}>\n <span className={styles.separator} aria-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CAAA,EAER,CAAC,KACA,kBAAC,GAAD;KACE,IAAI;KACJ,WAAW;KACX,cAAY;KACZ,OAAO;eAEN;KACI,CAAA,CAEN;OACJ,EAAa,KAAK,GAAM,MAAU;IACjC,IAAM,IAAY,EAAK,SAAS,WAC1B,IAAM,EAAqB,EAAK,EAClC,IAAwB;IAC5B,AAAI,MAAU,MACZ,IAAO;IAET,IAAI;IAsBJ,OApBA,AACE,IADG,IAWD,kBAAC,GAAD;KACE,QAAQ,EAAK;KACb,OAAO,EAAK;KACZ,WAAW;KACL;KACN,CAAA,GAdF,kBAAC,GAAD;KACE,QAAQ,EAAK;KACb,OAAO,EAAK;KACZ,WAAW;KACL;KACN,CAAA,EAcJ,kBAAC,MAAD;KAAc,WAAW;eAAzB,CACE,kBAAC,QAAD;MAAM,WAAW;MAAkB,eAAY;gBAAO;MAE/C,CAAA,EACN,EACE;OALI,EAKJ;KAEP,CACC;;EACD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"backofficeTopbarBreadcrumb.css.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts"],"sourcesContent":["import { sprinkles, vars } from '@plumile/ui';\nimport { style } from '@vanilla-extract/css';\n\nconst INLINE_FLEX = 'inline-flex' as const;\n\nexport const nav = sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n});\n\nexport const list = style([\n sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n gap: 2,\n }),\n {\n margin: 0,\n padding: 0,\n listStyle: 'none',\n },\n]);\n\nexport const item = sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n gap: 2,\n});\n\nexport const separator = sprinkles({\n color: 'textSecondary',\n fontSize: 'sm',\n lineHeight: 'normal',\n});\n\nconst homeBase = style([\n sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n justifyContent: 'center',\n width: 8,\n height: 8,\n borderRadius: 'md',\n color: 'textSecondary',\n transitionProperty: 'default',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n textDecoration: 'none',\n },\n]);\n\nexport const homeLink = style([\n homeBase,\n {\n selectors: {\n '&:hover': {\n backgroundColor: vars.colors.surfaceMuted,\n color: vars.colors.text,\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n },\n },\n]);\n\nexport const homeCurrent = style([\n homeBase,\n sprinkles({\n backgroundColor: 'surfaceMuted',\n color: 'text',\n }),\n]);\n\nexport const homeLabel = style({\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n border: 0,\n});\n\nexport const link = style([\n sprinkles({\n color: 'textSecondary',\n fontSize: 'sm',\n lineHeight: 'normal',\n }),\n {\n textDecoration: 'none',\n selectors: {\n '&:hover': {\n textDecoration: 'underline',\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n },\n },\n]);\n\nexport const current = sprinkles({\n color: 'text',\n fontSize: 'sm',\n lineHeight: 'normal',\n fontWeight: 'semibold',\n});\n"],"mappings":""}
1
+ {"version":3,"file":"backofficeTopbarBreadcrumb.css.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts"],"sourcesContent":["import { sprinkles } from '@plumile/ui/theme/sprinkles.css.js';\nimport { vars } from '@plumile/ui/theme/themeContract.js';\nimport { style } from '@vanilla-extract/css';\n\nconst INLINE_FLEX = 'inline-flex' as const;\n\nexport const nav = sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n});\n\nexport const list = style([\n sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n gap: 2,\n }),\n {\n margin: 0,\n padding: 0,\n listStyle: 'none',\n },\n]);\n\nexport const item = sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n gap: 2,\n});\n\nexport const separator = sprinkles({\n color: 'textSecondary',\n fontSize: 'sm',\n lineHeight: 'normal',\n});\n\nconst homeBase = style([\n sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n justifyContent: 'center',\n width: 8,\n height: 8,\n borderRadius: 'md',\n color: 'textSecondary',\n transitionProperty: 'default',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n textDecoration: 'none',\n },\n]);\n\nexport const homeLink = style([\n homeBase,\n {\n selectors: {\n '&:hover': {\n backgroundColor: vars.colors.surfaceMuted,\n color: vars.colors.text,\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n },\n },\n]);\n\nexport const homeCurrent = style([\n homeBase,\n sprinkles({\n backgroundColor: 'surfaceMuted',\n color: 'text',\n }),\n]);\n\nexport const homeLabel = style({\n position: 'absolute',\n width: '1px',\n height: '1px',\n padding: 0,\n margin: '-1px',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n border: 0,\n});\n\nexport const link = style([\n sprinkles({\n color: 'textSecondary',\n fontSize: 'sm',\n lineHeight: 'normal',\n }),\n {\n textDecoration: 'none',\n selectors: {\n '&:hover': {\n textDecoration: 'underline',\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n },\n },\n]);\n\nexport const current = sprinkles({\n color: 'text',\n fontSize: 'sm',\n lineHeight: 'normal',\n fontWeight: 'semibold',\n});\n"],"mappings":""}
@@ -1,9 +1,14 @@
1
1
  import { buildEntityGroupLookup as e, isActivePath as t, resolveGroupItems as n, resolveHubEntityIds as r, resolveLabel as i, resolveSidebarGroups as a, resolveSidebarHub as o } from "./sidebarUtils.js";
2
2
  import { actionButton as s } from "./backofficeSidebarActions.css.js";
3
- import { BackofficeSidebarHistorySvg as c, GripDotsSvg as l, PinFilledSvg as u, PinSvg as d, SidebarHomeSvg as f, SidebarTasksSvg as p } from "@plumile/ui";
4
- import { jsx as m } from "react/jsx-runtime";
3
+ import { jsx as c } from "react/jsx-runtime";
4
+ import { SidebarTasksSvg as l } from "@plumile/ui/icons/SidebarTasksSvg.js";
5
+ import { SidebarHomeSvg as u } from "@plumile/ui/icons/SidebarHomeSvg.js";
6
+ import { BackofficeSidebarHistorySvg as d } from "@plumile/ui/icons/backoffice/BackofficeSidebarHistorySvg.js";
7
+ import { GripDotsSvg as f } from "@plumile/ui/icons/GripDotsSvg.js";
8
+ import { PinFilledSvg as p } from "@plumile/ui/icons/PinFilledSvg.js";
9
+ import { PinSvg as m } from "@plumile/ui/icons/PinSvg.js";
5
10
  //#region src/components/backoffice/layout/buildSidebarSections.tsx
6
- var h = (e, t, n = 18) => e == null ? t ?? null : /* @__PURE__ */ m(e, {
11
+ var h = (e, t, n = 18) => e == null ? t ?? null : /* @__PURE__ */ c(e, {
7
12
  width: n,
8
13
  height: n,
9
14
  "aria-hidden": "true"
@@ -11,8 +16,8 @@ var h = (e, t, n = 18) => e == null ? t ?? null : /* @__PURE__ */ m(e, {
11
16
  function g(g) {
12
17
  let { basePath: _, pathname: v, entities: y, sidebar: b, permissions: x, searchQuery: S, tApp: C, t: w, pinnedEntityIds: T = [], recentItems: E = [], onTogglePin: D, onReorderPin: O, collapsedByGroupId: k, onGroupCollapsedChange: A, sidebarCollapsed: j = !1 } = g, M = a(y, b), N = Object.entries(M), P = new Set(T), F = w("sidebar.actions.pin"), I = w("sidebar.actions.unpin"), L = w("sidebar.actions.reorder"), R = e(M, b), z = S?.trim().toLowerCase() ?? "", B = (e) => z === "" || e.toLowerCase().includes(z), V = (e) => {
13
18
  if (D == null) return null;
14
- let t = P.has(e), n = F, r = d;
15
- return t && (n = I, r = u), /* @__PURE__ */ m("button", {
19
+ let t = P.has(e), n = F, r = m;
20
+ return t && (n = I, r = p), /* @__PURE__ */ c("button", {
16
21
  type: "button",
17
22
  className: s,
18
23
  "aria-pressed": t,
@@ -21,7 +26,7 @@ function g(g) {
21
26
  onClick: (t) => {
22
27
  t.preventDefault(), t.stopPropagation(), D(e);
23
28
  },
24
- children: /* @__PURE__ */ m(r, {
29
+ children: /* @__PURE__ */ c(r, {
25
30
  width: 14,
26
31
  height: 14,
27
32
  "aria-hidden": "true"
@@ -42,7 +47,7 @@ function g(g) {
42
47
  },
43
48
  label: n,
44
49
  href: _,
45
- icon: h(void 0, /* @__PURE__ */ m(f, {
50
+ icon: h(void 0, /* @__PURE__ */ c(u, {
46
51
  width: 18,
47
52
  height: 18,
48
53
  "aria-hidden": "true"
@@ -51,18 +56,18 @@ function g(g) {
51
56
  ariaLabel: n
52
57
  } : null;
53
58
  }, U = (e) => {
54
- let { entityId: n, groupId: r, groupIcon: a, itemIcon: o, itemLabel: s, enableReorder: c } = e, u = y[n];
55
- if (u == null) return null;
56
- let d = {
59
+ let { entityId: n, groupId: r, groupIcon: a, itemIcon: o, itemLabel: s, enableReorder: u } = e, d = y[n];
60
+ if (d == null) return null;
61
+ let p = {
57
62
  kind: "entity",
58
63
  id: n
59
64
  };
60
- if (u.kind === "tool" && (d = {
65
+ if (d.kind === "tool" && (p = {
61
66
  kind: "tool",
62
67
  id: n
63
- }), b?.isItemVisible?.(d, x) === !1) return null;
64
- if (u.kind === "tool") {
65
- let e = s ?? i(u.label, C);
68
+ }), b?.isItemVisible?.(p, x) === !1) return null;
69
+ if (d.kind === "tool") {
70
+ let e = s ?? i(d.label, C);
66
71
  return z !== "" && !e.toLowerCase().includes(z) ? null : {
67
72
  id: `tool-${n}`,
68
73
  data: {
@@ -71,22 +76,22 @@ function g(g) {
71
76
  groupId: r
72
77
  },
73
78
  label: e,
74
- href: u.routes.list,
75
- icon: h(o ?? a, /* @__PURE__ */ m(p, {
79
+ href: d.routes.list,
80
+ icon: h(o ?? a, /* @__PURE__ */ c(l, {
76
81
  width: 18,
77
82
  height: 18,
78
83
  "aria-hidden": "true"
79
84
  })),
80
- isActive: t(v, u.routes.list),
85
+ isActive: t(v, d.routes.list),
81
86
  ariaLabel: e,
82
87
  actionSlot: V(n)
83
88
  };
84
89
  }
85
- if (!u.hasList) return null;
86
- let f = s ?? i(u.label, C);
87
- if (z !== "" && !f.toLowerCase().includes(z)) return null;
90
+ if (!d.hasList) return null;
91
+ let m = s ?? i(d.label, C);
92
+ if (z !== "" && !m.toLowerCase().includes(z)) return null;
88
93
  let g, _, S, w, T = !1;
89
- c === !0 && O != null && (T = !0, g = /* @__PURE__ */ m(l, {
94
+ u === !0 && O != null && (T = !0, g = /* @__PURE__ */ c(f, {
90
95
  width: 14,
91
96
  height: 14,
92
97
  "aria-hidden": "true"
@@ -110,15 +115,15 @@ function g(g) {
110
115
  id: n,
111
116
  groupId: r
112
117
  },
113
- label: f,
114
- href: u.routes.list,
115
- icon: h(o ?? a, /* @__PURE__ */ m(p, {
118
+ label: m,
119
+ href: d.routes.list,
120
+ icon: h(o ?? a, /* @__PURE__ */ c(l, {
116
121
  width: 18,
117
122
  height: 18,
118
123
  "aria-hidden": "true"
119
124
  })),
120
- isActive: t(v, u.routes.list),
121
- ariaLabel: f,
125
+ isActive: t(v, d.routes.list),
126
+ ariaLabel: m,
122
127
  actionSlot: V(n),
123
128
  dragHandleSlot: g,
124
129
  dragHandleLabel: E,
@@ -133,7 +138,7 @@ function g(g) {
133
138
  id: n.id
134
139
  };
135
140
  if (b?.isItemVisible?.(s, x) === !1) return null;
136
- let c = r(n), l = c.map((e) => y[e] ?? null).filter((e) => {
141
+ let u = r(n), d = u.map((e) => y[e] ?? null).filter((e) => {
137
142
  if (e == null) return !1;
138
143
  let t = "entity";
139
144
  e.kind === "tool" && (t = "tool");
@@ -143,10 +148,10 @@ function g(g) {
143
148
  };
144
149
  return !(b?.isItemVisible?.(n, x) === !1 || e.kind !== "tool" && !e.hasList);
145
150
  });
146
- if (c.length > 0 && l.length === 0) return null;
147
- let u = i(n.title, C), d = B(u), f = l.some((e) => B(i(e.label, C)));
148
- if (!d && !f) return null;
149
- let g = t(v, n.href) || l.some((e) => t(v, e.routes.list));
151
+ if (u.length > 0 && d.length === 0) return null;
152
+ let f = i(n.title, C), p = B(f), m = d.some((e) => B(i(e.label, C)));
153
+ if (!p && !m) return null;
154
+ let g = t(v, n.href) || d.some((e) => t(v, e.routes.list));
150
155
  return {
151
156
  id: `hub-${n.id}`,
152
157
  data: {
@@ -154,15 +159,15 @@ function g(g) {
154
159
  id: n.id,
155
160
  groupId: a
156
161
  },
157
- label: u,
162
+ label: f,
158
163
  href: n.href,
159
- icon: h(o, /* @__PURE__ */ m(p, {
164
+ icon: h(o, /* @__PURE__ */ c(l, {
160
165
  width: 18,
161
166
  height: 18,
162
167
  "aria-hidden": "true"
163
168
  })),
164
169
  isActive: g,
165
- ariaLabel: u
170
+ ariaLabel: f
166
171
  };
167
172
  }, G = [], K = b?.primaryItems ?? [];
168
173
  if (K.length > 0) {
@@ -199,7 +204,7 @@ function g(g) {
199
204
  e.length > 0 && G.push({
200
205
  id: "pinned",
201
206
  title: w("sidebar.sections.pinned"),
202
- icon: h(void 0, /* @__PURE__ */ m(d, {
207
+ icon: h(void 0, /* @__PURE__ */ c(m, {
203
208
  width: 16,
204
209
  height: 16,
205
210
  "aria-hidden": "true"
@@ -226,7 +231,7 @@ function g(g) {
226
231
  },
227
232
  label: e.label,
228
233
  href: e.href,
229
- icon: h(r?.itemIcon ?? r?.groupIcon, /* @__PURE__ */ m(p, {
234
+ icon: h(r?.itemIcon ?? r?.groupIcon, /* @__PURE__ */ c(l, {
230
235
  width: 18,
231
236
  height: 18,
232
237
  "aria-hidden": "true"
@@ -238,7 +243,7 @@ function g(g) {
238
243
  e.length > 0 && G.push({
239
244
  id: "recent",
240
245
  title: w("sidebar.sections.recent"),
241
- icon: h(void 0, /* @__PURE__ */ m(c, {
246
+ icon: h(void 0, /* @__PURE__ */ c(d, {
242
247
  width: 16,
243
248
  height: 16,
244
249
  "aria-hidden": "true"
@@ -1 +1 @@
1
- {"version":3,"file":"buildSidebarSections.js","names":[],"sources":["../../../../../src/components/backoffice/layout/buildSidebarSections.tsx"],"sourcesContent":["import { type DragEvent, type ReactNode } from 'react';\nimport type { TFunction } from 'i18next';\n\nimport type { BackofficeEntityManifestMap } from '@plumile/backoffice-core/types.js';\nimport type {\n BackofficeSidebarConfig,\n BackofficeSidebarItemDescriptor,\n BackofficeIconComponent,\n BackofficeSidebarRecentItem,\n} from '../../../provider/types.js';\nimport {\n type AdminSidebarSection,\n type SidebarNavSectionItem,\n GripDotsSvg,\n PinFilledSvg,\n PinSvg,\n BackofficeSidebarHistorySvg,\n SidebarHomeSvg,\n SidebarTasksSvg,\n} from '@plumile/ui';\nimport type { SidebarGroupCollapseState } from '../../../hooks/useSidebarGroupCollapse.js';\nimport * as styles from './backofficeSidebarActions.css.js';\nimport {\n buildEntityGroupLookup,\n isActivePath,\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 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 AdminSidebarSection[] {\n const {\n basePath,\n pathname,\n entities,\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 groupId?: string,\n ): SidebarNavSectionItem | null => {\n const dashboardDescriptor: BackofficeSidebarItemDescriptor = {\n kind: 'dashboard',\n id: 'dashboard',\n };\n const isDashboardVisible = sidebar?.isItemVisible?.(\n dashboardDescriptor,\n permissions,\n );\n if (isDashboardVisible === false) {\n return null;\n }\n\n const label = t('sidebar.items.dashboard');\n if (!labelMatchesQuery(label)) {\n return null;\n }\n\n return {\n id: 'dashboard',\n data: {\n kind: 'dashboard',\n id: 'dashboard',\n groupId,\n },\n label,\n href: basePath,\n icon: renderIcon(\n undefined,\n <SidebarHomeSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n isActive: isActivePath(pathname, basePath),\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 }): SidebarNavSectionItem | null => {\n const { entityId, groupId, groupIcon, itemIcon, itemLabel, enableReorder } =\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 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 };\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 let onDragStart: ((event: DragEvent) => void) | undefined;\n let onDragOver: ((event: DragEvent) => void) | undefined;\n let onDrop: ((event: DragEvent) => void) | undefined;\n let draggable = false;\n\n if (enableReorder === true && onReorderPin != null) {\n draggable = true;\n dragHandleSlot = (\n <GripDotsSvg width={14} height={14} aria-hidden=\"true\" />\n );\n onDragStart = (event) => {\n const { dataTransfer } = event;\n dataTransfer.effectAllowed = 'move';\n dataTransfer.setData('text/plain', entityId);\n };\n onDragOver = (event) => {\n event.preventDefault();\n const { dataTransfer } = event;\n dataTransfer.dropEffect = 'move';\n };\n onDrop = (event) => {\n event.preventDefault();\n const fromId = event.dataTransfer.getData('text/plain');\n if (fromId === '' || fromId === entityId) {\n return;\n }\n onReorderPin(fromId, entityId);\n };\n }\n\n let dragHandleLabel: string | undefined;\n if (dragHandleSlot != null) {\n dragHandleLabel = reorderLabel;\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 dragHandleSlot,\n dragHandleLabel,\n draggable,\n onDragStart,\n onDragOver,\n onDrop,\n };\n };\n\n const buildHubItem = (inputItem: {\n hub: ReturnType<typeof resolveSidebarHub>;\n groupId?: string;\n icon?: BackofficeIconComponent;\n }): SidebarNavSectionItem | 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: AdminSidebarSection[] = [];\n\n const primaryItems = sidebar?.primaryItems ?? [];\n if (primaryItems.length > 0) {\n const primarySectionItems = primaryItems\n .map((primaryItem): SidebarNavSectionItem | null => {\n if (primaryItem.kind === 'dashboard') {\n return buildDashboardItem();\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 });\n })\n .filter((item): item is SidebarNavSectionItem => {\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 });\n })\n .filter((item): item is SidebarNavSectionItem => {\n return item != null;\n });\n\n if (pinnedItems.length > 0) {\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 });\n }\n }\n\n if (recentItems.length > 0) {\n const recentSectionItems = recentItems\n .map((recentItem): SidebarNavSectionItem | 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 SidebarNavSectionItem;\n })\n .filter((item): item is SidebarNavSectionItem => {\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: SidebarNavSectionItem[] = [];\n\n const groupItems = resolveGroupItems(group);\n if (groupItems.length > 0) {\n groupItems.forEach((groupItem) => {\n if (groupItem.kind === 'dashboard') {\n const item = buildDashboardItem(groupId);\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 });\n if (item != null) {\n items.push(item);\n }\n });\n }\n\n let sectionItems: SidebarNavSectionItem[] = items;\n if (sidebarCollapsed && group.behavior?.showInCollapsedRail !== true) {\n sectionItems = items.filter((item) => {\n return item.id === '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":";;;;;AAgCA,IAAM,KACJ,GACA,GACA,IAAO,OAEH,KAAQ,OAGL,KAAY,OAFV,kBAAC,GAAD;CAAM,OAAO;CAAM,QAAQ;CAAM,eAAY;CAAS,CAAA;AA0BjE,SAAgB,EACd,GACgC;CAChC,IAAM,EACJ,aACA,aACA,aACA,YACA,gBACA,gBACA,SACA,MACA,qBAAkB,EAAE,EACpB,iBAAc,EAAE,EAChB,gBACA,iBACA,uBACA,2BACA,sBAAmB,OACjB,GAEE,IAAS,EAAqB,GAAU,EAAQ,EAChD,IAAU,OAAO,QAAQ,EAAO,EAChC,IAAY,IAAI,IAAI,EAAgB,EACpC,IAAW,EAAE,sBAAsB,EACnC,IAAa,EAAE,wBAA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,AAAI,EAAU,SAAS,SACrB,IAAY,EAAa,EAAU,OAAO,EAAK;GAEjD,IAAM,IAAO,EAAgB;IAC3B,UAAU,EAAU;IACpB;IACA,WAAW,EAAM;IACjB,UAAU,EAAU;IACpB;IACD,CAAC;GACF,AAAI,KAAQ,QACV,EAAM,KAAK,EAAK;IAElB;EAGJ,IAAI,IAAwC;EAO5C,IANI,KAAoB,EAAM,UAAU,wBAAwB,OAC9D,IAAe,EAAM,QAAQ,MACpB,EAAK,OAAO,eAAe,EAAK,aAAa,GACpD,GAGA,EAAa,WAAW,GAC1B;EAGF,IAAI;EACJ,AAAI,EAAM,SAAS,SACjB,IAAQ,EAAa,EAAM,OAAO,EAAK;EAGzC,IAAM,IAAc,IAAqB,IACrC;EAOJ,AANI,KAA0B,SAC5B,KAAqB,MAAuB;GAC1C,EAAuB,GAAS,EAAU;MAI9C,EAAS,KAAK;GACZ,IAAI;GACJ;GACA,MAAM,EAAW,EAAM,MAAM,KAAA,GAAW,GAAG;GAC3C,OAAO;GACP,aAAa,EAAM,UAAU,eAAe;GAC5C,kBAAkB,EAAM,UAAU,oBAAoB;GACtD;GACA;GACD,CAAC;GACF,EAEK"}
1
+ {"version":3,"file":"buildSidebarSections.js","names":[],"sources":["../../../../../src/components/backoffice/layout/buildSidebarSections.tsx"],"sourcesContent":["import { type DragEvent, type ReactNode } from 'react';\nimport type { TFunction } from 'i18next';\n\nimport type { BackofficeEntityManifestMap } from '@plumile/backoffice-core/types.js';\nimport type {\n BackofficeSidebarConfig,\n BackofficeSidebarItemDescriptor,\n BackofficeIconComponent,\n BackofficeSidebarRecentItem,\n} from '../../../provider/types.js';\nimport { type AdminSidebarSection } from '@plumile/ui/admin/organisms/admin_sidebar/AdminSidebar.js';\nimport { type SidebarNavSectionItem } from '@plumile/ui/backoffice/molecules/sidebar_nav_section/SidebarNavSection.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 * as styles from './backofficeSidebarActions.css.js';\nimport {\n buildEntityGroupLookup,\n isActivePath,\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 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 AdminSidebarSection[] {\n const {\n basePath,\n pathname,\n entities,\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 groupId?: string,\n ): SidebarNavSectionItem | null => {\n const dashboardDescriptor: BackofficeSidebarItemDescriptor = {\n kind: 'dashboard',\n id: 'dashboard',\n };\n const isDashboardVisible = sidebar?.isItemVisible?.(\n dashboardDescriptor,\n permissions,\n );\n if (isDashboardVisible === false) {\n return null;\n }\n\n const label = t('sidebar.items.dashboard');\n if (!labelMatchesQuery(label)) {\n return null;\n }\n\n return {\n id: 'dashboard',\n data: {\n kind: 'dashboard',\n id: 'dashboard',\n groupId,\n },\n label,\n href: basePath,\n icon: renderIcon(\n undefined,\n <SidebarHomeSvg width={18} height={18} aria-hidden=\"true\" />,\n ),\n isActive: isActivePath(pathname, basePath),\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 }): SidebarNavSectionItem | null => {\n const { entityId, groupId, groupIcon, itemIcon, itemLabel, enableReorder } =\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 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 };\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 let onDragStart: ((event: DragEvent) => void) | undefined;\n let onDragOver: ((event: DragEvent) => void) | undefined;\n let onDrop: ((event: DragEvent) => void) | undefined;\n let draggable = false;\n\n if (enableReorder === true && onReorderPin != null) {\n draggable = true;\n dragHandleSlot = (\n <GripDotsSvg width={14} height={14} aria-hidden=\"true\" />\n );\n onDragStart = (event) => {\n const { dataTransfer } = event;\n dataTransfer.effectAllowed = 'move';\n dataTransfer.setData('text/plain', entityId);\n };\n onDragOver = (event) => {\n event.preventDefault();\n const { dataTransfer } = event;\n dataTransfer.dropEffect = 'move';\n };\n onDrop = (event) => {\n event.preventDefault();\n const fromId = event.dataTransfer.getData('text/plain');\n if (fromId === '' || fromId === entityId) {\n return;\n }\n onReorderPin(fromId, entityId);\n };\n }\n\n let dragHandleLabel: string | undefined;\n if (dragHandleSlot != null) {\n dragHandleLabel = reorderLabel;\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 dragHandleSlot,\n dragHandleLabel,\n draggable,\n onDragStart,\n onDragOver,\n onDrop,\n };\n };\n\n const buildHubItem = (inputItem: {\n hub: ReturnType<typeof resolveSidebarHub>;\n groupId?: string;\n icon?: BackofficeIconComponent;\n }): SidebarNavSectionItem | 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: AdminSidebarSection[] = [];\n\n const primaryItems = sidebar?.primaryItems ?? [];\n if (primaryItems.length > 0) {\n const primarySectionItems = primaryItems\n .map((primaryItem): SidebarNavSectionItem | null => {\n if (primaryItem.kind === 'dashboard') {\n return buildDashboardItem();\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 });\n })\n .filter((item): item is SidebarNavSectionItem => {\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 });\n })\n .filter((item): item is SidebarNavSectionItem => {\n return item != null;\n });\n\n if (pinnedItems.length > 0) {\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 });\n }\n }\n\n if (recentItems.length > 0) {\n const recentSectionItems = recentItems\n .map((recentItem): SidebarNavSectionItem | 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 SidebarNavSectionItem;\n })\n .filter((item): item is SidebarNavSectionItem => {\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: SidebarNavSectionItem[] = [];\n\n const groupItems = resolveGroupItems(group);\n if (groupItems.length > 0) {\n groupItems.forEach((groupItem) => {\n if (groupItem.kind === 'dashboard') {\n const item = buildDashboardItem(groupId);\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 });\n if (item != null) {\n items.push(item);\n }\n });\n }\n\n let sectionItems: SidebarNavSectionItem[] = items;\n if (sidebarCollapsed && group.behavior?.showInCollapsedRail !== true) {\n sectionItems = items.filter((item) => {\n return item.id === '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":";;;;;;;;;;AA8BA,IAAM,KACJ,GACA,GACA,IAAO,OAEH,KAAQ,OAGL,KAAY,OAFV,kBAAC,GAAD;CAAM,OAAO;CAAM,QAAQ;CAAM,eAAY;CAAS,CAAA;AA0BjE,SAAgB,EACd,GACgC;CAChC,IAAM,EACJ,aACA,aACA,aACA,YACA,gBACA,gBACA,SACA,MACA,qBAAkB,EAAE,EACpB,iBAAc,EAAE,EAChB,gBACA,iBACA,uBACA,2BACA,sBAAmB,OACjB,GAEE,IAAS,EAAqB,GAAU,EAAQ,EAChD,IAAU,OAAO,QAAQ,EAAO,EAChC,IAAY,IAAI,IAAI,EAAgB,EACpC,IAAW,EAAE,sBAAsB,EACnC,IAAa,EAAE,wBAAwB,EACvC,IAAe,EAAE,0BAA0B,EAC3C,IAAoB,EAAuB,GAAQ,EAAQ,EAC3D,IAAkB,GAAa,MAAM,CAAC,aAAa,IAAI,IAEvD,K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EAAM;IACjB,UAAU,EAAU;IACpB;IACD,CAAC;GACF,AAAI,KAAQ,QACV,EAAM,KAAK,EAAK;IAElB;EAGJ,IAAI,IAAwC;EAO5C,IANI,KAAoB,EAAM,UAAU,wBAAwB,OAC9D,IAAe,EAAM,QAAQ,MACpB,EAAK,OAAO,eAAe,EAAK,aAAa,GACpD,GAGA,EAAa,WAAW,GAC1B;EAGF,IAAI;EACJ,AAAI,EAAM,SAAS,SACjB,IAAQ,EAAa,EAAM,OAAO,EAAK;EAGzC,IAAM,IAAc,IAAqB,IACrC;EAOJ,AANI,KAA0B,SAC5B,KAAqB,MAAuB;GAC1C,EAAuB,GAAS,EAAU;MAI9C,EAAS,KAAK;GACZ,IAAI;GACJ;GACA,MAAM,EAAW,EAAM,MAAM,KAAA,GAAW,GAAG;GAC3C,OAAO;GACP,aAAa,EAAM,UAAU,eAAe;GAC5C,kBAAkB,EAAM,UAAU,oBAAoB;GACtD;GACA;GACD,CAAC;GACF,EAEK"}
@@ -1 +1 @@
1
- {"version":3,"file":"mapViewerToSidebarProfileView.js","names":[],"sources":["../../../../../src/components/backoffice/layout/mapViewerToSidebarProfileView.ts"],"sourcesContent":["import type { BackofficeSidebarProfileViewer } from '@plumile/ui';\n\nexport type BackofficeViewerIdentity = {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n initials: string;\n};\n\ntype MapViewerToSidebarProfileViewInput = {\n viewer: BackofficeViewerIdentity | null | undefined;\n unknownUserLabel: string;\n};\n\nconst sanitizeToken = (value: string | null | undefined): string => {\n return value?.trim() ?? '';\n};\n\nexport const mapViewerToSidebarProfileView = ({\n viewer,\n unknownUserLabel,\n}: MapViewerToSidebarProfileViewInput): BackofficeSidebarProfileViewer => {\n const firstName = sanitizeToken(viewer?.firstName);\n const lastName = sanitizeToken(viewer?.lastName);\n const joinedDisplayName = [firstName, lastName]\n .filter((token) => {\n return token !== '';\n })\n .join(' ')\n .trim();\n let displayName = joinedDisplayName;\n if (displayName === '') {\n displayName = unknownUserLabel;\n }\n\n const email = sanitizeToken(viewer?.email);\n const initialsToken = sanitizeToken(viewer?.initials);\n let initials = initialsToken;\n if (initials === '') {\n initials = '?';\n }\n\n const ariaParts = [displayName];\n if (email !== '') {\n ariaParts.push(email);\n }\n\n return {\n displayName,\n email,\n initials,\n ariaLabel: ariaParts.join(' - '),\n };\n};\n\nexport default mapViewerToSidebarProfileView;\n"],"mappings":";AAeA,IAAM,KAAiB,MACd,GAAO,MAAM,IAAI,IAGb,KAAiC,EAC5C,WACA,0BACwE;CASxE,IAAI,IANsB,CAFR,EAAc,GAAQ,UAEb,EADV,EAAc,GAAQ,SACD,CAAS,CAC5C,QAAQ,MACA,MAAU,GACjB,CACD,KAAK,IAAI,CACT,MACe;CAClB,AAAI,MAAgB,OAClB,IAAc;CAGhB,IAAM,IAAQ,EAAc,GAAQ,MAAM,EAEtC,IADkB,EAAc,GAAQ,SAC7B;CACf,AAAI,MAAa,OACf,IAAW;CAGb,IAAM,IAAY,CAAC,EAAY;CAK/B,OAJI,MAAU,MACZ,EAAU,KAAK,EAAM,EAGhB;EACL;EACA;EACA;EACA,WAAW,EAAU,KAAK,MAAM;EACjC"}
1
+ {"version":3,"file":"mapViewerToSidebarProfileView.js","names":[],"sources":["../../../../../src/components/backoffice/layout/mapViewerToSidebarProfileView.ts"],"sourcesContent":["import type { BackofficeSidebarProfileViewer } from '@plumile/ui/backoffice/molecules/sidebar_profile_menu/BackofficeSidebarProfileMenu.js';\n\nexport type BackofficeViewerIdentity = {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n initials: string;\n};\n\ntype MapViewerToSidebarProfileViewInput = {\n viewer: BackofficeViewerIdentity | null | undefined;\n unknownUserLabel: string;\n};\n\nconst sanitizeToken = (value: string | null | undefined): string => {\n return value?.trim() ?? '';\n};\n\nexport const mapViewerToSidebarProfileView = ({\n viewer,\n unknownUserLabel,\n}: MapViewerToSidebarProfileViewInput): BackofficeSidebarProfileViewer => {\n const firstName = sanitizeToken(viewer?.firstName);\n const lastName = sanitizeToken(viewer?.lastName);\n const joinedDisplayName = [firstName, lastName]\n .filter((token) => {\n return token !== '';\n })\n .join(' ')\n .trim();\n let displayName = joinedDisplayName;\n if (displayName === '') {\n displayName = unknownUserLabel;\n }\n\n const email = sanitizeToken(viewer?.email);\n const initialsToken = sanitizeToken(viewer?.initials);\n let initials = initialsToken;\n if (initials === '') {\n initials = '?';\n }\n\n const ariaParts = [displayName];\n if (email !== '') {\n ariaParts.push(email);\n }\n\n return {\n displayName,\n email,\n initials,\n ariaLabel: ariaParts.join(' - '),\n };\n};\n\nexport default mapViewerToSidebarProfileView;\n"],"mappings":";AAeA,IAAM,KAAiB,MACd,GAAO,MAAM,IAAI,IAGb,KAAiC,EAC5C,WACA,0BACwE;CASxE,IAAI,IANsB,CAFR,EAAc,GAAQ,UAEb,EADV,EAAc,GAAQ,SACD,CAAS,CAC5C,QAAQ,MACA,MAAU,GACjB,CACD,KAAK,IAAI,CACT,MACe;CAClB,AAAI,MAAgB,OAClB,IAAc;CAGhB,IAAM,IAAQ,EAAc,GAAQ,MAAM,EAEtC,IADkB,EAAc,GAAQ,SAC7B;CACf,AAAI,MAAa,OACf,IAAW;CAGb,IAAM,IAAY,CAAC,EAAY;CAK/B,OAJI,MAAU,MACZ,EAAU,KAAK,EAAM,EAGhB;EACL;EACA;EACA;EACA,WAAW,EAAU,KAAK,MAAM;EACjC"}
@@ -1,7 +1,7 @@
1
1
  import { BackofficeLinkContent as e } from "./BackofficeLinkContent.js";
2
2
  import { useBackofficeLink as t } from "./useBackofficeLink.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
- import { Link as r } from "@plumile/router";
4
+ import r from "@plumile/router/routing/Link.js";
5
5
  //#region src/components/backoffice/links/BackofficeInlineLink.tsx
6
6
  var i = ({ target: i, label: a, className: o, title: s, ariaLabel: c, icon: l = "auto", openInNewTab: u = !1, endAdornment: d, onClick: f, children: p }) => {
7
7
  let m = t(i, { label: p ?? a }), h = {};