@wildo-ai/saas-frontend-lib 1.1.17 → 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 (586) 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/data-display/AutomaticDisplayer.d.ts.map +1 -1
  83. package/dist/esm/components/data-display/AutomaticDisplayer.js +7 -2
  84. package/dist/esm/components/data-display/AutomaticDisplayer.js.map +1 -1
  85. package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
  86. package/dist/esm/components/data-display/DisplayField.js +67 -45
  87. package/dist/esm/components/data-display/DisplayField.js.map +1 -1
  88. package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
  89. package/dist/esm/components/data-display/DisplayFieldEditable.js +4 -1
  90. package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
  91. package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
  92. package/dist/esm/components/data-display/DisplayValueDispatcher.js +16 -6
  93. package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
  94. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
  95. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +3 -1
  96. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
  97. package/dist/esm/components/feedback/empty-state-marker.d.ts +16 -0
  98. package/dist/esm/components/feedback/empty-state-marker.d.ts.map +1 -0
  99. package/dist/esm/components/feedback/empty-state-marker.js +16 -0
  100. package/dist/esm/components/feedback/empty-state-marker.js.map +1 -0
  101. package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
  102. package/dist/esm/components/feedback/empty-state.js +2 -1
  103. package/dist/esm/components/feedback/empty-state.js.map +1 -1
  104. package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts +7 -1
  105. package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
  106. package/dist/esm/components/feedback/features/feature-unavailable-prompt.js +8 -2
  107. package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
  108. package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
  109. package/dist/esm/components/feedback/resource-empty-state.js +2 -1
  110. package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
  111. package/dist/esm/components/flows-actors/approval.d.ts +25 -1
  112. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  113. package/dist/esm/components/flows-actors/approval.js +14 -9
  114. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  115. package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
  116. package/dist/esm/components/flows-actors/approval.labels.js +30 -0
  117. package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
  118. package/dist/esm/components/flows-actors/flow-node.labels.d.ts.map +1 -1
  119. package/dist/esm/components/flows-actors/flow-node.labels.js +4 -1
  120. package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
  121. package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -1
  122. package/dist/esm/components/flows-actors/flow-step-visuals.js +8 -2
  123. package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -1
  124. package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -1
  125. package/dist/esm/components/flows-actors/human-decision-form.js +4 -1
  126. package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -1
  127. package/dist/esm/components/form/Form.d.ts +2 -0
  128. package/dist/esm/components/form/Form.d.ts.map +1 -1
  129. package/dist/esm/components/form/Form.js +1 -0
  130. package/dist/esm/components/form/Form.js.map +1 -1
  131. package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
  132. package/dist/esm/components/form/automated/AutomatedArrayField.js +7 -4
  133. package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
  134. package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
  135. package/dist/esm/components/form/automated/AutosaveContext.js +8 -0
  136. package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
  137. package/dist/esm/components/form/automated/FormField.d.ts +5 -3
  138. package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
  139. package/dist/esm/components/form/automated/FormField.js +38 -13
  140. package/dist/esm/components/form/automated/FormField.js.map +1 -1
  141. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +1 -1
  142. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
  143. package/dist/esm/components/form/automated/ResourceAutomatedForm.js +31 -18
  144. package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
  145. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
  146. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js +1 -1
  147. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
  148. package/dist/esm/components/form/validation-errors/form-validation.d.ts +5 -7
  149. package/dist/esm/components/form/validation-errors/form-validation.d.ts.map +1 -1
  150. package/dist/esm/components/form/validation-errors/form-validation.js +7 -22
  151. package/dist/esm/components/form/validation-errors/form-validation.js.map +1 -1
  152. package/dist/esm/components/form/validation-errors/getFieldError.d.ts +25 -2
  153. package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
  154. package/dist/esm/components/form/validation-errors/getFieldError.js +29 -2
  155. package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
  156. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +5 -0
  157. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
  158. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +3 -0
  159. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
  160. package/dist/esm/components/form/validation-errors/save-attempt.d.ts +9 -0
  161. package/dist/esm/components/form/validation-errors/save-attempt.d.ts.map +1 -0
  162. package/dist/esm/components/form/validation-errors/save-attempt.js +42 -0
  163. package/dist/esm/components/form/validation-errors/save-attempt.js.map +1 -0
  164. package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts +3 -1
  165. package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts.map +1 -1
  166. package/dist/esm/components/form/validation-errors/unstarted-field-visit.js +3 -1
  167. package/dist/esm/components/form/validation-errors/unstarted-field-visit.js.map +1 -1
  168. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +2 -2
  169. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -1
  170. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +3 -0
  171. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -1
  172. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
  173. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +5 -3
  174. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
  175. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +19 -0
  176. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
  177. package/dist/esm/components/resources/ResourceLayout_DangerZone.js +47 -11
  178. package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
  179. package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
  180. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +17 -7
  181. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
  182. package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
  183. package/dist/esm/components/resources/ResourceLayout_List.js +13 -6
  184. package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
  185. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +1 -1
  186. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
  187. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
  188. package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
  189. package/dist/esm/components/resources/ResourceLayout_Search.js +12 -8
  190. package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
  191. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts +1 -1
  192. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts.map +1 -1
  193. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js +11 -4
  194. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js.map +1 -1
  195. package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +1 -1
  196. package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
  197. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +5 -5
  198. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
  199. package/dist/esm/components/resources/embeds/ResourceEmbeds.js +21 -14
  200. package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
  201. package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
  202. package/dist/esm/components/resources/skeleton/DisplayLayout.js +40 -4
  203. package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
  204. package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
  205. package/dist/esm/components/resources/skeleton/FormLayout.js +22 -6
  206. package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
  207. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +1 -1
  208. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +1 -1
  209. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
  210. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +21 -1
  211. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
  212. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +53 -9
  213. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
  214. package/dist/esm/components/settings/SettingsHub.d.ts +15 -0
  215. package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
  216. package/dist/esm/components/settings/SettingsHub.js +14 -4
  217. package/dist/esm/components/settings/SettingsHub.js.map +1 -1
  218. package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts +3 -2
  219. package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts.map +1 -1
  220. package/dist/esm/components/views/chart-dashboard/ChartDashboard.js +4 -3
  221. package/dist/esm/components/views/chart-dashboard/ChartDashboard.js.map +1 -1
  222. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts +1 -1
  223. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts.map +1 -1
  224. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.js.map +1 -1
  225. package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts +33 -0
  226. package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts.map +1 -1
  227. package/dist/esm/components/views/chart-view/ChartKpiFigure.js +63 -4
  228. package/dist/esm/components/views/chart-view/ChartKpiFigure.js.map +1 -1
  229. package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
  230. package/dist/esm/components/views/chart-view/ChartView.js +33 -7
  231. package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
  232. package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
  233. package/dist/esm/components/views/chart-view/ChartView.labels.js +69 -3
  234. package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
  235. package/dist/esm/components/views/chart-view/ChartView.lazy.d.ts.map +1 -1
  236. package/dist/esm/components/views/chart-view/ChartView.lazy.js +2 -1
  237. package/dist/esm/components/views/chart-view/ChartView.lazy.js.map +1 -1
  238. package/dist/esm/components/views/chart-view/ChartWidget.d.ts.map +1 -1
  239. package/dist/esm/components/views/chart-view/ChartWidget.js +12 -4
  240. package/dist/esm/components/views/chart-view/ChartWidget.js.map +1 -1
  241. package/dist/esm/components/views/chart-view/chart-export.utils.d.ts +8 -0
  242. package/dist/esm/components/views/chart-view/chart-export.utils.d.ts.map +1 -1
  243. package/dist/esm/components/views/chart-view/chart-export.utils.js +15 -25
  244. package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
  245. package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts +6 -0
  246. package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts.map +1 -0
  247. package/dist/esm/components/views/chart-view/chart-view-defaults.js +6 -0
  248. package/dist/esm/components/views/chart-view/chart-view-defaults.js.map +1 -0
  249. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +35 -9
  250. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
  251. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +69 -21
  252. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
  253. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
  254. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +6 -7
  255. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
  256. package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js +1 -1
  257. package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js.map +1 -1
  258. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +2 -2
  259. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
  260. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts +1 -1
  261. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
  262. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +7 -7
  263. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
  264. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts +1 -1
  265. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
  266. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +6 -8
  267. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
  268. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
  269. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +4 -1
  270. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
  271. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts.map +1 -1
  272. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js +13 -13
  273. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
  274. package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +1 -1
  275. package/dist/esm/components/views/chart-view/useResourceChartData.js +1 -1
  276. package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -1
  277. package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
  278. package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
  279. package/dist/esm/components/views/composite-view/CompositeView.js +6 -2
  280. package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
  281. package/dist/esm/components/views/execution-view/ExecutionView.d.ts +7 -0
  282. package/dist/esm/components/views/execution-view/ExecutionView.d.ts.map +1 -1
  283. package/dist/esm/components/views/execution-view/ExecutionView.js +11 -1
  284. package/dist/esm/components/views/execution-view/ExecutionView.js.map +1 -1
  285. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +7 -0
  286. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
  287. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +6 -2
  288. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
  289. package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts +7 -0
  290. package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts.map +1 -1
  291. package/dist/esm/components/views/full-custom-view/FullCustomView.js +8 -3
  292. package/dist/esm/components/views/full-custom-view/FullCustomView.js.map +1 -1
  293. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts +7 -0
  294. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
  295. package/dist/esm/components/views/onboarding-view/OnboardingView.js +11 -1
  296. package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
  297. package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +2 -2
  298. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +2 -2
  299. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
  300. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +4 -4
  301. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +3 -3
  302. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
  303. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts +45 -0
  304. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts.map +1 -0
  305. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js +72 -0
  306. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js.map +1 -0
  307. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +4 -3
  308. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
  309. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +4 -3
  310. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
  311. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -8
  312. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
  313. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +22 -21
  314. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
  315. package/dist/esm/core/billing/BillingContext.d.ts +27 -4
  316. package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
  317. package/dist/esm/core/billing/BillingContext.js +61 -2
  318. package/dist/esm/core/billing/BillingContext.js.map +1 -1
  319. package/dist/esm/core/billing/useBillingAction.d.ts.map +1 -1
  320. package/dist/esm/core/billing/useBillingAction.js +3 -2
  321. package/dist/esm/core/billing/useBillingAction.js.map +1 -1
  322. package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts +19 -0
  323. package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts.map +1 -0
  324. package/dist/esm/core/components-registry/RegisteredComponentRoot.js +23 -0
  325. package/dist/esm/core/components-registry/RegisteredComponentRoot.js.map +1 -0
  326. package/dist/esm/core/components-registry/register-framework-layouts.d.ts.map +1 -1
  327. package/dist/esm/core/components-registry/register-framework-layouts.js +4 -0
  328. package/dist/esm/core/components-registry/register-framework-layouts.js.map +1 -1
  329. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +159 -0
  330. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
  331. package/dist/esm/core/config/app-configuration-frontend.schemas.js +68 -3
  332. package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
  333. package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +2 -2
  334. package/dist/esm/core/config/app-level-components.frontend.schemas.js +2 -2
  335. package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
  336. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +59 -18
  337. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
  338. package/dist/esm/core/config/chart-view.frontend.schemas.js +42 -7
  339. package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
  340. package/dist/esm/core/config/composite-view.schemas.d.ts +8 -1
  341. package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
  342. package/dist/esm/core/config/composite-view.schemas.js +1 -0
  343. package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
  344. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +1 -1
  345. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -1
  346. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +1 -1
  347. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -1
  348. package/dist/esm/core/config/engine-settings-destinations.d.ts +6 -0
  349. package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
  350. package/dist/esm/core/config/engine-settings-destinations.js +12 -0
  351. package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
  352. package/dist/esm/core/config/execution-view.schemas.d.ts +1 -1
  353. package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
  354. package/dist/esm/core/config/identity-portal-settings.frontend.d.ts +17 -0
  355. package/dist/esm/core/config/identity-portal-settings.frontend.d.ts.map +1 -0
  356. package/dist/esm/core/config/identity-portal-settings.frontend.js +64 -0
  357. package/dist/esm/core/config/identity-portal-settings.frontend.js.map +1 -0
  358. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -8
  359. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
  360. package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
  361. package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +1 -1
  362. package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts.map +1 -1
  363. package/dist/esm/core/config/settings-hub-gating.frontend.utils.js +1 -1
  364. package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
  365. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +17 -6
  366. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
  367. package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
  368. package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
  369. package/dist/esm/core/config/useSettingsHubConfig.js +1 -0
  370. package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
  371. package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +7 -0
  372. package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
  373. package/dist/esm/core/config/useVisibleSettingsHubConfig.js +9 -1
  374. package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
  375. package/dist/esm/core/config/verify-launcher-content.d.ts +7 -1
  376. package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
  377. package/dist/esm/core/config/verify-launcher-content.js +31 -0
  378. package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
  379. package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
  380. package/dist/esm/core/errors/GlobalErrorHandler.js +10 -0
  381. package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
  382. package/dist/esm/core/errors/backend-refusal.frontend.d.ts +1 -1
  383. package/dist/esm/core/errors/backend-refusal.frontend.d.ts.map +1 -1
  384. package/dist/esm/core/errors/backend-refusal.frontend.js.map +1 -1
  385. package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
  386. package/dist/esm/core/events/NotificationContext.js +19 -2
  387. package/dist/esm/core/events/NotificationContext.js.map +1 -1
  388. package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts +21 -2
  389. package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts.map +1 -1
  390. package/dist/esm/core/events/notification-display-policy.frontend.schemas.js +25 -4
  391. package/dist/esm/core/events/notification-display-policy.frontend.schemas.js.map +1 -1
  392. package/dist/esm/core/execution/useExecution.d.ts +3 -3
  393. package/dist/esm/core/execution/useExecution.js.map +1 -1
  394. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +1 -1
  395. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +1 -1
  396. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -1
  397. package/dist/esm/core/features/FeatureGate.d.ts +13 -1
  398. package/dist/esm/core/features/FeatureGate.d.ts.map +1 -1
  399. package/dist/esm/core/features/FeatureGate.js +6 -1
  400. package/dist/esm/core/features/FeatureGate.js.map +1 -1
  401. package/dist/esm/core/features/InPlaceFeatureLock.d.ts +28 -0
  402. package/dist/esm/core/features/InPlaceFeatureLock.d.ts.map +1 -0
  403. package/dist/esm/core/features/InPlaceFeatureLock.js +49 -0
  404. package/dist/esm/core/features/InPlaceFeatureLock.js.map +1 -0
  405. package/dist/esm/core/features/PlanRefusalPrompt.d.ts +12 -0
  406. package/dist/esm/core/features/PlanRefusalPrompt.d.ts.map +1 -0
  407. package/dist/esm/core/features/PlanRefusalPrompt.js +90 -0
  408. package/dist/esm/core/features/PlanRefusalPrompt.js.map +1 -0
  409. package/dist/esm/core/features/RequiredFeaturesGate.d.ts +39 -0
  410. package/dist/esm/core/features/RequiredFeaturesGate.d.ts.map +1 -0
  411. package/dist/esm/core/features/RequiredFeaturesGate.js +51 -0
  412. package/dist/esm/core/features/RequiredFeaturesGate.js.map +1 -0
  413. package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts +6 -0
  414. package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts.map +1 -1
  415. package/dist/esm/core/features/feature-unavailability.frontend.utils.js +27 -10
  416. package/dist/esm/core/features/feature-unavailability.frontend.utils.js.map +1 -1
  417. package/dist/esm/core/features/plan-refusal.frontend.d.ts +43 -0
  418. package/dist/esm/core/features/plan-refusal.frontend.d.ts.map +1 -0
  419. package/dist/esm/core/features/plan-refusal.frontend.js +67 -0
  420. package/dist/esm/core/features/plan-refusal.frontend.js.map +1 -0
  421. package/dist/esm/core/features/required-features-gate-presentation.d.ts +21 -0
  422. package/dist/esm/core/features/required-features-gate-presentation.d.ts.map +1 -0
  423. package/dist/esm/core/features/required-features-gate-presentation.js +26 -0
  424. package/dist/esm/core/features/required-features-gate-presentation.js.map +1 -0
  425. package/dist/esm/core/features/useFeatureAvailability.d.ts.map +1 -1
  426. package/dist/esm/core/features/useFeatureAvailability.js +4 -0
  427. package/dist/esm/core/features/useFeatureAvailability.js.map +1 -1
  428. package/dist/esm/core/features/useOperationFeatureAvailability.d.ts +2 -0
  429. package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
  430. package/dist/esm/core/features/useOperationFeatureAvailability.js +6 -1
  431. package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
  432. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +11 -0
  433. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
  434. package/dist/esm/core/flows-actors/FlowsActorsContext.js +117 -3
  435. package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
  436. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.d.ts.map +1 -1
  437. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js +3 -1
  438. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js.map +1 -1
  439. package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
  440. package/dist/esm/core/navigation/NavigationContentAreas.js +28 -9
  441. package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
  442. package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.d.ts → core/navigation/chart-read-gate.d.ts} +11 -7
  443. package/dist/esm/core/navigation/chart-read-gate.d.ts.map +1 -0
  444. package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.js → core/navigation/chart-read-gate.js} +27 -11
  445. package/dist/esm/core/navigation/chart-read-gate.js.map +1 -0
  446. package/dist/esm/core/navigation/home-resolution.d.ts +36 -0
  447. package/dist/esm/core/navigation/home-resolution.d.ts.map +1 -0
  448. package/dist/esm/core/navigation/home-resolution.js +46 -0
  449. package/dist/esm/core/navigation/home-resolution.js.map +1 -0
  450. package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -34
  451. package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
  452. package/dist/esm/core/navigation/launcher-resolution.js +13 -18
  453. package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
  454. package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +1 -1
  455. package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
  456. package/dist/esm/core/navigation/launcher-runtime-availability.js +7 -2
  457. package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
  458. package/dist/esm/core/navigation/primary-destination-layout.d.ts +2 -2
  459. package/dist/esm/core/navigation/primary-destination-layout.d.ts.map +1 -1
  460. package/dist/esm/core/navigation/primary-destination-layout.js +1 -1
  461. package/dist/esm/core/navigation/primary-destination-layout.js.map +1 -1
  462. package/dist/esm/core/navigation/useChartReadDecision.d.ts +26 -0
  463. package/dist/esm/core/navigation/useChartReadDecision.d.ts.map +1 -0
  464. package/dist/esm/core/navigation/useChartReadDecision.js +58 -0
  465. package/dist/esm/core/navigation/useChartReadDecision.js.map +1 -0
  466. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts +1 -1
  467. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts.map +1 -1
  468. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.js.map +1 -1
  469. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +1 -1
  470. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -1
  471. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -1
  472. package/dist/esm/core/navigation/view-title-resolution.d.ts +21 -0
  473. package/dist/esm/core/navigation/view-title-resolution.d.ts.map +1 -1
  474. package/dist/esm/core/navigation/view-title-resolution.js +25 -0
  475. package/dist/esm/core/navigation/view-title-resolution.js.map +1 -1
  476. package/dist/esm/core/navigation/viewer-field-reader.d.ts +81 -0
  477. package/dist/esm/core/navigation/viewer-field-reader.d.ts.map +1 -0
  478. package/dist/esm/core/navigation/viewer-field-reader.js +113 -0
  479. package/dist/esm/core/navigation/viewer-field-reader.js.map +1 -0
  480. package/dist/esm/core/navigation/viewer-roles.d.ts +40 -0
  481. package/dist/esm/core/navigation/viewer-roles.d.ts.map +1 -0
  482. package/dist/esm/core/navigation/viewer-roles.js +26 -0
  483. package/dist/esm/core/navigation/viewer-roles.js.map +1 -0
  484. package/dist/esm/core/requests/user-interaction-clock.d.ts +32 -0
  485. package/dist/esm/core/requests/user-interaction-clock.d.ts.map +1 -0
  486. package/dist/esm/core/requests/user-interaction-clock.js +47 -0
  487. package/dist/esm/core/requests/user-interaction-clock.js.map +1 -0
  488. package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
  489. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +2 -0
  490. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
  491. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +27 -6
  492. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
  493. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +30 -7
  494. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
  495. package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
  496. package/dist/esm/core/requests/wildo-http-client.frontend.service.js +13 -0
  497. package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
  498. package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
  499. package/dist/esm/core/resources/hooks/useOperationEnabled.js +4 -0
  500. package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
  501. package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +1 -1
  502. package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts.map +1 -1
  503. package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
  504. package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
  505. package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
  506. package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
  507. package/dist/esm/core/resources/resources.frontend.schemas.d.ts +29 -23
  508. package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
  509. package/dist/esm/core/resources/resources.frontend.schemas.js +20 -20
  510. package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
  511. package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
  512. package/dist/esm/core/resources/rmm/ResourceMutationManager.js +4 -0
  513. package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
  514. package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
  515. package/dist/esm/core/resources/useResourceOperationActions.js +7 -7
  516. package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
  517. package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
  518. package/dist/esm/core/runtime/AppRouter.js +11 -33
  519. package/dist/esm/core/runtime/AppRouter.js.map +1 -1
  520. package/dist/esm/core/runtime/ApplicationMainContext.d.ts +15 -1
  521. package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
  522. package/dist/esm/core/runtime/ApplicationMainContext.js +41 -23
  523. package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
  524. package/dist/esm/core/runtime/IdentityPortalRouter.d.ts +20 -0
  525. package/dist/esm/core/runtime/IdentityPortalRouter.d.ts.map +1 -0
  526. package/dist/esm/core/runtime/IdentityPortalRouter.js +31 -0
  527. package/dist/esm/core/runtime/IdentityPortalRouter.js.map +1 -0
  528. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +9 -0
  529. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
  530. package/dist/esm/core/runtime/domain-module.frontend.definitions.js +3 -2
  531. package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
  532. package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts +21 -0
  533. package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts.map +1 -1
  534. package/dist/esm/core/runtime/frontend-companion-resource-inputs.js +19 -1
  535. package/dist/esm/core/runtime/frontend-companion-resource-inputs.js.map +1 -1
  536. package/dist/esm/core/runtime/identity-routes.d.ts +13 -0
  537. package/dist/esm/core/runtime/identity-routes.d.ts.map +1 -0
  538. package/dist/esm/core/runtime/identity-routes.js +50 -0
  539. package/dist/esm/core/runtime/identity-routes.js.map +1 -0
  540. package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -0
  541. package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
  542. package/dist/esm/core/runtime/routes.frontend.definitions.js +20 -1
  543. package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
  544. package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts +3 -1
  545. package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts.map +1 -1
  546. package/dist/esm/core/runtime/runtime.frontend.schemas.js +2 -0
  547. package/dist/esm/core/runtime/runtime.frontend.schemas.js.map +1 -1
  548. package/dist/esm/core/runtime/start-application.frontend.service.d.ts +7 -0
  549. package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
  550. package/dist/esm/core/runtime/start-application.frontend.service.js +4 -2
  551. package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
  552. package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
  553. package/dist/esm/core/security/AuthSessionContext.js +4 -0
  554. package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
  555. package/dist/esm/core/security/StepUpAuthContext.d.ts +3 -2
  556. package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
  557. package/dist/esm/core/security/StepUpAuthContext.js +7 -2
  558. package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
  559. package/dist/esm/core/security/federated-reauthentication.frontend.d.ts +13 -2
  560. package/dist/esm/core/security/federated-reauthentication.frontend.d.ts.map +1 -1
  561. package/dist/esm/core/security/federated-reauthentication.frontend.js +21 -1
  562. package/dist/esm/core/security/federated-reauthentication.frontend.js.map +1 -1
  563. package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts +24 -0
  564. package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts.map +1 -0
  565. package/dist/esm/core/security/useAuthenticatedRouteEntry.js +37 -0
  566. package/dist/esm/core/security/useAuthenticatedRouteEntry.js.map +1 -0
  567. package/dist/esm/core/ui/design-token.utils.d.ts +9 -0
  568. package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
  569. package/dist/esm/core/ui/design-token.utils.js +24 -3
  570. package/dist/esm/core/ui/design-token.utils.js.map +1 -1
  571. package/dist/esm/core/ui/themes/focus-indicator.d.ts +1 -1
  572. package/dist/esm/core/ui/themes/focus-indicator.js +1 -1
  573. package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -1
  574. package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
  575. package/dist/esm/index.d.ts +14 -1
  576. package/dist/esm/index.d.ts.map +1 -1
  577. package/dist/esm/index.js +17 -1
  578. package/dist/esm/index.js.map +1 -1
  579. package/dist/esm/testing/mock-builders.d.ts +1 -1
  580. package/dist/esm/testing/mock-builders.d.ts.map +1 -1
  581. package/dist/esm/testing/mock-builders.js +1 -0
  582. package/dist/esm/testing/mock-builders.js.map +1 -1
  583. package/dist/tsconfig.build.tsbuildinfo +1 -1
  584. package/package.json +9 -6
  585. package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.d.ts.map +0 -1
  586. package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceEmbeds.js","sourceRoot":"","sources":["../../../../../src/components/resources/embeds/ResourceEmbeds.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,oCAAoC,EACpC,0CAA0C,EAC1C,qBAAqB,EACrB,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,6CAA6C,EAC7C,mDAAmD,EACnD,8BAA8B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CONVERSATION_THREAD_LINKED_RESOURCE_FILTER,\n CoreResourceOperation,\n CoreResourceType,\n ErrorCustomMessageReference,\n ExecutionRefKind,\n RELATIONSHIP_MAILBOXES_OF_RELATIONSHIP_FILTER,\n REPRESENTATIVE_ASSIGNMENTS_OF_REPRESENTATION_FILTER,\n getChildDirectionRelationships,\n type ChartInputValues,\n} from '@wildo-ai/saas-models';\nimport { viewerMayPerformOperation } from '~wildo-frontend-lib/core/navigation/launcher-resolution';\nimport { useViewerEffectiveRoles } from '~wildo-frontend-lib/core/navigation/launcher-runtime-availability';\nimport { resolveRelationshipNestedReadSurface } from '~wildo-frontend-lib/core/resources/relationship-surface-runtime.frontend.utils';\nimport type { NavigationSourceRelationship } from '~wildo-frontend-lib/core/navigation/navigation.schemas';\nimport type { FrontendResourceOperationContext } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\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';\nimport { OnboardingView } from '~wildo-frontend-lib/components/views/onboarding-view/OnboardingView';\nimport type { OnboardingViewProps } from '~wildo-frontend-lib/components/views/onboarding-view/OnboardingView';\nimport { ResourceOperationSurface } from '~wildo-frontend-lib/components/resources/ResourceOperationSurface';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { buildResourceInsertedExecutionIdentity } from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport {\n buildResolvedInsertedChartDescriptor,\n buildResourceInsertedChartIdentity,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { FeatureRouteGuard } from '~wildo-frontend-lib/core/features/FeatureRouteGuard';\nimport { SectionHostHeadingContext } from '~wildo-frontend-lib/components/resources/skeleton/SectionHostHeadingContext';\nimport { EmbeddedResourceDescentBoundary } from './EmbeddedResourceDescent';\nimport { useRegisterComposedChild } from './ComposedChildrenRegistry';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { describeEmbedRefusal } from './related-collection-confinement.utils';\n\nimport { CompositeView } from '~wildo-frontend-lib/components/views/composite-view/CompositeView';\nimport {\n useEmbeddedResourceHostContext,\n useOptionalEmbeddedResourceHostContext,\n} from '~wildo-frontend-lib/components/resources/embeds/EmbeddedResourceHostContext';\nimport {\n isSelfReferencingRelatedCollectionTarget,\n useEmbeddedResourceContext,\n type EmbeddedResourceOperationTarget,\n type EmbeddedResourceOperationTargetSelector,\n} from './useEmbeddedResourceContext';\nimport {\n useHostRecordDerivedParentContext,\n mergeDerivedParentIdentifiers,\n} from '~wildo-frontend-lib/components/views/composite-view/useHostRecordDerivedParentContext';\n\ninterface EmbeddedSurfaceProps {\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedChartProps extends EmbeddedSurfaceProps {\n resourceType: string;\n contextResourceIdentifiers?: Record<string, string>;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n /**\n * Explicit chart canvas height (`ChartView` default is 400). Needed because\n * `ChartView` sizes its ECharts canvas by this prop, not by its wrapper — a\n * height utility on the embed's `className` cannot shrink the chart. Pass a\n * number (px) or a CSS length for compact dashboard tiles.\n */\n height?: string | number;\n}\n\nfunction EmbeddedChartRenderer(params: {\n resourceType: string;\n viewRef: string;\n contextResourceIdentifiers?: Record<string, string>;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n height?: string | number;\n}): React.JSX.Element {\n const { registry } = useResourceRegistry();\n const chartView = registry.resourceConfigurations[params.resourceType]\n ?.frontendConfiguration\n ?.chartViews\n ?.find((candidate) => candidate.ref === params.viewRef);\n if (!chartView) {\n throw buildResourceEmbedConfigurationError(\n `Composite chart runtime cannot resolve chart view \"${params.viewRef}\" on resource \"${params.resourceType}\".`,\n {\n resourceType: params.resourceType,\n viewRef: params.viewRef,\n },\n );\n }\n\n const identity = buildResourceInsertedChartIdentity(params.resourceType, { ref: params.viewRef });\n\n return (\n <div className={params.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: params.contextResourceIdentifiers ?? {},\n })}\n contextResourceIdentifiers={params.contextResourceIdentifiers}\n inputs={params.inputs}\n urlParamValues={params.urlParamValues}\n {...(params.height != null ? { height: params.height } : {})}\n // Embedded composite tile → a data-fetch failure degrades locally in the\n // card, no page-level toast (per-widget error isolation).\n localErrorOnly\n />\n </FeatureRouteGuard>\n </div>\n );\n}\n\nexport function EmbedChart({\n resourceType,\n viewRef,\n contextResourceIdentifiers,\n inputs,\n urlParamValues,\n className,\n height,\n}: EmbedChartProps): React.JSX.Element {\n const compositeContext = useEmbeddedResourceHostContext();\n\n return (\n <EmbeddedChartRenderer\n resourceType={resourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={{\n ...(compositeContext.contextResourceIdentifiers ?? {}),\n ...(contextResourceIdentifiers ?? {}),\n }}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n height={height}\n />\n );\n}\n\n/**\n * @wildo_source:part:start saas.frontend.onboarding-view\n *\n * Places an onboarding document on a screen. Import from `@wildo-ai/saas-frontend-lib`.\n */\nexport interface EmbedOnboardingProps {\n /** The document to show — list it on the module's `onboardingViews` too, or its progress is not saved. */\n document: OnboardingViewProps['document'];\n /** Label namespace override, when the document is rendered as part of a larger view. Usually omitted. */\n viewRef?: string;\n /** Save this document's progress under a registered guidance flow's ref instead of its own. Usually omitted. */\n guidanceFlowRef?: string;\n className?: string;\n}\n/** @wildo_source:part:end saas.frontend.onboarding-view */\n\nexport function EmbedOnboarding({\n document,\n viewRef,\n guidanceFlowRef,\n className,\n}: EmbedOnboardingProps): React.JSX.Element {\n return (\n <div className={className}>\n <OnboardingView\n document={document}\n viewRef={viewRef}\n guidanceFlowRef={guidanceFlowRef}\n />\n </div>\n );\n}\n\nexport function EmbedComposite({\n viewRef,\n className,\n}: EmbeddedSurfaceProps): React.JSX.Element {\n // The host record this composite hangs off — used to key the descent, so the\n // SAME composite over a different record still nests while a genuine revisit\n // is refused. Optional context: a composite embedded outside a resource host\n // keys on the view alone, which still catches direct self-embedding.\n const host = useOptionalEmbeddedResourceHostContext();\n const hostRow = host?.hostResourceType\n ? host.contextResourceIdentifiers?.[host.hostResourceType] ?? 'no-row'\n : 'no-host';\n\n return (\n <div className={className}>\n {/*\n D9 — a composite view is the THIRD descent path, and the one most likely\n to recurse in practice: composites in this repository already embed\n `EmbedHostResourceOperation` with `operationLike: READ`, which mounts a\n full record surface that composes its own children. A composite that\n reaches itself again — directly, or through a second composite that links\n back — has no resource embed in the loop to stop it.\n */}\n <EmbeddedResourceDescentBoundary descentKey={`composite:${viewRef}::${hostRow}`}>\n <CompositeView viewRef={viewRef} />\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport interface EmbedExecutionProps extends EmbeddedSurfaceProps {\n contextResourceIdentifiers?: Record<string, string>;\n}\n\nfunction renderEmbeddedExecution(\n viewRef: string,\n navigationZone: ReturnType<typeof useEmbeddedResourceHostContext>['navigationZone'],\n contextResourceIdentifiers?: Record<string, string>,\n className?: string,\n): React.JSX.Element {\n return (\n <div className={className}>\n {/*\n D9 — an execution view is a DESCENT PATH in its own right, and closing it\n is not redundant with bounding resource embeds. A resource-operation embed\n inside an execution view is already bounded, so a mixed chain terminates;\n but an execution view that embeds ITSELF (`EmbedHostExecution` with its own\n `viewRef`) recurses with no resource embed anywhere in the loop, so nothing\n else would ever stop it.\n Keyed on `(viewRef, host row)` for the same reason resource descents are:\n the same view over a DIFFERENT record is legitimate nesting, the same view\n over the same record is a cycle.\n */}\n <EmbeddedResourceDescentBoundary\n descentKey={`execution:${viewRef}::${Object.values(contextResourceIdentifiers ?? {}).join(',') || 'no-row'}`}\n >\n <ExecutionView\n viewRef={viewRef}\n navigationZone={navigationZone}\n contextResourceIdentifiers={contextResourceIdentifiers}\n />\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport function EmbedExecution({\n viewRef,\n contextResourceIdentifiers,\n className,\n}: EmbedExecutionProps): React.JSX.Element {\n const compositeContext = useEmbeddedResourceHostContext();\n\n return renderEmbeddedExecution(\n viewRef,\n compositeContext.navigationZone,\n {\n ...(compositeContext.contextResourceIdentifiers ?? {}),\n ...(contextResourceIdentifiers ?? {}),\n },\n className,\n );\n}\n\nfunction buildResourceEmbedConfigurationError(\n message: string,\n context?: Record<string, unknown>,\n): Error {\n return FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n message,\n component: 'ResourceEmbeds',\n ...context,\n },\n );\n}\n\n/**\n * The identity of one embedded descent: the target resource and the ROW it is about — the record an operation\n * addresses (`getAddressedRecordId`), or, for a collection or a CREATE, the scope it lists or creates into.\n *\n * It used to read the type slot whatever the operation. A collection's type slot holds at most ambient scope, so\n * a host-own LIST embedded in that host's READ (composite → READ t-1 → LIST of tasks) took the READ's own key and\n * was refused as a CYCLE, rendering nothing (round-17 review). Keying every collection as \"no row\" instead would\n * make two lists of different scopes collide, so the collection's scope is its row: its identifiers without the\n * own-type slot, which on a collection is ambient.\n */\nexport function embeddedResourceDescentKey(resourceContext: FrontendResourceOperationContext): string {\n const recordId = FrontendResourceUtils.getInstance().getAddressedRecordId(resourceContext);\n if (recordId) return `embed:${resourceContext.resourceType}::${recordId}`;\n const scope = Object.fromEntries(Object.entries(resourceContext.contextResourceIdentifiers ?? {})\n .filter(([key]) => key !== resourceContext.resourceType));\n return `embed:${resourceContext.resourceType}::scope:${FrontendResourceUtils.buildContextResourceIdentifiersKey(scope)}`;\n}\n\nfunction renderEmbeddedResourceOperation(\n resourceContext: FrontendResourceOperationContext,\n navigationZone: ReturnType<typeof useEmbeddedResourceHostContext>['navigationZone'],\n navigationInitiator: ReturnType<typeof useEmbeddedResourceHostContext>['navigationInitiator'],\n className?: string,\n): React.JSX.Element {\n return (\n <div className={className}>\n {/*\n D7 — the HOST owns the framing, the embed never brings its own.\n `SectionHostHeadingContext` makes the embedded surface suppress its generic\n resource heading (and the page chrome that trails it), so a child placed in\n a template renders as CONTENT rather than as a second page inside the first.\n Without it an embed dropped straight into a display flow stacks its own\n heading, description, parent breadcrumb and back-arrow under the host's —\n the exact defect that had to be fixed in the nested container, arriving\n again through this door because the embed suppressed nothing.\n It is set unconditionally rather than only inside a titled <Section>: an\n author who placed the child decided where it goes, and a surface that\n injects a page header into someone else's flow depending on its ancestors\n is the context-dependent behaviour that made the original defect so hard\n to see. A record-specific `displayLabel` is data, not a duplicate heading,\n and is never suppressed by this context.\n */}\n {/*\n D9 — every embedded surface is one level of DESCENT and must be bounded.\n An embed may mount a full READ surface, which composes its own children,\n which may embed again; on a self-referencing or mutually-recursive edge\n that does not terminate. The key is `(target resource, row)` — the record\n addressed, or a collection's scope (`embeddedResourceDescentKey`) — so a\n legitimate hierarchy over distinct rows keeps descending while a genuine\n revisit of the same record is refused at the moment it happens.\n */}\n <EmbeddedResourceDescentBoundary\n descentKey={embeddedResourceDescentKey(resourceContext)}\n >\n <SectionHostHeadingContext.Provider value={true}>\n <ResourceOperationSurface\n resourceContext={resourceContext}\n navigationZone={navigationZone}\n navigationInitiator={navigationInitiator}\n />\n </SectionHostHeadingContext.Provider>\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport interface EmbedResourceOperationProps {\n resourceContext: FrontendResourceOperationContext;\n className?: string;\n}\n\nexport type EmbedHostResourceOperationProps = EmbeddedResourceOperationTarget\n & EmbeddedResourceOperationTargetSelector\n & {\n className?: string;\n };\n\n/** @wildo_source:part:start saas.frontend.related-resource-embeds facet:layer:frontend facet:family:component */\nexport type EmbedRelatedResourceOperationProps = EmbeddedResourceOperationTargetSelector\n & {\n resourceType: string;\n resourceId?: string;\n relationshipFieldOverrides?: Record<string, string>;\n additionalContext?: Record<string, unknown>;\n className?: string;\n };\n/** @wildo_source:part:end saas.frontend.related-resource-embeds */\n\nexport function EmbedResourceOperation({\n resourceContext,\n className,\n}: EmbedResourceOperationProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\nexport function EmbedHostResourceOperation({\n className,\n ...target\n}: EmbedHostResourceOperationProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = useMemo(\n () => compositeResourceContext.buildOperationContext(target),\n // Keyed by the target's *value*, not the fresh-every-render rest-object identity.\n // buildOperationContext clones resource configs to assemble the context; calling it\n // inline each render churns those clones (the 603-config heap growth) and hands a new\n // `resourceContext` identity to the operation surface, re-firing its context-keyed\n // effects — the composite re-render loop. Recomputes only on a real target / context change.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed by JSON value of `target`\n [compositeResourceContext, JSON.stringify(target)],\n );\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\nexport type EmbedRelatedResourceOperationTarget = Omit<EmbedRelatedResourceOperationProps, 'className'>;\n\nexport function EmbedRelatedResourceOperation({\n className,\n ...target\n}: EmbedRelatedResourceOperationProps): React.JSX.Element {\n // D1 — claim this child for the template that placed it, so the host's\n // automatic composition skips it instead of rendering a second copy below.\n // A no-op outside a registry host, so composite views are unaffected.\n useRegisterComposedChild(target.resourceType);\n const { navigationZone, navigationInitiator: hostNavigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n const { registry } = useResourceRegistry();\n\n const resourceContext = useMemo(\n () => {\n if (!target.resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedResourceOperation() requires a target resourceType.',\n { target },\n );\n }\n return compositeResourceContext.buildOperationContext(target);\n },\n // Keyed by target value, not the fresh rest-object identity — see EmbedHostResourceOperation.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed by JSON value of `target`\n [compositeResourceContext, JSON.stringify(target)],\n );\n\n /*\n * The EDGE this child sits on, carried on every navigation it starts — what the automatic composition\n * (`ResourceLayout_ContainerNested`) already attaches as `sourceRelationship`.\n *\n * Without it a record opened from a TEMPLATE-placed relation never learnt its parent: the READ derives\n * its parent reference from `sourceRelationship`, so the child's declared `inChildView` presentation\n * could not apply. Wonder Todos declares a todo read inside its list as a linked BADGE back to the\n * list; its list page places the todos through `RelatedResourceSections`, and the badge never\n * appeared (#1945). Placing a child yourself must not cost the child its relationship.\n *\n * Resolved through `resolveRelationshipNestedReadSurface`, the same predicate the automatic\n * composition uses, so the two paths cannot disagree about which edge a child sits on. An edge the\n * target does not single out (no match, or several with no `viaForeignKey`) attaches nothing — the\n * behaviour before this, rather than a guess.\n *\n * A target of the HOST's own type sits on an edge only when it is the host's CHILDREN over a self-relationship\n * (`isSelfReferencingRelatedCollectionTarget`, the rule the runtime builds its context by); any other same-type\n * target is the host's own operation, and has no edge to carry.\n */\n const sourceRelationship = useMemo<NavigationSourceRelationship | undefined>(() => {\n const { hostResourceType, hostResourceId, hostResourceConfig } = compositeResourceContext;\n const isOwnTypeOperation = target.resourceType === hostResourceType && !isSelfReferencingRelatedCollectionTarget({\n target, hostResourceType, operation: resourceContext.operation, registry,\n });\n if (!target.resourceType || isOwnTypeOperation || !hostResourceConfig?.resourceRelationships) {\n return undefined;\n }\n const selectedForeignKey = target.relationshipFieldOverrides?.[hostResourceType];\n const edges = getChildDirectionRelationships(hostResourceConfig.resourceRelationships)\n .map((relationship) => resolveRelationshipNestedReadSurface({ parentResourceType: hostResourceType, relationship, registry }))\n .filter((edge): edge is NonNullable<typeof edge> => edge !== undefined)\n .filter((edge) => edge.childResourceType === target.resourceType)\n .filter((edge) => selectedForeignKey === undefined || edge.foreignKeyField === selectedForeignKey);\n if (edges.length !== 1) return undefined;\n const edge = edges[0]!;\n return {\n parentResourceType: hostResourceType,\n parentResourceId: hostResourceId || undefined,\n childResourceType: edge.childResourceType,\n foreignKeyField: edge.foreignKeyField,\n relationshipEdgeKey: edge.relationshipEdgeKey,\n inChildView: edge.inChildView,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by the target's value, like the context above\n }, [compositeResourceContext, registry, resourceContext, JSON.stringify(target)]);\n const navigationInitiator = useMemo(\n () => (sourceRelationship\n ? { ...(hostNavigationInitiator ?? { sourceZone: navigationZone }), sourceRelationship }\n : hostNavigationInitiator),\n [hostNavigationInitiator, navigationZone, sourceRelationship],\n );\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\n/** @wildo_source:part:start saas.frontend.related-resource-embeds facet:layer:frontend facet:family:component */\n/**\n * Which EDGE to embed, when the host has more than one relationship to the same\n * target resource — two lists of todos, an assignee and a reviewer both pointing\n * at users. Keyed by the HOST resource type, valued with the foreign-key field\n * that identifies the edge.\n *\n * `resourceType` alone is ambiguous in that case, and the ambiguity is silent:\n * the resolver picks an edge and renders a plausible-looking wrong collection.\n */\nexport type EmbedRelatedResourceEdgeSelector = Record<string, string>;\n\nexport interface EmbedRelatedResourceListProps {\n /** Target child resource type. */\n resourceType: string;\n /** Disambiguates WHICH edge when the host has several to this target. */\n viaForeignKey?: EmbedRelatedResourceEdgeSelector;\n className?: string;\n}\n\n/**\n * Embed a related resource's LIST — the common case, spelled directly.\n *\n * A pure delegation to {@link EmbedRelatedResourceOperation}: no resolution,\n * addressability or context logic lives here. The operation embed stays the one\n * place that code exists, so a shortcut can never drift from it.\n */\nexport function EmbedRelatedResourceList({\n resourceType,\n viaForeignKey,\n className,\n}: EmbedRelatedResourceListProps): React.JSX.Element {\n return (\n <EmbedRelatedResourceOperation\n resourceType={resourceType}\n operationLike={CoreResourceOperation.LIST}\n relationshipFieldOverrides={viaForeignKey}\n className={className}\n />\n );\n}\n\n/** @wildo_source:part:start saas.frontend.linked-conversations-embed facet:layer:frontend facet:family:component facet:audience:app-developer */\nexport interface EmbedLinkedConversationsProps {\n className?: string;\n}\n\n/**\n * The conversations linked to the host record (#1630) — email threads an inbound channel handler tied to this\n * record with `ctx.thread.link`, newest first. Each opens to its messages in both directions, and an organization\n * administrator can close it.\n *\n * Place it in a READ template or a record composite of the resource your threads are linked to. It is the\n * `conversationThreads` LIST, pinned to this record through `pinnedFilters`: the reader cannot widen it to another\n * record, and it shows only what the reader's own roles may read (organization members read their organization's\n * conversations).\n *\n * @example\n * // frontend/src/modules/<slug>/resources/matters/MatterReadCustomView.tsx\n * <ResourceLayoutPreset_Read_Default {...props}>\n * <Section name=\"conversations\"><EmbedLinkedConversations /></Section>\n * </ResourceLayoutPreset_Read_Default>\n */\nexport function EmbedLinkedConversations({ className }: EmbedLinkedConversationsProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n const { hostResourceType, hostResourceId } = compositeResourceContext;\n\n const resourceContext = useMemo((): FrontendResourceOperationContext => {\n if (!hostResourceId) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedLinkedConversations() needs a host RECORD: place it on a READ surface, where the record it lists conversations for exists.',\n { hostResourceType },\n );\n }\n // Threads are linked by type and id, not by a relationship, so this embed confines them itself (#3072).\n return compositeResourceContext.buildOperationContext({\n resourceType: CoreResourceType.CONVERSATION_THREADS,\n operationLike: CoreResourceOperation.LIST,\n requireAddressable: false,\n pinnedFilters: {\n [CONVERSATION_THREAD_LINKED_RESOURCE_FILTER.RESOURCE_TYPE]: hostResourceType,\n [CONVERSATION_THREAD_LINKED_RESOURCE_FILTER.RESOURCE_ID]: hostResourceId,\n },\n });\n }, [compositeResourceContext, hostResourceType, hostResourceId]);\n\n return renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className);\n}\n/** @wildo_source:part:end saas.frontend.linked-conversations-embed */\n\n/**\n * Where the decisions a conversational run raised are recorded: in the scope of the run they paused, so the store is a\n * function of the run's own variant (#1599, `agentWorkDecisions`).\n */\nconst DECISIONS_OF_CONVERSATIONAL_RUN: Readonly<Record<string, CoreResourceType>> = {\n [CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS]: CoreResourceType.USER_AGENT_WORK_DECISIONS,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS]: CoreResourceType.ORGANIZATION_AGENT_WORK_DECISIONS,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS]: CoreResourceType.APPLICATION_AGENT_WORK_DECISIONS,\n};\n\nexport interface EmbedExecutionDecisionsProps {\n /**\n * The run's `executionId`, its business id. Not the row's `_id`: a decision records the run it paused by the id the\n * runtime knows it by (`executionRef`), which is the business one.\n */\n executionId: string;\n className?: string;\n}\n\n/**\n * The decisions a conversational run raised and how each was answered (#2528): who decided, what they decided, what\n * they changed and why — the scope's agent-work decisions LIST, pinned to this run through `pinnedFilters`, so the\n * reader cannot widen it to another run, and it shows only what their roles may read (the scope's administrator).\n *\n * Place it on the READ surface of a `flowActorExecutions` variant; the decisions store follows the run's variant.\n */\nexport function EmbedExecutionDecisions({ executionId, className }: EmbedExecutionDecisionsProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n const { hostResourceType } = compositeResourceContext;\n\n const resourceContext = useMemo((): FrontendResourceOperationContext => {\n const decisionsResourceType = DECISIONS_OF_CONVERSATIONAL_RUN[hostResourceType];\n if (!decisionsResourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedExecutionDecisions() lists the decisions of a conversational RUN: place it on a flowActorExecutions READ surface.',\n { hostResourceType },\n );\n }\n // A decision names its run by reference, not by a relationship, so this embed confines them itself (#3072).\n return compositeResourceContext.buildOperationContext({\n resourceType: decisionsResourceType,\n operationLike: CoreResourceOperation.LIST,\n requireAddressable: false,\n pinnedFilters: {\n [AGENT_WORK_DECISION_EXECUTION_FILTER.KIND]: ExecutionRefKind.CONVERSATIONAL_EXECUTION,\n [AGENT_WORK_DECISION_EXECUTION_FILTER.ID]: executionId,\n },\n });\n }, [compositeResourceContext, hostResourceType, executionId]);\n\n return renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className);\n}\n\nconst warnedUnlistableRelatedResources = new Set<string>();\n\n/** Loud, once per (host, target): the author asked about a LIST this host cannot embed, and its section will not draw. */\nfunction warnUnlistableRelatedResource(hostResourceType: string, resourceType: string, reason: string | undefined): void {\n const key = `${hostResourceType}::${resourceType}`;\n if (warnedUnlistableRelatedResources.has(key)) return;\n warnedUnlistableRelatedResources.add(key);\n LoggerFrontendService.getLogger().warn(\n `[related-resource-list] the \"${resourceType}\" LIST cannot be embedded on \"${hostResourceType}\", so a section `\n + `asking whether the viewer may read it is not drawn.${reason ? ` ${reason}` : ''}`,\n );\n}\n\n/**\n * May this viewer run the LIST of `resourceType` from the host record (#2589)? The roles the LIST declares, asked the way\n * the shell asks of any operation it offers (`viewerMayPerformOperation`). For a host that draws a titled section around\n * an embed: a section whose list the viewer may not read is not drawn at all, rather than as an empty heading or an\n * error. Presentation only: the backend still decides every request.\n */\nexport function useViewerMayListRelatedResource(\n resourceType: string,\n /**\n * The filters the caller confines the list by itself, when no relationship does (see `pinnedFilters` on the target).\n * `null` when they are not known yet (the record they come from is still loading): the answer is `false`, without\n * asking, so a list that will be pinned is not judged — and warned about — unpinned in the meantime.\n */\n pinnedFilters?: Readonly<Record<string, string>> | null,\n): boolean {\n const compositeResourceContext = useEmbeddedResourceContext();\n const viewer = useViewerEffectiveRoles();\n const pinKey = pinnedFilters ? JSON.stringify(pinnedFilters) : '';\n return useMemo(() => {\n if (pinnedFilters === null) return false;\n // A LIST that cannot be embedded on this host — one nothing could confine to the host record (#3072) — is one the\n // viewer cannot read HERE, whatever their roles: answered `false` rather than thrown from a hook that only asks.\n let list: ReturnType<typeof compositeResourceContext.buildOperationContext>;\n try {\n list = compositeResourceContext.buildOperationContext({ resourceType, operationLike: CoreResourceOperation.LIST, requireAddressable: false, pinnedFilters: pinnedFilters ? JSON.parse(pinKey) as Record<string, string> : undefined });\n } catch (error) {\n warnUnlistableRelatedResource(compositeResourceContext.hostResourceType, resourceType, describeEmbedRefusal(error));\n return false;\n }\n const operation = list.operation as unknown as { roles?: readonly string[]; operationIdentifier: unknown; resourceOperationLike?: unknown };\n return viewerMayPerformOperation({ ...operation, resourceType }, viewer);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the pins are keyed by value (`pinKey`)\n }, [compositeResourceContext, resourceType, viewer, pinKey, pinnedFilters === null]);\n}\n\n/**\n * One LIST pinned to the host relationship, shown only to a viewer the LIST admits (#2589).\n *\n * The client page is read by the firm's members as well as its administrators, and a section they cannot read must not\n * appear as an error in the middle of the page: a list the viewer may not run is not drawn at all. Presentation only:\n * the backend still decides every request, and the pin only narrows what the LIST returns.\n */\nfunction useRepresentationPinnedList(params: {\n embedName: string;\n resourceType: CoreResourceType;\n pinnedFilters: Record<string, string>;\n}): FrontendResourceOperationContext | null {\n const compositeResourceContext = useEmbeddedResourceContext();\n const { hostResourceType } = compositeResourceContext;\n const { embedName, resourceType, pinnedFilters } = params;\n const viewerMayList = useViewerMayListRelatedResource(resourceType, pinnedFilters);\n const pinKey = JSON.stringify(pinnedFilters);\n return useMemo((): FrontendResourceOperationContext | null => {\n if (hostResourceType !== CoreResourceType.ORGANIZATION_REPRESENTATIONS) {\n throw buildResourceEmbedConfigurationError(\n `${embedName}() lists what belongs to one client relationship: place it on an organizationRepresentations READ surface.`,\n { hostResourceType },\n );\n }\n if (!viewerMayList) return null;\n // The relationship's own filter, given by the caller: a mailbox names the relationship, not this representation.\n return compositeResourceContext.buildOperationContext({\n resourceType, operationLike: CoreResourceOperation.LIST, requireAddressable: false, pinnedFilters: JSON.parse(pinKey) as Record<string, string>,\n });\n }, [compositeResourceContext, hostResourceType, viewerMayList, embedName, resourceType, pinKey]);\n}\n\nexport interface EmbedRepresentationTeamProps {\n /** The client relationship's id, as the representing organization holds it: the `organizationRepresentations` row. */\n organizationRepresentationId: string;\n className?: string;\n}\n\n/**\n * The team serving one client relationship (#2589): the `representativeAssignments` LIST, pinned to that relationship\n * through `pinnedFilters`, with its assign and unassign verbs. Assigning from here names the relationship by itself: the\n * embed's context carries the host relationship, and the assign form fills `organizationRepresentationId` from it\n * (`resolveSemanticContextFieldValues`, pinned against the real configuration by\n * `representation-team-assign-prefill.test.ts`); its member picker searches the organization's own members. Shown to the organization's administrators only, the roles the LIST admits; a member\n * reading the client does not see the team.\n */\nexport function EmbedRepresentationTeam({ organizationRepresentationId, className }: EmbedRepresentationTeamProps): React.JSX.Element | null {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const resourceContext = useRepresentationPinnedList({\n embedName: 'EmbedRepresentationTeam',\n resourceType: CoreResourceType.REPRESENTATIVE_ASSIGNMENTS,\n pinnedFilters: { [REPRESENTATIVE_ASSIGNMENTS_OF_REPRESENTATION_FILTER]: organizationRepresentationId },\n });\n return resourceContext ? renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className) : null;\n}\n\nexport interface EmbedRepresentationMailboxesProps {\n /**\n * The relationship's id, as the representation mirrors it (`organizationRelationshipId`): a mailbox names the\n * relationship, not the representing organization's row of it.\n */\n organizationRelationshipId: string;\n className?: string;\n}\n\n/**\n * The mailboxes of one client relationship (#2589): the `relationshipMailboxes` LIST, pinned to that relationship\n * through `pinnedFilters`. Shown to a viewer the LIST admits.\n */\nexport function EmbedRepresentationMailboxes({ organizationRelationshipId, className }: EmbedRepresentationMailboxesProps): React.JSX.Element | null {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const resourceContext = useRepresentationPinnedList({\n embedName: 'EmbedRepresentationMailboxes',\n resourceType: CoreResourceType.RELATIONSHIP_MAILBOXES,\n pinnedFilters: { [RELATIONSHIP_MAILBOXES_OF_RELATIONSHIP_FILTER]: organizationRelationshipId },\n });\n return resourceContext ? renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className) : null;\n}\n\nexport interface EmbedRelatedResourceSearchProps extends EmbedRelatedResourceListProps {}\n\n/**\n * Embed a related resource's SEARCH surface. Same delegation contract as\n * {@link EmbedRelatedResourceList} — only the semantic operation differs.\n */\nexport function EmbedRelatedResourceSearch({\n resourceType,\n viaForeignKey,\n className,\n}: EmbedRelatedResourceSearchProps): React.JSX.Element {\n return (\n <EmbedRelatedResourceOperation\n resourceType={resourceType}\n operationLike={CoreResourceOperation.SEARCH}\n relationshipFieldOverrides={viaForeignKey}\n className={className}\n />\n );\n}\n/** @wildo_source:part:end saas.frontend.related-resource-embeds */\n\nexport interface EmbedHostExecutionProps extends EmbeddedResourceOperationTarget {\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedRelatedExecutionProps extends EmbeddedResourceOperationTarget {\n resourceType: string;\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedHostChartProps extends EmbeddedResourceOperationTarget {\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport interface EmbedRelatedChartProps extends EmbeddedResourceOperationTarget {\n resourceType: string;\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport function EmbedHostChart({\n viewRef,\n inputs,\n urlParamValues,\n className,\n ...target\n}: EmbedHostChartProps): React.JSX.Element {\n const compositeResourceContext = useEmbeddedResourceContext();\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n operationLike: CoreResourceOperation.READ,\n });\n\n // D2: a host-owned chart may require the host's PARENT scope (e.g. a\n // `todo-task-status` chart mandating `todos` when the host is a `task`). Derive\n // the parent id off the host record and merge it UNDER the URL context so the\n // chart's `parentResourcesRequirements` resolve.\n const derivedParents = useHostRecordDerivedParentContext(compositeResourceContext);\n\n return (\n <EmbeddedChartRenderer\n resourceType={compositeResourceContext.hostResourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={mergeDerivedParentIdentifiers(\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n derivedParents,\n )}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n />\n );\n}\n\nexport function EmbedRelatedChart({\n resourceType,\n viewRef,\n inputs,\n urlParamValues,\n className,\n ...target\n}: EmbedRelatedChartProps): React.JSX.Element {\n if (!resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedChart() requires a target resourceType.',\n { target },\n );\n }\n\n const compositeResourceContext = useEmbeddedResourceContext();\n // A RELATED chart aggregates a COLLECTION of `resourceType` scoped by the host\n // record (e.g. the tasks of the current todo) — there is no single addressable\n // related-record id, so it must resolve a collection operation (LIST), NOT READ.\n // Resolving READ here required an addressable related id that never exists in a\n // host→related context and threw a composite configuration error (caught by\n // SurfaceErrorBoundary, degrading the surface). The host context (the parent\n // record's id) is still threaded into the related context via\n // `deriveChildResourceContext`, so the chart stays scoped to the host record.\n // (`EmbedHostChart` keeps READ: the host IS a single addressable record.)\n // Only the IDENTIFIERS are used: the chart is fetched through its own definition, never through this LIST, so the\n // LIST's confinement to the host record (#3072) has nothing to confine here and must not refuse the chart.\n const scopeIdentifiers = compositeResourceContext.deriveRelatedScopeIdentifiers({\n ...target,\n resourceType,\n operationLike: CoreResourceOperation.LIST,\n });\n\n return (\n <EmbeddedChartRenderer\n resourceType={resourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={scopeIdentifiers}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n />\n );\n}\n\nexport function EmbedHostExecution({\n viewRef,\n className,\n ...target\n}: EmbedHostExecutionProps): React.JSX.Element {\n const { navigationZone } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n operationLike: CoreResourceOperation.READ,\n });\n\n // D2: a host-owned execution may anchor on the host's PARENT (e.g. a\n // `task-workspace` execution binding `todoId` when the host is a `task`). Derive\n // the parent id off the host record so the anchor resolves instead of \"No anchor\n // resolved\". Merged UNDER the URL context (URL ids win).\n const derivedParents = useHostRecordDerivedParentContext(compositeResourceContext);\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(\n compositeResourceContext.hostResourceType,\n { ref: viewRef },\n );\n\n return renderEmbeddedExecution(\n insertedIdentity.insertedViewRef,\n navigationZone,\n mergeDerivedParentIdentifiers(\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n derivedParents,\n ),\n className,\n );\n}\n\nexport function EmbedRelatedExecution({\n resourceType,\n viewRef,\n className,\n ...target\n}: EmbedRelatedExecutionProps): React.JSX.Element {\n const { navigationZone } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n if (!resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedExecution() requires a target resourceType.',\n { target: { resourceType, viewRef, ...target } },\n );\n }\n\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n resourceType,\n operationLike: CoreResourceOperation.READ,\n });\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(\n resourceType,\n { ref: viewRef },\n );\n\n return renderEmbeddedExecution(\n insertedIdentity.insertedViewRef,\n navigationZone,\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n className,\n );\n}\n"]}
1
+ {"version":3,"file":"ResourceEmbeds.js","sourceRoot":"","sources":["../../../../../src/components/resources/embeds/ResourceEmbeds.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,oCAAoC,EACpC,0CAA0C,EAC1C,qBAAqB,EACrB,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,6CAA6C,EAC7C,m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,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,wBAAwB,CAAC,qBAAqB,CAAC;QACrE,GAAG,MAAM;QACT,YAAY;QACZ,aAAa,EAAE,qBAAqB,CAAC,IAAI;KAC1C,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAG,sCAAsC,CAC7D,YAAY,EACZ,EAAE,GAAG,EAAE,OAAO,EAAE,CACjB,CAAC;IAEF,OAAO,uBAAuB,CAC5B,gBAAgB,CAAC,eAAe,EAChC,cAAc,EACd,qBAAqB,CAAC,yBAAyB,CAAC,eAAe,CAAC,0BAA0B,CAAC,EAC3F,SAAS,CACV,CAAC;AACJ,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport {\n AGENT_WORK_DECISION_EXECUTION_FILTER,\n CONVERSATION_THREAD_LINKED_RESOURCE_FILTER,\n CoreResourceOperation,\n CoreResourceType,\n ErrorCustomMessageReference,\n ExecutionRefKind,\n RELATIONSHIP_MAILBOXES_OF_RELATIONSHIP_FILTER,\n REPRESENTATIVE_ASSIGNMENTS_OF_REPRESENTATION_FILTER,\n getChildDirectionRelationships,\n type ChartInputValues,\n} from '@wildo-ai/saas-models';\nimport { viewerMayPerformOperation } from '~wildo-frontend-lib/core/navigation/launcher-resolution';\nimport { useViewerEffectiveRoles } from '~wildo-frontend-lib/core/navigation/launcher-runtime-availability';\nimport { resolveRelationshipNestedReadSurface } from '~wildo-frontend-lib/core/resources/relationship-surface-runtime.frontend.utils';\nimport type { NavigationSourceRelationship } from '~wildo-frontend-lib/core/navigation/navigation.schemas';\nimport type { FrontendResourceOperationContext } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\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';\nimport { OnboardingView } from '~wildo-frontend-lib/components/views/onboarding-view/OnboardingView';\nimport type { OnboardingViewProps } from '~wildo-frontend-lib/components/views/onboarding-view/OnboardingView';\nimport { ResourceOperationSurface } from '~wildo-frontend-lib/components/resources/ResourceOperationSurface';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { buildResourceInsertedExecutionIdentity } from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport {\n buildResolvedInsertedChartDescriptor,\n buildResourceInsertedChartIdentity,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { RequiredFeaturesGate } from '~wildo-frontend-lib/core/features/RequiredFeaturesGate';\nimport { RequiredFeaturesGatePresentation } from '~wildo-frontend-lib/core/features/required-features-gate-presentation';\nimport { SectionHostHeadingContext } from '~wildo-frontend-lib/components/resources/skeleton/SectionHostHeadingContext';\nimport { EmbeddedResourceDescentBoundary } from './EmbeddedResourceDescent';\nimport { useRegisterComposedChild } from './ComposedChildrenRegistry';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { describeEmbedRefusal } from './related-collection-confinement.utils';\n\nimport { CompositeView } from '~wildo-frontend-lib/components/views/composite-view/CompositeView';\nimport {\n useEmbeddedResourceHostContext,\n useOptionalEmbeddedResourceHostContext,\n} from '~wildo-frontend-lib/components/resources/embeds/EmbeddedResourceHostContext';\nimport {\n isSelfReferencingRelatedCollectionTarget,\n useEmbeddedResourceContext,\n type EmbeddedResourceOperationTarget,\n type EmbeddedResourceOperationTargetSelector,\n} from './useEmbeddedResourceContext';\nimport {\n useHostRecordDerivedParentContext,\n mergeDerivedParentIdentifiers,\n} from '~wildo-frontend-lib/components/views/composite-view/useHostRecordDerivedParentContext';\n\ninterface EmbeddedSurfaceProps {\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedChartProps extends EmbeddedSurfaceProps {\n resourceType: string;\n contextResourceIdentifiers?: Record<string, string>;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n /**\n * Explicit chart canvas height (`ChartView` default is 400). Needed because\n * `ChartView` sizes its ECharts canvas by this prop, not by its wrapper — a\n * height utility on the embed's `className` cannot shrink the chart. Pass a\n * number (px) or a CSS length for compact dashboard tiles.\n */\n height?: string | number;\n}\n\nfunction EmbeddedChartRenderer(params: {\n resourceType: string;\n viewRef: string;\n contextResourceIdentifiers?: Record<string, string>;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n height?: string | number;\n}): React.JSX.Element | null {\n const { registry } = useResourceRegistry();\n const chartView = registry.resourceConfigurations[params.resourceType]\n ?.frontendConfiguration\n ?.chartViews\n ?.find((candidate) => candidate.ref === params.viewRef);\n // #4252: a chart the backend's chart gate would refuse this viewer is not drawn (nor while their roles load). A\n // dashboard tile is decided once more here, with the same answer.\n const readDecision = useChartReadDecision(chartView?.chartDefinition);\n if (!chartView) {\n throw buildResourceEmbedConfigurationError(\n `Composite chart runtime cannot resolve chart view \"${params.viewRef}\" on resource \"${params.resourceType}\".`,\n {\n resourceType: params.resourceType,\n viewRef: params.viewRef,\n },\n );\n }\n\n if (readDecision !== ChartReadDecision.ALLOWED) return null;\n const identity = buildResourceInsertedChartIdentity(params.resourceType, { ref: params.viewRef });\n\n return (\n <div className={params.className}>\n <RequiredFeaturesGate requiredFeatures={chartView.chartDefinition.requiredFeatures} presentation={RequiredFeaturesGatePresentation.TILE} lockedTileHeight={params.height ?? undefined}>\n <ChartView\n viewRef={identity.insertedViewRef}\n viewDefinition={chartView}\n runtimeDescriptor={buildResolvedInsertedChartDescriptor({\n identity,\n chartView,\n contextResourceIdentifiers: params.contextResourceIdentifiers ?? {},\n })}\n contextResourceIdentifiers={params.contextResourceIdentifiers}\n inputs={params.inputs}\n urlParamValues={params.urlParamValues}\n {...(params.height != null ? { height: params.height } : {})}\n // Embedded composite tile → a data-fetch failure degrades locally in the\n // card, no page-level toast (per-widget error isolation).\n localErrorOnly\n />\n </RequiredFeaturesGate>\n </div>\n );\n}\n\nexport function EmbedChart({\n resourceType,\n viewRef,\n contextResourceIdentifiers,\n inputs,\n urlParamValues,\n className,\n height,\n}: EmbedChartProps): React.JSX.Element {\n const compositeContext = useEmbeddedResourceHostContext();\n\n return (\n <EmbeddedChartRenderer\n resourceType={resourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={{\n ...(compositeContext.contextResourceIdentifiers ?? {}),\n ...(contextResourceIdentifiers ?? {}),\n }}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n height={height}\n />\n );\n}\n\n/**\n * @wildo_source:part:start saas.frontend.onboarding-view\n *\n * Places an onboarding document on a screen. Import from `@wildo-ai/saas-frontend-lib`.\n */\nexport interface EmbedOnboardingProps {\n /** The document to show — list it on the module's `onboardingViews` too, or its progress is not saved. */\n document: OnboardingViewProps['document'];\n /** Label namespace override, when the document is rendered as part of a larger view. Usually omitted. */\n viewRef?: string;\n /** Save this document's progress under a registered guidance flow's ref instead of its own. Usually omitted. */\n guidanceFlowRef?: string;\n className?: string;\n}\n/** @wildo_source:part:end saas.frontend.onboarding-view */\n\nexport function EmbedOnboarding({\n document,\n viewRef,\n guidanceFlowRef,\n className,\n}: EmbedOnboardingProps): React.JSX.Element {\n return (\n <div className={className}>\n <OnboardingView\n document={document}\n viewRef={viewRef}\n guidanceFlowRef={guidanceFlowRef}\n />\n </div>\n );\n}\n\nexport function EmbedComposite({\n viewRef,\n className,\n}: EmbeddedSurfaceProps): React.JSX.Element {\n // The host record this composite hangs off — used to key the descent, so the\n // SAME composite over a different record still nests while a genuine revisit\n // is refused. Optional context: a composite embedded outside a resource host\n // keys on the view alone, which still catches direct self-embedding.\n const host = useOptionalEmbeddedResourceHostContext();\n const hostRow = host?.hostResourceType\n ? host.contextResourceIdentifiers?.[host.hostResourceType] ?? 'no-row'\n : 'no-host';\n\n return (\n <div className={className}>\n {/*\n D9 — a composite view is the THIRD descent path, and the one most likely\n to recurse in practice: composites in this repository already embed\n `EmbedHostResourceOperation` with `operationLike: READ`, which mounts a\n full record surface that composes its own children. A composite that\n reaches itself again — directly, or through a second composite that links\n back — has no resource embed in the loop to stop it.\n */}\n <EmbeddedResourceDescentBoundary descentKey={`composite:${viewRef}::${hostRow}`}>\n <CompositeView viewRef={viewRef} featureGatePresentation={RequiredFeaturesGatePresentation.TILE} />\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport interface EmbedExecutionProps extends EmbeddedSurfaceProps {\n contextResourceIdentifiers?: Record<string, string>;\n}\n\nfunction renderEmbeddedExecution(\n viewRef: string,\n navigationZone: ReturnType<typeof useEmbeddedResourceHostContext>['navigationZone'],\n contextResourceIdentifiers?: Record<string, string>,\n className?: string,\n): React.JSX.Element {\n return (\n <div className={className}>\n {/*\n D9 — an execution view is a DESCENT PATH in its own right, and closing it\n is not redundant with bounding resource embeds. A resource-operation embed\n inside an execution view is already bounded, so a mixed chain terminates;\n but an execution view that embeds ITSELF (`EmbedHostExecution` with its own\n `viewRef`) recurses with no resource embed anywhere in the loop, so nothing\n else would ever stop it.\n Keyed on `(viewRef, host row)` for the same reason resource descents are:\n the same view over a DIFFERENT record is legitimate nesting, the same view\n over the same record is a cycle.\n */}\n <EmbeddedResourceDescentBoundary\n descentKey={`execution:${viewRef}::${Object.values(contextResourceIdentifiers ?? {}).join(',') || 'no-row'}`}\n >\n <ExecutionView\n viewRef={viewRef}\n navigationZone={navigationZone}\n contextResourceIdentifiers={contextResourceIdentifiers}\n featureGatePresentation={RequiredFeaturesGatePresentation.TILE}\n />\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport function EmbedExecution({\n viewRef,\n contextResourceIdentifiers,\n className,\n}: EmbedExecutionProps): React.JSX.Element {\n const compositeContext = useEmbeddedResourceHostContext();\n\n return renderEmbeddedExecution(\n viewRef,\n compositeContext.navigationZone,\n {\n ...(compositeContext.contextResourceIdentifiers ?? {}),\n ...(contextResourceIdentifiers ?? {}),\n },\n className,\n );\n}\n\nfunction buildResourceEmbedConfigurationError(\n message: string,\n context?: Record<string, unknown>,\n): Error {\n return FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n message,\n component: 'ResourceEmbeds',\n ...context,\n },\n );\n}\n\n/**\n * The identity of one embedded descent: the target resource and the ROW it is about — the record an operation\n * addresses (`getAddressedRecordId`), or, for a collection or a CREATE, the scope it lists or creates into.\n *\n * It used to read the type slot whatever the operation. A collection's type slot holds at most ambient scope, so\n * a host-own LIST embedded in that host's READ (composite → READ t-1 → LIST of tasks) took the READ's own key and\n * was refused as a CYCLE, rendering nothing (round-17 review). Keying every collection as \"no row\" instead would\n * make two lists of different scopes collide, so the collection's scope is its row: its identifiers without the\n * own-type slot, which on a collection is ambient.\n */\nexport function embeddedResourceDescentKey(resourceContext: FrontendResourceOperationContext): string {\n const recordId = FrontendResourceUtils.getInstance().getAddressedRecordId(resourceContext);\n if (recordId) return `embed:${resourceContext.resourceType}::${recordId}`;\n const scope = Object.fromEntries(Object.entries(resourceContext.contextResourceIdentifiers ?? {})\n .filter(([key]) => key !== resourceContext.resourceType));\n return `embed:${resourceContext.resourceType}::scope:${FrontendResourceUtils.buildContextResourceIdentifiersKey(scope)}`;\n}\n\nfunction renderEmbeddedResourceOperation(\n resourceContext: FrontendResourceOperationContext,\n navigationZone: ReturnType<typeof useEmbeddedResourceHostContext>['navigationZone'],\n navigationInitiator: ReturnType<typeof useEmbeddedResourceHostContext>['navigationInitiator'],\n className?: string,\n): React.JSX.Element {\n return (\n <div className={className}>\n {/*\n D7 — the HOST owns the framing, the embed never brings its own.\n `SectionHostHeadingContext` makes the embedded surface suppress its generic\n resource heading (and the page chrome that trails it), so a child placed in\n a template renders as CONTENT rather than as a second page inside the first.\n Without it an embed dropped straight into a display flow stacks its own\n heading, description, parent breadcrumb and back-arrow under the host's —\n the exact defect that had to be fixed in the nested container, arriving\n again through this door because the embed suppressed nothing.\n It is set unconditionally rather than only inside a titled <Section>: an\n author who placed the child decided where it goes, and a surface that\n injects a page header into someone else's flow depending on its ancestors\n is the context-dependent behaviour that made the original defect so hard\n to see. A record-specific `displayLabel` is data, not a duplicate heading,\n and is never suppressed by this context.\n */}\n {/*\n D9 — every embedded surface is one level of DESCENT and must be bounded.\n An embed may mount a full READ surface, which composes its own children,\n which may embed again; on a self-referencing or mutually-recursive edge\n that does not terminate. The key is `(target resource, row)` — the record\n addressed, or a collection's scope (`embeddedResourceDescentKey`) — so a\n legitimate hierarchy over distinct rows keeps descending while a genuine\n revisit of the same record is refused at the moment it happens.\n */}\n <EmbeddedResourceDescentBoundary\n descentKey={embeddedResourceDescentKey(resourceContext)}\n >\n <SectionHostHeadingContext.Provider value={true}>\n <ResourceOperationSurface\n resourceContext={resourceContext}\n navigationZone={navigationZone}\n navigationInitiator={navigationInitiator}\n />\n </SectionHostHeadingContext.Provider>\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport interface EmbedResourceOperationProps {\n resourceContext: FrontendResourceOperationContext;\n className?: string;\n}\n\nexport type EmbedHostResourceOperationProps = EmbeddedResourceOperationTarget\n & EmbeddedResourceOperationTargetSelector\n & {\n className?: string;\n };\n\n/** @wildo_source:part:start saas.frontend.related-resource-embeds facet:layer:frontend facet:family:component */\nexport type EmbedRelatedResourceOperationProps = EmbeddedResourceOperationTargetSelector\n & {\n resourceType: string;\n resourceId?: string;\n relationshipFieldOverrides?: Record<string, string>;\n additionalContext?: Record<string, unknown>;\n className?: string;\n };\n/** @wildo_source:part:end saas.frontend.related-resource-embeds */\n\nexport function EmbedResourceOperation({\n resourceContext,\n className,\n}: EmbedResourceOperationProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\nexport function EmbedHostResourceOperation({\n className,\n ...target\n}: EmbedHostResourceOperationProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = useMemo(\n () => compositeResourceContext.buildOperationContext(target),\n // Keyed by the target's *value*, not the fresh-every-render rest-object identity.\n // buildOperationContext clones resource configs to assemble the context; calling it\n // inline each render churns those clones (the 603-config heap growth) and hands a new\n // `resourceContext` identity to the operation surface, re-firing its context-keyed\n // effects — the composite re-render loop. Recomputes only on a real target / context change.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed by JSON value of `target`\n [compositeResourceContext, JSON.stringify(target)],\n );\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\nexport type EmbedRelatedResourceOperationTarget = Omit<EmbedRelatedResourceOperationProps, 'className'>;\n\nexport function EmbedRelatedResourceOperation({\n className,\n ...target\n}: EmbedRelatedResourceOperationProps): React.JSX.Element {\n // D1 — claim this child for the template that placed it, so the host's\n // automatic composition skips it instead of rendering a second copy below.\n // A no-op outside a registry host, so composite views are unaffected.\n useRegisterComposedChild(target.resourceType);\n const { navigationZone, navigationInitiator: hostNavigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n const { registry } = useResourceRegistry();\n\n const resourceContext = useMemo(\n () => {\n if (!target.resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedResourceOperation() requires a target resourceType.',\n { target },\n );\n }\n return compositeResourceContext.buildOperationContext(target);\n },\n // Keyed by target value, not the fresh rest-object identity — see EmbedHostResourceOperation.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed by JSON value of `target`\n [compositeResourceContext, JSON.stringify(target)],\n );\n\n /*\n * The EDGE this child sits on, carried on every navigation it starts — what the automatic composition\n * (`ResourceLayout_ContainerNested`) already attaches as `sourceRelationship`.\n *\n * Without it a record opened from a TEMPLATE-placed relation never learnt its parent: the READ derives\n * its parent reference from `sourceRelationship`, so the child's declared `inChildView` presentation\n * could not apply. Wonder Todos declares a todo read inside its list as a linked BADGE back to the\n * list; its list page places the todos through `RelatedResourceSections`, and the badge never\n * appeared (#1945). Placing a child yourself must not cost the child its relationship.\n *\n * Resolved through `resolveRelationshipNestedReadSurface`, the same predicate the automatic\n * composition uses, so the two paths cannot disagree about which edge a child sits on. An edge the\n * target does not single out (no match, or several with no `viaForeignKey`) attaches nothing — the\n * behaviour before this, rather than a guess.\n *\n * A target of the HOST's own type sits on an edge only when it is the host's CHILDREN over a self-relationship\n * (`isSelfReferencingRelatedCollectionTarget`, the rule the runtime builds its context by); any other same-type\n * target is the host's own operation, and has no edge to carry.\n */\n const sourceRelationship = useMemo<NavigationSourceRelationship | undefined>(() => {\n const { hostResourceType, hostResourceId, hostResourceConfig } = compositeResourceContext;\n const isOwnTypeOperation = target.resourceType === hostResourceType && !isSelfReferencingRelatedCollectionTarget({\n target, hostResourceType, operation: resourceContext.operation, registry,\n });\n if (!target.resourceType || isOwnTypeOperation || !hostResourceConfig?.resourceRelationships) {\n return undefined;\n }\n const selectedForeignKey = target.relationshipFieldOverrides?.[hostResourceType];\n const edges = getChildDirectionRelationships(hostResourceConfig.resourceRelationships)\n .map((relationship) => resolveRelationshipNestedReadSurface({ parentResourceType: hostResourceType, relationship, registry }))\n .filter((edge): edge is NonNullable<typeof edge> => edge !== undefined)\n .filter((edge) => edge.childResourceType === target.resourceType)\n .filter((edge) => selectedForeignKey === undefined || edge.foreignKeyField === selectedForeignKey);\n if (edges.length !== 1) return undefined;\n const edge = edges[0]!;\n return {\n parentResourceType: hostResourceType,\n parentResourceId: hostResourceId || undefined,\n childResourceType: edge.childResourceType,\n foreignKeyField: edge.foreignKeyField,\n relationshipEdgeKey: edge.relationshipEdgeKey,\n inChildView: edge.inChildView,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by the target's value, like the context above\n }, [compositeResourceContext, registry, resourceContext, JSON.stringify(target)]);\n const navigationInitiator = useMemo(\n () => (sourceRelationship\n ? { ...(hostNavigationInitiator ?? { sourceZone: navigationZone }), sourceRelationship }\n : hostNavigationInitiator),\n [hostNavigationInitiator, navigationZone, sourceRelationship],\n );\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\n/** @wildo_source:part:start saas.frontend.related-resource-embeds facet:layer:frontend facet:family:component */\n/**\n * Which EDGE to embed, when the host has more than one relationship to the same\n * target resource — two lists of todos, an assignee and a reviewer both pointing\n * at users. Keyed by the HOST resource type, valued with the foreign-key field\n * that identifies the edge.\n *\n * `resourceType` alone is ambiguous in that case, and the ambiguity is silent:\n * the resolver picks an edge and renders a plausible-looking wrong collection.\n */\nexport type EmbedRelatedResourceEdgeSelector = Record<string, string>;\n\nexport interface EmbedRelatedResourceListProps {\n /** Target child resource type. */\n resourceType: string;\n /** Disambiguates WHICH edge when the host has several to this target. */\n viaForeignKey?: EmbedRelatedResourceEdgeSelector;\n className?: string;\n}\n\n/**\n * Embed a related resource's LIST — the common case, spelled directly.\n *\n * A pure delegation to {@link EmbedRelatedResourceOperation}: no resolution,\n * addressability or context logic lives here. The operation embed stays the one\n * place that code exists, so a shortcut can never drift from it.\n */\nexport function EmbedRelatedResourceList({\n resourceType,\n viaForeignKey,\n className,\n}: EmbedRelatedResourceListProps): React.JSX.Element {\n return (\n <EmbedRelatedResourceOperation\n resourceType={resourceType}\n operationLike={CoreResourceOperation.LIST}\n relationshipFieldOverrides={viaForeignKey}\n className={className}\n />\n );\n}\n\n/** @wildo_source:part:start saas.frontend.linked-conversations-embed facet:layer:frontend facet:family:component facet:audience:app-developer */\nexport interface EmbedLinkedConversationsProps {\n className?: string;\n}\n\n/**\n * The conversations linked to the host record — email threads an inbound channel handler tied to this\n * record with `ctx.thread.link`, newest first. Each opens to its messages in both directions, and an organization\n * administrator can close it.\n *\n * Place it in a READ template or a record composite of the resource your threads are linked to. It is the\n * `conversationThreads` LIST, pinned to this record through `pinnedFilters`: the reader cannot widen it to another\n * record, and it shows only what the reader's own roles may read (organization members read their organization's\n * conversations).\n *\n * @example\n * // frontend/src/modules/<slug>/resources/matters/MatterReadCustomView.tsx\n * <ResourceLayoutPreset_Read_Default {...props}>\n * <Section name=\"conversations\"><EmbedLinkedConversations /></Section>\n * </ResourceLayoutPreset_Read_Default>\n */\nexport function EmbedLinkedConversations({ className }: EmbedLinkedConversationsProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n const { hostResourceType, hostResourceId } = compositeResourceContext;\n\n const resourceContext = useMemo((): FrontendResourceOperationContext => {\n if (!hostResourceId) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedLinkedConversations() needs a host RECORD: place it on a READ surface, where the record it lists conversations for exists.',\n { hostResourceType },\n );\n }\n // Threads are linked by type and id, not by a relationship, so this embed confines them itself.\n return compositeResourceContext.buildOperationContext({\n resourceType: CoreResourceType.CONVERSATION_THREADS,\n operationLike: CoreResourceOperation.LIST,\n requireAddressable: false,\n pinnedFilters: {\n [CONVERSATION_THREAD_LINKED_RESOURCE_FILTER.RESOURCE_TYPE]: hostResourceType,\n [CONVERSATION_THREAD_LINKED_RESOURCE_FILTER.RESOURCE_ID]: hostResourceId,\n },\n });\n }, [compositeResourceContext, hostResourceType, hostResourceId]);\n\n return renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className);\n}\n/** @wildo_source:part:end saas.frontend.linked-conversations-embed */\n\n/**\n * Where the decisions a conversational run raised are recorded: in the scope of the run they paused, so the store is a\n * function of the run's own variant (`agentWorkDecisions`).\n */\nconst DECISIONS_OF_CONVERSATIONAL_RUN: Readonly<Record<string, CoreResourceType>> = {\n [CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS]: CoreResourceType.USER_AGENT_WORK_DECISIONS,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS]: CoreResourceType.ORGANIZATION_AGENT_WORK_DECISIONS,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS]: CoreResourceType.APPLICATION_AGENT_WORK_DECISIONS,\n};\n\nexport interface EmbedExecutionDecisionsProps {\n /**\n * The run's `executionId`, its business id. Not the row's `_id`: a decision records the run it paused by the id the\n * runtime knows it by (`executionRef`), which is the business one.\n */\n executionId: string;\n className?: string;\n}\n\n/**\n * The decisions a conversational run raised and how each was answered: who decided, what they decided, what\n * they changed and why — the scope's agent-work decisions LIST, pinned to this run through `pinnedFilters`, so the\n * reader cannot widen it to another run, and it shows only what their roles may read (the scope's administrator).\n *\n * Place it on the READ surface of a `flowActorExecutions` variant; the decisions store follows the run's variant.\n */\nexport function EmbedExecutionDecisions({ executionId, className }: EmbedExecutionDecisionsProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n const { hostResourceType } = compositeResourceContext;\n\n const resourceContext = useMemo((): FrontendResourceOperationContext => {\n const decisionsResourceType = DECISIONS_OF_CONVERSATIONAL_RUN[hostResourceType];\n if (!decisionsResourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedExecutionDecisions() lists the decisions of a conversational RUN: place it on a flowActorExecutions READ surface.',\n { hostResourceType },\n );\n }\n // A decision names its run by reference, not by a relationship, so this embed confines them itself.\n return compositeResourceContext.buildOperationContext({\n resourceType: decisionsResourceType,\n operationLike: CoreResourceOperation.LIST,\n requireAddressable: false,\n pinnedFilters: {\n [AGENT_WORK_DECISION_EXECUTION_FILTER.KIND]: ExecutionRefKind.CONVERSATIONAL_EXECUTION,\n [AGENT_WORK_DECISION_EXECUTION_FILTER.ID]: executionId,\n },\n });\n }, [compositeResourceContext, hostResourceType, executionId]);\n\n return renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className);\n}\n\nconst warnedUnlistableRelatedResources = new Set<string>();\n\n/** Loud, once per (host, target): the author asked about a LIST this host cannot embed, and its section will not draw. */\nfunction warnUnlistableRelatedResource(hostResourceType: string, resourceType: string, reason: string | undefined): void {\n const key = `${hostResourceType}::${resourceType}`;\n if (warnedUnlistableRelatedResources.has(key)) return;\n warnedUnlistableRelatedResources.add(key);\n LoggerFrontendService.getLogger().warn(\n `[related-resource-list] the \"${resourceType}\" LIST cannot be embedded on \"${hostResourceType}\", so a section `\n + `asking whether the viewer may read it is not drawn.${reason ? ` ${reason}` : ''}`,\n );\n}\n\n/**\n * May this viewer run the LIST of `resourceType` from the host record? The roles the LIST declares, asked the way\n * the shell asks of any operation it offers (`viewerMayPerformOperation`). For a host that draws a titled section around\n * an embed: a section whose list the viewer may not read is not drawn at all, rather than as an empty heading or an\n * error. Presentation only: the backend still decides every request.\n */\nexport function useViewerMayListRelatedResource(\n resourceType: string,\n /**\n * The filters the caller confines the list by itself, when no relationship does (see `pinnedFilters` on the target).\n * `null` when they are not known yet (the record they come from is still loading): the answer is `false`, without\n * asking, so a list that will be pinned is not judged — and warned about — unpinned in the meantime.\n */\n pinnedFilters?: Readonly<Record<string, string>> | null,\n): boolean {\n const compositeResourceContext = useEmbeddedResourceContext();\n const viewer = useViewerEffectiveRoles();\n const pinKey = pinnedFilters ? JSON.stringify(pinnedFilters) : '';\n return useMemo(() => {\n if (pinnedFilters === null) return false;\n // A LIST that cannot be embedded on this host — one nothing could confine to the host record — is one the\n // viewer cannot read HERE, whatever their roles: answered `false` rather than thrown from a hook that only asks.\n let list: ReturnType<typeof compositeResourceContext.buildOperationContext>;\n try {\n list = compositeResourceContext.buildOperationContext({ resourceType, operationLike: CoreResourceOperation.LIST, requireAddressable: false, pinnedFilters: pinnedFilters ? JSON.parse(pinKey) as Record<string, string> : undefined });\n } catch (error) {\n warnUnlistableRelatedResource(compositeResourceContext.hostResourceType, resourceType, describeEmbedRefusal(error));\n return false;\n }\n const operation = list.operation as unknown as { roles?: readonly string[]; operationIdentifier: unknown; resourceOperationLike?: unknown };\n return viewerMayPerformOperation({ ...operation, resourceType }, viewer);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- the pins are keyed by value (`pinKey`)\n }, [compositeResourceContext, resourceType, viewer, pinKey, pinnedFilters === null]);\n}\n\n/**\n * One LIST pinned to the host relationship, shown only to a viewer the LIST admits.\n *\n * The client page is read by the firm's members as well as its administrators, and a section they cannot read must not\n * appear as an error in the middle of the page: a list the viewer may not run is not drawn at all. Presentation only:\n * the backend still decides every request, and the pin only narrows what the LIST returns.\n */\nfunction useRepresentationPinnedList(params: {\n embedName: string;\n resourceType: CoreResourceType;\n pinnedFilters: Record<string, string>;\n}): FrontendResourceOperationContext | null {\n const compositeResourceContext = useEmbeddedResourceContext();\n const { hostResourceType } = compositeResourceContext;\n const { embedName, resourceType, pinnedFilters } = params;\n const viewerMayList = useViewerMayListRelatedResource(resourceType, pinnedFilters);\n const pinKey = JSON.stringify(pinnedFilters);\n return useMemo((): FrontendResourceOperationContext | null => {\n if (hostResourceType !== CoreResourceType.ORGANIZATION_REPRESENTATIONS) {\n throw buildResourceEmbedConfigurationError(\n `${embedName}() lists what belongs to one client relationship: place it on an organizationRepresentations READ surface.`,\n { hostResourceType },\n );\n }\n if (!viewerMayList) return null;\n // The relationship's own filter, given by the caller: a mailbox names the relationship, not this representation.\n return compositeResourceContext.buildOperationContext({\n resourceType, operationLike: CoreResourceOperation.LIST, requireAddressable: false, pinnedFilters: JSON.parse(pinKey) as Record<string, string>,\n });\n }, [compositeResourceContext, hostResourceType, viewerMayList, embedName, resourceType, pinKey]);\n}\n\nexport interface EmbedRepresentationTeamProps {\n /** The client relationship's id, as the representing organization holds it: the `organizationRepresentations` row. */\n organizationRepresentationId: string;\n className?: string;\n}\n\n/**\n * The team serving one client relationship: the `representativeAssignments` LIST, pinned to that relationship\n * through `pinnedFilters`, with its assign and unassign verbs. Assigning from here names the relationship by itself: the\n * embed's context carries the host relationship, and the assign form fills `organizationRepresentationId` from it\n * (`resolveSemanticContextFieldValues`, pinned against the real configuration by\n * `representation-team-assign-prefill.test.ts`); its member picker searches the organization's own members. Shown to the organization's administrators only, the roles the LIST admits; a member\n * reading the client does not see the team.\n */\nexport function EmbedRepresentationTeam({ organizationRepresentationId, className }: EmbedRepresentationTeamProps): React.JSX.Element | null {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const resourceContext = useRepresentationPinnedList({\n embedName: 'EmbedRepresentationTeam',\n resourceType: CoreResourceType.REPRESENTATIVE_ASSIGNMENTS,\n pinnedFilters: { [REPRESENTATIVE_ASSIGNMENTS_OF_REPRESENTATION_FILTER]: organizationRepresentationId },\n });\n return resourceContext ? renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className) : null;\n}\n\nexport interface EmbedRepresentationMailboxesProps {\n /**\n * The relationship's id, as the representation mirrors it (`organizationRelationshipId`): a mailbox names the\n * relationship, not the representing organization's row of it.\n */\n organizationRelationshipId: string;\n className?: string;\n}\n\n/**\n * The mailboxes of one client relationship: the `relationshipMailboxes` LIST, pinned to that relationship\n * through `pinnedFilters`. Shown to a viewer the LIST admits.\n */\nexport function EmbedRepresentationMailboxes({ organizationRelationshipId, className }: EmbedRepresentationMailboxesProps): React.JSX.Element | null {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const resourceContext = useRepresentationPinnedList({\n embedName: 'EmbedRepresentationMailboxes',\n resourceType: CoreResourceType.RELATIONSHIP_MAILBOXES,\n pinnedFilters: { [RELATIONSHIP_MAILBOXES_OF_RELATIONSHIP_FILTER]: organizationRelationshipId },\n });\n return resourceContext ? renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className) : null;\n}\n\nexport interface EmbedRelatedResourceSearchProps extends EmbedRelatedResourceListProps {}\n\n/**\n * Embed a related resource's SEARCH surface. Same delegation contract as\n * {@link EmbedRelatedResourceList} — only the semantic operation differs.\n */\nexport function EmbedRelatedResourceSearch({\n resourceType,\n viaForeignKey,\n className,\n}: EmbedRelatedResourceSearchProps): React.JSX.Element {\n return (\n <EmbedRelatedResourceOperation\n resourceType={resourceType}\n operationLike={CoreResourceOperation.SEARCH}\n relationshipFieldOverrides={viaForeignKey}\n className={className}\n />\n );\n}\n/** @wildo_source:part:end saas.frontend.related-resource-embeds */\n\nexport interface EmbedHostExecutionProps extends EmbeddedResourceOperationTarget {\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedRelatedExecutionProps extends EmbeddedResourceOperationTarget {\n resourceType: string;\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedHostChartProps extends EmbeddedResourceOperationTarget {\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport interface EmbedRelatedChartProps extends EmbeddedResourceOperationTarget {\n resourceType: string;\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport function EmbedHostChart({\n viewRef,\n inputs,\n urlParamValues,\n className,\n ...target\n}: EmbedHostChartProps): React.JSX.Element {\n const compositeResourceContext = useEmbeddedResourceContext();\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n operationLike: CoreResourceOperation.READ,\n });\n\n // D2: a host-owned chart may require the host's PARENT scope (e.g. a\n // `todo-task-status` chart mandating `todos` when the host is a `task`). Derive\n // the parent id off the host record and merge it UNDER the URL context so the\n // chart's `parentResourcesRequirements` resolve.\n const derivedParents = useHostRecordDerivedParentContext(compositeResourceContext);\n\n return (\n <EmbeddedChartRenderer\n resourceType={compositeResourceContext.hostResourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={mergeDerivedParentIdentifiers(\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n derivedParents,\n )}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n />\n );\n}\n\nexport function EmbedRelatedChart({\n resourceType,\n viewRef,\n inputs,\n urlParamValues,\n className,\n ...target\n}: EmbedRelatedChartProps): React.JSX.Element {\n if (!resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedChart() requires a target resourceType.',\n { target },\n );\n }\n\n const compositeResourceContext = useEmbeddedResourceContext();\n // A RELATED chart aggregates a COLLECTION of `resourceType` scoped by the host\n // record (e.g. the tasks of the current todo) — there is no single addressable\n // related-record id, so it must resolve a collection operation (LIST), NOT READ.\n // Resolving READ here required an addressable related id that never exists in a\n // host→related context and threw a composite configuration error (caught by\n // SurfaceErrorBoundary, degrading the surface). The host context (the parent\n // record's id) is still threaded into the related context via\n // `deriveChildResourceContext`, so the chart stays scoped to the host record.\n // (`EmbedHostChart` keeps READ: the host IS a single addressable record.)\n // Only the IDENTIFIERS are used: the chart is fetched through its own definition, never through this LIST, so the\n // LIST's confinement to the host record (#3072) has nothing to confine here and must not refuse the chart.\n const scopeIdentifiers = compositeResourceContext.deriveRelatedScopeIdentifiers({\n ...target,\n resourceType,\n operationLike: CoreResourceOperation.LIST,\n });\n\n return (\n <EmbeddedChartRenderer\n resourceType={resourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={scopeIdentifiers}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n />\n );\n}\n\nexport function EmbedHostExecution({\n viewRef,\n className,\n ...target\n}: EmbedHostExecutionProps): React.JSX.Element {\n const { navigationZone } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n operationLike: CoreResourceOperation.READ,\n });\n\n // D2: a host-owned execution may anchor on the host's PARENT (e.g. a\n // `task-workspace` execution binding `todoId` when the host is a `task`). Derive\n // the parent id off the host record so the anchor resolves instead of \"No anchor\n // resolved\". Merged UNDER the URL context (URL ids win).\n const derivedParents = useHostRecordDerivedParentContext(compositeResourceContext);\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(\n compositeResourceContext.hostResourceType,\n { ref: viewRef },\n );\n\n return renderEmbeddedExecution(\n insertedIdentity.insertedViewRef,\n navigationZone,\n mergeDerivedParentIdentifiers(\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n derivedParents,\n ),\n className,\n );\n}\n\nexport function EmbedRelatedExecution({\n resourceType,\n viewRef,\n className,\n ...target\n}: EmbedRelatedExecutionProps): React.JSX.Element {\n const { navigationZone } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n if (!resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedExecution() requires a target resourceType.',\n { target: { resourceType, viewRef, ...target } },\n );\n }\n\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n resourceType,\n operationLike: CoreResourceOperation.READ,\n });\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(\n resourceType,\n { ref: viewRef },\n );\n\n return renderEmbeddedExecution(\n insertedIdentity.insertedViewRef,\n navigationZone,\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n className,\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/resources/skeleton/DisplayLayout.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAyBjG,kJAAkJ;AAClJ,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AACD,0EAA0E;AAE1E;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,kBAAkB,GAAG,SAAS,CA2DxG"}
1
+ {"version":3,"file":"DisplayLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/resources/skeleton/DisplayLayout.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AA6BjG,kJAAkJ;AAClJ,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AACD,0EAA0E;AAE1E;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,kBAAkB,GAAG,SAAS,CA6DxG"}
@@ -11,7 +11,9 @@ import { ContentSectionContainer } from '../../sections/ContentSectionContainer.
11
11
  import { groupSectionsByAppearance, buildSectionConfigFromGroup, } from './section-consolidation.utils.js';
12
12
  import { GroupedSectionBody } from './Section.js';
13
13
  import { GroupedSectionHostKind } from './Section.shared.js';
14
- import { SectionMode, getEnumValues } from '@wildo-ai/zod-decorators';
14
+ import { SectionMode, getEnumValues, isHiddenForDisplay } from '@wildo-ai/zod-decorators';
15
+ import { useViewerFieldReader, viewerMaySeeFieldOnPath } from '../../../core/navigation/viewer-field-reader.js';
16
+ import { listDisplayedFieldSlots } from './SectionFieldsContext.js';
15
17
  import { getFieldSchema, getNestedValue } from '../../data-display/display-field-resolution.utils.js';
16
18
  import { SectionStageBindingError, assertSectionStageBinding, resolveCurrentSectionStage, } from '../../sections/section-stages.js';
17
19
  /** @wildo_source:part:end saas.frontend.display-layout.reading-measure */
@@ -46,7 +48,9 @@ export const COLLECTION_SURFACE_ATTRIBUTE = 'data-collection-surface';
46
48
  */
47
49
  export function DisplayLayout({ className, children, responsiveMaxWidth }) {
48
50
  const displayCtx = useOptionalDisplayTemplateContext();
49
- const renderedChildren = useMemo(() => renderGroupedChildren(children, displayCtx), [children, displayCtx]);
51
+ // The viewer, for the grouped sections none of whose fields it is shown (#4459 review D1).
52
+ const fieldReader = useViewerFieldReader();
53
+ const renderedChildren = useMemo(() => renderGroupedChildren(children, displayCtx, fieldReader), [children, displayCtx, fieldReader]);
50
54
  return (_jsx(FieldScopeProvider, { pathPrefix: "", children: _jsx(SectionLegendVoiceHost, { voice: TypographyVariant.EYEBROW, children: _jsx("div", { className: cn('mr-auto w-full space-y-section', '[&>[data-chrome-mode^=settings]:has(+[data-chrome-mode^=settings])]:mb-0',
51
55
  // Derived width (no declaration): the reading measure, lifted when the layout holds a collection.
52
56
  // The selector spells the attribute literally because Tailwind reads class names statically;
@@ -59,13 +63,18 @@ export function DisplayLayout({ className, children, responsiveMaxWidth }) {
59
63
  * Groups sections sharing the same container mode into a `ContentSectionContainer`.
60
64
  * Solo-mode sections and non-Section children render in place.
61
65
  */
62
- function renderGroupedChildren(children, displayCtx) {
66
+ function renderGroupedChildren(children, displayCtx, fieldReader) {
63
67
  const grouped = groupSectionsByAppearance(children, displayCtx?.defaultSectionAppearance);
64
68
  return (_jsx(_Fragment, { children: grouped.items.map((item, idx) => {
65
69
  if (item.type === 'node') {
66
70
  return _jsx(React.Fragment, { children: item.node }, idx);
67
71
  }
68
- const { group } = item;
72
+ // A grouped section none of whose fields this viewer is shown is dropped from its container, and a container
73
+ // left with no section renders nothing (see `groupedSectionShowsNoField`).
74
+ const shownSections = item.group.sections.filter((el) => !groupedSectionShowsNoField(item.group.mode, el.props.children, displayCtx?.schema, fieldReader));
75
+ if (shownSections.length === 0)
76
+ return null;
77
+ const group = { ...item.group, sections: shownSections };
69
78
  const config = withRecordStage(buildSectionConfigFromGroup(group), group, displayCtx);
70
79
  const sectionLabels = displayCtx?.sectionLabels ?? {};
71
80
  const sectionDescriptions = displayCtx?.sectionDescriptions ?? {};
@@ -78,6 +87,33 @@ function renderGroupedChildren(children, displayCtx) {
78
87
  return (_jsx(ContentSectionContainer, { sections: contentSections, config: config }, `group-${group.mode}-${idx}`));
79
88
  }) }));
80
89
  }
90
+ /**
91
+ * Whether a GROUPED display section (grid, tabs, …) shows no field to this viewer (#4459 review D1).
92
+ *
93
+ * A solo `Section` hides its heading from what its `DisplayField`s report once mounted. A grouped section cannot: its
94
+ * container draws the title or the tab, and an unchosen tab's panel is not mounted. So the host decides from the
95
+ * section's elements, as `FormLayout` does for a form. The section is dropped when it holds only display slots
96
+ * (`listDisplayedFieldSlots`) and each one statically draws nothing: its path resolves to no field, the field is
97
+ * `.isHidden()`, or the viewer may not read it or an ancestor on its path (`.readableBy`).
98
+ *
99
+ * Only what the schema and the viewer decide is read. A condition (`showWhen`) or an empty value can change while the
100
+ * record is shown, and dropping a section on them would move it in and out of its container; such a section stays.
101
+ * A STAGES group keeps every section: each is a step of the record's lifecycle, and its title names the step, not a
102
+ * heading over fields, so dropping one would misstate where the record stands.
103
+ */
104
+ function groupedSectionShowsNoField(mode, children, schema, fieldReader) {
105
+ if (!schema || mode === SectionMode.STAGES)
106
+ return false;
107
+ const displayed = listDisplayedFieldSlots(children);
108
+ return displayed !== null
109
+ && displayed.length > 0
110
+ && displayed.every((slot) => {
111
+ const fieldSchema = slot.ownSchema ?? getFieldSchema(schema, slot.path);
112
+ return fieldSchema === undefined
113
+ || isHiddenForDisplay(fieldSchema)
114
+ || !viewerMaySeeFieldOnPath(fieldSchema, slot.path, (prefix) => getFieldSchema(schema, prefix), fieldReader);
115
+ });
116
+ }
81
117
  /**
82
118
  * A STAGES group's current stage, read from the record this layout displays (#1786). This host is the one that
83
119
  * holds the record, so it is where the bound field is read; the container only draws the result. Every other
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayLayout.js","sourceRoot":"","sources":["../../../../../src/components/resources/skeleton/DisplayLayout.tsx"],"names":[],"m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AClF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,wBAAwB,CAChC,YAAY,KAAK,CAAC,KAAK,CAAC,IAAI,qFAAqF,KAAK,CAAC,KAAK,CAAC,IAAI,6BAA6B,CAC/J,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,yBAAyB,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrG,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACvI,OAAO,EAAE,GAAG,MAAM,EAAE,YAAY,EAAE,CAAC;AACrC,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,EAC7B,YAAY,EACZ,eAAe,GAIhB;IACC,OAAO,CACL,KAAC,kBAAkB,IACjB,QAAQ,EAAE,sBAAsB,CAAC,OAAO,EACxC,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAChC,CACH,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport React, { useMemo, type ReactNode } from 'react';\nimport { TypographyVariant, type ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';\nimport { SectionLegendVoiceHost } from '../../sections/section-legend-voice';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { optionalMaxInlineSizeStyle } from '../../sections/surface';\nimport { FieldScopeProvider } from './FieldScopeContext';\nimport { useOptionalDisplayTemplateContext } from '../../data-display/DisplayTemplateContext';\nimport { ContentSectionContainer } from '../../sections/ContentSectionContainer';\nimport type { ContentSectionDescriptor } from '../../sections/ContentSectionContainer';\nimport {\n groupSectionsByAppearance,\n buildSectionConfigFromGroup,\n} from './section-consolidation.utils';\nimport { GroupedSectionBody, type SectionProps } from './Section';\nimport { GroupedSectionHostKind } from './Section.shared';\nimport type { SectionConfig } from '@wildo-ai/presets-components-models';\nimport { SectionMode, getEnumValues } from '@wildo-ai/zod-decorators';\nimport { getFieldSchema, getNestedValue } from '../../data-display/display-field-resolution.utils';\nimport {\n SectionStageBindingError,\n assertSectionStageBinding,\n resolveCurrentSectionStage,\n type SectionStageBinding,\n} from '../../sections/section-stages';\nimport type { SectionGroup } from './section-consolidation.utils';\n\n/** @wildo_source:part:start saas.frontend.display-layout.reading-measure facet:layer:frontend facet:family:layout facet:audience:app-developer */\nexport interface DisplayLayoutProps {\n /** Additional CSS classes for the root container. */\n className?: string;\n /**\n * How wide the layout root lets its content grow, named in the framework's own vocabulary.\n *\n * Left unset, the width is DERIVED from what the layout renders: the reading-measure cap (~42rem, themeable\n * via `--measure-max-width`) that keeps a single-column stack of label/value pairs readable instead of\n * stretched edge to edge — lifted as soon as the layout holds a collection (see the last paragraph).\n *\n * It is WRONG for a composed document. A template that renders tabs, quote blocks, tables or regions\n * is not a field stack: those set their own measure internally, and a 42rem cap around them squeezes\n * the whole composition into a column with dead space beside it. Such a template declares `'none'`.\n *\n * `'none'` is not \"uncapped\" in practice — the zone content boundary above has already capped the\n * area at the page-content width (`'content'`, ~80rem) and an adjacent pane is narrower still. This\n * prop decides only whether a SECOND, tighter cap applies inside that, and the answer depends on what\n * the template renders, which is why the template is the one asked.\n *\n * Left UNSET, the cap is derived from what the layout actually renders: the reading measure for fields,\n * lifted as soon as the layout holds a COLLECTION (a related list, an embedded collection — any surface\n * marked {@link COLLECTION_SURFACE_ATTRIBUTE}). A list squeezed into a 42rem column, under a header that\n * spans the page, is what a field-only cap does to a record whose page is mostly its list. Declared, the\n * value is the template's statement and is applied as given.\n */\n responsiveMaxWidth?: ResponsiveMaxWidth;\n children?: ReactNode;\n}\n/** @wildo_source:part:end saas.frontend.display-layout.reading-measure */\n\n/**\n * The attribute that marks a COLLECTION in the rendered page, so a layout around it can tell it holds a list.\n *\n * Carried by the `ResourceLayout_List` / `ResourceLayout_Search` wrappers (around any preset or custom view, from\n * the first paint) and by a `RelatedResourceSections` block that holds a list (before its labels load, whichever\n * tab is open). Read by CSS `:has()`: by `DisplayLayout`, to lift its reading measure, and by the READ page, to give\n * the danger zone the same width as the record body (`--record-body-max-inline-size`). Being CSS, the decision\n * follows the DOM and never needs a second render.\n */\nexport const COLLECTION_SURFACE_ATTRIBUTE = 'data-collection-surface';\n\n/**\n * Root wrapper for display (read-only) layout templates.\n *\n * Provides a root `FieldScopeContext` with empty prefix so nested\n * `<DisplayField name=\"...\">` components resolve field names correctly.\n *\n * `ResourceDisplayContext` (inline editing, RMM, file upload) is provided\n * by the parent `ResourceAutomaticDisplayer`, not by this layout component.\n *\n * @example\n * ```tsx\n * <DisplayLayout>\n * <Section name=\"general\">\n * <DisplayField name=\"title\" />\n * <DisplayField name=\"status\" />\n * </Section>\n * </DisplayLayout>\n * ```\n */\nexport function DisplayLayout({ className, children, responsiveMaxWidth }: DisplayLayoutProps): ReactNode {\n const displayCtx = useOptionalDisplayTemplateContext();\n const renderedChildren = useMemo(\n () => renderGroupedChildren(children, displayCtx),\n [children, displayCtx],\n );\n\n return (\n <FieldScopeProvider pathPrefix=\"\">\n {/* A read body names its section groups in the EYEBROW voice — see `SectionLegendVoiceHost`. */}\n <SectionLegendVoiceHost voice={TypographyVariant.EYEBROW}>\n {/*\n T4c — reading-measure cap (mirrors FormLayout). A single-column\n read/detail stack caps at `--measure-max-width` (~42rem) and aligns to\n the LEFT of the content zone, so detail views stop stretching\n edge-to-edge yet stay flush with the left-aligned resource header and\n danger-zone siblings (no centred gutter between them). `max-w` only\n engages above the measure, so a detail rendered inside a narrow\n dialog/panel is unaffected. Retune/opt-out via the CSS var or `className`.\n */}\n {/*\n `space-y-section` separates stacked SECTIONS (each titled CARD group /\n container) with a clear gap so consecutive cards read as distinct groups\n rather than one continuous stack. Sectionless templates whose direct\n children are bare SETTINGS_ROW field rows must NOT inherit that section\n gap: the row chrome is a self-delimiting list item (`py-card-sm` rhythm +\n `border-b` hairline), so consecutive rows stack FLUSH — the same\n content-aware rule the `ContentSection` body applies to settings rows.\n The pairwise `:has(+ …)` selector zeroes only the margin BETWEEN two\n adjacent settings rows, so a row followed by a real section (mixed\n template) keeps the section gap.\n\n ⚠ The attribute match is `^=settings` (prefix), NOT `=settings_row`:\n Tailwind converts an unescaped `_` inside an arbitrary variant to a\n SPACE, emitting the invalid selector `[data-chrome-mode=settings row]`\n which the browser silently drops (this killed ContentSection's original\n `…=settings_row]]:gap-0` spelling — verified against the served CSS).\n Only `settings_row` starts with `settings`, so the prefix is exact.\n */}\n <div\n className={cn(\n 'mr-auto w-full space-y-section',\n '[&>[data-chrome-mode^=settings]:has(+[data-chrome-mode^=settings])]:mb-0',\n // Derived width (no declaration): the reading measure, lifted when the layout holds a collection.\n // The selector spells the attribute literally because Tailwind reads class names statically;\n // `display-layout-derived-width.test.tsx` holds it equal to `COLLECTION_SURFACE_ATTRIBUTE`.\n responsiveMaxWidth === undefined\n && '[max-inline-size:var(--measure-max-width,42rem)] has-[[data-collection-surface]]:[max-inline-size:none]',\n className,\n )}\n style={optionalMaxInlineSizeStyle(responsiveMaxWidth)}\n data-inline-size-tier={responsiveMaxWidth ?? 'derived'}\n data-guidance-display\n >\n {renderedChildren}\n </div>\n </SectionLegendVoiceHost>\n </FieldScopeProvider>\n );\n}\n\n/**\n * Introspects children for `<Section>` elements with container-mode `appearance`.\n * Groups sections sharing the same container mode into a `ContentSectionContainer`.\n * Solo-mode sections and non-Section children render in place.\n */\nfunction renderGroupedChildren(\n children: ReactNode,\n displayCtx: ReturnType<typeof useOptionalDisplayTemplateContext>,\n): ReactNode {\n const grouped = groupSectionsByAppearance(children, displayCtx?.defaultSectionAppearance);\n\n return (\n <>\n {grouped.items.map((item, idx) => {\n if (item.type === 'node') {\n return <React.Fragment key={idx}>{item.node}</React.Fragment>;\n }\n\n const { group } = item;\n const config = withRecordStage(buildSectionConfigFromGroup(group), group, displayCtx);\n const sectionLabels = displayCtx?.sectionLabels ?? {};\n const sectionDescriptions = displayCtx?.sectionDescriptions ?? {};\n\n const contentSections: ContentSectionDescriptor[] = group.sections.map((el) => ({\n id: el.props.name,\n title: sectionLabels[el.props.name],\n description: sectionDescriptions[el.props.name],\n content: (\n <GroupedSectionContent\n sectionProps={el.props}\n providesHeading={!!sectionLabels[el.props.name]}\n />\n ),\n }));\n\n return (\n <ContentSectionContainer\n key={`group-${group.mode}-${idx}`}\n sections={contentSections}\n config={config}\n />\n );\n })}\n </>\n );\n}\n\n/**\n * A STAGES group's current stage, read from the record this layout displays (#1786). This host is the one that\n * holds the record, so it is where the bound field is read; the container only draws the result. Every other\n * mode's config is returned as built.\n *\n * The binding is checked against the field's schema on every render that groups it, and a binding that could\n * misstate a record's stage throws (`assertSectionStageBinding`). Outside a display template there is no record:\n * the config is returned without a stage and the container stacks the sections instead of guessing.\n */\nfunction withRecordStage(\n config: SectionConfig,\n group: SectionGroup,\n displayCtx: ReturnType<typeof useOptionalDisplayTemplateContext>,\n): SectionConfig {\n if (config.mode !== SectionMode.STAGES || displayCtx === null) return config;\n const [first, ...rest] = group.sections;\n const stageNames = group.sections.map((section) => section.props.name);\n // `stageBinding` exists only on the STAGES member of the `SectionProps` union; grouping already put only STAGES\n // sections here, but the element type does not know it.\n const stageBindingOf = (props: SectionProps): SectionStageBinding | undefined =>\n 'stageBinding' in props ? props.stageBinding : undefined;\n const stray = rest.find((section) => stageBindingOf(section.props) !== undefined);\n if (stray !== undefined) {\n throw new SectionStageBindingError(\n `section \"${stray.props.name}\" declares a stageBinding, but a group's binding is read from its FIRST section (\"${first.props.name}\"). Declare it there, once.`,\n );\n }\n const binding = stageBindingOf(first.props);\n const fieldSchema = binding ? getFieldSchema(displayCtx.schema, binding.field) : undefined;\n assertSectionStageBinding(binding, stageNames, fieldSchema ? getEnumValues(fieldSchema) : undefined);\n const currentStage = displayCtx.isLoading ? null : resolveCurrentSectionStage(binding, getNestedValue(displayCtx.data, binding.field));\n return { ...config, currentStage };\n}\n\n/**\n * Wraps an individual grouped section's content with section-level behaviors\n * (displayChromeMode) when rendered inside a container.\n */\nfunction GroupedSectionContent({\n sectionProps,\n providesHeading,\n}: {\n sectionProps: Pick<SectionProps, 'name' | 'children' | 'chromeMode' | 'className' | 'disabled'>;\n providesHeading?: boolean;\n}): ReactNode {\n return (\n <GroupedSectionBody\n hostKind={GroupedSectionHostKind.DISPLAY}\n sectionProps={sectionProps}\n providesHeading={providesHeading}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"DisplayLayout.js","sourceRoot":"","sources":["../../../../../src/components/resources/skeleton/DisplayLayout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAA2B,MAAM,qCAAqC,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAqB,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAA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,CAAC,CAAC;IACrG,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACvI,OAAO,EAAE,GAAG,MAAM,EAAE,YAAY,EAAE,CAAC;AACrC,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,EAC7B,YAAY,EACZ,eAAe,GAIhB;IACC,OAAO,CACL,KAAC,kBAAkB,IACjB,QAAQ,EAAE,sBAAsB,CAAC,OAAO,EACxC,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAChC,CACH,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport React, { useMemo, type ReactNode } from 'react';\nimport { TypographyVariant, type ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';\nimport { SectionLegendVoiceHost } from '../../sections/section-legend-voice';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { optionalMaxInlineSizeStyle } from '../../sections/surface';\nimport { FieldScopeProvider } from './FieldScopeContext';\nimport { useOptionalDisplayTemplateContext } from '../../data-display/DisplayTemplateContext';\nimport { ContentSectionContainer } from '../../sections/ContentSectionContainer';\nimport type { ContentSectionDescriptor } from '../../sections/ContentSectionContainer';\nimport {\n groupSectionsByAppearance,\n buildSectionConfigFromGroup,\n} from './section-consolidation.utils';\nimport { GroupedSectionBody, type SectionProps } from './Section';\nimport { GroupedSectionHostKind } from './Section.shared';\nimport type { SectionConfig } from '@wildo-ai/presets-components-models';\nimport type { FieldReader } from '@wildo-ai/saas-models';\nimport { SectionMode, getEnumValues, isHiddenForDisplay } from '@wildo-ai/zod-decorators';\nimport type { z } from 'zod';\nimport { useViewerFieldReader, viewerMaySeeFieldOnPath } from '~wildo-frontend-lib/core/navigation/viewer-field-reader';\nimport { listDisplayedFieldSlots } from './SectionFieldsContext';\nimport { getFieldSchema, getNestedValue } from '../../data-display/display-field-resolution.utils';\nimport {\n SectionStageBindingError,\n assertSectionStageBinding,\n resolveCurrentSectionStage,\n type SectionStageBinding,\n} from '../../sections/section-stages';\nimport type { SectionGroup } from './section-consolidation.utils';\n\n/** @wildo_source:part:start saas.frontend.display-layout.reading-measure facet:layer:frontend facet:family:layout facet:audience:app-developer */\nexport interface DisplayLayoutProps {\n /** Additional CSS classes for the root container. */\n className?: string;\n /**\n * How wide the layout root lets its content grow, named in the framework's own vocabulary.\n *\n * Left unset, the width is DERIVED from what the layout renders: the reading-measure cap (~42rem, themeable\n * via `--measure-max-width`) that keeps a single-column stack of label/value pairs readable instead of\n * stretched edge to edge — lifted as soon as the layout holds a collection (see the last paragraph).\n *\n * It is WRONG for a composed document. A template that renders tabs, quote blocks, tables or regions\n * is not a field stack: those set their own measure internally, and a 42rem cap around them squeezes\n * the whole composition into a column with dead space beside it. Such a template declares `'none'`.\n *\n * `'none'` is not \"uncapped\" in practice — the zone content boundary above has already capped the\n * area at the page-content width (`'content'`, ~80rem) and an adjacent pane is narrower still. This\n * prop decides only whether a SECOND, tighter cap applies inside that, and the answer depends on what\n * the template renders, which is why the template is the one asked.\n *\n * Left UNSET, the cap is derived from what the layout actually renders: the reading measure for fields,\n * lifted as soon as the layout holds a COLLECTION (a related list, an embedded collection — any surface\n * marked {@link COLLECTION_SURFACE_ATTRIBUTE}). A list squeezed into a 42rem column, under a header that\n * spans the page, is what a field-only cap does to a record whose page is mostly its list. Declared, the\n * value is the template's statement and is applied as given.\n */\n responsiveMaxWidth?: ResponsiveMaxWidth;\n children?: ReactNode;\n}\n/** @wildo_source:part:end saas.frontend.display-layout.reading-measure */\n\n/**\n * The attribute that marks a COLLECTION in the rendered page, so a layout around it can tell it holds a list.\n *\n * Carried by the `ResourceLayout_List` / `ResourceLayout_Search` wrappers (around any preset or custom view, from\n * the first paint) and by a `RelatedResourceSections` block that holds a list (before its labels load, whichever\n * tab is open). Read by CSS `:has()`: by `DisplayLayout`, to lift its reading measure, and by the READ page, to give\n * the danger zone the same width as the record body (`--record-body-max-inline-size`). Being CSS, the decision\n * follows the DOM and never needs a second render.\n */\nexport const COLLECTION_SURFACE_ATTRIBUTE = 'data-collection-surface';\n\n/**\n * Root wrapper for display (read-only) layout templates.\n *\n * Provides a root `FieldScopeContext` with empty prefix so nested\n * `<DisplayField name=\"...\">` components resolve field names correctly.\n *\n * `ResourceDisplayContext` (inline editing, RMM, file upload) is provided\n * by the parent `ResourceAutomaticDisplayer`, not by this layout component.\n *\n * @example\n * ```tsx\n * <DisplayLayout>\n * <Section name=\"general\">\n * <DisplayField name=\"title\" />\n * <DisplayField name=\"status\" />\n * </Section>\n * </DisplayLayout>\n * ```\n */\nexport function DisplayLayout({ className, children, responsiveMaxWidth }: DisplayLayoutProps): ReactNode {\n const displayCtx = useOptionalDisplayTemplateContext();\n // The viewer, for the grouped sections none of whose fields it is shown (#4459 review D1).\n const fieldReader = useViewerFieldReader();\n const renderedChildren = useMemo(\n () => renderGroupedChildren(children, displayCtx, fieldReader),\n [children, displayCtx, fieldReader],\n );\n\n return (\n <FieldScopeProvider pathPrefix=\"\">\n {/* A read body names its section groups in the EYEBROW voice — see `SectionLegendVoiceHost`. */}\n <SectionLegendVoiceHost voice={TypographyVariant.EYEBROW}>\n {/*\n T4c — reading-measure cap (mirrors FormLayout). A single-column\n read/detail stack caps at `--measure-max-width` (~42rem) and aligns to\n the LEFT of the content zone, so detail views stop stretching\n edge-to-edge yet stay flush with the left-aligned resource header and\n danger-zone siblings (no centred gutter between them). `max-w` only\n engages above the measure, so a detail rendered inside a narrow\n dialog/panel is unaffected. Retune/opt-out via the CSS var or `className`.\n */}\n {/*\n `space-y-section` separates stacked SECTIONS (each titled CARD group /\n container) with a clear gap so consecutive cards read as distinct groups\n rather than one continuous stack. Sectionless templates whose direct\n children are bare SETTINGS_ROW field rows must NOT inherit that section\n gap: the row chrome is a self-delimiting list item (`py-card-sm` rhythm +\n `border-b` hairline), so consecutive rows stack FLUSH — the same\n content-aware rule the `ContentSection` body applies to settings rows.\n The pairwise `:has(+ …)` selector zeroes only the margin BETWEEN two\n adjacent settings rows, so a row followed by a real section (mixed\n template) keeps the section gap.\n\n ⚠ The attribute match is `^=settings` (prefix), NOT `=settings_row`:\n Tailwind converts an unescaped `_` inside an arbitrary variant to a\n SPACE, emitting the invalid selector `[data-chrome-mode=settings row]`\n which the browser silently drops (this killed ContentSection's original\n `…=settings_row]]:gap-0` spelling — verified against the served CSS).\n Only `settings_row` starts with `settings`, so the prefix is exact.\n */}\n <div\n className={cn(\n 'mr-auto w-full space-y-section',\n '[&>[data-chrome-mode^=settings]:has(+[data-chrome-mode^=settings])]:mb-0',\n // Derived width (no declaration): the reading measure, lifted when the layout holds a collection.\n // The selector spells the attribute literally because Tailwind reads class names statically;\n // `display-layout-derived-width.test.tsx` holds it equal to `COLLECTION_SURFACE_ATTRIBUTE`.\n responsiveMaxWidth === undefined\n && '[max-inline-size:var(--measure-max-width,42rem)] has-[[data-collection-surface]]:[max-inline-size:none]',\n className,\n )}\n style={optionalMaxInlineSizeStyle(responsiveMaxWidth)}\n data-inline-size-tier={responsiveMaxWidth ?? 'derived'}\n data-guidance-display\n >\n {renderedChildren}\n </div>\n </SectionLegendVoiceHost>\n </FieldScopeProvider>\n );\n}\n\n/**\n * Introspects children for `<Section>` elements with container-mode `appearance`.\n * Groups sections sharing the same container mode into a `ContentSectionContainer`.\n * Solo-mode sections and non-Section children render in place.\n */\nfunction renderGroupedChildren(\n children: ReactNode,\n displayCtx: ReturnType<typeof useOptionalDisplayTemplateContext>,\n fieldReader: FieldReader,\n): ReactNode {\n const grouped = groupSectionsByAppearance(children, displayCtx?.defaultSectionAppearance);\n\n return (\n <>\n {grouped.items.map((item, idx) => {\n if (item.type === 'node') {\n return <React.Fragment key={idx}>{item.node}</React.Fragment>;\n }\n\n // A grouped section none of whose fields this viewer is shown is dropped from its container, and a container\n // left with no section renders nothing (see `groupedSectionShowsNoField`).\n const shownSections = item.group.sections.filter((el) => !groupedSectionShowsNoField(item.group.mode, el.props.children, displayCtx?.schema, fieldReader));\n if (shownSections.length === 0) return null;\n const group = { ...item.group, sections: shownSections };\n const config = withRecordStage(buildSectionConfigFromGroup(group), group, displayCtx);\n const sectionLabels = displayCtx?.sectionLabels ?? {};\n const sectionDescriptions = displayCtx?.sectionDescriptions ?? {};\n\n const contentSections: ContentSectionDescriptor[] = group.sections.map((el) => ({\n id: el.props.name,\n title: sectionLabels[el.props.name],\n description: sectionDescriptions[el.props.name],\n content: (\n <GroupedSectionContent\n sectionProps={el.props}\n providesHeading={!!sectionLabels[el.props.name]}\n />\n ),\n }));\n\n return (\n <ContentSectionContainer\n key={`group-${group.mode}-${idx}`}\n sections={contentSections}\n config={config}\n />\n );\n })}\n </>\n );\n}\n\n/**\n * Whether a GROUPED display section (grid, tabs, …) shows no field to this viewer (#4459 review D1).\n *\n * A solo `Section` hides its heading from what its `DisplayField`s report once mounted. A grouped section cannot: its\n * container draws the title or the tab, and an unchosen tab's panel is not mounted. So the host decides from the\n * section's elements, as `FormLayout` does for a form. The section is dropped when it holds only display slots\n * (`listDisplayedFieldSlots`) and each one statically draws nothing: its path resolves to no field, the field is\n * `.isHidden()`, or the viewer may not read it or an ancestor on its path (`.readableBy`).\n *\n * Only what the schema and the viewer decide is read. A condition (`showWhen`) or an empty value can change while the\n * record is shown, and dropping a section on them would move it in and out of its container; such a section stays.\n * A STAGES group keeps every section: each is a step of the record's lifecycle, and its title names the step, not a\n * heading over fields, so dropping one would misstate where the record stands.\n */\nfunction groupedSectionShowsNoField(\n mode: SectionMode,\n children: ReactNode,\n schema: z.ZodTypeAny | undefined,\n fieldReader: FieldReader,\n): boolean {\n if (!schema || mode === SectionMode.STAGES) return false;\n const displayed = listDisplayedFieldSlots(children);\n return displayed !== null\n && displayed.length > 0\n && displayed.every((slot) => {\n const fieldSchema = slot.ownSchema ?? getFieldSchema(schema, slot.path);\n return fieldSchema === undefined\n || isHiddenForDisplay(fieldSchema)\n || !viewerMaySeeFieldOnPath(fieldSchema, slot.path, (prefix) => getFieldSchema(schema, prefix), fieldReader);\n });\n}\n\n/**\n * A STAGES group's current stage, read from the record this layout displays (#1786). This host is the one that\n * holds the record, so it is where the bound field is read; the container only draws the result. Every other\n * mode's config is returned as built.\n *\n * The binding is checked against the field's schema on every render that groups it, and a binding that could\n * misstate a record's stage throws (`assertSectionStageBinding`). Outside a display template there is no record:\n * the config is returned without a stage and the container stacks the sections instead of guessing.\n */\nfunction withRecordStage(\n config: SectionConfig,\n group: SectionGroup,\n displayCtx: ReturnType<typeof useOptionalDisplayTemplateContext>,\n): SectionConfig {\n if (config.mode !== SectionMode.STAGES || displayCtx === null) return config;\n const [first, ...rest] = group.sections;\n const stageNames = group.sections.map((section) => section.props.name);\n // `stageBinding` exists only on the STAGES member of the `SectionProps` union; grouping already put only STAGES\n // sections here, but the element type does not know it.\n const stageBindingOf = (props: SectionProps): SectionStageBinding | undefined =>\n 'stageBinding' in props ? props.stageBinding : undefined;\n const stray = rest.find((section) => stageBindingOf(section.props) !== undefined);\n if (stray !== undefined) {\n throw new SectionStageBindingError(\n `section \"${stray.props.name}\" declares a stageBinding, but a group's binding is read from its FIRST section (\"${first.props.name}\"). Declare it there, once.`,\n );\n }\n const binding = stageBindingOf(first.props);\n const fieldSchema = binding ? getFieldSchema(displayCtx.schema, binding.field) : undefined;\n assertSectionStageBinding(binding, stageNames, fieldSchema ? getEnumValues(fieldSchema) : undefined);\n const currentStage = displayCtx.isLoading ? null : resolveCurrentSectionStage(binding, getNestedValue(displayCtx.data, binding.field));\n return { ...config, currentStage };\n}\n\n/**\n * Wraps an individual grouped section's content with section-level behaviors\n * (displayChromeMode) when rendered inside a container.\n */\nfunction GroupedSectionContent({\n sectionProps,\n providesHeading,\n}: {\n sectionProps: Pick<SectionProps, 'name' | 'children' | 'chromeMode' | 'className' | 'disabled'>;\n providesHeading?: boolean;\n}): ReactNode {\n return (\n <GroupedSectionBody\n hostKind={GroupedSectionHostKind.DISPLAY}\n sectionProps={sectionProps}\n providesHeading={providesHeading}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FormLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/resources/skeleton/FormLayout.tsx"],"names":[],"mappings":"AAGA,OAAc,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AA0B9E,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C;;;;;;;;;;;;OAYG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAOD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,kBAAkB,EAAE,mBAAmB,EACvC,sBAA6B,EAC7B,kBAA8B,GAC/B,EAAE,eAAe,GAAG,SAAS,CAiG7B"}
1
+ {"version":3,"file":"FormLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/resources/skeleton/FormLayout.tsx"],"names":[],"mappings":"AAGA,OAAc,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AA6B9E,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C;;;;;;;;;;;;OAYG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAOD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,kBAAkB,EAAE,mBAAmB,EACvC,sBAA6B,EAC7B,kBAA8B,GAC/B,EAAE,eAAe,GAAG,SAAS,CAoG7B"}
@@ -15,6 +15,9 @@ import { ContentSectionContainer } from '../../sections/ContentSectionContainer.
15
15
  import { groupSectionsByAppearance, buildSectionConfigFromGroup, } from './section-consolidation.utils.js';
16
16
  import { GroupedSectionBody } from './Section.js';
17
17
  import { listPlacedFieldSlots } from './SectionFieldsContext.js';
18
+ import { CoreResourceOperation } from '@wildo-ai/saas-models';
19
+ import { useViewerFieldReader, viewerMaySeeFieldOnPath } from '../../../core/navigation/viewer-field-reader.js';
20
+ import { useOptionalFormSchemaContext } from '../../../components/form/useFormSchemaContext.js';
18
21
  import { useTemplatePlacedFieldsOf } from '../../form/automated/TemplatePlacedFieldsContext.js';
19
22
  import { AutomatedLayoutFrontendUtils } from '../../../core/automated-layout/automated-layout.frontend.utils.js';
20
23
  import { GroupedSectionHostKind } from './Section.shared.js';
@@ -84,7 +87,10 @@ export function FormLayout({ className, children, contextFieldValues: _contextFi
84
87
  // or an unchosen variant is not mounted, so its fields cannot report themselves (see
85
88
  // `TemplatePlacedFieldsContext`). From an empty prefix: this layout resets its children's scope to "".
86
89
  useTemplatePlacedFieldsOf(children, '');
87
- const renderedChildren = useMemo(() => renderGroupedChildren(children, formCtx), [children, formCtx]);
90
+ // The viewer and the operation, for the grouped sections none of whose fields it is offered (#4459 review D1).
91
+ const fieldReader = useViewerFieldReader();
92
+ const operationType = useOptionalFormSchemaContext()?.operationType;
93
+ const renderedChildren = useMemo(() => renderGroupedChildren(children, formCtx, { fieldReader, operationType }), [children, formCtx, fieldReader, operationType]);
88
94
  return (_jsx(FormLayoutSlotContext.Provider, { value: slotContextValue, children: _jsx(SectionLegendVoiceHost, { voice: undefined, children: _jsx(FieldScopeProvider, { pathPrefix: "", children: _jsx("div", { className: cn('mr-auto w-full', className), style: { maxInlineSize: responsiveMaxWidthToCssValue(responsiveMaxWidth) }, "data-inline-size-tier": responsiveMaxWidth, "data-guidance-form": "", "data-slot": "form-layout", children: _jsxs(ErrorBoundary, { children: [autoSlots.errorSummary ? _jsx(FormErrorSummarySlot, { className: "mb-4" }) : null, _jsx("div", { className: "space-y-section [&>[data-chrome-mode^=settings]:has(+[data-chrome-mode^=settings])]:mb-0", children: renderedChildren }), autoSlots.submitButton ? _jsx(SubmitButton, { className: "mt-6" }) : null] }) }) }) }) }));
89
95
  }
90
96
  /**
@@ -96,23 +102,33 @@ export function FormLayout({ className, children, contextFieldValues: _contextFi
96
102
  * until it is chosen. So the host decides from the section's elements: when they are only field slots
97
103
  * (`listPlacedFieldSlots`) and none of their paths resolves in the form's schema, the section is dropped.
98
104
  *
99
- * This reads the SCHEMA, not visibility: a field hidden by a condition is still in the schema, so its
105
+ * A field the viewer may not read (`.readableBy`, or under such an ancestor) is not offered either, outside a CREATE
106
+ * form, exactly as `FormField` decides it (#4459 review D1); so a section of only such fields is dropped too.
107
+ *
108
+ * This reads the SCHEMA and the VIEWER, not visibility: a field hidden by a condition is still in the schema, so its
100
109
  * section stays. Dropping a section there would take it out of its container on a value change.
101
110
  */
102
- function groupedSectionShowsNoField(children, schema) {
111
+ function groupedSectionShowsNoField(children, schema, viewer) {
103
112
  if (!schema)
104
113
  return false;
105
114
  const placed = listPlacedFieldSlots(children);
106
115
  return placed !== null
107
116
  && placed.length > 0
108
- && placed.every((slot) => !slot.hasOwnSchema && AutomatedLayoutFrontendUtils.resolveFieldSchemaPath(schema, slot.path) === undefined);
117
+ && placed.every((slot) => {
118
+ if (slot.hasOwnSchema)
119
+ return false;
120
+ const fieldSchema = AutomatedLayoutFrontendUtils.resolveFieldSchemaPath(schema, slot.path);
121
+ return fieldSchema === undefined
122
+ || (viewer.operationType !== CoreResourceOperation.CREATE
123
+ && !viewerMaySeeFieldOnPath(fieldSchema, slot.path, (prefix) => AutomatedLayoutFrontendUtils.resolveFieldSchemaPath(schema, prefix), viewer.fieldReader));
124
+ });
109
125
  }
110
126
  /**
111
127
  * Introspects children for `<Section>` elements with container-mode `appearance`.
112
128
  * Groups sections sharing the same container mode into a `ContentSectionContainer`.
113
129
  * Solo-mode sections and non-Section children render in place.
114
130
  */
115
- function renderGroupedChildren(children, formCtx) {
131
+ function renderGroupedChildren(children, formCtx, viewer) {
116
132
  const grouped = groupSectionsByAppearance(children);
117
133
  return (_jsx(_Fragment, { children: grouped.items.map((item, idx) => {
118
134
  if (item.type === 'node') {
@@ -120,7 +136,7 @@ function renderGroupedChildren(children, formCtx) {
120
136
  }
121
137
  // A grouped section none of whose fields this operation has is dropped from its container, and a
122
138
  // container left with no section renders nothing (see `groupedSectionShowsNoField`).
123
- const shownSections = item.group.sections.filter((el) => !groupedSectionShowsNoField(el.props.children, formCtx?.schema));
139
+ const shownSections = item.group.sections.filter((el) => !groupedSectionShowsNoField(el.props.children, formCtx?.schema, viewer));
124
140
  if (shownSections.length === 0)
125
141
  return null;
126
142
  const group = { ...item.group, sections: shownSections };