@wildo-ai/saas-frontend-lib 1.1.5 → 1.1.6

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 (777) hide show
  1. package/dist/esm/components/actions/action-bar.d.ts +15 -0
  2. package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
  3. package/dist/esm/components/actions/action-bar.js +15 -0
  4. package/dist/esm/components/actions/action-bar.js.map +1 -1
  5. package/dist/esm/components/ai-elements/decision/approval.d.ts +97 -7
  6. package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
  7. package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
  8. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
  9. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +8 -3
  10. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
  11. package/dist/esm/components/auth/Auth_EnrollmentRequired.d.ts.map +1 -1
  12. package/dist/esm/components/auth/Auth_EnrollmentRequired.js +5 -1
  13. package/dist/esm/components/auth/Auth_EnrollmentRequired.js.map +1 -1
  14. package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
  15. package/dist/esm/components/auth/Auth_Main.js +1 -4
  16. package/dist/esm/components/auth/Auth_Main.js.map +1 -1
  17. package/dist/esm/components/auth/Auth_Register.d.ts.map +1 -1
  18. package/dist/esm/components/auth/Auth_Register.js +1 -3
  19. package/dist/esm/components/auth/Auth_Register.js.map +1 -1
  20. package/dist/esm/components/auth/StepUpAuthDialog.d.ts +7 -0
  21. package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
  22. package/dist/esm/components/auth/StepUpAuthDialog.js +13 -7
  23. package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
  24. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.d.ts.map +1 -1
  25. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.js +32 -33
  26. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.js.map +1 -1
  27. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
  28. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +18 -20
  29. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
  30. package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.d.ts.map +1 -1
  31. package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.js +2 -3
  32. package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.js.map +1 -1
  33. package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.d.ts +13 -16
  34. package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.d.ts.map +1 -1
  35. package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.js +18 -15
  36. package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.js.map +1 -1
  37. package/dist/esm/components/billing/billing-invoice-history.js +2 -2
  38. package/dist/esm/components/billing/billing-invoice-history.js.map +1 -1
  39. package/dist/esm/components/billing/billing-portal-link.js +2 -2
  40. package/dist/esm/components/billing/billing-portal-link.js.map +1 -1
  41. package/dist/esm/components/billing/billing-pricing-table.d.ts +33 -1
  42. package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
  43. package/dist/esm/components/billing/billing-pricing-table.js +34 -5
  44. package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
  45. package/dist/esm/components/billing/billing-subscription-status.js +2 -2
  46. package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
  47. package/dist/esm/components/billing/billing-usage-dashboard.d.ts +2 -0
  48. package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
  49. package/dist/esm/components/billing/billing-usage-dashboard.js +1 -0
  50. package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
  51. package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
  52. package/dist/esm/components/data-display/DisplayField.js +15 -1
  53. package/dist/esm/components/data-display/DisplayField.js.map +1 -1
  54. package/dist/esm/components/data-display/DisplayFieldArray.d.ts.map +1 -1
  55. package/dist/esm/components/data-display/DisplayFieldArray.js +11 -0
  56. package/dist/esm/components/data-display/DisplayFieldArray.js.map +1 -1
  57. package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
  58. package/dist/esm/components/data-display/DisplayFieldEditable.js +2 -2
  59. package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
  60. package/dist/esm/components/data-display/DisplayFieldEditableArray.d.ts +12 -2
  61. package/dist/esm/components/data-display/DisplayFieldEditableArray.d.ts.map +1 -1
  62. package/dist/esm/components/data-display/DisplayFieldEditableArray.js +3 -2
  63. package/dist/esm/components/data-display/DisplayFieldEditableArray.js.map +1 -1
  64. package/dist/esm/components/data-display/DisplayFieldReadOnly.d.ts.map +1 -1
  65. package/dist/esm/components/data-display/DisplayFieldReadOnly.js +2 -2
  66. package/dist/esm/components/data-display/DisplayFieldReadOnly.js.map +1 -1
  67. package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.d.ts.map +1 -1
  68. package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.js +8 -2
  69. package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.js.map +1 -1
  70. package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
  71. package/dist/esm/components/data-display/DisplayValueDispatcher.js +18 -4
  72. package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
  73. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
  74. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +61 -3
  75. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
  76. package/dist/esm/components/data-display/ResourceSummaryDisplayer.d.ts +7 -5
  77. package/dist/esm/components/data-display/ResourceSummaryDisplayer.d.ts.map +1 -1
  78. package/dist/esm/components/data-display/ResourceSummaryDisplayer.js.map +1 -1
  79. package/dist/esm/components/data-display/chromes/DisplayFieldChrome.d.ts +11 -1
  80. package/dist/esm/components/data-display/chromes/DisplayFieldChrome.d.ts.map +1 -1
  81. package/dist/esm/components/data-display/chromes/DisplayFieldChrome.js +36 -11
  82. package/dist/esm/components/data-display/chromes/DisplayFieldChrome.js.map +1 -1
  83. package/dist/esm/components/data-display/display-field-resolved-props.d.ts +6 -0
  84. package/dist/esm/components/data-display/display-field-resolved-props.d.ts.map +1 -1
  85. package/dist/esm/components/data-display/display-field-resolved-props.js.map +1 -1
  86. package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.d.ts +23 -0
  87. package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.d.ts.map +1 -0
  88. package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.js +35 -0
  89. package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.js.map +1 -0
  90. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts +47 -0
  91. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts.map +1 -0
  92. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js +124 -0
  93. package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js.map +1 -0
  94. package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.d.ts +8 -0
  95. package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.d.ts.map +1 -0
  96. package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.js +46 -0
  97. package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.js.map +1 -0
  98. package/dist/esm/components/feedback/resource-empty-state.d.ts +21 -8
  99. package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
  100. package/dist/esm/components/feedback/resource-empty-state.js +56 -26
  101. package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
  102. package/dist/esm/components/flows-actors/approval.d.ts +29 -7
  103. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  104. package/dist/esm/components/flows-actors/approval.js +231 -101
  105. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  106. package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
  107. package/dist/esm/components/flows-actors/approval.labels.js +57 -0
  108. package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
  109. package/dist/esm/components/flows-actors/system-catalog.d.ts.map +1 -1
  110. package/dist/esm/components/flows-actors/system-catalog.js +4 -4
  111. package/dist/esm/components/flows-actors/system-catalog.js.map +1 -1
  112. package/dist/esm/components/flows-actors/system-catalog.labels.d.ts.map +1 -1
  113. package/dist/esm/components/flows-actors/system-catalog.labels.js +0 -5
  114. package/dist/esm/components/flows-actors/system-catalog.labels.js.map +1 -1
  115. package/dist/esm/components/form/Form.d.ts +2 -2
  116. package/dist/esm/components/form/Form.js +2 -2
  117. package/dist/esm/components/form/Form.js.map +1 -1
  118. package/dist/esm/components/form/automated/AutomatedArrayField.d.ts +28 -3
  119. package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
  120. package/dist/esm/components/form/automated/AutomatedArrayField.js +43 -14
  121. package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
  122. package/dist/esm/components/form/automated/FormField.d.ts +3 -0
  123. package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
  124. package/dist/esm/components/form/automated/FormField.js +60 -21
  125. package/dist/esm/components/form/automated/FormField.js.map +1 -1
  126. package/dist/esm/components/form/automated/FormFieldArray.d.ts +6 -3
  127. package/dist/esm/components/form/automated/FormFieldArray.d.ts.map +1 -1
  128. package/dist/esm/components/form/automated/FormFieldArray.js +3 -2
  129. package/dist/esm/components/form/automated/FormFieldArray.js.map +1 -1
  130. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +5 -4
  131. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
  132. package/dist/esm/components/form/automated/ResourceAutomatedForm.js +148 -55
  133. package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
  134. package/dist/esm/components/form/automated/ResourceFormActionsContext.d.ts +30 -0
  135. package/dist/esm/components/form/automated/ResourceFormActionsContext.d.ts.map +1 -1
  136. package/dist/esm/components/form/automated/ResourceFormActionsContext.js +30 -1
  137. package/dist/esm/components/form/automated/ResourceFormActionsContext.js.map +1 -1
  138. package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.d.ts +79 -0
  139. package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.d.ts.map +1 -0
  140. package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.js +203 -0
  141. package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.js.map +1 -0
  142. package/dist/esm/components/form/automated/automated-form-submit.utils.d.ts +12 -0
  143. package/dist/esm/components/form/automated/automated-form-submit.utils.d.ts.map +1 -1
  144. package/dist/esm/components/form/automated/automated-form-submit.utils.js +11 -0
  145. package/dist/esm/components/form/automated/automated-form-submit.utils.js.map +1 -1
  146. package/dist/esm/components/form/chromes/FormFieldChrome.d.ts.map +1 -1
  147. package/dist/esm/components/form/chromes/FormFieldChrome.js +2 -2
  148. package/dist/esm/components/form/chromes/FormFieldChrome.js.map +1 -1
  149. package/dist/esm/components/form/combobox.d.ts +7 -0
  150. package/dist/esm/components/form/combobox.d.ts.map +1 -1
  151. package/dist/esm/components/form/combobox.js.map +1 -1
  152. package/dist/esm/components/form/controls/form-field-checkbox-group.d.ts.map +1 -1
  153. package/dist/esm/components/form/controls/form-field-checkbox-group.js +13 -0
  154. package/dist/esm/components/form/controls/form-field-checkbox-group.js.map +1 -1
  155. package/dist/esm/components/form/fields/form-field-address.d.ts +58 -0
  156. package/dist/esm/components/form/fields/form-field-address.d.ts.map +1 -1
  157. package/dist/esm/components/form/fields/form-field-address.js +34 -6
  158. package/dist/esm/components/form/fields/form-field-address.js.map +1 -1
  159. package/dist/esm/components/form/fields/form-field-address.labels.d.ts.map +1 -1
  160. package/dist/esm/components/form/fields/form-field-address.labels.js +60 -1
  161. package/dist/esm/components/form/fields/form-field-address.labels.js.map +1 -1
  162. package/dist/esm/components/form/fields/form-field-file.d.ts +0 -12
  163. package/dist/esm/components/form/fields/form-field-file.d.ts.map +1 -1
  164. package/dist/esm/components/form/fields/form-field-file.js +34 -13
  165. package/dist/esm/components/form/fields/form-field-file.js.map +1 -1
  166. package/dist/esm/components/form/fields/form-field-file.labels.d.ts.map +1 -1
  167. package/dist/esm/components/form/fields/form-field-file.labels.js +46 -0
  168. package/dist/esm/components/form/fields/form-field-file.labels.js.map +1 -1
  169. package/dist/esm/components/form/fields/form-field-string-organization-role.d.ts +73 -0
  170. package/dist/esm/components/form/fields/form-field-string-organization-role.d.ts.map +1 -0
  171. package/dist/esm/components/form/fields/form-field-string-organization-role.js +64 -0
  172. package/dist/esm/components/form/fields/form-field-string-organization-role.js.map +1 -0
  173. package/dist/esm/components/form/fields/form-field-string.d.ts.map +1 -1
  174. package/dist/esm/components/form/fields/form-field-string.js +8 -1
  175. package/dist/esm/components/form/fields/form-field-string.js.map +1 -1
  176. package/dist/esm/components/form/fields/form-field-string.labels.d.ts.map +1 -1
  177. package/dist/esm/components/form/fields/form-field-string.labels.js +4 -0
  178. package/dist/esm/components/form/fields/form-field-string.labels.js.map +1 -1
  179. package/dist/esm/components/form/validation-errors/FormErrorSummary.js +1 -1
  180. package/dist/esm/components/form/validation-errors/FormErrorSummary.js.map +1 -1
  181. package/dist/esm/components/form/validation-errors/resolver-error-nesting.d.ts +31 -0
  182. package/dist/esm/components/form/validation-errors/resolver-error-nesting.d.ts.map +1 -0
  183. package/dist/esm/components/form/validation-errors/resolver-error-nesting.js +81 -0
  184. package/dist/esm/components/form/validation-errors/resolver-error-nesting.js.map +1 -0
  185. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +14 -1
  186. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
  187. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +14 -0
  188. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
  189. package/dist/esm/components/form/validation-errors/zod-issue-resolver.d.ts +22 -0
  190. package/dist/esm/components/form/validation-errors/zod-issue-resolver.d.ts.map +1 -1
  191. package/dist/esm/components/form/validation-errors/zod-issue-resolver.js +1 -22
  192. package/dist/esm/components/form/validation-errors/zod-issue-resolver.js.map +1 -1
  193. package/dist/esm/components/layout/resizable.d.ts +11 -0
  194. package/dist/esm/components/layout/resizable.d.ts.map +1 -1
  195. package/dist/esm/components/layout/resizable.js.map +1 -1
  196. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +11 -1
  197. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts.map +1 -1
  198. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +15 -3
  199. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
  200. package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.d.ts +2 -2
  201. package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.d.ts.map +1 -1
  202. package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.js.map +1 -1
  203. package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.d.ts +2 -2
  204. package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.js +2 -2
  205. package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.js.map +1 -1
  206. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +18 -20
  207. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
  208. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
  209. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +7 -1
  210. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
  211. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
  212. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +4 -1
  213. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
  214. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
  215. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +18 -2
  216. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
  217. package/dist/esm/components/navigation/app-level/useSidebarBehavior.d.ts.map +1 -1
  218. package/dist/esm/components/navigation/app-level/useSidebarBehavior.js +82 -10
  219. package/dist/esm/components/navigation/app-level/useSidebarBehavior.js.map +1 -1
  220. package/dist/esm/components/navigation/app-level/useStatusBarBehavior.d.ts +2 -2
  221. package/dist/esm/components/navigation/app-level/useStatusBarBehavior.d.ts.map +1 -1
  222. package/dist/esm/components/navigation/app-level/useStatusBarBehavior.js.map +1 -1
  223. package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.d.ts.map +1 -1
  224. package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.js +8 -1
  225. package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.js.map +1 -1
  226. package/dist/esm/components/resources/ResourceCollectionToolbar.d.ts +8 -2
  227. package/dist/esm/components/resources/ResourceCollectionToolbar.d.ts.map +1 -1
  228. package/dist/esm/components/resources/ResourceCollectionToolbar.js +6 -2
  229. package/dist/esm/components/resources/ResourceCollectionToolbar.js.map +1 -1
  230. package/dist/esm/components/resources/ResourceLayout_Breadcrumb.d.ts.map +1 -1
  231. package/dist/esm/components/resources/ResourceLayout_Breadcrumb.js +31 -16
  232. package/dist/esm/components/resources/ResourceLayout_Breadcrumb.js.map +1 -1
  233. package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.d.ts.map +1 -1
  234. package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.js +23 -8
  235. package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.js.map +1 -1
  236. package/dist/esm/components/resources/ResourceLayout_ContainerNested.js +2 -2
  237. package/dist/esm/components/resources/ResourceLayout_ContainerNested.js.map +1 -1
  238. package/dist/esm/components/resources/ResourceLayout_Header.d.ts +13 -0
  239. package/dist/esm/components/resources/ResourceLayout_Header.d.ts.map +1 -1
  240. package/dist/esm/components/resources/ResourceLayout_Header.js +55 -28
  241. package/dist/esm/components/resources/ResourceLayout_Header.js.map +1 -1
  242. package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
  243. package/dist/esm/components/resources/ResourceLayout_List.js +41 -20
  244. package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
  245. package/dist/esm/components/resources/ResourceLayout_List.labels.d.ts.map +1 -1
  246. package/dist/esm/components/resources/ResourceLayout_List.labels.js +1 -2
  247. package/dist/esm/components/resources/ResourceLayout_List.labels.js.map +1 -1
  248. package/dist/esm/components/resources/ResourceLayout_Read.d.ts +9 -4
  249. package/dist/esm/components/resources/ResourceLayout_Read.d.ts.map +1 -1
  250. package/dist/esm/components/resources/ResourceLayout_Read.js +30 -11
  251. package/dist/esm/components/resources/ResourceLayout_Read.js.map +1 -1
  252. package/dist/esm/components/resources/ResourceLayout_ReadSummary.d.ts.map +1 -1
  253. package/dist/esm/components/resources/ResourceLayout_ReadSummary.js +4 -2
  254. package/dist/esm/components/resources/ResourceLayout_ReadSummary.js.map +1 -1
  255. package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.d.ts.map +1 -1
  256. package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.js +6 -2
  257. package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.js.map +1 -1
  258. package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
  259. package/dist/esm/components/resources/ResourceLayout_Search.js +30 -14
  260. package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
  261. package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.d.ts.map +1 -1
  262. package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.js +14 -198
  263. package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.js.map +1 -1
  264. package/dist/esm/components/resources/ResourceLayout_Update.d.ts +2 -2
  265. package/dist/esm/components/resources/ResourceLayout_Update.js +2 -2
  266. package/dist/esm/components/resources/ResourceLayout_Update.js.map +1 -1
  267. package/dist/esm/components/resources/ResourceListItemRenderer.d.ts.map +1 -1
  268. package/dist/esm/components/resources/ResourceListItemRenderer.js +69 -39
  269. package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
  270. package/dist/esm/components/resources/ResourceOperationActionDropdown.d.ts +32 -0
  271. package/dist/esm/components/resources/ResourceOperationActionDropdown.d.ts.map +1 -0
  272. package/dist/esm/components/resources/ResourceOperationActionDropdown.js +130 -0
  273. package/dist/esm/components/resources/ResourceOperationActionDropdown.js.map +1 -0
  274. package/dist/esm/components/resources/collection-create-placement.utils.d.ts +32 -0
  275. package/dist/esm/components/resources/collection-create-placement.utils.d.ts.map +1 -0
  276. package/dist/esm/components/resources/collection-create-placement.utils.js +37 -0
  277. package/dist/esm/components/resources/collection-create-placement.utils.js.map +1 -0
  278. package/dist/esm/components/resources/embeds/RelatedResourcePreview.d.ts.map +1 -1
  279. package/dist/esm/components/resources/embeds/RelatedResourcePreview.js +5 -1
  280. package/dist/esm/components/resources/embeds/RelatedResourcePreview.js.map +1 -1
  281. package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +8 -1
  282. package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts.map +1 -1
  283. package/dist/esm/components/resources/embeds/RelatedResourceSections.js +49 -2
  284. package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
  285. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +22 -0
  286. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
  287. package/dist/esm/components/resources/embeds/ResourceEmbeds.js +85 -2
  288. package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
  289. package/dist/esm/components/resources/resourceLayout.utils.d.ts +14 -0
  290. package/dist/esm/components/resources/resourceLayout.utils.d.ts.map +1 -1
  291. package/dist/esm/components/resources/resourceLayout.utils.js +22 -0
  292. package/dist/esm/components/resources/resourceLayout.utils.js.map +1 -1
  293. package/dist/esm/components/resources/skeleton/ArrayField.d.ts.map +1 -1
  294. package/dist/esm/components/resources/skeleton/ArrayField.js +3 -0
  295. package/dist/esm/components/resources/skeleton/ArrayField.js.map +1 -1
  296. package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
  297. package/dist/esm/components/resources/skeleton/FormLayout.js +33 -1
  298. package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
  299. package/dist/esm/components/resources/skeleton/ObjectScope.d.ts.map +1 -1
  300. package/dist/esm/components/resources/skeleton/ObjectScope.js +3 -0
  301. package/dist/esm/components/resources/skeleton/ObjectScope.js.map +1 -1
  302. package/dist/esm/components/resources/skeleton/Section.d.ts +12 -0
  303. package/dist/esm/components/resources/skeleton/Section.d.ts.map +1 -1
  304. package/dist/esm/components/resources/skeleton/Section.js +28 -2
  305. package/dist/esm/components/resources/skeleton/Section.js.map +1 -1
  306. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +70 -0
  307. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
  308. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +157 -1
  309. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
  310. package/dist/esm/components/resources/skeleton/WizardLayout.d.ts +6 -0
  311. package/dist/esm/components/resources/skeleton/WizardLayout.d.ts.map +1 -1
  312. package/dist/esm/components/resources/skeleton/WizardLayout.js +13 -2
  313. package/dist/esm/components/resources/skeleton/WizardLayout.js.map +1 -1
  314. package/dist/esm/components/resources/skeleton/WizardStep.d.ts.map +1 -1
  315. package/dist/esm/components/resources/skeleton/WizardStep.js +2 -1
  316. package/dist/esm/components/resources/skeleton/WizardStep.js.map +1 -1
  317. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.d.ts.map +1 -1
  318. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js +61 -15
  319. package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js.map +1 -1
  320. package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.d.ts +24 -2
  321. package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.d.ts.map +1 -1
  322. package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.js +69 -1
  323. package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.js.map +1 -1
  324. package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.d.ts.map +1 -1
  325. package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.js +18 -19
  326. package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.js.map +1 -1
  327. package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
  328. package/dist/esm/components/sections/ContentSectionContainer.js +5 -4
  329. package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
  330. package/dist/esm/components/sections/stepper.d.ts +5 -0
  331. package/dist/esm/components/sections/stepper.d.ts.map +1 -1
  332. package/dist/esm/components/sections/stepper.js.map +1 -1
  333. package/dist/esm/components/sections/surface.d.ts.map +1 -1
  334. package/dist/esm/components/sections/surface.js +12 -3
  335. package/dist/esm/components/sections/surface.js.map +1 -1
  336. package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.d.ts +43 -0
  337. package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.d.ts.map +1 -0
  338. package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.js +129 -0
  339. package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.js.map +1 -0
  340. package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.d.ts +3 -0
  341. package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.d.ts.map +1 -0
  342. package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.js +34 -0
  343. package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.js.map +1 -0
  344. package/dist/esm/components/settings/AppPage_AppearanceSettings.d.ts.map +1 -1
  345. package/dist/esm/components/settings/AppPage_AppearanceSettings.js +9 -11
  346. package/dist/esm/components/settings/AppPage_AppearanceSettings.js.map +1 -1
  347. package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.d.ts.map +1 -1
  348. package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.js +3 -2
  349. package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.js.map +1 -1
  350. package/dist/esm/components/settings/AppPage_BillingSettings.d.ts +4 -2
  351. package/dist/esm/components/settings/AppPage_BillingSettings.d.ts.map +1 -1
  352. package/dist/esm/components/settings/AppPage_BillingSettings.js +21 -3
  353. package/dist/esm/components/settings/AppPage_BillingSettings.js.map +1 -1
  354. package/dist/esm/components/settings/AppPage_BillingSettings.labels.d.ts.map +1 -1
  355. package/dist/esm/components/settings/AppPage_BillingSettings.labels.js +5 -10
  356. package/dist/esm/components/settings/AppPage_BillingSettings.labels.js.map +1 -1
  357. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +58 -0
  358. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
  359. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +243 -40
  360. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
  361. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.d.ts.map +1 -1
  362. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js +67 -6
  363. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js.map +1 -1
  364. package/dist/esm/components/settings/AppPage_InvitationsSettings.d.ts.map +1 -1
  365. package/dist/esm/components/settings/AppPage_InvitationsSettings.js +19 -11
  366. package/dist/esm/components/settings/AppPage_InvitationsSettings.js.map +1 -1
  367. package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.d.ts.map +1 -1
  368. package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.js +4 -2
  369. package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.js.map +1 -1
  370. package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
  371. package/dist/esm/components/settings/SettingsHub.js +3 -0
  372. package/dist/esm/components/settings/SettingsHub.js.map +1 -1
  373. package/dist/esm/components/settings/SettingsResourceOperationPanel.d.ts.map +1 -1
  374. package/dist/esm/components/settings/SettingsResourceOperationPanel.js +16 -1
  375. package/dist/esm/components/settings/SettingsResourceOperationPanel.js.map +1 -1
  376. package/dist/esm/components/settings/useOwnerProviderConnections.d.ts +59 -0
  377. package/dist/esm/components/settings/useOwnerProviderConnections.d.ts.map +1 -0
  378. package/dist/esm/components/settings/useOwnerProviderConnections.js +136 -0
  379. package/dist/esm/components/settings/useOwnerProviderConnections.js.map +1 -0
  380. package/dist/esm/components/views/chart-view/chart-view.utils.d.ts +5 -0
  381. package/dist/esm/components/views/chart-view/chart-view.utils.d.ts.map +1 -1
  382. package/dist/esm/components/views/chart-view/chart-view.utils.js +5 -0
  383. package/dist/esm/components/views/chart-view/chart-view.utils.js.map +1 -1
  384. package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +50 -0
  385. package/dist/esm/components/views/chart-view/useResourceChartData.d.ts.map +1 -0
  386. package/dist/esm/components/views/chart-view/useResourceChartData.js +72 -0
  387. package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -0
  388. package/dist/esm/components/views/composite-view/CompositeLayout.d.ts.map +1 -1
  389. package/dist/esm/components/views/composite-view/CompositeLayout.js +2 -1
  390. package/dist/esm/components/views/composite-view/CompositeLayout.js.map +1 -1
  391. package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +86 -0
  392. package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts.map +1 -0
  393. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +187 -0
  394. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -0
  395. package/dist/esm/core/app-shell/PortalContainerContext.d.ts +5 -2
  396. package/dist/esm/core/app-shell/PortalContainerContext.d.ts.map +1 -1
  397. package/dist/esm/core/app-shell/PortalContainerContext.js +5 -2
  398. package/dist/esm/core/app-shell/PortalContainerContext.js.map +1 -1
  399. package/dist/esm/core/app-shell/app-shell.schemas.d.ts +18 -9
  400. package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
  401. package/dist/esm/core/app-shell/app-shell.schemas.js +1 -0
  402. package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
  403. package/dist/esm/core/app-shell/useAppShellLayout.d.ts +10 -0
  404. package/dist/esm/core/app-shell/useAppShellLayout.d.ts.map +1 -1
  405. package/dist/esm/core/app-shell/useAppShellLayout.js +28 -5
  406. package/dist/esm/core/app-shell/useAppShellLayout.js.map +1 -1
  407. package/dist/esm/core/app-shell/usePublicShellLayout.d.ts.map +1 -1
  408. package/dist/esm/core/app-shell/usePublicShellLayout.js +38 -0
  409. package/dist/esm/core/app-shell/usePublicShellLayout.js.map +1 -1
  410. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -1
  411. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
  412. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +47 -13
  413. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
  414. package/dist/esm/core/billing/BillingContext.d.ts +25 -2
  415. package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
  416. package/dist/esm/core/billing/BillingContext.js +16 -25
  417. package/dist/esm/core/billing/BillingContext.js.map +1 -1
  418. package/dist/esm/core/billing/billing-provider-display.frontend.utils.d.ts +11 -3
  419. package/dist/esm/core/billing/billing-provider-display.frontend.utils.d.ts.map +1 -1
  420. package/dist/esm/core/billing/billing-provider-display.frontend.utils.js +14 -8
  421. package/dist/esm/core/billing/billing-provider-display.frontend.utils.js.map +1 -1
  422. package/dist/esm/core/billing/useBillingPlanChange.d.ts.map +1 -1
  423. package/dist/esm/core/billing/useBillingPlanChange.js +2 -0
  424. package/dist/esm/core/billing/useBillingPlanChange.js.map +1 -1
  425. package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.d.ts.map +1 -1
  426. package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js +1 -0
  427. package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js.map +1 -1
  428. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts +29 -229
  429. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts.map +1 -1
  430. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js +29 -327
  431. package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js.map +1 -1
  432. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts +17 -27
  433. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts.map +1 -1
  434. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js +28 -48
  435. package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js.map +1 -1
  436. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +21 -11
  437. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
  438. package/dist/esm/core/config/app-configuration-frontend.schemas.js +4 -4
  439. package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
  440. package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +17 -0
  441. package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts.map +1 -1
  442. package/dist/esm/core/config/app-level-components.frontend.schemas.js +17 -0
  443. package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
  444. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +10 -10
  445. package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
  446. package/dist/esm/core/config/engine-settings-destinations.js +221 -6
  447. package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
  448. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -0
  449. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
  450. package/dist/esm/core/config/launcher-items.frontend.schemas.js +1 -0
  451. package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
  452. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +10 -1
  453. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
  454. package/dist/esm/core/config/settings-hub.frontend.schemas.js +9 -0
  455. package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
  456. package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
  457. package/dist/esm/core/config/verify-launcher-content.js +30 -19
  458. package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
  459. package/dist/esm/core/errors/ErrorContext.d.ts.map +1 -1
  460. package/dist/esm/core/errors/ErrorContext.js +9 -1
  461. package/dist/esm/core/errors/ErrorContext.js.map +1 -1
  462. package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
  463. package/dist/esm/core/errors/GlobalErrorHandler.js +5 -4
  464. package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
  465. package/dist/esm/core/errors/RouterErrorBoundary.js +1 -1
  466. package/dist/esm/core/errors/RouterErrorBoundary.js.map +1 -1
  467. package/dist/esm/core/errors/errors-builder.frontend.services.d.ts +2 -2
  468. package/dist/esm/core/errors/errors-builder.frontend.services.d.ts.map +1 -1
  469. package/dist/esm/core/errors/errors-builder.frontend.services.js +4 -4
  470. package/dist/esm/core/errors/errors-builder.frontend.services.js.map +1 -1
  471. package/dist/esm/core/errors/user-facing-error-message.frontend.utils.js +1 -1
  472. package/dist/esm/core/errors/user-facing-error-message.frontend.utils.js.map +1 -1
  473. package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
  474. package/dist/esm/core/events/NotificationContext.js +23 -5
  475. package/dist/esm/core/events/NotificationContext.js.map +1 -1
  476. package/dist/esm/core/events/events.frontend.schemas.d.ts +110 -43
  477. package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
  478. package/dist/esm/core/events/events.frontend.schemas.js +89 -15
  479. package/dist/esm/core/events/events.frontend.schemas.js.map +1 -1
  480. package/dist/esm/core/execution/useExecutionParticipationRMM.d.ts +2 -0
  481. package/dist/esm/core/execution/useExecutionParticipationRMM.d.ts.map +1 -1
  482. package/dist/esm/core/execution/useExecutionParticipationRMM.js +2 -1
  483. package/dist/esm/core/execution/useExecutionParticipationRMM.js.map +1 -1
  484. package/dist/esm/core/execution/useExecutionResourceOperationSurface.d.ts +1 -1
  485. package/dist/esm/core/execution/useExecutionResourceOperationSurface.d.ts.map +1 -1
  486. package/dist/esm/core/execution/useExecutionResourceOperationSurface.js +5 -2
  487. package/dist/esm/core/execution/useExecutionResourceOperationSurface.js.map +1 -1
  488. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +63 -0
  489. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts.map +1 -0
  490. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +131 -0
  491. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -0
  492. package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.d.ts +61 -0
  493. package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.d.ts.map +1 -0
  494. package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.js +178 -0
  495. package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.js.map +1 -0
  496. package/dist/esm/core/external-providers/ProviderAddressLookupHost.d.ts +52 -0
  497. package/dist/esm/core/external-providers/ProviderAddressLookupHost.d.ts.map +1 -0
  498. package/dist/esm/core/external-providers/ProviderAddressLookupHost.js +144 -0
  499. package/dist/esm/core/external-providers/ProviderAddressLookupHost.js.map +1 -0
  500. package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts +22 -1
  501. package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts.map +1 -1
  502. package/dist/esm/core/external-providers/ProviderFilePickerHost.js +23 -3
  503. package/dist/esm/core/external-providers/ProviderFilePickerHost.js.map +1 -1
  504. package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.d.ts +55 -0
  505. package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.d.ts.map +1 -0
  506. package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.js +65 -0
  507. package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.js.map +1 -0
  508. package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.d.ts +63 -0
  509. package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.d.ts.map +1 -0
  510. package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.js +100 -0
  511. package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.js.map +1 -0
  512. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +45 -7
  513. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
  514. package/dist/esm/core/flows-actors/FlowsActorsContext.js +112 -28
  515. package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
  516. package/dist/esm/core/flows-actors/usePendingDecisions.d.ts +32 -0
  517. package/dist/esm/core/flows-actors/usePendingDecisions.d.ts.map +1 -0
  518. package/dist/esm/core/flows-actors/usePendingDecisions.js +91 -0
  519. package/dist/esm/core/flows-actors/usePendingDecisions.js.map +1 -0
  520. package/dist/esm/core/guidance/GuidanceRenderer.d.ts.map +1 -1
  521. package/dist/esm/core/guidance/GuidanceRenderer.js +3 -2
  522. package/dist/esm/core/guidance/GuidanceRenderer.js.map +1 -1
  523. package/dist/esm/core/i18n/I18nContext.d.ts +22 -8
  524. package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
  525. package/dist/esm/core/i18n/I18nContext.js +21 -9
  526. package/dist/esm/core/i18n/I18nContext.js.map +1 -1
  527. package/dist/esm/core/i18n/component-label-resolution.utils.d.ts +5 -3
  528. package/dist/esm/core/i18n/component-label-resolution.utils.d.ts.map +1 -1
  529. package/dist/esm/core/i18n/component-label-resolution.utils.js +5 -3
  530. package/dist/esm/core/i18n/component-label-resolution.utils.js.map +1 -1
  531. package/dist/esm/core/i18n/useI18n.d.ts +2 -1
  532. package/dist/esm/core/i18n/useI18n.d.ts.map +1 -1
  533. package/dist/esm/core/i18n/useI18n.js +2 -1
  534. package/dist/esm/core/i18n/useI18n.js.map +1 -1
  535. package/dist/esm/core/loading/LoadingContext.d.ts.map +1 -1
  536. package/dist/esm/core/loading/LoadingContext.js +7 -1
  537. package/dist/esm/core/loading/LoadingContext.js.map +1 -1
  538. package/dist/esm/core/loading/LoadingGate.d.ts.map +1 -1
  539. package/dist/esm/core/loading/LoadingGate.js +19 -1
  540. package/dist/esm/core/loading/LoadingGate.js.map +1 -1
  541. package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts +15 -2
  542. package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts.map +1 -1
  543. package/dist/esm/core/monitoring/analytics/AnalyticsContext.js +183 -20
  544. package/dist/esm/core/monitoring/analytics/AnalyticsContext.js.map +1 -1
  545. package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js +2 -2
  546. package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js.map +1 -1
  547. package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.d.ts +7 -15
  548. package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.d.ts.map +1 -1
  549. package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.js +8 -26
  550. package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.js.map +1 -1
  551. package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.d.ts +12 -3
  552. package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.d.ts.map +1 -1
  553. package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.js +3 -2
  554. package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.js.map +1 -1
  555. package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.d.ts +42 -0
  556. package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.d.ts.map +1 -1
  557. package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.js +89 -5
  558. package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.js.map +1 -1
  559. package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.d.ts +2 -0
  560. package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.d.ts.map +1 -1
  561. package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.js +2 -0
  562. package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.js.map +1 -1
  563. package/dist/esm/core/navigation/NavigationContentAreas.d.ts +78 -0
  564. package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
  565. package/dist/esm/core/navigation/NavigationContentAreas.js +264 -16
  566. package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
  567. package/dist/esm/core/navigation/NavigationContext.d.ts +8 -0
  568. package/dist/esm/core/navigation/NavigationContext.d.ts.map +1 -1
  569. package/dist/esm/core/navigation/NavigationContext.js +137 -30
  570. package/dist/esm/core/navigation/NavigationContext.js.map +1 -1
  571. package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -0
  572. package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
  573. package/dist/esm/core/navigation/launcher-resolution.js +1 -0
  574. package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
  575. package/dist/esm/core/navigation/navigation-cascade.d.ts +46 -0
  576. package/dist/esm/core/navigation/navigation-cascade.d.ts.map +1 -0
  577. package/dist/esm/core/navigation/navigation-cascade.js +222 -0
  578. package/dist/esm/core/navigation/navigation-cascade.js.map +1 -0
  579. package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.d.ts.map +1 -1
  580. package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.js +21 -2
  581. package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.js.map +1 -1
  582. package/dist/esm/core/navigation/navigation-controller-internals.d.ts +71 -0
  583. package/dist/esm/core/navigation/navigation-controller-internals.d.ts.map +1 -0
  584. package/dist/esm/core/navigation/navigation-controller-internals.js +84 -0
  585. package/dist/esm/core/navigation/navigation-controller-internals.js.map +1 -0
  586. package/dist/esm/core/navigation/navigation-policy-resolver.service.d.ts +86 -2
  587. package/dist/esm/core/navigation/navigation-policy-resolver.service.d.ts.map +1 -1
  588. package/dist/esm/core/navigation/navigation-policy-resolver.service.js +242 -124
  589. package/dist/esm/core/navigation/navigation-policy-resolver.service.js.map +1 -1
  590. package/dist/esm/core/navigation/navigation.schemas.d.ts +170 -8
  591. package/dist/esm/core/navigation/navigation.schemas.d.ts.map +1 -1
  592. package/dist/esm/core/navigation/navigation.schemas.js +121 -2
  593. package/dist/esm/core/navigation/navigation.schemas.js.map +1 -1
  594. package/dist/esm/core/navigation/navigation.utils.d.ts +102 -6
  595. package/dist/esm/core/navigation/navigation.utils.d.ts.map +1 -1
  596. package/dist/esm/core/navigation/navigation.utils.js +283 -34
  597. package/dist/esm/core/navigation/navigation.utils.js.map +1 -1
  598. package/dist/esm/core/navigation/useIsStackEntryActive.d.ts +0 -10
  599. package/dist/esm/core/navigation/useIsStackEntryActive.d.ts.map +0 -1
  600. package/dist/esm/core/navigation/useIsStackEntryActive.js.map +0 -1
  601. package/dist/esm/core/navigation/useNavigationController.d.ts +28 -157
  602. package/dist/esm/core/navigation/useNavigationController.d.ts.map +1 -1
  603. package/dist/esm/core/navigation/useNavigationController.js +211 -1189
  604. package/dist/esm/core/navigation/useNavigationController.js.map +1 -1
  605. package/dist/esm/core/navigation/useNavigationRouterSync.d.ts +174 -0
  606. package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -0
  607. package/dist/esm/core/navigation/useNavigationRouterSync.js +977 -0
  608. package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -0
  609. package/dist/esm/core/navigation/useOverlayTitle.d.ts +13 -1
  610. package/dist/esm/core/navigation/useOverlayTitle.d.ts.map +1 -1
  611. package/dist/esm/core/navigation/useOverlayTitle.js +15 -10
  612. package/dist/esm/core/navigation/useOverlayTitle.js.map +1 -1
  613. package/dist/esm/core/navigation/useResponsiveZoneMigration.d.ts +43 -0
  614. package/dist/esm/core/navigation/useResponsiveZoneMigration.d.ts.map +1 -0
  615. package/dist/esm/core/navigation/useResponsiveZoneMigration.js +44 -0
  616. package/dist/esm/core/navigation/useResponsiveZoneMigration.js.map +1 -0
  617. package/dist/esm/core/navigation/zone-collapse-migration.d.ts +83 -0
  618. package/dist/esm/core/navigation/zone-collapse-migration.d.ts.map +1 -0
  619. package/dist/esm/core/navigation/zone-collapse-migration.js +116 -0
  620. package/dist/esm/core/navigation/zone-collapse-migration.js.map +1 -0
  621. package/dist/esm/core/navigation/zone-collapse.d.ts +51 -0
  622. package/dist/esm/core/navigation/zone-collapse.d.ts.map +1 -0
  623. package/dist/esm/core/navigation/zone-collapse.js +59 -0
  624. package/dist/esm/core/navigation/zone-collapse.js.map +1 -0
  625. package/dist/esm/core/navigation/zone-emphasis.d.ts +3 -0
  626. package/dist/esm/core/navigation/zone-emphasis.d.ts.map +1 -1
  627. package/dist/esm/core/navigation/zone-emphasis.js +26 -4
  628. package/dist/esm/core/navigation/zone-emphasis.js.map +1 -1
  629. package/dist/esm/core/navigation/zone-visible-entry.d.ts +22 -0
  630. package/dist/esm/core/navigation/zone-visible-entry.d.ts.map +1 -1
  631. package/dist/esm/core/navigation/zone-visible-entry.js +25 -0
  632. package/dist/esm/core/navigation/zone-visible-entry.js.map +1 -1
  633. package/dist/esm/core/requests/websockets/WebSocketContext.d.ts.map +1 -1
  634. package/dist/esm/core/requests/websockets/WebSocketContext.js +53 -18
  635. package/dist/esm/core/requests/websockets/WebSocketContext.js.map +1 -1
  636. package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
  637. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +3 -1
  638. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
  639. package/dist/esm/core/requests/websockets/useNotificationBadges.d.ts +22 -0
  640. package/dist/esm/core/requests/websockets/useNotificationBadges.d.ts.map +1 -1
  641. package/dist/esm/core/requests/websockets/useNotificationBadges.js +72 -3
  642. package/dist/esm/core/requests/websockets/useNotificationBadges.js.map +1 -1
  643. package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.d.ts +28 -0
  644. package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.d.ts.map +1 -0
  645. package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.js +86 -0
  646. package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.js.map +1 -0
  647. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +38 -3
  648. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
  649. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +57 -2
  650. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
  651. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts.map +1 -1
  652. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js +4 -2
  653. package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js.map +1 -1
  654. package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts +30 -1
  655. package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
  656. package/dist/esm/core/requests/wildo-http-client.frontend.service.js +47 -4
  657. package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
  658. package/dist/esm/core/resources/ResourceRegistryContext.d.ts.map +1 -1
  659. package/dist/esm/core/resources/ResourceRegistryContext.js +22 -1
  660. package/dist/esm/core/resources/ResourceRegistryContext.js.map +1 -1
  661. package/dist/esm/core/resources/context-resource-identifiers.frontend.utils.js +1 -1
  662. package/dist/esm/core/resources/context-resource-identifiers.frontend.utils.js.map +1 -1
  663. package/dist/esm/core/resources/frontend-resource.utils.d.ts +22 -1
  664. package/dist/esm/core/resources/frontend-resource.utils.d.ts.map +1 -1
  665. package/dist/esm/core/resources/frontend-resource.utils.js +25 -2
  666. package/dist/esm/core/resources/frontend-resource.utils.js.map +1 -1
  667. package/dist/esm/core/resources/operation-semantics.frontend.utils.d.ts +113 -13
  668. package/dist/esm/core/resources/operation-semantics.frontend.utils.d.ts.map +1 -1
  669. package/dist/esm/core/resources/operation-semantics.frontend.utils.js +173 -20
  670. package/dist/esm/core/resources/operation-semantics.frontend.utils.js.map +1 -1
  671. package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.d.ts +11 -0
  672. package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.d.ts.map +1 -1
  673. package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.js +7 -0
  674. package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.js.map +1 -1
  675. package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.d.ts +3 -2
  676. package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.d.ts.map +1 -1
  677. package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.js +13 -5
  678. package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.js.map +1 -1
  679. package/dist/esm/core/resources/resources-repository.frontend.service.d.ts +6 -0
  680. package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
  681. package/dist/esm/core/resources/resources-repository.frontend.service.js +90 -1
  682. package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
  683. package/dist/esm/core/resources/resources.frontend.schemas.d.ts +139 -16
  684. package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
  685. package/dist/esm/core/resources/resources.frontend.schemas.js +110 -11
  686. package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
  687. package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
  688. package/dist/esm/core/resources/rmm/ResourceMutationManager.js +3 -1
  689. package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
  690. package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.d.ts +10 -0
  691. package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.d.ts.map +1 -1
  692. package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.js +8 -0
  693. package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.js.map +1 -1
  694. package/dist/esm/core/resources/rmm/useResourceRMM.d.ts +7 -0
  695. package/dist/esm/core/resources/rmm/useResourceRMM.d.ts.map +1 -1
  696. package/dist/esm/core/resources/rmm/useResourceRMM.js +9 -2
  697. package/dist/esm/core/resources/rmm/useResourceRMM.js.map +1 -1
  698. package/dist/esm/core/resources/useOperationDirectExecution.d.ts +59 -0
  699. package/dist/esm/core/resources/useOperationDirectExecution.d.ts.map +1 -0
  700. package/dist/esm/core/resources/useOperationDirectExecution.js +278 -0
  701. package/dist/esm/core/resources/useOperationDirectExecution.js.map +1 -0
  702. package/dist/esm/core/resources/useResourceOperationActions.d.ts +1 -1
  703. package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
  704. package/dist/esm/core/resources/useResourceOperationActions.js +69 -22
  705. package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
  706. package/dist/esm/core/resources/useResourceOperationSurface.d.ts +8 -6
  707. package/dist/esm/core/resources/useResourceOperationSurface.d.ts.map +1 -1
  708. package/dist/esm/core/resources/useResourceOperationSurface.js +3 -2
  709. package/dist/esm/core/resources/useResourceOperationSurface.js.map +1 -1
  710. package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
  711. package/dist/esm/core/runtime/AppRouter.js +23 -2
  712. package/dist/esm/core/runtime/AppRouter.js.map +1 -1
  713. package/dist/esm/core/runtime/ApplicationContext.shared.d.ts +4 -2
  714. package/dist/esm/core/runtime/ApplicationContext.shared.d.ts.map +1 -1
  715. package/dist/esm/core/runtime/ApplicationContext.shared.js.map +1 -1
  716. package/dist/esm/core/runtime/ApplicationMainContext.d.ts +12 -2
  717. package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
  718. package/dist/esm/core/runtime/ApplicationMainContext.js +5 -2
  719. package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
  720. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +25 -1
  721. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
  722. package/dist/esm/core/runtime/domain-module.frontend.definitions.js +37 -1
  723. package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
  724. package/dist/esm/core/runtime/start-application.frontend.service.d.ts +21 -2
  725. package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
  726. package/dist/esm/core/runtime/start-application.frontend.service.js +51 -4
  727. package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
  728. package/dist/esm/core/security/AuthSessionContext.d.ts +11 -0
  729. package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
  730. package/dist/esm/core/security/AuthSessionContext.js +70 -22
  731. package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
  732. package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
  733. package/dist/esm/core/security/StepUpAuthContext.js +10 -2
  734. package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
  735. package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
  736. package/dist/esm/core/security/UserOrgsContext.js +72 -8
  737. package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
  738. package/dist/esm/core/security/route-organization-access.frontend.utils.d.ts +7 -0
  739. package/dist/esm/core/security/route-organization-access.frontend.utils.d.ts.map +1 -1
  740. package/dist/esm/core/security/route-organization-access.frontend.utils.js +8 -2
  741. package/dist/esm/core/security/route-organization-access.frontend.utils.js.map +1 -1
  742. package/dist/esm/core/security/useGrantedConsentPurposes.d.ts +30 -0
  743. package/dist/esm/core/security/useGrantedConsentPurposes.d.ts.map +1 -0
  744. package/dist/esm/core/security/useGrantedConsentPurposes.js +38 -0
  745. package/dist/esm/core/security/useGrantedConsentPurposes.js.map +1 -0
  746. package/dist/esm/core/ui/UIContext.d.ts.map +1 -1
  747. package/dist/esm/core/ui/UIContext.js +10 -6
  748. package/dist/esm/core/ui/UIContext.js.map +1 -1
  749. package/dist/esm/core/ui/color-conversion.utils.d.ts +20 -0
  750. package/dist/esm/core/ui/color-conversion.utils.d.ts.map +1 -1
  751. package/dist/esm/core/ui/color-conversion.utils.js +39 -5
  752. package/dist/esm/core/ui/color-conversion.utils.js.map +1 -1
  753. package/dist/esm/core/ui/themes/default.theme.d.ts.map +1 -1
  754. package/dist/esm/core/ui/themes/default.theme.js +22 -2
  755. package/dist/esm/core/ui/themes/default.theme.js.map +1 -1
  756. package/dist/esm/core/ui/ui.frontend.schemas.d.ts +6 -6
  757. package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
  758. package/dist/esm/core/ui/ui.frontend.schemas.js +3 -3
  759. package/dist/esm/core/ui/ui.frontend.schemas.js.map +1 -1
  760. package/dist/esm/index.d.ts +10 -1
  761. package/dist/esm/index.d.ts.map +1 -1
  762. package/dist/esm/index.js +19 -1
  763. package/dist/esm/index.js.map +1 -1
  764. package/dist/esm/testing/app-shell-placement-coverage.d.ts +43 -0
  765. package/dist/esm/testing/app-shell-placement-coverage.d.ts.map +1 -0
  766. package/dist/esm/testing/app-shell-placement-coverage.js +114 -0
  767. package/dist/esm/testing/app-shell-placement-coverage.js.map +1 -0
  768. package/dist/esm/testing/mock-builders.d.ts.map +1 -1
  769. package/dist/esm/testing/mock-builders.js +5 -0
  770. package/dist/esm/testing/mock-builders.js.map +1 -1
  771. package/dist/esm/testing.d.ts +1 -0
  772. package/dist/esm/testing.d.ts.map +1 -1
  773. package/dist/esm/testing.js +1 -0
  774. package/dist/esm/testing.js.map +1 -1
  775. package/package.json +9 -7
  776. package/dist/esm/core/navigation/useIsStackEntryActive.js +0 -15
  777. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -150,6 +150,18 @@ export interface GroupedSectionBodyProps {
150
150
  * the same container appearance, and renders them via
151
151
  * `ContentSectionContainer`.
152
152
  *
153
+ * **A solo form section with nothing to show hides.** One template serves several operations, and a
154
+ * `FormField` whose field the operation's schema lacks (or whose condition hides it) renders nothing.
155
+ * When a section holds only field slots (`FormField`, `FormFieldArray`, fields inside `ObjectScope` or
156
+ * inside a plain layout element such as a grid `div`) and none of them renders, the section hides its
157
+ * frame rather than showing a heading over nothing; its children stay mounted, so a field that starts
158
+ * rendering brings it back. A section holding anything else — text, a custom control or wrapper
159
+ * component (the engine's `Group` included), a nested section, a custom element, or a plain element
160
+ * with no field slot inside at that moment (a spacer `div`, an `hr`, a `div` whose only slot sits in a
161
+ * false branch) — is never hidden this way. A GROUPED section (grid, tabs, …) is decided by its host
162
+ * instead, from the operation's schema, because its container draws it and a tab's panel is not mounted:
163
+ * see `groupedSectionShowsNoField` in `FormLayout`.
164
+ *
153
165
  * Supports:
154
166
  * - **Saveable sections** (form-only, section-level partial save)
155
167
  * - **Section-level chromeMode override** (cascaded to child fields)
@@ -1 +1 @@
1
- {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/Section.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAYnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAuB1D;;GAEG;AACH,KAAK,gBAAg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ACzB,kBAAkB,GAClB,sBAAsB,GACtB,uBAAuB,GACvB,oBAAoB,GACpB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,sBAAsB,CAAC;IACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC,CAAC;IAC7G;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CA2HtD;yBA3He,OAAO;;;AA+HvB,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,YAAY,EACZ,eAAuB,GACxB,EAAE,uBAAuB,GAAG,SAAS,CAqCrC;AA+BD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,sBAAsB,GAAG,SAAS,CAiD9F"}
1
+ {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/Section.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAYnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AA2B1D;;GAEG;AACH,KAAK,gBAAgB,GAAG;IACtB;;;;OAIG;IACH,IAAI,EAAE,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,GACvB,oBAAoB,GACpB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,sBAAsB,CAAC;IACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC,CAAC;IAC7G;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAuItD;yBAvIe,OAAO;;;AA2IvB,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,YAAY,EACZ,eAAuB,GACxB,EAAE,uBAAuB,GAAG,SAAS,CAqCrC;AA+BD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,sBAAsB,GAAG,SAAS,CAiD9F"}
@@ -16,7 +16,9 @@ import { FrontendResourceUtils } from '../../../core/resources/frontend-resource
16
16
  import { LoggerFrontendService } from '../../../core/monitoring/logger.frontend.service.js';
17
17
  import { GroupedSectionHostKind } from './Section.shared.js';
18
18
  import { toDisplayChromeMode, isSoloMode } from './section-consolidation.shared.js';
19
- import { SectionFieldsContext, useRegisteredSectionFields, useSectionFieldsRegistry, } from './SectionFieldsContext.js';
19
+ import { SectionFieldsContext, useRegisteredSectionFields, useSectionFieldsRegistry, holdsOnlyFieldSlots, useSectionShowsNoField, } from './SectionFieldsContext.js';
20
+ import { useFieldScope } from './FieldScopeContext.js';
21
+ import { useTemplatePlacedFieldsOf } from '../../form/automated/TemplatePlacedFieldsContext.js';
20
22
  import { useOptionalSectionPresentationContext } from './SectionPresentationContext.js';
21
23
  import { SectionHostHeadingContext } from './SectionHostHeadingContext.js';
22
24
  const logger = LoggerFrontendService.getLogger();
@@ -40,6 +42,18 @@ const warnedUngroupedContainerSections = new Set();
40
42
  * the same container appearance, and renders them via
41
43
  * `ContentSectionContainer`.
42
44
  *
45
+ * **A solo form section with nothing to show hides.** One template serves several operations, and a
46
+ * `FormField` whose field the operation's schema lacks (or whose condition hides it) renders nothing.
47
+ * When a section holds only field slots (`FormField`, `FormFieldArray`, fields inside `ObjectScope` or
48
+ * inside a plain layout element such as a grid `div`) and none of them renders, the section hides its
49
+ * frame rather than showing a heading over nothing; its children stay mounted, so a field that starts
50
+ * rendering brings it back. A section holding anything else — text, a custom control or wrapper
51
+ * component (the engine's `Group` included), a nested section, a custom element, or a plain element
52
+ * with no field slot inside at that moment (a spacer `div`, an `hr`, a `div` whose only slot sits in a
53
+ * false branch) — is never hidden this way. A GROUPED section (grid, tabs, …) is decided by its host
54
+ * instead, from the operation's schema, because its container draws it and a tab's panel is not mounted:
55
+ * see `groupedSectionShowsNoField` in `FormLayout`.
56
+ *
43
57
  * Supports:
44
58
  * - **Saveable sections** (form-only, section-level partial save)
45
59
  * - **Section-level chromeMode override** (cascaded to child fields)
@@ -103,6 +117,14 @@ export function Section(props) {
103
117
  });
104
118
  }
105
119
  const sectionFieldsContextValue = useSectionFieldsRegistry();
120
+ const showsNoField = useSectionShowsNoField(sectionFieldsContextValue);
121
+ // Every slot this section holds, read from its elements: a collapsed section's fields, or an unchosen
122
+ // variant's, are not mounted, so they cannot report themselves (see `TemplatePlacedFieldsContext`).
123
+ const { pathPrefix } = useFieldScope();
124
+ useTemplatePlacedFieldsOf(children, pathPrefix);
125
+ // Only a section of nothing but field slots may hide for its fields' absence; anything else beside
126
+ // them (text, a custom control, a nested section) is content of its own that presence cannot see.
127
+ const isEmptyForThisOperation = showsNoField && holdsOnlyFieldSlots(children);
106
128
  // Container modes: render children as-is. The parent layout handles grouping.
107
129
  if (!isSoloMode(appearance)) {
108
130
  // Footgun guard: a container-mode section (GRID/TABS/COLUMNS/…) only receives
@@ -134,7 +156,11 @@ export function Section(props) {
134
156
  // flat <div> (GHOST), or a Collapsible toggle (COLLAPSIBLE). The legend and
135
157
  // description are passed as structured props so the primitive can place the
136
158
  // legend as a fieldset <legend> or a collapsible trigger as the mode requires.
137
- return (_jsx(ContentSection, { appearance: appearance, legend: resolvedLegend, description: resolvedDescription, disabled: disabled, defaultOpen: defaultFocus, className: className, "data-guidance-section": name, "data-composite-section": sectionHostKind === GroupedSectionHostKind.COMPOSITE ? name : undefined, children: content }));
159
+ return (_jsx(ContentSection, { appearance: appearance, legend: resolvedLegend, description: resolvedDescription, disabled: disabled, defaultOpen: defaultFocus, className: className, "data-guidance-section": name, "data-composite-section": sectionHostKind === GroupedSectionHostKind.COMPOSITE ? name : undefined,
160
+ // It holds only field slots and none renders for this operation (a template serves several
161
+ // operations, and this one posts none of these fields): a heading over nothing. The children stay
162
+ // mounted, so a field whose condition turns true reports and brings the section back.
163
+ hidden: isEmptyForThisOperation || undefined, children: content }));
138
164
  }
139
165
  Section.displayName = 'Section';
140
166
  export function GroupedSectionBody({ hostKind, sectionProps, providesHeading = false, }) {
@@ -1 +1 @@
1
- {"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/Section.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AAGzE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,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AI,EAAE,UAAU,CAAC,EAAE,EACnB,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,IAAI,oBAAoB,CAAC,MAAM,KAAK,CAAC,YAElE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,GAC5B,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport React, { useState, type ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ErrorCustomMessageReference } from '@wildo-ai/saas-models';\nimport { SectionMode, DisplayDirection } from '@wildo-ai/zod-decorators';\nimport type { ResponsiveChromeMode, SoloSectionMode } from '@wildo-ai/zod-decorators';\nimport type { GapSize } from '@wildo-ai/presets-components-models';\nimport { ButtonSize, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { useOptionalFormTemplateContext } from '../../form/automated/FormTemplateContext';\nimport { useOptionalDisplayTemplateContext } from '../../data-display/DisplayTemplateContext';\nimport { FormChromeProvider } from '../../form/chromes/FormChromeContext';\nimport { DisplayChromeProvider } from '../../data-display/chromes/DisplayChromeContext';\nimport { ContentSection } from '../../sections/content-section';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { GroupedSectionHostKind } from './Section.shared';\nimport { toDisplayChromeMode, isSoloMode } from './section-consolidation.shared';\nimport {\n SectionFieldsContext,\n useRegisteredSectionFields,\n useSectionFieldsRegistry,\n} from './SectionFieldsContext';\nimport { useOptionalSectionPresentationContext } from './SectionPresentationContext';\nimport { SectionHostHeadingContext } from './SectionHostHeadingContext';\n\nconst logger = LoggerFrontendService.getLogger();\n\n/**\n * Tracks `${name}:${appearance}` keys already warned about an ungrouped\n * container-mode section, so the dev footgun warning fires once per section\n * instead of on every render.\n */\nconst warnedUngroupedContainerSections = new Set<string>();\n\n// =============================================================================\n// SECTION PROPS — Discriminated Union\n// =============================================================================\n\n/**\n * Shared properties across all `SectionProps` variants.\n */\ntype SectionBaseProps = {\n /**\n * Structural ref — maps to i18n keys for title/description:\n * - `resources.{type}.sections.{name}.title`\n * - `resources.{type}.sections.{name}.description`\n */\n name: string;\n /** Additional CSS classes for the section container. */\n className?: string;\n /**\n * When `true`, renders a section-level save button (form context only).\n */\n saveable?: boolean;\n /**\n * Override chrome mode for all fields within this section.\n * Cascade: field decorator → section chromeMode → form/display chromeMode\n * → surface policy → STACKED.\n */\n chromeMode?: ResponsiveChromeMode;\n /** Whether this section is disabled. */\n disabled?: boolean;\n /**\n * Suppress the section's resolved TITLE (legend) while keeping the rest of the\n * section intact. Independent from {@link SectionBaseProps.hideDescription} —\n * the two are separate concerns.\n *\n * Honored for the **solo** modes (DEFAULT / CARD / GHOST / COLLAPSIBLE), i.e.\n * the modes a `<Section>` renders itself. Container/grouped modes (GRID / TABS\n * / …) take their heading from the layout host and ignore this flag.\n *\n * Hiding the title also releases the heading-dedup signal\n * ({@link SectionHostHeadingContext}), so an embedded resource surface is free\n * to render its own heading again.\n */\n hideTitle?: boolean;\n /**\n * Suppress the section's resolved DESCRIPTION, independently of the title.\n *\n * NB: the CARD renderer nests the description inside the title heading block,\n * so on a CARD hiding the title also hides the description; on DEFAULT / GHOST\n * / COLLAPSIBLE the two render independently.\n */\n hideDescription?: boolean;\n children: ReactNode;\n /**\n * Universal behavioral prop — initial focus state.\n * - COLLAPSIBLE: whether the section starts expanded (default: true)\n * - TABS/PILLS/VERTICAL_TABS: whether this section is the default active tab\n * - ACCORDION: whether this section starts expanded\n * - STEPPER: no effect (always sequential)\n * @default true for COLLAPSIBLE, false for others\n */\n defaultFocus?: boolean;\n};\n\n// ─── Solo modes ───\n\ntype SectionProps_Default = SectionBaseProps & {\n appearance?: SectionMode.DEFAULT;\n};\n\ntype SectionProps_Card = SectionBaseProps & {\n appearance: SectionMode.CARD;\n};\n\ntype SectionProps_Ghost = SectionBaseProps & {\n appearance: SectionMode.GHOST;\n};\n\ntype SectionProps_Collapsible = SectionBaseProps & {\n appearance: SectionMode.COLLAPSIBLE;\n};\n\n// ─── Layout container modes ───\n\ntype SectionProps_Inline = SectionBaseProps & {\n appearance: SectionMode.INLINE;\n gap?: GapSize;\n};\n\ntype SectionProps_Grid = SectionBaseProps & {\n appearance: SectionMode.GRID;\n columns?: number | 'auto';\n gap?: GapSize;\n minColumnWidth?: string;\n};\n\ntype SectionProps_Columns = SectionBaseProps & {\n appearance: SectionMode.COLUMNS;\n columns?: number | 'auto';\n gap?: GapSize;\n};\n\n// ─── Navigation container modes ───\n\ntype SectionProps_Tabs = SectionBaseProps & {\n appearance: SectionMode.TABS;\n};\n\ntype SectionProps_VerticalTabs = SectionBaseProps & {\n appearance: SectionMode.VERTICAL_TABS;\n navWidth?: string;\n};\n\ntype SectionProps_Pills = SectionBaseProps & {\n appearance: SectionMode.PILLS;\n};\n\n// ─── Expandable container modes ───\n\ntype SectionProps_Accordion = SectionBaseProps & {\n appearance: SectionMode.ACCORDION;\n allowMultiple?: boolean;\n};\n\ntype SectionProps_Expandable = SectionBaseProps & {\n appearance: SectionMode.EXPANDABLE;\n initialVisibleCount?: number;\n};\n\n// ─── Guided container modes ───\n\ntype SectionProps_Stepper = SectionBaseProps & {\n appearance: SectionMode.STEPPER;\n allowSkip?: boolean;\n showProgress?: boolean;\n orientation?: DisplayDirection;\n};\n\ntype SectionProps_Timeline = SectionBaseProps & {\n appearance: SectionMode.TIMELINE;\n};\n\n/**\n * Discriminated union of all Section props.\n * TypeScript narrows mode-specific parameters based on `appearance`.\n *\n * Solo modes (DEFAULT, CARD, GHOST, COLLAPSIBLE) render the section in place.\n * Container modes (TABS, GRID, etc.) are grouped by the parent layout\n * (`FormLayout`, `DisplayLayout`, or another section-aware host such as\n * `CompositeLayout`) into a `ContentSectionContainer`.\n */\nexport type SectionProps =\n | SectionProps_Default\n | SectionProps_Card\n | SectionProps_Ghost\n | SectionProps_Collapsible\n | SectionProps_Inline\n | SectionProps_Grid\n | SectionProps_Columns\n | SectionProps_Tabs\n | SectionProps_VerticalTabs\n | SectionProps_Pills\n | SectionProps_Accordion\n | SectionProps_Expandable\n | SectionProps_Stepper\n | SectionProps_Timeline;\n\nexport interface GroupedSectionBodyProps {\n hostKind: GroupedSectionHostKind;\n sectionProps: Pick<SectionProps, 'name' | 'children' | 'chromeMode' | 'saveable' | 'className' | 'disabled'>;\n /**\n * Whether the grouping container renders a visible heading for this section\n * (the `ContentSectionDescriptor.title` the layout host resolved). When true,\n * descendants get {@link SectionHostHeadingContext} so an embedded resource\n * surface suppresses its own generic heading/breadcrumb — mirroring what solo\n * `<Section>` rendering does with its legend. Hosts pass `!!title`.\n */\n providesHeading?: boolean;\n}\n\n/**\n * Named section for form and display templates.\n *\n * The `appearance` prop determines rendering behavior:\n *\n * **Solo modes** (DEFAULT, CARD, GHOST, COLLAPSIBLE) render in place with\n * appropriate chrome (fieldset, card, collapsible wrapper).\n *\n * **Container modes** (TABS, GRID, ACCORDION, etc.) are NOT rendered directly\n * by this component — the parent layout (`FormLayout`, `DisplayLayout`, or\n * another section-aware host) introspects its children, groups sections sharing\n * the same container appearance, and renders them via\n * `ContentSectionContainer`.\n *\n * Supports:\n * - **Saveable sections** (form-only, section-level partial save)\n * - **Section-level chromeMode override** (cascaded to child fields)\n * - **defaultFocus** — initial active/expanded state\n *\n * @example Solo mode (renders in place):\n * ```tsx\n * <Section name=\"billing\" appearance={SectionMode.CARD}>\n * <DisplayField name=\"plan\" />\n * </Section>\n * ```\n *\n * @example Container mode (grouped by parent layout):\n * ```tsx\n * <FormLayout>\n * <Section name=\"general\" appearance={SectionMode.TABS} defaultFocus>\n * <FormField name=\"name\" />\n * </Section>\n * <Section name=\"advanced\" appearance={SectionMode.TABS}>\n * <FormField name=\"config\" />\n * </Section>\n * </FormLayout>\n * ```\n */\nexport function Section(props: SectionProps): ReactNode {\n const {\n name,\n className,\n saveable,\n chromeMode,\n children,\n defaultFocus = true,\n hideTitle = false,\n hideDescription = false,\n } = props;\n\n const appearance: SectionMode = props.appearance ?? SectionMode.DEFAULT;\n\n const formCtx = useOptionalFormTemplateContext();\n const displayCtx = useOptionalDisplayTemplateContext();\n const sectionPresentation = useOptionalSectionPresentationContext();\n\n const presentationEntry = sectionPresentation?.sectionEntries?.[name];\n const presentationTitle = presentationEntry?.icon\n ? (\n <>\n <span className=\"me-element inline-flex items-center\">{presentationEntry.icon}</span>\n {presentationEntry.title ?? ''}\n </>\n )\n : presentationEntry?.title;\n\n const legend = formCtx?.sectionLabels?.[name]\n ?? displayCtx?.sectionLabels?.[name]\n ?? presentationTitle;\n const description = formCtx?.sectionDescriptions?.[name]\n ?? displayCtx?.sectionDescriptions?.[name]\n ?? presentationEntry?.description;\n // Two independent hide concerns. Resolving to `undefined` flows through the\n // whole solo-render chrome contract: no legend/description on the\n // ContentSection primitive AND (for the title) no heading-dedup signal.\n const resolvedLegend = hideTitle ? undefined : legend;\n const resolvedDescription = hideDescription ? undefined : description;\n const disabled = props.disabled ?? formCtx?.disabled;\n const onSectionSave = formCtx?.onSectionSave;\n const isSaveable = !!(saveable && onSectionSave);\n const sectionHostKind = formCtx\n ? GroupedSectionHostKind.FORM\n : displayCtx\n ? GroupedSectionHostKind.DISPLAY\n : sectionPresentation\n ? GroupedSectionHostKind.COMPOSITE\n : GroupedSectionHostKind.DISPLAY;\n if (sectionHostKind === GroupedSectionHostKind.COMPOSITE && chromeMode) {\n throw FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n component: 'Section',\n message: 'Section chromeMode is only supported inside form/display section hosts. Composite-hosted sections must not declare chromeMode until a dedicated composite chrome contract exists.',\n sectionName: name,\n },\n );\n }\n const sectionFieldsContextValue = useSectionFieldsRegistry();\n\n // Container modes: render children as-is. The parent layout handles grouping.\n if (!isSoloMode(appearance)) {\n // Footgun guard: a container-mode section (GRID/TABS/COLUMNS/…) only receives\n // chrome (card, padding, title) when a layout HOST groups it into a\n // ContentSectionContainer. Reaching this branch means the section escaped\n // grouping — almost always because it was wrapped in a custom component\n // (hiding it from the host's `groupSectionsByAppearance` scan) or rendered\n // standalone — so it renders BARE (raw children only, no chrome). Warn so the\n // silent \"no chrome\" outcome is visible; for a single self-contained section\n // use a solo appearance (DEFAULT / CARD / GHOST) instead.\n if (process.env.NODE_ENV !== 'production') {\n const warnKey = `${name}:${appearance}`;\n if (!warnedUngroupedContainerSections.has(warnKey)) {\n warnedUngroupedContainerSections.add(warnKey);\n logger.warn(\n `[Section] container-mode section \"${name}\" (appearance=\"${appearance}\") is rendering ungrouped — no section chrome (card / padding / title), only its raw children. Container modes must be DIRECT <Section> children of a layout host (FormLayout / DisplayLayout / CompositeLayout) to be grouped. This usually means the <Section> is wrapped in a custom component or rendered standalone. Use a solo appearance (DEFAULT / CARD / GHOST) for a single self-contained section.`,\n { sectionName: name, appearance },\n );\n }\n }\n return <>{children}</>;\n }\n\n // When this section renders its own heading (legend), tell descendant resource\n // operation surfaces so an embedded list/etc. doesn't ALSO render its generic\n // resource heading right under ours (the \"To-Do Lists\" + \"Todo Lists\" double\n // heading). Record-specific headings (a READ view's displayLabel) are NOT\n // suppressed — the consumer gates on the absence of a displayLabel.\n const content = (\n <SectionHostHeadingContext.Provider value={!!resolvedLegend}>\n <SectionFieldsContext.Provider value={sectionFieldsContextValue}>\n <SectionContentWithHostChrome\n hostKind={sectionHostKind}\n chromeMode={chromeMode}\n >\n {children}\n </SectionContentWithHostChrome>\n {isSaveable && <SectionSaveButton sectionName={name} disabled={disabled} />}\n </SectionFieldsContext.Provider>\n </SectionHostHeadingContext.Provider>\n );\n\n // All four solo modes (DEFAULT / CARD / GHOST / COLLAPSIBLE) are rendered by\n // the ContentSection primitive, which owns the per-mode chrome: a native\n // <fieldset> (DEFAULT/CARD — the disabled cascade + when-orphan framing), a\n // flat <div> (GHOST), or a Collapsible toggle (COLLAPSIBLE). The legend and\n // description are passed as structured props so the primitive can place the\n // legend as a fieldset <legend> or a collapsible trigger as the mode requires.\n return (\n <ContentSection\n appearance={appearance as SoloSectionMode}\n legend={resolvedLegend}\n description={resolvedDescription}\n disabled={disabled}\n defaultOpen={defaultFocus}\n className={className}\n data-guidance-section={name}\n data-composite-section={sectionHostKind === GroupedSectionHostKind.COMPOSITE ? name : undefined}\n >\n {content}\n </ContentSection>\n );\n}\n\nSection.displayName = 'Section';\n\nexport function GroupedSectionBody({\n hostKind,\n sectionProps,\n providesHeading = false,\n}: GroupedSectionBodyProps): ReactNode {\n const { children, chromeMode, saveable, name, className, disabled } = sectionProps;\n const sectionFieldsContextValue = useSectionFieldsRegistry();\n\n let content: ReactNode = children;\n if (hostKind === GroupedSectionHostKind.FORM) {\n content = (\n <SectionFieldsContext.Provider value={sectionFieldsContextValue}>\n <SectionContentWithHostChrome hostKind={hostKind} chromeMode={chromeMode}>\n {children}\n </SectionContentWithHostChrome>\n {saveable && <SectionSaveButton sectionName={name} disabled={disabled} />}\n </SectionFieldsContext.Provider>\n );\n } else {\n content = (\n <SectionContentWithHostChrome hostKind={hostKind} chromeMode={chromeMode}>\n {children}\n </SectionContentWithHostChrome>\n );\n }\n\n return (\n // Same de-duplication contract as the solo-section path (see the provider\n // around `content` in Section above): when the grouping container renders\n // this section's title, an embedded resource surface must not stack its\n // own generic heading + breadcrumb under it.\n <SectionHostHeadingContext.Provider value={providesHeading}>\n <div\n className={className ? `space-y-field ${className}` : 'space-y-field'}\n data-guidance-section={name}\n data-composite-section={hostKind === GroupedSectionHostKind.COMPOSITE ? name : undefined}\n >\n {content}\n </div>\n </SectionHostHeadingContext.Provider>\n );\n}\n\nfunction SectionContentWithHostChrome({\n hostKind,\n chromeMode,\n children,\n}: {\n hostKind: GroupedSectionHostKind;\n chromeMode?: SectionProps['chromeMode'];\n children: ReactNode;\n}): ReactNode {\n if (!chromeMode) {\n return children;\n }\n\n if (hostKind === GroupedSectionHostKind.FORM) {\n return <FormChromeProvider sectionChromeMode={chromeMode}>{children}</FormChromeProvider>;\n }\n\n if (hostKind === GroupedSectionHostKind.DISPLAY) {\n return <DisplayChromeProvider sectionChromeMode={toDisplayChromeMode(chromeMode)}>{children}</DisplayChromeProvider>;\n }\n\n return children;\n}\n\n\n// =============================================================================\n// SectionSaveButton (extracted to avoid useFormContext crash in display templates)\n// =============================================================================\n\nexport interface SectionSaveButtonProps {\n sectionName: string;\n disabled?: boolean;\n}\n\n/**\n * Section-level save button — only rendered inside form contexts.\n * Extracted from Section to isolate the useFormContext() call, preventing\n * crashes when Section is used inside display templates.\n *\n * Also rendered by `GroupedSectionBody` for grouped (tabbed/accordion)\n * container section panels mounted via `GroupedSectionContent` in\n * `FormLayout.tsx`.\n */\nexport function SectionSaveButton({ sectionName, disabled }: SectionSaveButtonProps): ReactNode {\n const form = useFormContext();\n const ctx = useOptionalFormTemplateContext();\n const registeredFieldNames = useRegisteredSectionFields();\n const [isSaving, setIsSaving] = useState(false);\n const { tComponent, isReady } = useI18n({\n component: FrontendComponentType.LOW_LEVEL_FORM_MESSAGE,\n });\n\n const onSectionSave = ctx?.onSectionSave;\n if (!onSectionSave) return null;\n if (!isReady) return null;\n\n const handleSave = async () => {\n if (registeredFieldNames.length === 0) {\n return;\n }\n\n const isValid = await form.trigger(registeredFieldNames);\n\n if (!isValid) {\n return;\n }\n\n setIsSaving(true);\n try {\n const formValues = form.getValues();\n await onSectionSave(sectionName, registeredFieldNames, formValues as Record<string, unknown>);\n } finally {\n setIsSaving(false);\n }\n };\n\n const savingLabel = tComponent(FrontendComponentType.LOW_LEVEL_FORM_MESSAGE, 'sectionSaving');\n const saveLabel = tComponent(FrontendComponentType.LOW_LEVEL_FORM_MESSAGE, 'sectionSave');\n\n return (\n <div className=\"flex justify-end pt-item\">\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.SECONDARY}\n size={ButtonSize.SM}\n onClick={handleSave}\n disabled={disabled || isSaving || registeredFieldNames.length === 0}\n >\n {isSaving ? savingLabel : saveLabel}\n </Button>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/Section.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AAGzE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AAEpG,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,C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QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,GAC5B,GACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport React, { useState, type ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ErrorCustomMessageReference } from '@wildo-ai/saas-models';\nimport { SectionMode, DisplayDirection } from '@wildo-ai/zod-decorators';\nimport type { ResponsiveChromeMode, SoloSectionMode } from '@wildo-ai/zod-decorators';\nimport type { GapSize } from '@wildo-ai/presets-components-models';\nimport { ButtonSize, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { useOptionalFormTemplateContext } from '../../form/automated/FormTemplateContext';\nimport { useOptionalDisplayTemplateContext } from '../../data-display/DisplayTemplateContext';\nimport { FormChromeProvider } from '../../form/chromes/FormChromeContext';\nimport { DisplayChromeProvider } from '../../data-display/chromes/DisplayChromeContext';\nimport { ContentSection } from '../../sections/content-section';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { GroupedSectionHostKind } from './Section.shared';\nimport { toDisplayChromeMode, isSoloMode } from './section-consolidation.shared';\nimport {\n SectionFieldsContext,\n useRegisteredSectionFields,\n useSectionFieldsRegistry,\n holdsOnlyFieldSlots,\n useSectionShowsNoField,\n} from './SectionFieldsContext';\nimport { useFieldScope } from './FieldScopeContext';\nimport { useTemplatePlacedFieldsOf } from '../../form/automated/TemplatePlacedFieldsContext';\nimport { useOptionalSectionPresentationContext } from './SectionPresentationContext';\nimport { SectionHostHeadingContext } from './SectionHostHeadingContext';\n\nconst logger = LoggerFrontendService.getLogger();\n\n/**\n * Tracks `${name}:${appearance}` keys already warned about an ungrouped\n * container-mode section, so the dev footgun warning fires once per section\n * instead of on every render.\n */\nconst warnedUngroupedContainerSections = new Set<string>();\n\n// =============================================================================\n// SECTION PROPS — Discriminated Union\n// =============================================================================\n\n/**\n * Shared properties across all `SectionProps` variants.\n */\ntype SectionBaseProps = {\n /**\n * Structural ref — maps to i18n keys for title/description:\n * - `resources.{type}.sections.{name}.title`\n * - `resources.{type}.sections.{name}.description`\n */\n name: string;\n /** Additional CSS classes for the section container. */\n className?: string;\n /**\n * When `true`, renders a section-level save button (form context only).\n */\n saveable?: boolean;\n /**\n * Override chrome mode for all fields within this section.\n * Cascade: field decorator → section chromeMode → form/display chromeMode\n * → surface policy → STACKED.\n */\n chromeMode?: ResponsiveChromeMode;\n /** Whether this section is disabled. */\n disabled?: boolean;\n /**\n * Suppress the section's resolved TITLE (legend) while keeping the rest of the\n * section intact. Independent from {@link SectionBaseProps.hideDescription} —\n * the two are separate concerns.\n *\n * Honored for the **solo** modes (DEFAULT / CARD / GHOST / COLLAPSIBLE), i.e.\n * the modes a `<Section>` renders itself. Container/grouped modes (GRID / TABS\n * / …) take their heading from the layout host and ignore this flag.\n *\n * Hiding the title also releases the heading-dedup signal\n * ({@link SectionHostHeadingContext}), so an embedded resource surface is free\n * to render its own heading again.\n */\n hideTitle?: boolean;\n /**\n * Suppress the section's resolved DESCRIPTION, independently of the title.\n *\n * NB: the CARD renderer nests the description inside the title heading block,\n * so on a CARD hiding the title also hides the description; on DEFAULT / GHOST\n * / COLLAPSIBLE the two render independently.\n */\n hideDescription?: boolean;\n children: ReactNode;\n /**\n * Universal behavioral prop — initial focus state.\n * - COLLAPSIBLE: whether the section starts expanded (default: true)\n * - TABS/PILLS/VERTICAL_TABS: whether this section is the default active tab\n * - ACCORDION: whether this section starts expanded\n * - STEPPER: no effect (always sequential)\n * @default true for COLLAPSIBLE, false for others\n */\n defaultFocus?: boolean;\n};\n\n// ─── Solo modes ───\n\ntype SectionProps_Default = SectionBaseProps & {\n appearance?: SectionMode.DEFAULT;\n};\n\ntype SectionProps_Card = SectionBaseProps & {\n appearance: SectionMode.CARD;\n};\n\ntype SectionProps_Ghost = SectionBaseProps & {\n appearance: SectionMode.GHOST;\n};\n\ntype SectionProps_Collapsible = SectionBaseProps & {\n appearance: SectionMode.COLLAPSIBLE;\n};\n\n// ─── Layout container modes ───\n\ntype SectionProps_Inline = SectionBaseProps & {\n appearance: SectionMode.INLINE;\n gap?: GapSize;\n};\n\ntype SectionProps_Grid = SectionBaseProps & {\n appearance: SectionMode.GRID;\n columns?: number | 'auto';\n gap?: GapSize;\n minColumnWidth?: string;\n};\n\ntype SectionProps_Columns = SectionBaseProps & {\n appearance: SectionMode.COLUMNS;\n columns?: number | 'auto';\n gap?: GapSize;\n};\n\n// ─── Navigation container modes ───\n\ntype SectionProps_Tabs = SectionBaseProps & {\n appearance: SectionMode.TABS;\n};\n\ntype SectionProps_VerticalTabs = SectionBaseProps & {\n appearance: SectionMode.VERTICAL_TABS;\n navWidth?: string;\n};\n\ntype SectionProps_Pills = SectionBaseProps & {\n appearance: SectionMode.PILLS;\n};\n\n// ─── Expandable container modes ───\n\ntype SectionProps_Accordion = SectionBaseProps & {\n appearance: SectionMode.ACCORDION;\n allowMultiple?: boolean;\n};\n\ntype SectionProps_Expandable = SectionBaseProps & {\n appearance: SectionMode.EXPANDABLE;\n initialVisibleCount?: number;\n};\n\n// ─── Guided container modes ───\n\ntype SectionProps_Stepper = SectionBaseProps & {\n appearance: SectionMode.STEPPER;\n allowSkip?: boolean;\n showProgress?: boolean;\n orientation?: DisplayDirection;\n};\n\ntype SectionProps_Timeline = SectionBaseProps & {\n appearance: SectionMode.TIMELINE;\n};\n\n/**\n * Discriminated union of all Section props.\n * TypeScript narrows mode-specific parameters based on `appearance`.\n *\n * Solo modes (DEFAULT, CARD, GHOST, COLLAPSIBLE) render the section in place.\n * Container modes (TABS, GRID, etc.) are grouped by the parent layout\n * (`FormLayout`, `DisplayLayout`, or another section-aware host such as\n * `CompositeLayout`) into a `ContentSectionContainer`.\n */\nexport type SectionProps =\n | SectionProps_Default\n | SectionProps_Card\n | SectionProps_Ghost\n | SectionProps_Collapsible\n | SectionProps_Inline\n | SectionProps_Grid\n | SectionProps_Columns\n | SectionProps_Tabs\n | SectionProps_VerticalTabs\n | SectionProps_Pills\n | SectionProps_Accordion\n | SectionProps_Expandable\n | SectionProps_Stepper\n | SectionProps_Timeline;\n\nexport interface GroupedSectionBodyProps {\n hostKind: GroupedSectionHostKind;\n sectionProps: Pick<SectionProps, 'name' | 'children' | 'chromeMode' | 'saveable' | 'className' | 'disabled'>;\n /**\n * Whether the grouping container renders a visible heading for this section\n * (the `ContentSectionDescriptor.title` the layout host resolved). When true,\n * descendants get {@link SectionHostHeadingContext} so an embedded resource\n * surface suppresses its own generic heading/breadcrumb — mirroring what solo\n * `<Section>` rendering does with its legend. Hosts pass `!!title`.\n */\n providesHeading?: boolean;\n}\n\n/**\n * Named section for form and display templates.\n *\n * The `appearance` prop determines rendering behavior:\n *\n * **Solo modes** (DEFAULT, CARD, GHOST, COLLAPSIBLE) render in place with\n * appropriate chrome (fieldset, card, collapsible wrapper).\n *\n * **Container modes** (TABS, GRID, ACCORDION, etc.) are NOT rendered directly\n * by this component — the parent layout (`FormLayout`, `DisplayLayout`, or\n * another section-aware host) introspects its children, groups sections sharing\n * the same container appearance, and renders them via\n * `ContentSectionContainer`.\n *\n * **A solo form section with nothing to show hides.** One template serves several operations, and a\n * `FormField` whose field the operation's schema lacks (or whose condition hides it) renders nothing.\n * When a section holds only field slots (`FormField`, `FormFieldArray`, fields inside `ObjectScope` or\n * inside a plain layout element such as a grid `div`) and none of them renders, the section hides its\n * frame rather than showing a heading over nothing; its children stay mounted, so a field that starts\n * rendering brings it back. A section holding anything else — text, a custom control or wrapper\n * component (the engine's `Group` included), a nested section, a custom element, or a plain element\n * with no field slot inside at that moment (a spacer `div`, an `hr`, a `div` whose only slot sits in a\n * false branch) — is never hidden this way. A GROUPED section (grid, tabs, …) is decided by its host\n * instead, from the operation's schema, because its container draws it and a tab's panel is not mounted:\n * see `groupedSectionShowsNoField` in `FormLayout`.\n *\n * Supports:\n * - **Saveable sections** (form-only, section-level partial save)\n * - **Section-level chromeMode override** (cascaded to child fields)\n * - **defaultFocus** — initial active/expanded state\n *\n * @example Solo mode (renders in place):\n * ```tsx\n * <Section name=\"billing\" appearance={SectionMode.CARD}>\n * <DisplayField name=\"plan\" />\n * </Section>\n * ```\n *\n * @example Container mode (grouped by parent layout):\n * ```tsx\n * <FormLayout>\n * <Section name=\"general\" appearance={SectionMode.TABS} defaultFocus>\n * <FormField name=\"name\" />\n * </Section>\n * <Section name=\"advanced\" appearance={SectionMode.TABS}>\n * <FormField name=\"config\" />\n * </Section>\n * </FormLayout>\n * ```\n */\nexport function Section(props: SectionProps): ReactNode {\n const {\n name,\n className,\n saveable,\n chromeMode,\n children,\n defaultFocus = true,\n hideTitle = false,\n hideDescription = false,\n } = props;\n\n const appearance: SectionMode = props.appearance ?? SectionMode.DEFAULT;\n\n const formCtx = useOptionalFormTemplateContext();\n const displayCtx = useOptionalDisplayTemplateContext();\n const sectionPresentation = useOptionalSectionPresentationContext();\n\n const presentationEntry = sectionPresentation?.sectionEntries?.[name];\n const presentationTitle = presentationEntry?.icon\n ? (\n <>\n <span className=\"me-element inline-flex items-center\">{presentationEntry.icon}</span>\n {presentationEntry.title ?? ''}\n </>\n )\n : presentationEntry?.title;\n\n const legend = formCtx?.sectionLabels?.[name]\n ?? displayCtx?.sectionLabels?.[name]\n ?? presentationTitle;\n const description = formCtx?.sectionDescriptions?.[name]\n ?? displayCtx?.sectionDescriptions?.[name]\n ?? presentationEntry?.description;\n // Two independent hide concerns. Resolving to `undefined` flows through the\n // whole solo-render chrome contract: no legend/description on the\n // ContentSection primitive AND (for the title) no heading-dedup signal.\n const resolvedLegend = hideTitle ? undefined : legend;\n const resolvedDescription = hideDescription ? undefined : description;\n const disabled = props.disabled ?? formCtx?.disabled;\n const onSectionSave = formCtx?.onSectionSave;\n const isSaveable = !!(saveable && onSectionSave);\n const sectionHostKind = formCtx\n ? GroupedSectionHostKind.FORM\n : displayCtx\n ? GroupedSectionHostKind.DISPLAY\n : sectionPresentation\n ? GroupedSectionHostKind.COMPOSITE\n : GroupedSectionHostKind.DISPLAY;\n if (sectionHostKind === GroupedSectionHostKind.COMPOSITE && chromeMode) {\n throw FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n component: 'Section',\n message: 'Section chromeMode is only supported inside form/display section hosts. Composite-hosted sections must not declare chromeMode until a dedicated composite chrome contract exists.',\n sectionName: name,\n },\n );\n }\n const sectionFieldsContextValue = useSectionFieldsRegistry();\n const showsNoField = useSectionShowsNoField(sectionFieldsContextValue);\n // Every slot this section holds, read from its elements: a collapsed section's fields, or an unchosen\n // variant's, are not mounted, so they cannot report themselves (see `TemplatePlacedFieldsContext`).\n const { pathPrefix } = useFieldScope();\n useTemplatePlacedFieldsOf(children, pathPrefix);\n // Only a section of nothing but field slots may hide for its fields' absence; anything else beside\n // them (text, a custom control, a nested section) is content of its own that presence cannot see.\n const isEmptyForThisOperation = showsNoField && holdsOnlyFieldSlots(children);\n\n // Container modes: render children as-is. The parent layout handles grouping.\n if (!isSoloMode(appearance)) {\n // Footgun guard: a container-mode section (GRID/TABS/COLUMNS/…) only receives\n // chrome (card, padding, title) when a layout HOST groups it into a\n // ContentSectionContainer. Reaching this branch means the section escaped\n // grouping — almost always because it was wrapped in a custom component\n // (hiding it from the host's `groupSectionsByAppearance` scan) or rendered\n // standalone — so it renders BARE (raw children only, no chrome). Warn so the\n // silent \"no chrome\" outcome is visible; for a single self-contained section\n // use a solo appearance (DEFAULT / CARD / GHOST) instead.\n if (process.env.NODE_ENV !== 'production') {\n const warnKey = `${name}:${appearance}`;\n if (!warnedUngroupedContainerSections.has(warnKey)) {\n warnedUngroupedContainerSections.add(warnKey);\n logger.warn(\n `[Section] container-mode section \"${name}\" (appearance=\"${appearance}\") is rendering ungrouped — no section chrome (card / padding / title), only its raw children. Container modes must be DIRECT <Section> children of a layout host (FormLayout / DisplayLayout / CompositeLayout) to be grouped. This usually means the <Section> is wrapped in a custom component or rendered standalone. Use a solo appearance (DEFAULT / CARD / GHOST) for a single self-contained section.`,\n { sectionName: name, appearance },\n );\n }\n }\n return <>{children}</>;\n }\n\n // When this section renders its own heading (legend), tell descendant resource\n // operation surfaces so an embedded list/etc. doesn't ALSO render its generic\n // resource heading right under ours (the \"To-Do Lists\" + \"Todo Lists\" double\n // heading). Record-specific headings (a READ view's displayLabel) are NOT\n // suppressed — the consumer gates on the absence of a displayLabel.\n const content = (\n <SectionHostHeadingContext.Provider value={!!resolvedLegend}>\n <SectionFieldsContext.Provider value={sectionFieldsContextValue}>\n <SectionContentWithHostChrome\n hostKind={sectionHostKind}\n chromeMode={chromeMode}\n >\n {children}\n </SectionContentWithHostChrome>\n {isSaveable && <SectionSaveButton sectionName={name} disabled={disabled} />}\n </SectionFieldsContext.Provider>\n </SectionHostHeadingContext.Provider>\n );\n\n // All four solo modes (DEFAULT / CARD / GHOST / COLLAPSIBLE) are rendered by\n // the ContentSection primitive, which owns the per-mode chrome: a native\n // <fieldset> (DEFAULT/CARD — the disabled cascade + when-orphan framing), a\n // flat <div> (GHOST), or a Collapsible toggle (COLLAPSIBLE). The legend and\n // description are passed as structured props so the primitive can place the\n // legend as a fieldset <legend> or a collapsible trigger as the mode requires.\n return (\n <ContentSection\n appearance={appearance as SoloSectionMode}\n legend={resolvedLegend}\n description={resolvedDescription}\n disabled={disabled}\n defaultOpen={defaultFocus}\n className={className}\n data-guidance-section={name}\n data-composite-section={sectionHostKind === GroupedSectionHostKind.COMPOSITE ? name : undefined}\n // It holds only field slots and none renders for this operation (a template serves several\n // operations, and this one posts none of these fields): a heading over nothing. The children stay\n // mounted, so a field whose condition turns true reports and brings the section back.\n hidden={isEmptyForThisOperation || undefined}\n >\n {content}\n </ContentSection>\n );\n}\n\nSection.displayName = 'Section';\n\nexport function GroupedSectionBody({\n hostKind,\n sectionProps,\n providesHeading = false,\n}: GroupedSectionBodyProps): ReactNode {\n const { children, chromeMode, saveable, name, className, disabled } = sectionProps;\n const sectionFieldsContextValue = useSectionFieldsRegistry();\n\n let content: ReactNode = children;\n if (hostKind === GroupedSectionHostKind.FORM) {\n content = (\n <SectionFieldsContext.Provider value={sectionFieldsContextValue}>\n <SectionContentWithHostChrome hostKind={hostKind} chromeMode={chromeMode}>\n {children}\n </SectionContentWithHostChrome>\n {saveable && <SectionSaveButton sectionName={name} disabled={disabled} />}\n </SectionFieldsContext.Provider>\n );\n } else {\n content = (\n <SectionContentWithHostChrome hostKind={hostKind} chromeMode={chromeMode}>\n {children}\n </SectionContentWithHostChrome>\n );\n }\n\n return (\n // Same de-duplication contract as the solo-section path (see the provider\n // around `content` in Section above): when the grouping container renders\n // this section's title, an embedded resource surface must not stack its\n // own generic heading + breadcrumb under it.\n <SectionHostHeadingContext.Provider value={providesHeading}>\n <div\n className={className ? `space-y-field ${className}` : 'space-y-field'}\n data-guidance-section={name}\n data-composite-section={hostKind === GroupedSectionHostKind.COMPOSITE ? name : undefined}\n >\n {content}\n </div>\n </SectionHostHeadingContext.Provider>\n );\n}\n\nfunction SectionContentWithHostChrome({\n hostKind,\n chromeMode,\n children,\n}: {\n hostKind: GroupedSectionHostKind;\n chromeMode?: SectionProps['chromeMode'];\n children: ReactNode;\n}): ReactNode {\n if (!chromeMode) {\n return children;\n }\n\n if (hostKind === GroupedSectionHostKind.FORM) {\n return <FormChromeProvider sectionChromeMode={chromeMode}>{children}</FormChromeProvider>;\n }\n\n if (hostKind === GroupedSectionHostKind.DISPLAY) {\n return <DisplayChromeProvider sectionChromeMode={toDisplayChromeMode(chromeMode)}>{children}</DisplayChromeProvider>;\n }\n\n return children;\n}\n\n\n// =============================================================================\n// SectionSaveButton (extracted to avoid useFormContext crash in display templates)\n// =============================================================================\n\nexport interface SectionSaveButtonProps {\n sectionName: string;\n disabled?: boolean;\n}\n\n/**\n * Section-level save button — only rendered inside form contexts.\n * Extracted from Section to isolate the useFormContext() call, preventing\n * crashes when Section is used inside display templates.\n *\n * Also rendered by `GroupedSectionBody` for grouped (tabbed/accordion)\n * container section panels mounted via `GroupedSectionContent` in\n * `FormLayout.tsx`.\n */\nexport function SectionSaveButton({ sectionName, disabled }: SectionSaveButtonProps): ReactNode {\n const form = useFormContext();\n const ctx = useOptionalFormTemplateContext();\n const registeredFieldNames = useRegisteredSectionFields();\n const [isSaving, setIsSaving] = useState(false);\n const { tComponent, isReady } = useI18n({\n component: FrontendComponentType.LOW_LEVEL_FORM_MESSAGE,\n });\n\n const onSectionSave = ctx?.onSectionSave;\n if (!onSectionSave) return null;\n if (!isReady) return null;\n\n const handleSave = async () => {\n if (registeredFieldNames.length === 0) {\n return;\n }\n\n const isValid = await form.trigger(registeredFieldNames);\n\n if (!isValid) {\n return;\n }\n\n setIsSaving(true);\n try {\n const formValues = form.getValues();\n await onSectionSave(sectionName, registeredFieldNames, formValues as Record<string, unknown>);\n } finally {\n setIsSaving(false);\n }\n };\n\n const savingLabel = tComponent(FrontendComponentType.LOW_LEVEL_FORM_MESSAGE, 'sectionSaving');\n const saveLabel = tComponent(FrontendComponentType.LOW_LEVEL_FORM_MESSAGE, 'sectionSave');\n\n return (\n <div className=\"flex justify-end pt-item\">\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.SECONDARY}\n size={ButtonSize.SM}\n onClick={handleSave}\n disabled={disabled || isSaving || registeredFieldNames.length === 0}\n >\n {isSaving ? savingLabel : saveLabel}\n </Button>\n </div>\n );\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import { type ReactNode } from 'react';
1
2
  /**
2
3
  * Registry contract a form-hosted section exposes to its descendants.
3
4
  *
@@ -25,6 +26,22 @@ export interface SectionFieldsContextValue {
25
26
  * over wiring this manually.
26
27
  */
27
28
  subscribeToRegisteredFields: (listener: () => void) => () => void;
29
+ /**
30
+ * Records whether a field this section declares actually RENDERS a control here — its field is in
31
+ * the operation's schema and not hidden by a condition. A template places its `FormField` slots
32
+ * unconditionally and lets the operation's schema decide (a slot whose field the schema lacks
33
+ * renders nothing), so a section can declare fields and show none of them.
34
+ */
35
+ reportSlotPresence: (slot: object, present: boolean) => void;
36
+ clearSlotPresence: (slot: object) => void;
37
+ /**
38
+ * True when fields reported here and NONE of them renders. Measured on Wonder Todos, "Reset to
39
+ * defaults" showed the preferences template's four section cards, every one empty. This is a fact
40
+ * about FIELDS only: a section also holding other content (text, a custom control, a nested section)
41
+ * is not empty because of it — `Section` combines it with `holdsOnlyFieldSlots`. Notifies through
42
+ * `subscribeToRegisteredFields`.
43
+ */
44
+ showsNoField: () => boolean;
28
45
  }
29
46
  export declare const SectionFieldsContext: import("react").Context<SectionFieldsContextValue>;
30
47
  /**
@@ -68,4 +85,57 @@ export declare function useSectionFieldRegistration(fieldName: string): void;
68
85
  * stable empty array outside any section provider.
69
86
  */
70
87
  export declare function useRegisteredSectionFields(): string[];
88
+ /**
89
+ * Hook for `FormField` to tell its section whether it renders a control. A LAYOUT effect, so the
90
+ * section knows before the browser paints and an empty section never flashes on screen.
91
+ */
92
+ export declare function useSectionFieldPresence(present: boolean): void;
93
+ /**
94
+ * Whether the section this registry backs has fields and shows none of them.
95
+ *
96
+ * Read in a LAYOUT effect rather than through `useSyncExternalStore`: the fields report in their own
97
+ * layout effects, which run before their section's, so the section settles before the browser paints.
98
+ * A store subscription is attached in a passive effect, after paint, and would let an empty frame show
99
+ * for a frame on the first mount and on every keyed remount of the form.
100
+ */
101
+ export declare function useSectionShowsNoField(registry: SectionFieldsContextValue): boolean;
102
+ /**
103
+ * What a component is to a section deciding whether it holds anything besides field slots.
104
+ *
105
+ * A section may hide when none of its fields renders only if fields are ALL it holds: text, a custom
106
+ * control or a nested section beside them is content of its own, which a field-presence count cannot see.
107
+ * Plain elements that wrap field slots (a layout `div`) are looked through. Components opt in by declaring
108
+ * their role; any undeclared component counts as other content, so an unknown component can only keep a
109
+ * section visible, never hide one. The role API is deliberately NOT exported from the package: an
110
+ * application's own wrapper component keeps its section visible, which is the safe answer, and an author
111
+ * who wants hiding places slots directly, in a plain element, or in `ObjectScope`.
112
+ */
113
+ export declare enum SectionContentRole {
114
+ /** A slot that renders one field's control, or nothing when the operation's schema lacks it. */
115
+ FIELD_SLOT = "field_slot",
116
+ /** A wrapper whose children are judged in its place (it scopes field names and adds no content). */
117
+ FIELD_SLOT_CONTAINER = "field_slot_container"
118
+ }
119
+ /** The role a component declared, if any (read by the placement report as well as the hide decision). */
120
+ export declare function sectionContentRoleOf(type: unknown): SectionContentRole | undefined;
121
+ /** Declares what a component is to `holdsOnlyFieldSlots`. */
122
+ export declare function declareSectionContentRole(component: object, role: SectionContentRole): void;
123
+ /** Where a field slot writes, as `FormField` resolves it: the enclosing scopes' names joined to its own. */
124
+ export interface PlacedFieldSlot {
125
+ path: string;
126
+ /** The slot was handed its own schema, so the form's schema does not decide whether it renders. */
127
+ hasOwnSchema: boolean;
128
+ }
129
+ /**
130
+ * True when `children` holds at least one field slot and nothing else. Fragments and declared containers
131
+ * are looked through, and so is a plain element that wraps field slots.
132
+ */
133
+ export declare function holdsOnlyFieldSlots(children: ReactNode): boolean;
134
+ /**
135
+ * The field slots `children` places, or `null` when it holds anything besides field slots. Paths are
136
+ * resolved the way `FormField` resolves them (scope names joined to the slot's `name`), starting from
137
+ * `pathPrefix`. Read STATICALLY, from the elements, so a host can decide about a section whose content
138
+ * is not mounted — an inactive tab's panel is not.
139
+ */
140
+ export declare function listPlacedFieldSlots(children: ReactNode, pathPrefix?: string): PlacedFieldSlot[] | null;
71
141
  //# sourceMappingURL=SectionFieldsContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionFieldsContext.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/SectionFieldsContext.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,2BAA2B,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CACnE;AAED,eAAO,MAAM,oBAAoB,oDAAwD,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,wBAAwB,IAAI,yBAAyB,CA6BpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAQnE;AAKD;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,EAAE,CAMrD"}
1
+ {"version":3,"file":"SectionFieldsContext.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/SectionFieldsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6H,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElK;;;;;;;;;;GAUG;AACH,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,2BAA2B,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAClE;;;;;OAKG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7D,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,oBAAoB,oDAAwD,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,wBAAwB,IAAI,yBAAyB,CAiDpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAQnE;AAKD;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,EAAE,CAMrD;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAa9D;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,OAAO,CAQnF;AAED;;;;;;;;;;GAUG;AACH,oBAAY,kBAAkB;IAC5B,gGAAgG;IAChG,UAAU,eAAe;IACzB,oGAAoG;IACpG,oBAAoB,yBAAyB;CAC9C;AAID,yGAAyG;AACzG,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAIlF;AAED,6DAA6D;AAC7D,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAE3F;AAYD,4GAA4G;AAC5G,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,mGAAmG;IACnG,YAAY,EAAE,OAAO,CAAC;CACvB;AAuCD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,SAAK,GAAG,eAAe,EAAE,GAAG,IAAI,CAGnG"}
@@ -1,4 +1,4 @@
1
- import { createContext, useContext, useEffect, useState, useSyncExternalStore } from 'react';
1
+ import { Children, Fragment, createContext, isValidElement, useContext, useEffect, useLayoutEffect, useState, useSyncExternalStore } from 'react';
2
2
  export const SectionFieldsContext = createContext(null);
3
3
  /**
4
4
  * Builds the identity-stable registry backing `SectionFieldsContext`.
@@ -26,11 +26,23 @@ export function useSectionFieldsRegistry() {
26
26
  const [registry] = useState(() => {
27
27
  /** Immutable snapshot — swapped (never mutated) so subscribers can compare by identity. */
28
28
  let registeredFields = [];
29
+ // One entry per MOUNTED SLOT, keyed by that slot's own token rather than by field name: the same
30
+ // field placed twice is two slots, which may even disagree (one given a schema the other lacks), and
31
+ // one copy unmounting must not erase or overwrite the other's answer.
32
+ const slotPresence = new Map();
33
+ let showsNoField = false;
29
34
  const listeners = new Set();
30
35
  const notify = () => {
31
36
  for (const listener of listeners)
32
37
  listener();
33
38
  };
39
+ const recomputePresence = () => {
40
+ const next = slotPresence.size > 0 && ![...slotPresence.values()].some(Boolean);
41
+ if (next === showsNoField)
42
+ return;
43
+ showsNoField = next;
44
+ notify();
45
+ };
34
46
  return {
35
47
  registerField: (name) => {
36
48
  if (registeredFields.includes(name))
@@ -45,6 +57,16 @@ export function useSectionFieldsRegistry() {
45
57
  notify();
46
58
  },
47
59
  getRegisteredFields: () => registeredFields,
60
+ reportSlotPresence: (slot, present) => {
61
+ slotPresence.set(slot, present);
62
+ recomputePresence();
63
+ },
64
+ clearSlotPresence: (slot) => {
65
+ if (!slotPresence.delete(slot))
66
+ return;
67
+ recomputePresence();
68
+ },
69
+ showsNoField: () => showsNoField,
48
70
  subscribeToRegisteredFields: (listener) => {
49
71
  listeners.add(listener);
50
72
  return () => {
@@ -86,4 +108,138 @@ export function useRegisteredSectionFields() {
86
108
  const ctx = useContext(SectionFieldsContext);
87
109
  return useSyncExternalStore(ctx ? ctx.subscribeToRegisteredFields : subscribeToNothing, ctx ? ctx.getRegisteredFields : () => EMPTY_REGISTERED_FIELDS);
88
110
  }
111
+ /**
112
+ * Hook for `FormField` to tell its section whether it renders a control. A LAYOUT effect, so the
113
+ * section knows before the browser paints and an empty section never flashes on screen.
114
+ */
115
+ export function useSectionFieldPresence(present) {
116
+ // Two effects on purpose. The CLEAR runs only when the slot leaves this registry (unmount, or the
117
+ // section provider changing), so a slot whose `present` flips is updated in place rather than deleted
118
+ // and re-added; either way the section settles before paint. The REPORT runs on every change of
119
+ // `present`, and after a provider change it reports into the new registry.
120
+ const ctx = useContext(SectionFieldsContext);
121
+ const [slot] = useState(() => ({}));
122
+ useLayoutEffect(() => () => {
123
+ ctx?.clearSlotPresence(slot);
124
+ }, [ctx, slot]);
125
+ useLayoutEffect(() => {
126
+ ctx?.reportSlotPresence(slot, present);
127
+ }, [ctx, slot, present]);
128
+ }
129
+ /**
130
+ * Whether the section this registry backs has fields and shows none of them.
131
+ *
132
+ * Read in a LAYOUT effect rather than through `useSyncExternalStore`: the fields report in their own
133
+ * layout effects, which run before their section's, so the section settles before the browser paints.
134
+ * A store subscription is attached in a passive effect, after paint, and would let an empty frame show
135
+ * for a frame on the first mount and on every keyed remount of the form.
136
+ */
137
+ export function useSectionShowsNoField(registry) {
138
+ const [showsNoField, setShowsNoField] = useState(false);
139
+ useLayoutEffect(() => {
140
+ const update = () => setShowsNoField(registry.showsNoField());
141
+ update();
142
+ return registry.subscribeToRegisteredFields(update);
143
+ }, [registry]);
144
+ return showsNoField;
145
+ }
146
+ /**
147
+ * What a component is to a section deciding whether it holds anything besides field slots.
148
+ *
149
+ * A section may hide when none of its fields renders only if fields are ALL it holds: text, a custom
150
+ * control or a nested section beside them is content of its own, which a field-presence count cannot see.
151
+ * Plain elements that wrap field slots (a layout `div`) are looked through. Components opt in by declaring
152
+ * their role; any undeclared component counts as other content, so an unknown component can only keep a
153
+ * section visible, never hide one. The role API is deliberately NOT exported from the package: an
154
+ * application's own wrapper component keeps its section visible, which is the safe answer, and an author
155
+ * who wants hiding places slots directly, in a plain element, or in `ObjectScope`.
156
+ */
157
+ export var SectionContentRole;
158
+ (function (SectionContentRole) {
159
+ /** A slot that renders one field's control, or nothing when the operation's schema lacks it. */
160
+ SectionContentRole["FIELD_SLOT"] = "field_slot";
161
+ /** A wrapper whose children are judged in its place (it scopes field names and adds no content). */
162
+ SectionContentRole["FIELD_SLOT_CONTAINER"] = "field_slot_container";
163
+ })(SectionContentRole || (SectionContentRole = {}));
164
+ const SECTION_CONTENT_ROLE = Symbol.for('wildo.sectionContentRole');
165
+ /** The role a component declared, if any (read by the placement report as well as the hide decision). */
166
+ export function sectionContentRoleOf(type) {
167
+ return (type !== null && (typeof type === 'function' || typeof type === 'object'))
168
+ ? type[SECTION_CONTENT_ROLE]
169
+ : undefined;
170
+ }
171
+ /** Declares what a component is to `holdsOnlyFieldSlots`. */
172
+ export function declareSectionContentRole(component, role) {
173
+ Object.defineProperty(component, SECTION_CONTENT_ROLE, { value: role, enumerable: false });
174
+ }
175
+ /** What a subtree amounts to for `holdsOnlyFieldSlots`. */
176
+ var SectionSubtreeKind;
177
+ (function (SectionSubtreeKind) {
178
+ /** At least one field slot, and nothing else. */
179
+ SectionSubtreeKind["FIELD_SLOTS"] = "field_slots";
180
+ /** Nothing at all: no slot and no content (a falsy branch, an empty container). */
181
+ SectionSubtreeKind["NOTHING"] = "nothing";
182
+ /** Something a field-presence count cannot see: text, a component, a childless or custom element. */
183
+ SectionSubtreeKind["CONTENT"] = "content";
184
+ })(SectionSubtreeKind || (SectionSubtreeKind = {}));
185
+ function classifySectionSubtree(nodes, pathPrefix, placed) {
186
+ let sawFieldSlot = false;
187
+ for (const node of Children.toArray(nodes)) {
188
+ if (!isValidElement(node))
189
+ return SectionSubtreeKind.CONTENT;
190
+ const props = node.props;
191
+ let kind;
192
+ if (node.type === Fragment) {
193
+ kind = classifySectionSubtree(props.children, pathPrefix, placed);
194
+ }
195
+ else if (typeof node.type === 'string') {
196
+ // A plain element is a WRAPPER only when it wraps field slots (a layout `<div className="grid">`).
197
+ // Anything else is content: a childless element (an image, a rule, a spacer), one whose only child
198
+ // is a falsy branch (it may be drawn by CSS), and a custom element (it may render shadow content).
199
+ kind = !node.type.includes('-') && classifySectionSubtree(props.children, pathPrefix, placed) === SectionSubtreeKind.FIELD_SLOTS
200
+ ? SectionSubtreeKind.FIELD_SLOTS
201
+ : SectionSubtreeKind.CONTENT;
202
+ }
203
+ else {
204
+ const role = node.type[SECTION_CONTENT_ROLE];
205
+ const name = typeof props.name === 'string' ? props.name : undefined;
206
+ const scopedPath = name ? (pathPrefix ? `${pathPrefix}.${name}` : name) : pathPrefix;
207
+ if (role === SectionContentRole.FIELD_SLOT) {
208
+ placed.push({ path: scopedPath, hasOwnSchema: props.schema !== undefined });
209
+ kind = SectionSubtreeKind.FIELD_SLOTS;
210
+ }
211
+ else if (role === SectionContentRole.FIELD_SLOT_CONTAINER) {
212
+ // A declared container holding nothing adds nothing, even an `ObjectScope` given a `className`
213
+ // (which renders a styled div). Unlike a bare styled div it scopes names rather than decorating,
214
+ // and when a section's slots are all absent the whole frame hides anyway.
215
+ kind = classifySectionSubtree(props.children, scopedPath, placed);
216
+ }
217
+ else {
218
+ kind = SectionSubtreeKind.CONTENT;
219
+ }
220
+ }
221
+ if (kind === SectionSubtreeKind.CONTENT)
222
+ return SectionSubtreeKind.CONTENT;
223
+ if (kind === SectionSubtreeKind.FIELD_SLOTS)
224
+ sawFieldSlot = true;
225
+ }
226
+ return sawFieldSlot ? SectionSubtreeKind.FIELD_SLOTS : SectionSubtreeKind.NOTHING;
227
+ }
228
+ /**
229
+ * True when `children` holds at least one field slot and nothing else. Fragments and declared containers
230
+ * are looked through, and so is a plain element that wraps field slots.
231
+ */
232
+ export function holdsOnlyFieldSlots(children) {
233
+ return classifySectionSubtree(children, '', []) === SectionSubtreeKind.FIELD_SLOTS;
234
+ }
235
+ /**
236
+ * The field slots `children` places, or `null` when it holds anything besides field slots. Paths are
237
+ * resolved the way `FormField` resolves them (scope names joined to the slot's `name`), starting from
238
+ * `pathPrefix`. Read STATICALLY, from the elements, so a host can decide about a section whose content
239
+ * is not mounted — an inactive tab's panel is not.
240
+ */
241
+ export function listPlacedFieldSlots(children, pathPrefix = '') {
242
+ const placed = [];
243
+ return classifySectionSubtree(children, pathPrefix, placed) === SectionSubtreeKind.FIELD_SLOTS ? placed : null;
244
+ }
89
245
  //# sourceMappingURL=SectionFieldsContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionFieldsContext.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/SectionFieldsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AA+B7F,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAmC,IAAI,CAAC,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAA8B,EAAE;QAC1D,2FAA2F;QAC3F,IAAI,gBAAgB,GAAa,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;QACxC,MAAM,MAAM,GAAG,GAAS,EAAE;YACxB,KAAK,MAAM,QAAQ,IAAI,SAAS;gBAAE,QAAQ,EAAE,CAAC;QAC/C,CAAC,CAAC;QACF,OAAO;YACL,aAAa,EAAE,CAAC,IAAY,EAAQ,EAAE;gBACpC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;oBAAE,OAAO;gBAC5C,gBAAgB,GAAG,CAAC,GAAG,gBAAgB,EAAE,IAAI,CAAC,CAAC;gBAC/C,MAAM,EAAE,CAAC;YACX,CAAC;YACD,eAAe,EAAE,CAAC,IAAY,EAAQ,EAAE;gBACtC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;oBAAE,OAAO;gBAC7C,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;gBAC1E,MAAM,EAAE,CAAC;YACX,CAAC;YACD,mBAAmB,EAAE,GAAa,EAAE,CAAC,gBAAgB;YACrD,2BAA2B,EAAE,CAAC,QAAoB,EAAgB,EAAE;gBAClE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBACxB,OAAO,GAAG,EAAE;oBACV,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAC7B,CAAC,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,2BAA2B,CAAC,SAAiB;IAC3D,MAAM,GAAG,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC7C,SAAS,CAAC,GAAG,EAAE;QACb,GAAG,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;QAC9B,OAAO,GAAG,EAAE;YACV,GAAG,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;AACvB,CAAC;AAED,MAAM,uBAAuB,GAAa,EAAE,CAAC;AAC7C,MAAM,kBAAkB,GAAG,GAAiB,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;AAExD;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B;IACxC,MAAM,GAAG,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC7C,OAAO,oBAAoB,CACzB,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC,CAAC,kBAAkB,EAC1D,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,GAAa,EAAE,CAAC,uBAAuB,CACxE,CAAC;AACJ,CAAC","sourcesContent":["import { createContext, useContext, useEffect, useState, useSyncExternalStore } from 'react';\n\n/**\n * Registry contract a form-hosted section exposes to its descendants.\n *\n * IDENTITY CONTRACT: providers MUST keep the context value identity-stable for\n * the lifetime of the section (see `useSectionFieldsRegistry`). Every\n * `FormField` registers itself through an effect that depends on this value;\n * a value whose identity tracks the registry contents re-fires every field's\n * registration effect on each mutation (unregister + register → new contents\n * → new value → …), which loops until React throws \"Maximum update depth\n * exceeded\" (recovered 2026-06-10 on the Wonder Todos todoLists create form).\n */\nexport interface SectionFieldsContextValue {\n registerField: (name: string) => void;\n unregisterField: (name: string) => void;\n /**\n * Current registered field names (insertion-ordered, deduplicated).\n * Returns the live immutable snapshot — a new array identity is produced\n * only when the contents actually change, so it is safe to use as a\n * `useSyncExternalStore` snapshot.\n */\n getRegisteredFields: () => string[];\n /**\n * Subscribe to registry mutations. Returns the unsubscribe function.\n * Render-reactive consumers should prefer `useRegisteredSectionFields`\n * over wiring this manually.\n */\n subscribeToRegisteredFields: (listener: () => void) => () => void;\n}\n\nexport const SectionFieldsContext = createContext<SectionFieldsContextValue | null>(null);\n\n/**\n * Builds the identity-stable registry backing `SectionFieldsContext`.\n * Used by both section form hosts (`Section` solo modes and\n * `GroupedSectionBody` for grouped container panels) — keep them on this\n * single implementation so the identity contract cannot drift between hosts.\n *\n * Why the registry lives OUTSIDE React state: registrations arrive from\n * descendant effects. If the registered names were `useState` data baked into\n * the provider value (e.g. a `useMemo` with the names in its deps), every\n * registration would change the value identity, re-fire every field's\n * registration effect (cleanup unregister + register), change the state\n * again, and re-render forever — register/unregister pairs always transition\n * through fresh array identities, so any state-derived value loops by\n * construction. Instead the store is created once per section; mutations swap\n * an immutable snapshot and notify subscribers, so registry churn re-renders\n * only the components that opted in via `useRegisteredSectionFields` — never\n * the provider, never the registrants.\n *\n * Same family as the `WizardStep` field registry (stable mutable container),\n * extended with subscription because section save buttons render from the\n * registry contents (disabled-when-empty) and need to observe changes.\n */\nexport function useSectionFieldsRegistry(): SectionFieldsContextValue {\n const [registry] = useState((): SectionFieldsContextValue => {\n /** Immutable snapshot — swapped (never mutated) so subscribers can compare by identity. */\n let registeredFields: string[] = [];\n const listeners = new Set<() => void>();\n const notify = (): void => {\n for (const listener of listeners) listener();\n };\n return {\n registerField: (name: string): void => {\n if (registeredFields.includes(name)) return;\n registeredFields = [...registeredFields, name];\n notify();\n },\n unregisterField: (name: string): void => {\n if (!registeredFields.includes(name)) return;\n registeredFields = registeredFields.filter((current) => current !== name);\n notify();\n },\n getRegisteredFields: (): string[] => registeredFields,\n subscribeToRegisteredFields: (listener: () => void): (() => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n });\n return registry;\n}\n\n/**\n * Hook for `FormField` to register with the enclosing saveable section so the\n * section save action can validate and submit only the fields it actually\n * owns. No-op outside a section provider.\n *\n * Depends on the context value identity on purpose (React contract: re-bind\n * if the provider genuinely changes). This is safe only because providers\n * honor the identity contract documented on `SectionFieldsContextValue` —\n * the effect then runs once per field mount.\n */\nexport function useSectionFieldRegistration(fieldName: string): void {\n const ctx = useContext(SectionFieldsContext);\n useEffect(() => {\n ctx?.registerField(fieldName);\n return () => {\n ctx?.unregisterField(fieldName);\n };\n }, [ctx, fieldName]);\n}\n\nconst EMPTY_REGISTERED_FIELDS: string[] = [];\nconst subscribeToNothing = (): (() => void) => () => {};\n\n/**\n * Render-reactive view of the enclosing section's registered field names.\n * Re-renders the caller when fields register/unregister (e.g. conditionally\n * shown fields), without ever invalidating the provider value. Returns a\n * stable empty array outside any section provider.\n */\nexport function useRegisteredSectionFields(): string[] {\n const ctx = useContext(SectionFieldsContext);\n return useSyncExternalStore(\n ctx ? ctx.subscribeToRegisteredFields : subscribeToNothing,\n ctx ? ctx.getRegisteredFields : (): string[] => EMPTY_REGISTERED_FIELDS,\n );\n}\n"]}
1
+ {"version":3,"file":"SectionFieldsContext.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/SectionFieldsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,oBAAoB,EAAkB,MAAM,OAAO,CAAC;AA+ClK,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAmC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W,CAAC;YACxC,CAAC;iBAAM,IAAI,IAAI,KAAK,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;gBAC5D,+FAA+F;gBAC/F,iGAAiG;gBACjG,0EAA0E;gBAC1E,IAAI,GAAG,sBAAsB,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;YACpE,CAAC;iBAAM,CAAC;gBACN,IAAI,GAAG,kBAAkB,CAAC,OAAO,CAAC;YACpC,CAAC;QACH,CAAC;QACD,IAAI,IAAI,KAAK,kBAAkB,CAAC,OAAO;YAAE,OAAO,kBAAkB,CAAC,OAAO,CAAC;QAC3E,IAAI,IAAI,KAAK,kBAAkB,CAAC,WAAW;YAAE,YAAY,GAAG,IAAI,CAAC;IACnE,CAAC;IACD,OAAO,YAAY,CAAC,CAAC,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC;AACpF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAmB;IACrD,OAAO,sBAAsB,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,KAAK,kBAAkB,CAAC,WAAW,CAAC;AACrF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAmB,EAAE,UAAU,GAAG,EAAE;IACvE,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,OAAO,sBAAsB,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACjH,CAAC","sourcesContent":["import { Children, Fragment, createContext, isValidElement, useContext, useEffect, useLayoutEffect, useState, useSyncExternalStore, type ReactNode } from 'react';\n\n/**\n * Registry contract a form-hosted section exposes to its descendants.\n *\n * IDENTITY CONTRACT: providers MUST keep the context value identity-stable for\n * the lifetime of the section (see `useSectionFieldsRegistry`). Every\n * `FormField` registers itself through an effect that depends on this value;\n * a value whose identity tracks the registry contents re-fires every field's\n * registration effect on each mutation (unregister + register → new contents\n * → new value → …), which loops until React throws \"Maximum update depth\n * exceeded\" (recovered 2026-06-10 on the Wonder Todos todoLists create form).\n */\nexport interface SectionFieldsContextValue {\n registerField: (name: string) => void;\n unregisterField: (name: string) => void;\n /**\n * Current registered field names (insertion-ordered, deduplicated).\n * Returns the live immutable snapshot — a new array identity is produced\n * only when the contents actually change, so it is safe to use as a\n * `useSyncExternalStore` snapshot.\n */\n getRegisteredFields: () => string[];\n /**\n * Subscribe to registry mutations. Returns the unsubscribe function.\n * Render-reactive consumers should prefer `useRegisteredSectionFields`\n * over wiring this manually.\n */\n subscribeToRegisteredFields: (listener: () => void) => () => void;\n /**\n * Records whether a field this section declares actually RENDERS a control here — its field is in\n * the operation's schema and not hidden by a condition. A template places its `FormField` slots\n * unconditionally and lets the operation's schema decide (a slot whose field the schema lacks\n * renders nothing), so a section can declare fields and show none of them.\n */\n reportSlotPresence: (slot: object, present: boolean) => void;\n clearSlotPresence: (slot: object) => void;\n /**\n * True when fields reported here and NONE of them renders. Measured on Wonder Todos, \"Reset to\n * defaults\" showed the preferences template's four section cards, every one empty. This is a fact\n * about FIELDS only: a section also holding other content (text, a custom control, a nested section)\n * is not empty because of it — `Section` combines it with `holdsOnlyFieldSlots`. Notifies through\n * `subscribeToRegisteredFields`.\n */\n showsNoField: () => boolean;\n}\n\nexport const SectionFieldsContext = createContext<SectionFieldsContextValue | null>(null);\n\n/**\n * Builds the identity-stable registry backing `SectionFieldsContext`.\n * Used by both section form hosts (`Section` solo modes and\n * `GroupedSectionBody` for grouped container panels) — keep them on this\n * single implementation so the identity contract cannot drift between hosts.\n *\n * Why the registry lives OUTSIDE React state: registrations arrive from\n * descendant effects. If the registered names were `useState` data baked into\n * the provider value (e.g. a `useMemo` with the names in its deps), every\n * registration would change the value identity, re-fire every field's\n * registration effect (cleanup unregister + register), change the state\n * again, and re-render forever — register/unregister pairs always transition\n * through fresh array identities, so any state-derived value loops by\n * construction. Instead the store is created once per section; mutations swap\n * an immutable snapshot and notify subscribers, so registry churn re-renders\n * only the components that opted in via `useRegisteredSectionFields` — never\n * the provider, never the registrants.\n *\n * Same family as the `WizardStep` field registry (stable mutable container),\n * extended with subscription because section save buttons render from the\n * registry contents (disabled-when-empty) and need to observe changes.\n */\nexport function useSectionFieldsRegistry(): SectionFieldsContextValue {\n const [registry] = useState((): SectionFieldsContextValue => {\n /** Immutable snapshot — swapped (never mutated) so subscribers can compare by identity. */\n let registeredFields: string[] = [];\n // One entry per MOUNTED SLOT, keyed by that slot's own token rather than by field name: the same\n // field placed twice is two slots, which may even disagree (one given a schema the other lacks), and\n // one copy unmounting must not erase or overwrite the other's answer.\n const slotPresence = new Map<object, boolean>();\n let showsNoField = false;\n const listeners = new Set<() => void>();\n const notify = (): void => {\n for (const listener of listeners) listener();\n };\n const recomputePresence = (): void => {\n const next = slotPresence.size > 0 && ![...slotPresence.values()].some(Boolean);\n if (next === showsNoField) return;\n showsNoField = next;\n notify();\n };\n return {\n registerField: (name: string): void => {\n if (registeredFields.includes(name)) return;\n registeredFields = [...registeredFields, name];\n notify();\n },\n unregisterField: (name: string): void => {\n if (!registeredFields.includes(name)) return;\n registeredFields = registeredFields.filter((current) => current !== name);\n notify();\n },\n getRegisteredFields: (): string[] => registeredFields,\n reportSlotPresence: (slot: object, present: boolean): void => {\n slotPresence.set(slot, present);\n recomputePresence();\n },\n clearSlotPresence: (slot: object): void => {\n if (!slotPresence.delete(slot)) return;\n recomputePresence();\n },\n showsNoField: (): boolean => showsNoField,\n subscribeToRegisteredFields: (listener: () => void): (() => void) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n });\n return registry;\n}\n\n/**\n * Hook for `FormField` to register with the enclosing saveable section so the\n * section save action can validate and submit only the fields it actually\n * owns. No-op outside a section provider.\n *\n * Depends on the context value identity on purpose (React contract: re-bind\n * if the provider genuinely changes). This is safe only because providers\n * honor the identity contract documented on `SectionFieldsContextValue` —\n * the effect then runs once per field mount.\n */\nexport function useSectionFieldRegistration(fieldName: string): void {\n const ctx = useContext(SectionFieldsContext);\n useEffect(() => {\n ctx?.registerField(fieldName);\n return () => {\n ctx?.unregisterField(fieldName);\n };\n }, [ctx, fieldName]);\n}\n\nconst EMPTY_REGISTERED_FIELDS: string[] = [];\nconst subscribeToNothing = (): (() => void) => () => {};\n\n/**\n * Render-reactive view of the enclosing section's registered field names.\n * Re-renders the caller when fields register/unregister (e.g. conditionally\n * shown fields), without ever invalidating the provider value. Returns a\n * stable empty array outside any section provider.\n */\nexport function useRegisteredSectionFields(): string[] {\n const ctx = useContext(SectionFieldsContext);\n return useSyncExternalStore(\n ctx ? ctx.subscribeToRegisteredFields : subscribeToNothing,\n ctx ? ctx.getRegisteredFields : (): string[] => EMPTY_REGISTERED_FIELDS,\n );\n}\n\n/**\n * Hook for `FormField` to tell its section whether it renders a control. A LAYOUT effect, so the\n * section knows before the browser paints and an empty section never flashes on screen.\n */\nexport function useSectionFieldPresence(present: boolean): void {\n // Two effects on purpose. The CLEAR runs only when the slot leaves this registry (unmount, or the\n // section provider changing), so a slot whose `present` flips is updated in place rather than deleted\n // and re-added; either way the section settles before paint. The REPORT runs on every change of\n // `present`, and after a provider change it reports into the new registry.\n const ctx = useContext(SectionFieldsContext);\n const [slot] = useState(() => ({}));\n useLayoutEffect(() => () => {\n ctx?.clearSlotPresence(slot);\n }, [ctx, slot]);\n useLayoutEffect(() => {\n ctx?.reportSlotPresence(slot, present);\n }, [ctx, slot, present]);\n}\n\n/**\n * Whether the section this registry backs has fields and shows none of them.\n *\n * Read in a LAYOUT effect rather than through `useSyncExternalStore`: the fields report in their own\n * layout effects, which run before their section's, so the section settles before the browser paints.\n * A store subscription is attached in a passive effect, after paint, and would let an empty frame show\n * for a frame on the first mount and on every keyed remount of the form.\n */\nexport function useSectionShowsNoField(registry: SectionFieldsContextValue): boolean {\n const [showsNoField, setShowsNoField] = useState(false);\n useLayoutEffect(() => {\n const update = (): void => setShowsNoField(registry.showsNoField());\n update();\n return registry.subscribeToRegisteredFields(update);\n }, [registry]);\n return showsNoField;\n}\n\n/**\n * What a component is to a section deciding whether it holds anything besides field slots.\n *\n * A section may hide when none of its fields renders only if fields are ALL it holds: text, a custom\n * control or a nested section beside them is content of its own, which a field-presence count cannot see.\n * Plain elements that wrap field slots (a layout `div`) are looked through. Components opt in by declaring\n * their role; any undeclared component counts as other content, so an unknown component can only keep a\n * section visible, never hide one. The role API is deliberately NOT exported from the package: an\n * application's own wrapper component keeps its section visible, which is the safe answer, and an author\n * who wants hiding places slots directly, in a plain element, or in `ObjectScope`.\n */\nexport enum SectionContentRole {\n /** A slot that renders one field's control, or nothing when the operation's schema lacks it. */\n FIELD_SLOT = 'field_slot',\n /** A wrapper whose children are judged in its place (it scopes field names and adds no content). */\n FIELD_SLOT_CONTAINER = 'field_slot_container',\n}\n\nconst SECTION_CONTENT_ROLE = Symbol.for('wildo.sectionContentRole');\n\n/** The role a component declared, if any (read by the placement report as well as the hide decision). */\nexport function sectionContentRoleOf(type: unknown): SectionContentRole | undefined {\n return (type !== null && (typeof type === 'function' || typeof type === 'object'))\n ? (type as { [SECTION_CONTENT_ROLE]?: SectionContentRole })[SECTION_CONTENT_ROLE]\n : undefined;\n}\n\n/** Declares what a component is to `holdsOnlyFieldSlots`. */\nexport function declareSectionContentRole(component: object, role: SectionContentRole): void {\n Object.defineProperty(component, SECTION_CONTENT_ROLE, { value: role, enumerable: false });\n}\n\n/** What a subtree amounts to for `holdsOnlyFieldSlots`. */\nenum SectionSubtreeKind {\n /** At least one field slot, and nothing else. */\n FIELD_SLOTS = 'field_slots',\n /** Nothing at all: no slot and no content (a falsy branch, an empty container). */\n NOTHING = 'nothing',\n /** Something a field-presence count cannot see: text, a component, a childless or custom element. */\n CONTENT = 'content',\n}\n\n/** Where a field slot writes, as `FormField` resolves it: the enclosing scopes' names joined to its own. */\nexport interface PlacedFieldSlot {\n path: string;\n /** The slot was handed its own schema, so the form's schema does not decide whether it renders. */\n hasOwnSchema: boolean;\n}\n\nfunction classifySectionSubtree(nodes: ReactNode, pathPrefix: string, placed: PlacedFieldSlot[]): SectionSubtreeKind {\n let sawFieldSlot = false;\n for (const node of Children.toArray(nodes)) {\n if (!isValidElement(node)) return SectionSubtreeKind.CONTENT;\n const props = node.props as { children?: ReactNode; name?: unknown; schema?: unknown };\n let kind: SectionSubtreeKind;\n if (node.type === Fragment) {\n kind = classifySectionSubtree(props.children, pathPrefix, placed);\n } else if (typeof node.type === 'string') {\n // A plain element is a WRAPPER only when it wraps field slots (a layout `<div className=\"grid\">`).\n // Anything else is content: a childless element (an image, a rule, a spacer), one whose only child\n // is a falsy branch (it may be drawn by CSS), and a custom element (it may render shadow content).\n kind = !node.type.includes('-') && classifySectionSubtree(props.children, pathPrefix, placed) === SectionSubtreeKind.FIELD_SLOTS\n ? SectionSubtreeKind.FIELD_SLOTS\n : SectionSubtreeKind.CONTENT;\n } else {\n const role = (node.type as { [SECTION_CONTENT_ROLE]?: SectionContentRole })[SECTION_CONTENT_ROLE];\n const name = typeof props.name === 'string' ? props.name : undefined;\n const scopedPath = name ? (pathPrefix ? `${pathPrefix}.${name}` : name) : pathPrefix;\n if (role === SectionContentRole.FIELD_SLOT) {\n placed.push({ path: scopedPath, hasOwnSchema: props.schema !== undefined });\n kind = SectionSubtreeKind.FIELD_SLOTS;\n } else if (role === SectionContentRole.FIELD_SLOT_CONTAINER) {\n // A declared container holding nothing adds nothing, even an `ObjectScope` given a `className`\n // (which renders a styled div). Unlike a bare styled div it scopes names rather than decorating,\n // and when a section's slots are all absent the whole frame hides anyway.\n kind = classifySectionSubtree(props.children, scopedPath, placed);\n } else {\n kind = SectionSubtreeKind.CONTENT;\n }\n }\n if (kind === SectionSubtreeKind.CONTENT) return SectionSubtreeKind.CONTENT;\n if (kind === SectionSubtreeKind.FIELD_SLOTS) sawFieldSlot = true;\n }\n return sawFieldSlot ? SectionSubtreeKind.FIELD_SLOTS : SectionSubtreeKind.NOTHING;\n}\n\n/**\n * True when `children` holds at least one field slot and nothing else. Fragments and declared containers\n * are looked through, and so is a plain element that wraps field slots.\n */\nexport function holdsOnlyFieldSlots(children: ReactNode): boolean {\n return classifySectionSubtree(children, '', []) === SectionSubtreeKind.FIELD_SLOTS;\n}\n\n/**\n * The field slots `children` places, or `null` when it holds anything besides field slots. Paths are\n * resolved the way `FormField` resolves them (scope names joined to the slot's `name`), starting from\n * `pathPrefix`. Read STATICALLY, from the elements, so a host can decide about a section whose content\n * is not mounted — an inactive tab's panel is not.\n */\nexport function listPlacedFieldSlots(children: ReactNode, pathPrefix = ''): PlacedFieldSlot[] | null {\n const placed: PlacedFieldSlot[] = [];\n return classifySectionSubtree(children, pathPrefix, placed) === SectionSubtreeKind.FIELD_SLOTS ? placed : null;\n}\n"]}
@@ -22,6 +22,12 @@ export interface WizardLayoutProps {
22
22
  * Children must be `<WizardStep>` components. Non-WizardStep children are
23
23
  * silently filtered out.
24
24
  *
25
+ * Under a resource form (a create or edit dialog or page) the wizard OWNS the form's footer: it claims it
26
+ * (`claimFooter`) and renders the host's Cancel, draft-save and operation-named submit inside its own
27
+ * navigation row — the submit on the last step only. Otherwise the host appended its own Cancel/Create row
28
+ * under the wizard's Previous/Next, so "Create" on step 1 submitted without the later steps ever being seen,
29
+ * and the last step offered two submit buttons.
30
+ *
25
31
  * @example
26
32
  * ```tsx
27
33
  * <FormLayout>
@@ -1 +1 @@
1
- {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/WizardLayout.tsx"],"names":[],"mappings":"AAEA,OAAc,EAA0C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBtF,MAAM,WAAW,iBAAiB;IAChC,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mGAAmG;IACnG,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,8EAA8E;IAC9E,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,WAAe,EACf,oBAA2B,EAC3B,YAAY,EACZ,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,GAAG,SAAS,CAkL/B"}
1
+ {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/WizardLayout.tsx"],"names":[],"mappings":"AAEA,OAAc,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAqBvG,MAAM,WAAW,iBAAiB;IAChC,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mGAAmG;IACnG,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,8EAA8E;IAC9E,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,WAAe,EACf,oBAA2B,EAC3B,YAAY,EACZ,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,GAAG,SAAS,CAyL/B"}