@wildo-ai/saas-frontend-lib 1.1.16 → 1.1.18

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 (685) hide show
  1. package/LICENSE +114 -26
  2. package/LICENSE.enterprise +129 -0
  3. package/dist/esm/companion-exports.d.ts +5 -2
  4. package/dist/esm/companion-exports.d.ts.map +1 -1
  5. package/dist/esm/companion-exports.js +4 -2
  6. package/dist/esm/companion-exports.js.map +1 -1
  7. package/dist/esm/components/actions/action-bar.d.ts +16 -1
  8. package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
  9. package/dist/esm/components/actions/action-bar.js.map +1 -1
  10. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
  11. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +6 -14
  12. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
  13. package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts.map +1 -1
  14. package/dist/esm/components/app/AppLayout_DecisionInbox.js +2 -4
  15. package/dist/esm/components/app/AppLayout_DecisionInbox.js.map +1 -1
  16. package/dist/esm/components/app/AppLayout_Home.d.ts.map +1 -1
  17. package/dist/esm/components/app/AppLayout_Home.js +14 -7
  18. package/dist/esm/components/app/AppLayout_Home.js.map +1 -1
  19. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts +13 -0
  20. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts.map +1 -0
  21. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js +16 -0
  22. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js.map +1 -0
  23. package/dist/esm/components/app/DecisionInboxSection.d.ts +10 -0
  24. package/dist/esm/components/app/DecisionInboxSection.d.ts.map +1 -0
  25. package/dist/esm/components/app/DecisionInboxSection.js +15 -0
  26. package/dist/esm/components/app/DecisionInboxSection.js.map +1 -0
  27. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts +13 -0
  28. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts.map +1 -0
  29. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js +28 -0
  30. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js.map +1 -0
  31. package/dist/esm/components/app/IdentityPortalPage_Home.d.ts +10 -0
  32. package/dist/esm/components/app/IdentityPortalPage_Home.d.ts.map +1 -0
  33. package/dist/esm/components/app/IdentityPortalPage_Home.js +40 -0
  34. package/dist/esm/components/app/IdentityPortalPage_Home.js.map +1 -0
  35. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts +16 -0
  36. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts.map +1 -0
  37. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js +41 -0
  38. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js.map +1 -0
  39. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts +15 -0
  40. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts.map +1 -0
  41. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js +268 -0
  42. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js.map +1 -0
  43. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts +3 -0
  44. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts.map +1 -0
  45. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js +35 -0
  46. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js.map +1 -0
  47. package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
  48. package/dist/esm/components/auth/Auth_Main.js +5 -0
  49. package/dist/esm/components/auth/Auth_Main.js.map +1 -1
  50. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts +19 -0
  51. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts.map +1 -0
  52. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js +156 -0
  53. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js.map +1 -0
  54. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts +3 -0
  55. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts.map +1 -0
  56. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js +107 -0
  57. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js.map +1 -0
  58. package/dist/esm/components/auth/StepUpAuthDialog.d.ts +31 -10
  59. package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
  60. package/dist/esm/components/auth/StepUpAuthDialog.js +81 -17
  61. package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
  62. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
  63. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +19 -0
  64. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
  65. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts +11 -0
  66. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts.map +1 -0
  67. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js +25 -0
  68. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js.map +1 -0
  69. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts +11 -0
  70. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts.map +1 -0
  71. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js +25 -0
  72. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js.map +1 -0
  73. package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
  74. package/dist/esm/components/billing/billing-pricing-table.js +40 -7
  75. package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
  76. package/dist/esm/components/billing/billing-subscription-status.d.ts.map +1 -1
  77. package/dist/esm/components/billing/billing-subscription-status.js +9 -1
  78. package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
  79. package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
  80. package/dist/esm/components/billing/billing-usage-dashboard.js +3 -2
  81. package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
  82. package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -1
  83. package/dist/esm/components/compliance/EmbeddedSigningFrame.js +17 -6
  84. package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -1
  85. package/dist/esm/components/data-display/AutomaticDisplayer.d.ts.map +1 -1
  86. package/dist/esm/components/data-display/AutomaticDisplayer.js +7 -2
  87. package/dist/esm/components/data-display/AutomaticDisplayer.js.map +1 -1
  88. package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
  89. package/dist/esm/components/data-display/DisplayField.js +67 -45
  90. package/dist/esm/components/data-display/DisplayField.js.map +1 -1
  91. package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
  92. package/dist/esm/components/data-display/DisplayFieldEditable.js +4 -1
  93. package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
  94. package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
  95. package/dist/esm/components/data-display/DisplayValueDispatcher.js +16 -6
  96. package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
  97. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
  98. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +3 -1
  99. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
  100. package/dist/esm/components/data-display/approval-seal.d.ts +7 -5
  101. package/dist/esm/components/data-display/approval-seal.d.ts.map +1 -1
  102. package/dist/esm/components/data-display/approval-seal.js +10 -4
  103. package/dist/esm/components/data-display/approval-seal.js.map +1 -1
  104. package/dist/esm/components/data-display/signature-requests.d.ts +81 -0
  105. package/dist/esm/components/data-display/signature-requests.d.ts.map +1 -0
  106. package/dist/esm/components/data-display/signature-requests.js +123 -0
  107. package/dist/esm/components/data-display/signature-requests.js.map +1 -0
  108. package/dist/esm/components/feedback/empty-state-marker.d.ts +16 -0
  109. package/dist/esm/components/feedback/empty-state-marker.d.ts.map +1 -0
  110. package/dist/esm/components/feedback/empty-state-marker.js +16 -0
  111. package/dist/esm/components/feedback/empty-state-marker.js.map +1 -0
  112. package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
  113. package/dist/esm/components/feedback/empty-state.js +2 -1
  114. package/dist/esm/components/feedback/empty-state.js.map +1 -1
  115. package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts +7 -1
  116. package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
  117. package/dist/esm/components/feedback/features/feature-unavailable-prompt.js +8 -2
  118. package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
  119. package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
  120. package/dist/esm/components/feedback/resource-empty-state.js +2 -1
  121. package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
  122. package/dist/esm/components/flows-actors/approval.d.ts +25 -1
  123. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  124. package/dist/esm/components/flows-actors/approval.js +22 -24
  125. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  126. package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
  127. package/dist/esm/components/flows-actors/approval.labels.js +30 -0
  128. package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
  129. package/dist/esm/components/flows-actors/flow-node.labels.d.ts.map +1 -1
  130. package/dist/esm/components/flows-actors/flow-node.labels.js +4 -1
  131. package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
  132. package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -1
  133. package/dist/esm/components/flows-actors/flow-step-visuals.js +8 -2
  134. package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -1
  135. package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -1
  136. package/dist/esm/components/flows-actors/human-decision-form.js +4 -1
  137. package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -1
  138. package/dist/esm/components/form/Form.d.ts +2 -0
  139. package/dist/esm/components/form/Form.d.ts.map +1 -1
  140. package/dist/esm/components/form/Form.js +1 -0
  141. package/dist/esm/components/form/Form.js.map +1 -1
  142. package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
  143. package/dist/esm/components/form/automated/AutomatedArrayField.js +7 -4
  144. package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
  145. package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
  146. package/dist/esm/components/form/automated/AutosaveContext.js +8 -0
  147. package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
  148. package/dist/esm/components/form/automated/FormField.d.ts +5 -3
  149. package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
  150. package/dist/esm/components/form/automated/FormField.js +38 -13
  151. package/dist/esm/components/form/automated/FormField.js.map +1 -1
  152. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +1 -1
  153. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
  154. package/dist/esm/components/form/automated/ResourceAutomatedForm.js +75 -47
  155. package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
  156. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
  157. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js +1 -1
  158. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
  159. package/dist/esm/components/form/validation-errors/form-validation.d.ts +5 -7
  160. package/dist/esm/components/form/validation-errors/form-validation.d.ts.map +1 -1
  161. package/dist/esm/components/form/validation-errors/form-validation.js +7 -22
  162. package/dist/esm/components/form/validation-errors/form-validation.js.map +1 -1
  163. package/dist/esm/components/form/validation-errors/getFieldError.d.ts +25 -2
  164. package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
  165. package/dist/esm/components/form/validation-errors/getFieldError.js +29 -2
  166. package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
  167. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +5 -0
  168. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
  169. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +3 -0
  170. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
  171. package/dist/esm/components/form/validation-errors/save-attempt.d.ts +9 -0
  172. package/dist/esm/components/form/validation-errors/save-attempt.d.ts.map +1 -0
  173. package/dist/esm/components/form/validation-errors/save-attempt.js +42 -0
  174. package/dist/esm/components/form/validation-errors/save-attempt.js.map +1 -0
  175. package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts +3 -1
  176. package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts.map +1 -1
  177. package/dist/esm/components/form/validation-errors/unstarted-field-visit.js +3 -1
  178. package/dist/esm/components/form/validation-errors/unstarted-field-visit.js.map +1 -1
  179. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +2 -2
  180. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -1
  181. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +3 -0
  182. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -1
  183. package/dist/esm/components/navigation/NavigationItemBadge.d.ts +16 -0
  184. package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
  185. package/dist/esm/components/navigation/NavigationItemBadge.js +14 -2
  186. package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
  187. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +3 -3
  188. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +3 -3
  189. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
  190. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts +5 -13
  191. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
  192. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +30 -255
  193. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
  194. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts +22 -1
  195. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
  196. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +57 -26
  197. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
  198. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts +1 -1
  199. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
  200. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +40 -4
  201. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
  202. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts +1 -1
  203. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
  204. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +26 -4
  205. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
  206. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts +31 -0
  207. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts.map +1 -0
  208. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js +42 -0
  209. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js.map +1 -0
  210. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts +76 -0
  211. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts.map +1 -0
  212. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js +268 -0
  213. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js.map +1 -0
  214. package/dist/esm/components/navigation/command.d.ts +5 -0
  215. package/dist/esm/components/navigation/command.d.ts.map +1 -1
  216. package/dist/esm/components/navigation/command.js.map +1 -1
  217. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +19 -0
  218. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
  219. package/dist/esm/components/resources/ResourceLayout_DangerZone.js +51 -12
  220. package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
  221. package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
  222. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +21 -7
  223. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
  224. package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
  225. package/dist/esm/components/resources/ResourceLayout_List.js +17 -7
  226. package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
  227. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +1 -1
  228. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
  229. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +4 -1
  230. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
  231. package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
  232. package/dist/esm/components/resources/ResourceLayout_Search.js +12 -8
  233. package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
  234. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts +1 -1
  235. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts.map +1 -1
  236. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js +11 -4
  237. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js.map +1 -1
  238. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.d.ts.map +1 -1
  239. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js +4 -1
  240. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js.map +1 -1
  241. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.d.ts.map +1 -1
  242. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js +4 -1
  243. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js.map +1 -1
  244. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.d.ts.map +1 -1
  245. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js +4 -1
  246. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js.map +1 -1
  247. package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +1 -1
  248. package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
  249. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +5 -5
  250. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
  251. package/dist/esm/components/resources/embeds/ResourceEmbeds.js +21 -14
  252. package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
  253. package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
  254. package/dist/esm/components/resources/skeleton/DisplayLayout.js +40 -4
  255. package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
  256. package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
  257. package/dist/esm/components/resources/skeleton/FormLayout.js +22 -6
  258. package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
  259. package/dist/esm/components/resources/skeleton/Group.d.ts.map +1 -1
  260. package/dist/esm/components/resources/skeleton/Group.js +4 -1
  261. package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
  262. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +1 -1
  263. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +1 -1
  264. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
  265. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +21 -1
  266. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
  267. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +53 -9
  268. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
  269. package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
  270. package/dist/esm/components/sections/ContentSectionContainer.js +11 -7
  271. package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
  272. package/dist/esm/components/sections/content-section.d.ts +1 -3
  273. package/dist/esm/components/sections/content-section.d.ts.map +1 -1
  274. package/dist/esm/components/sections/content-section.js.map +1 -1
  275. package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -1
  276. package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +2 -1
  277. package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -1
  278. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +12 -0
  279. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
  280. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +28 -6
  281. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
  282. package/dist/esm/components/settings/SettingsHub.d.ts +15 -0
  283. package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
  284. package/dist/esm/components/settings/SettingsHub.js +14 -4
  285. package/dist/esm/components/settings/SettingsHub.js.map +1 -1
  286. package/dist/esm/components/typography/document-heading-level.d.ts +28 -0
  287. package/dist/esm/components/typography/document-heading-level.d.ts.map +1 -0
  288. package/dist/esm/components/typography/document-heading-level.js +63 -0
  289. package/dist/esm/components/typography/document-heading-level.js.map +1 -0
  290. package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts +3 -2
  291. package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts.map +1 -1
  292. package/dist/esm/components/views/chart-dashboard/ChartDashboard.js +4 -3
  293. package/dist/esm/components/views/chart-dashboard/ChartDashboard.js.map +1 -1
  294. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts +1 -1
  295. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts.map +1 -1
  296. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.js.map +1 -1
  297. package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts +33 -0
  298. package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts.map +1 -1
  299. package/dist/esm/components/views/chart-view/ChartKpiFigure.js +63 -4
  300. package/dist/esm/components/views/chart-view/ChartKpiFigure.js.map +1 -1
  301. package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
  302. package/dist/esm/components/views/chart-view/ChartView.js +52 -22
  303. package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
  304. package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
  305. package/dist/esm/components/views/chart-view/ChartView.labels.js +76 -3
  306. package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
  307. package/dist/esm/components/views/chart-view/ChartView.lazy.d.ts.map +1 -1
  308. package/dist/esm/components/views/chart-view/ChartView.lazy.js +2 -1
  309. package/dist/esm/components/views/chart-view/ChartView.lazy.js.map +1 -1
  310. package/dist/esm/components/views/chart-view/ChartWidget.d.ts.map +1 -1
  311. package/dist/esm/components/views/chart-view/ChartWidget.js +12 -4
  312. package/dist/esm/components/views/chart-view/ChartWidget.js.map +1 -1
  313. package/dist/esm/components/views/chart-view/chart-export.utils.d.ts +8 -0
  314. package/dist/esm/components/views/chart-view/chart-export.utils.d.ts.map +1 -1
  315. package/dist/esm/components/views/chart-view/chart-export.utils.js +15 -25
  316. package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
  317. package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts +6 -0
  318. package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts.map +1 -0
  319. package/dist/esm/components/views/chart-view/chart-view-defaults.js +6 -0
  320. package/dist/esm/components/views/chart-view/chart-view-defaults.js.map +1 -0
  321. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +47 -12
  322. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
  323. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +87 -32
  324. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
  325. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
  326. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +8 -8
  327. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
  328. package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js +1 -1
  329. package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js.map +1 -1
  330. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.d.ts.map +1 -1
  331. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js +7 -3
  332. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js.map +1 -1
  333. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.d.ts.map +1 -1
  334. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js +6 -2
  335. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js.map +1 -1
  336. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.d.ts.map +1 -1
  337. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +8 -2
  338. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
  339. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.d.ts.map +1 -1
  340. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js +13 -9
  341. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js.map +1 -1
  342. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts +1 -1
  343. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
  344. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +9 -8
  345. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
  346. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.d.ts.map +1 -1
  347. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js +2 -1
  348. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js.map +1 -1
  349. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts +1 -1
  350. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
  351. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +10 -11
  352. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
  353. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.d.ts.map +1 -1
  354. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js +2 -1
  355. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js.map +1 -1
  356. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.d.ts.map +1 -1
  357. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js +5 -1
  358. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js.map +1 -1
  359. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
  360. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +7 -3
  361. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
  362. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts.map +1 -1
  363. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js +13 -13
  364. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
  365. package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +1 -1
  366. package/dist/esm/components/views/chart-view/useResourceChartData.js +1 -1
  367. package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -1
  368. package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
  369. package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
  370. package/dist/esm/components/views/composite-view/CompositeView.js +6 -2
  371. package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
  372. package/dist/esm/components/views/execution-view/ExecutionView.d.ts +7 -0
  373. package/dist/esm/components/views/execution-view/ExecutionView.d.ts.map +1 -1
  374. package/dist/esm/components/views/execution-view/ExecutionView.js +11 -1
  375. package/dist/esm/components/views/execution-view/ExecutionView.js.map +1 -1
  376. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +7 -0
  377. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
  378. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +6 -2
  379. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
  380. package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts +7 -0
  381. package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts.map +1 -1
  382. package/dist/esm/components/views/full-custom-view/FullCustomView.js +8 -3
  383. package/dist/esm/components/views/full-custom-view/FullCustomView.js.map +1 -1
  384. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts +7 -0
  385. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
  386. package/dist/esm/components/views/onboarding-view/OnboardingView.js +11 -1
  387. package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
  388. package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +2 -2
  389. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +2 -2
  390. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
  391. package/dist/esm/core/app-shell/app-shell.schemas.d.ts +87 -16
  392. package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
  393. package/dist/esm/core/app-shell/app-shell.schemas.js +16 -0
  394. package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
  395. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +4 -4
  396. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +3 -3
  397. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
  398. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts +45 -0
  399. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts.map +1 -0
  400. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js +72 -0
  401. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js.map +1 -0
  402. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +4 -3
  403. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
  404. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +4 -3
  405. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
  406. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -8
  407. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
  408. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +22 -21
  409. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
  410. package/dist/esm/core/billing/BillingContext.d.ts +27 -4
  411. package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
  412. package/dist/esm/core/billing/BillingContext.js +61 -2
  413. package/dist/esm/core/billing/BillingContext.js.map +1 -1
  414. package/dist/esm/core/billing/useBillingAction.d.ts.map +1 -1
  415. package/dist/esm/core/billing/useBillingAction.js +3 -2
  416. package/dist/esm/core/billing/useBillingAction.js.map +1 -1
  417. package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts +19 -0
  418. package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts.map +1 -0
  419. package/dist/esm/core/components-registry/RegisteredComponentRoot.js +23 -0
  420. package/dist/esm/core/components-registry/RegisteredComponentRoot.js.map +1 -0
  421. package/dist/esm/core/components-registry/register-framework-layouts.d.ts.map +1 -1
  422. package/dist/esm/core/components-registry/register-framework-layouts.js +4 -0
  423. package/dist/esm/core/components-registry/register-framework-layouts.js.map +1 -1
  424. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +159 -0
  425. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
  426. package/dist/esm/core/config/app-configuration-frontend.schemas.js +68 -3
  427. package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
  428. package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +2 -2
  429. package/dist/esm/core/config/app-level-components.frontend.schemas.js +2 -2
  430. package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
  431. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +59 -18
  432. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
  433. package/dist/esm/core/config/chart-view.frontend.schemas.js +42 -7
  434. package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
  435. package/dist/esm/core/config/composite-view.schemas.d.ts +8 -1
  436. package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
  437. package/dist/esm/core/config/composite-view.schemas.js +1 -0
  438. package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
  439. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +1 -1
  440. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -1
  441. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +1 -1
  442. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -1
  443. package/dist/esm/core/config/engine-settings-destinations.d.ts +6 -0
  444. package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
  445. package/dist/esm/core/config/engine-settings-destinations.js +12 -0
  446. package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
  447. package/dist/esm/core/config/execution-view.schemas.d.ts +1 -1
  448. package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
  449. package/dist/esm/core/config/identity-portal-settings.frontend.d.ts +17 -0
  450. package/dist/esm/core/config/identity-portal-settings.frontend.d.ts.map +1 -0
  451. package/dist/esm/core/config/identity-portal-settings.frontend.js +64 -0
  452. package/dist/esm/core/config/identity-portal-settings.frontend.js.map +1 -0
  453. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -8
  454. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
  455. package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
  456. package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +1 -1
  457. package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts.map +1 -1
  458. package/dist/esm/core/config/settings-hub-gating.frontend.utils.js +1 -1
  459. package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
  460. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +17 -6
  461. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
  462. package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
  463. package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
  464. package/dist/esm/core/config/useSettingsHubConfig.js +1 -0
  465. package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
  466. package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +7 -0
  467. package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
  468. package/dist/esm/core/config/useVisibleSettingsHubConfig.js +9 -1
  469. package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
  470. package/dist/esm/core/config/verify-launcher-content.d.ts +7 -1
  471. package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
  472. package/dist/esm/core/config/verify-launcher-content.js +31 -0
  473. package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
  474. package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
  475. package/dist/esm/core/errors/GlobalErrorHandler.js +10 -0
  476. package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
  477. package/dist/esm/core/errors/backend-refusal.frontend.d.ts +1 -1
  478. package/dist/esm/core/errors/backend-refusal.frontend.d.ts.map +1 -1
  479. package/dist/esm/core/errors/backend-refusal.frontend.js.map +1 -1
  480. package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
  481. package/dist/esm/core/events/NotificationContext.js +19 -2
  482. package/dist/esm/core/events/NotificationContext.js.map +1 -1
  483. package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts +21 -2
  484. package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts.map +1 -1
  485. package/dist/esm/core/events/notification-display-policy.frontend.schemas.js +25 -4
  486. package/dist/esm/core/events/notification-display-policy.frontend.schemas.js.map +1 -1
  487. package/dist/esm/core/execution/useExecution.d.ts +3 -3
  488. package/dist/esm/core/execution/useExecution.js.map +1 -1
  489. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +1 -1
  490. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +1 -1
  491. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -1
  492. package/dist/esm/core/features/FeatureGate.d.ts +13 -1
  493. package/dist/esm/core/features/FeatureGate.d.ts.map +1 -1
  494. package/dist/esm/core/features/FeatureGate.js +6 -1
  495. package/dist/esm/core/features/FeatureGate.js.map +1 -1
  496. package/dist/esm/core/features/InPlaceFeatureLock.d.ts +28 -0
  497. package/dist/esm/core/features/InPlaceFeatureLock.d.ts.map +1 -0
  498. package/dist/esm/core/features/InPlaceFeatureLock.js +49 -0
  499. package/dist/esm/core/features/InPlaceFeatureLock.js.map +1 -0
  500. package/dist/esm/core/features/PlanRefusalPrompt.d.ts +12 -0
  501. package/dist/esm/core/features/PlanRefusalPrompt.d.ts.map +1 -0
  502. package/dist/esm/core/features/PlanRefusalPrompt.js +90 -0
  503. package/dist/esm/core/features/PlanRefusalPrompt.js.map +1 -0
  504. package/dist/esm/core/features/RequiredFeaturesGate.d.ts +39 -0
  505. package/dist/esm/core/features/RequiredFeaturesGate.d.ts.map +1 -0
  506. package/dist/esm/core/features/RequiredFeaturesGate.js +51 -0
  507. package/dist/esm/core/features/RequiredFeaturesGate.js.map +1 -0
  508. package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts +6 -0
  509. package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts.map +1 -1
  510. package/dist/esm/core/features/feature-unavailability.frontend.utils.js +27 -10
  511. package/dist/esm/core/features/feature-unavailability.frontend.utils.js.map +1 -1
  512. package/dist/esm/core/features/plan-refusal.frontend.d.ts +43 -0
  513. package/dist/esm/core/features/plan-refusal.frontend.d.ts.map +1 -0
  514. package/dist/esm/core/features/plan-refusal.frontend.js +67 -0
  515. package/dist/esm/core/features/plan-refusal.frontend.js.map +1 -0
  516. package/dist/esm/core/features/required-features-gate-presentation.d.ts +21 -0
  517. package/dist/esm/core/features/required-features-gate-presentation.d.ts.map +1 -0
  518. package/dist/esm/core/features/required-features-gate-presentation.js +26 -0
  519. package/dist/esm/core/features/required-features-gate-presentation.js.map +1 -0
  520. package/dist/esm/core/features/useFeatureAvailability.d.ts.map +1 -1
  521. package/dist/esm/core/features/useFeatureAvailability.js +4 -0
  522. package/dist/esm/core/features/useFeatureAvailability.js.map +1 -1
  523. package/dist/esm/core/features/useOperationFeatureAvailability.d.ts +2 -0
  524. package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
  525. package/dist/esm/core/features/useOperationFeatureAvailability.js +6 -1
  526. package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
  527. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +11 -0
  528. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
  529. package/dist/esm/core/flows-actors/FlowsActorsContext.js +117 -3
  530. package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
  531. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.d.ts.map +1 -1
  532. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js +3 -1
  533. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js.map +1 -1
  534. package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
  535. package/dist/esm/core/navigation/NavigationContentAreas.js +28 -9
  536. package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
  537. package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.d.ts → core/navigation/chart-read-gate.d.ts} +11 -7
  538. package/dist/esm/core/navigation/chart-read-gate.d.ts.map +1 -0
  539. package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.js → core/navigation/chart-read-gate.js} +27 -11
  540. package/dist/esm/core/navigation/chart-read-gate.js.map +1 -0
  541. package/dist/esm/core/navigation/home-resolution.d.ts +36 -0
  542. package/dist/esm/core/navigation/home-resolution.d.ts.map +1 -0
  543. package/dist/esm/core/navigation/home-resolution.js +46 -0
  544. package/dist/esm/core/navigation/home-resolution.js.map +1 -0
  545. package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -34
  546. package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
  547. package/dist/esm/core/navigation/launcher-resolution.js +13 -18
  548. package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
  549. package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +1 -1
  550. package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
  551. package/dist/esm/core/navigation/launcher-runtime-availability.js +7 -2
  552. package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
  553. package/dist/esm/core/navigation/primary-destination-layout.d.ts +2 -2
  554. package/dist/esm/core/navigation/primary-destination-layout.d.ts.map +1 -1
  555. package/dist/esm/core/navigation/primary-destination-layout.js +1 -1
  556. package/dist/esm/core/navigation/primary-destination-layout.js.map +1 -1
  557. package/dist/esm/core/navigation/useChartReadDecision.d.ts +26 -0
  558. package/dist/esm/core/navigation/useChartReadDecision.d.ts.map +1 -0
  559. package/dist/esm/core/navigation/useChartReadDecision.js +58 -0
  560. package/dist/esm/core/navigation/useChartReadDecision.js.map +1 -0
  561. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts +1 -1
  562. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts.map +1 -1
  563. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.js.map +1 -1
  564. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +1 -1
  565. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -1
  566. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -1
  567. package/dist/esm/core/navigation/view-title-resolution.d.ts +21 -0
  568. package/dist/esm/core/navigation/view-title-resolution.d.ts.map +1 -1
  569. package/dist/esm/core/navigation/view-title-resolution.js +25 -0
  570. package/dist/esm/core/navigation/view-title-resolution.js.map +1 -1
  571. package/dist/esm/core/navigation/viewer-field-reader.d.ts +81 -0
  572. package/dist/esm/core/navigation/viewer-field-reader.d.ts.map +1 -0
  573. package/dist/esm/core/navigation/viewer-field-reader.js +113 -0
  574. package/dist/esm/core/navigation/viewer-field-reader.js.map +1 -0
  575. package/dist/esm/core/navigation/viewer-roles.d.ts +40 -0
  576. package/dist/esm/core/navigation/viewer-roles.d.ts.map +1 -0
  577. package/dist/esm/core/navigation/viewer-roles.js +26 -0
  578. package/dist/esm/core/navigation/viewer-roles.js.map +1 -0
  579. package/dist/esm/core/requests/user-interaction-clock.d.ts +32 -0
  580. package/dist/esm/core/requests/user-interaction-clock.d.ts.map +1 -0
  581. package/dist/esm/core/requests/user-interaction-clock.js +47 -0
  582. package/dist/esm/core/requests/user-interaction-clock.js.map +1 -0
  583. package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
  584. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +2 -0
  585. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
  586. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +66 -10
  587. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
  588. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +63 -8
  589. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
  590. package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
  591. package/dist/esm/core/requests/wildo-http-client.frontend.service.js +13 -0
  592. package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
  593. package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
  594. package/dist/esm/core/resources/hooks/useOperationEnabled.js +45 -3
  595. package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
  596. package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +1 -1
  597. package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts.map +1 -1
  598. package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
  599. package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
  600. package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
  601. package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
  602. package/dist/esm/core/resources/resources.frontend.schemas.d.ts +29 -23
  603. package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
  604. package/dist/esm/core/resources/resources.frontend.schemas.js +20 -20
  605. package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
  606. package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
  607. package/dist/esm/core/resources/rmm/ResourceMutationManager.js +4 -0
  608. package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
  609. package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
  610. package/dist/esm/core/resources/useResourceOperationActions.js +7 -7
  611. package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
  612. package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
  613. package/dist/esm/core/runtime/AppRouter.js +11 -33
  614. package/dist/esm/core/runtime/AppRouter.js.map +1 -1
  615. package/dist/esm/core/runtime/ApplicationMainContext.d.ts +15 -1
  616. package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
  617. package/dist/esm/core/runtime/ApplicationMainContext.js +41 -23
  618. package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
  619. package/dist/esm/core/runtime/IdentityPortalRouter.d.ts +20 -0
  620. package/dist/esm/core/runtime/IdentityPortalRouter.d.ts.map +1 -0
  621. package/dist/esm/core/runtime/IdentityPortalRouter.js +31 -0
  622. package/dist/esm/core/runtime/IdentityPortalRouter.js.map +1 -0
  623. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +9 -0
  624. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
  625. package/dist/esm/core/runtime/domain-module.frontend.definitions.js +3 -2
  626. package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
  627. package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts +21 -0
  628. package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts.map +1 -1
  629. package/dist/esm/core/runtime/frontend-companion-resource-inputs.js +19 -1
  630. package/dist/esm/core/runtime/frontend-companion-resource-inputs.js.map +1 -1
  631. package/dist/esm/core/runtime/identity-routes.d.ts +13 -0
  632. package/dist/esm/core/runtime/identity-routes.d.ts.map +1 -0
  633. package/dist/esm/core/runtime/identity-routes.js +50 -0
  634. package/dist/esm/core/runtime/identity-routes.js.map +1 -0
  635. package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -0
  636. package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
  637. package/dist/esm/core/runtime/routes.frontend.definitions.js +20 -1
  638. package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
  639. package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts +3 -1
  640. package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts.map +1 -1
  641. package/dist/esm/core/runtime/runtime.frontend.schemas.js +2 -0
  642. package/dist/esm/core/runtime/runtime.frontend.schemas.js.map +1 -1
  643. package/dist/esm/core/runtime/start-application.frontend.service.d.ts +7 -0
  644. package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
  645. package/dist/esm/core/runtime/start-application.frontend.service.js +4 -2
  646. package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
  647. package/dist/esm/core/search/command-score.d.ts +33 -0
  648. package/dist/esm/core/search/command-score.d.ts.map +1 -0
  649. package/dist/esm/core/search/command-score.js +109 -0
  650. package/dist/esm/core/search/command-score.js.map +1 -0
  651. package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
  652. package/dist/esm/core/security/AuthSessionContext.js +4 -0
  653. package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
  654. package/dist/esm/core/security/StepUpAuthContext.d.ts +3 -2
  655. package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
  656. package/dist/esm/core/security/StepUpAuthContext.js +7 -2
  657. package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
  658. package/dist/esm/core/security/federated-reauthentication.frontend.d.ts +13 -2
  659. package/dist/esm/core/security/federated-reauthentication.frontend.d.ts.map +1 -1
  660. package/dist/esm/core/security/federated-reauthentication.frontend.js +21 -1
  661. package/dist/esm/core/security/federated-reauthentication.frontend.js.map +1 -1
  662. package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts +24 -0
  663. package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts.map +1 -0
  664. package/dist/esm/core/security/useAuthenticatedRouteEntry.js +37 -0
  665. package/dist/esm/core/security/useAuthenticatedRouteEntry.js.map +1 -0
  666. package/dist/esm/core/ui/design-token.utils.d.ts +9 -0
  667. package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
  668. package/dist/esm/core/ui/design-token.utils.js +24 -3
  669. package/dist/esm/core/ui/design-token.utils.js.map +1 -1
  670. package/dist/esm/core/ui/themes/focus-indicator.d.ts +1 -1
  671. package/dist/esm/core/ui/themes/focus-indicator.js +1 -1
  672. package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -1
  673. package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
  674. package/dist/esm/index.d.ts +19 -1
  675. package/dist/esm/index.d.ts.map +1 -1
  676. package/dist/esm/index.js +22 -1
  677. package/dist/esm/index.js.map +1 -1
  678. package/dist/esm/testing/mock-builders.d.ts +1 -1
  679. package/dist/esm/testing/mock-builders.d.ts.map +1 -1
  680. package/dist/esm/testing/mock-builders.js +1 -0
  681. package/dist/esm/testing/mock-builders.js.map +1 -1
  682. package/dist/tsconfig.build.tsbuildinfo +1 -1
  683. package/package.json +9 -6
  684. package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.d.ts.map +0 -1
  685. package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceOwnedViewEmbeds.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceOwnedViewEmbeds.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,0BAA0B,EAC1B,cAAc,EACf,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EACV,gCAAgC,EACjC,MAAM,+DAA+D,CAAC;AAuBvE,MAAM,WAAW,oCAAoC;IACnD,eAAe,EAAE,gCAAgC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;CAClD;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,eAAe,EACf,OAAO,EACP,cAAc,EACd,mBAAmB,GACpB,EAAE,oCAAoC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiB1D;AAED,MAAM,WAAW,gCAAgC;IAC/C,eAAe,EAAE,gCAAgC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,eAAe,EACf,OAAO,EACP,MAAM,EACN,cAAc,EACd,SAAS,GACV,EAAE,gCAAgC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA0CtD;AAED,MAAM,WAAW,oCAAoC;IACnD,eAAe,EAAE,gCAAgC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,eAAe,EACf,OAAO,EACP,cAAc,EACd,SAAS,GACV,EAAE,oCAAoC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiB1D"}
1
+ {"version":3,"file":"ResourceOwnedViewEmbeds.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceOwnedViewEmbeds.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,0BAA0B,EAC1B,cAAc,EACf,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EACV,gCAAgC,EACjC,MAAM,+DAA+D,CAAC;AA0BvE,MAAM,WAAW,oCAAoC;IACnD,eAAe,EAAE,gCAAgC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;CAClD;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,eAAe,EACf,OAAO,EACP,cAAc,EACd,mBAAmB,GACpB,EAAE,oCAAoC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkB1D;AAED,MAAM,WAAW,gCAAgC;IAC/C,eAAe,EAAE,gCAAgC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,eAAe,EACf,OAAO,EACP,MAAM,EACN,cAAc,EACd,SAAS,GACV,EAAE,gCAAgC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA6C7D;AAED,MAAM,WAAW,oCAAoC;IACnD,eAAe,EAAE,gCAAgC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,eAAe,EACf,OAAO,EACP,cAAc,EACd,SAAS,GACV,EAAE,oCAAoC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkB1D"}
@@ -4,7 +4,9 @@ import { ErrorCustomMessageReference, } from '@wildo-ai/saas-models';
4
4
  import { buildResolvedInsertedChartDescriptor, buildResourceInsertedChartIdentity, } from '../../core/config/chart-view.frontend.schemas.js';
5
5
  import { buildResourceInsertedCompositeIdentity, } from '../../core/config/composite-view.schemas.js';
6
6
  import { buildResourceInsertedExecutionIdentity, } from '../../core/config/execution-view.schemas.js';
7
- import { FeatureRouteGuard } from '../../core/features/FeatureRouteGuard.js';
7
+ import { RequiredFeaturesGate } from '../../core/features/RequiredFeaturesGate.js';
8
+ import { RequiredFeaturesGatePresentation } from '../../core/features/required-features-gate-presentation.js';
9
+ import { CHART_VIEW_DEFAULT_HEIGHT } from '../../components/views/chart-view/chart-view-defaults.js';
8
10
  import { useResourceRegistry } from '../../core/resources/useResourceRegistry.js';
9
11
  import { FrontendResourceUtils } from '../../core/resources/frontend-resource.utils.js';
10
12
  import { CompositeView } from '../../components/views/composite-view/CompositeView.js';
@@ -12,6 +14,7 @@ import { CompositeView } from '../../components/views/composite-view/CompositeVi
12
14
  // module merges the whole ECharts payload into the entry chunk (Rollup merges
13
15
  // a module that is both statically and dynamically imported; no warning).
14
16
  import { ChartView } from '../../components/views/chart-view/ChartView.lazy.js';
17
+ import { ChartReadDecision, useChartReadDecision } from '../../core/navigation/useChartReadDecision.js';
15
18
  import { ExecutionView } from '../../components/views/execution-view/ExecutionView.js';
16
19
  import { normalizeInsertedResourceViewContextResourceIdentifiers } from './inserted-resource-view.frontend.utils.js';
17
20
  /**
@@ -28,7 +31,7 @@ export function EmbedResourceOwnedCompositeView({ resourceContext, viewRef, navi
28
31
  const contextResourceIdentifiers = useMemo(() => {
29
32
  return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);
30
33
  }, [resourceContext]);
31
- return (_jsx(CompositeView, { viewRef: insertedIdentity.insertedViewRef, contextResourceIdentifiers: contextResourceIdentifiers, navigationZone: navigationZone, navigationInitiator: navigationInitiator }));
34
+ return (_jsx(CompositeView, { viewRef: insertedIdentity.insertedViewRef, featureGatePresentation: RequiredFeaturesGatePresentation.TILE, contextResourceIdentifiers: contextResourceIdentifiers, navigationZone: navigationZone, navigationInitiator: navigationInitiator }));
32
35
  }
33
36
  export function EmbedResourceOwnedChartView({ resourceContext, viewRef, inputs, urlParamValues, className, }) {
34
37
  const { registry } = useResourceRegistry();
@@ -42,13 +45,17 @@ export function EmbedResourceOwnedChartView({ resourceContext, viewRef, inputs,
42
45
  ?.frontendConfiguration
43
46
  ?.chartViews
44
47
  ?.find((candidate) => candidate.ref === viewRef);
48
+ // #4252: a chart the backend's chart gate would refuse this viewer is not drawn (nor while their roles load).
49
+ const readDecision = useChartReadDecision(chartView?.chartDefinition);
45
50
  if (!chartView) {
46
51
  throw buildResourceOwnedViewEmbedConfigurationError(`Cannot resolve resource-owned chart view "${viewRef}" on resource "${resourceContext.resourceType}".`, {
47
52
  resourceType: resourceContext.resourceType,
48
53
  viewRef,
49
54
  });
50
55
  }
51
- return (_jsx("div", { className: className, children: _jsx(FeatureRouteGuard, { requiredFeatures: chartView.chartDefinition.requiredFeatures, children: _jsx(ChartView, { viewRef: identity.insertedViewRef, viewDefinition: chartView, runtimeDescriptor: buildResolvedInsertedChartDescriptor({
56
+ if (readDecision !== ChartReadDecision.ALLOWED)
57
+ return null;
58
+ return (_jsx("div", { className: className, children: _jsx(RequiredFeaturesGate, { requiredFeatures: chartView.chartDefinition.requiredFeatures, presentation: RequiredFeaturesGatePresentation.TILE, lockedTileHeight: CHART_VIEW_DEFAULT_HEIGHT, children: _jsx(ChartView, { viewRef: identity.insertedViewRef, viewDefinition: chartView, runtimeDescriptor: buildResolvedInsertedChartDescriptor({
52
59
  identity,
53
60
  chartView,
54
61
  contextResourceIdentifiers,
@@ -63,7 +70,7 @@ export function EmbedResourceOwnedExecutionView({ resourceContext, viewRef, navi
63
70
  const contextResourceIdentifiers = useMemo(() => {
64
71
  return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);
65
72
  }, [resourceContext]);
66
- return (_jsx("div", { className: className, children: _jsx(ExecutionView, { viewRef: identity.insertedViewRef, navigationZone: navigationZone, contextResourceIdentifiers: contextResourceIdentifiers }) }));
73
+ return (_jsx("div", { className: className, children: _jsx(ExecutionView, { viewRef: identity.insertedViewRef, navigationZone: navigationZone, contextResourceIdentifiers: contextResourceIdentifiers, featureGatePresentation: RequiredFeaturesGatePresentation.TILE }) }));
67
74
  }
68
75
  function buildResourceOwnedViewEmbedConfigurationError(message, context) {
69
76
  return FrontendResourceUtils.buildConfigurationError(ErrorCustomMessageReference.CONFIGURATION, {
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceOwnedViewEmbeds.js","sourceRoot":"","sources":["../../../../src/components/resources/ResourceOwnedViewEmbeds.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,2BAA2B,GAE5B,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EACL,oCAAoC,EACpC,kCAAkC,GACnC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EACL,sCAAsC,GACvC,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,sCAAsC,GACvC,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,mEAAmE,CAAC;AAClG,6EAA6E;AAC7E,8EAA8E;AAC9E,0EAA0E;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,gEAAgE,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,mEAAmE,CAAC;AAElG,OAAO,EAAE,uDAAuD,EAAE,MAAM,yCAAyC,CAAC;AASlH;;;;;;GAMG;AACH,MAAM,UAAU,+BAA+B,CAAC,EAC9C,eAAe,EACf,OAAO,EACP,cAAc,EACd,mBAAmB,GACkB;IACrC,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,EAAE;QACpC,OAAO,sCAAsC,CAAC,eAAe,CAAC,YAAY,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC,EAAE,CAAC,eAAe,C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,EAAE,yBAAyB;QACpC,OAAO;QACP,GAAG,OAAO;KACX,CACF,CAAC;AACJ,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport {\n ErrorCustomMessageReference,\n type ChartInputValues,\n} from '@wildo-ai/saas-models';\nimport type {\n NavigationInitiatorContext,\n NavigationZone,\n} from '~wildo-frontend-lib/core/navigation/navigation.schemas';\nimport type {\n FrontendResourceOperationContext,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport {\n buildResolvedInsertedChartDescriptor,\n buildResourceInsertedChartIdentity,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport {\n buildResourceInsertedCompositeIdentity,\n} from '~wildo-frontend-lib/core/config/composite-view.schemas';\nimport {\n buildResourceInsertedExecutionIdentity,\n} from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport { FeatureRouteGuard } from '~wildo-frontend-lib/core/features/FeatureRouteGuard';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { CompositeView } from '~wildo-frontend-lib/components/views/composite-view/CompositeView';\n// ChartView MUST come from the `.lazy` wrapper — a static import of the real\n// module merges the whole ECharts payload into the entry chunk (Rollup merges\n// a module that is both statically and dynamically imported; no warning).\nimport { ChartView } from '~wildo-frontend-lib/components/views/chart-view/ChartView.lazy';\nimport { ExecutionView } from '~wildo-frontend-lib/components/views/execution-view/ExecutionView';\n\nimport { normalizeInsertedResourceViewContextResourceIdentifiers } from './inserted-resource-view.frontend.utils';\n\nexport interface EmbedResourceOwnedCompositeViewProps {\n resourceContext: FrontendResourceOperationContext;\n viewRef: string;\n navigationZone?: NavigationZone;\n navigationInitiator?: NavigationInitiatorContext;\n}\n\n/**\n * Embed a resource-owned composite view from an operation/custom host.\n *\n * Custom operation hosts should not have to hand-author inserted-view identity\n * strings or re-normalize semantic operation context into plain view context\n * ids. This helper keeps that bridge explicit but ergonomic.\n */\nexport function EmbedResourceOwnedCompositeView({\n resourceContext,\n viewRef,\n navigationZone,\n navigationInitiator,\n}: EmbedResourceOwnedCompositeViewProps): React.JSX.Element {\n const insertedIdentity = useMemo(() => {\n return buildResourceInsertedCompositeIdentity(resourceContext.resourceType, { ref: viewRef });\n }, [resourceContext.resourceType, viewRef]);\n\n const contextResourceIdentifiers = useMemo(() => {\n return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);\n }, [resourceContext]);\n\n return (\n <CompositeView\n viewRef={insertedIdentity.insertedViewRef}\n contextResourceIdentifiers={contextResourceIdentifiers}\n navigationZone={navigationZone}\n navigationInitiator={navigationInitiator}\n />\n );\n}\n\nexport interface EmbedResourceOwnedChartViewProps {\n resourceContext: FrontendResourceOperationContext;\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport function EmbedResourceOwnedChartView({\n resourceContext,\n viewRef,\n inputs,\n urlParamValues,\n className,\n}: EmbedResourceOwnedChartViewProps): React.JSX.Element {\n const { registry } = useResourceRegistry();\n const identity = useMemo(() => {\n return buildResourceInsertedChartIdentity(resourceContext.resourceType, { ref: viewRef });\n }, [resourceContext.resourceType, viewRef]);\n const contextResourceIdentifiers = useMemo(() => {\n return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);\n }, [resourceContext]);\n const chartView = registry.resourceConfigurations[resourceContext.resourceType]\n ?.frontendConfiguration\n ?.chartViews\n ?.find((candidate) => candidate.ref === viewRef);\n if (!chartView) {\n throw buildResourceOwnedViewEmbedConfigurationError(\n `Cannot resolve resource-owned chart view \"${viewRef}\" on resource \"${resourceContext.resourceType}\".`,\n {\n resourceType: resourceContext.resourceType,\n viewRef,\n },\n );\n }\n\n return (\n <div className={className}>\n <FeatureRouteGuard requiredFeatures={chartView.chartDefinition.requiredFeatures}>\n <ChartView\n viewRef={identity.insertedViewRef}\n viewDefinition={chartView}\n runtimeDescriptor={buildResolvedInsertedChartDescriptor({\n identity,\n chartView,\n contextResourceIdentifiers,\n })}\n contextResourceIdentifiers={contextResourceIdentifiers}\n inputs={inputs}\n urlParamValues={urlParamValues}\n // Resource-owned embedded chart → degrade locally, no page-level toast.\n localErrorOnly\n />\n </FeatureRouteGuard>\n </div>\n );\n}\n\nexport interface EmbedResourceOwnedExecutionViewProps {\n resourceContext: FrontendResourceOperationContext;\n viewRef: string;\n navigationZone: NavigationZone;\n className?: string;\n}\n\nexport function EmbedResourceOwnedExecutionView({\n resourceContext,\n viewRef,\n navigationZone,\n className,\n}: EmbedResourceOwnedExecutionViewProps): React.JSX.Element {\n const identity = useMemo(() => {\n return buildResourceInsertedExecutionIdentity(resourceContext.resourceType, { ref: viewRef });\n }, [resourceContext.resourceType, viewRef]);\n const contextResourceIdentifiers = useMemo(() => {\n return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);\n }, [resourceContext]);\n\n return (\n <div className={className}>\n <ExecutionView\n viewRef={identity.insertedViewRef}\n navigationZone={navigationZone}\n contextResourceIdentifiers={contextResourceIdentifiers}\n />\n </div>\n );\n}\n\nfunction buildResourceOwnedViewEmbedConfigurationError(\n message: string,\n context?: Record<string, unknown>,\n): Error {\n return FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n component: 'ResourceOwnedViewEmbeds',\n message,\n ...context,\n },\n );\n}\n"]}
1
+ {"version":3,"file":"ResourceOwnedViewEmbeds.js","sourceRoot":"","sources":["../../../../src/components/resources/ResourceOwnedViewEmbeds.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,2BAA2B,GAE5B,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EACL,oCAAoC,EACpC,kCAAkC,GACnC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EACL,sCAAsC,GACvC,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,sCAAsC,GACvC,MAAM,wDAAwD,CAAC;AACh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CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport {\n ErrorCustomMessageReference,\n type ChartInputValues,\n} from '@wildo-ai/saas-models';\nimport type {\n NavigationInitiatorContext,\n NavigationZone,\n} from '~wildo-frontend-lib/core/navigation/navigation.schemas';\nimport type {\n FrontendResourceOperationContext,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport {\n buildResolvedInsertedChartDescriptor,\n buildResourceInsertedChartIdentity,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport {\n buildResourceInsertedCompositeIdentity,\n} from '~wildo-frontend-lib/core/config/composite-view.schemas';\nimport {\n buildResourceInsertedExecutionIdentity,\n} from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport { RequiredFeaturesGate } from '~wildo-frontend-lib/core/features/RequiredFeaturesGate';\nimport { RequiredFeaturesGatePresentation } from '~wildo-frontend-lib/core/features/required-features-gate-presentation';\nimport { CHART_VIEW_DEFAULT_HEIGHT } from '~wildo-frontend-lib/components/views/chart-view/chart-view-defaults';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { CompositeView } from '~wildo-frontend-lib/components/views/composite-view/CompositeView';\n// ChartView MUST come from the `.lazy` wrapper — a static import of the real\n// module merges the whole ECharts payload into the entry chunk (Rollup merges\n// a module that is both statically and dynamically imported; no warning).\nimport { ChartView } from '~wildo-frontend-lib/components/views/chart-view/ChartView.lazy';\nimport { ChartReadDecision, useChartReadDecision } from '~wildo-frontend-lib/core/navigation/useChartReadDecision';\nimport { ExecutionView } from '~wildo-frontend-lib/components/views/execution-view/ExecutionView';\n\nimport { normalizeInsertedResourceViewContextResourceIdentifiers } from './inserted-resource-view.frontend.utils';\n\nexport interface EmbedResourceOwnedCompositeViewProps {\n resourceContext: FrontendResourceOperationContext;\n viewRef: string;\n navigationZone?: NavigationZone;\n navigationInitiator?: NavigationInitiatorContext;\n}\n\n/**\n * Embed a resource-owned composite view from an operation/custom host.\n *\n * Custom operation hosts should not have to hand-author inserted-view identity\n * strings or re-normalize semantic operation context into plain view context\n * ids. This helper keeps that bridge explicit but ergonomic.\n */\nexport function EmbedResourceOwnedCompositeView({\n resourceContext,\n viewRef,\n navigationZone,\n navigationInitiator,\n}: EmbedResourceOwnedCompositeViewProps): React.JSX.Element {\n const insertedIdentity = useMemo(() => {\n return buildResourceInsertedCompositeIdentity(resourceContext.resourceType, { ref: viewRef });\n }, [resourceContext.resourceType, viewRef]);\n\n const contextResourceIdentifiers = useMemo(() => {\n return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);\n }, [resourceContext]);\n\n return (\n <CompositeView\n viewRef={insertedIdentity.insertedViewRef}\n featureGatePresentation={RequiredFeaturesGatePresentation.TILE}\n contextResourceIdentifiers={contextResourceIdentifiers}\n navigationZone={navigationZone}\n navigationInitiator={navigationInitiator}\n />\n );\n}\n\nexport interface EmbedResourceOwnedChartViewProps {\n resourceContext: FrontendResourceOperationContext;\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport function EmbedResourceOwnedChartView({\n resourceContext,\n viewRef,\n inputs,\n urlParamValues,\n className,\n}: EmbedResourceOwnedChartViewProps): React.JSX.Element | null {\n const { registry } = useResourceRegistry();\n const identity = useMemo(() => {\n return buildResourceInsertedChartIdentity(resourceContext.resourceType, { ref: viewRef });\n }, [resourceContext.resourceType, viewRef]);\n const contextResourceIdentifiers = useMemo(() => {\n return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);\n }, [resourceContext]);\n const chartView = registry.resourceConfigurations[resourceContext.resourceType]\n ?.frontendConfiguration\n ?.chartViews\n ?.find((candidate) => candidate.ref === viewRef);\n // #4252: a chart the backend's chart gate would refuse this viewer is not drawn (nor while their roles load).\n const readDecision = useChartReadDecision(chartView?.chartDefinition);\n if (!chartView) {\n throw buildResourceOwnedViewEmbedConfigurationError(\n `Cannot resolve resource-owned chart view \"${viewRef}\" on resource \"${resourceContext.resourceType}\".`,\n {\n resourceType: resourceContext.resourceType,\n viewRef,\n },\n );\n }\n if (readDecision !== ChartReadDecision.ALLOWED) return null;\n\n return (\n <div className={className}>\n <RequiredFeaturesGate requiredFeatures={chartView.chartDefinition.requiredFeatures} presentation={RequiredFeaturesGatePresentation.TILE} lockedTileHeight={CHART_VIEW_DEFAULT_HEIGHT}>\n <ChartView\n viewRef={identity.insertedViewRef}\n viewDefinition={chartView}\n runtimeDescriptor={buildResolvedInsertedChartDescriptor({\n identity,\n chartView,\n contextResourceIdentifiers,\n })}\n contextResourceIdentifiers={contextResourceIdentifiers}\n inputs={inputs}\n urlParamValues={urlParamValues}\n // Resource-owned embedded chart → degrade locally, no page-level toast.\n localErrorOnly\n />\n </RequiredFeaturesGate>\n </div>\n );\n}\n\nexport interface EmbedResourceOwnedExecutionViewProps {\n resourceContext: FrontendResourceOperationContext;\n viewRef: string;\n navigationZone: NavigationZone;\n className?: string;\n}\n\nexport function EmbedResourceOwnedExecutionView({\n resourceContext,\n viewRef,\n navigationZone,\n className,\n}: EmbedResourceOwnedExecutionViewProps): React.JSX.Element {\n const identity = useMemo(() => {\n return buildResourceInsertedExecutionIdentity(resourceContext.resourceType, { ref: viewRef });\n }, [resourceContext.resourceType, viewRef]);\n const contextResourceIdentifiers = useMemo(() => {\n return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);\n }, [resourceContext]);\n\n return (\n <div className={className}>\n <ExecutionView\n viewRef={identity.insertedViewRef}\n navigationZone={navigationZone}\n contextResourceIdentifiers={contextResourceIdentifiers}\n featureGatePresentation={RequiredFeaturesGatePresentation.TILE}\n />\n </div>\n );\n}\n\nfunction buildResourceOwnedViewEmbedConfigurationError(\n message: string,\n context?: Record<string, unknown>,\n): Error {\n return FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n component: 'ResourceOwnedViewEmbeds',\n message,\n ...context,\n },\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceCollectionBody_Board.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/board/ResourceCollectionBody_Board.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKnF,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,+DAA+D,CAAC;AAC7H,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,2FAA2F,CAAC;AAEnG,MAAM,WAAW,iCAAiC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACtF,oHAAoH;IACpH,OAAO,EAAE,SAAS,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;IACjD,wDAAwD;IACxD,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,yEAAyE;IACzE,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,6EAA6E;IAC7E,qBAAqB,EAAE,MAAM,CAAC;IAC9B,yGAAyG;IACzG,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,4GAA4G;IAC5G,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5D,2EAA2E;IAC3E,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACnC;;;;OAIG;IACH,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC;IACxC;;;OAGG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrG,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,cAAc,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,uFAAuF;IACvF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,mDAAmD;AACnD,MAAM,MAAM,wBAAwB,GAAG,uCAAuC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE9F,+FAA+F;AAC/F,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,UAAU,EAAE,SAAS,wBAAwB,EAAE,CAAC;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,8GAA8G;IAC9G,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAuFD,wBAAgB,4BAA4B,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAClF,OAAO,EACP,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,QAAQ,GACT,EAAE,iCAAiC,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+H9D"}
1
+ {"version":3,"file":"ResourceCollectionBody_Board.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/board/ResourceCollectionBody_Board.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAA+B,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKnF,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,+DAA+D,CAAC;AAC7H,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,2FAA2F,CAA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wB,EAAE,CAAC;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,8GAA8G;IAC9G,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAuFD,wBAAgB,4BAA4B,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAClF,OAAO,EACP,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,QAAQ,GACT,EAAE,iCAAiC,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiI9D"}
@@ -21,6 +21,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
21
  * move to undo.
22
22
  */
23
23
  import { useCallback, useId, useState } from 'react';
24
+ import { documentHeadingTag, useDocumentHeadingLevel } from '../../../../components/typography/document-heading-level.js';
24
25
  import { selectHighestRightsVariants } from '@wildo-ai/saas-models';
25
26
  import { ButtonSize } from '@wildo-ai/presets-components-models';
26
27
  import { cn } from '../../../../core/ui/cn.js';
@@ -69,6 +70,8 @@ function BoardCard({ item, index, itemId, columnValue, transition, isMoving, hin
69
70
  }, children: renderCard(item, index) }));
70
71
  }
71
72
  export function ResourceCollectionBody_Board({ columns, onLoadMore, loadMoreLabel, columnLoadFailedLabel, ungroupedNote, renderCard, getItemId, transition, onMoveItem, boardLabel, ungroupedLabel, columnCountLabel, moveHint, }) {
73
+ // A column's heading takes the outline's level under the page's `h1`; a fixed `h3` skipped one (#3867).
74
+ const ColumnHeadingTag = documentHeadingTag(useDocumentHeadingLevel());
72
75
  const hintId = useId();
73
76
  /**
74
77
  * The card being dragged, and the column it came from — kept in state because `dragover` cannot read the payload.
@@ -134,7 +137,7 @@ export function ResourceCollectionBody_Board({ columns, onLoadMore, loadMoreLabe
134
137
  const item = itemId ? findItem(itemId) : undefined;
135
138
  if (item && operation)
136
139
  void move(item, column.value, operation);
137
- }, children: [_jsxs("header", { className: "flex items-baseline justify-between gap-item-sm px-item-xs", children: [_jsx("h3", { className: "truncate text-xs font-medium text-muted-foreground", children: heading }), _jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: column.failed ? null : columnCountLabel(column.total) })] }), column.value === null && (
140
+ }, children: [_jsxs("header", { className: "flex items-baseline justify-between gap-item-sm px-item-xs", children: [_jsx(ColumnHeadingTag, { className: "truncate text-xs font-medium text-muted-foreground", children: heading }), _jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: column.failed ? null : columnCountLabel(column.total) })] }), column.value === null && (
138
141
  // The trailing column COUNTS the rows holding no value of the field: they are not on the board, and it
139
142
  // says how many there are and where they are seen, so none of them is dropped without a word.
140
143
  _jsx("p", { className: "px-item-xs text-xs text-muted-foreground", children: ungroupedNote(column.total) })), column.failed && _jsx("p", { role: "alert", className: "px-item-xs text-xs text-destructive", children: columnLoadFailedLabel }), _jsx("ul", { role: "list", "aria-label": heading, "aria-busy": column.loading ? true : undefined, className: "flex min-h-16 flex-col gap-item-sm", children: column.items.map((item) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceCollectionBody_Board.js","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/board/ResourceCollectionBody_Board.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAc,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAiB,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EA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AM,IAAI,KAAK,CAYpB,CACH,CAAC;4BACJ,CAAC,CAAC,GACC,EACJ,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,IAAI,CAChF,KAAC,MAAM,IACL,OAAO,EAAE,sBAAsB,CAAC,KAAK,EACrC,IAAI,EAAE,UAAU,CAAC,EAAE,EACnB,QAAQ,EAAE,MAAM,CAAC,OAAO,0BACF,MAAM,CAAC,GAAG,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,KAAe,CAAC,YAEhD,aAAa,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAC3C,CACV,KAtEI,MAAM,CAAC,GAAG,CAuEP,CACX,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The BOARD body of a resource collection (`CollectionDisplayMode.BOARD`, #2298): one column per value of an enum\n * field, and moving a card between columns calls the operation the collection declared for it.\n *\n * Like `ResourceCollectionBody_Table`, the list host owns the fetched rows, the per-column reads (`useBoardColumnPages`),\n * the card renderer it shares with CARDS, the viewer's ROLE decision and the operation call. This component owns the\n * gesture, and asks each card's row which of the admitted variants' `enabledCondition` admits it, choosing the\n * highest-rights one (`useCardMoveOperation`): a member moves the rows their variant admits, an administrator any.\n *\n * ## The two ways to move a card, and why both\n *\n * - **Drag** (native HTML drag and drop): a card the host allows to move is `draggable`; a column accepts it when it\n * is a different value of the field. The trailing column of rows holding no value is never a target.\n * - **Keyboard**: a movable card is focusable, and Left / Right move it to the neighbouring column. Drag alone would\n * leave the board unusable without a pointer (WCAG 2.1.1). The keys are read only when the CARD itself has focus, so\n * the arrow keys keep their meaning inside the card's own controls.\n *\n * Nothing moves until the host's `onMoveItem` settles: the host updates the row only after the operation succeeded, so\n * a refused move leaves the card exactly where it was (the host reports the backend's refusal). There is no optimistic\n * move to undo.\n */\n\nimport React, { useCallback, useId, useState } from 'react';\nimport { selectHighestRightsVariants, type DataMode } from '@wildo-ai/saas-models';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { buildOperationEnabledKey, useOperationsEnabled } from '~wildo-frontend-lib/core/resources/hooks/useOperationEnabled';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport {\n adjacentBoardColumnValue,\n selectBoardMoveOperation,\n type CollectionBoardColumn,\n} from '~wildo-frontend-lib/components/resources/collection/board/collection-board.frontend.utils';\n\nexport interface ResourceCollectionBody_BoardProps<TItem extends Record<string, unknown>> {\n /** The columns, in vocabulary order, from `boardColumnsFromPages`: each column's loaded rows and its full count. */\n columns: readonly CollectionBoardColumn<TItem>[];\n /** Load the next page of the column holding `value`. */\n onLoadMore: (value: string) => void;\n /** The button under a column that holds more rows than it has loaded. */\n loadMoreLabel: (remaining: number) => string;\n /** Shown in a column whose read failed: its rows and count are not known. */\n columnLoadFailedLabel: string;\n /** The trailing column's words: how many rows hold no value of the field, and where they can be seen. */\n ungroupedNote: (count: number) => string;\n /** The row's card — the same renderer CARDS uses, without its list item (this body supplies the `<li>`). */\n renderCard: (item: TItem, index: number) => React.ReactNode;\n /** The row's stable identifier (the resource's addressable identifier). */\n getItemId: (item: TItem) => string;\n /**\n * The operations a move may call, or `undefined` when the collection declared none or the viewer's roles admit none\n * of its variants (the board is then read-only). Each card adds the operations' own `enabledCondition` against its\n * row, so a card the backend would refuse to move is never draggable.\n */\n transition: BoardTransition | undefined;\n /**\n * Move the row to the column holding `targetValue` through `operation`, the variant this card chose for this viewer\n * and this row. Resolves once the operation has settled, refused or not.\n */\n onMoveItem: (item: TItem, targetValue: string, operation: BoardTransitionOperation) => Promise<void>;\n /** Accessible name of the whole board. */\n boardLabel: string;\n /** Heading of the trailing column of rows holding no value of the field. */\n ungroupedLabel: string;\n /** How many cards a column holds in all (loaded or not), in words. */\n columnCountLabel: (count: number) => string;\n /** The instruction a screen reader gives for a movable card (Left / Right move it). */\n moveHint: string;\n}\n\n/** One operation variant a board move may call. */\nexport type BoardTransitionOperation = FrontendResourceConfiguration_Operation<any, any, any>;\n\n/** The operations a board move may call, and what decides whether a given card may make it. */\nexport interface BoardTransition {\n /**\n * The declared transition's single-row variants whose roles the viewer holds in the organization the collection\n * addresses (`resolveBoardTransitionOperations`, then the host's `viewerMayPerformOperation`). Never empty: a viewer\n * admitted to none gets no transition at all.\n */\n operations: readonly BoardTransitionOperation[];\n resourceType: string;\n /** The data mode the rows were fetched in, so a condition reading a field a summary row lacks is reported. */\n subjectDataMode?: DataMode;\n /** The organization the collection addresses, which the condition is evaluated in. */\n organizationId?: string;\n}\n\n/** The data-transfer type a dragged card carries; scoped so a drag from elsewhere on the page is never accepted. */\nconst BOARD_CARD_DRAG_TYPE = 'application/x-wildo-board-card';\n\nconst NO_OPERATIONS: readonly BoardTransitionOperation[] = [];\n\n/**\n * The variant this card's move calls, or `undefined` when it cannot move: no transition the viewer may perform, or none\n * whose own `enabledCondition` admits THIS row. Among the variants that admit it, the highest-rights one wins, as on\n * the action bar (`selectBoardMoveOperation`). A hook per card, because the condition is evaluated against the row.\n */\nfunction useCardMoveOperation(transition: BoardTransition | undefined, item: Record<string, unknown>): BoardTransitionOperation | undefined {\n const operations = transition?.operations ?? NO_OPERATIONS;\n const enabledMap = useOperationsEnabled(operations as BoardTransitionOperation[], {\n currentObject: item,\n resourceType: transition?.resourceType,\n subjectDataMode: transition?.subjectDataMode,\n organizationId: transition?.organizationId,\n });\n const enabled = operations.filter((operation) => enabledMap.get(buildOperationEnabledKey(operation))?.isEnabled === true);\n return selectBoardMoveOperation(enabled, (variants) => selectHighestRightsVariants(variants as never[]) as BoardTransitionOperation[]);\n}\n\ninterface BoardCardProps<TItem extends Record<string, unknown>> {\n item: TItem;\n index: number;\n itemId: string;\n columnValue: string | null;\n transition: BoardTransition | undefined;\n isMoving: boolean;\n hintId: string;\n renderCard: (item: TItem, index: number) => React.ReactNode;\n onDragStart: (itemId: string, fromValue: string | null, operation: BoardTransitionOperation) => void;\n onDragEnd: () => void;\n /** Move to the neighbouring column in `direction`; the board knows the columns. */\n onKeyboardMove: (item: TItem, fromValue: string | null, direction: -1 | 1, operation: BoardTransitionOperation) => void;\n}\n\nfunction BoardCard<TItem extends Record<string, unknown>>({\n item,\n index,\n itemId,\n columnValue,\n transition,\n isMoving,\n hintId,\n renderCard,\n onDragStart,\n onDragEnd,\n onKeyboardMove,\n}: BoardCardProps<TItem>): React.JSX.Element {\n const moveOperation = useCardMoveOperation(transition, item);\n const movable = moveOperation !== undefined && !isMoving;\n return (\n <li\n className={cn('list-none rounded-md border bg-background', movable && 'cursor-grab', isMoving && 'opacity-60')}\n data-board-card={itemId}\n data-board-card-movable={movable ? 'true' : undefined}\n draggable={movable}\n tabIndex={movable ? 0 : undefined}\n aria-describedby={movable ? hintId : undefined}\n aria-busy={isMoving ? true : undefined}\n onDragStart={(event) => {\n if (!movable || !moveOperation) {\n event.preventDefault();\n return;\n }\n event.dataTransfer.setData(BOARD_CARD_DRAG_TYPE, itemId);\n event.dataTransfer.effectAllowed = 'move';\n onDragStart(itemId, columnValue, moveOperation);\n }}\n onDragEnd={onDragEnd}\n onKeyDown={(event) => {\n // Only the card itself: an arrow key inside the card's own controls keeps its meaning there.\n if (!movable || !moveOperation || event.target !== event.currentTarget) return;\n const direction = event.key === 'ArrowRight' ? 1 : event.key === 'ArrowLeft' ? -1 : 0;\n if (direction === 0) return;\n event.preventDefault();\n onKeyboardMove(item, columnValue, direction, moveOperation);\n }}\n >\n {renderCard(item, index)}\n </li>\n );\n}\n\nexport function ResourceCollectionBody_Board<TItem extends Record<string, unknown>>({\n columns,\n onLoadMore,\n loadMoreLabel,\n columnLoadFailedLabel,\n ungroupedNote,\n renderCard,\n getItemId,\n transition,\n onMoveItem,\n boardLabel,\n ungroupedLabel,\n columnCountLabel,\n moveHint,\n}: ResourceCollectionBody_BoardProps<TItem>): React.JSX.Element {\n const hintId = useId();\n /**\n * The card being dragged, and the column it came from — kept in state because `dragover` cannot read the payload.\n * A drag is only ever STARTED by a card that may move (`BoardCard`), which also chose the variant its move calls, so\n * a drop needs no second permission check.\n */\n const [dragging, setDragging] = useState<{ itemId: string; fromValue: string | null; operation: BoardTransitionOperation } | null>(null);\n const [dropTargetValue, setDropTargetValue] = useState<string | null>(null);\n /** The row whose move is in flight: it cannot be moved again until the first move settles. */\n const [movingItemId, setMovingItemId] = useState<string | null>(null);\n\n const findItem = useCallback((itemId: string): TItem | undefined => {\n for (const column of columns) {\n const found = column.items.find((item) => getItemId(item) === itemId);\n if (found) return found;\n }\n return undefined;\n }, [columns, getItemId]);\n\n const move = useCallback(async (item: TItem, targetValue: string, operation: BoardTransitionOperation) => {\n setMovingItemId(getItemId(item));\n try {\n await onMoveItem(item, targetValue, operation);\n } finally {\n setMovingItemId(null);\n }\n }, [getItemId, onMoveItem]);\n\n const endDrag = useCallback(() => {\n setDragging(null);\n setDropTargetValue(null);\n }, []);\n\n const keyboardMove = useCallback((item: TItem, fromValue: string | null, direction: -1 | 1, operation: BoardTransitionOperation) => {\n const targetValue = adjacentBoardColumnValue(columns, fromValue, direction);\n if (targetValue !== undefined) void move(item, targetValue, operation);\n }, [columns, move]);\n\n let rowIndex = 0;\n return (\n <div role=\"group\" aria-label={boardLabel} className=\"flex gap-group overflow-x-auto pb-item-sm\" data-slot=\"collection-board\">\n <span id={hintId} className=\"sr-only\">{moveHint}</span>\n {columns.map((column) => {\n // A column receives a card from ANOTHER column, and only when it names a value: the trailing column of rows\n // holding none has nothing to set the field to.\n const accepts = column.value !== null && dragging !== null && dragging.fromValue !== column.value;\n const isDropTarget = accepts && dropTargetValue === column.value;\n const heading = column.label ?? ungroupedLabel;\n return (\n <section\n key={column.key}\n aria-label={heading}\n data-board-column={column.key}\n data-drop-target={isDropTarget ? 'true' : undefined}\n className={cn(\n 'flex w-72 shrink-0 flex-col gap-item-sm rounded-lg border bg-muted/20 p-item-sm',\n isDropTarget && 'border-primary bg-muted/40',\n )}\n onDragOver={(event) => {\n if (!accepts) return;\n event.preventDefault();\n event.dataTransfer.dropEffect = 'move';\n if (dropTargetValue !== column.value) setDropTargetValue(column.value);\n }}\n onDragLeave={(event) => {\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return;\n if (dropTargetValue === column.value) setDropTargetValue(null);\n }}\n onDrop={(event) => {\n if (!accepts || column.value === null) return;\n event.preventDefault();\n const itemId = event.dataTransfer.getData(BOARD_CARD_DRAG_TYPE) || dragging?.itemId;\n const operation = dragging?.itemId === itemId ? dragging?.operation : undefined;\n endDrag();\n const item = itemId ? findItem(itemId) : undefined;\n if (item && operation) void move(item, column.value, operation);\n }}\n >\n <header className=\"flex items-baseline justify-between gap-item-sm px-item-xs\">\n <h3 className=\"truncate text-xs font-medium text-muted-foreground\">{heading}</h3>\n <span className=\"shrink-0 text-xs text-muted-foreground\">{column.failed ? null : columnCountLabel(column.total)}</span>\n </header>\n {column.value === null && (\n // The trailing column COUNTS the rows holding no value of the field: they are not on the board, and it\n // says how many there are and where they are seen, so none of them is dropped without a word.\n <p className=\"px-item-xs text-xs text-muted-foreground\">{ungroupedNote(column.total)}</p>\n )}\n {column.failed && <p role=\"alert\" className=\"px-item-xs text-xs text-destructive\">{columnLoadFailedLabel}</p>}\n <ul role=\"list\" aria-label={heading} aria-busy={column.loading ? true : undefined} className=\"flex min-h-16 flex-col gap-item-sm\">\n {column.items.map((item) => {\n const index = rowIndex++;\n const itemId = getItemId(item);\n return (\n <BoardCard<TItem>\n key={itemId || index}\n item={item}\n index={index}\n itemId={itemId}\n columnValue={column.value}\n transition={transition}\n isMoving={movingItemId === itemId}\n hintId={hintId}\n renderCard={renderCard}\n onDragStart={(id, fromValue, operation) => setDragging({ itemId: id, fromValue, operation })}\n onDragEnd={endDrag}\n onKeyboardMove={keyboardMove}\n />\n );\n })}\n </ul>\n {column.value !== null && !column.failed && column.items.length < column.total && (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n disabled={column.loading}\n data-board-load-more={column.key}\n onClick={() => onLoadMore(column.value as string)}\n >\n {loadMoreLabel(column.total - column.items.length)}\n </Button>\n )}\n </section>\n );\n })}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ResourceCollectionBody_Board.js","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/board/ResourceCollectionBody_Board.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAc,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,kEAAkE,CAAC;AAC/H,OAAO,EAAE,2BAA2B,EAAiB,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,8DAA8D,CAAC;AAE9H,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GAEzB,MAAM,2FAA2F,CAAC;AAwDnG,oHAAoH;AACpH,MAAM,oBAAoB,GAAG,gCAAgC,CAAC;AAE9D,MAAM,aAAa,GAAwC,EAAE,CAAC;AAE9D;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,UAAuC,EAAE,IAA6B;IAClG,MAAM,UAAU,GAAG,UAAU,EAAE,UAAU,IAAI,aAAa,CAAC;IAC3D,MAAM,UAAU,GAAG,oBAAoB,CAAC,UAAwC,EAAE;QAChF,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,UAAU,E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AO,0BACF,MAAM,CAAC,GAAG,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,KAAe,CAAC,YAEhD,aAAa,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAC3C,CACV,KAtEI,MAAM,CAAC,GAAG,CAuEP,CACX,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The BOARD body of a resource collection (`CollectionDisplayMode.BOARD`, #2298): one column per value of an enum\n * field, and moving a card between columns calls the operation the collection declared for it.\n *\n * Like `ResourceCollectionBody_Table`, the list host owns the fetched rows, the per-column reads (`useBoardColumnPages`),\n * the card renderer it shares with CARDS, the viewer's ROLE decision and the operation call. This component owns the\n * gesture, and asks each card's row which of the admitted variants' `enabledCondition` admits it, choosing the\n * highest-rights one (`useCardMoveOperation`): a member moves the rows their variant admits, an administrator any.\n *\n * ## The two ways to move a card, and why both\n *\n * - **Drag** (native HTML drag and drop): a card the host allows to move is `draggable`; a column accepts it when it\n * is a different value of the field. The trailing column of rows holding no value is never a target.\n * - **Keyboard**: a movable card is focusable, and Left / Right move it to the neighbouring column. Drag alone would\n * leave the board unusable without a pointer (WCAG 2.1.1). The keys are read only when the CARD itself has focus, so\n * the arrow keys keep their meaning inside the card's own controls.\n *\n * Nothing moves until the host's `onMoveItem` settles: the host updates the row only after the operation succeeded, so\n * a refused move leaves the card exactly where it was (the host reports the backend's refusal). There is no optimistic\n * move to undo.\n */\n\nimport React, { useCallback, useId, useState } from 'react';\nimport { documentHeadingTag, useDocumentHeadingLevel } from '~wildo-frontend-lib/components/typography/document-heading-level';\nimport { selectHighestRightsVariants, type DataMode } from '@wildo-ai/saas-models';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { buildOperationEnabledKey, useOperationsEnabled } from '~wildo-frontend-lib/core/resources/hooks/useOperationEnabled';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport {\n adjacentBoardColumnValue,\n selectBoardMoveOperation,\n type CollectionBoardColumn,\n} from '~wildo-frontend-lib/components/resources/collection/board/collection-board.frontend.utils';\n\nexport interface ResourceCollectionBody_BoardProps<TItem extends Record<string, unknown>> {\n /** The columns, in vocabulary order, from `boardColumnsFromPages`: each column's loaded rows and its full count. */\n columns: readonly CollectionBoardColumn<TItem>[];\n /** Load the next page of the column holding `value`. */\n onLoadMore: (value: string) => void;\n /** The button under a column that holds more rows than it has loaded. */\n loadMoreLabel: (remaining: number) => string;\n /** Shown in a column whose read failed: its rows and count are not known. */\n columnLoadFailedLabel: string;\n /** The trailing column's words: how many rows hold no value of the field, and where they can be seen. */\n ungroupedNote: (count: number) => string;\n /** The row's card — the same renderer CARDS uses, without its list item (this body supplies the `<li>`). */\n renderCard: (item: TItem, index: number) => React.ReactNode;\n /** The row's stable identifier (the resource's addressable identifier). */\n getItemId: (item: TItem) => string;\n /**\n * The operations a move may call, or `undefined` when the collection declared none or the viewer's roles admit none\n * of its variants (the board is then read-only). Each card adds the operations' own `enabledCondition` against its\n * row, so a card the backend would refuse to move is never draggable.\n */\n transition: BoardTransition | undefined;\n /**\n * Move the row to the column holding `targetValue` through `operation`, the variant this card chose for this viewer\n * and this row. Resolves once the operation has settled, refused or not.\n */\n onMoveItem: (item: TItem, targetValue: string, operation: BoardTransitionOperation) => Promise<void>;\n /** Accessible name of the whole board. */\n boardLabel: string;\n /** Heading of the trailing column of rows holding no value of the field. */\n ungroupedLabel: string;\n /** How many cards a column holds in all (loaded or not), in words. */\n columnCountLabel: (count: number) => string;\n /** The instruction a screen reader gives for a movable card (Left / Right move it). */\n moveHint: string;\n}\n\n/** One operation variant a board move may call. */\nexport type BoardTransitionOperation = FrontendResourceConfiguration_Operation<any, any, any>;\n\n/** The operations a board move may call, and what decides whether a given card may make it. */\nexport interface BoardTransition {\n /**\n * The declared transition's single-row variants whose roles the viewer holds in the organization the collection\n * addresses (`resolveBoardTransitionOperations`, then the host's `viewerMayPerformOperation`). Never empty: a viewer\n * admitted to none gets no transition at all.\n */\n operations: readonly BoardTransitionOperation[];\n resourceType: string;\n /** The data mode the rows were fetched in, so a condition reading a field a summary row lacks is reported. */\n subjectDataMode?: DataMode;\n /** The organization the collection addresses, which the condition is evaluated in. */\n organizationId?: string;\n}\n\n/** The data-transfer type a dragged card carries; scoped so a drag from elsewhere on the page is never accepted. */\nconst BOARD_CARD_DRAG_TYPE = 'application/x-wildo-board-card';\n\nconst NO_OPERATIONS: readonly BoardTransitionOperation[] = [];\n\n/**\n * The variant this card's move calls, or `undefined` when it cannot move: no transition the viewer may perform, or none\n * whose own `enabledCondition` admits THIS row. Among the variants that admit it, the highest-rights one wins, as on\n * the action bar (`selectBoardMoveOperation`). A hook per card, because the condition is evaluated against the row.\n */\nfunction useCardMoveOperation(transition: BoardTransition | undefined, item: Record<string, unknown>): BoardTransitionOperation | undefined {\n const operations = transition?.operations ?? NO_OPERATIONS;\n const enabledMap = useOperationsEnabled(operations as BoardTransitionOperation[], {\n currentObject: item,\n resourceType: transition?.resourceType,\n subjectDataMode: transition?.subjectDataMode,\n organizationId: transition?.organizationId,\n });\n const enabled = operations.filter((operation) => enabledMap.get(buildOperationEnabledKey(operation))?.isEnabled === true);\n return selectBoardMoveOperation(enabled, (variants) => selectHighestRightsVariants(variants as never[]) as BoardTransitionOperation[]);\n}\n\ninterface BoardCardProps<TItem extends Record<string, unknown>> {\n item: TItem;\n index: number;\n itemId: string;\n columnValue: string | null;\n transition: BoardTransition | undefined;\n isMoving: boolean;\n hintId: string;\n renderCard: (item: TItem, index: number) => React.ReactNode;\n onDragStart: (itemId: string, fromValue: string | null, operation: BoardTransitionOperation) => void;\n onDragEnd: () => void;\n /** Move to the neighbouring column in `direction`; the board knows the columns. */\n onKeyboardMove: (item: TItem, fromValue: string | null, direction: -1 | 1, operation: BoardTransitionOperation) => void;\n}\n\nfunction BoardCard<TItem extends Record<string, unknown>>({\n item,\n index,\n itemId,\n columnValue,\n transition,\n isMoving,\n hintId,\n renderCard,\n onDragStart,\n onDragEnd,\n onKeyboardMove,\n}: BoardCardProps<TItem>): React.JSX.Element {\n const moveOperation = useCardMoveOperation(transition, item);\n const movable = moveOperation !== undefined && !isMoving;\n return (\n <li\n className={cn('list-none rounded-md border bg-background', movable && 'cursor-grab', isMoving && 'opacity-60')}\n data-board-card={itemId}\n data-board-card-movable={movable ? 'true' : undefined}\n draggable={movable}\n tabIndex={movable ? 0 : undefined}\n aria-describedby={movable ? hintId : undefined}\n aria-busy={isMoving ? true : undefined}\n onDragStart={(event) => {\n if (!movable || !moveOperation) {\n event.preventDefault();\n return;\n }\n event.dataTransfer.setData(BOARD_CARD_DRAG_TYPE, itemId);\n event.dataTransfer.effectAllowed = 'move';\n onDragStart(itemId, columnValue, moveOperation);\n }}\n onDragEnd={onDragEnd}\n onKeyDown={(event) => {\n // Only the card itself: an arrow key inside the card's own controls keeps its meaning there.\n if (!movable || !moveOperation || event.target !== event.currentTarget) return;\n const direction = event.key === 'ArrowRight' ? 1 : event.key === 'ArrowLeft' ? -1 : 0;\n if (direction === 0) return;\n event.preventDefault();\n onKeyboardMove(item, columnValue, direction, moveOperation);\n }}\n >\n {renderCard(item, index)}\n </li>\n );\n}\n\nexport function ResourceCollectionBody_Board<TItem extends Record<string, unknown>>({\n columns,\n onLoadMore,\n loadMoreLabel,\n columnLoadFailedLabel,\n ungroupedNote,\n renderCard,\n getItemId,\n transition,\n onMoveItem,\n boardLabel,\n ungroupedLabel,\n columnCountLabel,\n moveHint,\n}: ResourceCollectionBody_BoardProps<TItem>): React.JSX.Element {\n // A column's heading takes the outline's level under the page's `h1`; a fixed `h3` skipped one (#3867).\n const ColumnHeadingTag = documentHeadingTag(useDocumentHeadingLevel());\n const hintId = useId();\n /**\n * The card being dragged, and the column it came from — kept in state because `dragover` cannot read the payload.\n * A drag is only ever STARTED by a card that may move (`BoardCard`), which also chose the variant its move calls, so\n * a drop needs no second permission check.\n */\n const [dragging, setDragging] = useState<{ itemId: string; fromValue: string | null; operation: BoardTransitionOperation } | null>(null);\n const [dropTargetValue, setDropTargetValue] = useState<string | null>(null);\n /** The row whose move is in flight: it cannot be moved again until the first move settles. */\n const [movingItemId, setMovingItemId] = useState<string | null>(null);\n\n const findItem = useCallback((itemId: string): TItem | undefined => {\n for (const column of columns) {\n const found = column.items.find((item) => getItemId(item) === itemId);\n if (found) return found;\n }\n return undefined;\n }, [columns, getItemId]);\n\n const move = useCallback(async (item: TItem, targetValue: string, operation: BoardTransitionOperation) => {\n setMovingItemId(getItemId(item));\n try {\n await onMoveItem(item, targetValue, operation);\n } finally {\n setMovingItemId(null);\n }\n }, [getItemId, onMoveItem]);\n\n const endDrag = useCallback(() => {\n setDragging(null);\n setDropTargetValue(null);\n }, []);\n\n const keyboardMove = useCallback((item: TItem, fromValue: string | null, direction: -1 | 1, operation: BoardTransitionOperation) => {\n const targetValue = adjacentBoardColumnValue(columns, fromValue, direction);\n if (targetValue !== undefined) void move(item, targetValue, operation);\n }, [columns, move]);\n\n let rowIndex = 0;\n return (\n <div role=\"group\" aria-label={boardLabel} className=\"flex gap-group overflow-x-auto pb-item-sm\" data-slot=\"collection-board\">\n <span id={hintId} className=\"sr-only\">{moveHint}</span>\n {columns.map((column) => {\n // A column receives a card from ANOTHER column, and only when it names a value: the trailing column of rows\n // holding none has nothing to set the field to.\n const accepts = column.value !== null && dragging !== null && dragging.fromValue !== column.value;\n const isDropTarget = accepts && dropTargetValue === column.value;\n const heading = column.label ?? ungroupedLabel;\n return (\n <section\n key={column.key}\n aria-label={heading}\n data-board-column={column.key}\n data-drop-target={isDropTarget ? 'true' : undefined}\n className={cn(\n 'flex w-72 shrink-0 flex-col gap-item-sm rounded-lg border bg-muted/20 p-item-sm',\n isDropTarget && 'border-primary bg-muted/40',\n )}\n onDragOver={(event) => {\n if (!accepts) return;\n event.preventDefault();\n event.dataTransfer.dropEffect = 'move';\n if (dropTargetValue !== column.value) setDropTargetValue(column.value);\n }}\n onDragLeave={(event) => {\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return;\n if (dropTargetValue === column.value) setDropTargetValue(null);\n }}\n onDrop={(event) => {\n if (!accepts || column.value === null) return;\n event.preventDefault();\n const itemId = event.dataTransfer.getData(BOARD_CARD_DRAG_TYPE) || dragging?.itemId;\n const operation = dragging?.itemId === itemId ? dragging?.operation : undefined;\n endDrag();\n const item = itemId ? findItem(itemId) : undefined;\n if (item && operation) void move(item, column.value, operation);\n }}\n >\n <header className=\"flex items-baseline justify-between gap-item-sm px-item-xs\">\n <ColumnHeadingTag className=\"truncate text-xs font-medium text-muted-foreground\">{heading}</ColumnHeadingTag>\n <span className=\"shrink-0 text-xs text-muted-foreground\">{column.failed ? null : columnCountLabel(column.total)}</span>\n </header>\n {column.value === null && (\n // The trailing column COUNTS the rows holding no value of the field: they are not on the board, and it\n // says how many there are and where they are seen, so none of them is dropped without a word.\n <p className=\"px-item-xs text-xs text-muted-foreground\">{ungroupedNote(column.total)}</p>\n )}\n {column.failed && <p role=\"alert\" className=\"px-item-xs text-xs text-destructive\">{columnLoadFailedLabel}</p>}\n <ul role=\"list\" aria-label={heading} aria-busy={column.loading ? true : undefined} className=\"flex min-h-16 flex-col gap-item-sm\">\n {column.items.map((item) => {\n const index = rowIndex++;\n const itemId = getItemId(item);\n return (\n <BoardCard<TItem>\n key={itemId || index}\n item={item}\n index={index}\n itemId={itemId}\n columnValue={column.value}\n transition={transition}\n isMoving={movingItemId === itemId}\n hintId={hintId}\n renderCard={renderCard}\n onDragStart={(id, fromValue, operation) => setDragging({ itemId: id, fromValue, operation })}\n onDragEnd={endDrag}\n onKeyboardMove={keyboardMove}\n />\n );\n })}\n </ul>\n {column.value !== null && !column.failed && column.items.length < column.total && (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n disabled={column.loading}\n data-board-load-more={column.key}\n onClick={() => onLoadMore(column.value as string)}\n >\n {loadMoreLabel(column.total - column.items.length)}\n </Button>\n )}\n </section>\n );\n })}\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceCollectionBody_Calendar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/calendar/ResourceCollectionBody_Calendar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAA0D,MAAM,OAAO,CAAC;AAO/E,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,iGAAiG,CAAC;AAEzG,MAAM,WAAW,oCAAoC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzF,mEAAmE;IACnE,KAAK,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,CAAC;IAC/C,mFAAmF;IACnF,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC,CAAC;IAClD,6DAA6D;IAC7D,KAAK,EAAE,IAAI,CAAC;IACZ,kDAAkD;IAClD,KAAK,EAAE,IAAI,CAAC;IACZ,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,aAAa,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IACrC,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,sCAAsC;IACtC,cAAc,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,CAAC;IACtC,4EAA4E;IAC5E,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACnC,yCAAyC;IACzC,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACtC,2FAA2F;IAC3F,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC;IACtC,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAID,wBAAgB,+BAA+B,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACrF,KAAK,EACL,UAAU,EACV,KAAK,EACL,KAAK,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,aAAa,EACb,cAAc,EACd,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,YAAY,GACb,EAAE,oCAAoC,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAuJjE"}
1
+ {"version":3,"file":"ResourceCollectionBody_Calendar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/calendar/ResourceCollectionBody_Calendar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAA0D,MAAM,OAAO,CAAC;AAQ/E,OAAO,EAML,KAAK,eAAe,EACrB,MAAM,iGAAiG,CAAC;AAEzG,MAAM,WAAW,oCAAoC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzF,mEAAmE;IACnE,KAAK,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,CAAC;IAC/C,mFAAmF;IACnF,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC,CAAC;IAClD,6DAA6D;IAC7D,KAAK,EAAE,IAAI,CA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G,CAAC,OAAO,CAyJjE"}
@@ -15,6 +15,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  * items of other days are reached by moving to their day first, so a month of rows does not become a hundred tab stops.
16
16
  */
17
17
  import { useCallback, useEffect, useId, useRef, useState } from 'react';
18
+ import { documentHeadingTag, useDocumentHeadingLevel } from '../../../../components/typography/document-heading-level.js';
18
19
  import { ButtonSize } from '@wildo-ai/presets-components-models';
19
20
  import { cn } from '../../../../core/ui/cn.js';
20
21
  import { focusIndicatorClasses, FocusIndicatorShape } from '../../../../core/ui/themes/focus-indicator.js';
@@ -24,6 +25,8 @@ import { IconSize, StandardIconReference } from '../../../../core/icons/icon-reg
24
25
  import { calendarDayKey, calendarKeyboardStep, calendarMonthOf, moveCalendarFocus, shiftCalendarMonth, } from '../../../../components/resources/collection/calendar/collection-calendar.frontend.utils.js';
25
26
  const NO_ITEMS = [];
26
27
  export function ResourceCollectionBody_Calendar({ weeks, itemsByDay, month, today, firstDayOfWeek, onMonthChange, monthHeading, weekdayLabels, dayNumberLabel, dayLabel, getItemId, getItemLabel, canOpenItem, onOpenItem, calendarLabel, previousMonthLabel, nextMonthLabel, todayLabel, keyboardHint, }) {
28
+ // The month heading takes the outline's level under the page's `h1`; a fixed `h3` skipped one (#3867).
29
+ const MonthHeadingTag = documentHeadingTag(useDocumentHeadingLevel());
27
30
  const hintId = useId();
28
31
  const headingId = useId();
29
32
  const { renderIcon } = useIconRegistry();
@@ -61,7 +64,7 @@ export function ResourceCollectionBody_Calendar({ weeks, itemsByDay, month, toda
61
64
  focusDay(moveCalendarFocus(day, step, firstDayOfWeek));
62
65
  };
63
66
  const todayKey = calendarDayKey(today);
64
- return (_jsxs("div", { className: "flex flex-col gap-item-sm", "data-slot": "collection-calendar", children: [_jsxs("div", { className: "flex items-center gap-item-sm", children: [_jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.ICON_SM, "aria-label": previousMonthLabel, title: previousMonthLabel, onClick: () => onMonthChange(shiftCalendarMonth(month, -1)), children: _jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.CHEVRON_LEFT, { size: IconSize.SM }) }) }), _jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.ICON_SM, "aria-label": nextMonthLabel, title: nextMonthLabel, onClick: () => onMonthChange(shiftCalendarMonth(month, 1)), children: _jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.CHEVRON_RIGHT, { size: IconSize.SM }) }) }), _jsx("h3", { id: headingId, className: "text-sm font-medium", "aria-live": "polite", children: monthHeading }), _jsx(Button, { variant: ButtonVariants_Variant.GHOST, size: ButtonSize.SM, className: "ms-auto", onClick: () => focusDay(today), children: todayLabel })] }), _jsx("span", { id: hintId, className: "sr-only", children: keyboardHint }), _jsxs("table", { ref: gridRef, role: "grid", "aria-label": calendarLabel, "aria-describedby": hintId, className: "w-full table-fixed border-collapse", children: [_jsx("caption", { className: "sr-only", children: monthHeading }), _jsx("thead", { children: _jsx("tr", { children: weekdayLabels.map((label, index) => (_jsx("th", { scope: "col", className: "pb-item-xs text-xs font-medium text-muted-foreground", children: label }, index))) }) }), _jsx("tbody", { children: weeks.map((week) => (_jsx("tr", { children: week.map(({ day, key, inMonth }) => {
67
+ return (_jsxs("div", { className: "flex flex-col gap-item-sm", "data-slot": "collection-calendar", children: [_jsxs("div", { className: "flex items-center gap-item-sm", children: [_jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.ICON_SM, "aria-label": previousMonthLabel, title: previousMonthLabel, onClick: () => onMonthChange(shiftCalendarMonth(month, -1)), children: _jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.CHEVRON_LEFT, { size: IconSize.SM }) }) }), _jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.ICON_SM, "aria-label": nextMonthLabel, title: nextMonthLabel, onClick: () => onMonthChange(shiftCalendarMonth(month, 1)), children: _jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.CHEVRON_RIGHT, { size: IconSize.SM }) }) }), _jsx(MonthHeadingTag, { id: headingId, className: "text-sm font-medium", "aria-live": "polite", children: monthHeading }), _jsx(Button, { variant: ButtonVariants_Variant.GHOST, size: ButtonSize.SM, className: "ms-auto", onClick: () => focusDay(today), children: todayLabel })] }), _jsx("span", { id: hintId, className: "sr-only", children: keyboardHint }), _jsxs("table", { ref: gridRef, role: "grid", "aria-label": calendarLabel, "aria-describedby": hintId, className: "w-full table-fixed border-collapse", children: [_jsx("caption", { className: "sr-only", children: monthHeading }), _jsx("thead", { children: _jsx("tr", { children: weekdayLabels.map((label, index) => (_jsx("th", { scope: "col", className: "pb-item-xs text-xs font-medium text-muted-foreground", children: label }, index))) }) }), _jsx("tbody", { children: weeks.map((week) => (_jsx("tr", { children: week.map(({ day, key, inMonth }) => {
65
68
  const items = itemsByDay.get(key) ?? NO_ITEMS;
66
69
  const isFocused = key === focusedKey;
67
70
  return (_jsxs("td", { role: "gridcell", "data-calendar-day": key, "data-in-month": inMonth ? 'true' : undefined, "data-today": key === todayKey ? 'true' : undefined, "aria-label": dayLabel(day, items.length), "aria-current": key === todayKey ? 'date' : undefined, tabIndex: isFocused ? 0 : -1, onKeyDown: (event) => onDayKeyDown(event, day), onFocus: (event) => { if (event.target === event.currentTarget && !isFocused)
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceCollectionBody_Calendar.js","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/calendar/ResourceCollectionBody_Calendar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oD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4CACJ,CAAC,CAAC,GACC,CACN,KApDI,GAAG,CAqDL,CACN,CAAC;4BACJ,CAAC,CAAC,IA7DK,IAAI,CAAC,CAAC,CAAE,CAAC,GAAG,CA8DhB,CACN,CAAC,GACI,IACF,IACJ,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The CALENDAR body of a resource collection (`CollectionDisplayMode.CALENDAR`, #2298): a month grid, each row on the\n * day its date field falls on.\n *\n * Like the table and board bodies, the list host owns the fetch (whose window on the date field IS the visible weeks,\n * so moving to another month refetches), the bucketing by day, the row's label and what opening a row does. This\n * component owns the grid, the month navigation and the keyboard.\n *\n * ## Keyboard (the WAI-ARIA date-grid pattern)\n *\n * The grid is one tab stop: the FOCUSED day. Arrow keys move between days (Left/Right a day, Up/Down a week), Home/End\n * to the start and end of the week, Page Up/Page Down a month. Moving past the displayed month shows the neighbouring\n * month, and the focus follows. Tab from the focused day reaches that day's items (buttons), and only that day's: the\n * items of other days are reached by moving to their day first, so a month of rows does not become a hundred tab stops.\n */\n\nimport React, { useCallback, useEffect, useId, useRef, useState } from 'react';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { focusIndicatorClasses, FocusIndicatorShape } from '~wildo-frontend-lib/core/ui/themes/focus-indicator';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport { IconSize, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport {\n calendarDayKey,\n calendarKeyboardStep,\n calendarMonthOf,\n moveCalendarFocus,\n shiftCalendarMonth,\n type CalendarGridDay,\n} from '~wildo-frontend-lib/components/resources/collection/calendar/collection-calendar.frontend.utils';\n\nexport interface ResourceCollectionBody_CalendarProps<TItem extends Record<string, unknown>> {\n /** The weeks of the displayed month (`buildCalendarMonthGrid`). */\n weeks: readonly (readonly CalendarGridDay[])[];\n /** The rows of each day, keyed by `calendarDayKey` (`groupItemsByCalendarDay`). */\n itemsByDay: ReadonlyMap<string, readonly TItem[]>;\n /** The first day of the displayed month, as UTC midnight. */\n month: Date;\n /** Today, as UTC midnight of the reader's day. */\n today: Date;\n /** The first day of the reader's week, `0` Sunday … `6` Saturday. */\n firstDayOfWeek: number;\n /** Show another month (the host moves its fetch window with it). */\n onMonthChange: (month: Date) => void;\n /** The heading of the displayed month (\"November 2026\"). */\n monthHeading: string;\n /** The seven weekday column headings, in grid order. */\n weekdayLabels: readonly string[];\n /** The day number shown in a cell. */\n dayNumberLabel: (day: Date) => string;\n /** A day cell's accessible name: its date and how many items fall on it. */\n dayLabel: (day: Date, count: number) => string;\n getItemId: (item: TItem) => string;\n /** The row's name as a list shows it. */\n getItemLabel: (item: TItem) => string;\n /** Whether the row can be opened; one that cannot is shown and not offered as a button. */\n canOpenItem: (item: TItem) => boolean;\n onOpenItem: (item: TItem) => void;\n calendarLabel: string;\n previousMonthLabel: string;\n nextMonthLabel: string;\n todayLabel: string;\n keyboardHint: string;\n}\n\nconst NO_ITEMS: readonly unknown[] = [];\n\nexport function ResourceCollectionBody_Calendar<TItem extends Record<string, unknown>>({\n weeks,\n itemsByDay,\n month,\n today,\n firstDayOfWeek,\n onMonthChange,\n monthHeading,\n weekdayLabels,\n dayNumberLabel,\n dayLabel,\n getItemId,\n getItemLabel,\n canOpenItem,\n onOpenItem,\n calendarLabel,\n previousMonthLabel,\n nextMonthLabel,\n todayLabel,\n keyboardHint,\n}: ResourceCollectionBody_CalendarProps<TItem>): React.JSX.Element {\n const hintId = useId();\n const headingId = useId();\n const { renderIcon } = useIconRegistry();\n const gridRef = useRef<HTMLTableElement>(null);\n /** The day holding the grid's single tab stop. Kept inside the displayed month when the month changes. */\n const [focusedDay, setFocusedDay] = useState<Date>(() => (calendarMonthOf(today).getTime() === calendarMonthOf(month).getTime() ? today : calendarMonthOf(month)));\n /** Set by a keyboard move, so the focus follows the move once the grid has re-rendered (the month may change). */\n const moveFocusRef = useRef(false);\n\n // A month changed by the buttons (or by the host) brings the tab stop with it.\n useEffect(() => {\n setFocusedDay((current) => (calendarMonthOf(current).getTime() === calendarMonthOf(month).getTime() ? current : calendarMonthOf(month)));\n }, [month]);\n\n const focusedKey = calendarDayKey(focusedDay);\n useEffect(() => {\n if (!moveFocusRef.current) return;\n moveFocusRef.current = false;\n gridRef.current?.querySelector<HTMLElement>(`[data-calendar-day=\"${focusedKey}\"]`)?.focus();\n }, [focusedKey, weeks]);\n\n const focusDay = useCallback((day: Date) => {\n moveFocusRef.current = true;\n setFocusedDay(day);\n const target = calendarMonthOf(day);\n if (target.getTime() !== calendarMonthOf(month).getTime()) onMonthChange(target);\n }, [month, onMonthChange]);\n\n const onDayKeyDown = (event: React.KeyboardEvent<HTMLElement>, day: Date) => {\n // Only the day cell itself: the arrow keys keep their meaning on the items inside it.\n if (event.target !== event.currentTarget) return;\n const step = calendarKeyboardStep(event.key);\n if (!step) return;\n event.preventDefault();\n focusDay(moveCalendarFocus(day, step, firstDayOfWeek));\n };\n\n const todayKey = calendarDayKey(today);\n return (\n <div className=\"flex flex-col gap-item-sm\" data-slot=\"collection-calendar\">\n <div className=\"flex items-center gap-item-sm\">\n <Button\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.ICON_SM}\n aria-label={previousMonthLabel}\n title={previousMonthLabel}\n onClick={() => onMonthChange(shiftCalendarMonth(month, -1))}\n >\n <span aria-hidden=\"true\">{renderIcon(StandardIconReference.CHEVRON_LEFT, { size: IconSize.SM })}</span>\n </Button>\n <Button\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.ICON_SM}\n aria-label={nextMonthLabel}\n title={nextMonthLabel}\n onClick={() => onMonthChange(shiftCalendarMonth(month, 1))}\n >\n <span aria-hidden=\"true\">{renderIcon(StandardIconReference.CHEVRON_RIGHT, { size: IconSize.SM })}</span>\n </Button>\n <h3 id={headingId} className=\"text-sm font-medium\" aria-live=\"polite\">{monthHeading}</h3>\n <Button variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} className=\"ms-auto\" onClick={() => focusDay(today)}>\n {todayLabel}\n </Button>\n </div>\n <span id={hintId} className=\"sr-only\">{keyboardHint}</span>\n <table\n ref={gridRef}\n role=\"grid\"\n aria-label={calendarLabel}\n aria-describedby={hintId}\n className=\"w-full table-fixed border-collapse\"\n >\n <caption className=\"sr-only\">{monthHeading}</caption>\n <thead>\n <tr>\n {weekdayLabels.map((label, index) => (\n <th key={index} scope=\"col\" className=\"pb-item-xs text-xs font-medium text-muted-foreground\">{label}</th>\n ))}\n </tr>\n </thead>\n <tbody>\n {weeks.map((week) => (\n <tr key={week[0]!.key}>\n {week.map(({ day, key, inMonth }) => {\n const items = itemsByDay.get(key) ?? (NO_ITEMS as readonly TItem[]);\n const isFocused = key === focusedKey;\n return (\n <td\n key={key}\n role=\"gridcell\"\n data-calendar-day={key}\n data-in-month={inMonth ? 'true' : undefined}\n data-today={key === todayKey ? 'true' : undefined}\n aria-label={dayLabel(day, items.length)}\n aria-current={key === todayKey ? 'date' : undefined}\n tabIndex={isFocused ? 0 : -1}\n onKeyDown={(event) => onDayKeyDown(event, day)}\n onFocus={(event) => { if (event.target === event.currentTarget && !isFocused) setFocusedDay(day); }}\n className={cn(\n // A day cell sits packed in the grid, its neighbours flush against it: the INSET shape draws\n // inside the box so no neighbour or clipping ancestor covers it.\n 'h-24 border align-top p-item-xs',\n focusIndicatorClasses(FocusIndicatorShape.INSET),\n !inMonth && 'bg-muted/30 text-muted-foreground',\n )}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n 'mb-item-xs inline-flex size-6 items-center justify-center rounded-full text-xs',\n key === todayKey && 'bg-primary text-primary-foreground',\n )}\n >\n {dayNumberLabel(day)}\n </span>\n {items.length > 0 && (\n <ul role=\"list\" className=\"flex max-h-28 flex-col gap-px overflow-y-auto\">\n {items.map((item) => {\n const itemId = getItemId(item);\n const label = getItemLabel(item);\n return (\n <li key={itemId} className=\"list-none\" data-calendar-item={itemId}>\n {canOpenItem(item) ? (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.XS}\n tabIndex={isFocused ? 0 : -1}\n className=\"h-auto w-full justify-start truncate px-item-xs py-px text-start text-xs font-normal\"\n title={label}\n onClick={() => onOpenItem(item)}\n >\n {label}\n </Button>\n ) : (\n <span className=\"block truncate px-item-xs text-xs\" title={label}>{label}</span>\n )}\n </li>\n );\n })}\n </ul>\n )}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ResourceCollectionBody_Calendar.js","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/calendar/ResourceCollectionBody_Calendar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,kEAAkE,CAAC;AAC/H,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AAChH,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAChH,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,GAEnB,MAAM,iGAAiG,CAAC;AAoCzG,MAAM,QAAQ,GAAuB,EAAE,CAAC;AAExC,MAAM,UAAU,+BAA+B,CAAwC,EACrF,KAAK,EACL,UAAU,EACV,KAAK,EACL,KAA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EAAE,EAAE,CACX,gFAAgF,EAChF,GAAG,KAAK,QAAQ,IAAI,oCAAoC,CACzD,YAEA,cAAc,CAAC,GAAG,CAAC,GACf,EACN,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACnB,aAAI,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,+CAA+C,YACtE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gDAClB,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gDAC/B,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;gDACjC,OAAO,CACL,aAAiB,SAAS,EAAC,WAAW,wBAAqB,MAAM,YAC9D,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACnB,KAAC,MAAM,IACL,OAAO,EAAE,sBAAsB,CAAC,KAAK,EACrC,IAAI,EAAE,UAAU,CAAC,EAAE,EACnB,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5B,SAAS,EAAC,sFAAsF,EAChG,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,YAE9B,KAAK,GACC,CACV,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAC,mCAAmC,EAAC,KAAK,EAAE,KAAK,YAAG,KAAK,GAAQ,CACjF,IAdM,MAAM,CAeV,CACN,CAAC;4CACJ,CAAC,CAAC,GACC,CACN,KApDI,GAAG,CAqDL,CACN,CAAC;4BACJ,CAAC,CAAC,IA7DK,IAAI,CAAC,CAAC,CAAE,CAAC,GAAG,CA8DhB,CACN,CAAC,GACI,IACF,IACJ,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The CALENDAR body of a resource collection (`CollectionDisplayMode.CALENDAR`, #2298): a month grid, each row on the\n * day its date field falls on.\n *\n * Like the table and board bodies, the list host owns the fetch (whose window on the date field IS the visible weeks,\n * so moving to another month refetches), the bucketing by day, the row's label and what opening a row does. This\n * component owns the grid, the month navigation and the keyboard.\n *\n * ## Keyboard (the WAI-ARIA date-grid pattern)\n *\n * The grid is one tab stop: the FOCUSED day. Arrow keys move between days (Left/Right a day, Up/Down a week), Home/End\n * to the start and end of the week, Page Up/Page Down a month. Moving past the displayed month shows the neighbouring\n * month, and the focus follows. Tab from the focused day reaches that day's items (buttons), and only that day's: the\n * items of other days are reached by moving to their day first, so a month of rows does not become a hundred tab stops.\n */\n\nimport React, { useCallback, useEffect, useId, useRef, useState } from 'react';\nimport { documentHeadingTag, useDocumentHeadingLevel } from '~wildo-frontend-lib/components/typography/document-heading-level';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { focusIndicatorClasses, FocusIndicatorShape } from '~wildo-frontend-lib/core/ui/themes/focus-indicator';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport { IconSize, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport {\n calendarDayKey,\n calendarKeyboardStep,\n calendarMonthOf,\n moveCalendarFocus,\n shiftCalendarMonth,\n type CalendarGridDay,\n} from '~wildo-frontend-lib/components/resources/collection/calendar/collection-calendar.frontend.utils';\n\nexport interface ResourceCollectionBody_CalendarProps<TItem extends Record<string, unknown>> {\n /** The weeks of the displayed month (`buildCalendarMonthGrid`). */\n weeks: readonly (readonly CalendarGridDay[])[];\n /** The rows of each day, keyed by `calendarDayKey` (`groupItemsByCalendarDay`). */\n itemsByDay: ReadonlyMap<string, readonly TItem[]>;\n /** The first day of the displayed month, as UTC midnight. */\n month: Date;\n /** Today, as UTC midnight of the reader's day. */\n today: Date;\n /** The first day of the reader's week, `0` Sunday … `6` Saturday. */\n firstDayOfWeek: number;\n /** Show another month (the host moves its fetch window with it). */\n onMonthChange: (month: Date) => void;\n /** The heading of the displayed month (\"November 2026\"). */\n monthHeading: string;\n /** The seven weekday column headings, in grid order. */\n weekdayLabels: readonly string[];\n /** The day number shown in a cell. */\n dayNumberLabel: (day: Date) => string;\n /** A day cell's accessible name: its date and how many items fall on it. */\n dayLabel: (day: Date, count: number) => string;\n getItemId: (item: TItem) => string;\n /** The row's name as a list shows it. */\n getItemLabel: (item: TItem) => string;\n /** Whether the row can be opened; one that cannot is shown and not offered as a button. */\n canOpenItem: (item: TItem) => boolean;\n onOpenItem: (item: TItem) => void;\n calendarLabel: string;\n previousMonthLabel: string;\n nextMonthLabel: string;\n todayLabel: string;\n keyboardHint: string;\n}\n\nconst NO_ITEMS: readonly unknown[] = [];\n\nexport function ResourceCollectionBody_Calendar<TItem extends Record<string, unknown>>({\n weeks,\n itemsByDay,\n month,\n today,\n firstDayOfWeek,\n onMonthChange,\n monthHeading,\n weekdayLabels,\n dayNumberLabel,\n dayLabel,\n getItemId,\n getItemLabel,\n canOpenItem,\n onOpenItem,\n calendarLabel,\n previousMonthLabel,\n nextMonthLabel,\n todayLabel,\n keyboardHint,\n}: ResourceCollectionBody_CalendarProps<TItem>): React.JSX.Element {\n // The month heading takes the outline's level under the page's `h1`; a fixed `h3` skipped one (#3867).\n const MonthHeadingTag = documentHeadingTag(useDocumentHeadingLevel());\n const hintId = useId();\n const headingId = useId();\n const { renderIcon } = useIconRegistry();\n const gridRef = useRef<HTMLTableElement>(null);\n /** The day holding the grid's single tab stop. Kept inside the displayed month when the month changes. */\n const [focusedDay, setFocusedDay] = useState<Date>(() => (calendarMonthOf(today).getTime() === calendarMonthOf(month).getTime() ? today : calendarMonthOf(month)));\n /** Set by a keyboard move, so the focus follows the move once the grid has re-rendered (the month may change). */\n const moveFocusRef = useRef(false);\n\n // A month changed by the buttons (or by the host) brings the tab stop with it.\n useEffect(() => {\n setFocusedDay((current) => (calendarMonthOf(current).getTime() === calendarMonthOf(month).getTime() ? current : calendarMonthOf(month)));\n }, [month]);\n\n const focusedKey = calendarDayKey(focusedDay);\n useEffect(() => {\n if (!moveFocusRef.current) return;\n moveFocusRef.current = false;\n gridRef.current?.querySelector<HTMLElement>(`[data-calendar-day=\"${focusedKey}\"]`)?.focus();\n }, [focusedKey, weeks]);\n\n const focusDay = useCallback((day: Date) => {\n moveFocusRef.current = true;\n setFocusedDay(day);\n const target = calendarMonthOf(day);\n if (target.getTime() !== calendarMonthOf(month).getTime()) onMonthChange(target);\n }, [month, onMonthChange]);\n\n const onDayKeyDown = (event: React.KeyboardEvent<HTMLElement>, day: Date) => {\n // Only the day cell itself: the arrow keys keep their meaning on the items inside it.\n if (event.target !== event.currentTarget) return;\n const step = calendarKeyboardStep(event.key);\n if (!step) return;\n event.preventDefault();\n focusDay(moveCalendarFocus(day, step, firstDayOfWeek));\n };\n\n const todayKey = calendarDayKey(today);\n return (\n <div className=\"flex flex-col gap-item-sm\" data-slot=\"collection-calendar\">\n <div className=\"flex items-center gap-item-sm\">\n <Button\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.ICON_SM}\n aria-label={previousMonthLabel}\n title={previousMonthLabel}\n onClick={() => onMonthChange(shiftCalendarMonth(month, -1))}\n >\n <span aria-hidden=\"true\">{renderIcon(StandardIconReference.CHEVRON_LEFT, { size: IconSize.SM })}</span>\n </Button>\n <Button\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.ICON_SM}\n aria-label={nextMonthLabel}\n title={nextMonthLabel}\n onClick={() => onMonthChange(shiftCalendarMonth(month, 1))}\n >\n <span aria-hidden=\"true\">{renderIcon(StandardIconReference.CHEVRON_RIGHT, { size: IconSize.SM })}</span>\n </Button>\n <MonthHeadingTag id={headingId} className=\"text-sm font-medium\" aria-live=\"polite\">{monthHeading}</MonthHeadingTag>\n <Button variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} className=\"ms-auto\" onClick={() => focusDay(today)}>\n {todayLabel}\n </Button>\n </div>\n <span id={hintId} className=\"sr-only\">{keyboardHint}</span>\n <table\n ref={gridRef}\n role=\"grid\"\n aria-label={calendarLabel}\n aria-describedby={hintId}\n className=\"w-full table-fixed border-collapse\"\n >\n <caption className=\"sr-only\">{monthHeading}</caption>\n <thead>\n <tr>\n {weekdayLabels.map((label, index) => (\n <th key={index} scope=\"col\" className=\"pb-item-xs text-xs font-medium text-muted-foreground\">{label}</th>\n ))}\n </tr>\n </thead>\n <tbody>\n {weeks.map((week) => (\n <tr key={week[0]!.key}>\n {week.map(({ day, key, inMonth }) => {\n const items = itemsByDay.get(key) ?? (NO_ITEMS as readonly TItem[]);\n const isFocused = key === focusedKey;\n return (\n <td\n key={key}\n role=\"gridcell\"\n data-calendar-day={key}\n data-in-month={inMonth ? 'true' : undefined}\n data-today={key === todayKey ? 'true' : undefined}\n aria-label={dayLabel(day, items.length)}\n aria-current={key === todayKey ? 'date' : undefined}\n tabIndex={isFocused ? 0 : -1}\n onKeyDown={(event) => onDayKeyDown(event, day)}\n onFocus={(event) => { if (event.target === event.currentTarget && !isFocused) setFocusedDay(day); }}\n className={cn(\n // A day cell sits packed in the grid, its neighbours flush against it: the INSET shape draws\n // inside the box so no neighbour or clipping ancestor covers it.\n 'h-24 border align-top p-item-xs',\n focusIndicatorClasses(FocusIndicatorShape.INSET),\n !inMonth && 'bg-muted/30 text-muted-foreground',\n )}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n 'mb-item-xs inline-flex size-6 items-center justify-center rounded-full text-xs',\n key === todayKey && 'bg-primary text-primary-foreground',\n )}\n >\n {dayNumberLabel(day)}\n </span>\n {items.length > 0 && (\n <ul role=\"list\" className=\"flex max-h-28 flex-col gap-px overflow-y-auto\">\n {items.map((item) => {\n const itemId = getItemId(item);\n const label = getItemLabel(item);\n return (\n <li key={itemId} className=\"list-none\" data-calendar-item={itemId}>\n {canOpenItem(item) ? (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.XS}\n tabIndex={isFocused ? 0 : -1}\n className=\"h-auto w-full justify-start truncate px-item-xs py-px text-start text-xs font-normal\"\n title={label}\n onClick={() => onOpenItem(item)}\n >\n {label}\n </Button>\n ) : (\n <span className=\"block truncate px-item-xs text-xs\" title={label}>{label}</span>\n )}\n </li>\n );\n })}\n </ul>\n )}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceCollectionBody_Timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/timeline/ResourceCollectionBody_Timeline.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAiB,MAAM,OAAO,CAAC;AAOtC,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,iGAAiG,CAAC;AAEzJ,MAAM,WAAW,oCAAoC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzF,6DAA6D;IAC7D,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;IACtB,4DAA4D;IAC5D,UAAU,EAAE,SAAS,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;IAChD,6DAA6D;IAC7D,KAAK,EAAE,IAAI,CAAC;IACZ,kDAAkD;IAClD,KAAK,EAAE,IAAI,CAAC;IACZ,qEAAqE;IACrE,aAAa,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IACrC,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,cAAc,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACnC,yCAAyC;IACzC,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACtC,+EAA+E;IAC/E,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,KAAK,MAAM,CAAC;IAChE,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC;IACtC,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,eAAe,EAAE,MAAM,CAAC;CACzB;AAOD,wBAAgB,+BAA+B,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACrF,IAAI,EACJ,UAAU,EACV,KAAK,EACL,KAAK,EACL,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,eAAe,GAChB,EAAE,oCAAoC,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2HjE"}
1
+ {"version":3,"file":"ResourceCollectionBody_Timeline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/timeline/ResourceCollectionBody_Timeline.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAiB,MAAM,OAAO,CAAC;AAQtC,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,iGAAiG,CAAC;AAEzJ,MAAM,WAAW,oCAAoC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzF,6DAA6D;IAC7D,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;IACtB,4DAA4D;IAC5D,UAAU,EAAE,SAAS,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;IAChD,6DAA6D;IAC7D,KAAK,EAAE,IAAI,CAAC;IACZ,kDAAkD;IAClD,KAAK,EAAE,IAAI,CAAC;IACZ,qEAAqE;IACrE,aAAa,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IACrC,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,cAAc,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,CAAC;IACtC,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACnC,yCAAyC;IACzC,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC;IACtC,+EAA+E;IAC/E,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,KAAK,MAAM,CAAC;IAChE,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC;IACtC,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,eAAe,EAAE,MAAM,CAAC;CACzB;AAOD,wBAAgB,+BAA+B,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EACrF,IAAI,EACJ,UAAU,EACV,KAAK,EACL,KAAK,EACL,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,eAAe,GAChB,EAAE,oCAAoC,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6HjE"}
@@ -14,6 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  * through every row's other controls. A row that cannot be opened is shown, not offered.
15
15
  */
16
16
  import { useRef } from 'react';
17
+ import { documentHeadingTag, useDocumentHeadingLevel } from '../../../../components/typography/document-heading-level.js';
17
18
  import { ButtonSize } from '@wildo-ai/presets-components-models';
18
19
  import { cn } from '../../../../core/ui/cn.js';
19
20
  import { Button, ButtonVariants_Variant } from '../../../../components/actions/button.js';
@@ -26,6 +27,8 @@ function timelineColumns(dayCount) {
26
27
  return { gridTemplateColumns: `minmax(8rem, 12rem) repeat(${dayCount}, minmax(1.5rem, 1fr))` };
27
28
  }
28
29
  export function ResourceCollectionBody_Timeline({ days, placements, month, today, onMonthChange, monthHeading, dayNumberLabel, getItemId, getItemLabel, barLabel, canOpenItem, onOpenItem, timelineLabel, previousMonthLabel, nextMonthLabel, todayLabel, emptyMonthLabel, }) {
30
+ // The month heading takes the outline's level under the page's `h1`; a fixed `h3` skipped one (#3867).
31
+ const MonthHeadingTag = documentHeadingTag(useDocumentHeadingLevel());
29
32
  const { renderIcon } = useIconRegistry();
30
33
  const listRef = useRef(null);
31
34
  const todayKey = timelineDayKey(today);
@@ -41,7 +44,7 @@ export function ResourceCollectionBody_Timeline({ days, placements, month, today
41
44
  event.preventDefault();
42
45
  next.focus();
43
46
  };
44
- return (_jsxs("div", { className: "flex flex-col gap-item-sm", "data-slot": "collection-timeline", children: [_jsxs("div", { className: "flex items-center gap-item-sm", children: [_jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.ICON_SM, "aria-label": previousMonthLabel, title: previousMonthLabel, onClick: () => onMonthChange(shiftCalendarMonth(month, -1)), children: _jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.CHEVRON_LEFT, { size: IconSize.SM }) }) }), _jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.ICON_SM, "aria-label": nextMonthLabel, title: nextMonthLabel, onClick: () => onMonthChange(shiftCalendarMonth(month, 1)), children: _jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.CHEVRON_RIGHT, { size: IconSize.SM }) }) }), _jsx("h3", { className: "text-sm font-medium", "aria-live": "polite", children: monthHeading }), _jsx(Button, { variant: ButtonVariants_Variant.GHOST, size: ButtonSize.SM, className: "ms-auto", onClick: () => onMonthChange(today), children: todayLabel })] }), _jsx("div", { className: "overflow-x-auto", children: _jsxs("div", { className: "min-w-max", children: [_jsxs("div", { className: "grid border-b pb-item-xs", style: columns, "aria-hidden": "true", children: [_jsx("span", {}), days.map((day) => {
47
+ return (_jsxs("div", { className: "flex flex-col gap-item-sm", "data-slot": "collection-timeline", children: [_jsxs("div", { className: "flex items-center gap-item-sm", children: [_jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.ICON_SM, "aria-label": previousMonthLabel, title: previousMonthLabel, onClick: () => onMonthChange(shiftCalendarMonth(month, -1)), children: _jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.CHEVRON_LEFT, { size: IconSize.SM }) }) }), _jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, size: ButtonSize.ICON_SM, "aria-label": nextMonthLabel, title: nextMonthLabel, onClick: () => onMonthChange(shiftCalendarMonth(month, 1)), children: _jsx("span", { "aria-hidden": "true", children: renderIcon(StandardIconReference.CHEVRON_RIGHT, { size: IconSize.SM }) }) }), _jsx(MonthHeadingTag, { className: "text-sm font-medium", "aria-live": "polite", children: monthHeading }), _jsx(Button, { variant: ButtonVariants_Variant.GHOST, size: ButtonSize.SM, className: "ms-auto", onClick: () => onMonthChange(today), children: todayLabel })] }), _jsx("div", { className: "overflow-x-auto", children: _jsxs("div", { className: "min-w-max", children: [_jsxs("div", { className: "grid border-b pb-item-xs", style: columns, "aria-hidden": "true", children: [_jsx("span", {}), days.map((day) => {
45
48
  const key = timelineDayKey(day);
46
49
  return (_jsx("span", { "data-timeline-day": key, "data-today": key === todayKey ? 'true' : undefined, className: cn('text-center text-xs text-muted-foreground', key === todayKey && 'font-semibold text-foreground'), children: dayNumberLabel(day) }, key));
47
50
  })] }), placements.length === 0 ? (_jsx("p", { role: "status", className: "py-section text-center text-sm text-muted-foreground", children: emptyMonthLabel })) : (_jsx("ul", { ref: listRef, role: "list", "aria-label": timelineLabel, className: "flex flex-col", children: placements.map((placement) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceCollectionBody_Timeline.js","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/timeline/ResourceCollectionBody_Timeline.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAChH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iGAAiG,CAAC;AACrI,OAAO,EAAE,cAAc,EAA0B,MAAM,iGAAiG,CAAC;AAgCzJ,mHAAmH;AACnH,SAAS,eAAe,CAAC,QAAgB;IACvC,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,QAAQ,wBAAwB,EAAE,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAwC,EACrF,IAAI,EACJ,UAAU,EACV,KAAK,EACL,KAAK,EACL,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,eAAe,GAC6B;IAC5C,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,EAAE,CAAC;IACzC,MAAM,OAAO,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,eAAe,CAAC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S,EAAE,EAAE,CAAC,YAAY,EAAE,+CAA+C,CAAC,EAC5E,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAC/B,SAAS,EAAE,YAAY,YAEtB,KAAK,GACC,CACV,CAAC,CAAC,CAAC,CACF,eACE,IAAI,EAAC,KAAK,uBACS,MAAM,EACzB,QAAQ,EAAE,CAAC,gBACC,cAAc,EAC1B,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC,EAChD,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,YAAY,YAEtB,KAAK,GACD,CACR,KAnCI,MAAM,CAoCR,CACN,CAAC;4BACJ,CAAC,CAAC,GACC,CACN,IACG,GACF,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The TIMELINE body of a resource collection (`CollectionDisplayMode.TIMELINE`, #2298): one row per record, a bar from\n * its start to its end over the days of the displayed month.\n *\n * Like the other bodies, the list host owns the fetch (whose windows on the two date fields ARE the displayed month, so\n * another month refetches), the placement (`placeTimelineItems`), the row's name and what opening it does. This\n * component owns the axis, the bars, the month navigation and the keyboard.\n *\n * ## Keyboard\n *\n * Each bar is a button in the tab order, named with the row and its full dates (not the clipped ones), and opens the\n * row. Up and Down on a bar move to the bar of the previous or next row, so a long timeline is walked without tabbing\n * through every row's other controls. A row that cannot be opened is shown, not offered.\n */\n\nimport React, { useRef } from 'react';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport { IconSize, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { shiftCalendarMonth } from '~wildo-frontend-lib/components/resources/collection/calendar/collection-calendar.frontend.utils';\nimport { timelineDayKey, type TimelinePlacement } from '~wildo-frontend-lib/components/resources/collection/timeline/collection-timeline.frontend.utils';\n\nexport interface ResourceCollectionBody_TimelineProps<TItem extends Record<string, unknown>> {\n /** The days of the displayed month (`timelineMonthDays`). */\n days: readonly Date[];\n /** The rows placed on those days (`placeTimelineItems`). */\n placements: readonly TimelinePlacement<TItem>[];\n /** The first day of the displayed month, as UTC midnight. */\n month: Date;\n /** Today, as UTC midnight of the reader's day. */\n today: Date;\n /** Show another month (the host moves its fetch windows with it). */\n onMonthChange: (month: Date) => void;\n /** The heading of the displayed month (\"November 2026\"). */\n monthHeading: string;\n /** The day number shown above a day column. */\n dayNumberLabel: (day: Date) => string;\n getItemId: (item: TItem) => string;\n /** The row's name as a list shows it. */\n getItemLabel: (item: TItem) => string;\n /** A bar's accessible name: the row's name and its full first and last day. */\n barLabel: (item: TItem, startDay: Date, endDay: Date) => string;\n canOpenItem: (item: TItem) => boolean;\n onOpenItem: (item: TItem) => void;\n timelineLabel: string;\n previousMonthLabel: string;\n nextMonthLabel: string;\n todayLabel: string;\n /** Shown when no row overlaps the displayed month. */\n emptyMonthLabel: string;\n}\n\n/** The row-label column, then one column per day: every row lays out on the same template, so the days line up. */\nfunction timelineColumns(dayCount: number): React.CSSProperties {\n return { gridTemplateColumns: `minmax(8rem, 12rem) repeat(${dayCount}, minmax(1.5rem, 1fr))` };\n}\n\nexport function ResourceCollectionBody_Timeline<TItem extends Record<string, unknown>>({\n days,\n placements,\n month,\n today,\n onMonthChange,\n monthHeading,\n dayNumberLabel,\n getItemId,\n getItemLabel,\n barLabel,\n canOpenItem,\n onOpenItem,\n timelineLabel,\n previousMonthLabel,\n nextMonthLabel,\n todayLabel,\n emptyMonthLabel,\n}: ResourceCollectionBody_TimelineProps<TItem>): React.JSX.Element {\n const { renderIcon } = useIconRegistry();\n const listRef = useRef<HTMLUListElement>(null);\n const todayKey = timelineDayKey(today);\n const columns = timelineColumns(days.length);\n\n const onBarKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n const direction = event.key === 'ArrowDown' ? 1 : event.key === 'ArrowUp' ? -1 : 0;\n if (direction === 0) return;\n const bars = Array.from(listRef.current?.querySelectorAll<HTMLElement>('[data-timeline-bar]') ?? []);\n const next = bars[bars.indexOf(event.currentTarget) + direction];\n if (!next) return;\n event.preventDefault();\n next.focus();\n };\n\n return (\n <div className=\"flex flex-col gap-item-sm\" data-slot=\"collection-timeline\">\n <div className=\"flex items-center gap-item-sm\">\n <Button\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.ICON_SM}\n aria-label={previousMonthLabel}\n title={previousMonthLabel}\n onClick={() => onMonthChange(shiftCalendarMonth(month, -1))}\n >\n <span aria-hidden=\"true\">{renderIcon(StandardIconReference.CHEVRON_LEFT, { size: IconSize.SM })}</span>\n </Button>\n <Button\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.ICON_SM}\n aria-label={nextMonthLabel}\n title={nextMonthLabel}\n onClick={() => onMonthChange(shiftCalendarMonth(month, 1))}\n >\n <span aria-hidden=\"true\">{renderIcon(StandardIconReference.CHEVRON_RIGHT, { size: IconSize.SM })}</span>\n </Button>\n <h3 className=\"text-sm font-medium\" aria-live=\"polite\">{monthHeading}</h3>\n <Button variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} className=\"ms-auto\" onClick={() => onMonthChange(today)}>\n {todayLabel}\n </Button>\n </div>\n <div className=\"overflow-x-auto\">\n <div className=\"min-w-max\">\n {/* The axis is decoration for sighted readers: every bar is named with its own dates. */}\n <div className=\"grid border-b pb-item-xs\" style={columns} aria-hidden=\"true\">\n <span />\n {days.map((day) => {\n const key = timelineDayKey(day);\n return (\n <span\n key={key}\n data-timeline-day={key}\n data-today={key === todayKey ? 'true' : undefined}\n className={cn('text-center text-xs text-muted-foreground', key === todayKey && 'font-semibold text-foreground')}\n >\n {dayNumberLabel(day)}\n </span>\n );\n })}\n </div>\n {placements.length === 0 ? (\n <p role=\"status\" className=\"py-section text-center text-sm text-muted-foreground\">{emptyMonthLabel}</p>\n ) : (\n <ul ref={listRef} role=\"list\" aria-label={timelineLabel} className=\"flex flex-col\">\n {placements.map((placement) => {\n const { item, startDay, endDay, startColumn, endColumn, continuesBefore, continuesAfter } = placement;\n const itemId = getItemId(item);\n const label = getItemLabel(item);\n const accessibleName = barLabel(item, startDay, endDay);\n const barClassName = cn(\n 'h-6 min-w-0 truncate rounded-md bg-primary/15 px-item-xs text-start text-xs text-foreground',\n continuesBefore && 'rounded-s-none',\n continuesAfter && 'rounded-e-none',\n );\n const barStyle: React.CSSProperties = { gridColumn: `${startColumn + 1} / ${endColumn + 2}`, gridRow: 1 };\n return (\n <li\n key={itemId}\n className=\"grid list-none items-center border-b py-px\"\n style={columns}\n data-timeline-item={itemId}\n data-continues-before={continuesBefore ? 'true' : undefined}\n data-continues-after={continuesAfter ? 'true' : undefined}\n >\n <span aria-hidden=\"true\" className=\"truncate pe-item-sm text-sm\" style={{ gridColumn: 1, gridRow: 1 }} title={label}>{label}</span>\n {canOpenItem(item) ? (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.XS}\n data-timeline-bar={itemId}\n aria-label={accessibleName}\n title={accessibleName}\n className={cn(barClassName, 'justify-start font-normal hover:bg-primary/25')}\n style={barStyle}\n onClick={() => onOpenItem(item)}\n onKeyDown={onBarKeyDown}\n >\n {label}\n </Button>\n ) : (\n <span\n role=\"img\"\n data-timeline-bar={itemId}\n tabIndex={0}\n aria-label={accessibleName}\n title={accessibleName}\n className={cn(barClassName, 'flex items-center')}\n style={barStyle}\n onKeyDown={onBarKeyDown}\n >\n {label}\n </span>\n )}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ResourceCollectionBody_Timeline.js","sourceRoot":"","sources":["../../../../../../src/components/resources/collection/timeline/ResourceCollectionBody_Timeline.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAc,EAAE,MAAM,EA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EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAC/B,SAAS,EAAE,YAAY,YAEtB,KAAK,GACC,CACV,CAAC,CAAC,CAAC,CACF,eACE,IAAI,EAAC,KAAK,uBACS,MAAM,EACzB,QAAQ,EAAE,CAAC,gBACC,cAAc,EAC1B,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC,EAChD,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,YAAY,YAEtB,KAAK,GACD,CACR,KAnCI,MAAM,CAoCR,CACN,CAAC;4BACJ,CAAC,CAAC,GACC,CACN,IACG,GACF,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The TIMELINE body of a resource collection (`CollectionDisplayMode.TIMELINE`, #2298): one row per record, a bar from\n * its start to its end over the days of the displayed month.\n *\n * Like the other bodies, the list host owns the fetch (whose windows on the two date fields ARE the displayed month, so\n * another month refetches), the placement (`placeTimelineItems`), the row's name and what opening it does. This\n * component owns the axis, the bars, the month navigation and the keyboard.\n *\n * ## Keyboard\n *\n * Each bar is a button in the tab order, named with the row and its full dates (not the clipped ones), and opens the\n * row. Up and Down on a bar move to the bar of the previous or next row, so a long timeline is walked without tabbing\n * through every row's other controls. A row that cannot be opened is shown, not offered.\n */\n\nimport React, { useRef } from 'react';\nimport { documentHeadingTag, useDocumentHeadingLevel } from '~wildo-frontend-lib/components/typography/document-heading-level';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport { IconSize, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { shiftCalendarMonth } from '~wildo-frontend-lib/components/resources/collection/calendar/collection-calendar.frontend.utils';\nimport { timelineDayKey, type TimelinePlacement } from '~wildo-frontend-lib/components/resources/collection/timeline/collection-timeline.frontend.utils';\n\nexport interface ResourceCollectionBody_TimelineProps<TItem extends Record<string, unknown>> {\n /** The days of the displayed month (`timelineMonthDays`). */\n days: readonly Date[];\n /** The rows placed on those days (`placeTimelineItems`). */\n placements: readonly TimelinePlacement<TItem>[];\n /** The first day of the displayed month, as UTC midnight. */\n month: Date;\n /** Today, as UTC midnight of the reader's day. */\n today: Date;\n /** Show another month (the host moves its fetch windows with it). */\n onMonthChange: (month: Date) => void;\n /** The heading of the displayed month (\"November 2026\"). */\n monthHeading: string;\n /** The day number shown above a day column. */\n dayNumberLabel: (day: Date) => string;\n getItemId: (item: TItem) => string;\n /** The row's name as a list shows it. */\n getItemLabel: (item: TItem) => string;\n /** A bar's accessible name: the row's name and its full first and last day. */\n barLabel: (item: TItem, startDay: Date, endDay: Date) => string;\n canOpenItem: (item: TItem) => boolean;\n onOpenItem: (item: TItem) => void;\n timelineLabel: string;\n previousMonthLabel: string;\n nextMonthLabel: string;\n todayLabel: string;\n /** Shown when no row overlaps the displayed month. */\n emptyMonthLabel: string;\n}\n\n/** The row-label column, then one column per day: every row lays out on the same template, so the days line up. */\nfunction timelineColumns(dayCount: number): React.CSSProperties {\n return { gridTemplateColumns: `minmax(8rem, 12rem) repeat(${dayCount}, minmax(1.5rem, 1fr))` };\n}\n\nexport function ResourceCollectionBody_Timeline<TItem extends Record<string, unknown>>({\n days,\n placements,\n month,\n today,\n onMonthChange,\n monthHeading,\n dayNumberLabel,\n getItemId,\n getItemLabel,\n barLabel,\n canOpenItem,\n onOpenItem,\n timelineLabel,\n previousMonthLabel,\n nextMonthLabel,\n todayLabel,\n emptyMonthLabel,\n}: ResourceCollectionBody_TimelineProps<TItem>): React.JSX.Element {\n // The month heading takes the outline's level under the page's `h1`; a fixed `h3` skipped one (#3867).\n const MonthHeadingTag = documentHeadingTag(useDocumentHeadingLevel());\n const { renderIcon } = useIconRegistry();\n const listRef = useRef<HTMLUListElement>(null);\n const todayKey = timelineDayKey(today);\n const columns = timelineColumns(days.length);\n\n const onBarKeyDown = (event: React.KeyboardEvent<HTMLElement>) => {\n const direction = event.key === 'ArrowDown' ? 1 : event.key === 'ArrowUp' ? -1 : 0;\n if (direction === 0) return;\n const bars = Array.from(listRef.current?.querySelectorAll<HTMLElement>('[data-timeline-bar]') ?? []);\n const next = bars[bars.indexOf(event.currentTarget) + direction];\n if (!next) return;\n event.preventDefault();\n next.focus();\n };\n\n return (\n <div className=\"flex flex-col gap-item-sm\" data-slot=\"collection-timeline\">\n <div className=\"flex items-center gap-item-sm\">\n <Button\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.ICON_SM}\n aria-label={previousMonthLabel}\n title={previousMonthLabel}\n onClick={() => onMonthChange(shiftCalendarMonth(month, -1))}\n >\n <span aria-hidden=\"true\">{renderIcon(StandardIconReference.CHEVRON_LEFT, { size: IconSize.SM })}</span>\n </Button>\n <Button\n variant={ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.ICON_SM}\n aria-label={nextMonthLabel}\n title={nextMonthLabel}\n onClick={() => onMonthChange(shiftCalendarMonth(month, 1))}\n >\n <span aria-hidden=\"true\">{renderIcon(StandardIconReference.CHEVRON_RIGHT, { size: IconSize.SM })}</span>\n </Button>\n <MonthHeadingTag className=\"text-sm font-medium\" aria-live=\"polite\">{monthHeading}</MonthHeadingTag>\n <Button variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} className=\"ms-auto\" onClick={() => onMonthChange(today)}>\n {todayLabel}\n </Button>\n </div>\n <div className=\"overflow-x-auto\">\n <div className=\"min-w-max\">\n {/* The axis is decoration for sighted readers: every bar is named with its own dates. */}\n <div className=\"grid border-b pb-item-xs\" style={columns} aria-hidden=\"true\">\n <span />\n {days.map((day) => {\n const key = timelineDayKey(day);\n return (\n <span\n key={key}\n data-timeline-day={key}\n data-today={key === todayKey ? 'true' : undefined}\n className={cn('text-center text-xs text-muted-foreground', key === todayKey && 'font-semibold text-foreground')}\n >\n {dayNumberLabel(day)}\n </span>\n );\n })}\n </div>\n {placements.length === 0 ? (\n <p role=\"status\" className=\"py-section text-center text-sm text-muted-foreground\">{emptyMonthLabel}</p>\n ) : (\n <ul ref={listRef} role=\"list\" aria-label={timelineLabel} className=\"flex flex-col\">\n {placements.map((placement) => {\n const { item, startDay, endDay, startColumn, endColumn, continuesBefore, continuesAfter } = placement;\n const itemId = getItemId(item);\n const label = getItemLabel(item);\n const accessibleName = barLabel(item, startDay, endDay);\n const barClassName = cn(\n 'h-6 min-w-0 truncate rounded-md bg-primary/15 px-item-xs text-start text-xs text-foreground',\n continuesBefore && 'rounded-s-none',\n continuesAfter && 'rounded-e-none',\n );\n const barStyle: React.CSSProperties = { gridColumn: `${startColumn + 1} / ${endColumn + 2}`, gridRow: 1 };\n return (\n <li\n key={itemId}\n className=\"grid list-none items-center border-b py-px\"\n style={columns}\n data-timeline-item={itemId}\n data-continues-before={continuesBefore ? 'true' : undefined}\n data-continues-after={continuesAfter ? 'true' : undefined}\n >\n <span aria-hidden=\"true\" className=\"truncate pe-item-sm text-sm\" style={{ gridColumn: 1, gridRow: 1 }} title={label}>{label}</span>\n {canOpenItem(item) ? (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.XS}\n data-timeline-bar={itemId}\n aria-label={accessibleName}\n title={accessibleName}\n className={cn(barClassName, 'justify-start font-normal hover:bg-primary/25')}\n style={barStyle}\n onClick={() => onOpenItem(item)}\n onKeyDown={onBarKeyDown}\n >\n {label}\n </Button>\n ) : (\n <span\n role=\"img\"\n data-timeline-bar={itemId}\n tabIndex={0}\n aria-label={accessibleName}\n title={accessibleName}\n className={cn(barClassName, 'flex items-center')}\n style={barStyle}\n onKeyDown={onBarKeyDown}\n >\n {label}\n </span>\n )}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </div>\n </div>\n );\n}\n"]}
@@ -46,7 +46,7 @@ export interface RelatedResourceSectionsProps {
46
46
  * recurring todo's occurrences section appears only on a recurring todo. Inside a display template a
47
47
  * constrained target waits for the row to load; with no display template there is no row to judge.
48
48
  *
49
- * Each collection lists the HOST RECORD's rows, never more (#3072): through a route naming the record (the runtime
49
+ * Each collection lists the HOST RECORD's rows, never more: through a route naming the record (the runtime
50
50
  * selects the route under the record when the page's context would not), else by pinning the edge's foreign key
51
51
  * when the target's operation admits it as a filter. A target nothing can confine — no relationship to the host, a
52
52
  * `viaForeignKey` naming no live edge, two edges and no choice — is omitted with a warning naming the