@plumile/backoffice-react 0.1.107 → 0.1.109

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 (196) hide show
  1. package/lib/esm/auth/TotpQrCode.js +1 -1
  2. package/lib/esm/auth/TotpQrCode.js.map +1 -1
  3. package/lib/esm/auth/login/EmailCapturePanel.js +27 -23
  4. package/lib/esm/auth/login/EmailCapturePanel.js.map +1 -1
  5. package/lib/esm/auth/login/MfaChallengeForm.js +38 -36
  6. package/lib/esm/auth/login/MfaChallengeForm.js.map +1 -1
  7. package/lib/esm/auth/login/PasskeyLoginForm.js +40 -37
  8. package/lib/esm/auth/login/PasskeyLoginForm.js.map +1 -1
  9. package/lib/esm/auth/pages/AcceptInvitationScreen.js +63 -62
  10. package/lib/esm/auth/pages/AcceptInvitationScreen.js.map +1 -1
  11. package/lib/esm/auth/pages/PasswordResetCompleteScreen.js +56 -55
  12. package/lib/esm/auth/pages/PasswordResetCompleteScreen.js.map +1 -1
  13. package/lib/esm/auth/pages/PasswordResetRequestScreen.js +45 -45
  14. package/lib/esm/auth/pages/PasswordResetRequestScreen.js.map +1 -1
  15. package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js +1 -0
  16. package/lib/esm/components/backoffice/actions/BackofficeEntityActionFormDialog.js.map +1 -1
  17. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +44 -39
  18. package/lib/esm/components/backoffice/columns/buildDataTableColumns.js.map +1 -1
  19. package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js +15 -0
  20. package/lib/esm/components/backoffice/detail/BackofficeCopyButton.js.map +1 -0
  21. package/lib/esm/components/backoffice/detail/BackofficeDetailActionBar.js +11 -0
  22. package/lib/esm/components/backoffice/detail/BackofficeDetailActionBar.js.map +1 -0
  23. package/lib/esm/components/backoffice/detail/BackofficeDetailBlock.js +7 -0
  24. package/lib/esm/components/backoffice/detail/BackofficeDetailBlock.js.map +1 -0
  25. package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js +15 -0
  26. package/lib/esm/components/backoffice/detail/BackofficeDetailHeader.js.map +1 -0
  27. package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js +19 -0
  28. package/lib/esm/components/backoffice/detail/BackofficeDetailPage.js.map +1 -0
  29. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js +47 -40
  30. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationLink.js.map +1 -1
  31. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js +83 -90
  32. package/lib/esm/components/backoffice/detail/BackofficeDetailRelationListBlock.js.map +1 -1
  33. package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js +8 -0
  34. package/lib/esm/components/backoffice/detail/BackofficeDetailTable.js.map +1 -0
  35. package/lib/esm/components/backoffice/detail/BackofficeEmptyValue.js +7 -0
  36. package/lib/esm/components/backoffice/detail/BackofficeEmptyValue.js.map +1 -0
  37. package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js +8 -0
  38. package/lib/esm/components/backoffice/detail/BackofficeStatusGroup.js.map +1 -0
  39. package/lib/esm/components/backoffice/detail/BackofficeTechnicalFacts.js +2 -0
  40. package/lib/esm/components/backoffice/filters/EntityFilterValue.js +16 -8
  41. package/lib/esm/components/backoffice/filters/EntityFilterValue.js.map +1 -1
  42. package/lib/esm/components/backoffice/filters/EntityIdFilterField.js +85 -53
  43. package/lib/esm/components/backoffice/filters/EntityIdFilterField.js.map +1 -1
  44. package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js +2 -2
  45. package/lib/esm/components/backoffice/filters/entityIdFilterField.css.js.map +1 -1
  46. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js +53 -48
  47. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.js.map +1 -1
  48. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.js +2 -2
  49. package/lib/esm/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.js.map +1 -1
  50. package/lib/esm/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.js +15 -11
  51. package/lib/esm/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.js.map +1 -1
  52. package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js +50 -23
  53. package/lib/esm/components/backoffice/layout/breadcrumb/buildBreadcrumbs.js.map +1 -1
  54. package/lib/esm/components/backoffice/layout/buildSidebarSections.js +69 -69
  55. package/lib/esm/components/backoffice/layout/sidebarUtils.js +16 -16
  56. package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
  57. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js +29 -0
  58. package/lib/esm/components/backoffice/links/BackofficeInlineLink.js.map +1 -0
  59. package/lib/esm/components/backoffice/links/BackofficeLink.js +21 -0
  60. package/lib/esm/components/backoffice/links/BackofficeLink.js.map +1 -0
  61. package/lib/esm/components/backoffice/links/BackofficeLinkContent.js +26 -0
  62. package/lib/esm/components/backoffice/links/BackofficeLinkContent.js.map +1 -0
  63. package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js +19 -0
  64. package/lib/esm/components/backoffice/links/BackofficeLinkLabel.js.map +1 -0
  65. package/lib/esm/components/backoffice/links/backofficeLink.css.js +7 -0
  66. package/lib/esm/components/backoffice/links/backofficeLink.css.js.map +1 -0
  67. package/lib/esm/components/backoffice/links/resolveBackofficeLink.js +81 -0
  68. package/lib/esm/components/backoffice/links/resolveBackofficeLink.js.map +1 -0
  69. package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js +50 -0
  70. package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js.map +1 -0
  71. package/lib/esm/components/backoffice/links/types.js +0 -0
  72. package/lib/esm/components/backoffice/links/useBackofficeLink.js +21 -0
  73. package/lib/esm/components/backoffice/links/useBackofficeLink.js.map +1 -0
  74. package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js +1 -0
  75. package/lib/esm/components/backoffice/pickers/EntityIdPickerDialog.js.map +1 -1
  76. package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js +2 -2
  77. package/lib/esm/components/backoffice/pickers/entityIdPickerDialog.css.js.map +1 -1
  78. package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js +27 -21
  79. package/lib/esm/components/backoffice/pickers/shared/EntityPickerList.js.map +1 -1
  80. package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js +27 -27
  81. package/lib/esm/components/backoffice/refs/BackofficeEntityIdRef.js.map +1 -1
  82. package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js +24 -21
  83. package/lib/esm/components/backoffice/refs/BackofficeEntityLink.js.map +1 -1
  84. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js +45 -44
  85. package/lib/esm/components/backoffice/refs/BackofficeRelatedCountLink.js.map +1 -1
  86. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js +277 -227
  87. package/lib/esm/components/backoffice/scaffolds/BackofficeEntityListScaffold.js.map +1 -1
  88. package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js +25 -30
  89. package/lib/esm/components/backoffice/shared/BackofficeFilterableCell.js.map +1 -1
  90. package/lib/esm/i18n/locales/en/backofficeReact.js +8 -0
  91. package/lib/esm/i18n/locales/en/backofficeReact.js.map +1 -1
  92. package/lib/esm/i18n/locales/fr/backofficeReact.js +8 -0
  93. package/lib/esm/i18n/locales/fr/backofficeReact.js.map +1 -1
  94. package/lib/esm/index.js +88 -73
  95. package/lib/esm/pages/BackofficeDashboardPage.js +1 -5
  96. package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
  97. package/lib/esm/pages/BackofficeEntityDetailPage.js +231 -222
  98. package/lib/esm/pages/BackofficeEntityDetailPage.js.map +1 -1
  99. package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js +170 -54
  100. package/lib/esm/pages/BackofficeEntityDetailPage.view-helpers.js.map +1 -1
  101. package/lib/esm/pages/BackofficeEntityListPage.js +196 -207
  102. package/lib/esm/pages/BackofficeEntityListPage.js.map +1 -1
  103. package/lib/esm/pages/BackofficeHubPage.js +21 -21
  104. package/lib/esm/pages/BackofficeLayoutPage.js +7 -7
  105. package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
  106. package/lib/esm/router/createBackofficeRoutes.js +132 -126
  107. package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
  108. package/lib/esm/style.css +1 -1
  109. package/lib/types/auth/login/EmailCapturePanel.d.ts.map +1 -1
  110. package/lib/types/auth/login/MfaChallengeForm.d.ts.map +1 -1
  111. package/lib/types/auth/login/PasskeyLoginForm.d.ts.map +1 -1
  112. package/lib/types/auth/pages/AcceptInvitationScreen.d.ts.map +1 -1
  113. package/lib/types/auth/pages/PasswordResetCompleteScreen.d.ts.map +1 -1
  114. package/lib/types/auth/pages/PasswordResetRequestScreen.d.ts.map +1 -1
  115. package/lib/types/components/backoffice/actions/BackofficeEntityActionFormDialog.d.ts.map +1 -1
  116. package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts +0 -1
  117. package/lib/types/components/backoffice/columns/buildDataTableColumns.d.ts.map +1 -1
  118. package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts +8 -0
  119. package/lib/types/components/backoffice/detail/BackofficeCopyButton.d.ts.map +1 -0
  120. package/lib/types/components/backoffice/detail/BackofficeDetailActionBar.d.ts +9 -0
  121. package/lib/types/components/backoffice/detail/BackofficeDetailActionBar.d.ts.map +1 -0
  122. package/lib/types/components/backoffice/detail/BackofficeDetailBlock.d.ts +7 -0
  123. package/lib/types/components/backoffice/detail/BackofficeDetailBlock.d.ts.map +1 -0
  124. package/lib/types/components/backoffice/detail/BackofficeDetailHeader.d.ts +12 -0
  125. package/lib/types/components/backoffice/detail/BackofficeDetailHeader.d.ts.map +1 -0
  126. package/lib/types/components/backoffice/detail/BackofficeDetailPage.d.ts +16 -0
  127. package/lib/types/components/backoffice/detail/BackofficeDetailPage.d.ts.map +1 -0
  128. package/lib/types/components/backoffice/detail/BackofficeDetailPage.stories.d.ts +11 -0
  129. package/lib/types/components/backoffice/detail/BackofficeDetailPage.stories.d.ts.map +1 -0
  130. package/lib/types/components/backoffice/detail/BackofficeDetailRelationLink.d.ts.map +1 -1
  131. package/lib/types/components/backoffice/detail/BackofficeDetailRelationListBlock.d.ts.map +1 -1
  132. package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts +6 -0
  133. package/lib/types/components/backoffice/detail/BackofficeDetailTable.d.ts.map +1 -0
  134. package/lib/types/components/backoffice/detail/BackofficeEmptyValue.d.ts +7 -0
  135. package/lib/types/components/backoffice/detail/BackofficeEmptyValue.d.ts.map +1 -0
  136. package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts +8 -0
  137. package/lib/types/components/backoffice/detail/BackofficeStatusGroup.d.ts.map +1 -0
  138. package/lib/types/components/backoffice/detail/BackofficeTechnicalFacts.d.ts +2 -0
  139. package/lib/types/components/backoffice/detail/BackofficeTechnicalFacts.d.ts.map +1 -0
  140. package/lib/types/components/backoffice/filters/EntityFilterValue.d.ts +5 -1
  141. package/lib/types/components/backoffice/filters/EntityFilterValue.d.ts.map +1 -1
  142. package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts +1 -0
  143. package/lib/types/components/backoffice/filters/EntityIdFilterField.d.ts.map +1 -1
  144. package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts +5 -2
  145. package/lib/types/components/backoffice/filters/entityIdFilterField.css.d.ts.map +1 -1
  146. package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.d.ts.map +1 -1
  147. package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.d.ts +1 -0
  148. package/lib/types/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.d.ts.map +1 -1
  149. package/lib/types/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.d.ts.map +1 -1
  150. package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts +10 -8
  151. package/lib/types/components/backoffice/layout/breadcrumb/buildBreadcrumbs.d.ts.map +1 -1
  152. package/lib/types/components/backoffice/layout/breadcrumb/types.d.ts +10 -5
  153. package/lib/types/components/backoffice/layout/breadcrumb/types.d.ts.map +1 -1
  154. package/lib/types/components/backoffice/layout/sidebarUtils.d.ts +6 -2
  155. package/lib/types/components/backoffice/layout/sidebarUtils.d.ts.map +1 -1
  156. package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts +18 -0
  157. package/lib/types/components/backoffice/links/BackofficeInlineLink.d.ts.map +1 -0
  158. package/lib/types/components/backoffice/links/BackofficeLink.d.ts +13 -0
  159. package/lib/types/components/backoffice/links/BackofficeLink.d.ts.map +1 -0
  160. package/lib/types/components/backoffice/links/BackofficeLinkContent.d.ts +10 -0
  161. package/lib/types/components/backoffice/links/BackofficeLinkContent.d.ts.map +1 -0
  162. package/lib/types/components/backoffice/links/BackofficeLinkLabel.d.ts +12 -0
  163. package/lib/types/components/backoffice/links/BackofficeLinkLabel.d.ts.map +1 -0
  164. package/lib/types/components/backoffice/links/backofficeLink.css.d.ts +4 -0
  165. package/lib/types/components/backoffice/links/backofficeLink.css.d.ts.map +1 -0
  166. package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts +15 -0
  167. package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts.map +1 -0
  168. package/lib/types/components/backoffice/links/resolveBackofficeTargetIcon.d.ts +8 -0
  169. package/lib/types/components/backoffice/links/resolveBackofficeTargetIcon.d.ts.map +1 -0
  170. package/lib/types/components/backoffice/links/types.d.ts +45 -0
  171. package/lib/types/components/backoffice/links/types.d.ts.map +1 -0
  172. package/lib/types/components/backoffice/links/useBackofficeLink.d.ts +7 -0
  173. package/lib/types/components/backoffice/links/useBackofficeLink.d.ts.map +1 -0
  174. package/lib/types/components/backoffice/pickers/EntityIdPickerDialog.d.ts.map +1 -1
  175. package/lib/types/components/backoffice/pickers/entityIdPickerDialog.css.d.ts +2 -0
  176. package/lib/types/components/backoffice/pickers/entityIdPickerDialog.css.d.ts.map +1 -1
  177. package/lib/types/components/backoffice/pickers/shared/EntityPickerList.d.ts.map +1 -1
  178. package/lib/types/components/backoffice/refs/BackofficeEntityLink.d.ts.map +1 -1
  179. package/lib/types/components/backoffice/refs/BackofficeRelatedCountLink.d.ts.map +1 -1
  180. package/lib/types/components/backoffice/scaffolds/BackofficeEntityListScaffold.d.ts.map +1 -1
  181. package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts +6 -3
  182. package/lib/types/components/backoffice/shared/BackofficeFilterableCell.d.ts.map +1 -1
  183. package/lib/types/i18n/resources.d.ts +16 -0
  184. package/lib/types/i18n/resources.d.ts.map +1 -1
  185. package/lib/types/index.d.ts +24 -1
  186. package/lib/types/index.d.ts.map +1 -1
  187. package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
  188. package/lib/types/pages/BackofficeEntityDetailPage.d.ts.map +1 -1
  189. package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts +49 -22
  190. package/lib/types/pages/BackofficeEntityDetailPage.view-helpers.d.ts.map +1 -1
  191. package/lib/types/pages/BackofficeEntityListPage.d.ts.map +1 -1
  192. package/lib/types/provider/types.d.ts +26 -22
  193. package/lib/types/provider/types.d.ts.map +1 -1
  194. package/lib/types/router/createBackofficeRoutes.d.ts +36 -1
  195. package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
  196. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"entityIdFilterField.css.js","names":[],"sources":["../../../../../src/components/backoffice/filters/entityIdFilterField.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { sprinkles, vars } from '@plumile/ui';\n\nexport const container = sprinkles({\n display: 'flex',\n alignItems: 'center',\n gap: 1,\n width: 72,\n maxWidth: 'full',\n});\n\nexport const pickerButton = style([\n sprinkles({\n appearance: 'none',\n display: 'grid',\n alignItems: 'center',\n gap: 0.5,\n flex: 1,\n minWidth: 0,\n textAlign: 'left',\n cursor: 'pointer',\n borderRadius: 'xl',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'border',\n backgroundColor: 'surface',\n color: 'text',\n paddingX: 3,\n paddingY: 1.5,\n transitionProperty: 'default',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n gridTemplateColumns: 'minmax(0, 1fr) auto',\n minHeight: '2.5rem',\n selectors: {\n '&:hover:not(:disabled)': {\n backgroundColor: vars.colors.surfaceMuted,\n borderColor: vars.colors.borderStrong,\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n '&:disabled': {\n cursor: 'not-allowed',\n opacity: 0.65,\n },\n },\n },\n]);\n\nexport const valueBox = sprinkles({\n flex: 1,\n minWidth: 0,\n display: 'flex',\n alignItems: 'center',\n overflow: 'hidden',\n});\n\nexport const labelText = style([\n sprinkles({\n display: 'block',\n color: 'textMuted',\n fontSize: 'xs',\n fontWeight: 'medium',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }),\n {\n gridColumn: '1 / -1',\n },\n]);\n\nexport const valueText = sprinkles({\n display: 'block',\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n fontSize: 'sm',\n fontWeight: 'semibold',\n});\n\nexport const placeholder = sprinkles({\n color: 'textMuted',\n fontSize: 'sm',\n});\n\nexport const pickText = sprinkles({\n color: 'accent',\n fontSize: 'xs',\n fontWeight: 'semibold',\n});\n\nexport const actions = sprinkles({\n display: 'flex',\n alignItems: 'center',\n gap: 1,\n});\n"],"mappings":""}
1
+ {"version":3,"file":"entityIdFilterField.css.js","names":[],"sources":["../../../../../src/components/backoffice/filters/entityIdFilterField.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { sprinkles, vars } from '@plumile/ui';\n\nexport const container = sprinkles({\n display: 'flex',\n alignItems: 'center',\n width: 72,\n maxWidth: 'full',\n minWidth: 0,\n});\n\nexport const pickerControl = style([\n sprinkles({\n display: 'grid',\n alignItems: 'center',\n flex: 1,\n minWidth: 0,\n borderRadius: 'xl',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'border',\n backgroundColor: 'surface',\n color: 'text',\n paddingX: 3,\n paddingY: 1.5,\n transitionProperty: 'default',\n transitionDuration: 150,\n transitionTimingFunction: 'ease',\n }),\n {\n gridTemplateColumns: 'minmax(0, 1fr) auto auto',\n gridTemplateAreas: '\"content pickAction clearAction\"',\n columnGap: vars.spacing[1],\n minHeight: '2.5rem',\n width: '100%',\n selectors: {\n '&:hover': {\n backgroundColor: vars.colors.surfaceMuted,\n },\n },\n },\n]);\n\nexport const pickerButton = style([\n sprinkles({\n appearance: 'none',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n minWidth: 0,\n width: 'full',\n textAlign: 'left',\n cursor: 'pointer',\n borderWidth: 0,\n backgroundColor: 'transparent',\n color: 'text',\n padding: 0,\n }),\n {\n gridArea: 'content',\n minHeight: '100%',\n selectors: {\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n '&:disabled': {\n cursor: 'not-allowed',\n opacity: 0.65,\n },\n },\n },\n]);\n\nexport const content = style([\n sprinkles({\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n gap: 0.5,\n minWidth: 0,\n width: 'full',\n }),\n {\n maxWidth: '100%',\n },\n]);\n\nexport const valueBox = sprinkles({\n flex: 1,\n minWidth: 0,\n display: 'flex',\n alignItems: 'center',\n overflow: 'hidden',\n});\n\nexport const labelText = style([\n sprinkles({\n display: 'block',\n color: 'textMuted',\n fontSize: 'xs',\n fontWeight: 'medium',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }),\n {\n minWidth: 0,\n },\n]);\n\nexport const valueText = sprinkles({\n display: 'block',\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n fontSize: 'sm',\n fontWeight: 'semibold',\n});\n\nexport const placeholder = sprinkles({\n display: 'block',\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n color: 'textMuted',\n fontSize: 'sm',\n});\n\nconst actionButtonBase = style([\n sprinkles({\n appearance: 'none',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 7,\n height: 7,\n padding: 0,\n borderRadius: 'lg',\n borderWidth: 'default',\n borderStyle: 'solid',\n borderColor: 'borderSubtle',\n backgroundColor: 'surface',\n color: 'textMuted',\n cursor: 'pointer',\n transitionProperty: 'colors',\n transitionDuration: 120,\n transitionTimingFunction: 'ease',\n }),\n {\n alignSelf: 'center',\n selectors: {\n '&:hover:not(:disabled)': {\n color: vars.colors.text,\n backgroundColor: vars.colors.surfaceMuted,\n borderColor: vars.colors.borderStrong,\n },\n '&:focus-visible': {\n outline: `2px solid ${vars.colors.primary}`,\n outlineOffset: '2px',\n },\n '&:disabled': {\n cursor: 'not-allowed',\n opacity: 0.65,\n },\n },\n },\n]);\n\nexport const pickActionButton = style([\n actionButtonBase,\n {\n gridArea: 'pickAction',\n },\n]);\n\nexport const clearButton = style([\n actionButtonBase,\n sprinkles({\n borderRadius: 'full',\n backgroundColor: 'surfaceMuted',\n }),\n {\n gridArea: 'clearAction',\n },\n]);\n\nexport const actionIcon = style({\n width: '1rem',\n height: '1rem',\n});\n"],"mappings":""}
@@ -1,69 +1,74 @@
1
1
  import { useBackofficeReactTranslation as e } from "../../../../i18n/useBackofficeReactTranslation.js";
2
2
  import { useBackofficeTopbarPortalContext as t } from "./BackofficeTopbarPortalContext.js";
3
- import { current as n, homeLabel as r, item as i, link as a, list as o, nav as s, separator as c } from "./backofficeTopbarBreadcrumb.css.js";
4
- import { SidebarHomeSvg as l } from "@plumile/ui";
5
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
6
- import { Link as p } from "@plumile/router";
3
+ import { BackofficeLink as n } from "../../links/BackofficeLink.js";
4
+ import { BackofficeLinkLabel as r } from "../../links/BackofficeLinkLabel.js";
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";
7
9
  //#region src/components/backoffice/layout/breadcrumb/BackofficeTopbarBreadcrumb.tsx
8
- var m = ({ items: m }) => {
9
- let { t: h } = e(), { dashboardHref: g, dashboardLabel: _ } = t(), v = !1, y = m[0];
10
- m.length === 1 && y != null && (v = y.id === "dashboard" && y.isCurrent === !0);
11
- let b = m;
12
- v && (b = []);
13
- let x = /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(l, {
10
+ var g = (e) => {
11
+ let { target: t } = e;
12
+ return t.kind === "dashboard" ? `${e.kind}-dashboard` : t.kind === "entity-list" ? `${e.kind}-entity-list-${t.entityId}` : t.kind === "entity-detail" ? `${e.kind}-entity-detail-${t.entityId}-${t.id}` : t.kind === "entity-detail-page" ? `${e.kind}-entity-detail-page-${t.entityId}-${t.id}-${t.pageId}` : t.kind === "tool" ? `${e.kind}-tool-${t.toolId}` : t.kind === "hub" ? `${e.kind}-hub-${t.hubId}` : `${e.kind}-href-${t.href}`;
13
+ }, _ = ({ items: _ }) => {
14
+ let { t: v } = e(), { dashboardHref: y, dashboardLabel: b } = t(), x = !1, [S] = _;
15
+ _.length === 1 && S != null && (x = S.target.kind === "dashboard" && S.kind === "current");
16
+ let C = _;
17
+ x && (C = []);
18
+ let w = /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, {
14
19
  width: 16,
15
20
  height: 16,
16
21
  "aria-hidden": "true"
17
- }), /* @__PURE__ */ d("span", {
18
- className: r,
19
- children: _
22
+ }), /* @__PURE__ */ p("span", {
23
+ className: a,
24
+ children: b
20
25
  })] });
21
- return /* @__PURE__ */ d("nav", {
22
- className: s,
23
- "aria-label": h("common.breadcrumb"),
24
- children: /* @__PURE__ */ f("ol", {
25
- className: o,
26
- children: [/* @__PURE__ */ f("li", {
27
- className: i,
28
- children: [v && /* @__PURE__ */ d("span", {
26
+ return /* @__PURE__ */ p("nav", {
27
+ className: l,
28
+ "aria-label": v("common.breadcrumb"),
29
+ children: /* @__PURE__ */ m("ol", {
30
+ className: c,
31
+ children: [/* @__PURE__ */ m("li", {
32
+ className: o,
33
+ children: [x && /* @__PURE__ */ p("span", {
29
34
  className: "_80s44h3 _80s44h1 txvbqb9jg txvbqbcp txvbqbdoy txvbqbty7 txvbqbc77 txvbqb1rg txvbqbva1 txvbqb77 txvbqb6x txvbqb7k txvbqbv45 txvbqbv9z",
30
35
  "aria-current": "page",
31
- title: _,
32
- children: x
33
- }), !v && /* @__PURE__ */ d(p, {
34
- to: g,
36
+ title: b,
37
+ children: w
38
+ }), !x && /* @__PURE__ */ p(h, {
39
+ to: y,
35
40
  className: "_80s44h2 _80s44h1 txvbqb9jg txvbqbcp txvbqbdoy txvbqbty7 txvbqbc77 txvbqb1rg txvbqbva1 txvbqb77 txvbqb6x txvbqb7k",
36
- "aria-label": _,
37
- title: _,
38
- children: x
41
+ "aria-label": b,
42
+ title: b,
43
+ children: w
39
44
  })]
40
- }), b.map((e) => {
41
- let t = e.isCurrent === !0, r = e.id, o = e.to != null && !t, s;
42
- if (o) s = /* @__PURE__ */ d(p, {
43
- to: e.to,
44
- className: a,
45
- children: e.label
46
- });
47
- else {
48
- let r = a;
49
- t && (r = n), s = /* @__PURE__ */ d("span", {
50
- className: r,
51
- children: e.label
52
- });
53
- }
54
- return /* @__PURE__ */ f("li", {
45
+ }), C.map((e, t) => {
46
+ let a = e.kind === "current", c = g(e), l = "none";
47
+ t === 0 && (l = "auto");
48
+ let d;
49
+ return d = a ? /* @__PURE__ */ p(r, {
50
+ target: e.target,
51
+ label: e.label,
55
52
  className: i,
56
- children: [/* @__PURE__ */ d("span", {
57
- className: c,
53
+ icon: l
54
+ }) : /* @__PURE__ */ p(n, {
55
+ target: e.target,
56
+ label: e.label,
57
+ className: s,
58
+ icon: l
59
+ }), /* @__PURE__ */ m("li", {
60
+ className: o,
61
+ children: [/* @__PURE__ */ p("span", {
62
+ className: u,
58
63
  "aria-hidden": "true",
59
64
  children: "/"
60
- }), s]
61
- }, r);
65
+ }), d]
66
+ }, c);
62
67
  })]
63
68
  })
64
69
  });
65
70
  };
66
71
  //#endregion
67
- export { m as BackofficeTopbarBreadcrumb, m as default };
72
+ export { _ as BackofficeTopbarBreadcrumb, _ as default };
68
73
 
69
74
  //# sourceMappingURL=BackofficeTopbarBreadcrumb.js.map
@@ -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 { 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\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[0];\n if (items.length === 1 && firstItem != null) {\n isDashboardCurrent =\n firstItem.id === 'dashboard' && firstItem.isCurrent === true;\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) => {\n const isCurrent = item.isCurrent === true;\n const key = item.id;\n const shouldRenderLink = item.to != null && !isCurrent;\n let content: JSX.Element;\n\n if (shouldRenderLink) {\n content = (\n <Link to={item.to} className={styles.link}>\n {item.label}\n </Link>\n );\n } else {\n let className = styles.link;\n if (isCurrent) {\n className = styles.current;\n }\n content = <span className={className}>{item.label}</span>;\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":";;;;;;;AAaA,IAAa,KAA8B,EACzC,eACkD;CAClD,IAAM,EAAE,SAAM,GAA+B,EACvC,EAAE,kBAAe,sBAAmB,GAAkC,EACxE,IAAqB,IACnB,IAAY,EAAM;CACxB,AAAI,EAAM,WAAW,KAAK,KAAa,SACrC,IACE,EAAU,OAAO,eAAe,EAAU,cAAc;CAE5D,IAAI,IAA0D;CAC9D,AAAI,MACF,IAAe,EAAE;CAGnB,IAAM,IACJ,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EAAgB,OAAO;EAAI,QAAQ;EAAI,eAAY;EAAS,CAAA,EAC5D,kBAAC,QAAD;EAAM,WAAW;YAAmB;EAAsB,CAAA,CACzD,EAAA,CAAA;CAGL,OACE,kBAAC,OAAD;EAAK,WAAW;EAAY,cAAY,EAAE,oBAAoB;YAC5D,kBAAC,MAAD;GAAI,WAAW;aAAf,CACE,kBAAC,MAAD;IAAI,WAAW;cAAf,CACG,KACC,kBAAC,QAAD;KACE,WAAW;KACX,gBAAa;KACb,OAAO;eAEN;KACI,CAAA,EAER,CAAC,KACA,kBAAC,GAAD;KACE,IAAI;KACJ,WAAW;KACX,cAAY;KACZ,OAAO;eAEN;KACI,CAAA,CAEN;OACJ,EAAa,KAAK,MAAS;IAC1B,IAAM,IAAY,EAAK,cAAc,IAC/B,IAAM,EAAK,IACX,IAAmB,EAAK,MAAM,QAAQ,CAAC,GACzC;IAEJ,IAAI,GACF,IACE,kBAAC,GAAD;KAAM,IAAI,EAAK;KAAI,WAAW;eAC3B,EAAK;KACD,CAAA;SAEJ;KACL,IAAI,IAAY;KAIhB,AAHI,MACF,IAAY,IAEd,IAAU,kBAAC,QAAD;MAAiB;gBAAY,EAAK;MAAa,CAAA;;IAG3D,OACE,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';\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,MAAiD;CAC7E,IAAM,EAAE,cAAW;CAmBnB,OAlBI,EAAO,SAAS,cACX,GAAG,EAAK,KAAK,cAElB,EAAO,SAAS,gBACX,GAAG,EAAK,KAAK,eAAe,EAAO,aAExC,EAAO,SAAS,kBACX,GAAG,EAAK,KAAK,iBAAiB,EAAO,SAAS,GAAG,EAAO,OAE7D,EAAO,SAAS,uBACX,GAAG,EAAK,KAAK,sBAAsB,EAAO,SAAS,GAAG,EAAO,GAAG,GAAG,EAAO,WAE/E,EAAO,SAAS,SACX,GAAG,EAAK,KAAK,QAAQ,EAAO,WAEjC,EAAO,SAAS,QACX,GAAG,EAAK,KAAK,OAAO,EAAO,UAE7B,GAAG,EAAK,KAAK,QAAQ,EAAO;GAGxB,KAA8B,EACzC,eACkD;CAClD,IAAM,EAAE,SAAM,GAA+B,EACvC,EAAE,kBAAe,sBAAmB,GAAkC,EACxE,IAAqB,IACnB,CAAC,KAAa;CACpB,AAAI,EAAM,WAAW,KAAK,KAAa,SACrC,IACE,EAAU,OAAO,SAAS,eAAe,EAAU,SAAS;CAEhE,IAAI,IAA0D;CAC9D,AAAI,MACF,IAAe,EAAE;CAGnB,IAAM,IACJ,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EAAgB,OAAO;EAAI,QAAQ;EAAI,eAAY;EAAS,CAAA,EAC5D,kBAAC,QAAD;EAAM,WAAW;YAAmB;EAAsB,CAAA,CACzD,EAAA,CAAA;CAGL,OACE,kBAAC,OAAD;EAAK,WAAW;EAAY,cAAY,EAAE,oBAAoB;YAC5D,kBAAC,MAAD;GAAI,WAAW;aAAf,CACE,kBAAC,MAAD;IAAI,WAAW;cAAf,CACG,KACC,kBAAC,QAAD;KACE,WAAW;KACX,gBAAa;KACb,OAAO;eAEN;KACI,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,11 +1,11 @@
1
1
  import { createContext as e, useContext as t } from "react";
2
2
  //#region src/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.tsx
3
- var n = e(null), r = n.Provider, i = () => {
3
+ var n = e(null), r = n.Provider, i = () => t(n), a = () => {
4
4
  let e = t(n);
5
5
  if (e == null) throw Error("BackofficeTopbarPortalContext is missing. Ensure pages are rendered under BackofficeLayoutPage.");
6
6
  return e;
7
7
  };
8
8
  //#endregion
9
- export { r as BackofficeTopbarPortalContextProvider, i as useBackofficeTopbarPortalContext };
9
+ export { r as BackofficeTopbarPortalContextProvider, a as useBackofficeTopbarPortalContext, i as useOptionalBackofficeTopbarPortalContext };
10
10
 
11
11
  //# sourceMappingURL=BackofficeTopbarPortalContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackofficeTopbarPortalContext.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type BackofficeTopbarPortalContextValue = {\n target: HTMLDivElement | null;\n dashboardHref: string;\n dashboardLabel: string;\n};\n\nconst BackofficeTopbarPortalContext =\n createContext<BackofficeTopbarPortalContextValue | null>(null);\n\nexport const BackofficeTopbarPortalContextProvider =\n BackofficeTopbarPortalContext.Provider;\n\nexport const useBackofficeTopbarPortalContext =\n (): BackofficeTopbarPortalContextValue => {\n const context = useContext(BackofficeTopbarPortalContext);\n if (context == null) {\n throw new Error(\n 'BackofficeTopbarPortalContext is missing. Ensure pages are rendered under BackofficeLayoutPage.',\n );\n }\n return context;\n };\n"],"mappings":";;AAQA,IAAM,IACJ,EAAyD,KAAK,EAEnD,IACX,EAA8B,UAEnB,UAC+B;CACxC,IAAM,IAAU,EAAW,EAA8B;CACzD,IAAI,KAAW,MACb,MAAU,MACR,kGACD;CAEH,OAAO"}
1
+ {"version":3,"file":"BackofficeTopbarPortalContext.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/BackofficeTopbarPortalContext.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type BackofficeTopbarPortalContextValue = {\n target: HTMLDivElement | null;\n dashboardHref: string;\n dashboardLabel: string;\n};\n\nconst BackofficeTopbarPortalContext =\n createContext<BackofficeTopbarPortalContextValue | null>(null);\n\nexport const BackofficeTopbarPortalContextProvider =\n BackofficeTopbarPortalContext.Provider;\n\nexport const useOptionalBackofficeTopbarPortalContext =\n (): BackofficeTopbarPortalContextValue | null => {\n return useContext(BackofficeTopbarPortalContext);\n };\n\nexport const useBackofficeTopbarPortalContext =\n (): BackofficeTopbarPortalContextValue => {\n const context = useContext(BackofficeTopbarPortalContext);\n if (context == null) {\n throw new Error(\n 'BackofficeTopbarPortalContext is missing. Ensure pages are rendered under BackofficeLayoutPage.',\n );\n }\n return context;\n };\n"],"mappings":";;AAQA,IAAM,IACJ,EAAyD,KAAK,EAEnD,IACX,EAA8B,UAEnB,UAEF,EAAW,EAA8B,EAGvC,UAC+B;CACxC,IAAM,IAAU,EAAW,EAA8B;CACzD,IAAI,KAAW,MACb,MAAU,MACR,kGACD;CAEH,OAAO"}
@@ -1,16 +1,20 @@
1
1
  //#region src/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.ts
2
- var e = (e, t) => Error(t == null ? `Invalid breadcrumb contract: ${e}` : `Invalid breadcrumb contract: ${e} (${t})`), t = (t) => {
3
- if (t == null) throw e("MISSING_BREADCRUMB");
4
- if (t.length === 0) throw e("EMPTY_BREADCRUMB");
5
- let n = /* @__PURE__ */ new Set();
6
- if (t.forEach((t, r) => {
7
- if (typeof t.id != "string" || t.id.trim() === "") throw e("INVALID_SEGMENT_ID", `index=${r}`);
8
- if (n.has(t.id)) throw e("INVALID_SEGMENT_ID", `duplicate id="${t.id}"`);
9
- n.add(t.id);
10
- }), t[t.length - 1]?.isCurrent !== !0) throw e("MISSING_CURRENT_SEGMENT");
11
- return t;
2
+ var e = (e, t) => Error(t == null ? `Invalid breadcrumb contract: ${e}` : `Invalid breadcrumb contract: ${e} (${t})`), t = (e) => {
3
+ let { target: t } = e;
4
+ return t == null ? "" : t.kind === "dashboard" ? "dashboard" : t.kind === "entity-list" ? `${t.entityId}-list` : t.kind === "entity-detail" ? `${t.entityId}-entity-${t.id}` : t.kind === "entity-detail-page" ? `${t.entityId}-page-${t.id}-${t.pageId}` : t.kind === "tool" ? `tool-${t.toolId}` : t.kind === "hub" ? `hub-${t.hubId}` : `href-${t.href}`;
5
+ }, n = (n) => {
6
+ if (n == null) throw e("MISSING_BREADCRUMB");
7
+ if (n.length === 0) throw e("EMPTY_BREADCRUMB");
8
+ let r = /* @__PURE__ */ new Set();
9
+ if (n.forEach((n, i) => {
10
+ let a = t(n);
11
+ if (a.trim() === "") throw e("INVALID_SEGMENT_ID", `index=${i}`);
12
+ if (r.has(a)) throw e("INVALID_SEGMENT_ID", `duplicate id="${a}"`);
13
+ r.add(a);
14
+ }), n[n.length - 1]?.kind !== "current") throw e("MISSING_CURRENT_SEGMENT");
15
+ return n;
12
16
  };
13
17
  //#endregion
14
- export { t as assertValidBreadcrumb };
18
+ export { n as assertValidBreadcrumb };
15
19
 
16
20
  //# sourceMappingURL=assertValidBreadcrumb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertValidBreadcrumb.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.ts"],"sourcesContent":["import type {\n BackofficeTopbarBreadcrumbItem,\n BreadcrumbContractErrorCode,\n} from './types.js';\n\nconst formatContractError = (\n code: BreadcrumbContractErrorCode,\n details?: string,\n): Error => {\n if (details == null) {\n return new Error(`Invalid breadcrumb contract: ${code}`);\n }\n return new Error(`Invalid breadcrumb contract: ${code} (${details})`);\n};\n\nexport const assertValidBreadcrumb = (\n items: readonly BackofficeTopbarBreadcrumbItem[] | null | undefined,\n): readonly BackofficeTopbarBreadcrumbItem[] => {\n if (items == null) {\n throw formatContractError('MISSING_BREADCRUMB');\n }\n if (items.length === 0) {\n throw formatContractError('EMPTY_BREADCRUMB');\n }\n\n const seen = new Set<string>();\n items.forEach((item, index) => {\n if (typeof item.id !== 'string' || item.id.trim() === '') {\n throw formatContractError('INVALID_SEGMENT_ID', `index=${index}`);\n }\n\n if (seen.has(item.id)) {\n throw formatContractError(\n 'INVALID_SEGMENT_ID',\n `duplicate id=\"${item.id}\"`,\n );\n }\n seen.add(item.id);\n });\n\n const last = items[items.length - 1];\n if (last?.isCurrent !== true) {\n throw formatContractError('MISSING_CURRENT_SEGMENT');\n }\n\n return items;\n};\n"],"mappings":";AAKA,IAAM,KACJ,GACA,MAGa,MADT,KAAW,OACI,gCAAgC,MAElC,gCAAgC,EAAK,IAAI,EAAQ,GAFR,EAK/C,KACX,MAC8C;CAC9C,IAAI,KAAS,MACX,MAAM,EAAoB,qBAAqB;CAEjD,IAAI,EAAM,WAAW,GACnB,MAAM,EAAoB,mBAAmB;CAG/C,IAAM,oBAAO,IAAI,KAAa;CAgB9B,IAfA,EAAM,SAAS,GAAM,MAAU;EAC7B,IAAI,OAAO,EAAK,MAAO,YAAY,EAAK,GAAG,MAAM,KAAK,IACpD,MAAM,EAAoB,sBAAsB,SAAS,IAAQ;EAGnE,IAAI,EAAK,IAAI,EAAK,GAAG,EACnB,MAAM,EACJ,sBACA,iBAAiB,EAAK,GAAG,GAC1B;EAEH,EAAK,IAAI,EAAK,GAAG;GACjB,EAEW,EAAM,EAAM,SAAS,IACxB,cAAc,IACtB,MAAM,EAAoB,0BAA0B;CAGtD,OAAO"}
1
+ {"version":3,"file":"assertValidBreadcrumb.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/assertValidBreadcrumb.ts"],"sourcesContent":["import type {\n BackofficeTopbarBreadcrumbItem,\n BreadcrumbContractErrorCode,\n} from './types.js';\n\nconst formatContractError = (\n code: BreadcrumbContractErrorCode,\n details?: string,\n): Error => {\n if (details == null) {\n return new Error(`Invalid breadcrumb contract: ${code}`);\n }\n return new Error(`Invalid breadcrumb contract: ${code} (${details})`);\n};\n\nconst getBreadcrumbItemId = (item: BackofficeTopbarBreadcrumbItem): string => {\n const { target } = item as {\n readonly target?: BackofficeTopbarBreadcrumbItem['target'];\n };\n if (target == null) {\n return '';\n }\n if (target.kind === 'dashboard') {\n return 'dashboard';\n }\n if (target.kind === 'entity-list') {\n return `${target.entityId}-list`;\n }\n if (target.kind === 'entity-detail') {\n return `${target.entityId}-entity-${target.id}`;\n }\n if (target.kind === 'entity-detail-page') {\n return `${target.entityId}-page-${target.id}-${target.pageId}`;\n }\n if (target.kind === 'tool') {\n return `tool-${target.toolId}`;\n }\n if (target.kind === 'hub') {\n return `hub-${target.hubId}`;\n }\n return `href-${target.href}`;\n};\n\nexport const assertValidBreadcrumb = (\n items: readonly BackofficeTopbarBreadcrumbItem[] | null | undefined,\n): readonly BackofficeTopbarBreadcrumbItem[] => {\n if (items == null) {\n throw formatContractError('MISSING_BREADCRUMB');\n }\n if (items.length === 0) {\n throw formatContractError('EMPTY_BREADCRUMB');\n }\n\n const seen = new Set<string>();\n items.forEach((item, index) => {\n const id = getBreadcrumbItemId(item);\n if (id.trim() === '') {\n throw formatContractError('INVALID_SEGMENT_ID', `index=${index}`);\n }\n\n if (seen.has(id)) {\n throw formatContractError('INVALID_SEGMENT_ID', `duplicate id=\"${id}\"`);\n }\n seen.add(id);\n });\n\n const last = items[items.length - 1];\n if (last?.kind !== 'current') {\n throw formatContractError('MISSING_CURRENT_SEGMENT');\n }\n\n return items;\n};\n"],"mappings":";AAKA,IAAM,KACJ,GACA,MAGa,MADT,KAAW,OACI,gCAAgC,MAElC,gCAAgC,EAAK,IAAI,EAAQ,GAFR,EAKtD,KAAuB,MAAiD;CAC5E,IAAM,EAAE,cAAW;CAwBnB,OArBI,KAAU,OACL,KAEL,EAAO,SAAS,cACX,cAEL,EAAO,SAAS,gBACX,GAAG,EAAO,SAAS,SAExB,EAAO,SAAS,kBACX,GAAG,EAAO,SAAS,UAAU,EAAO,OAEzC,EAAO,SAAS,uBACX,GAAG,EAAO,SAAS,QAAQ,EAAO,GAAG,GAAG,EAAO,WAEpD,EAAO,SAAS,SACX,QAAQ,EAAO,WAEpB,EAAO,SAAS,QACX,OAAO,EAAO,UAEhB,QAAQ,EAAO;GAGX,KACX,MAC8C;CAC9C,IAAI,KAAS,MACX,MAAM,EAAoB,qBAAqB;CAEjD,IAAI,EAAM,WAAW,GACnB,MAAM,EAAoB,mBAAmB;CAG/C,IAAM,oBAAO,IAAI,KAAa;CAc9B,IAbA,EAAM,SAAS,GAAM,MAAU;EAC7B,IAAM,IAAK,EAAoB,EAAK;EACpC,IAAI,EAAG,MAAM,KAAK,IAChB,MAAM,EAAoB,sBAAsB,SAAS,IAAQ;EAGnE,IAAI,EAAK,IAAI,EAAG,EACd,MAAM,EAAoB,sBAAsB,iBAAiB,EAAG,GAAG;EAEzE,EAAK,IAAI,EAAG;GACZ,EAEW,EAAM,EAAM,SAAS,IACxB,SAAS,WACjB,MAAM,EAAoB,0BAA0B;CAGtD,OAAO"}
@@ -7,17 +7,23 @@ var e = (e, t) => e(t), t = (t) => {
7
7
  let i = t.layoutView.id;
8
8
  return typeof i == "string" && i.trim() !== "" ? i : "";
9
9
  }, n = (e) => [{
10
- id: "dashboard",
11
- label: e("dashboard.title"),
12
- isCurrent: !0
10
+ kind: "current",
11
+ target: { kind: "dashboard" },
12
+ label: e("sidebar.items.dashboard")
13
13
  }], r = (e) => [{
14
- id: `hub-${e.id}`,
15
- label: e.title,
16
- isCurrent: !0
14
+ kind: "current",
15
+ target: {
16
+ kind: "hub",
17
+ hubId: e.id
18
+ },
19
+ label: e.title
17
20
  }], i = (t, n) => [{
18
- id: `${t.id}-list`,
19
- label: e(t.label, n),
20
- isCurrent: !0
21
+ kind: "current",
22
+ target: {
23
+ kind: "entity-list",
24
+ entityId: t.id
25
+ },
26
+ label: e(t.label, n)
21
27
  }], a = (n) => {
22
28
  let r = e(n.config.label, n.tApp), i = t({
23
29
  layoutView: n.layoutView,
@@ -26,26 +32,47 @@ var e = (e, t) => e(t), t = (t) => {
26
32
  });
27
33
  return [
28
34
  {
29
- id: `${n.config.id}-list`,
30
- label: r,
31
- to: n.config.routes.list
35
+ kind: "link",
36
+ target: {
37
+ kind: "entity-list",
38
+ entityId: n.config.id
39
+ },
40
+ label: r
32
41
  },
33
42
  {
34
- id: `${n.config.id}-entity-${n.entityId}`,
35
- label: i,
36
- to: n.config.routes.detail(n.entityId)
43
+ kind: "link",
44
+ target: {
45
+ kind: "entity-detail",
46
+ entityId: n.config.id,
47
+ id: n.entityId
48
+ },
49
+ label: i
37
50
  },
38
51
  {
39
- id: `${n.config.id}-page-${n.pageLabel}`,
40
- label: n.pageLabel,
41
- isCurrent: !0
52
+ kind: "current",
53
+ target: {
54
+ kind: "entity-detail-page",
55
+ entityId: n.config.id,
56
+ id: n.entityId,
57
+ pageId: n.pageId ?? n.pageLabel
58
+ },
59
+ label: n.pageLabel
42
60
  }
43
61
  ];
44
- }, o = (e) => [{
45
- id: `tool-${e.title}`,
46
- label: e.title,
47
- isCurrent: !0
48
- }];
62
+ }, o = (e) => {
63
+ let t = {
64
+ kind: "href",
65
+ href: `/tools/${e.title}`
66
+ };
67
+ return e.id != null && (t = {
68
+ kind: "tool",
69
+ toolId: e.id
70
+ }), [{
71
+ kind: "current",
72
+ target: t,
73
+ label: e.title
74
+ }];
75
+ };
49
76
  //#endregion
50
77
  export { n as buildDashboardBreadcrumb, a as buildEntityDetailBreadcrumb, i as buildEntityListBreadcrumb, r as buildHubBreadcrumb, o as buildToolBreadcrumb, t as resolveEntityTitleFromDetailHeader };
51
78
 
@@ -1 +1 @@
1
- {"version":3,"file":"buildBreadcrumbs.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/buildBreadcrumbs.ts"],"sourcesContent":["import type { TFunction } from 'i18next';\n\nimport type {\n BackofficeResolvedDetailLayoutFacetConfig,\n BackofficeResolvedDetailPageFacetConfig,\n BackofficeRuntimeResolvedListFacetConfig,\n I18nLabel,\n} from '@plumile/backoffice-core/types.js';\n\nimport type { BackofficeTopbarBreadcrumbItem } from './types.js';\n\nconst resolveLabel = (label: I18nLabel, tApp: TFunction): string => {\n return label(tApp);\n};\n\nexport const resolveEntityTitleFromDetailHeader = <\n LayoutView extends object,\n>(input: {\n layoutView: LayoutView;\n detailHeader: BackofficeResolvedDetailLayoutFacetConfig['header'];\n tApp: TFunction;\n}): string => {\n const titleValue = input.detailHeader.titleValue?.(\n input.layoutView,\n input.tApp,\n );\n if (typeof titleValue === 'string' && titleValue.trim() !== '') {\n return titleValue;\n }\n\n const title = resolveLabel(input.detailHeader.title, input.tApp);\n if (title.trim() !== '') {\n return title;\n }\n\n const maybeId = (input.layoutView as { id?: unknown }).id;\n if (typeof maybeId === 'string' && maybeId.trim() !== '') {\n return maybeId;\n }\n\n return '';\n};\n\nexport const buildDashboardBreadcrumb = (\n t: TFunction,\n): readonly BackofficeTopbarBreadcrumbItem[] => {\n return [\n {\n id: 'dashboard',\n label: t('dashboard.title'),\n isCurrent: true,\n },\n ];\n};\n\nexport const buildHubBreadcrumb = (input: {\n id: string;\n title: string;\n}): readonly BackofficeTopbarBreadcrumbItem[] => {\n return [\n {\n id: `hub-${input.id}`,\n label: input.title,\n isCurrent: true,\n },\n ];\n};\n\nexport const buildEntityListBreadcrumb = (\n config: BackofficeRuntimeResolvedListFacetConfig,\n tApp: TFunction,\n): readonly BackofficeTopbarBreadcrumbItem[] => {\n return [\n {\n id: `${config.id}-list`,\n label: resolveLabel(config.label, tApp),\n isCurrent: true,\n },\n ];\n};\n\nexport const buildEntityDetailBreadcrumb = (input: {\n config:\n | BackofficeResolvedDetailLayoutFacetConfig\n | BackofficeResolvedDetailPageFacetConfig;\n tApp: TFunction;\n entityId: string;\n layoutView: unknown;\n pageLabel: string;\n}): readonly BackofficeTopbarBreadcrumbItem[] => {\n const listLabel = resolveLabel(input.config.label, input.tApp);\n const entityTitle = resolveEntityTitleFromDetailHeader({\n layoutView: input.layoutView as object,\n detailHeader: input.config.header,\n tApp: input.tApp,\n });\n\n return [\n {\n id: `${input.config.id}-list`,\n label: listLabel,\n to: input.config.routes.list,\n },\n {\n id: `${input.config.id}-entity-${input.entityId}`,\n label: entityTitle,\n to: input.config.routes.detail(input.entityId),\n },\n {\n id: `${input.config.id}-page-${input.pageLabel}`,\n label: input.pageLabel,\n isCurrent: true,\n },\n ];\n};\n\nexport const buildToolBreadcrumb = (input: {\n title: string;\n}): readonly BackofficeTopbarBreadcrumbItem[] => {\n return [\n {\n id: `tool-${input.title}`,\n label: input.title,\n isCurrent: true,\n },\n ];\n};\n"],"mappings":";AAWA,IAAM,KAAgB,GAAkB,MAC/B,EAAM,EAAK,EAGP,KAEX,MAIY;CACZ,IAAM,IAAa,EAAM,aAAa,aACpC,EAAM,YACN,EAAM,KACP;CACD,IAAI,OAAO,KAAe,YAAY,EAAW,MAAM,KAAK,IAC1D,OAAO;CAGT,IAAM,IAAQ,EAAa,EAAM,aAAa,OAAO,EAAM,KAAK;CAChE,IAAI,EAAM,MAAM,KAAK,IACnB,OAAO;CAGT,IAAM,IAAW,EAAM,WAAgC;CAKvD,OAJI,OAAO,KAAY,YAAY,EAAQ,MAAM,KAAK,KAC7C,IAGF;GAGI,KACX,MAEO,CACL;CACE,IAAI;CACJ,OAAO,EAAE,kBAAkB;CAC3B,WAAW;CACZ,CACF,EAGU,KAAsB,MAI1B,CACL;CACE,IAAI,OAAO,EAAM;CACjB,OAAO,EAAM;CACb,WAAW;CACZ,CACF,EAGU,KACX,GACA,MAEO,CACL;CACE,IAAI,GAAG,EAAO,GAAG;CACjB,OAAO,EAAa,EAAO,OAAO,EAAK;CACvC,WAAW;CACZ,CACF,EAGU,KAA+B,MAQK;CAC/C,IAAM,IAAY,EAAa,EAAM,OAAO,OAAO,EAAM,KAAK,EACxD,IAAc,EAAmC;EACrD,YAAY,EAAM;EAClB,cAAc,EAAM,OAAO;EAC3B,MAAM,EAAM;EACb,CAAC;CAEF,OAAO;EACL;GACE,IAAI,GAAG,EAAM,OAAO,GAAG;GACvB,OAAO;GACP,IAAI,EAAM,OAAO,OAAO;GACzB;EACD;GACE,IAAI,GAAG,EAAM,OAAO,GAAG,UAAU,EAAM;GACvC,OAAO;GACP,IAAI,EAAM,OAAO,OAAO,OAAO,EAAM,SAAS;GAC/C;EACD;GACE,IAAI,GAAG,EAAM,OAAO,GAAG,QAAQ,EAAM;GACrC,OAAO,EAAM;GACb,WAAW;GACZ;EACF;GAGU,KAAuB,MAG3B,CACL;CACE,IAAI,QAAQ,EAAM;CAClB,OAAO,EAAM;CACb,WAAW;CACZ,CACF"}
1
+ {"version":3,"file":"buildBreadcrumbs.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/buildBreadcrumbs.ts"],"sourcesContent":["import type { TFunction } from 'i18next';\n\nimport type {\n BackofficeEntityManifestMap,\n BackofficeManifestDetailEntityId,\n BackofficeManifestListEntityId,\n BackofficeManifestToolId,\n BackofficeResolvedDetailLayoutFacetConfig,\n BackofficeResolvedDetailPageFacetConfig,\n BackofficeRuntimeResolvedListFacetConfig,\n I18nLabel,\n} from '@plumile/backoffice-core/types.js';\n\nimport type { BackofficeTopbarBreadcrumbItem } from './types.js';\n\nconst resolveLabel = (label: I18nLabel, tApp: TFunction): string => {\n return label(tApp);\n};\n\nexport const resolveEntityTitleFromDetailHeader = <\n LayoutView extends object,\n>(input: {\n layoutView: LayoutView;\n detailHeader: BackofficeResolvedDetailLayoutFacetConfig['header'];\n tApp: TFunction;\n}): string => {\n const titleValue = input.detailHeader.titleValue?.(\n input.layoutView,\n input.tApp,\n );\n if (typeof titleValue === 'string' && titleValue.trim() !== '') {\n return titleValue;\n }\n\n const title = resolveLabel(input.detailHeader.title, input.tApp);\n if (title.trim() !== '') {\n return title;\n }\n\n const maybeId = (input.layoutView as { id?: unknown }).id;\n if (typeof maybeId === 'string' && maybeId.trim() !== '') {\n return maybeId;\n }\n\n return '';\n};\n\nexport const buildDashboardBreadcrumb = (\n t: TFunction,\n): readonly BackofficeTopbarBreadcrumbItem[] => {\n return [\n {\n kind: 'current',\n target: { kind: 'dashboard' },\n label: t('sidebar.items.dashboard'),\n },\n ];\n};\n\nexport const buildHubBreadcrumb = <\n TManifest extends BackofficeEntityManifestMap = BackofficeEntityManifestMap,\n>(input: {\n id: string;\n title: string;\n}): readonly BackofficeTopbarBreadcrumbItem<TManifest>[] => {\n return [\n {\n kind: 'current',\n target: { kind: 'hub', hubId: input.id },\n label: input.title,\n },\n ];\n};\n\nexport const buildEntityListBreadcrumb = <\n TManifest extends BackofficeEntityManifestMap = BackofficeEntityManifestMap,\n>(\n config: BackofficeRuntimeResolvedListFacetConfig,\n tApp: TFunction,\n): readonly BackofficeTopbarBreadcrumbItem<TManifest>[] => {\n return [\n {\n kind: 'current',\n target: {\n kind: 'entity-list',\n entityId: config.id as BackofficeManifestListEntityId<TManifest>,\n },\n label: resolveLabel(config.label, tApp),\n },\n ];\n};\n\nexport const buildEntityDetailBreadcrumb = <\n TManifest extends BackofficeEntityManifestMap = BackofficeEntityManifestMap,\n>(input: {\n config:\n | BackofficeResolvedDetailLayoutFacetConfig\n | BackofficeResolvedDetailPageFacetConfig;\n tApp: TFunction;\n entityId: string;\n layoutView: unknown;\n pageLabel: string;\n pageId?: string;\n}): readonly BackofficeTopbarBreadcrumbItem<TManifest>[] => {\n const listLabel = resolveLabel(input.config.label, input.tApp);\n const entityTitle = resolveEntityTitleFromDetailHeader({\n layoutView: input.layoutView as object,\n detailHeader: input.config.header,\n tApp: input.tApp,\n });\n\n return [\n {\n kind: 'link',\n target: {\n kind: 'entity-list',\n entityId: input.config.id as BackofficeManifestListEntityId<TManifest>,\n },\n label: listLabel,\n },\n {\n kind: 'link',\n target: {\n kind: 'entity-detail',\n entityId: input.config\n .id as BackofficeManifestDetailEntityId<TManifest>,\n id: input.entityId,\n },\n label: entityTitle,\n },\n {\n kind: 'current',\n target: {\n kind: 'entity-detail-page',\n entityId: input.config\n .id as BackofficeManifestDetailEntityId<TManifest>,\n id: input.entityId,\n pageId: input.pageId ?? input.pageLabel,\n } as never,\n label: input.pageLabel,\n },\n ];\n};\n\nexport const buildToolBreadcrumb = <\n TManifest extends BackofficeEntityManifestMap = BackofficeEntityManifestMap,\n>(input: {\n id?: BackofficeManifestToolId<TManifest> | string;\n title: string;\n}): readonly BackofficeTopbarBreadcrumbItem<TManifest>[] => {\n let target: BackofficeTopbarBreadcrumbItem<TManifest>['target'] = {\n kind: 'href',\n href: `/tools/${input.title}`,\n };\n if (input.id != null) {\n target = {\n kind: 'tool',\n toolId: input.id as BackofficeManifestToolId<TManifest>,\n };\n }\n return [\n {\n kind: 'current',\n target,\n label: input.title,\n },\n ];\n};\n"],"mappings":";AAeA,IAAM,KAAgB,GAAkB,MAC/B,EAAM,EAAK,EAGP,KAEX,MAIY;CACZ,IAAM,IAAa,EAAM,aAAa,aACpC,EAAM,YACN,EAAM,KACP;CACD,IAAI,OAAO,KAAe,YAAY,EAAW,MAAM,KAAK,IAC1D,OAAO;CAGT,IAAM,IAAQ,EAAa,EAAM,aAAa,OAAO,EAAM,KAAK;CAChE,IAAI,EAAM,MAAM,KAAK,IACnB,OAAO;CAGT,IAAM,IAAW,EAAM,WAAgC;CAKvD,OAJI,OAAO,KAAY,YAAY,EAAQ,MAAM,KAAK,KAC7C,IAGF;GAGI,KACX,MAEO,CACL;CACE,MAAM;CACN,QAAQ,EAAE,MAAM,aAAa;CAC7B,OAAO,EAAE,0BAA0B;CACpC,CACF,EAGU,KAEX,MAIO,CACL;CACE,MAAM;CACN,QAAQ;EAAE,MAAM;EAAO,OAAO,EAAM;EAAI;CACxC,OAAO,EAAM;CACd,CACF,EAGU,KAGX,GACA,MAEO,CACL;CACE,MAAM;CACN,QAAQ;EACN,MAAM;EACN,UAAU,EAAO;EAClB;CACD,OAAO,EAAa,EAAO,OAAO,EAAK;CACxC,CACF,EAGU,KAEX,MAS0D;CAC1D,IAAM,IAAY,EAAa,EAAM,OAAO,OAAO,EAAM,KAAK,EACxD,IAAc,EAAmC;EACrD,YAAY,EAAM;EAClB,cAAc,EAAM,OAAO;EAC3B,MAAM,EAAM;EACb,CAAC;CAEF,OAAO;EACL;GACE,MAAM;GACN,QAAQ;IACN,MAAM;IACN,UAAU,EAAM,OAAO;IACxB;GACD,OAAO;GACR;EACD;GACE,MAAM;GACN,QAAQ;IACN,MAAM;IACN,UAAU,EAAM,OACb;IACH,IAAI,EAAM;IACX;GACD,OAAO;GACR;EACD;GACE,MAAM;GACN,QAAQ;IACN,MAAM;IACN,UAAU,EAAM,OACb;IACH,IAAI,EAAM;IACV,QAAQ,EAAM,UAAU,EAAM;IAC/B;GACD,OAAO,EAAM;GACd;EACF;GAGU,KAEX,MAG0D;CAC1D,IAAI,IAA8D;EAChE,MAAM;EACN,MAAM,UAAU,EAAM;EACvB;CAOD,OANI,EAAM,MAAM,SACd,IAAS;EACP,MAAM;EACN,QAAQ,EAAM;EACf,GAEI,CACL;EACE,MAAM;EACN;EACA,OAAO,EAAM;EACd,CACF"}