@persona/design-system 0.7.2 → 0.8.0

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 (548) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/Accordion.d.mts +1 -1
  3. package/dist/AccordionItem.d.mts +1 -1
  4. package/dist/{Action-Cyo6KCsS.d.mts → Action-B-AiHknZ.d.mts} +3 -3
  5. package/dist/Action.d.mts +1 -1
  6. package/dist/AdvancedFilterRuleRow.d.mts +2 -2
  7. package/dist/AdvancedFilterRulesPopover.d.mts +2 -2
  8. package/dist/ArrayValueControl.d.mts +1 -1
  9. package/dist/Attribute.d.mts +3 -3
  10. package/dist/{Badge-BD0Ut46g.mjs → Badge-COqUjFQu.mjs} +2 -2
  11. package/dist/{Badge-BD0Ut46g.mjs.map → Badge-COqUjFQu.mjs.map} +1 -1
  12. package/dist/BooleanValueControl.d.mts +1 -1
  13. package/dist/{Breadcrumb-CYXkrKXl.d.mts → Breadcrumb-DRFY46ZW.d.mts} +1 -1
  14. package/dist/Breadcrumb.d.mts +1 -1
  15. package/dist/{Breadcrumbs-CP7eUYUy.d.mts → Breadcrumbs-DUSbT1I7.d.mts} +2 -2
  16. package/dist/{Breadcrumbs-CrXfUK1V.mjs → Breadcrumbs-DXS7rU7_.mjs} +5 -5
  17. package/dist/{Breadcrumbs-CrXfUK1V.mjs.map → Breadcrumbs-DXS7rU7_.mjs.map} +1 -1
  18. package/dist/Breadcrumbs.d.mts +1 -1
  19. package/dist/{Button-Dhiund3f.d.mts → Button-xZ6DC5XC.d.mts} +4 -4
  20. package/dist/Button.d.mts +1 -1
  21. package/dist/{Calendar-CMeIZ0BO.d.mts → Calendar-dPmo2dkj.d.mts} +1 -1
  22. package/dist/Calendar.d.mts +1 -1
  23. package/dist/CalendarBase.d.mts +1 -1
  24. package/dist/{Card-DCYB_mtR.d.mts → Card-CUeM8Lh8.d.mts} +3 -3
  25. package/dist/Card.d.mts +1 -1
  26. package/dist/{CardV2-M3o4BELp.mjs → CardV2-D9p7D7jX.mjs} +9 -7
  27. package/dist/{CardV2-M3o4BELp.mjs.map → CardV2-D9p7D7jX.mjs.map} +1 -1
  28. package/dist/{Checkbox-AjL7ucoR.mjs → Checkbox-DQynkc_I.mjs} +3 -3
  29. package/dist/{Checkbox-AjL7ucoR.mjs.map → Checkbox-DQynkc_I.mjs.map} +1 -1
  30. package/dist/{Checkbox-fWj7GkBl.d.mts → Checkbox-DoJpxPEz.d.mts} +1 -1
  31. package/dist/Checkbox.d.mts +1 -1
  32. package/dist/CheckboxGroupField.d.mts +1 -1
  33. package/dist/ChoicesValueControl.d.mts +1 -1
  34. package/dist/{Combobox-C2b9u955.mjs → Combobox-C_kCY3P3.mjs} +23 -10
  35. package/dist/Combobox-C_kCY3P3.mjs.map +1 -0
  36. package/dist/{Combobox-CC-Osr57.d.mts → Combobox-D7hyf-jA.d.mts} +3 -3
  37. package/dist/Combobox.d.mts +2 -2
  38. package/dist/{ComboboxBase-Evo0FRxP.d.mts → ComboboxBase-BMCY6O7Y.d.mts} +8 -5
  39. package/dist/ComboboxBase.d.mts +1 -1
  40. package/dist/{ComboboxMultiSelect-CvAc0FT3.d.mts → ComboboxMultiSelect-L0KYMkmm.d.mts} +2 -2
  41. package/dist/ComboboxMultiSelect.d.mts +1 -1
  42. package/dist/{ComboboxSingleSelect-CBm7x0oh.d.mts → ComboboxSingleSelect-v5oNrJ7M.d.mts} +4 -4
  43. package/dist/ComboboxSingleSelect.d.mts +1 -1
  44. package/dist/{CompactBar-D_2qMK4y.d.mts → CompactBar-DjFaUAsN.d.mts} +4 -4
  45. package/dist/CompactBar.d.mts +1 -1
  46. package/dist/{ConfigFormGroup-Cz7GeTYd.mjs → ConfigFormGroup-DLOZOuLf.mjs} +2 -2
  47. package/dist/{ConfigFormGroup-Cz7GeTYd.mjs.map → ConfigFormGroup-DLOZOuLf.mjs.map} +1 -1
  48. package/dist/{ControlBar-B7j9sOr9.d.mts → ControlBar-Cegjxa6-.d.mts} +7 -2
  49. package/dist/ControlBar.d.mts +1 -1
  50. package/dist/DataTable.d.mts +4 -3
  51. package/dist/{DateField-BamAk9_w.d.mts → DateField-Dk5ykLdr.d.mts} +2 -2
  52. package/dist/DateField.d.mts +1 -1
  53. package/dist/{DatePicker-IgiUI3Wj.mjs → DatePicker-C7z1yodK.mjs} +77 -42
  54. package/dist/DatePicker-C7z1yodK.mjs.map +1 -0
  55. package/dist/{DatePicker-C3xNSkPG.d.mts → DatePicker-Dtvv0V45.d.mts} +2 -2
  56. package/dist/DatePicker.d.mts +1 -1
  57. package/dist/{DateRangePicker-C4QKMo2a.d.mts → DateRangePicker-HPYsa4wC.d.mts} +3 -3
  58. package/dist/DateRangePicker.d.mts +1 -1
  59. package/dist/DateRangeValueControl.d.mts +5 -3
  60. package/dist/DateValueControl.d.mts +8 -5
  61. package/dist/{DropdownButton-BWiXLMfD.mjs → DropdownButton-CQrFHOIW.mjs} +3 -3
  62. package/dist/{DropdownButton-BWiXLMfD.mjs.map → DropdownButton-CQrFHOIW.mjs.map} +1 -1
  63. package/dist/DropdownButton.d.mts +2 -2
  64. package/dist/{DropdownMenu-DL5ye-0m.d.mts → DropdownMenu-D1qvgGTZ.d.mts} +2 -2
  65. package/dist/{DropdownMenu-CuKSNxc9.mjs → DropdownMenu-rm9Nnxn7.mjs} +7 -2
  66. package/dist/DropdownMenu-rm9Nnxn7.mjs.map +1 -0
  67. package/dist/DropdownMenu.d.mts +1 -1
  68. package/dist/{ErrorProps-BA0-m_Wp.d.mts → ErrorProps-B8-Mqf1W.d.mts} +1 -1
  69. package/dist/ErrorProps.d.mts +1 -1
  70. package/dist/{FieldRegistry-bKxrF1gC.d.mts → FieldRegistry-0LmSQ-jc.d.mts} +2 -2
  71. package/dist/FieldRegistry.d.mts +1 -1
  72. package/dist/{FilterBar-DhlBLWxw.d.mts → FilterBar-BMM4Swbt.d.mts} +11 -4
  73. package/dist/FilterBar.d.mts +1 -1
  74. package/dist/FilterPickerMenu.d.mts +2 -2
  75. package/dist/FilterPill.d.mts +1 -1
  76. package/dist/FilterPopover.d.mts +1 -1
  77. package/dist/FloatValueControl.d.mts +1 -1
  78. package/dist/{FormControl-DnfZTli_.mjs → FormControl-DXrxoJLl.mjs} +3 -3
  79. package/dist/{FormControl-DnfZTli_.mjs.map → FormControl-DXrxoJLl.mjs.map} +1 -1
  80. package/dist/{FormControl-D5xyPkST.d.mts → FormControl-Dg8doZq2.d.mts} +2 -2
  81. package/dist/FormControl.d.mts +1 -1
  82. package/dist/FormControlLabel.d.mts +1 -1
  83. package/dist/{FormField-BJZUj6jg.d.mts → FormField-BeLigf9j.d.mts} +2 -2
  84. package/dist/{FormField-74TPV8-8.mjs → FormField-Crp3F-hv.mjs} +16 -16
  85. package/dist/{FormField-74TPV8-8.mjs.map → FormField-Crp3F-hv.mjs.map} +1 -1
  86. package/dist/FormField.d.mts +1 -1
  87. package/dist/{Grid-DOyYYsvk.mjs → Grid-eMLuyRzV.mjs} +1 -1
  88. package/dist/{Grid-DOyYYsvk.mjs.map → Grid-eMLuyRzV.mjs.map} +1 -1
  89. package/dist/{Header-BqEKkEp5.d.mts → Header-DxJ6TfPw.d.mts} +1 -1
  90. package/dist/Header.d.mts +1 -1
  91. package/dist/{HelperTooltip-mOVSuEB8.d.mts → HelperTooltip-DcyrpEZI.d.mts} +2 -2
  92. package/dist/HelperTooltip.d.mts +1 -1
  93. package/dist/{HoverCopyableField-CN3gl0ny.mjs → HoverCopyableField-12bBuG-d.mjs} +3 -3
  94. package/dist/{HoverCopyableField-CN3gl0ny.mjs.map → HoverCopyableField-12bBuG-d.mjs.map} +1 -1
  95. package/dist/{IconButton-CjPFhpVG.d.mts → IconButton-BUMMN-gH.d.mts} +2 -2
  96. package/dist/{IconButton-CqTPMhjV.mjs → IconButton-CCLMYWVN.mjs} +1 -1
  97. package/dist/{IconButton-CqTPMhjV.mjs.map → IconButton-CCLMYWVN.mjs.map} +1 -1
  98. package/dist/IconButton.d.mts +1 -1
  99. package/dist/ImageTile.d.mts +1 -1
  100. package/dist/InlineCombobox.d.mts +1 -1
  101. package/dist/InlineInput.d.mts +1 -1
  102. package/dist/{Input-CZ_6KWDN.d.mts → Input-2N2e5JCf.d.mts} +3 -3
  103. package/dist/{Input-C_3QwAAt.mjs → Input-Cl4o41k4.mjs} +7 -3
  104. package/dist/Input-Cl4o41k4.mjs.map +1 -0
  105. package/dist/Input.d.mts +1 -1
  106. package/dist/{InputProps-lag6BM5h.d.mts → InputProps-TWzig3QO.d.mts} +2 -2
  107. package/dist/InputProps.d.mts +1 -1
  108. package/dist/IntegerValueControl.d.mts +1 -1
  109. package/dist/Link-I9Bklen-.mjs +79 -0
  110. package/dist/Link-I9Bklen-.mjs.map +1 -0
  111. package/dist/Link.d.mts +1 -1
  112. package/dist/{ListBox-nYAdYVQx.d.mts → ListBox-BcoXOt73.d.mts} +3 -3
  113. package/dist/{ListBox-D4j4LCT3.mjs → ListBox-sqeLBiKS.mjs} +33 -16
  114. package/dist/ListBox-sqeLBiKS.mjs.map +1 -0
  115. package/dist/ListBox.d.mts +1 -1
  116. package/dist/ListBoxField.d.mts +2 -2
  117. package/dist/{LoadingShimmer-Dizk2sZu.mjs → LoadingShimmer-dRSkdlqD.mjs} +13 -8
  118. package/dist/LoadingShimmer-dRSkdlqD.mjs.map +1 -0
  119. package/dist/LoadingShimmer.d.mts +1 -1
  120. package/dist/{LogicRow-k4ZPtjN0.d.mts → LogicRow-DXywXdYt.d.mts} +3 -3
  121. package/dist/LogicRow.d.mts +1 -1
  122. package/dist/MaskedInput.d.mts +1 -1
  123. package/dist/{Menu-Bu7-KBhp.d.mts → Menu-BekLwm8w.d.mts} +3 -3
  124. package/dist/{Menu-Cd6oxjAe.mjs → Menu-CwlI7BMN.mjs} +1 -1
  125. package/dist/{Menu-Cd6oxjAe.mjs.map → Menu-CwlI7BMN.mjs.map} +1 -1
  126. package/dist/Menu.d.mts +1 -1
  127. package/dist/{Modal-BN0K8QXi.mjs → Modal-CMiFcXC9.mjs} +6 -4
  128. package/dist/Modal-CMiFcXC9.mjs.map +1 -0
  129. package/dist/{Modal-Dwq-QBw_.d.mts → Modal-ymxlGYKt.d.mts} +2 -2
  130. package/dist/Modal.d.mts +1 -1
  131. package/dist/{PageHeader-BTtm3hRQ.mjs → PageHeader-D_0p7UK_.mjs} +2 -2
  132. package/dist/{PageHeader-BTtm3hRQ.mjs.map → PageHeader-D_0p7UK_.mjs.map} +1 -1
  133. package/dist/PageHeader.d.mts +1 -1
  134. package/dist/{PageSelector-CeGC84N1.d.mts → PageSelector-Bxulu6vU.d.mts} +3 -3
  135. package/dist/PageSelector.d.mts +1 -1
  136. package/dist/{Pagination-CPd4mSnw.mjs → Pagination-Co9CfyFQ.mjs} +5 -5
  137. package/dist/{Pagination-CPd4mSnw.mjs.map → Pagination-Co9CfyFQ.mjs.map} +1 -1
  138. package/dist/{Pagination-H-CcXrCD.d.mts → Pagination-Dg-4O7F7.d.mts} +2 -2
  139. package/dist/Pagination.d.mts +1 -1
  140. package/dist/{Pii-Dz4woKd8.mjs → Pii-JGV9gP95.mjs} +2 -2
  141. package/dist/{Pii-Dz4woKd8.mjs.map → Pii-JGV9gP95.mjs.map} +1 -1
  142. package/dist/{PillShell-BQC-k7Rl.d.mts → PillShell-BA7KK1zS.d.mts} +2 -2
  143. package/dist/PillShell.d.mts +1 -1
  144. package/dist/{Popover-opVa9Xhc.mjs → Popover-ZAj03lws.mjs} +15 -2
  145. package/dist/Popover-ZAj03lws.mjs.map +1 -0
  146. package/dist/{ProgressIndicator-3A4Aqci6.mjs → ProgressIndicator-CQg08vuA.mjs} +3 -3
  147. package/dist/ProgressIndicator-CQg08vuA.mjs.map +1 -0
  148. package/dist/{ProgressIndicator-DbOLOaxJ.d.mts → ProgressIndicator-D85HQGSx.d.mts} +1 -1
  149. package/dist/ProgressIndicator.d.mts +1 -1
  150. package/dist/{PseudoClassProps-CHtBNv8B.d.mts → PseudoClassProps-BHs8TX_3.d.mts} +1 -1
  151. package/dist/PseudoClassProps.d.mts +1 -1
  152. package/dist/{Radio-Cxt89w8s.mjs → Radio-CYV290JI.mjs} +2 -2
  153. package/dist/{Radio-Cxt89w8s.mjs.map → Radio-CYV290JI.mjs.map} +1 -1
  154. package/dist/{RadioGroup-BjrfVPZQ.d.mts → RadioGroup-Cq3KV1TN.d.mts} +1 -1
  155. package/dist/{RadioGroup-B6Cg1kdm.mjs → RadioGroup-lWMMtu9V.mjs} +2 -2
  156. package/dist/{RadioGroup-B6Cg1kdm.mjs.map → RadioGroup-lWMMtu9V.mjs.map} +1 -1
  157. package/dist/RadioGroup.d.mts +1 -1
  158. package/dist/{RangeCalendar-CPnLaM-J.d.mts → RangeCalendar-Mh7h74Tp.d.mts} +2 -2
  159. package/dist/RangeCalendar.d.mts +1 -1
  160. package/dist/RangeCalendarPresets.d.mts +1 -1
  161. package/dist/{RouterContext-CbvHIl4K.d.mts → RouterContext-B3IU1jb0.d.mts} +2 -2
  162. package/dist/RouterContext.d.mts +1 -1
  163. package/dist/{RouterLink-v9AG9fYa.d.mts → RouterLink-CwAqTLC2.d.mts} +2 -2
  164. package/dist/RouterLink.d.mts +1 -1
  165. package/dist/RuleEditorFields.d.mts +2 -2
  166. package/dist/RulesPill.d.mts +1 -1
  167. package/dist/{SearchInput-CIjwmT8R.d.mts → SearchInput-BGyUUcoz.d.mts} +2 -2
  168. package/dist/SearchInput.d.mts +1 -1
  169. package/dist/SectionHeading.d.mts +1 -1
  170. package/dist/{SegmentedControl-BcwfLuHA.mjs → SegmentedControl-BEbIcV3g.mjs} +3 -3
  171. package/dist/SegmentedControl-BEbIcV3g.mjs.map +1 -0
  172. package/dist/{SegmentedControl-Crr_aHAs.d.mts → SegmentedControl-DgDabSgr.d.mts} +1 -1
  173. package/dist/SegmentedControl.d.mts +1 -1
  174. package/dist/{Select-CJQeuCiF.d.mts → Select-wqTtGyga.d.mts} +3 -3
  175. package/dist/{Select-BstCz8P1.mjs → Select-yC2t_gZb.mjs} +10 -8
  176. package/dist/Select-yC2t_gZb.mjs.map +1 -0
  177. package/dist/Select.d.mts +1 -1
  178. package/dist/{Spinner-DplDSBqf.mjs → Spinner-BlAg8_OX.mjs} +1 -1
  179. package/dist/{Spinner-DplDSBqf.mjs.map → Spinner-BlAg8_OX.mjs.map} +1 -1
  180. package/dist/{Stack-ChsImaEY.mjs → Stack-Bkn0TUDe.mjs} +1 -1
  181. package/dist/{Stack-ChsImaEY.mjs.map → Stack-Bkn0TUDe.mjs.map} +1 -1
  182. package/dist/{Stack-RVptVTVi.d.mts → Stack-CYqjBXe8.d.mts} +1 -1
  183. package/dist/Stack.d.mts +1 -1
  184. package/dist/StatusIndicator-DT2zNbkp.mjs +315 -0
  185. package/dist/StatusIndicator-DT2zNbkp.mjs.map +1 -0
  186. package/dist/{Sticker-C3Eb13OQ.mjs → Sticker-BLbgJxcH.mjs} +5 -8
  187. package/dist/Sticker-BLbgJxcH.mjs.map +1 -0
  188. package/dist/{Sticker-BVX38LKi.d.mts → Sticker-BmyKaxwx.d.mts} +4 -4
  189. package/dist/Sticker.d.mts +1 -1
  190. package/dist/StringValueControl.d.mts +1 -1
  191. package/dist/Tab.d.mts +1 -1
  192. package/dist/{TabBar-BepWbJHz.mjs → TabBar-Bj84q1Mr.mjs} +4 -7
  193. package/dist/{TabBar-BepWbJHz.mjs.map → TabBar-Bj84q1Mr.mjs.map} +1 -1
  194. package/dist/{Table-DFiSWroB.d.mts → Table-DhdHUQ8V.d.mts} +1 -1
  195. package/dist/{Table-B1gRr2XT.mjs → Table-WqNfjasd.mjs} +22 -3
  196. package/dist/Table-WqNfjasd.mjs.map +1 -0
  197. package/dist/Table.d.mts +1 -1
  198. package/dist/{TableBody-Di9JYHDN.d.mts → TableBody-qoSvQDds.d.mts} +1 -1
  199. package/dist/TableBody.d.mts +1 -1
  200. package/dist/{TableBox-DAQ3Plqx.mjs → TableBox-obl64W5Y.mjs} +22 -17
  201. package/dist/TableBox-obl64W5Y.mjs.map +1 -0
  202. package/dist/TableBox.d.mts +2 -2
  203. package/dist/{TableBoxCell-D6h1X5ph.d.mts → TableBoxCell-DzYMx4Ju.d.mts} +6 -6
  204. package/dist/TableBoxCell.d.mts +1 -1
  205. package/dist/TableBoxField.d.mts +3 -3
  206. package/dist/{TableBoxRow-C6l6J4mq.d.mts → TableBoxRow-B4rFCvWK.d.mts} +3 -3
  207. package/dist/TableBoxRow.d.mts +1 -1
  208. package/dist/{TableBoxRowActions-CsLN1b1J.d.mts → TableBoxRowActions-qMKcVuTL.d.mts} +2 -2
  209. package/dist/TableBoxRowActions.d.mts +1 -1
  210. package/dist/{TableCell-WSDXw79Q.d.mts → TableCell-CGPQRc5g.d.mts} +2 -2
  211. package/dist/TableCell.d.mts +1 -1
  212. package/dist/{TableControls-BxuPCUQS.mjs → TableControls-RS_ozBsI.mjs} +207 -66
  213. package/dist/TableControls-RS_ozBsI.mjs.map +1 -0
  214. package/dist/{TableControls-cswMgBAr.d.mts → TableControls-WP78qtET.d.mts} +4 -3
  215. package/dist/TableControls.d.mts +1 -1
  216. package/dist/{TableControlsContext-Cbh8wear.d.mts → TableControlsContext-DZIZSyfX.d.mts} +2 -2
  217. package/dist/TableControlsContext.d.mts +1 -1
  218. package/dist/{TableHead-CkL1fEg2.d.mts → TableHead-36j-_oyn.d.mts} +1 -1
  219. package/dist/TableHead.d.mts +1 -1
  220. package/dist/{TableHeaderCell-K9Ry6YqO.d.mts → TableHeaderCell-C7gp9j1X.d.mts} +1 -1
  221. package/dist/TableHeaderCell.d.mts +1 -1
  222. package/dist/{TableLayout-CYRGIFEl.d.mts → TableLayout-CQqIV0vj.d.mts} +1 -1
  223. package/dist/TableLayout.d.mts +1 -1
  224. package/dist/{TableRow-DMHlo1eg.d.mts → TableRow-BJZM8I8i.d.mts} +2 -2
  225. package/dist/TableRow.d.mts +1 -1
  226. package/dist/TableTH.d.mts +1 -1
  227. package/dist/{TableViewConfigurationDropdown-BRbOcVNc.d.mts → TableViewConfigurationDropdown-Dwy_9FBz.d.mts} +2 -2
  228. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  229. package/dist/{TechnicalSticker-_LtE-PRY.mjs → TechnicalSticker-CL0zkOAj.mjs} +1 -1
  230. package/dist/{TechnicalSticker-_LtE-PRY.mjs.map → TechnicalSticker-CL0zkOAj.mjs.map} +1 -1
  231. package/dist/{Text-B69gp3X_.d.mts → Text-DbtTa83E.d.mts} +3 -3
  232. package/dist/Text.d.mts +1 -1
  233. package/dist/{TextArea-Cjsdl07-.d.mts → TextArea-CbxF6u7z.d.mts} +2 -2
  234. package/dist/{TextArea-CcxltuBh.mjs → TextArea-CfZr5Sk4.mjs} +2 -2
  235. package/dist/{TextArea-CcxltuBh.mjs.map → TextArea-CfZr5Sk4.mjs.map} +1 -1
  236. package/dist/TextArea.d.mts +1 -1
  237. package/dist/{TextUnderlineTooltip-DDzKLCeX.d.mts → TextUnderlineTooltip-BgLQuK38.d.mts} +2 -2
  238. package/dist/TextUnderlineTooltip.d.mts +1 -1
  239. package/dist/Tile.d.mts +1 -1
  240. package/dist/Toast.d.mts +1 -1
  241. package/dist/{Toggle-B5sSdb_q.d.mts → Toggle-BYMLrPXk.d.mts} +1 -1
  242. package/dist/{Toggle-DWbJOwf3.mjs → Toggle-D4ZaUcVt.mjs} +9 -4
  243. package/dist/Toggle-D4ZaUcVt.mjs.map +1 -0
  244. package/dist/Toggle.d.mts +1 -1
  245. package/dist/{Tooltip-x1pFf-Mj.d.mts → Tooltip-4pshzB_i.d.mts} +2 -2
  246. package/dist/Tooltip.d.mts +1 -1
  247. package/dist/{TruncatedText-BE8FuEQm.d.mts → TruncatedText-O7hE3w0O.d.mts} +1 -1
  248. package/dist/VersionHistory.d.mts +23 -0
  249. package/dist/VersionHistoryItem-CIcEgl0K.d.mts +54 -0
  250. package/dist/VersionHistoryItem.d.mts +2 -0
  251. package/dist/WizardModal.d.mts +2 -2
  252. package/dist/{accordionTitleTypography-BYhjSN9t.d.mts → accordionTitleTypography-CNB1w3kn.d.mts} +2 -2
  253. package/dist/accordionTitleTypography.d.mts +1 -1
  254. package/dist/assertNever.d.mts +5 -0
  255. package/dist/{codec-BcgsGCHE.d.mts → codec-BXVBsB8Y.d.mts} +2 -2
  256. package/dist/codec.d.mts +1 -1
  257. package/dist/{color-LH7zKfKo.d.mts → color-3UO63ocQ.d.mts} +9 -4
  258. package/dist/components/Accordion/index.d.mts +1 -1
  259. package/dist/components/Accordion/index.mjs +1 -1
  260. package/dist/components/Attribute/index.mjs +2 -2
  261. package/dist/components/Badge/index.mjs +1 -1
  262. package/dist/components/Banner/index.mjs +1 -1
  263. package/dist/components/BottomPanel/index.mjs +5 -3
  264. package/dist/components/BottomPanel/index.mjs.map +1 -1
  265. package/dist/components/Breadcrumbs/index.d.mts +1 -1
  266. package/dist/components/Breadcrumbs/index.mjs +1 -1
  267. package/dist/components/Button/index.d.mts +2 -2
  268. package/dist/components/Button/index.mjs +1 -1
  269. package/dist/components/ButtonGroup/index.mjs +2 -2
  270. package/dist/components/Card/index.d.mts +2 -2
  271. package/dist/components/CardV2/index.d.mts +1 -1
  272. package/dist/components/CardV2/index.mjs +1 -1
  273. package/dist/components/Checkbox/index.d.mts +1 -1
  274. package/dist/components/Checkbox/index.mjs +1 -1
  275. package/dist/components/CodeHighlight/index.mjs +3 -1
  276. package/dist/components/CodeHighlight/index.mjs.map +1 -1
  277. package/dist/components/Combobox/index.d.mts +2 -2
  278. package/dist/components/Combobox/index.mjs +1 -1
  279. package/dist/components/ConfigFormGroup/index.mjs +2 -2
  280. package/dist/components/DataTable/TableControls/index.d.mts +19 -19
  281. package/dist/components/DataTable/TableControls/index.mjs +1 -1
  282. package/dist/components/DataTable/index.mjs +27 -16
  283. package/dist/components/DataTable/index.mjs.map +1 -1
  284. package/dist/components/DataTable/types.d.mts +2 -2
  285. package/dist/components/DatePicker/index.d.mts +5 -5
  286. package/dist/components/DatePicker/index.mjs +1 -1
  287. package/dist/components/DropdownButton/index.mjs +1 -1
  288. package/dist/components/DropdownMenu/index.d.mts +1 -1
  289. package/dist/components/DropdownMenu/index.mjs +1 -1
  290. package/dist/components/FloatingPanel/index.mjs +10 -7
  291. package/dist/components/FloatingPanel/index.mjs.map +1 -1
  292. package/dist/components/FormControl/index.d.mts +2 -2
  293. package/dist/components/FormControl/index.mjs +2 -2
  294. package/dist/components/FormField/index.d.mts +1 -1
  295. package/dist/components/FormField/index.mjs +1 -1
  296. package/dist/components/Grid/index.mjs +1 -1
  297. package/dist/components/HoverCopyableField/index.mjs +1 -1
  298. package/dist/components/ImageTile/index.mjs +13 -9
  299. package/dist/components/ImageTile/index.mjs.map +1 -1
  300. package/dist/components/Input/index.d.mts +1 -1
  301. package/dist/components/Input/index.mjs +1 -1
  302. package/dist/components/Link/index.mjs +1 -78
  303. package/dist/components/ListBox/index.d.mts +3 -3
  304. package/dist/components/ListBox/index.mjs +1 -1
  305. package/dist/components/LoadingShimmer/index.mjs +1 -1
  306. package/dist/components/MaskedInput/index.mjs +1 -1
  307. package/dist/components/Menu/index.d.mts +1 -1
  308. package/dist/components/Menu/index.mjs +1 -1
  309. package/dist/components/Modal/index.d.mts +1 -1
  310. package/dist/components/Modal/index.mjs +1 -1
  311. package/dist/components/PageHeader/index.mjs +1 -1
  312. package/dist/components/Pagination/index.d.mts +3 -3
  313. package/dist/components/Pagination/index.mjs +1 -1
  314. package/dist/components/Pii/index.mjs +1 -1
  315. package/dist/components/Popover/index.mjs +1 -1
  316. package/dist/components/ProgressBar/index.mjs +1 -2
  317. package/dist/components/ProgressBar/index.mjs.map +1 -1
  318. package/dist/components/ProgressIndicator/index.d.mts +1 -1
  319. package/dist/components/ProgressIndicator/index.mjs +1 -1
  320. package/dist/components/Radio/index.mjs +1 -1
  321. package/dist/components/RadioGroup/index.d.mts +1 -1
  322. package/dist/components/RadioGroup/index.mjs +1 -1
  323. package/dist/components/RightPanel/index.mjs +10 -7
  324. package/dist/components/RightPanel/index.mjs.map +1 -1
  325. package/dist/components/SegmentedControl/index.d.mts +1 -1
  326. package/dist/components/SegmentedControl/index.mjs +1 -1
  327. package/dist/components/Select/index.d.mts +1 -1
  328. package/dist/components/Select/index.mjs +1 -1
  329. package/dist/components/Slider/index.mjs +1 -1
  330. package/dist/components/Slider/index.mjs.map +1 -1
  331. package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +2 -105
  332. package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +1 -1
  333. package/dist/components/Spinner/index.mjs +1 -1
  334. package/dist/components/Stack/index.d.mts +1 -1
  335. package/dist/components/Stack/index.mjs +1 -1
  336. package/dist/components/StatusIndicator/index.mjs +1 -314
  337. package/dist/components/Sticker/index.d.mts +1 -1
  338. package/dist/components/Sticker/index.mjs +1 -1
  339. package/dist/components/TabBar/index.mjs +1 -1
  340. package/dist/components/Table/index.d.mts +8 -8
  341. package/dist/components/Table/index.mjs +1 -1
  342. package/dist/components/TableBox/index.d.mts +2 -2
  343. package/dist/components/TableBox/index.mjs +1 -1
  344. package/dist/components/TechnicalSticker/index.mjs +1 -1
  345. package/dist/components/Text/index.d.mts +1 -1
  346. package/dist/components/TextArea/index.d.mts +1 -1
  347. package/dist/components/TextArea/index.mjs +1 -1
  348. package/dist/components/Tile/index.mjs +2 -2
  349. package/dist/components/Toast/index.mjs +2 -2
  350. package/dist/components/Toast/index.mjs.map +1 -1
  351. package/dist/components/Toggle/index.d.mts +1 -1
  352. package/dist/components/Toggle/index.mjs +1 -1
  353. package/dist/components/Tooltip/index.d.mts +3 -3
  354. package/dist/components/VersionHistory/index.d.mts +3 -0
  355. package/dist/components/VersionHistory/index.mjs +389 -0
  356. package/dist/components/VersionHistory/index.mjs.map +1 -0
  357. package/dist/components/WizardModal/index.mjs +4 -4
  358. package/dist/compound-expression.d.mts +1 -1
  359. package/dist/{constants-BpwnTzcv.d.mts → constants-BOxzLX-O.d.mts} +1 -1
  360. package/dist/constants.d.mts +1 -1
  361. package/dist/{createPath-Bst12Uxr.d.mts → createPath-OeTC9kvS.d.mts} +2 -2
  362. package/dist/createPath.d.mts +1 -1
  363. package/dist/{date-filter-CZeChs9T.mjs → date-filter-BnzR6NxT.mjs} +1 -1
  364. package/dist/{date-filter-CZeChs9T.mjs.map → date-filter-BnzR6NxT.mjs.map} +1 -1
  365. package/dist/{date-range-rule-value-C4ir2Y8W.d.mts → date-range-rule-value-BRp5Bi7R.d.mts} +2 -2
  366. package/dist/date-range-rule-value.d.mts +1 -1
  367. package/dist/{date-rule-intent-gKmuxMVA.d.mts → date-rule-intent-CDBtV0ET.d.mts} +3 -3
  368. package/dist/date-rule-intent.d.mts +1 -1
  369. package/dist/display.d.mts +2 -2
  370. package/dist/fieldPickerOptions.d.mts +2 -2
  371. package/dist/{filter-size-context-BOpH6pBm.d.mts → filter-size-context-CqvQ190x.d.mts} +2 -2
  372. package/dist/filter-size-context.d.mts +1 -1
  373. package/dist/format-date-value.d.mts +5 -0
  374. package/dist/helpers.d.mts +1 -1
  375. package/dist/{index-C2-PBfN3.d.mts → index-BXSe73Xn.d.mts} +2 -2
  376. package/dist/{index-c0aXmZV9.d.mts → index-CyAok7As.d.mts} +2 -2
  377. package/dist/{index-BXdrzR0c.d.mts → index-wKK9f9La.d.mts} +3 -3
  378. package/dist/index.d.mts +1 -1
  379. package/dist/index2.d.mts +1 -1
  380. package/dist/index3.d.mts +3 -3
  381. package/dist/index4.d.mts +1 -1
  382. package/dist/index5.d.mts +14 -14
  383. package/dist/{input-DVJhMlxU.d.mts → input-C6cyiqm2.d.mts} +3 -3
  384. package/dist/inputFields.d.mts +10 -10
  385. package/dist/{intersperse-Bxcrxj2Q.mjs → intersperse-Df9zw7Bk.mjs} +1 -1
  386. package/dist/{intersperse-Bxcrxj2Q.mjs.map → intersperse-Df9zw7Bk.mjs.map} +1 -1
  387. package/dist/{jsonSchema-DmdZYC4a.d.mts → jsonSchema-CfGi1bzI.d.mts} +34 -2
  388. package/dist/lib/PDSProvider.d.mts +2 -2
  389. package/dist/lib/TruncatedText.d.mts +1 -1
  390. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  391. package/dist/lib/chainTypes.d.mts +17 -0
  392. package/dist/lib/chainTypes.mjs +0 -0
  393. package/dist/lib/color.d.mts +2 -2
  394. package/dist/lib/color.mjs +18 -11
  395. package/dist/lib/color.mjs.map +1 -1
  396. package/dist/lib/customFunctionSchema.d.mts +49 -0
  397. package/dist/lib/customFunctionSchema.mjs +299 -0
  398. package/dist/lib/customFunctionSchema.mjs.map +1 -0
  399. package/dist/lib/date-filter/index.d.mts +2 -2
  400. package/dist/lib/date-filter/index.mjs +1 -1
  401. package/dist/lib/jsonSchema.d.mts +2 -2
  402. package/dist/lib/jsonSchema.mjs +26 -1
  403. package/dist/lib/jsonSchema.mjs.map +1 -1
  404. package/dist/lib/jsonSchemaType.d.mts +7 -0
  405. package/dist/lib/jsonSchemaType.mjs +31 -0
  406. package/dist/lib/jsonSchemaType.mjs.map +1 -0
  407. package/dist/lib/letPointerDownReachDocument.d.mts +22 -0
  408. package/dist/lib/letPointerDownReachDocument.mjs +25 -0
  409. package/dist/lib/letPointerDownReachDocument.mjs.map +1 -0
  410. package/dist/lib/message.d.mts +1 -1
  411. package/dist/lib/methodChain.d.mts +3 -66
  412. package/dist/lib/methodChain.mjs +1 -237
  413. package/dist/lib/methodChainNormalize.d.mts +2 -2
  414. package/dist/lib/methodChainTypes.d.mts +2 -23
  415. package/dist/lib/objectSchemaTypes.d.mts +1 -1
  416. package/dist/lib/platformObject.d.mts +38 -0
  417. package/dist/lib/platformObject.mjs +79 -0
  418. package/dist/lib/platformObject.mjs.map +1 -0
  419. package/dist/lib/pseudoClass.d.mts +1 -1
  420. package/dist/lib/router/adapters/reactRouter.d.mts +1 -1
  421. package/dist/lib/router/adapters/tanstack.d.mts +1 -1
  422. package/dist/lib/router/index.d.mts +5 -5
  423. package/dist/lib/schemaOptions.d.mts +173 -0
  424. package/dist/lib/schemaOptions.mjs +481 -0
  425. package/dist/lib/schemaOptions.mjs.map +1 -0
  426. package/dist/lib/semanticColor.d.mts +1 -1
  427. package/dist/lib/snakifyPath.d.mts +5 -0
  428. package/dist/lib/snakifyPath.mjs +11 -0
  429. package/dist/lib/snakifyPath.mjs.map +1 -0
  430. package/dist/{message-CKSLIKF0.d.mts → message-CblP0EjG.d.mts} +1 -1
  431. package/dist/methodChain-DAQxLgxt.mjs +241 -0
  432. package/dist/methodChain-DAQxLgxt.mjs.map +1 -0
  433. package/dist/methodChain-Pk1C3i_E.d.mts +66 -0
  434. package/dist/methodChainTypes-CqWzfx0M.d.mts +23 -0
  435. package/dist/mixins/focus.d.mts +1 -1
  436. package/dist/mixins/hoverable.d.mts +2 -2
  437. package/dist/mixins/input.d.mts +1 -1
  438. package/dist/mixins/input.mjs +6 -14
  439. package/dist/mixins/input.mjs.map +1 -1
  440. package/dist/mixins/menuItem.d.mts +2 -2
  441. package/dist/mixins/scrollbar.d.mts +10 -0
  442. package/dist/mixins/scrollbar.mjs +31 -0
  443. package/dist/mixins/scrollbar.mjs.map +1 -0
  444. package/dist/mixins/text.d.mts +1 -1
  445. package/dist/{operators-1_jTgYRX.d.mts → operators-CoXL5Hv6.d.mts} +2 -2
  446. package/dist/operators.d.mts +1 -1
  447. package/dist/{palette-CMOEyNPH.d.mts → palette-CxXUs1Fu.d.mts} +3 -3
  448. package/dist/palette.d.mts +1 -1
  449. package/dist/patterns/LayoutLoadingShimmer/index.mjs +5 -5
  450. package/dist/patterns/PageLayout/index.mjs +2 -2
  451. package/dist/reactRouterFallback.d.mts +1 -1
  452. package/dist/relative-date-label.d.mts +1 -1
  453. package/dist/{semantic-BXwNUd4a.d.mts → semantic-CFMBsuiJ.d.mts} +2 -2
  454. package/dist/{semanticColor-Cru2gSys.d.mts → semanticColor-DuJCmDrH.d.mts} +3 -3
  455. package/dist/{text-CxIup7HJ.d.mts → text-D8HPjiEX.d.mts} +1 -1
  456. package/dist/{theme-CW6qlONZ.d.mts → theme-BcaR-Au5.d.mts} +3 -3
  457. package/dist/theme.d.mts +1 -1
  458. package/dist/time-range.d.mts +7 -0
  459. package/dist/tone.d.mts +3 -3
  460. package/dist/{types-ChkiGhjQ.d.mts → types-BCiq4hGv.d.mts} +1 -1
  461. package/dist/types-BGMmkUpy.d.mts +105 -0
  462. package/dist/{types-BEjWTkZV.d.mts → types-C4WUSW3e.d.mts} +7 -2
  463. package/dist/{types-B-stjYNc.d.mts → types-CkpixGWr.d.mts} +1 -1
  464. package/dist/{types-YojUycQK.d.mts → types-Cl-w8tYc.d.mts} +1 -1
  465. package/dist/{types-3iEDsymE.d.mts → types-CoVZwrMW.d.mts} +2 -2
  466. package/dist/{types-g-aqbnek.d.mts → types-DgyGecdM.d.mts} +1 -1
  467. package/dist/types.d.mts +1 -1
  468. package/dist/types2.d.mts +1 -1
  469. package/dist/types3.d.mts +1 -1
  470. package/dist/types4.d.mts +1 -1
  471. package/dist/types5.d.mts +1 -1
  472. package/dist/types6.d.mts +1 -1
  473. package/dist/{url-state-CHK2N2fA.d.mts → url-state-8j_ef8Uf.d.mts} +2 -2
  474. package/dist/url-state.d.mts +1 -1
  475. package/dist/useComboboxFooterAction.d.mts +1 -1
  476. package/dist/{useFilterStateV2-B26e5iUx.d.mts → useFilterStateV2-CW6eght1.d.mts} +3 -3
  477. package/dist/useFilterStateV2.d.mts +1 -1
  478. package/dist/{useFormField-DPFClB5h.d.mts → useFormField-CLRZkUZt.d.mts} +2 -2
  479. package/dist/{useFormField-BzhMbl5P.mjs → useFormField-XezSxho_.mjs} +2 -2
  480. package/dist/{useFormField-BzhMbl5P.mjs.map → useFormField-XezSxho_.mjs.map} +1 -1
  481. package/dist/useFormField.d.mts +1 -1
  482. package/dist/{useFormGroup-CH3kiXoa.mjs → useFormGroup-C7Cax8zO.mjs} +1 -1
  483. package/dist/{useFormGroup-CH3kiXoa.mjs.map → useFormGroup-C7Cax8zO.mjs.map} +1 -1
  484. package/dist/{useLocationPathname-CnRd_Rzn.d.mts → useLocationPathname-DH5Tdq5X.d.mts} +1 -1
  485. package/dist/useLocationPathname.d.mts +1 -1
  486. package/dist/{useTableBoxDragAndDrop-DWlG5vhl.d.mts → useTableBoxDragAndDrop-Da4TiYBT.d.mts} +1 -1
  487. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  488. package/dist/useTruncation.d.mts +1 -1
  489. package/dist/{utilities-BcGuP8Fd.d.mts → utilities-DcsbI71T.d.mts} +1 -1
  490. package/dist/utilities.d.mts +1 -1
  491. package/dist/utils/storybook.mjs +1 -1
  492. package/dist/utils/testing.d.mts +1 -1
  493. package/dist/utils.d.mts +1 -1
  494. package/dist/{validation-B-Om4ANo.d.mts → validation-BgwNghi2.d.mts} +3 -3
  495. package/dist/validation.d.mts +1 -1
  496. package/dist/{value-control-resolver-BiyhB8zt.d.mts → value-control-resolver-B0HDRxRN.d.mts} +3 -2
  497. package/dist/value-control-resolver.d.mts +1 -1
  498. package/dist/variables/effect.d.mts +1 -1
  499. package/dist/variables/semantic.d.mts +1 -1
  500. package/dist/variables/semantic.mjs +15 -18
  501. package/dist/variables/semantic.mjs.map +1 -1
  502. package/package.json +23 -4
  503. package/skills/ui-authoring/COMPONENTS.md +1 -0
  504. package/dist/Combobox-C2b9u955.mjs.map +0 -1
  505. package/dist/DatePicker-IgiUI3Wj.mjs.map +0 -1
  506. package/dist/DropdownMenu-CuKSNxc9.mjs.map +0 -1
  507. package/dist/Input-C_3QwAAt.mjs.map +0 -1
  508. package/dist/ListBox-D4j4LCT3.mjs.map +0 -1
  509. package/dist/LoadingShimmer-Dizk2sZu.mjs.map +0 -1
  510. package/dist/Modal-BN0K8QXi.mjs.map +0 -1
  511. package/dist/Popover-opVa9Xhc.mjs.map +0 -1
  512. package/dist/ProgressIndicator-3A4Aqci6.mjs.map +0 -1
  513. package/dist/SegmentedControl-BcwfLuHA.mjs.map +0 -1
  514. package/dist/Select-BstCz8P1.mjs.map +0 -1
  515. package/dist/Sticker-C3Eb13OQ.mjs.map +0 -1
  516. package/dist/Table-B1gRr2XT.mjs.map +0 -1
  517. package/dist/TableBox-DAQ3Plqx.mjs.map +0 -1
  518. package/dist/TableControls-BxuPCUQS.mjs.map +0 -1
  519. package/dist/Toggle-DWbJOwf3.mjs.map +0 -1
  520. package/dist/components/Link/index.mjs.map +0 -1
  521. package/dist/components/StatusIndicator/index.mjs.map +0 -1
  522. package/dist/lib/methodChain.mjs.map +0 -1
  523. /package/dist/{index--p6oQT9I.d.mts → index-B24gUwOx.d.mts} +0 -0
  524. /package/dist/{index-BCh-G39Y2.d.mts → index-BFnNtGdX.d.mts} +0 -0
  525. /package/dist/{index-BMBcfD_R.d.mts → index-BNRXMhlr.d.mts} +0 -0
  526. /package/dist/{index-BO_854F2.d.mts → index-BPiqSRRl.d.mts} +0 -0
  527. /package/dist/{index-BOn0AAue.d.mts → index-BYd3Btr1.d.mts} +0 -0
  528. /package/dist/{index-BcsXXrHq.d.mts → index-B_BBnMou.d.mts} +0 -0
  529. /package/dist/{index-BwFl_eS0.d.mts → index-Bt4QNofW.d.mts} +0 -0
  530. /package/dist/{index-C-lwXyQ6.d.mts → index-C6HcjJiY.d.mts} +0 -0
  531. /package/dist/{index-C1o2TFfS.d.mts → index-CEqOS-7M.d.mts} +0 -0
  532. /package/dist/{index-C3kE54DD.d.mts → index-CIABef8t.d.mts} +0 -0
  533. /package/dist/{index-CREkvfw9.d.mts → index-CTHojwxd.d.mts} +0 -0
  534. /package/dist/{index-CRo77wc3.d.mts → index-CjDodOH2.d.mts} +0 -0
  535. /package/dist/{index-CfCYi7PF.d.mts → index-Cm-1i165.d.mts} +0 -0
  536. /package/dist/{index-CuYZJcK3.d.mts → index-DB7t8whN.d.mts} +0 -0
  537. /package/dist/{index-DCTy4zg0.d.mts → index-DBGd4WeR.d.mts} +0 -0
  538. /package/dist/{index-DWIh4oP5.d.mts → index-DGsJdI5l.d.mts} +0 -0
  539. /package/dist/{index-De7MV8-j.d.mts → index-DWfPppPU.d.mts} +0 -0
  540. /package/dist/{index-Dflz2i1X.d.mts → index-DeVKzGce.d.mts} +0 -0
  541. /package/dist/{index-DgJfEygr.d.mts → index-DedbSZMv.d.mts} +0 -0
  542. /package/dist/{index-DkrC-i1D.d.mts → index-Deol7ZWO.d.mts} +0 -0
  543. /package/dist/{index-DrK1_jKY.d.mts → index-Jh0C5PIG.d.mts} +0 -0
  544. /package/dist/{index-Es5nKSSL.d.mts → index-NKYLt_R9.d.mts} +0 -0
  545. /package/dist/{index-Wc1llEvP.d.mts → index-VWno75SQ.d.mts} +0 -0
  546. /package/dist/{index-bHnO4ZKt.d.mts → index-fxXoW-qc.d.mts} +0 -0
  547. /package/dist/{index-dhjtMp5F.d.mts → index-gVcIuWLd.d.mts} +0 -0
  548. /package/dist/{index-xmouCHX9.d.mts → index-zeAhjge4.d.mts} +0 -0
@@ -0,0 +1,173 @@
1
+ import { T as JsonSchemaTypes, b as JsonSchemaObjectKey, c as JsonSchemaBasicTypes, dt as ObjectSchemaMap, f as JsonSchemaCustomTypes, n as JsonSchema, st as FunctionJsonSchema, y as JsonSchemaObject } from "../jsonSchema-CfGi1bzI.mjs";
2
+ import { n as Chain, s as MethodChainNode } from "../methodChainTypes-CqWzfx0M.mjs";
3
+
4
+ //#region lib/schemaOptions.d.ts
5
+ type VariableSchemaObject = {
6
+ value: string;
7
+ schema?: JsonSchema | null;
8
+ isVariable?: boolean;
9
+ };
10
+ type Option = {
11
+ label: string;
12
+ value: string;
13
+ property: string;
14
+ schema: JsonSchema | FunctionJsonSchema;
15
+ methodChain: Chain | null;
16
+ utility?: boolean;
17
+ workflowObjectKey?: string;
18
+ isVariable?: boolean;
19
+ };
20
+ /**
21
+ * Extracts the top-level platform-object key from a schema's `$ref`/`$id`/
22
+ * `objectKey`/`objectType.const` markers. Collapses subtypes to their root
23
+ * (`/schema/verification/document/merged` -> `verification`) because callers
24
+ * compare against top-level `ApiModel` values.
25
+ */
26
+ declare const extractPlatformObjectKey: (schema: JsonSchema | null | undefined, platformObjectJsonSchema?: ObjectSchemaMap) => string | null;
27
+ type PossibleType = JsonSchemaTypes | JsonSchemaCustomTypes | JsonSchemaObjectKey;
28
+ type PossibleArrayType = JsonSchemaBasicTypes | JsonSchemaTypes.Object | JsonSchemaObjectKey;
29
+ declare const isValidOption: (schema: JsonSchema, allowedFieldPaths: string[], disallowedFieldPaths: string[], allowedTypes: PossibleType[], allowedArrayTypes: PossibleArrayType[], path: string[] | undefined, platformObjectJsonSchema: ObjectSchemaMap) => boolean;
30
+ declare const getSchemaOptions: ({
31
+ option,
32
+ optionFilters,
33
+ platformObjectJsonSchema,
34
+ primitiveUtilities,
35
+ digPrimitives
36
+ }: {
37
+ option: Pick<Option, "schema" | "methodChain">;
38
+ optionFilters?: OptionFilters;
39
+ platformObjectJsonSchema: ObjectSchemaMap;
40
+ primitiveUtilities: ObjectSchemaMap;
41
+ digPrimitives?: boolean;
42
+ }) => Option[];
43
+ declare const formatDisplayValue: (value: any) => string;
44
+ /**
45
+ * Resolves the schema at a dotted path (e.g. "account.birthDate").
46
+ * Tries direct key lookup first, then traverses into nested object .properties by path part.
47
+ * Normalizes kebab/snake at each level for key lookup.
48
+ */
49
+ declare function getSchemaByPath(properties: Record<string, JsonSchema> | null | undefined, path: string): JsonSchema | undefined;
50
+ declare const getSchemaForFieldPath: ({
51
+ path,
52
+ initialSchema,
53
+ platformObjectJsonSchema,
54
+ primitiveUtilities
55
+ }: {
56
+ path: string;
57
+ initialSchema: JsonSchema;
58
+ platformObjectJsonSchema?: ObjectSchemaMap;
59
+ primitiveUtilities?: ObjectSchemaMap;
60
+ }) => {
61
+ schema: JsonSchema | null;
62
+ propertyName: string | null;
63
+ };
64
+ /**
65
+ * Get the schema for a variable path from usableObjects.
66
+ */
67
+ declare const getSchemaForVariablePath: ({
68
+ path,
69
+ usableObjects
70
+ }: {
71
+ path: string;
72
+ usableObjects: VariableSchemaObject[];
73
+ }) => {
74
+ schema: JsonSchema | null;
75
+ propertyName: string | null;
76
+ };
77
+ declare const nextLinkSchema: ({
78
+ currentSchema,
79
+ nextLink,
80
+ platformObjectJsonSchema,
81
+ primitiveUtilities
82
+ }: {
83
+ currentSchema: JsonSchema | null;
84
+ nextLink: MethodChainNode;
85
+ platformObjectJsonSchema: ObjectSchemaMap;
86
+ primitiveUtilities: ObjectSchemaMap;
87
+ }) => JsonSchema | null;
88
+ /**
89
+ * Returns the FunctionJsonSchema for `functionName` within `parentSchema`, checking both
90
+ * primitive utilities (e.g. array/string methods) and direct object properties.
91
+ * Returns null if not found or not a function schema.
92
+ */
93
+ declare const getFunctionSchemaForNode: ({
94
+ parentSchema,
95
+ functionName,
96
+ isCustomFunction,
97
+ platformObjectJsonSchema,
98
+ primitiveUtilities
99
+ }: {
100
+ parentSchema: JsonSchema;
101
+ functionName: string;
102
+ isCustomFunction: boolean;
103
+ platformObjectJsonSchema: ObjectSchemaMap;
104
+ primitiveUtilities: ObjectSchemaMap;
105
+ }) => FunctionJsonSchema | null;
106
+ declare const isTypeMatch: ({
107
+ fieldJsonSchema,
108
+ types,
109
+ platformObjectJsonSchema,
110
+ arrayTypes,
111
+ traversedSchemaIds
112
+ }: {
113
+ fieldJsonSchema: JsonSchema;
114
+ types: PossibleType[];
115
+ platformObjectJsonSchema: ObjectSchemaMap;
116
+ arrayTypes?: PossibleArrayType[];
117
+ traversedSchemaIds?: Set<string>;
118
+ }) => boolean;
119
+ interface OptionFilters {
120
+ allowedArrayTypes?: PossibleArrayType[];
121
+ allowedFieldPaths?: string[];
122
+ allowedTypes?: PossibleType[];
123
+ disallowedFieldPaths?: string[];
124
+ fieldPathsAreStrictMatch?: boolean;
125
+ requiredPropertyShape?: string[];
126
+ }
127
+ declare const hasRequiredPropertyShape: (schema: JsonSchema, requiredPropertyShape: string[], platformObjectJsonSchema?: ObjectSchemaMap, checkRecursively?: boolean) => boolean;
128
+ declare const getOptionForValue: ({
129
+ value,
130
+ jsonSchema,
131
+ schemaForFieldPath
132
+ }: {
133
+ value: string;
134
+ jsonSchema: JsonSchema;
135
+ schemaForFieldPath: (path: string, initialSchema: JsonSchema) => {
136
+ schema: JsonSchema | null;
137
+ propertyName: string | null;
138
+ };
139
+ }) => Option | null;
140
+ declare const validatePath: ({
141
+ path,
142
+ jsonSchema,
143
+ platformObjectJsonSchema,
144
+ primitiveUtilities,
145
+ optionFilters
146
+ }: {
147
+ path: string;
148
+ jsonSchema: JsonSchema;
149
+ platformObjectJsonSchema: ObjectSchemaMap;
150
+ primitiveUtilities: ObjectSchemaMap;
151
+ optionFilters?: OptionFilters;
152
+ }) => {
153
+ valid: boolean;
154
+ schemaOptions: Option[];
155
+ partial: string;
156
+ };
157
+ /**
158
+ * Given a method chain that corresponds to the passed schema, find the right-most indentifier that
159
+ * is a platform object and split the method chain on that identifier, with the platform object on
160
+ * the left side.
161
+ *
162
+ * This function is used to optimize a method chain into two parts, left side for server resolution
163
+ * and right side for client resolution.
164
+ *
165
+ * For example:
166
+ * current_case.fields.field_a -> ['current_case', 'fields.field_a']
167
+ * current_case.inquiries.first.id -> ['current_case.inquiries.first', 'id']
168
+ * current_case.account.fields.field_b -> ['current_case.account', 'fields.field_b']
169
+ */
170
+ declare const splitAtNearestParentObject: (chain: Chain, currentSchema: JsonSchemaObject, platformSchemaMap: ObjectSchemaMap, primitiveUtilities: ObjectSchemaMap) => [leftChain: Chain, rightChain: Chain];
171
+ //#endregion
172
+ export { Option, OptionFilters, extractPlatformObjectKey, formatDisplayValue, getFunctionSchemaForNode, getOptionForValue, getSchemaByPath, getSchemaForFieldPath, getSchemaForVariablePath, getSchemaOptions, hasRequiredPropertyShape, isTypeMatch, isValidOption, nextLinkSchema, splitAtNearestParentObject, validatePath };
173
+ //# sourceMappingURL=schemaOptions.d.mts.map
@@ -0,0 +1,481 @@
1
+ import { EMPTY_JSON_SCHEMA_OBJECT, JsonSchemaAllTypes, JsonSchemaStringifiableTypes, genericArrayItemSchema, getNonNullableRefSchema, getNonNullableType, isConvertedTypeSchema, isFileType, isFunctionSchema, isGenericParameterSchema, isJsonSchemaArray, isJsonSchemaDate, isJsonSchemaDateTime, isJsonSchemaObject, isJsonSchemaRef, isJsonSchemaString, isJsonType, isPrecedingSchema } from "./jsonSchema.mjs";
2
+ import { getJsonSchemaType } from "./jsonSchemaType.mjs";
3
+ import { _ as methodChainToString, d as isIdentifierNode, f as isStringNode, n as MethodChainNodeTypes, p as isValid, r as appendedMethodChain, t as EMPTY_METHOD_CHAIN, u as isFunctionNode, v as parseMethodChain, w as assertNever, y as parseWithPartialOption } from "../methodChain-DAQxLgxt.mjs";
4
+ import { MERGED_SCHEMA_ID, getPlatformObjectTypeFromJsonSchema, getSchemaId, resolveJssRef } from "./platformObject.mjs";
5
+ import { compact, flatten, last, sortBy, trim } from "lodash-es";
6
+ //#region lib/schemaOptions.ts
7
+ const fullNodeName = (node) => `${node.type === MethodChainNodeTypes.CustomFunction ? "@" : ""}${node.name}`;
8
+ const SCHEMA_PATH_PATTERN = /\/schema\/([a-z][a-z0-9-_]*)/i;
9
+ /**
10
+ * Extracts the top-level platform-object key from a schema's `$ref`/`$id`/
11
+ * `objectKey`/`objectType.const` markers. Collapses subtypes to their root
12
+ * (`/schema/verification/document/merged` -> `verification`) because callers
13
+ * compare against top-level `ApiModel` values.
14
+ */
15
+ const extractPlatformObjectKey = (schema, platformObjectJsonSchema = {}) => {
16
+ if (!schema) return null;
17
+ if (isJsonSchemaRef(schema)) {
18
+ const refMatch = schema.$ref?.match(SCHEMA_PATH_PATTERN);
19
+ if (refMatch) return refMatch[1];
20
+ return extractPlatformObjectKey(resolveJssRef(schema, platformObjectJsonSchema), platformObjectJsonSchema);
21
+ }
22
+ if ("$id" in schema && typeof schema.$id === "string") {
23
+ const idMatch = schema.$id.match(SCHEMA_PATH_PATTERN);
24
+ if (idMatch) return idMatch[1];
25
+ }
26
+ if ("objectKey" in schema && typeof schema.objectKey === "string") return schema.objectKey.split("/")[0];
27
+ return getPlatformObjectTypeFromJsonSchema(schema);
28
+ };
29
+ const isMatchingType = (schema, allowedTypes, allowedArrayTypes) => {
30
+ if (allowedTypes.length === 0) return true;
31
+ const jsonSchemaType = getJsonSchemaType(schema);
32
+ if (allowedTypes.some((schemaType) => schemaType === "string") && JsonSchemaStringifiableTypes.some((schemaType) => schemaType === jsonSchemaType)) return true;
33
+ else if (jsonSchemaType === JsonSchemaAllTypes.Array) {
34
+ const itemsSchema = "items" in schema ? schema.items : null;
35
+ if (!allowedTypes.includes(JsonSchemaAllTypes.Array) || allowedArrayTypes?.length && !allowedArrayTypes.some((schemaType) => schemaType === getJsonSchemaType(itemsSchema))) return false;
36
+ } else if (jsonSchemaType !== JsonSchemaAllTypes.Object && !allowedTypes.some((schemaType) => schemaType === jsonSchemaType)) return false;
37
+ return true;
38
+ };
39
+ const isValidOptionHelper = (schema, allowedFieldPaths, disallowedFieldPaths, allowedTypes, allowedArrayTypes, path, platformObjectJsonSchema, traversedSchemaIds = /* @__PURE__ */ new Set()) => {
40
+ const resolvedSchema = isJsonSchemaRef(schema) ? resolveJssRef(schema, platformObjectJsonSchema) : schema;
41
+ if (resolvedSchema.$id) if (traversedSchemaIds.has(resolvedSchema.$id)) return false;
42
+ else traversedSchemaIds.add(resolvedSchema.$id);
43
+ const dotPath = path.join(".");
44
+ if (disallowedFieldPaths.has(dotPath)) return false;
45
+ if (!isMatchingType(resolvedSchema, allowedTypes, allowedArrayTypes)) return false;
46
+ if (allowedFieldPaths.has(dotPath)) return true;
47
+ if (getJsonSchemaType(resolvedSchema) === "object") {
48
+ if ("fieldType" in resolvedSchema && isJsonType(resolvedSchema.fieldType)) return allowedFieldPaths.size === 0;
49
+ return "properties" in resolvedSchema && resolvedSchema.properties != null && Object.entries(resolvedSchema.properties).some(([prop, propSchema]) => isValidOptionHelper(propSchema, allowedFieldPaths, disallowedFieldPaths, allowedTypes, allowedArrayTypes, [...path, prop], platformObjectJsonSchema, traversedSchemaIds));
50
+ }
51
+ return allowedFieldPaths.size === 0;
52
+ };
53
+ const isValidOption = (schema, allowedFieldPaths, disallowedFieldPaths, allowedTypes, allowedArrayTypes, path = [], platformObjectJsonSchema) => {
54
+ const allowedFieldPathsSet = allowedFieldPaths == null ? /* @__PURE__ */ new Set() : new Set(allowedFieldPaths);
55
+ const disallowedFieldPathsSet = disallowedFieldPaths == null ? /* @__PURE__ */ new Set() : new Set(disallowedFieldPaths);
56
+ if (allowedFieldPathsSet.size === 0 && disallowedFieldPathsSet.size === 0 && allowedTypes.length === 0 && allowedArrayTypes.length === 0) return true;
57
+ return isValidOptionHelper(schema, allowedFieldPathsSet, disallowedFieldPathsSet, allowedTypes ?? [], allowedArrayTypes ?? [], path, platformObjectJsonSchema);
58
+ };
59
+ const buildSchemaOptionsFor = (rootSchema, baseChain) => Object.entries(rootSchema?.properties ?? {}).map(([property, propSchema]) => {
60
+ const appended = appendedMethodChain(baseChain ?? EMPTY_METHOD_CHAIN, property);
61
+ return {
62
+ label: methodChainToString(appended),
63
+ value: methodChainToString(appended),
64
+ property,
65
+ schema: propSchema,
66
+ methodChain: appended,
67
+ workflowObjectKey: "objectKey" in propSchema ? propSchema.objectKey : void 0,
68
+ isVariable: "isVariable" in propSchema ? propSchema.isVariable : false
69
+ };
70
+ });
71
+ const getSupportedArrayFunctions = (schema, arrayPrimitive) => {
72
+ if (isJsonSchemaArray(schema) && schema["supportedFunctions"]) return schema["supportedFunctions"];
73
+ return arrayPrimitive["baseSupportedFunctions"] ?? [];
74
+ };
75
+ const getSchemaOptions = ({ option, optionFilters, platformObjectJsonSchema, primitiveUtilities, digPrimitives = false }) => {
76
+ const { schema, methodChain } = option;
77
+ const nullableRefSchema = getNonNullableRefSchema(schema);
78
+ const baseSchema = nullableRefSchema ?? schema;
79
+ const refResolved = isJsonSchemaRef(baseSchema) ? resolveJssRef(baseSchema, platformObjectJsonSchema) : baseSchema;
80
+ const nonNullable = refResolved && getNonNullableType(refResolved);
81
+ const resolvedSchema = nonNullable ? {
82
+ ...refResolved,
83
+ type: nonNullable
84
+ } : refResolved;
85
+ const schemaType = getJsonSchemaType(resolvedSchema);
86
+ const schemaOptions = (() => {
87
+ switch (schemaType) {
88
+ case JsonSchemaAllTypes.Object: return buildSchemaOptionsFor(resolvedSchema, methodChain);
89
+ case JsonSchemaAllTypes.Array:
90
+ case JsonSchemaAllTypes.MultiEnum: {
91
+ if (!digPrimitives) return [];
92
+ const arrayPrimitive = primitiveUtilities["/schema/array"];
93
+ if (!arrayPrimitive) return [];
94
+ const allOptions = buildSchemaOptionsFor(arrayPrimitive, methodChain);
95
+ const supported = getSupportedArrayFunctions(resolvedSchema, arrayPrimitive);
96
+ return allOptions.filter((opt) => supported.includes(opt.property));
97
+ }
98
+ case JsonSchemaAllTypes.String: return digPrimitives ? buildSchemaOptionsFor(primitiveUtilities["/schema/string"], methodChain) : [];
99
+ case JsonSchemaAllTypes.Enum:
100
+ if (digPrimitives && isJsonSchemaString(resolvedSchema)) return buildSchemaOptionsFor(primitiveUtilities["/schema/string"], methodChain);
101
+ return [];
102
+ case JsonSchemaAllTypes.File: return digPrimitives ? buildSchemaOptionsFor(primitiveUtilities["/schema/field/file"], methodChain) : [];
103
+ case JsonSchemaAllTypes.Integer:
104
+ case JsonSchemaAllTypes.Number: return digPrimitives && primitiveUtilities["/schema/number"] ? buildSchemaOptionsFor(primitiveUtilities["/schema/number"], methodChain) : [];
105
+ case JsonSchemaAllTypes.Boolean: return digPrimitives && primitiveUtilities["/schema/boolean"] ? buildSchemaOptionsFor(primitiveUtilities["/schema/boolean"], methodChain) : [];
106
+ case JsonSchemaAllTypes.Date: return digPrimitives && primitiveUtilities["/schema/date"] ? buildSchemaOptionsFor(primitiveUtilities["/schema/date"], methodChain) : [];
107
+ case JsonSchemaAllTypes.Datetime: return digPrimitives && primitiveUtilities["/schema/datetime"] ? buildSchemaOptionsFor(primitiveUtilities["/schema/datetime"], methodChain) : [];
108
+ case JsonSchemaAllTypes.GroupedEnum:
109
+ case JsonSchemaAllTypes.Null:
110
+ case JsonSchemaAllTypes.Relation:
111
+ case JsonSchemaAllTypes.MaskedString:
112
+ case JsonSchemaAllTypes.Unknown: return [];
113
+ default: assertNever(schemaType);
114
+ }
115
+ })();
116
+ const nullSafeOptions = nullableRefSchema != null || nonNullable != null ? schemaOptions.filter((opt) => {
117
+ if (isFunctionSchema(opt.schema) && opt.schema.codeChainFunctionToken != null) return opt.schema.acceptsNullReceiver === true;
118
+ return nullableRefSchema == null;
119
+ }) : schemaOptions;
120
+ return sortBy(optionFilters && !!flatten(compact(Object.values(optionFilters))).length ? filterForAllowedSchemaOptions(nullSafeOptions, optionFilters, platformObjectJsonSchema) : nullSafeOptions, (opt) => opt.property.replace(/^@/, ""));
121
+ };
122
+ const formatDisplayValue = (value) => {
123
+ return typeof value === "string" ? value : trim(JSON.stringify(value, null, 1), "\"");
124
+ };
125
+ /**
126
+ * Resolves the schema at a dotted path (e.g. "account.birthDate").
127
+ * Tries direct key lookup first, then traverses into nested object .properties by path part.
128
+ * Normalizes kebab/snake at each level for key lookup.
129
+ */
130
+ function getSchemaByPath(properties, path) {
131
+ if (!properties || !path) return;
132
+ const lookup = (props, key) => props[key] ?? props[key.replace(/_/g, "-")] ?? props[key.replace(/-/g, "_")];
133
+ const byFullPath = lookup(properties, path);
134
+ if (byFullPath != null) return byFullPath;
135
+ const i = path.indexOf(".");
136
+ if (i === -1) return;
137
+ const nestedKey = path.slice(0, i);
138
+ const rest = path.slice(i + 1);
139
+ const next = lookup(properties, nestedKey);
140
+ if (next == null || !isJsonSchemaObject(next) || !next.properties) return;
141
+ return getSchemaByPath(next.properties, rest);
142
+ }
143
+ const parseMethodChainForJSS = (path) => {
144
+ const { methodChain, partial, valid } = parseWithPartialOption(path);
145
+ if (!valid) return null;
146
+ if (partial.length > 0) return appendedMethodChain(methodChain, partial);
147
+ return methodChain;
148
+ };
149
+ const getSchemaForFieldPath = ({ path, initialSchema, platformObjectJsonSchema = {}, primitiveUtilities = {} }) => {
150
+ if (!initialSchema || !("type" in initialSchema) && !("$ref" in initialSchema)) return {
151
+ schema: null,
152
+ propertyName: null
153
+ };
154
+ const schema = isJsonSchemaRef(initialSchema) ? resolveJssRef(initialSchema, platformObjectJsonSchema) : initialSchema;
155
+ if (path === "" || !isValid(path)) return {
156
+ schema: null,
157
+ propertyName: null
158
+ };
159
+ const methodChain = parseMethodChain(path);
160
+ if (!methodChain) return {
161
+ schema: null,
162
+ propertyName: null
163
+ };
164
+ const result = methodChain.links.reduce((currentSchema, link) => {
165
+ return nextLinkSchema({
166
+ currentSchema,
167
+ nextLink: link,
168
+ platformObjectJsonSchema,
169
+ primitiveUtilities
170
+ });
171
+ }, schema);
172
+ return {
173
+ schema: result,
174
+ propertyName: result ? last(methodChain.links)?.name || null : null
175
+ };
176
+ };
177
+ /**
178
+ * Get the schema for a variable path from usableObjects.
179
+ */
180
+ const getSchemaForVariablePath = ({ path, usableObjects }) => {
181
+ return getSchemaForFieldPath({
182
+ path,
183
+ initialSchema: {
184
+ type: "object",
185
+ properties: Object.fromEntries(usableObjects.filter((obj) => obj.schema != null && obj.isVariable === true).map((obj) => [obj.value, obj.schema]))
186
+ }
187
+ });
188
+ };
189
+ const getPrimitiveSchemaId = (schema) => {
190
+ if (!("type" in schema)) return null;
191
+ if (isJsonSchemaObject(schema) && isFileType(schema.fieldType)) return "/schema/field/file";
192
+ if (isJsonSchemaDate(schema)) return "/schema/date";
193
+ if (isJsonSchemaDateTime(schema)) return "/schema/datetime";
194
+ const type = Array.isArray(schema.type) ? getNonNullableType(schema) : schema.type;
195
+ if (!type) return null;
196
+ if (type === "integer" || type === "number") return "/schema/number";
197
+ if (type === "boolean") return "/schema/boolean";
198
+ return getSchemaId(type);
199
+ };
200
+ const nextLinkSchema = ({ currentSchema, nextLink, platformObjectJsonSchema, primitiveUtilities }) => {
201
+ if (!currentSchema) return null;
202
+ if (nextLink.type === MethodChainNodeTypes.CustomFunction) {
203
+ const unwrapped = getNonNullableRefSchema(currentSchema);
204
+ const nonNullType = unwrapped ? null : getNonNullableType(currentSchema);
205
+ const receiver = unwrapped ?? (nonNullType ? {
206
+ ...currentSchema,
207
+ type: nonNullType
208
+ } : null);
209
+ if (receiver) {
210
+ if (getFunctionSchemaForNode({
211
+ parentSchema: currentSchema,
212
+ functionName: fullNodeName(nextLink),
213
+ isCustomFunction: true,
214
+ platformObjectJsonSchema,
215
+ primitiveUtilities
216
+ })?.acceptsNullReceiver !== true) return null;
217
+ currentSchema = receiver;
218
+ }
219
+ }
220
+ if (isJsonSchemaRef(currentSchema)) currentSchema = resolveJssRef(currentSchema, platformObjectJsonSchema);
221
+ else if (isJsonSchemaArray(currentSchema) && isJsonSchemaRef(currentSchema.items)) currentSchema = {
222
+ ...currentSchema,
223
+ items: { ...resolveJssRef(currentSchema.items, platformObjectJsonSchema) }
224
+ };
225
+ if (!("type" in currentSchema)) return null;
226
+ const schemaId = getPrimitiveSchemaId(currentSchema);
227
+ if (schemaId && schemaId in primitiveUtilities) {
228
+ const utilityReturnType = getPrimitiveUtilitiesReturnSchema(currentSchema, nextLink, primitiveUtilities[schemaId]);
229
+ if (utilityReturnType) return utilityReturnType;
230
+ }
231
+ if ("properties" in currentSchema) {
232
+ const propertySchema = currentSchema.properties[fullNodeName(nextLink)];
233
+ if (propertySchema && isFunctionSchema(propertySchema)) return propertySchema.properties.returnType;
234
+ return propertySchema ?? null;
235
+ }
236
+ return null;
237
+ };
238
+ /**
239
+ * Returns the FunctionJsonSchema for `functionName` within `parentSchema`, checking both
240
+ * primitive utilities (e.g. array/string methods) and direct object properties.
241
+ * Returns null if not found or not a function schema.
242
+ */
243
+ const getFunctionSchemaForNode = ({ parentSchema, functionName, isCustomFunction, platformObjectJsonSchema, primitiveUtilities }) => {
244
+ if (isCustomFunction) parentSchema = getNonNullableRefSchema(parentSchema) ?? parentSchema;
245
+ if (isJsonSchemaRef(parentSchema)) parentSchema = resolveJssRef(parentSchema, platformObjectJsonSchema);
246
+ const schemaId = getPrimitiveSchemaId(parentSchema);
247
+ if (schemaId && schemaId in primitiveUtilities) {
248
+ const utilitySchema = primitiveUtilities[schemaId].properties[functionName];
249
+ if (utilitySchema && isFunctionSchema(utilitySchema)) return utilitySchema;
250
+ }
251
+ if (isJsonSchemaObject(parentSchema) && functionName in parentSchema.properties) {
252
+ const propSchema = parentSchema.properties[functionName];
253
+ if (isFunctionSchema(propSchema)) return propSchema;
254
+ }
255
+ return null;
256
+ };
257
+ const injectRefForPlatformObjectArray = (schema) => {
258
+ if (schema && isJsonSchemaArray(schema) && isJsonSchemaObject(schema.items) && "objectKey" in schema.items && schema.items.objectKey) {
259
+ const schemaId = getSchemaId(schema.items.objectKey, MERGED_SCHEMA_ID);
260
+ return {
261
+ ...schema,
262
+ items: {
263
+ ...schema.items,
264
+ $ref: schemaId
265
+ }
266
+ };
267
+ }
268
+ return schema;
269
+ };
270
+ const getPrimitiveUtilitiesReturnSchema = (object, node, schema) => {
271
+ const name = fullNodeName(node);
272
+ if (!(name in schema.properties)) return null;
273
+ const utilitySchema = schema.properties[name];
274
+ const returnSchema = isFunctionSchema(utilitySchema) ? utilitySchema.properties.returnType : utilitySchema;
275
+ const itemSchema = genericArrayItemSchema(object, returnSchema);
276
+ if (itemSchema) return itemSchema;
277
+ if (isPrecedingSchema(returnSchema)) return object;
278
+ if (isConvertedTypeSchema(returnSchema) && isFunctionNode(node) && node.params[returnSchema.position] && isStringNode(node.params[returnSchema.position])) {
279
+ const stringNode = node.params[returnSchema.position];
280
+ return returnSchema.schemaByValue[stringNode.value] ?? EMPTY_JSON_SCHEMA_OBJECT;
281
+ }
282
+ if (isGenericParameterSchema(returnSchema) && isFunctionNode(node) && node.params[returnSchema.position] && isStringNode(node.params[returnSchema.position])) {
283
+ const stringNode = node.params[returnSchema.position];
284
+ const objectSchema = isJsonSchemaArray(object) ? object.items : object;
285
+ if (isJsonSchemaObject(objectSchema)) return injectRefForPlatformObjectArray(stringNode.value.split(".").reduce((schema, key) => {
286
+ if (schema == null || !isJsonSchemaObject(schema) || !schema.properties[key]) return null;
287
+ return schema.properties[key];
288
+ }, objectSchema));
289
+ }
290
+ return "genericType" in returnSchema ? EMPTY_JSON_SCHEMA_OBJECT : returnSchema;
291
+ };
292
+ /**
293
+ * @param path
294
+ * @param allowedFieldPaths - can be a complete path to a base type field
295
+ * (e.g. 'data.some.string_field'), or a partial path to an object ('data')
296
+ * @param fieldPathsAreStrictMatch - true if we only want to match exact paths in allowedFieldPaths and disallowedFieldPaths
297
+ */
298
+ const isAllowedPath = (path, allowedFieldPaths) => {
299
+ return allowedFieldPaths.some((fieldPath) => {
300
+ const valueIsPartialMatch = fieldPath.startsWith(path);
301
+ const valueIsNestedProp = path.startsWith(`${fieldPath}.`);
302
+ return valueIsPartialMatch || valueIsNestedProp;
303
+ });
304
+ };
305
+ /**
306
+ * @param path
307
+ * @param disallowedFieldPaths - can be a complete path to a base type field
308
+ * (e.g. 'data.some.string_field'), or a partial path to an object ('data')
309
+ */
310
+ const isDisallowedPath = (path, disallowedFieldPaths) => {
311
+ return disallowedFieldPaths.some((fieldPath) => {
312
+ const valueIsMatch = fieldPath === path;
313
+ const valueIsNestedProp = path.startsWith(`${fieldPath}.`);
314
+ return valueIsMatch || valueIsNestedProp;
315
+ });
316
+ };
317
+ const isTypeMatch = ({ fieldJsonSchema, types, platformObjectJsonSchema = {}, arrayTypes, traversedSchemaIds = /* @__PURE__ */ new Set() }) => {
318
+ const resolvedSchema = isJsonSchemaRef(fieldJsonSchema) ? resolveJssRef(fieldJsonSchema, platformObjectJsonSchema) : fieldJsonSchema;
319
+ if (resolvedSchema.$id) if (traversedSchemaIds.has(resolvedSchema.$id)) return false;
320
+ else traversedSchemaIds.add(resolvedSchema.$id);
321
+ const fieldJsonSchemaType = getJsonSchemaType(resolvedSchema);
322
+ switch (fieldJsonSchemaType) {
323
+ case JsonSchemaAllTypes.Object: {
324
+ const objectSchema = resolvedSchema;
325
+ const isObjectKeyOfType = (type) => objectSchema.objectKey && types.includes(type) && objectSchema.objectKey.split("/")[0] === type;
326
+ if (types.includes("object") || objectSchema.objectKey && types.includes(objectSchema.objectKey) || isObjectKeyOfType("report") || isObjectKeyOfType("verification")) return true;
327
+ return Object.values(objectSchema.properties || {}).some((propJsonSchema) => isTypeMatch({
328
+ fieldJsonSchema: propJsonSchema,
329
+ types,
330
+ platformObjectJsonSchema,
331
+ arrayTypes,
332
+ traversedSchemaIds
333
+ }));
334
+ }
335
+ case JsonSchemaAllTypes.Array: {
336
+ const arraySchema = resolvedSchema;
337
+ const itemSchema = isJsonSchemaRef(arraySchema.items) ? resolveJssRef(arraySchema.items, platformObjectJsonSchema) : arraySchema.items;
338
+ return types.includes(JsonSchemaAllTypes.Array) && !!arrayTypes && arrayTypes.some((schemaType) => schemaType === getJsonSchemaType(itemSchema) || isJsonSchemaObject(itemSchema) && schemaType === itemSchema.objectKey);
339
+ }
340
+ case JsonSchemaAllTypes.String:
341
+ case JsonSchemaAllTypes.Number:
342
+ case JsonSchemaAllTypes.Boolean:
343
+ case JsonSchemaAllTypes.Integer:
344
+ case JsonSchemaAllTypes.Date:
345
+ case JsonSchemaAllTypes.Datetime:
346
+ case JsonSchemaAllTypes.Enum:
347
+ case JsonSchemaAllTypes.MultiEnum:
348
+ case JsonSchemaAllTypes.GroupedEnum:
349
+ case JsonSchemaAllTypes.Unknown: return types.some((schemaType) => schemaType === fieldJsonSchemaType);
350
+ default: return false;
351
+ }
352
+ };
353
+ const hasRequiredPropertyShape = (schema, requiredPropertyShape, platformObjectJsonSchema = {}, checkRecursively = true) => {
354
+ if (!requiredPropertyShape?.length) return true;
355
+ const resolvedSchema = isJsonSchemaRef(schema) ? resolveJssRef(schema, platformObjectJsonSchema) : schema;
356
+ if (resolvedSchema && "type" in resolvedSchema && resolvedSchema.type === "object" && "properties" in resolvedSchema && resolvedSchema.properties) {
357
+ const schemaProperties = resolvedSchema.properties;
358
+ if (requiredPropertyShape.every((propName) => propName in schemaProperties)) return true;
359
+ if (checkRecursively) return Object.values(schemaProperties).some((propSchema) => hasRequiredPropertyShape(propSchema, requiredPropertyShape, platformObjectJsonSchema, checkRecursively));
360
+ }
361
+ return false;
362
+ };
363
+ const filterForAllowedSchemaOptions = (options = [], { allowedArrayTypes, allowedFieldPaths, allowedTypes, disallowedFieldPaths, fieldPathsAreStrictMatch, requiredPropertyShape }, platformObjectJsonSchema = {}) => {
364
+ let filteredOptions = options;
365
+ if (fieldPathsAreStrictMatch) {
366
+ if (allowedFieldPaths?.length || disallowedFieldPaths?.length || allowedTypes?.length) filteredOptions = filteredOptions.filter((option) => isValidOption(option.schema, allowedFieldPaths ?? [], disallowedFieldPaths ?? [], allowedTypes ?? [], allowedArrayTypes ?? [], option.value.split("."), platformObjectJsonSchema));
367
+ } else {
368
+ if (allowedFieldPaths?.length) filteredOptions = filteredOptions.filter((option) => isAllowedPath(option.value, allowedFieldPaths));
369
+ if (disallowedFieldPaths?.length) filteredOptions = filteredOptions.filter((option) => !isDisallowedPath(option.value, disallowedFieldPaths));
370
+ if (allowedTypes?.length) filteredOptions = filteredOptions.filter((option) => isTypeMatch({
371
+ fieldJsonSchema: option.schema,
372
+ types: allowedTypes,
373
+ platformObjectJsonSchema,
374
+ arrayTypes: allowedArrayTypes
375
+ }));
376
+ }
377
+ if (requiredPropertyShape?.length) filteredOptions = filteredOptions.filter((option) => hasRequiredPropertyShape(option.schema, requiredPropertyShape, platformObjectJsonSchema));
378
+ return filteredOptions;
379
+ };
380
+ const getOptionForValue = ({ value, jsonSchema, schemaForFieldPath }) => {
381
+ const { schema, propertyName } = schemaForFieldPath(value, jsonSchema);
382
+ if (!schema || !propertyName) return null;
383
+ const methodChain = parseMethodChainForJSS(value);
384
+ return {
385
+ label: methodChain ? methodChainToString(methodChain) : value,
386
+ value: methodChain ? methodChainToString(methodChain) : value,
387
+ property: propertyName,
388
+ schema,
389
+ methodChain
390
+ };
391
+ };
392
+ const validatePath = ({ path, jsonSchema, platformObjectJsonSchema = {}, primitiveUtilities = {}, optionFilters }) => {
393
+ const schemaOptions = getSchemaOptions({
394
+ option: {
395
+ schema: jsonSchema,
396
+ methodChain: parseMethodChainForJSS("")
397
+ },
398
+ optionFilters,
399
+ platformObjectJsonSchema,
400
+ primitiveUtilities
401
+ });
402
+ const { methodChain, partial } = parseWithPartialOption(path);
403
+ const optionsWithPartiallyMatchedFinalLink = methodChain.links.reduce((currentSchema, link) => {
404
+ if (currentSchema.length === 0) return [];
405
+ const optionMatch = currentSchema.find((option) => option.property === link.name);
406
+ if (optionMatch) return getSchemaOptions({
407
+ option: optionMatch,
408
+ optionFilters,
409
+ platformObjectJsonSchema,
410
+ primitiveUtilities
411
+ });
412
+ return [];
413
+ }, schemaOptions).filter((option) => option.property.includes(partial));
414
+ return {
415
+ valid: optionsWithPartiallyMatchedFinalLink.length > 0,
416
+ schemaOptions: optionsWithPartiallyMatchedFinalLink,
417
+ partial
418
+ };
419
+ };
420
+ /**
421
+ * Given a method chain that corresponds to the passed schema, find the right-most indentifier that
422
+ * is a platform object and split the method chain on that identifier, with the platform object on
423
+ * the left side.
424
+ *
425
+ * This function is used to optimize a method chain into two parts, left side for server resolution
426
+ * and right side for client resolution.
427
+ *
428
+ * For example:
429
+ * current_case.fields.field_a -> ['current_case', 'fields.field_a']
430
+ * current_case.inquiries.first.id -> ['current_case.inquiries.first', 'id']
431
+ * current_case.account.fields.field_b -> ['current_case.account', 'fields.field_b']
432
+ */
433
+ const splitAtNearestParentObject = (chain, currentSchema, platformSchemaMap, primitiveUtilities) => {
434
+ const leafUpLinkSchemas = [currentSchema];
435
+ for (const link of chain.links) {
436
+ const nextSchema = nextLinkSchema({
437
+ currentSchema: leafUpLinkSchemas[0],
438
+ nextLink: link,
439
+ platformObjectJsonSchema: platformSchemaMap,
440
+ primitiveUtilities
441
+ });
442
+ leafUpLinkSchemas.unshift(nextSchema);
443
+ }
444
+ const leafUpLeftLinks = [...chain.links].reverse();
445
+ const leafUpRightLinks = [];
446
+ for (const [i, linkSchema] of leafUpLinkSchemas.entries()) {
447
+ if (!linkSchema) {
448
+ if (isIdentifierNode(leafUpLeftLinks[0])) {
449
+ if (leafUpLinkSchemas.slice(i + 1).find((s) => s && (isJsonSchemaRef(s) || isJsonSchemaArray(s) && isJsonSchemaRef(s.items)))) {
450
+ leafUpRightLinks.push(leafUpLeftLinks.shift());
451
+ continue;
452
+ }
453
+ }
454
+ break;
455
+ } else if ("$id" in linkSchema || isJsonSchemaRef(linkSchema)) break;
456
+ else if (isJsonSchemaArray(linkSchema)) {
457
+ if ("$id" in linkSchema.items || isJsonSchemaRef(linkSchema.items)) break;
458
+ if (isFunctionNode(leafUpLeftLinks[0])) break;
459
+ } else if (isFunctionNode(leafUpLeftLinks[0])) break;
460
+ else if (isIdentifierNode(leafUpLeftLinks[0])) {
461
+ const nextSchema = leafUpLinkSchemas[i + 1];
462
+ if (nextSchema) {
463
+ const primitiveId = getPrimitiveSchemaId(nextSchema);
464
+ if (primitiveId && primitiveId in primitiveUtilities) break;
465
+ }
466
+ if (nextSchema && isJsonSchemaArray(nextSchema)) break;
467
+ }
468
+ leafUpRightLinks.push(leafUpLeftLinks.shift());
469
+ }
470
+ return [{
471
+ type: MethodChainNodeTypes.Chain,
472
+ links: leafUpLeftLinks.reverse()
473
+ }, {
474
+ type: MethodChainNodeTypes.Chain,
475
+ links: leafUpRightLinks.reverse()
476
+ }];
477
+ };
478
+ //#endregion
479
+ export { extractPlatformObjectKey, formatDisplayValue, getFunctionSchemaForNode, getOptionForValue, getSchemaByPath, getSchemaForFieldPath, getSchemaForVariablePath, getSchemaOptions, hasRequiredPropertyShape, isTypeMatch, isValidOption, nextLinkSchema, splitAtNearestParentObject, validatePath };
480
+
481
+ //# sourceMappingURL=schemaOptions.mjs.map