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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (685) hide show
  1. package/LICENSE +114 -26
  2. package/LICENSE.enterprise +129 -0
  3. package/dist/esm/companion-exports.d.ts +5 -2
  4. package/dist/esm/companion-exports.d.ts.map +1 -1
  5. package/dist/esm/companion-exports.js +4 -2
  6. package/dist/esm/companion-exports.js.map +1 -1
  7. package/dist/esm/components/actions/action-bar.d.ts +16 -1
  8. package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
  9. package/dist/esm/components/actions/action-bar.js.map +1 -1
  10. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
  11. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +6 -14
  12. package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
  13. package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts.map +1 -1
  14. package/dist/esm/components/app/AppLayout_DecisionInbox.js +2 -4
  15. package/dist/esm/components/app/AppLayout_DecisionInbox.js.map +1 -1
  16. package/dist/esm/components/app/AppLayout_Home.d.ts.map +1 -1
  17. package/dist/esm/components/app/AppLayout_Home.js +14 -7
  18. package/dist/esm/components/app/AppLayout_Home.js.map +1 -1
  19. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts +13 -0
  20. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts.map +1 -0
  21. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js +16 -0
  22. package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js.map +1 -0
  23. package/dist/esm/components/app/DecisionInboxSection.d.ts +10 -0
  24. package/dist/esm/components/app/DecisionInboxSection.d.ts.map +1 -0
  25. package/dist/esm/components/app/DecisionInboxSection.js +15 -0
  26. package/dist/esm/components/app/DecisionInboxSection.js.map +1 -0
  27. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts +13 -0
  28. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts.map +1 -0
  29. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js +28 -0
  30. package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js.map +1 -0
  31. package/dist/esm/components/app/IdentityPortalPage_Home.d.ts +10 -0
  32. package/dist/esm/components/app/IdentityPortalPage_Home.d.ts.map +1 -0
  33. package/dist/esm/components/app/IdentityPortalPage_Home.js +40 -0
  34. package/dist/esm/components/app/IdentityPortalPage_Home.js.map +1 -0
  35. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts +16 -0
  36. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts.map +1 -0
  37. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js +41 -0
  38. package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js.map +1 -0
  39. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts +15 -0
  40. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts.map +1 -0
  41. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js +268 -0
  42. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js.map +1 -0
  43. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts +3 -0
  44. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts.map +1 -0
  45. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js +35 -0
  46. package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js.map +1 -0
  47. package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
  48. package/dist/esm/components/auth/Auth_Main.js +5 -0
  49. package/dist/esm/components/auth/Auth_Main.js.map +1 -1
  50. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts +19 -0
  51. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts.map +1 -0
  52. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js +156 -0
  53. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js.map +1 -0
  54. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts +3 -0
  55. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts.map +1 -0
  56. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js +107 -0
  57. package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js.map +1 -0
  58. package/dist/esm/components/auth/StepUpAuthDialog.d.ts +31 -10
  59. package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
  60. package/dist/esm/components/auth/StepUpAuthDialog.js +81 -17
  61. package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
  62. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
  63. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +19 -0
  64. package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
  65. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts +11 -0
  66. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts.map +1 -0
  67. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js +25 -0
  68. package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js.map +1 -0
  69. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts +11 -0
  70. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts.map +1 -0
  71. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js +25 -0
  72. package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js.map +1 -0
  73. package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
  74. package/dist/esm/components/billing/billing-pricing-table.js +40 -7
  75. package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
  76. package/dist/esm/components/billing/billing-subscription-status.d.ts.map +1 -1
  77. package/dist/esm/components/billing/billing-subscription-status.js +9 -1
  78. package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
  79. package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
  80. package/dist/esm/components/billing/billing-usage-dashboard.js +3 -2
  81. package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
  82. package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -1
  83. package/dist/esm/components/compliance/EmbeddedSigningFrame.js +17 -6
  84. package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -1
  85. package/dist/esm/components/data-display/AutomaticDisplayer.d.ts.map +1 -1
  86. package/dist/esm/components/data-display/AutomaticDisplayer.js +7 -2
  87. package/dist/esm/components/data-display/AutomaticDisplayer.js.map +1 -1
  88. package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
  89. package/dist/esm/components/data-display/DisplayField.js +67 -45
  90. package/dist/esm/components/data-display/DisplayField.js.map +1 -1
  91. package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
  92. package/dist/esm/components/data-display/DisplayFieldEditable.js +4 -1
  93. package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
  94. package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
  95. package/dist/esm/components/data-display/DisplayValueDispatcher.js +16 -6
  96. package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
  97. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
  98. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +3 -1
  99. package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
  100. package/dist/esm/components/data-display/approval-seal.d.ts +7 -5
  101. package/dist/esm/components/data-display/approval-seal.d.ts.map +1 -1
  102. package/dist/esm/components/data-display/approval-seal.js +10 -4
  103. package/dist/esm/components/data-display/approval-seal.js.map +1 -1
  104. package/dist/esm/components/data-display/signature-requests.d.ts +81 -0
  105. package/dist/esm/components/data-display/signature-requests.d.ts.map +1 -0
  106. package/dist/esm/components/data-display/signature-requests.js +123 -0
  107. package/dist/esm/components/data-display/signature-requests.js.map +1 -0
  108. package/dist/esm/components/feedback/empty-state-marker.d.ts +16 -0
  109. package/dist/esm/components/feedback/empty-state-marker.d.ts.map +1 -0
  110. package/dist/esm/components/feedback/empty-state-marker.js +16 -0
  111. package/dist/esm/components/feedback/empty-state-marker.js.map +1 -0
  112. package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
  113. package/dist/esm/components/feedback/empty-state.js +2 -1
  114. package/dist/esm/components/feedback/empty-state.js.map +1 -1
  115. package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts +7 -1
  116. package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
  117. package/dist/esm/components/feedback/features/feature-unavailable-prompt.js +8 -2
  118. package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
  119. package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
  120. package/dist/esm/components/feedback/resource-empty-state.js +2 -1
  121. package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
  122. package/dist/esm/components/flows-actors/approval.d.ts +25 -1
  123. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  124. package/dist/esm/components/flows-actors/approval.js +22 -24
  125. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  126. package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
  127. package/dist/esm/components/flows-actors/approval.labels.js +30 -0
  128. package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
  129. package/dist/esm/components/flows-actors/flow-node.labels.d.ts.map +1 -1
  130. package/dist/esm/components/flows-actors/flow-node.labels.js +4 -1
  131. package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
  132. package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -1
  133. package/dist/esm/components/flows-actors/flow-step-visuals.js +8 -2
  134. package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -1
  135. package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -1
  136. package/dist/esm/components/flows-actors/human-decision-form.js +4 -1
  137. package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -1
  138. package/dist/esm/components/form/Form.d.ts +2 -0
  139. package/dist/esm/components/form/Form.d.ts.map +1 -1
  140. package/dist/esm/components/form/Form.js +1 -0
  141. package/dist/esm/components/form/Form.js.map +1 -1
  142. package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
  143. package/dist/esm/components/form/automated/AutomatedArrayField.js +7 -4
  144. package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
  145. package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
  146. package/dist/esm/components/form/automated/AutosaveContext.js +8 -0
  147. package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
  148. package/dist/esm/components/form/automated/FormField.d.ts +5 -3
  149. package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
  150. package/dist/esm/components/form/automated/FormField.js +38 -13
  151. package/dist/esm/components/form/automated/FormField.js.map +1 -1
  152. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +1 -1
  153. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
  154. package/dist/esm/components/form/automated/ResourceAutomatedForm.js +75 -47
  155. package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
  156. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
  157. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js +1 -1
  158. package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
  159. package/dist/esm/components/form/validation-errors/form-validation.d.ts +5 -7
  160. package/dist/esm/components/form/validation-errors/form-validation.d.ts.map +1 -1
  161. package/dist/esm/components/form/validation-errors/form-validation.js +7 -22
  162. package/dist/esm/components/form/validation-errors/form-validation.js.map +1 -1
  163. package/dist/esm/components/form/validation-errors/getFieldError.d.ts +25 -2
  164. package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
  165. package/dist/esm/components/form/validation-errors/getFieldError.js +29 -2
  166. package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
  167. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +5 -0
  168. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
  169. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +3 -0
  170. package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
  171. package/dist/esm/components/form/validation-errors/save-attempt.d.ts +9 -0
  172. package/dist/esm/components/form/validation-errors/save-attempt.d.ts.map +1 -0
  173. package/dist/esm/components/form/validation-errors/save-attempt.js +42 -0
  174. package/dist/esm/components/form/validation-errors/save-attempt.js.map +1 -0
  175. package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts +3 -1
  176. package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts.map +1 -1
  177. package/dist/esm/components/form/validation-errors/unstarted-field-visit.js +3 -1
  178. package/dist/esm/components/form/validation-errors/unstarted-field-visit.js.map +1 -1
  179. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +2 -2
  180. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -1
  181. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +3 -0
  182. package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -1
  183. package/dist/esm/components/navigation/NavigationItemBadge.d.ts +16 -0
  184. package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
  185. package/dist/esm/components/navigation/NavigationItemBadge.js +14 -2
  186. package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
  187. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +3 -3
  188. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +3 -3
  189. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
  190. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts +5 -13
  191. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
  192. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +30 -255
  193. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
  194. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts +22 -1
  195. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
  196. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +57 -26
  197. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
  198. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts +1 -1
  199. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
  200. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +40 -4
  201. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
  202. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts +1 -1
  203. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
  204. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +26 -4
  205. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
  206. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts +31 -0
  207. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts.map +1 -0
  208. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js +42 -0
  209. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js.map +1 -0
  210. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts +76 -0
  211. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts.map +1 -0
  212. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js +268 -0
  213. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js.map +1 -0
  214. package/dist/esm/components/navigation/command.d.ts +5 -0
  215. package/dist/esm/components/navigation/command.d.ts.map +1 -1
  216. package/dist/esm/components/navigation/command.js.map +1 -1
  217. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +19 -0
  218. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
  219. package/dist/esm/components/resources/ResourceLayout_DangerZone.js +51 -12
  220. package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
  221. package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
  222. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +21 -7
  223. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
  224. package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
  225. package/dist/esm/components/resources/ResourceLayout_List.js +17 -7
  226. package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
  227. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +1 -1
  228. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
  229. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +4 -1
  230. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
  231. package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
  232. package/dist/esm/components/resources/ResourceLayout_Search.js +12 -8
  233. package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
  234. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts +1 -1
  235. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts.map +1 -1
  236. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js +11 -4
  237. package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js.map +1 -1
  238. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.d.ts.map +1 -1
  239. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js +4 -1
  240. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js.map +1 -1
  241. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.d.ts.map +1 -1
  242. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js +4 -1
  243. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js.map +1 -1
  244. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.d.ts.map +1 -1
  245. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js +4 -1
  246. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js.map +1 -1
  247. package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +1 -1
  248. package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
  249. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +5 -5
  250. package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
  251. package/dist/esm/components/resources/embeds/ResourceEmbeds.js +21 -14
  252. package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
  253. package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
  254. package/dist/esm/components/resources/skeleton/DisplayLayout.js +40 -4
  255. package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
  256. package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
  257. package/dist/esm/components/resources/skeleton/FormLayout.js +22 -6
  258. package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
  259. package/dist/esm/components/resources/skeleton/Group.d.ts.map +1 -1
  260. package/dist/esm/components/resources/skeleton/Group.js +4 -1
  261. package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
  262. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +1 -1
  263. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +1 -1
  264. package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
  265. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +21 -1
  266. package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
  267. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +53 -9
  268. package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
  269. package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
  270. package/dist/esm/components/sections/ContentSectionContainer.js +11 -7
  271. package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
  272. package/dist/esm/components/sections/content-section.d.ts +1 -3
  273. package/dist/esm/components/sections/content-section.d.ts.map +1 -1
  274. package/dist/esm/components/sections/content-section.js.map +1 -1
  275. package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -1
  276. package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +2 -1
  277. package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -1
  278. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +12 -0
  279. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
  280. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +28 -6
  281. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
  282. package/dist/esm/components/settings/SettingsHub.d.ts +15 -0
  283. package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
  284. package/dist/esm/components/settings/SettingsHub.js +14 -4
  285. package/dist/esm/components/settings/SettingsHub.js.map +1 -1
  286. package/dist/esm/components/typography/document-heading-level.d.ts +28 -0
  287. package/dist/esm/components/typography/document-heading-level.d.ts.map +1 -0
  288. package/dist/esm/components/typography/document-heading-level.js +63 -0
  289. package/dist/esm/components/typography/document-heading-level.js.map +1 -0
  290. package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts +3 -2
  291. package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts.map +1 -1
  292. package/dist/esm/components/views/chart-dashboard/ChartDashboard.js +4 -3
  293. package/dist/esm/components/views/chart-dashboard/ChartDashboard.js.map +1 -1
  294. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts +1 -1
  295. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts.map +1 -1
  296. package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.js.map +1 -1
  297. package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts +33 -0
  298. package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts.map +1 -1
  299. package/dist/esm/components/views/chart-view/ChartKpiFigure.js +63 -4
  300. package/dist/esm/components/views/chart-view/ChartKpiFigure.js.map +1 -1
  301. package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
  302. package/dist/esm/components/views/chart-view/ChartView.js +52 -22
  303. package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
  304. package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
  305. package/dist/esm/components/views/chart-view/ChartView.labels.js +76 -3
  306. package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
  307. package/dist/esm/components/views/chart-view/ChartView.lazy.d.ts.map +1 -1
  308. package/dist/esm/components/views/chart-view/ChartView.lazy.js +2 -1
  309. package/dist/esm/components/views/chart-view/ChartView.lazy.js.map +1 -1
  310. package/dist/esm/components/views/chart-view/ChartWidget.d.ts.map +1 -1
  311. package/dist/esm/components/views/chart-view/ChartWidget.js +12 -4
  312. package/dist/esm/components/views/chart-view/ChartWidget.js.map +1 -1
  313. package/dist/esm/components/views/chart-view/chart-export.utils.d.ts +8 -0
  314. package/dist/esm/components/views/chart-view/chart-export.utils.d.ts.map +1 -1
  315. package/dist/esm/components/views/chart-view/chart-export.utils.js +15 -25
  316. package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
  317. package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts +6 -0
  318. package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts.map +1 -0
  319. package/dist/esm/components/views/chart-view/chart-view-defaults.js +6 -0
  320. package/dist/esm/components/views/chart-view/chart-view-defaults.js.map +1 -0
  321. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +47 -12
  322. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
  323. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +87 -32
  324. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
  325. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
  326. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +8 -8
  327. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
  328. package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js +1 -1
  329. package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js.map +1 -1
  330. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.d.ts.map +1 -1
  331. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js +7 -3
  332. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js.map +1 -1
  333. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.d.ts.map +1 -1
  334. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js +6 -2
  335. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js.map +1 -1
  336. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.d.ts.map +1 -1
  337. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +8 -2
  338. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
  339. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.d.ts.map +1 -1
  340. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js +13 -9
  341. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js.map +1 -1
  342. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts +1 -1
  343. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
  344. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +9 -8
  345. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
  346. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.d.ts.map +1 -1
  347. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js +2 -1
  348. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js.map +1 -1
  349. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts +1 -1
  350. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
  351. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +10 -11
  352. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
  353. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.d.ts.map +1 -1
  354. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js +2 -1
  355. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js.map +1 -1
  356. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.d.ts.map +1 -1
  357. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js +5 -1
  358. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js.map +1 -1
  359. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
  360. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +7 -3
  361. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
  362. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts.map +1 -1
  363. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js +13 -13
  364. package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
  365. package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +1 -1
  366. package/dist/esm/components/views/chart-view/useResourceChartData.js +1 -1
  367. package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -1
  368. package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
  369. package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
  370. package/dist/esm/components/views/composite-view/CompositeView.js +6 -2
  371. package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
  372. package/dist/esm/components/views/execution-view/ExecutionView.d.ts +7 -0
  373. package/dist/esm/components/views/execution-view/ExecutionView.d.ts.map +1 -1
  374. package/dist/esm/components/views/execution-view/ExecutionView.js +11 -1
  375. package/dist/esm/components/views/execution-view/ExecutionView.js.map +1 -1
  376. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +7 -0
  377. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
  378. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +6 -2
  379. package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
  380. package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts +7 -0
  381. package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts.map +1 -1
  382. package/dist/esm/components/views/full-custom-view/FullCustomView.js +8 -3
  383. package/dist/esm/components/views/full-custom-view/FullCustomView.js.map +1 -1
  384. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts +7 -0
  385. package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
  386. package/dist/esm/components/views/onboarding-view/OnboardingView.js +11 -1
  387. package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
  388. package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +2 -2
  389. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +2 -2
  390. package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
  391. package/dist/esm/core/app-shell/app-shell.schemas.d.ts +87 -16
  392. package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
  393. package/dist/esm/core/app-shell/app-shell.schemas.js +16 -0
  394. package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
  395. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +4 -4
  396. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +3 -3
  397. package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
  398. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts +45 -0
  399. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts.map +1 -0
  400. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js +72 -0
  401. package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js.map +1 -0
  402. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +4 -3
  403. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
  404. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +4 -3
  405. package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
  406. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -8
  407. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
  408. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +22 -21
  409. package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
  410. package/dist/esm/core/billing/BillingContext.d.ts +27 -4
  411. package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
  412. package/dist/esm/core/billing/BillingContext.js +61 -2
  413. package/dist/esm/core/billing/BillingContext.js.map +1 -1
  414. package/dist/esm/core/billing/useBillingAction.d.ts.map +1 -1
  415. package/dist/esm/core/billing/useBillingAction.js +3 -2
  416. package/dist/esm/core/billing/useBillingAction.js.map +1 -1
  417. package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts +19 -0
  418. package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts.map +1 -0
  419. package/dist/esm/core/components-registry/RegisteredComponentRoot.js +23 -0
  420. package/dist/esm/core/components-registry/RegisteredComponentRoot.js.map +1 -0
  421. package/dist/esm/core/components-registry/register-framework-layouts.d.ts.map +1 -1
  422. package/dist/esm/core/components-registry/register-framework-layouts.js +4 -0
  423. package/dist/esm/core/components-registry/register-framework-layouts.js.map +1 -1
  424. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +159 -0
  425. package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
  426. package/dist/esm/core/config/app-configuration-frontend.schemas.js +68 -3
  427. package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
  428. package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +2 -2
  429. package/dist/esm/core/config/app-level-components.frontend.schemas.js +2 -2
  430. package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
  431. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +59 -18
  432. package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
  433. package/dist/esm/core/config/chart-view.frontend.schemas.js +42 -7
  434. package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
  435. package/dist/esm/core/config/composite-view.schemas.d.ts +8 -1
  436. package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
  437. package/dist/esm/core/config/composite-view.schemas.js +1 -0
  438. package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
  439. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +1 -1
  440. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -1
  441. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +1 -1
  442. package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -1
  443. package/dist/esm/core/config/engine-settings-destinations.d.ts +6 -0
  444. package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
  445. package/dist/esm/core/config/engine-settings-destinations.js +12 -0
  446. package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
  447. package/dist/esm/core/config/execution-view.schemas.d.ts +1 -1
  448. package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
  449. package/dist/esm/core/config/identity-portal-settings.frontend.d.ts +17 -0
  450. package/dist/esm/core/config/identity-portal-settings.frontend.d.ts.map +1 -0
  451. package/dist/esm/core/config/identity-portal-settings.frontend.js +64 -0
  452. package/dist/esm/core/config/identity-portal-settings.frontend.js.map +1 -0
  453. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -8
  454. package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
  455. package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
  456. package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +1 -1
  457. package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts.map +1 -1
  458. package/dist/esm/core/config/settings-hub-gating.frontend.utils.js +1 -1
  459. package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
  460. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +17 -6
  461. package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
  462. package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
  463. package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
  464. package/dist/esm/core/config/useSettingsHubConfig.js +1 -0
  465. package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
  466. package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +7 -0
  467. package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
  468. package/dist/esm/core/config/useVisibleSettingsHubConfig.js +9 -1
  469. package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
  470. package/dist/esm/core/config/verify-launcher-content.d.ts +7 -1
  471. package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
  472. package/dist/esm/core/config/verify-launcher-content.js +31 -0
  473. package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
  474. package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
  475. package/dist/esm/core/errors/GlobalErrorHandler.js +10 -0
  476. package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
  477. package/dist/esm/core/errors/backend-refusal.frontend.d.ts +1 -1
  478. package/dist/esm/core/errors/backend-refusal.frontend.d.ts.map +1 -1
  479. package/dist/esm/core/errors/backend-refusal.frontend.js.map +1 -1
  480. package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
  481. package/dist/esm/core/events/NotificationContext.js +19 -2
  482. package/dist/esm/core/events/NotificationContext.js.map +1 -1
  483. package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts +21 -2
  484. package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts.map +1 -1
  485. package/dist/esm/core/events/notification-display-policy.frontend.schemas.js +25 -4
  486. package/dist/esm/core/events/notification-display-policy.frontend.schemas.js.map +1 -1
  487. package/dist/esm/core/execution/useExecution.d.ts +3 -3
  488. package/dist/esm/core/execution/useExecution.js.map +1 -1
  489. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +1 -1
  490. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +1 -1
  491. package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -1
  492. package/dist/esm/core/features/FeatureGate.d.ts +13 -1
  493. package/dist/esm/core/features/FeatureGate.d.ts.map +1 -1
  494. package/dist/esm/core/features/FeatureGate.js +6 -1
  495. package/dist/esm/core/features/FeatureGate.js.map +1 -1
  496. package/dist/esm/core/features/InPlaceFeatureLock.d.ts +28 -0
  497. package/dist/esm/core/features/InPlaceFeatureLock.d.ts.map +1 -0
  498. package/dist/esm/core/features/InPlaceFeatureLock.js +49 -0
  499. package/dist/esm/core/features/InPlaceFeatureLock.js.map +1 -0
  500. package/dist/esm/core/features/PlanRefusalPrompt.d.ts +12 -0
  501. package/dist/esm/core/features/PlanRefusalPrompt.d.ts.map +1 -0
  502. package/dist/esm/core/features/PlanRefusalPrompt.js +90 -0
  503. package/dist/esm/core/features/PlanRefusalPrompt.js.map +1 -0
  504. package/dist/esm/core/features/RequiredFeaturesGate.d.ts +39 -0
  505. package/dist/esm/core/features/RequiredFeaturesGate.d.ts.map +1 -0
  506. package/dist/esm/core/features/RequiredFeaturesGate.js +51 -0
  507. package/dist/esm/core/features/RequiredFeaturesGate.js.map +1 -0
  508. package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts +6 -0
  509. package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts.map +1 -1
  510. package/dist/esm/core/features/feature-unavailability.frontend.utils.js +27 -10
  511. package/dist/esm/core/features/feature-unavailability.frontend.utils.js.map +1 -1
  512. package/dist/esm/core/features/plan-refusal.frontend.d.ts +43 -0
  513. package/dist/esm/core/features/plan-refusal.frontend.d.ts.map +1 -0
  514. package/dist/esm/core/features/plan-refusal.frontend.js +67 -0
  515. package/dist/esm/core/features/plan-refusal.frontend.js.map +1 -0
  516. package/dist/esm/core/features/required-features-gate-presentation.d.ts +21 -0
  517. package/dist/esm/core/features/required-features-gate-presentation.d.ts.map +1 -0
  518. package/dist/esm/core/features/required-features-gate-presentation.js +26 -0
  519. package/dist/esm/core/features/required-features-gate-presentation.js.map +1 -0
  520. package/dist/esm/core/features/useFeatureAvailability.d.ts.map +1 -1
  521. package/dist/esm/core/features/useFeatureAvailability.js +4 -0
  522. package/dist/esm/core/features/useFeatureAvailability.js.map +1 -1
  523. package/dist/esm/core/features/useOperationFeatureAvailability.d.ts +2 -0
  524. package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
  525. package/dist/esm/core/features/useOperationFeatureAvailability.js +6 -1
  526. package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
  527. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +11 -0
  528. package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
  529. package/dist/esm/core/flows-actors/FlowsActorsContext.js +117 -3
  530. package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
  531. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.d.ts.map +1 -1
  532. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js +3 -1
  533. package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js.map +1 -1
  534. package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
  535. package/dist/esm/core/navigation/NavigationContentAreas.js +28 -9
  536. package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
  537. package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.d.ts → core/navigation/chart-read-gate.d.ts} +11 -7
  538. package/dist/esm/core/navigation/chart-read-gate.d.ts.map +1 -0
  539. package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.js → core/navigation/chart-read-gate.js} +27 -11
  540. package/dist/esm/core/navigation/chart-read-gate.js.map +1 -0
  541. package/dist/esm/core/navigation/home-resolution.d.ts +36 -0
  542. package/dist/esm/core/navigation/home-resolution.d.ts.map +1 -0
  543. package/dist/esm/core/navigation/home-resolution.js +46 -0
  544. package/dist/esm/core/navigation/home-resolution.js.map +1 -0
  545. package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -34
  546. package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
  547. package/dist/esm/core/navigation/launcher-resolution.js +13 -18
  548. package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
  549. package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +1 -1
  550. package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
  551. package/dist/esm/core/navigation/launcher-runtime-availability.js +7 -2
  552. package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
  553. package/dist/esm/core/navigation/primary-destination-layout.d.ts +2 -2
  554. package/dist/esm/core/navigation/primary-destination-layout.d.ts.map +1 -1
  555. package/dist/esm/core/navigation/primary-destination-layout.js +1 -1
  556. package/dist/esm/core/navigation/primary-destination-layout.js.map +1 -1
  557. package/dist/esm/core/navigation/useChartReadDecision.d.ts +26 -0
  558. package/dist/esm/core/navigation/useChartReadDecision.d.ts.map +1 -0
  559. package/dist/esm/core/navigation/useChartReadDecision.js +58 -0
  560. package/dist/esm/core/navigation/useChartReadDecision.js.map +1 -0
  561. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts +1 -1
  562. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts.map +1 -1
  563. package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.js.map +1 -1
  564. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +1 -1
  565. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -1
  566. package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -1
  567. package/dist/esm/core/navigation/view-title-resolution.d.ts +21 -0
  568. package/dist/esm/core/navigation/view-title-resolution.d.ts.map +1 -1
  569. package/dist/esm/core/navigation/view-title-resolution.js +25 -0
  570. package/dist/esm/core/navigation/view-title-resolution.js.map +1 -1
  571. package/dist/esm/core/navigation/viewer-field-reader.d.ts +81 -0
  572. package/dist/esm/core/navigation/viewer-field-reader.d.ts.map +1 -0
  573. package/dist/esm/core/navigation/viewer-field-reader.js +113 -0
  574. package/dist/esm/core/navigation/viewer-field-reader.js.map +1 -0
  575. package/dist/esm/core/navigation/viewer-roles.d.ts +40 -0
  576. package/dist/esm/core/navigation/viewer-roles.d.ts.map +1 -0
  577. package/dist/esm/core/navigation/viewer-roles.js +26 -0
  578. package/dist/esm/core/navigation/viewer-roles.js.map +1 -0
  579. package/dist/esm/core/requests/user-interaction-clock.d.ts +32 -0
  580. package/dist/esm/core/requests/user-interaction-clock.d.ts.map +1 -0
  581. package/dist/esm/core/requests/user-interaction-clock.js +47 -0
  582. package/dist/esm/core/requests/user-interaction-clock.js.map +1 -0
  583. package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
  584. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +2 -0
  585. package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
  586. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +66 -10
  587. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
  588. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +63 -8
  589. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
  590. package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
  591. package/dist/esm/core/requests/wildo-http-client.frontend.service.js +13 -0
  592. package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
  593. package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
  594. package/dist/esm/core/resources/hooks/useOperationEnabled.js +45 -3
  595. package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
  596. package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +1 -1
  597. package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts.map +1 -1
  598. package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
  599. package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
  600. package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
  601. package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
  602. package/dist/esm/core/resources/resources.frontend.schemas.d.ts +29 -23
  603. package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
  604. package/dist/esm/core/resources/resources.frontend.schemas.js +20 -20
  605. package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
  606. package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
  607. package/dist/esm/core/resources/rmm/ResourceMutationManager.js +4 -0
  608. package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
  609. package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
  610. package/dist/esm/core/resources/useResourceOperationActions.js +7 -7
  611. package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
  612. package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
  613. package/dist/esm/core/runtime/AppRouter.js +11 -33
  614. package/dist/esm/core/runtime/AppRouter.js.map +1 -1
  615. package/dist/esm/core/runtime/ApplicationMainContext.d.ts +15 -1
  616. package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
  617. package/dist/esm/core/runtime/ApplicationMainContext.js +41 -23
  618. package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
  619. package/dist/esm/core/runtime/IdentityPortalRouter.d.ts +20 -0
  620. package/dist/esm/core/runtime/IdentityPortalRouter.d.ts.map +1 -0
  621. package/dist/esm/core/runtime/IdentityPortalRouter.js +31 -0
  622. package/dist/esm/core/runtime/IdentityPortalRouter.js.map +1 -0
  623. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +9 -0
  624. package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
  625. package/dist/esm/core/runtime/domain-module.frontend.definitions.js +3 -2
  626. package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
  627. package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts +21 -0
  628. package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts.map +1 -1
  629. package/dist/esm/core/runtime/frontend-companion-resource-inputs.js +19 -1
  630. package/dist/esm/core/runtime/frontend-companion-resource-inputs.js.map +1 -1
  631. package/dist/esm/core/runtime/identity-routes.d.ts +13 -0
  632. package/dist/esm/core/runtime/identity-routes.d.ts.map +1 -0
  633. package/dist/esm/core/runtime/identity-routes.js +50 -0
  634. package/dist/esm/core/runtime/identity-routes.js.map +1 -0
  635. package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -0
  636. package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
  637. package/dist/esm/core/runtime/routes.frontend.definitions.js +20 -1
  638. package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
  639. package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts +3 -1
  640. package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts.map +1 -1
  641. package/dist/esm/core/runtime/runtime.frontend.schemas.js +2 -0
  642. package/dist/esm/core/runtime/runtime.frontend.schemas.js.map +1 -1
  643. package/dist/esm/core/runtime/start-application.frontend.service.d.ts +7 -0
  644. package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
  645. package/dist/esm/core/runtime/start-application.frontend.service.js +4 -2
  646. package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
  647. package/dist/esm/core/search/command-score.d.ts +33 -0
  648. package/dist/esm/core/search/command-score.d.ts.map +1 -0
  649. package/dist/esm/core/search/command-score.js +109 -0
  650. package/dist/esm/core/search/command-score.js.map +1 -0
  651. package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
  652. package/dist/esm/core/security/AuthSessionContext.js +4 -0
  653. package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
  654. package/dist/esm/core/security/StepUpAuthContext.d.ts +3 -2
  655. package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
  656. package/dist/esm/core/security/StepUpAuthContext.js +7 -2
  657. package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
  658. package/dist/esm/core/security/federated-reauthentication.frontend.d.ts +13 -2
  659. package/dist/esm/core/security/federated-reauthentication.frontend.d.ts.map +1 -1
  660. package/dist/esm/core/security/federated-reauthentication.frontend.js +21 -1
  661. package/dist/esm/core/security/federated-reauthentication.frontend.js.map +1 -1
  662. package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts +24 -0
  663. package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts.map +1 -0
  664. package/dist/esm/core/security/useAuthenticatedRouteEntry.js +37 -0
  665. package/dist/esm/core/security/useAuthenticatedRouteEntry.js.map +1 -0
  666. package/dist/esm/core/ui/design-token.utils.d.ts +9 -0
  667. package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
  668. package/dist/esm/core/ui/design-token.utils.js +24 -3
  669. package/dist/esm/core/ui/design-token.utils.js.map +1 -1
  670. package/dist/esm/core/ui/themes/focus-indicator.d.ts +1 -1
  671. package/dist/esm/core/ui/themes/focus-indicator.js +1 -1
  672. package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -1
  673. package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
  674. package/dist/esm/index.d.ts +19 -1
  675. package/dist/esm/index.d.ts.map +1 -1
  676. package/dist/esm/index.js +22 -1
  677. package/dist/esm/index.js.map +1 -1
  678. package/dist/esm/testing/mock-builders.d.ts +1 -1
  679. package/dist/esm/testing/mock-builders.d.ts.map +1 -1
  680. package/dist/esm/testing/mock-builders.js +1 -0
  681. package/dist/esm/testing/mock-builders.js.map +1 -1
  682. package/dist/tsconfig.build.tsbuildinfo +1 -1
  683. package/package.json +9 -6
  684. package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.d.ts.map +0 -1
  685. package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ConsentBasedProviderSdks.js","sourceRoot":"","sources":["../../../../src/core/external-providers/ConsentBasedProviderSdks.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,EACL,4BAA4B,EAC5B,iCAAiC,EACjC,uCAAuC,GAExC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,wBAAwB,EAAuB,MAAM,sCAAsC,CAAC;AACnJ,OAAO,EAAE,kBAAkB,E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CAAC;QACF,oGAAoG;IACtG,CAAC,EAAE,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC,CAAC;IAE/B,OAAO,CACL,KAAC,sCAAsC,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,YAChE,QAAQ,GACuC,CACnD,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * The application's SECOND activation phase: providers that rest on a consent purpose (#1704).\n *\n * ## Why startup cannot do this\n *\n * `startApplication` activates provider SDKs before any person is known, so it passes no grant and starts\n * only the providers that rest on no purpose (error monitoring, pickers). A provider that rests on\n * `ConsentPurpose.ANALYTICS` could therefore never start on the application tier — the consent module had\n * always said such a provider \"must be activated by a consumer that holds the person's granted purposes\",\n * and no such consumer existed. This is it.\n *\n * ## Where the grant comes from, and what revokes it\n *\n * The signed-in person's `privacy.consentedPurposes`, published on `USER_PREFERENCES_CHANGED` — the same\n * stream `AnalyticsContext` has always gated on, with the same rule: `privacy: null` (sign-out, or an\n * identity with no preferences) REVOKES — sign-out publishes it, so a browser a person signed out of never\n * keeps their consent running for whoever uses it next — and an empty set is a real withdrawal. Until\n * preferences arrive nothing is granted, which is why pre-authentication pages start none.\n *\n * ## Start and stop\n *\n * The providers are (re)started when the granted subset of the purposes THEY rest on changes, so granting a\n * purpose none of them uses restarts nothing; granting or withdrawing one they use restarts all of them.\n * Every activation goes through `activateFrontendProviderSdks` — which refuses a consent-based provider that\n * could not be stopped — and every withdrawal, sign-out or unmount calls `deactivateAll`, which is the only\n * thing that stops a vendor already running in the page.\n *\n * Starts and stops are SERIALISED through `createFrontendProviderSdkActivationLane`, the one lane every consent-based\n * consumer holds (the website's is the other): a new start waits until the previous one has fully stopped. A vendor SDK is\n * usually a page-global singleton, so a stop that finished after the next start (a person who grants, withdraws\n * and grants again while the vendor bundle is still downloading) would switch off the client that had just been\n * published as running.\n *\n * ## No second audit trail\n *\n * The consent DECISION is the audited preference write (`consentedPurposes` on the person's preferences,\n * read by the resource-operation audit emission). Starting or stopping an SDK here is a consequence of that\n * decision, not a decision, so it records nothing of its own: a second trail would only be able to\n * disagree with the first.\n */\n\nimport React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n activateFrontendProviderSdks,\n consentPurposesRequiredByProvider,\n createFrontendProviderSdkActivationLane,\n type ProviderFrontendSdkActivation,\n} from '@wildo-ai/external-connectors-public/app';\nimport { AppFrontendType, BUILTIN_PROVIDER_CAPABILITY, normalizeConsentPurposes, type ConsentPurpose } from '@wildo-ai/saas-models/public-runtime';\nimport { ApplicationContext } from '~wildo-frontend-lib/core/runtime/ApplicationContext.shared';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\n\n/** One running consent-based provider: its ref, the capabilities it serves, and its activation. */\nexport interface ConsentBasedProviderActivation {\n readonly providerRef: string;\n readonly providerCapabilities: ReadonlyArray<string>;\n readonly activation: ProviderFrontendSdkActivation;\n}\n\n/** @wildo_source:part:start saas.frontend.consent-based-provider-activation facet:layer:frontend facet:audience:app-developer */\n/**\n * The consent-based providers currently RUNNING on the application, in registry order (#1704).\n *\n * Empty until the signed-in person grants the purposes a provider rests on, and emptied again on withdrawal or\n * sign-out — immediately, before the providers' `deactivate` has finished. A consumer that dispatches to a\n * provider (`AnalyticsContext` does, for `FRONTEND_PRODUCT_ANALYTICS`) reads this and never holds a handle past it.\n */\nexport function useConsentBasedProviderActivations(): ReadonlyArray<ConsentBasedProviderActivation> {\n return useContext(ConsentBasedProviderActivationsContext);\n}\n/** @wildo_source:part:end saas.frontend.consent-based-provider-activation */\n\nexport const ConsentBasedProviderActivationsContext = createContext<ReadonlyArray<ConsentBasedProviderActivation>>([]);\n\nconst logger: LoggerFrontendService = LoggerFrontendService.getLogger();\n\nfunction grantedKey(purposes: readonly ConsentPurpose[]): string {\n return [...purposes].sort().join(',');\n}\n\nexport const ConsentBasedProviderSdksProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n const appContext = useContext(ApplicationContext);\n const registry = appContext?.frontendProviderRegistry;\n const { on } = useEventBus();\n\n // `null` = nothing said yet; an empty array is a recorded withdrawal. Both start nothing.\n const [grantedPurposes, setGrantedPurposes] = useState<readonly ConsentPurpose[] | null>(null);\n const [activations, setActivations] = useState<ReadonlyArray<ConsentBasedProviderActivation>>([]);\n // One lane for this consumer's lifetime: a start waits for the previous stop.\n const lane = useRef(createFrontendProviderSdkActivationLane());\n\n useEffect(() => on(FrontendEvents.USER_PREFERENCES_CHANGED, (payload) => {\n if (payload.privacy === null) {\n setGrantedPurposes([]);\n return;\n }\n const purposes = payload.privacy?.consentedPurposes;\n if (purposes !== undefined) setGrantedPurposes(normalizeConsentPurposes(purposes));\n }), [on]);\n\n // `analytics.enabled` is the application's master switch for product analytics: with it off, a vendor analytics\n // client is not even loaded on a grant — loading it would already send PostHog a flags request and write its ids,\n // for events that would then never be dispatched to it.\n const analyticsEnabled = appContext?.appConfig?.analytics?.enabled === true;\n const consentBasedModules = useMemo(\n () => (registry?.listAll() ?? []).filter((module) => consentPurposesRequiredByProvider(module).length > 0\n && (analyticsEnabled || !module.providerCapabilities.includes(BUILTIN_PROVIDER_CAPABILITY.FRONTEND_PRODUCT_ANALYTICS))),\n [registry, analyticsEnabled],\n );\n // Only the purposes these providers rest on, so an unrelated grant does not restart a running client.\n const relevantGranted = useMemo(() => {\n const granted = grantedPurposes ?? [];\n const required = new Set(consentBasedModules.flatMap((module) => consentPurposesRequiredByProvider(module)));\n return granted.filter((purpose) => required.has(purpose));\n }, [consentBasedModules, grantedPurposes]);\n const key = grantedKey(relevantGranted);\n\n useEffect(() => {\n if (consentBasedModules.length === 0 || relevantGranted.length === 0) {\n setActivations([]);\n return;\n }\n // Serialised through the lane — see \"Start and stop\" above.\n const stop = lane.current.start(\n () => activateFrontendProviderSdks({\n surface: AppFrontendType.SAAS_APP,\n modules: consentBasedModules,\n grantedConsentPurposes: relevantGranted,\n onDiagnostic: (diagnostic) => {\n logger.warn('Consent-based frontend provider activation diagnostic', {\n kind: diagnostic.kind,\n providerRef: diagnostic.providerRef,\n message: diagnostic.message,\n });\n },\n }),\n (result) => {\n setActivations(consentBasedModules.flatMap((module) => {\n const activation = result.activations.get(module.metadata.ref);\n return activation === undefined\n ? []\n : [{ providerRef: module.metadata.ref, providerCapabilities: [...module.providerCapabilities], activation }];\n }));\n },\n );\n\n return () => {\n // Withdrawn from consumers at once, so nothing dispatches to a client that is being stopped.\n setActivations([]);\n stop();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by the granted SET, see grantedKey.\n }, [consentBasedModules, key]);\n\n return (\n <ConsentBasedProviderActivationsContext.Provider value={activations}>\n {children}\n </ConsentBasedProviderActivationsContext.Provider>\n );\n};\n"]}
1
+ {"version":3,"file":"ConsentBasedProviderSdks.js","sourceRoot":"","sources":["../../../../src/core/external-providers/ConsentBasedProviderSdks.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,EACL,4BAA4B,EAC5B,iCAAiC,EACjC,uCAAuC,GAExC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,wBAAwB,EAAuB,MAAM,sCAAsC,CAAC;AACnJ,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AASpG,iIAAiI;AACjI;;;;;;GAMG;AACH,MAAM,UAAU,kCAAkC;IAChD,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ose (#1704).\n *\n * ## Why startup cannot do this\n *\n * `startApplication` activates provider SDKs before any person is known, so it passes no grant and starts\n * only the providers that rest on no purpose (error monitoring, pickers). A provider that rests on\n * `ConsentPurpose.ANALYTICS` could therefore never start on the application tier — the consent module had\n * always said such a provider \"must be activated by a consumer that holds the person's granted purposes\",\n * and no such consumer existed. This is it.\n *\n * ## Where the grant comes from, and what revokes it\n *\n * The signed-in person's `privacy.consentedPurposes`, published on `USER_PREFERENCES_CHANGED` — the same\n * stream `AnalyticsContext` has always gated on, with the same rule: `privacy: null` (sign-out, or an\n * identity with no preferences) REVOKES — sign-out publishes it, so a browser a person signed out of never\n * keeps their consent running for whoever uses it next — and an empty set is a real withdrawal. Until\n * preferences arrive nothing is granted, which is why pre-authentication pages start none.\n *\n * ## Start and stop\n *\n * The providers are (re)started when the granted subset of the purposes THEY rest on changes, so granting a\n * purpose none of them uses restarts nothing; granting or withdrawing one they use restarts all of them.\n * Every activation goes through `activateFrontendProviderSdks` — which refuses a consent-based provider that\n * could not be stopped — and every withdrawal, sign-out or unmount calls `deactivateAll`, which is the only\n * thing that stops a vendor already running in the page.\n *\n * Starts and stops are SERIALISED through `createFrontendProviderSdkActivationLane`, the one lane every consent-based\n * consumer holds (the website's is the other): a new start waits until the previous one has fully stopped. A vendor SDK is\n * usually a page-global singleton, so a stop that finished after the next start (a person who grants, withdraws\n * and grants again while the vendor bundle is still downloading) would switch off the client that had just been\n * published as running.\n *\n * ## No second audit trail\n *\n * The consent DECISION is the audited preference write (`consentedPurposes` on the person's preferences,\n * read by the resource-operation audit emission). Starting or stopping an SDK here is a consequence of that\n * decision, not a decision, so it records nothing of its own: a second trail would only be able to\n * disagree with the first.\n */\n\nimport React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n activateFrontendProviderSdks,\n consentPurposesRequiredByProvider,\n createFrontendProviderSdkActivationLane,\n type ProviderFrontendSdkActivation,\n} from '@wildo-ai/external-connectors-public/app';\nimport { AppFrontendType, BUILTIN_PROVIDER_CAPABILITY, normalizeConsentPurposes, type ConsentPurpose } from '@wildo-ai/saas-models/public-runtime';\nimport { ApplicationContext } from '~wildo-frontend-lib/core/runtime/ApplicationContext.shared';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\n\n/** One running consent-based provider: its ref, the capabilities it serves, and its activation. */\nexport interface ConsentBasedProviderActivation {\n readonly providerRef: string;\n readonly providerCapabilities: ReadonlyArray<string>;\n readonly activation: ProviderFrontendSdkActivation;\n}\n\n/** @wildo_source:part:start saas.frontend.consent-based-provider-activation facet:layer:frontend facet:audience:app-developer */\n/**\n * The consent-based providers currently RUNNING on the application, in registry order.\n *\n * Empty until the signed-in person grants the purposes a provider rests on, and emptied again on withdrawal or\n * sign-out — immediately, before the providers' `deactivate` has finished. A consumer that dispatches to a\n * provider (`AnalyticsContext` does, for `FRONTEND_PRODUCT_ANALYTICS`) reads this and never holds a handle past it.\n */\nexport function useConsentBasedProviderActivations(): ReadonlyArray<ConsentBasedProviderActivation> {\n return useContext(ConsentBasedProviderActivationsContext);\n}\n/** @wildo_source:part:end saas.frontend.consent-based-provider-activation */\n\nexport const ConsentBasedProviderActivationsContext = createContext<ReadonlyArray<ConsentBasedProviderActivation>>([]);\n\nconst logger: LoggerFrontendService = LoggerFrontendService.getLogger();\n\nfunction grantedKey(purposes: readonly ConsentPurpose[]): string {\n return [...purposes].sort().join(',');\n}\n\nexport const ConsentBasedProviderSdksProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n const appContext = useContext(ApplicationContext);\n const registry = appContext?.frontendProviderRegistry;\n const { on } = useEventBus();\n\n // `null` = nothing said yet; an empty array is a recorded withdrawal. Both start nothing.\n const [grantedPurposes, setGrantedPurposes] = useState<readonly ConsentPurpose[] | null>(null);\n const [activations, setActivations] = useState<ReadonlyArray<ConsentBasedProviderActivation>>([]);\n // One lane for this consumer's lifetime: a start waits for the previous stop.\n const lane = useRef(createFrontendProviderSdkActivationLane());\n\n useEffect(() => on(FrontendEvents.USER_PREFERENCES_CHANGED, (payload) => {\n if (payload.privacy === null) {\n setGrantedPurposes([]);\n return;\n }\n const purposes = payload.privacy?.consentedPurposes;\n if (purposes !== undefined) setGrantedPurposes(normalizeConsentPurposes(purposes));\n }), [on]);\n\n // `analytics.enabled` is the application's master switch for product analytics: with it off, a vendor analytics\n // client is not even loaded on a grant — loading it would already send PostHog a flags request and write its ids,\n // for events that would then never be dispatched to it.\n const analyticsEnabled = appContext?.appConfig?.analytics?.enabled === true;\n const consentBasedModules = useMemo(\n () => (registry?.listAll() ?? []).filter((module) => consentPurposesRequiredByProvider(module).length > 0\n && (analyticsEnabled || !module.providerCapabilities.includes(BUILTIN_PROVIDER_CAPABILITY.FRONTEND_PRODUCT_ANALYTICS))),\n [registry, analyticsEnabled],\n );\n // Only the purposes these providers rest on, so an unrelated grant does not restart a running client.\n const relevantGranted = useMemo(() => {\n const granted = grantedPurposes ?? [];\n const required = new Set(consentBasedModules.flatMap((module) => consentPurposesRequiredByProvider(module)));\n return granted.filter((purpose) => required.has(purpose));\n }, [consentBasedModules, grantedPurposes]);\n const key = grantedKey(relevantGranted);\n\n useEffect(() => {\n if (consentBasedModules.length === 0 || relevantGranted.length === 0) {\n setActivations([]);\n return;\n }\n // Serialised through the lane — see \"Start and stop\" above.\n const stop = lane.current.start(\n () => activateFrontendProviderSdks({\n surface: AppFrontendType.SAAS_APP,\n modules: consentBasedModules,\n grantedConsentPurposes: relevantGranted,\n onDiagnostic: (diagnostic) => {\n logger.warn('Consent-based frontend provider activation diagnostic', {\n kind: diagnostic.kind,\n providerRef: diagnostic.providerRef,\n message: diagnostic.message,\n });\n },\n }),\n (result) => {\n setActivations(consentBasedModules.flatMap((module) => {\n const activation = result.activations.get(module.metadata.ref);\n return activation === undefined\n ? []\n : [{ providerRef: module.metadata.ref, providerCapabilities: [...module.providerCapabilities], activation }];\n }));\n },\n );\n\n return () => {\n // Withdrawn from consumers at once, so nothing dispatches to a client that is being stopped.\n setActivations([]);\n stop();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by the granted SET, see grantedKey.\n }, [consentBasedModules, key]);\n\n return (\n <ConsentBasedProviderActivationsContext.Provider value={activations}>\n {children}\n </ConsentBasedProviderActivationsContext.Provider>\n );\n};\n"]}
@@ -11,6 +11,11 @@
11
11
  * <AnalyticsDashboard />
12
12
  * </FeatureGate>
13
13
  *
14
+ * // Inside a page, beside content the page keeps: a locked card in place, not the page-sized prompt.
15
+ * <FeatureGate featureId={analyticsFeatureId} presentation={RequiredFeaturesGatePresentation.TILE}>
16
+ * <AnalyticsWidget />
17
+ * </FeatureGate>
18
+ *
14
19
  * // Custom rendering when unavailable:
15
20
  * <FeatureGate featureId={analyticsFeatureId} renderUnavailable={(availability) => (
16
21
  * <MyCustomUpsell availability={availability} />
@@ -20,6 +25,7 @@
20
25
  */
21
26
  import React from 'react';
22
27
  import { type FeatureAvailability } from './useFeatureAvailability';
28
+ import { RequiredFeaturesGatePresentation } from './required-features-gate-presentation';
23
29
  export interface FeatureGateProps {
24
30
  /** Feature identifier to check */
25
31
  featureId: string;
@@ -30,6 +36,12 @@ export interface FeatureGateProps {
30
36
  * If omitted, renders the policy-driven FeatureUnavailablePrompt automatically.
31
37
  */
32
38
  renderUnavailable?: (availability: FeatureAvailability) => React.ReactNode;
39
+ /**
40
+ * Where the gated content sits, as for a view's requirement: PAGE (the default) where it is the page's body, CONTROL
41
+ * for one launcher, TILE where the prompt would otherwise sit beside content the page keeps (a settings section or a
42
+ * form showing what the feature would unlock).
43
+ */
44
+ presentation?: RequiredFeaturesGatePresentation;
33
45
  }
34
- export declare function FeatureGate({ featureId, children, renderUnavailable, }: FeatureGateProps): React.JSX.Element | null;
46
+ export declare function FeatureGate({ featureId, children, renderUnavailable, presentation, }: FeatureGateProps): React.JSX.Element | null;
35
47
  //# sourceMappingURL=FeatureGate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureGate.d.ts","sourceRoot":"","sources":["../../../../src/core/features/FeatureGate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAM5F,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;CAC5E;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,iBAAiB,GAClB,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgC7C"}
1
+ {"version":3,"file":"FeatureGate.d.ts","sourceRoot":"","sources":["../../../../src/core/features/FeatureGate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI5F,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAIzF,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC3E;;;;OAIG;IACH,YAAY,CAAC,EAAE,gCAAgC,CAAC;CACjD;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,YAAoD,GACrD,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAwC7C"}
@@ -3,7 +3,9 @@ import { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';
3
3
  import { useFeatureAvailability } from './useFeatureAvailability.js';
4
4
  import { FeatureUnavailablePrompt } from '../../components/feedback/features/feature-unavailable-prompt.js';
5
5
  import { useBillingAction } from '../../core/billing/useBillingAction.js';
6
- export function FeatureGate({ featureId, children, renderUnavailable, }) {
6
+ import { InPlaceFeatureLock } from './InPlaceFeatureLock.js';
7
+ import { RequiredFeaturesGatePresentation } from './required-features-gate-presentation.js';
8
+ export function FeatureGate({ featureId, children, renderUnavailable, presentation = RequiredFeaturesGatePresentation.PAGE, }) {
7
9
  const availability = useFeatureAvailability(featureId);
8
10
  const billingAction = useBillingAction();
9
11
  // Feature is available → render children
@@ -18,6 +20,9 @@ export function FeatureGate({ featureId, children, renderUnavailable, }) {
18
20
  if (renderUnavailable) {
19
21
  return _jsx(_Fragment, { children: renderUnavailable(availability) });
20
22
  }
23
+ if (presentation !== RequiredFeaturesGatePresentation.PAGE) {
24
+ return (_jsx(InPlaceFeatureLock, { availability: availability, presentation: presentation, onAction: () => billingAction(availability), children: children }));
25
+ }
21
26
  // Default: policy-driven prompt. Inline FeatureGate surfaces do not expose a
22
27
  // generic "go back" action because they are embedded into the current page.
23
28
  return (_jsx(FeatureUnavailablePrompt, { behavior: availability.behavior, missingFeatures: availability.missingFeatures, limitInfo: availability.limitInfo, upgradeOptionsCount: availability.upgradeOptions?.length, customComponentRef: availability.customComponentRef, onDismiss: undefined, onAction: () => billingAction(availability) }));
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureGate.js","sourceRoot":"","sources":["../../../../src/core/features/FeatureGate.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAA4B,MAAM,0BAA0B,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAgBrF,MAAM,UAAU,WAAW,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,iBAAiB,GACA;IACjB,MAAM,YAAY,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;IACvD,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IAEzC,yCAAyC;IACzC,IAAI,YAAY,CAAC,WAAW,EAAE,CAAC;QAC7B,OAAO,4BAAG,QAAQ,GAAI,CAAC;IACzB,CAAC;IAED,iCAAiC;IACjC,IAAI,YAAY,CAAC,QAAQ,KAAK,6BAA6B,CAAC,IAAI,EAAE,CAAC;QACjE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sCAAsC;IACtC,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,4BAAG,iBAAiB,CAAC,YAAY,CAAC,GAAI,CAAC;IAChD,CAAC;IAED,6EAA6E;IAC7E,4EAA4E;IAC5E,OAAO,CACL,KAAC,wBAAwB,IACvB,QAAQ,EAAE,YAAY,CAAC,QAAQ,EAC/B,eAAe,EAAE,YAAY,CAAC,eAAe,EAC7C,SAAS,EAAE,YAAY,CAAC,SAAS,EACjC,mBAAmB,EAAE,YAAY,CAAC,cAAc,EAAE,MAAM,EACxD,kBAAkB,EAAE,YAAY,CAAC,kBAAkB,EACnD,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,YAAY,CAAC,GAC3C,CACH,CAAC;AACJ,CAAC","sourcesContent":["/**\n * FeatureGate — Declarative feature gating component\n * \n * Wraps children with a feature availability check. If the feature is available,\n * renders children. If not, automatically renders the policy-driven prompt.\n * \n * Usage:\n * const analyticsFeatureId = APP_FEATURE_IDS.ADVANCED_ANALYTICS;\n *\n * <FeatureGate featureId={analyticsFeatureId}>\n * <AnalyticsDashboard />\n * </FeatureGate>\n * \n * // Custom rendering when unavailable:\n * <FeatureGate featureId={analyticsFeatureId} renderUnavailable={(availability) => (\n * <MyCustomUpsell availability={availability} />\n * )}>\n * <AnalyticsDashboard />\n * </FeatureGate>\n */\n\nimport React from 'react';\nimport { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';\nimport { useFeatureAvailability, type FeatureAvailability } from './useFeatureAvailability';\nimport { FeatureUnavailablePrompt } from '~wildo-frontend-lib/components/feedback/features/feature-unavailable-prompt';\nimport { useBillingAction } from '~wildo-frontend-lib/core/billing/useBillingAction';\n\n// Note: useFeatureGate hook is in a separate file (useFeatureGate.ts) for React Fast Refresh compatibility.\n\nexport interface FeatureGateProps {\n /** Feature identifier to check */\n featureId: string;\n /** Content to render when the feature is available */\n children: React.ReactNode;\n /** \n * Optional custom renderer when the feature is unavailable.\n * If omitted, renders the policy-driven FeatureUnavailablePrompt automatically.\n */\n renderUnavailable?: (availability: FeatureAvailability) => React.ReactNode;\n}\n\nexport function FeatureGate({\n featureId,\n children,\n renderUnavailable,\n}: FeatureGateProps): React.JSX.Element | null {\n const availability = useFeatureAvailability(featureId);\n const billingAction = useBillingAction();\n\n // Feature is available → render children\n if (availability.isAvailable) {\n return <>{children}</>;\n }\n\n // HIDE behavior → render nothing\n if (availability.behavior === FeatureUnavailabilityBehavior.HIDE) {\n return null;\n }\n\n // Custom renderer provided → delegate\n if (renderUnavailable) {\n return <>{renderUnavailable(availability)}</>;\n }\n\n // Default: policy-driven prompt. Inline FeatureGate surfaces do not expose a\n // generic \"go back\" action because they are embedded into the current page.\n return (\n <FeatureUnavailablePrompt\n behavior={availability.behavior}\n missingFeatures={availability.missingFeatures}\n limitInfo={availability.limitInfo}\n upgradeOptionsCount={availability.upgradeOptions?.length}\n customComponentRef={availability.customComponentRef}\n onDismiss={undefined}\n onAction={() => billingAction(availability)}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"FeatureGate.js","s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AwB,IACvB,QAAQ,EAAE,YAAY,CAAC,QAAQ,EAC/B,eAAe,EAAE,YAAY,CAAC,eAAe,EAC7C,SAAS,EAAE,YAAY,CAAC,SAAS,EACjC,mBAAmB,EAAE,YAAY,CAAC,cAAc,EAAE,MAAM,EACxD,kBAAkB,EAAE,YAAY,CAAC,kBAAkB,EACnD,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,YAAY,CAAC,GAC3C,CACH,CAAC;AACJ,CAAC","sourcesContent":["/**\n * FeatureGate — Declarative feature gating component\n * \n * Wraps children with a feature availability check. If the feature is available,\n * renders children. If not, automatically renders the policy-driven prompt.\n * \n * Usage:\n * const analyticsFeatureId = APP_FEATURE_IDS.ADVANCED_ANALYTICS;\n *\n * <FeatureGate featureId={analyticsFeatureId}>\n * <AnalyticsDashboard />\n * </FeatureGate>\n * \n * // Inside a page, beside content the page keeps: a locked card in place, not the page-sized prompt.\n * <FeatureGate featureId={analyticsFeatureId} presentation={RequiredFeaturesGatePresentation.TILE}>\n * <AnalyticsWidget />\n * </FeatureGate>\n *\n * // Custom rendering when unavailable:\n * <FeatureGate featureId={analyticsFeatureId} renderUnavailable={(availability) => (\n * <MyCustomUpsell availability={availability} />\n * )}>\n * <AnalyticsDashboard />\n * </FeatureGate>\n */\n\nimport React from 'react';\nimport { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';\nimport { useFeatureAvailability, type FeatureAvailability } from './useFeatureAvailability';\nimport { FeatureUnavailablePrompt } from '~wildo-frontend-lib/components/feedback/features/feature-unavailable-prompt';\nimport { useBillingAction } from '~wildo-frontend-lib/core/billing/useBillingAction';\nimport { InPlaceFeatureLock } from './InPlaceFeatureLock';\nimport { RequiredFeaturesGatePresentation } from './required-features-gate-presentation';\n\n// Note: useFeatureGate hook is in a separate file (useFeatureGate.ts) for React Fast Refresh compatibility.\n\nexport interface FeatureGateProps {\n /** Feature identifier to check */\n featureId: string;\n /** Content to render when the feature is available */\n children: React.ReactNode;\n /** \n * Optional custom renderer when the feature is unavailable.\n * If omitted, renders the policy-driven FeatureUnavailablePrompt automatically.\n */\n renderUnavailable?: (availability: FeatureAvailability) => React.ReactNode;\n /**\n * Where the gated content sits, as for a view's requirement: PAGE (the default) where it is the page's body, CONTROL\n * for one launcher, TILE where the prompt would otherwise sit beside content the page keeps (a settings section or a\n * form showing what the feature would unlock).\n */\n presentation?: RequiredFeaturesGatePresentation;\n}\n\nexport function FeatureGate({\n featureId,\n children,\n renderUnavailable,\n presentation = RequiredFeaturesGatePresentation.PAGE,\n}: FeatureGateProps): React.JSX.Element | null {\n const availability = useFeatureAvailability(featureId);\n const billingAction = useBillingAction();\n\n // Feature is available → render children\n if (availability.isAvailable) {\n return <>{children}</>;\n }\n\n // HIDE behavior → render nothing\n if (availability.behavior === FeatureUnavailabilityBehavior.HIDE) {\n return null;\n }\n\n // Custom renderer provided → delegate\n if (renderUnavailable) {\n return <>{renderUnavailable(availability)}</>;\n }\n\n if (presentation !== RequiredFeaturesGatePresentation.PAGE) {\n return (\n <InPlaceFeatureLock availability={availability} presentation={presentation} onAction={() => billingAction(availability)}>\n {children}\n </InPlaceFeatureLock>\n );\n }\n\n // Default: policy-driven prompt. Inline FeatureGate surfaces do not expose a\n // generic \"go back\" action because they are embedded into the current page.\n return (\n <FeatureUnavailablePrompt\n behavior={availability.behavior}\n missingFeatures={availability.missingFeatures}\n limitInfo={availability.limitInfo}\n upgradeOptionsCount={availability.upgradeOptions?.length}\n customComponentRef={availability.customComponentRef}\n onDismiss={undefined}\n onAction={() => billingAction(availability)}\n />\n );\n}\n"]}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * InPlaceFeatureLock — refused content shown where it sits, for the two feature gates ({@link RequiredFeaturesGate} by a
3
+ * view's requirement, {@link FeatureGate} by feature id): a locked control or a locked tile, and the dialog it opens.
4
+ *
5
+ * The dialog carries the prompt the policy chose (an upgrade for someone who may buy, the purchasers to ask for anyone
6
+ * else), so there is one prompt design, inline or in place.
7
+ */
8
+ import React from 'react';
9
+ import type { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';
10
+ import type { FeatureUnavailablePromptProps } from '../../components/feedback/features/feature-unavailable-prompt';
11
+ import { RequiredFeaturesGatePresentation } from './required-features-gate-presentation';
12
+ /** What a refusal says, the same shape from either availability hook. */
13
+ export interface InPlaceFeatureRefusal {
14
+ behavior: FeatureUnavailabilityBehavior;
15
+ missingFeatures?: string[];
16
+ limitInfo?: FeatureUnavailablePromptProps['limitInfo'];
17
+ upgradeOptions?: readonly unknown[];
18
+ customComponentRef?: string;
19
+ }
20
+ export declare function InPlaceFeatureLock({ availability, presentation, lockedTileHeight, onAction, children }: {
21
+ availability: InPlaceFeatureRefusal;
22
+ /** CONTROL or TILE: PAGE is the page prompt, which the gates render themselves. */
23
+ presentation: RequiredFeaturesGatePresentation;
24
+ lockedTileHeight?: number | string;
25
+ onAction: () => void;
26
+ children: React.ReactNode;
27
+ }): React.JSX.Element;
28
+ //# sourceMappingURL=InPlaceFeatureLock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InPlaceFeatureLock.d.ts","sourceRoot":"","sources":["../../../../src/core/features/InPlaceFeatureLock.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAK3E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6EAA6E,CAAC;AAEjI,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,6BAA6B,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,6BAA6B,CAAC,WAAW,CAAC,CAAC;IACvD,cAAc,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAQD,wBAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;IACvG,YAAY,EAAE,qBAAqB,CAAC;IACpC,mFAAmF;IACnF,YAAY,EAAE,gCAAgC,CAAC;IAC/C,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6DpB"}
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * InPlaceFeatureLock — refused content shown where it sits, for the two feature gates ({@link RequiredFeaturesGate} by a
4
+ * view's requirement, {@link FeatureGate} by feature id): a locked control or a locked tile, and the dialog it opens.
5
+ *
6
+ * The dialog carries the prompt the policy chose (an upgrade for someone who may buy, the purchasers to ask for anyone
7
+ * else), so there is one prompt design, inline or in place.
8
+ */
9
+ import React from 'react';
10
+ import { Button, ButtonLabelOverflow, ButtonVariants_Variant, resolveDrawnActionVariant } from '../../components/actions/button.js';
11
+ import { FeatureLockBadge } from '../../components/feedback/features/feature-lock-badge.js';
12
+ import { FeatureUnavailableDialog } from '../../components/feedback/features/feature-unavailable-dialog.js';
13
+ import { useI18n } from '../../core/i18n/useI18n.js';
14
+ import { RequiredFeaturesGatePresentation } from './required-features-gate-presentation.js';
15
+ export function InPlaceFeatureLock({ availability, presentation, lockedTileHeight, onAction, children }) {
16
+ const [open, setOpen] = React.useState(false);
17
+ const { tBillingFeature } = useI18n();
18
+ const missingFeatures = availability.missingFeatures;
19
+ const openPrompt = (event) => {
20
+ event?.preventDefault();
21
+ event?.stopPropagation();
22
+ setOpen(true);
23
+ };
24
+ const badge = _jsx(FeatureLockBadge, { missingFeatures: missingFeatures, size: presentation === RequiredFeaturesGatePresentation.TILE ? 'md' : 'sm' });
25
+ let locked;
26
+ if (presentation === RequiredFeaturesGatePresentation.CONTROL && React.isValidElement(children)) {
27
+ const control = children;
28
+ locked = React.cloneElement(control, {
29
+ onClick: openPrompt,
30
+ 'aria-disabled': 'true',
31
+ 'data-feature-locked': 'true',
32
+ // A refused emphasised action is drawn as an ordinary one, as the action bar draws a locked action.
33
+ ...(control.props.variant === undefined ? {} : { variant: resolveDrawnActionVariant(control.props.variant, true) }),
34
+ }, control.props.children, badge);
35
+ }
36
+ else {
37
+ // A tile, or a control the gate cannot keep: a card filling the space. Named by the feature words (an eager section,
38
+ // so never empty while the badge's own words load); the badge shows the lock.
39
+ // A limit refusal names its feature in `limitInfo`, not in `missingFeatures`.
40
+ const refusedFeatures = missingFeatures?.length ? missingFeatures : availability.limitInfo ? [availability.limitInfo.featureId] : [];
41
+ const featureWords = refusedFeatures.map((feature) => tBillingFeature(feature, 'label')).join(', ');
42
+ locked = (_jsxs(Button, { type: "button", variant: ButtonVariants_Variant.GHOST, labelOverflow: ButtonLabelOverflow.WRAP, className: "flex h-full min-h-0 w-full flex-col items-center justify-center gap-element-sm rounded-md border border-dashed border-border p-field text-center text-sm text-muted-foreground", "data-feature-locked": "true", "aria-disabled": "true", "aria-label": featureWords, style: lockedTileHeight === undefined ? undefined : { minHeight: lockedTileHeight }, onClick: openPrompt, children: [badge, _jsx("span", { children: featureWords })] }));
43
+ }
44
+ return (_jsxs(_Fragment, { children: [locked, _jsx(FeatureUnavailableDialog, { open: open, onOpenChange: setOpen, behavior: availability.behavior, missingFeatures: missingFeatures, limitInfo: availability.limitInfo, upgradeOptionsCount: availability.upgradeOptions?.length, customComponentRef: availability.customComponentRef, onAction: () => {
45
+ onAction();
46
+ setOpen(false);
47
+ } })] }));
48
+ }
49
+ //# sourceMappingURL=InPlaceFeatureLock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InPlaceFeatureLock.js","sourceRoot":"","sources":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8BACG,MAAM,EACP,KAAC,wBAAwB,IACvB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,YAAY,CAAC,QAAQ,EAC/B,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,YAAY,CAAC,SAAS,EACjC,mBAAmB,EAAE,YAAY,CAAC,cAAc,EAAE,MAAM,EACxD,kBAAkB,EAAE,YAAY,CAAC,kBAAkB,EACnD,QAAQ,EAAE,GAAG,EAAE;oBACb,QAAQ,EAAE,CAAC;oBACX,OAAO,CAAC,KAAK,CAAC,CAAC;gBACjB,CAAC,GACD,IACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/**\n * InPlaceFeatureLock — refused content shown where it sits, for the two feature gates ({@link RequiredFeaturesGate} by a\n * view's requirement, {@link FeatureGate} by feature id): a locked control or a locked tile, and the dialog it opens.\n *\n * The dialog carries the prompt the policy chose (an upgrade for someone who may buy, the purchasers to ask for anyone\n * else), so there is one prompt design, inline or in place.\n */\nimport React from 'react';\nimport type { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';\n\nimport { Button, ButtonLabelOverflow, ButtonVariants_Variant, resolveDrawnActionVariant } from '~wildo-frontend-lib/components/actions/button';\nimport { FeatureLockBadge } from '~wildo-frontend-lib/components/feedback/features/feature-lock-badge';\nimport { FeatureUnavailableDialog } from '~wildo-frontend-lib/components/feedback/features/feature-unavailable-dialog';\nimport type { FeatureUnavailablePromptProps } from '~wildo-frontend-lib/components/feedback/features/feature-unavailable-prompt';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { RequiredFeaturesGatePresentation } from './required-features-gate-presentation';\n\n/** What a refusal says, the same shape from either availability hook. */\nexport interface InPlaceFeatureRefusal {\n behavior: FeatureUnavailabilityBehavior;\n missingFeatures?: string[];\n limitInfo?: FeatureUnavailablePromptProps['limitInfo'];\n upgradeOptions?: readonly unknown[];\n customComponentRef?: string;\n}\n\ntype LockableControlProps = {\n children?: React.ReactNode;\n onClick?: (event: React.SyntheticEvent) => void;\n variant?: ButtonVariants_Variant;\n};\n\nexport function InPlaceFeatureLock({ availability, presentation, lockedTileHeight, onAction, children }: {\n availability: InPlaceFeatureRefusal;\n /** CONTROL or TILE: PAGE is the page prompt, which the gates render themselves. */\n presentation: RequiredFeaturesGatePresentation;\n lockedTileHeight?: number | string;\n onAction: () => void;\n children: React.ReactNode;\n}): React.JSX.Element {\n const [open, setOpen] = React.useState(false);\n const { tBillingFeature } = useI18n();\n const missingFeatures = availability.missingFeatures;\n const openPrompt = (event?: React.SyntheticEvent) => {\n event?.preventDefault();\n event?.stopPropagation();\n setOpen(true);\n };\n const badge = <FeatureLockBadge missingFeatures={missingFeatures} size={presentation === RequiredFeaturesGatePresentation.TILE ? 'md' : 'sm'} />;\n let locked: React.ReactNode;\n if (presentation === RequiredFeaturesGatePresentation.CONTROL && React.isValidElement<LockableControlProps>(children)) {\n const control = children;\n locked = React.cloneElement(control, {\n onClick: openPrompt,\n 'aria-disabled': 'true',\n 'data-feature-locked': 'true',\n // A refused emphasised action is drawn as an ordinary one, as the action bar draws a locked action.\n ...(control.props.variant === undefined ? {} : { variant: resolveDrawnActionVariant(control.props.variant, true) }),\n } as Partial<LockableControlProps>, control.props.children, badge);\n } else {\n // A tile, or a control the gate cannot keep: a card filling the space. Named by the feature words (an eager section,\n // so never empty while the badge's own words load); the badge shows the lock.\n // A limit refusal names its feature in `limitInfo`, not in `missingFeatures`.\n const refusedFeatures = missingFeatures?.length ? missingFeatures : availability.limitInfo ? [availability.limitInfo.featureId] : [];\n const featureWords = refusedFeatures.map((feature) => tBillingFeature(feature, 'label')).join(', ');\n locked = (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n labelOverflow={ButtonLabelOverflow.WRAP}\n className=\"flex h-full min-h-0 w-full flex-col items-center justify-center gap-element-sm rounded-md border border-dashed border-border p-field text-center text-sm text-muted-foreground\"\n data-feature-locked=\"true\"\n aria-disabled=\"true\"\n aria-label={featureWords}\n style={lockedTileHeight === undefined ? undefined : { minHeight: lockedTileHeight }}\n onClick={openPrompt}\n >\n {badge}\n <span>{featureWords}</span>\n </Button>\n );\n }\n return (\n <>\n {locked}\n <FeatureUnavailableDialog\n open={open}\n onOpenChange={setOpen}\n behavior={availability.behavior}\n missingFeatures={missingFeatures}\n limitInfo={availability.limitInfo}\n upgradeOptionsCount={availability.upgradeOptions?.length}\n customComponentRef={availability.customComponentRef}\n onAction={() => {\n onAction();\n setOpen(false);\n }}\n />\n </>\n );\n}\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shows a plan refusal from the backend as the prompt the same fence shows when checked first (see `plan-refusal.frontend`).
3
+ *
4
+ * Mounted once, inside the features and billing providers, whose facts decide the prompt: the unavailability behaviour for
5
+ * the person's roles (`resolveFeatureUnavailabilityBehavior`, so someone who cannot buy is told whom to ask) and the
6
+ * billing action behind its button. It hears a refusal two ways: the error event of a refusal the global handler would
7
+ * show (`wildoErrorIsShownToUser`), and a resource operation's error notice (its request is silent, and the surface
8
+ * reports its own failure), which carries the fence's facts (`errorPlanRefusal`).
9
+ */
10
+ import React from 'react';
11
+ export declare function PlanRefusalPrompt(): React.JSX.Element | null;
12
+ //# sourceMappingURL=PlanRefusalPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanRefusalPrompt.d.ts","sourceRoot":"","sources":["../../../../src/core/features/PlanRefusalPrompt.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAuC,MAAM,OAAO,CAAC;AAe5D,wBAAgB,iBAAiB,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA2B5D"}
@@ -0,0 +1,90 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Shows a plan refusal from the backend as the prompt the same fence shows when checked first (see `plan-refusal.frontend`).
4
+ *
5
+ * Mounted once, inside the features and billing providers, whose facts decide the prompt: the unavailability behaviour for
6
+ * the person's roles (`resolveFeatureUnavailabilityBehavior`, so someone who cannot buy is told whom to ask) and the
7
+ * billing action behind its button. It hears a refusal two ways: the error event of a refusal the global handler would
8
+ * show (`wildoErrorIsShownToUser`), and a resource operation's error notice (its request is silent, and the surface
9
+ * reports its own failure), which carries the fence's facts (`errorPlanRefusal`).
10
+ */
11
+ import { useEffect, useMemo, useState } from 'react';
12
+ import { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';
13
+ import { useEventBus } from '../../core/events/useEventBus.js';
14
+ import { FrontendEvents } from '../../core/events/events.frontend.schemas.js';
15
+ import { useFeatures } from './useFeatures.js';
16
+ import { useUserOrgs } from '../../core/security/useUserOrgs.js';
17
+ import { useAppScopeSafe } from '../../core/scope/useAppScope.js';
18
+ import { useBillingSafe } from '../../core/billing/useBilling.js';
19
+ import { useBillingAction } from '../../core/billing/useBillingAction.js';
20
+ import { FeatureUnavailableDialog } from '../../components/feedback/features/feature-unavailable-dialog.js';
21
+ import { buildFeaturePolicyRoles, resolveFeatureUnavailabilityBehavior } from './feature-unavailability.frontend.utils.js';
22
+ import { planRefusalOf, registerPlanRefusalPromptHost } from './plan-refusal.frontend.js';
23
+ import { wildoErrorIsShownToUser } from '../../core/errors/backend-refusal.frontend.js';
24
+ export function PlanRefusalPrompt() {
25
+ const { on } = useEventBus();
26
+ const [refusal, setRefusal] = useState(null);
27
+ useEffect(() => registerPlanRefusalPromptHost(), []);
28
+ useEffect(() => {
29
+ const offError = on(FrontendEvents.ERROR_OCCURED, (payload) => {
30
+ // Only a refusal the global handler would SHOW, by the one predicate it asks: a silent request's caller reports
31
+ // its own failure (a form through the notice below), and a refusal the error matrix keeps quiet (a low-risk read, a
32
+ // poll) must not open a modal nobody asked for, again on every poll.
33
+ if (!wildoErrorIsShownToUser(payload.error))
34
+ return;
35
+ const found = planRefusalOf(payload.error);
36
+ if (found)
37
+ setRefusal(found);
38
+ });
39
+ const offNotice = on(FrontendEvents.NOTIFY_RESOURCE_ERROR, (payload) => {
40
+ const found = payload.additionalContext?.errorPlanRefusal;
41
+ if (found)
42
+ setRefusal(found);
43
+ });
44
+ return () => {
45
+ offError();
46
+ offNotice();
47
+ };
48
+ }, [on]);
49
+ if (!refusal)
50
+ return null;
51
+ return _jsx(PlanRefusalDialog, { refusal: refusal, onClose: () => setRefusal(null) });
52
+ }
53
+ function PlanRefusalDialog({ refusal, onClose }) {
54
+ const { featureDefinitions, unavailabilityPolicy, refetch } = useFeatures();
55
+ const { permissions } = useUserOrgs();
56
+ const appScope = useAppScopeSafe();
57
+ const billing = useBillingSafe();
58
+ const billingAction = useBillingAction();
59
+ // The client's resolved features did not foresee the refusal (a limit reached since they were read): read them again,
60
+ // so the next attempt is fenced before it is sent.
61
+ useEffect(() => { refetch(); }, [refetch]);
62
+ const availability = useMemo(() => {
63
+ const { behavior, suggestedProductRef, customComponentRef } = resolveFeatureUnavailabilityBehavior({
64
+ reason: refusal.reason,
65
+ featureDef: featureDefinitions.get(refusal.featureId),
66
+ policy: unavailabilityPolicy,
67
+ userRoles: buildFeaturePolicyRoles(permissions, appScope?.currentOrganizationId ?? null),
68
+ billingEnabled: billing?.isEnabled ?? false,
69
+ mayPurchase: billing?.mayPurchase ?? false,
70
+ });
71
+ return {
72
+ isAvailable: false,
73
+ reason: refusal.reason,
74
+ behavior,
75
+ ...(refusal.missingFeatures ? { missingFeatures: [...refusal.missingFeatures] } : {}),
76
+ ...(refusal.limitInfo ? { limitInfo: { ...refusal.limitInfo } } : {}),
77
+ ...(suggestedProductRef ? { suggestedProductRef } : {}),
78
+ ...(customComponentRef ? { customComponentRef } : {}),
79
+ };
80
+ }, [refusal, featureDefinitions, unavailabilityPolicy, permissions, appScope?.currentOrganizationId, billing?.isEnabled, billing?.mayPurchase]);
81
+ // A behaviour that shows nothing (an application that hides the fence, or billing off) still owes the person a word:
82
+ // the disable prompt says the action is not available, rather than nothing at all.
83
+ const behavior = availability.behavior === FeatureUnavailabilityBehavior.HIDE ? FeatureUnavailabilityBehavior.DISABLE : availability.behavior;
84
+ return (_jsx(FeatureUnavailableDialog, { open: true, onOpenChange: (open) => { if (!open)
85
+ onClose(); }, behavior: behavior, missingFeatures: availability.missingFeatures, limitInfo: availability.limitInfo, customComponentRef: availability.customComponentRef, onAction: () => {
86
+ billingAction(availability);
87
+ onClose();
88
+ } }));
89
+ }
90
+ //# sourceMappingURL=PlanRefusalPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanRefusalPrompt.js","sourceRoot":"","sources":["../../../../src/core/features/PlanRefusalPrompt.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AACH,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,uBAAuB,EAAE,oCAAoC,EAAE,MAAM,yCAAyC,CAAC;AAExH,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAAoB,MAAM,yBAAyB,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AAEnG,MAAM,UAAU,iBAAiB;IAC/B,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,EAAE,CAAC;IAC7B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,C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E,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACtD,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,QAAQ,EAAE,qBAAqB,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;IAEhJ,qHAAqH;IACrH,mFAAmF;IACnF,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,KAAK,6BAA6B,CAAC,IAAI,CAAC,CAAC,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC;IAE9I,OAAO,CACL,KAAC,wBAAwB,IACvB,IAAI,QACJ,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EACjD,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,YAAY,CAAC,eAAe,EAC7C,SAAS,EAAE,YAAY,CAAC,SAAS,EACjC,kBAAkB,EAAE,YAAY,CAAC,kBAAkB,EACnD,QAAQ,EAAE,GAAG,EAAE;YACb,aAAa,CAAC,YAAY,CAAC,CAAC;YAC5B,OAAO,EAAE,CAAC;QACZ,CAAC,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Shows a plan refusal from the backend as the prompt the same fence shows when checked first (see `plan-refusal.frontend`).\n *\n * Mounted once, inside the features and billing providers, whose facts decide the prompt: the unavailability behaviour for\n * the person's roles (`resolveFeatureUnavailabilityBehavior`, so someone who cannot buy is told whom to ask) and the\n * billing action behind its button. It hears a refusal two ways: the error event of a refusal the global handler would\n * show (`wildoErrorIsShownToUser`), and a resource operation's error notice (its request is silent, and the surface\n * reports its own failure), which carries the fence's facts (`errorPlanRefusal`).\n */\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\nimport { useFeatures } from './useFeatures';\nimport { useUserOrgs } from '~wildo-frontend-lib/core/security/useUserOrgs';\nimport { useAppScopeSafe } from '~wildo-frontend-lib/core/scope/useAppScope';\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling';\nimport { useBillingAction } from '~wildo-frontend-lib/core/billing/useBillingAction';\nimport { FeatureUnavailableDialog } from '~wildo-frontend-lib/components/feedback/features/feature-unavailable-dialog';\nimport { buildFeaturePolicyRoles, resolveFeatureUnavailabilityBehavior } from './feature-unavailability.frontend.utils';\nimport type { FeatureAvailability } from './useFeatureAvailability';\nimport { planRefusalOf, registerPlanRefusalPromptHost, type PlanRefusal } from './plan-refusal.frontend';\nimport { wildoErrorIsShownToUser } from '~wildo-frontend-lib/core/errors/backend-refusal.frontend';\n\nexport function PlanRefusalPrompt(): React.JSX.Element | null {\n const { on } = useEventBus();\n const [refusal, setRefusal] = useState<PlanRefusal | null>(null);\n\n useEffect(() => registerPlanRefusalPromptHost(), []);\n\n useEffect(() => {\n const offError = on(FrontendEvents.ERROR_OCCURED, (payload) => {\n // Only a refusal the global handler would SHOW, by the one predicate it asks: a silent request's caller reports\n // its own failure (a form through the notice below), and a refusal the error matrix keeps quiet (a low-risk read, a\n // poll) must not open a modal nobody asked for, again on every poll.\n if (!wildoErrorIsShownToUser(payload.error)) return;\n const found = planRefusalOf(payload.error);\n if (found) setRefusal(found);\n });\n const offNotice = on(FrontendEvents.NOTIFY_RESOURCE_ERROR, (payload) => {\n const found = (payload as { additionalContext?: { errorPlanRefusal?: PlanRefusal } }).additionalContext?.errorPlanRefusal;\n if (found) setRefusal(found);\n });\n return () => {\n offError();\n offNotice();\n };\n }, [on]);\n\n if (!refusal) return null;\n return <PlanRefusalDialog refusal={refusal} onClose={() => setRefusal(null)} />;\n}\n\nfunction PlanRefusalDialog({ refusal, onClose }: { refusal: PlanRefusal; onClose: () => void }): React.JSX.Element | null {\n const { featureDefinitions, unavailabilityPolicy, refetch } = useFeatures();\n const { permissions } = useUserOrgs();\n const appScope = useAppScopeSafe();\n const billing = useBillingSafe();\n const billingAction = useBillingAction();\n\n // The client's resolved features did not foresee the refusal (a limit reached since they were read): read them again,\n // so the next attempt is fenced before it is sent.\n useEffect(() => { refetch(); }, [refetch]);\n\n const availability = useMemo((): FeatureAvailability => {\n const { behavior, suggestedProductRef, customComponentRef } = resolveFeatureUnavailabilityBehavior({\n reason: refusal.reason,\n featureDef: featureDefinitions.get(refusal.featureId),\n policy: unavailabilityPolicy,\n userRoles: buildFeaturePolicyRoles(permissions, appScope?.currentOrganizationId ?? null),\n billingEnabled: billing?.isEnabled ?? false,\n mayPurchase: billing?.mayPurchase ?? false,\n });\n return {\n isAvailable: false,\n reason: refusal.reason,\n behavior,\n ...(refusal.missingFeatures ? { missingFeatures: [...refusal.missingFeatures] } : {}),\n ...(refusal.limitInfo ? { limitInfo: { ...refusal.limitInfo } } : {}),\n ...(suggestedProductRef ? { suggestedProductRef } : {}),\n ...(customComponentRef ? { customComponentRef } : {}),\n };\n }, [refusal, featureDefinitions, unavailabilityPolicy, permissions, appScope?.currentOrganizationId, billing?.isEnabled, billing?.mayPurchase]);\n\n // A behaviour that shows nothing (an application that hides the fence, or billing off) still owes the person a word:\n // the disable prompt says the action is not available, rather than nothing at all.\n const behavior = availability.behavior === FeatureUnavailabilityBehavior.HIDE ? FeatureUnavailabilityBehavior.DISABLE : availability.behavior;\n\n return (\n <FeatureUnavailableDialog\n open\n onOpenChange={(open) => { if (!open) onClose(); }}\n behavior={behavior}\n missingFeatures={availability.missingFeatures}\n limitInfo={availability.limitInfo}\n customComponentRef={availability.customComponentRef}\n onAction={() => {\n billingAction(availability);\n onClose();\n }}\n />\n );\n}\n"]}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * RequiredFeaturesGate — the gate a view's `requiredFeatures` puts on content shown INSIDE a page.
3
+ *
4
+ * {@link FeatureRouteGuard} gates a route: when the policy is HIDE it navigates home, and its prompt offers to go back.
5
+ * Neither is right for content embedded in a page (a composite view on a record, an onboarding wizard on a home), where
6
+ * the person is on a page that is theirs: navigating away would take them off it. This gate evaluates the same
7
+ * requirement through the same availability rules, and inside a page HIDE renders nothing and the prompt offers no
8
+ * "go back". Use it wherever a view's requirement is enforced where the view is SHOWN rather than at its route.
9
+ *
10
+ * Where the content sits decides how a refusal looks ({@link RequiredFeaturesGatePresentation}): a page-sized prompt where
11
+ * the content IS the page, a locked control where it is a launcher, a locked tile where it is a tile or an embed. The two
12
+ * in-place forms keep the space the content had and open the same feature dialog when chosen ({@link InPlaceFeatureLock}), so a
13
+ * fence met inside a page never breaks its layout or adds a page heading.
14
+ *
15
+ * A view declaring no requirement renders as it is, without touching the features context, so a view outside a
16
+ * features provider (a test, a preview) is unaffected. While features load, availability is optimistic, as on every
17
+ * engine gate: the frontend gate is where the person meets the fence, and the backend refuses the operations a view
18
+ * calls whatever the page shows.
19
+ */
20
+ import React from 'react';
21
+ import { type RequiredFeaturesConfig } from '@wildo-ai/saas-models';
22
+ import { RequiredFeaturesGatePresentation } from './required-features-gate-presentation';
23
+ export interface RequiredFeaturesGateProps {
24
+ /** The view's declared requirement; absent, the content renders as it is. */
25
+ requiredFeatures?: RequiredFeaturesConfig;
26
+ /**
27
+ * Render nothing until the features are known, instead of the optimistic "available" every engine gate assumes while
28
+ * they load. For content that starts something a person sees appear and disappear (an onboarding wizard), as the
29
+ * guidance layer waits for features before showing a flow with an audience requirement.
30
+ */
31
+ holdWhileLoading?: boolean;
32
+ /** Where the content sits; PAGE when absent. */
33
+ presentation?: RequiredFeaturesGatePresentation;
34
+ /** The height the content would have had, so a locked TILE keeps it where its container does not size it (a chart). */
35
+ lockedTileHeight?: number | string;
36
+ children: React.ReactNode;
37
+ }
38
+ export declare function RequiredFeaturesGate({ requiredFeatures, holdWhileLoading, presentation, lockedTileHeight, children, }: RequiredFeaturesGateProps): React.JSX.Element | null;
39
+ //# sourceMappingURL=RequiredFeaturesGate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequiredFeaturesGate.d.ts","sourceRoot":"","sources":["../../../../src/core/features/RequiredFeaturesGate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAiC,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAInG,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAMzF,MAAM,WAAW,yBAAyB;IACxC,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gDAAgD;IAChD,YAAY,CAAC,EAAE,gCAAgC,CAAC;IAChD,uHAAuH;IACvH,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,gBAAgB,EAChB,gBAAwB,EACxB,YAAoD,EACpD,gBAAgB,EAChB,QAAQ,GACT,EAAE,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAOtD"}
@@ -0,0 +1,51 @@
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * RequiredFeaturesGate — the gate a view's `requiredFeatures` puts on content shown INSIDE a page.
4
+ *
5
+ * {@link FeatureRouteGuard} gates a route: when the policy is HIDE it navigates home, and its prompt offers to go back.
6
+ * Neither is right for content embedded in a page (a composite view on a record, an onboarding wizard on a home), where
7
+ * the person is on a page that is theirs: navigating away would take them off it. This gate evaluates the same
8
+ * requirement through the same availability rules, and inside a page HIDE renders nothing and the prompt offers no
9
+ * "go back". Use it wherever a view's requirement is enforced where the view is SHOWN rather than at its route.
10
+ *
11
+ * Where the content sits decides how a refusal looks ({@link RequiredFeaturesGatePresentation}): a page-sized prompt where
12
+ * the content IS the page, a locked control where it is a launcher, a locked tile where it is a tile or an embed. The two
13
+ * in-place forms keep the space the content had and open the same feature dialog when chosen ({@link InPlaceFeatureLock}), so a
14
+ * fence met inside a page never breaks its layout or adds a page heading.
15
+ *
16
+ * A view declaring no requirement renders as it is, without touching the features context, so a view outside a
17
+ * features provider (a test, a preview) is unaffected. While features load, availability is optimistic, as on every
18
+ * engine gate: the frontend gate is where the person meets the fence, and the backend refuses the operations a view
19
+ * calls whatever the page shows.
20
+ */
21
+ import React from 'react';
22
+ import { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';
23
+ import { FeatureUnavailablePrompt } from '../../components/feedback/features/feature-unavailable-prompt.js';
24
+ import { InPlaceFeatureLock } from './InPlaceFeatureLock.js';
25
+ import { RequiredFeaturesGatePresentation } from './required-features-gate-presentation.js';
26
+ import { useBillingAction } from '../../core/billing/useBillingAction.js';
27
+ import { useOperationFeatureAvailability } from './useOperationFeatureAvailability.js';
28
+ import { useFeatures } from './useFeatures.js';
29
+ export function RequiredFeaturesGate({ requiredFeatures, holdWhileLoading = false, presentation = RequiredFeaturesGatePresentation.PAGE, lockedTileHeight, children, }) {
30
+ if (!requiredFeatures)
31
+ return _jsx(_Fragment, { children: children });
32
+ return (_jsx(DeclaredRequirementGate, { requiredFeatures: requiredFeatures, holdWhileLoading: holdWhileLoading, presentation: presentation, lockedTileHeight: lockedTileHeight, children: children }));
33
+ }
34
+ function DeclaredRequirementGate({ requiredFeatures, holdWhileLoading, presentation, lockedTileHeight, children }) {
35
+ const { isLoading } = useFeatures();
36
+ const operation = React.useMemo(() => ({ requiredFeatures, operationIdentifier: 'VIEW_ACCESS' }), [requiredFeatures]);
37
+ const availability = useOperationFeatureAvailability(operation);
38
+ const billingAction = useBillingAction();
39
+ if (holdWhileLoading && isLoading)
40
+ return null;
41
+ if (!availability || availability.isAvailable)
42
+ return _jsx(_Fragment, { children: children });
43
+ // Inside a page, a hidden view is simply not there: the person stays where they are.
44
+ if (availability.behavior === FeatureUnavailabilityBehavior.HIDE)
45
+ return null;
46
+ if (presentation !== RequiredFeaturesGatePresentation.PAGE) {
47
+ return (_jsx(InPlaceFeatureLock, { availability: availability, presentation: presentation, lockedTileHeight: lockedTileHeight, onAction: () => billingAction(availability), children: children }));
48
+ }
49
+ return (_jsx(FeatureUnavailablePrompt, { behavior: availability.behavior, missingFeatures: availability.missingFeatures, limitInfo: availability.limitInfo, upgradeOptionsCount: availability.upgradeOptions?.length, customComponentRef: availability.customComponentRef, onDismiss: undefined, onAction: () => billingAction(availability) }));
50
+ }
51
+ //# sourceMappingURL=RequiredFeaturesGate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequiredFeaturesGate.js","sourceRoot":"","sources":["../../../../src/core/features/RequiredFeaturesGate.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,6BAA6B,EAA+B,MAAM,uBAAuB,CAAC;AAEnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,6EAA6E,CAAC;AACvH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAErF,OAAO,EAAE,+BAA+B,EAAkC,MAAM,mCAAmC,CAAC;AACpH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAkB5C,MAAM,UAAU,oBAAoB,CAAC,EACnC,gBAAgB,EAChB,gBAAgB,GAAG,KAAK,EACxB,YAAY,GAAG,gCAAgC,CAAC,IAAI,EACpD,gBAAgB,EAChB,QAAQ,GACkB;IAC1B,IAAI,CAAC,gBAAgB;QAAE,OAAO,4BAAG,QAAQ,GAAI,CAAC;IAC9C,OAAO,CACL,KAAC,uBAAuB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,EACjC,mBAAmB,EAAE,YAAY,CAAC,cAAc,EAAE,MAAM,EACxD,kBAAkB,EAAE,YAAY,CAAC,kBAAkB,EACnD,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,YAAY,CAAC,GAC3C,CACH,CAAC;AACJ,CAAC","sourcesContent":["/**\n * RequiredFeaturesGate — the gate a view's `requiredFeatures` puts on content shown INSIDE a page.\n *\n * {@link FeatureRouteGuard} gates a route: when the policy is HIDE it navigates home, and its prompt offers to go back.\n * Neither is right for content embedded in a page (a composite view on a record, an onboarding wizard on a home), where\n * the person is on a page that is theirs: navigating away would take them off it. This gate evaluates the same\n * requirement through the same availability rules, and inside a page HIDE renders nothing and the prompt offers no\n * \"go back\". Use it wherever a view's requirement is enforced where the view is SHOWN rather than at its route.\n *\n * Where the content sits decides how a refusal looks ({@link RequiredFeaturesGatePresentation}): a page-sized prompt where\n * the content IS the page, a locked control where it is a launcher, a locked tile where it is a tile or an embed. The two\n * in-place forms keep the space the content had and open the same feature dialog when chosen ({@link InPlaceFeatureLock}), so a\n * fence met inside a page never breaks its layout or adds a page heading.\n *\n * A view declaring no requirement renders as it is, without touching the features context, so a view outside a\n * features provider (a test, a preview) is unaffected. While features load, availability is optimistic, as on every\n * engine gate: the frontend gate is where the person meets the fence, and the backend refuses the operations a view\n * calls whatever the page shows.\n */\nimport React from 'react';\nimport { FeatureUnavailabilityBehavior, type RequiredFeaturesConfig } from '@wildo-ai/saas-models';\n\nimport { FeatureUnavailablePrompt } from '~wildo-frontend-lib/components/feedback/features/feature-unavailable-prompt';\nimport { InPlaceFeatureLock } from './InPlaceFeatureLock';\nimport { RequiredFeaturesGatePresentation } from './required-features-gate-presentation';\nimport { useBillingAction } from '~wildo-frontend-lib/core/billing/useBillingAction';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { useOperationFeatureAvailability, type RequiredFeaturesCheckable } from './useOperationFeatureAvailability';\nimport { useFeatures } from './useFeatures';\n\nexport interface RequiredFeaturesGateProps {\n /** The view's declared requirement; absent, the content renders as it is. */\n requiredFeatures?: RequiredFeaturesConfig;\n /**\n * Render nothing until the features are known, instead of the optimistic \"available\" every engine gate assumes while\n * they load. For content that starts something a person sees appear and disappear (an onboarding wizard), as the\n * guidance layer waits for features before showing a flow with an audience requirement.\n */\n holdWhileLoading?: boolean;\n /** Where the content sits; PAGE when absent. */\n presentation?: RequiredFeaturesGatePresentation;\n /** The height the content would have had, so a locked TILE keeps it where its container does not size it (a chart). */\n lockedTileHeight?: number | string;\n children: React.ReactNode;\n}\n\nexport function RequiredFeaturesGate({\n requiredFeatures,\n holdWhileLoading = false,\n presentation = RequiredFeaturesGatePresentation.PAGE,\n lockedTileHeight,\n children,\n}: RequiredFeaturesGateProps): React.JSX.Element | null {\n if (!requiredFeatures) return <>{children}</>;\n return (\n <DeclaredRequirementGate requiredFeatures={requiredFeatures} holdWhileLoading={holdWhileLoading} presentation={presentation} lockedTileHeight={lockedTileHeight}>\n {children}\n </DeclaredRequirementGate>\n );\n}\n\nfunction DeclaredRequirementGate({ requiredFeatures, holdWhileLoading, presentation, lockedTileHeight, children }: {\n requiredFeatures: RequiredFeaturesConfig;\n holdWhileLoading: boolean;\n presentation: RequiredFeaturesGatePresentation;\n lockedTileHeight?: number | string;\n children: React.ReactNode;\n}): React.JSX.Element | null {\n const { isLoading } = useFeatures();\n const operation = React.useMemo(\n () => ({ requiredFeatures, operationIdentifier: 'VIEW_ACCESS' }) as RequiredFeaturesCheckable as FrontendResourceConfiguration_Operation,\n [requiredFeatures],\n );\n const availability = useOperationFeatureAvailability(operation);\n const billingAction = useBillingAction();\n\n if (holdWhileLoading && isLoading) return null;\n if (!availability || availability.isAvailable) return <>{children}</>;\n // Inside a page, a hidden view is simply not there: the person stays where they are.\n if (availability.behavior === FeatureUnavailabilityBehavior.HIDE) return null;\n if (presentation !== RequiredFeaturesGatePresentation.PAGE) {\n return (\n <InPlaceFeatureLock availability={availability} presentation={presentation} lockedTileHeight={lockedTileHeight} onAction={() => billingAction(availability)}>\n {children}\n </InPlaceFeatureLock>\n );\n }\n return (\n <FeatureUnavailablePrompt\n behavior={availability.behavior}\n missingFeatures={availability.missingFeatures}\n limitInfo={availability.limitInfo}\n upgradeOptionsCount={availability.upgradeOptions?.length}\n customComponentRef={availability.customComponentRef}\n onDismiss={undefined}\n onAction={() => billingAction(availability)}\n />\n );\n}\n"]}
@@ -5,6 +5,12 @@ interface FeaturePolicyPermissions {
5
5
  }
6
6
  interface ResolveFeatureUnavailabilityBehaviorParams {
7
7
  billingEnabled: boolean;
8
+ /**
9
+ * Whether THIS person can buy for the current scope: read its billing account and open checkout
10
+ * (`BillingContextType.mayPurchase`). Required on purpose, so no caller can leave it out: a billing prompt shown to
11
+ * someone who cannot buy is an upgrade button that opens nothing.
12
+ */
13
+ mayPurchase: boolean;
8
14
  featureDef: FeatureDefinition | undefined;
9
15
  policy: FeatureConfiguration['unavailabilityPolicy'];
10
16
  reason: string;
@@ -1 +1 @@
1
- {"version":3,"file":"feature-unavailability.frontend.utils.d.ts","sourceRoot":"","sources":["../../../../src/core/features/feature-unavailability.frontend.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,UAAU,wBAAwB;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;CACjD;AAED,UAAU,0CAA0C;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC1C,MAAM,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAQD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,EACxD,qBAAqB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/C,MAAM,EAAE,CAYV;AAgBD;;;GAGG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,0CAA0C,GACjD;IACD,QAAQ,EAAE,6BAA6B,CAAC;IACxC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CA2FA"}
1
+ {"version":3,"file":"feature-unavailability.frontend.utils.d.ts","sourceRoot":"","sources":["../../../../src/core/features/feature-unavailability.frontend.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,UAAU,wBAAwB;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;CACjD;AAED,UAAU,0CAA0C;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC1C,MAAM,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAQD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,EACxD,qBAAqB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/C,MAAM,EAAE,CAYV;AAiCD;;;GAGG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,0CAA0C,GACjD;IACD,QAAQ,EAAE,6BAA6B,CAAC;IACxC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAiGA"}