@osdk/react-components 0.2.0-beta.19 → 0.2.0-beta.20

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 (316) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/browser/action-form/ActionForm.js +5 -1
  3. package/build/browser/action-form/ActionForm.js.map +1 -1
  4. package/build/browser/action-form/BaseForm.js +4 -8
  5. package/build/browser/action-form/BaseForm.js.map +1 -1
  6. package/build/browser/action-form/FormFieldApi.js.map +1 -1
  7. package/build/browser/action-form/fields/DropdownField.js +104 -0
  8. package/build/browser/action-form/fields/DropdownField.js.map +1 -0
  9. package/build/browser/action-form/fields/FormFieldRenderer.js +23 -12
  10. package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -1
  11. package/build/browser/action-form/fields/TextInputField.js +8 -9
  12. package/build/browser/action-form/fields/TextInputField.js.map +1 -1
  13. package/build/browser/base-components/combobox/Combobox.js +25 -3
  14. package/build/browser/base-components/combobox/Combobox.js.map +1 -1
  15. package/build/browser/base-components/combobox/Combobox.module.css +226 -46
  16. package/build/browser/base-components/combobox/Combobox.module.css.js +1 -0
  17. package/build/browser/base-components/select/Select.js +7 -1
  18. package/build/browser/base-components/select/Select.js.map +1 -1
  19. package/build/browser/base-components/select/Select.module.css +132 -35
  20. package/build/browser/base-components/select/Select.module.css.js +2 -0
  21. package/build/browser/base-components/skeleton/SkeletonBar.js +36 -0
  22. package/build/browser/base-components/skeleton/SkeletonBar.js.map +1 -0
  23. package/build/browser/base-components/skeleton/SkeletonBar.module.css +39 -0
  24. package/build/browser/base-components/skeleton/SkeletonBar.module.css.js +7 -0
  25. package/build/browser/filter-list/FilterList.js +42 -5
  26. package/build/browser/filter-list/FilterList.js.map +1 -1
  27. package/build/browser/filter-list/FilterListApi.js.map +1 -1
  28. package/build/browser/filter-list/base/AddFilterPopover.js +45 -0
  29. package/build/browser/filter-list/base/AddFilterPopover.js.map +1 -0
  30. package/build/browser/filter-list/base/AddFilterPopover.module.css +83 -0
  31. package/build/browser/filter-list/base/AddFilterPopover.module.css.js +9 -0
  32. package/build/browser/filter-list/base/inputs/CheckboxListInput.js +16 -27
  33. package/build/browser/filter-list/base/inputs/CheckboxListInput.js.map +1 -1
  34. package/build/browser/filter-list/base/inputs/CheckboxListInput.module.css +15 -5
  35. package/build/browser/filter-list/base/inputs/CheckboxListSkeleton.js +46 -0
  36. package/build/browser/filter-list/base/inputs/CheckboxListSkeleton.js.map +1 -0
  37. package/build/browser/filter-list/base/inputs/CheckboxListSkeleton.module.css +32 -0
  38. package/build/browser/filter-list/base/inputs/CheckboxListSkeleton.module.css.js +8 -0
  39. package/build/browser/filter-list/base/inputs/ListogramInput.js +21 -12
  40. package/build/browser/filter-list/base/inputs/ListogramInput.js.map +1 -1
  41. package/build/browser/filter-list/base/inputs/ListogramInput.module.css +13 -1
  42. package/build/browser/filter-list/base/inputs/ListogramSkeleton.js +45 -0
  43. package/build/browser/filter-list/base/inputs/ListogramSkeleton.js.map +1 -0
  44. package/build/browser/filter-list/base/inputs/ListogramSkeleton.module.css +32 -0
  45. package/build/browser/filter-list/base/inputs/ListogramSkeleton.module.css.js +8 -0
  46. package/build/browser/filter-list/base/inputs/MultiSelectInput.js +1 -1
  47. package/build/browser/filter-list/base/inputs/MultiSelectInput.js.map +1 -1
  48. package/build/browser/filter-list/base/inputs/RangeInput.js +13 -13
  49. package/build/browser/filter-list/base/inputs/RangeInput.js.map +1 -1
  50. package/build/browser/filter-list/base/inputs/RangeInput.module.css +23 -0
  51. package/build/browser/filter-list/base/inputs/TextTagsInput.js +1 -1
  52. package/build/browser/filter-list/base/inputs/TextTagsInput.js.map +1 -1
  53. package/build/browser/filter-list/base/inputs/useStaleData.js +29 -0
  54. package/build/browser/filter-list/base/inputs/useStaleData.js.map +1 -0
  55. package/build/browser/filter-list/hooks/useFilterVisibility.js +68 -0
  56. package/build/browser/filter-list/hooks/useFilterVisibility.js.map +1 -0
  57. package/build/browser/object-table/DefaultCellRenderer.js +13 -3
  58. package/build/browser/object-table/DefaultCellRenderer.js.map +1 -1
  59. package/build/browser/object-table/EditableCell.js +7 -6
  60. package/build/browser/object-table/EditableCell.js.map +1 -1
  61. package/build/browser/object-table/LoadingCell.js +6 -3
  62. package/build/browser/object-table/LoadingCell.js.map +1 -1
  63. package/build/browser/object-table/LoadingRow.js +2 -1
  64. package/build/browser/object-table/LoadingRow.js.map +1 -1
  65. package/build/browser/object-table/ObjectTableApi.js.map +1 -1
  66. package/build/browser/object-table/Table.js.map +1 -1
  67. package/build/browser/object-table/TableCell.module.css +1 -0
  68. package/build/browser/object-table/components/AsyncValueCell.js +35 -0
  69. package/build/browser/object-table/components/AsyncValueCell.js.map +1 -0
  70. package/build/browser/object-table/hooks/useColumnDefs.js +3 -1
  71. package/build/browser/object-table/hooks/useColumnDefs.js.map +1 -1
  72. package/build/browser/object-table/hooks/useFunctionColumnsData.js +270 -0
  73. package/build/browser/object-table/hooks/useFunctionColumnsData.js.map +1 -0
  74. package/build/browser/object-table/hooks/useObjectTableData.js +34 -13
  75. package/build/browser/object-table/hooks/useObjectTableData.js.map +1 -1
  76. package/build/browser/object-table/utils/AsyncCellData.js +30 -0
  77. package/build/browser/object-table/utils/AsyncCellData.js.map +1 -0
  78. package/build/browser/object-table/utils/constants.js +1 -0
  79. package/build/browser/object-table/utils/constants.js.map +1 -1
  80. package/build/browser/pdf-viewer/PdfRenderer.js +88 -0
  81. package/build/browser/pdf-viewer/PdfRenderer.js.map +1 -0
  82. package/build/browser/pdf-viewer/PdfViewer.js +197 -0
  83. package/build/browser/pdf-viewer/PdfViewer.js.map +1 -0
  84. package/build/browser/pdf-viewer/PdfViewer.module.css +95 -0
  85. package/build/browser/pdf-viewer/PdfViewer.module.css.js +16 -0
  86. package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.js +74 -0
  87. package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.js.map +1 -0
  88. package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.module.css +65 -0
  89. package/build/browser/pdf-viewer/PdfViewerAnnotationLayer.module.css.js +11 -0
  90. package/build/browser/pdf-viewer/PdfViewerSearchBar.js +84 -0
  91. package/build/browser/pdf-viewer/PdfViewerSearchBar.js.map +1 -0
  92. package/build/browser/pdf-viewer/PdfViewerSearchBar.module.css +65 -0
  93. package/build/browser/pdf-viewer/PdfViewerSearchBar.module.css.js +10 -0
  94. package/build/browser/pdf-viewer/PdfViewerSidebar.js +74 -0
  95. package/build/browser/pdf-viewer/PdfViewerSidebar.js.map +1 -0
  96. package/build/browser/pdf-viewer/PdfViewerSidebar.module.css +46 -0
  97. package/build/browser/pdf-viewer/PdfViewerSidebar.module.css.js +11 -0
  98. package/build/browser/pdf-viewer/PdfViewerThumbnail.js +100 -0
  99. package/build/browser/pdf-viewer/PdfViewerThumbnail.js.map +1 -0
  100. package/build/browser/pdf-viewer/PdfViewerThumbnail.module.css +26 -0
  101. package/build/browser/pdf-viewer/PdfViewerThumbnail.module.css.js +8 -0
  102. package/build/browser/pdf-viewer/PdfViewerToolbar.js +167 -0
  103. package/build/browser/pdf-viewer/PdfViewerToolbar.js.map +1 -0
  104. package/build/browser/pdf-viewer/PdfViewerToolbar.module.css +86 -0
  105. package/build/browser/pdf-viewer/PdfViewerToolbar.module.css.js +12 -0
  106. package/build/browser/pdf-viewer/constants.js +43 -0
  107. package/build/browser/pdf-viewer/constants.js.map +1 -0
  108. package/build/browser/pdf-viewer/hooks/usePdfAnnotationPortals.js +54 -0
  109. package/build/browser/pdf-viewer/hooks/usePdfAnnotationPortals.js.map +1 -0
  110. package/build/browser/pdf-viewer/hooks/usePdfDocument.js +67 -0
  111. package/build/browser/pdf-viewer/hooks/usePdfDocument.js.map +1 -0
  112. package/build/browser/pdf-viewer/hooks/usePdfViewer.js +69 -0
  113. package/build/browser/pdf-viewer/hooks/usePdfViewer.js.map +1 -0
  114. package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js +106 -0
  115. package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -0
  116. package/build/browser/pdf-viewer/hooks/usePdfViewerSync.js +71 -0
  117. package/build/browser/pdf-viewer/hooks/usePdfViewerSync.js.map +1 -0
  118. package/build/browser/pdf-viewer/types.js +2 -0
  119. package/build/browser/pdf-viewer/types.js.map +1 -0
  120. package/build/browser/public/experimental.js +4 -0
  121. package/build/browser/public/experimental.js.map +1 -1
  122. package/build/browser/styles.css +1008 -87
  123. package/build/cjs/public/experimental.cjs +2311 -895
  124. package/build/cjs/public/experimental.cjs.map +1 -1
  125. package/build/cjs/public/experimental.css +678 -153
  126. package/build/cjs/public/experimental.css.map +1 -1
  127. package/build/cjs/public/experimental.d.cts +114 -13
  128. package/build/esm/action-form/ActionForm.js +5 -1
  129. package/build/esm/action-form/ActionForm.js.map +1 -1
  130. package/build/esm/action-form/BaseForm.js +4 -8
  131. package/build/esm/action-form/BaseForm.js.map +1 -1
  132. package/build/esm/action-form/FormFieldApi.js.map +1 -1
  133. package/build/esm/action-form/fields/DropdownField.js +104 -0
  134. package/build/esm/action-form/fields/DropdownField.js.map +1 -0
  135. package/build/esm/action-form/fields/FormFieldRenderer.js +23 -12
  136. package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -1
  137. package/build/esm/action-form/fields/TextInputField.js +8 -9
  138. package/build/esm/action-form/fields/TextInputField.js.map +1 -1
  139. package/build/esm/base-components/combobox/Combobox.js +25 -3
  140. package/build/esm/base-components/combobox/Combobox.js.map +1 -1
  141. package/build/esm/base-components/combobox/Combobox.module.css +226 -46
  142. package/build/esm/base-components/select/Select.js +7 -1
  143. package/build/esm/base-components/select/Select.js.map +1 -1
  144. package/build/esm/base-components/select/Select.module.css +132 -35
  145. package/build/esm/base-components/skeleton/SkeletonBar.js +36 -0
  146. package/build/esm/base-components/skeleton/SkeletonBar.js.map +1 -0
  147. package/build/esm/base-components/skeleton/SkeletonBar.module.css +39 -0
  148. package/build/esm/filter-list/FilterList.js +42 -5
  149. package/build/esm/filter-list/FilterList.js.map +1 -1
  150. package/build/esm/filter-list/FilterListApi.js.map +1 -1
  151. package/build/esm/filter-list/base/AddFilterPopover.js +45 -0
  152. package/build/esm/filter-list/base/AddFilterPopover.js.map +1 -0
  153. package/build/esm/filter-list/base/AddFilterPopover.module.css +83 -0
  154. package/build/esm/filter-list/base/inputs/CheckboxListInput.js +16 -27
  155. package/build/esm/filter-list/base/inputs/CheckboxListInput.js.map +1 -1
  156. package/build/esm/filter-list/base/inputs/CheckboxListInput.module.css +15 -5
  157. package/build/esm/filter-list/base/inputs/CheckboxListSkeleton.js +46 -0
  158. package/build/esm/filter-list/base/inputs/CheckboxListSkeleton.js.map +1 -0
  159. package/build/esm/filter-list/base/inputs/CheckboxListSkeleton.module.css +32 -0
  160. package/build/esm/filter-list/base/inputs/ListogramInput.js +21 -12
  161. package/build/esm/filter-list/base/inputs/ListogramInput.js.map +1 -1
  162. package/build/esm/filter-list/base/inputs/ListogramInput.module.css +13 -1
  163. package/build/esm/filter-list/base/inputs/ListogramSkeleton.js +45 -0
  164. package/build/esm/filter-list/base/inputs/ListogramSkeleton.js.map +1 -0
  165. package/build/esm/filter-list/base/inputs/ListogramSkeleton.module.css +32 -0
  166. package/build/esm/filter-list/base/inputs/MultiSelectInput.js +1 -1
  167. package/build/esm/filter-list/base/inputs/MultiSelectInput.js.map +1 -1
  168. package/build/esm/filter-list/base/inputs/RangeInput.js +13 -13
  169. package/build/esm/filter-list/base/inputs/RangeInput.js.map +1 -1
  170. package/build/esm/filter-list/base/inputs/RangeInput.module.css +23 -0
  171. package/build/esm/filter-list/base/inputs/TextTagsInput.js +1 -1
  172. package/build/esm/filter-list/base/inputs/TextTagsInput.js.map +1 -1
  173. package/build/esm/filter-list/base/inputs/useStaleData.js +29 -0
  174. package/build/esm/filter-list/base/inputs/useStaleData.js.map +1 -0
  175. package/build/esm/filter-list/hooks/useFilterVisibility.js +68 -0
  176. package/build/esm/filter-list/hooks/useFilterVisibility.js.map +1 -0
  177. package/build/esm/object-table/DefaultCellRenderer.js +13 -3
  178. package/build/esm/object-table/DefaultCellRenderer.js.map +1 -1
  179. package/build/esm/object-table/EditableCell.js +7 -6
  180. package/build/esm/object-table/EditableCell.js.map +1 -1
  181. package/build/esm/object-table/LoadingCell.js +6 -3
  182. package/build/esm/object-table/LoadingCell.js.map +1 -1
  183. package/build/esm/object-table/LoadingRow.js +2 -1
  184. package/build/esm/object-table/LoadingRow.js.map +1 -1
  185. package/build/esm/object-table/ObjectTableApi.js.map +1 -1
  186. package/build/esm/object-table/Table.js.map +1 -1
  187. package/build/esm/object-table/TableCell.module.css +1 -0
  188. package/build/esm/object-table/components/AsyncValueCell.js +35 -0
  189. package/build/esm/object-table/components/AsyncValueCell.js.map +1 -0
  190. package/build/esm/object-table/hooks/useColumnDefs.js +3 -1
  191. package/build/esm/object-table/hooks/useColumnDefs.js.map +1 -1
  192. package/build/esm/object-table/hooks/useFunctionColumnsData.js +270 -0
  193. package/build/esm/object-table/hooks/useFunctionColumnsData.js.map +1 -0
  194. package/build/esm/object-table/hooks/useObjectTableData.js +34 -13
  195. package/build/esm/object-table/hooks/useObjectTableData.js.map +1 -1
  196. package/build/esm/object-table/utils/AsyncCellData.js +30 -0
  197. package/build/esm/object-table/utils/AsyncCellData.js.map +1 -0
  198. package/build/esm/object-table/utils/constants.js +1 -0
  199. package/build/esm/object-table/utils/constants.js.map +1 -1
  200. package/build/esm/pdf-viewer/PdfRenderer.js +88 -0
  201. package/build/esm/pdf-viewer/PdfRenderer.js.map +1 -0
  202. package/build/esm/pdf-viewer/PdfViewer.js +197 -0
  203. package/build/esm/pdf-viewer/PdfViewer.js.map +1 -0
  204. package/build/esm/pdf-viewer/PdfViewer.module.css +95 -0
  205. package/build/esm/pdf-viewer/PdfViewerAnnotationLayer.js +74 -0
  206. package/build/esm/pdf-viewer/PdfViewerAnnotationLayer.js.map +1 -0
  207. package/build/esm/pdf-viewer/PdfViewerAnnotationLayer.module.css +65 -0
  208. package/build/esm/pdf-viewer/PdfViewerSearchBar.js +84 -0
  209. package/build/esm/pdf-viewer/PdfViewerSearchBar.js.map +1 -0
  210. package/build/esm/pdf-viewer/PdfViewerSearchBar.module.css +65 -0
  211. package/build/esm/pdf-viewer/PdfViewerSidebar.js +74 -0
  212. package/build/esm/pdf-viewer/PdfViewerSidebar.js.map +1 -0
  213. package/build/esm/pdf-viewer/PdfViewerSidebar.module.css +46 -0
  214. package/build/esm/pdf-viewer/PdfViewerThumbnail.js +100 -0
  215. package/build/esm/pdf-viewer/PdfViewerThumbnail.js.map +1 -0
  216. package/build/esm/pdf-viewer/PdfViewerThumbnail.module.css +26 -0
  217. package/build/esm/pdf-viewer/PdfViewerToolbar.js +167 -0
  218. package/build/esm/pdf-viewer/PdfViewerToolbar.js.map +1 -0
  219. package/build/esm/pdf-viewer/PdfViewerToolbar.module.css +86 -0
  220. package/build/esm/pdf-viewer/constants.js +43 -0
  221. package/build/esm/pdf-viewer/constants.js.map +1 -0
  222. package/build/esm/pdf-viewer/hooks/usePdfAnnotationPortals.js +54 -0
  223. package/build/esm/pdf-viewer/hooks/usePdfAnnotationPortals.js.map +1 -0
  224. package/build/esm/pdf-viewer/hooks/usePdfDocument.js +67 -0
  225. package/build/esm/pdf-viewer/hooks/usePdfDocument.js.map +1 -0
  226. package/build/esm/pdf-viewer/hooks/usePdfViewer.js +69 -0
  227. package/build/esm/pdf-viewer/hooks/usePdfViewer.js.map +1 -0
  228. package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js +106 -0
  229. package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -0
  230. package/build/esm/pdf-viewer/hooks/usePdfViewerSync.js +71 -0
  231. package/build/esm/pdf-viewer/hooks/usePdfViewerSync.js.map +1 -0
  232. package/build/esm/pdf-viewer/types.js +2 -0
  233. package/build/esm/pdf-viewer/types.js.map +1 -0
  234. package/build/esm/public/experimental.js +4 -0
  235. package/build/esm/public/experimental.js.map +1 -1
  236. package/build/types/action-form/FormFieldApi.d.ts +48 -37
  237. package/build/types/action-form/FormFieldApi.d.ts.map +1 -1
  238. package/build/types/action-form/fields/DropdownField.d.ts +6 -0
  239. package/build/types/action-form/fields/DropdownField.d.ts.map +1 -0
  240. package/build/types/action-form/fields/FormFieldRenderer.d.ts.map +1 -1
  241. package/build/types/action-form/fields/TextInputField.d.ts +3 -1
  242. package/build/types/action-form/fields/TextInputField.d.ts.map +1 -1
  243. package/build/types/base-components/combobox/Combobox.d.ts +9 -1
  244. package/build/types/base-components/combobox/Combobox.d.ts.map +1 -1
  245. package/build/types/base-components/select/Select.d.ts +8 -2
  246. package/build/types/base-components/select/Select.d.ts.map +1 -1
  247. package/build/types/base-components/skeleton/SkeletonBar.d.ts +9 -0
  248. package/build/types/base-components/skeleton/SkeletonBar.d.ts.map +1 -0
  249. package/build/types/filter-list/FilterList.d.ts.map +1 -1
  250. package/build/types/filter-list/FilterListApi.d.ts +24 -6
  251. package/build/types/filter-list/FilterListApi.d.ts.map +1 -1
  252. package/build/types/filter-list/base/AddFilterPopover.d.ts +12 -0
  253. package/build/types/filter-list/base/AddFilterPopover.d.ts.map +1 -0
  254. package/build/types/filter-list/base/inputs/CheckboxListInput.d.ts +2 -1
  255. package/build/types/filter-list/base/inputs/CheckboxListInput.d.ts.map +1 -1
  256. package/build/types/filter-list/base/inputs/CheckboxListSkeleton.d.ts +2 -0
  257. package/build/types/filter-list/base/inputs/CheckboxListSkeleton.d.ts.map +1 -0
  258. package/build/types/filter-list/base/inputs/ListogramInput.d.ts +2 -1
  259. package/build/types/filter-list/base/inputs/ListogramInput.d.ts.map +1 -1
  260. package/build/types/filter-list/base/inputs/ListogramSkeleton.d.ts +2 -0
  261. package/build/types/filter-list/base/inputs/ListogramSkeleton.d.ts.map +1 -0
  262. package/build/types/filter-list/base/inputs/RangeInput.d.ts.map +1 -1
  263. package/build/types/filter-list/base/inputs/useStaleData.d.ts +1 -0
  264. package/build/types/filter-list/base/inputs/useStaleData.d.ts.map +1 -0
  265. package/build/types/filter-list/hooks/useFilterVisibility.d.ts +8 -0
  266. package/build/types/filter-list/hooks/useFilterVisibility.d.ts.map +1 -0
  267. package/build/types/object-table/DefaultCellRenderer.d.ts.map +1 -1
  268. package/build/types/object-table/EditableCell.d.ts.map +1 -1
  269. package/build/types/object-table/LoadingCell.d.ts +1 -0
  270. package/build/types/object-table/LoadingCell.d.ts.map +1 -1
  271. package/build/types/object-table/LoadingRow.d.ts.map +1 -1
  272. package/build/types/object-table/ObjectTableApi.d.ts +51 -15
  273. package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
  274. package/build/types/object-table/Table.d.ts +1 -0
  275. package/build/types/object-table/Table.d.ts.map +1 -1
  276. package/build/types/object-table/components/AsyncValueCell.d.ts +5 -0
  277. package/build/types/object-table/components/AsyncValueCell.d.ts.map +1 -0
  278. package/build/types/object-table/hooks/useFunctionColumnsData.d.ts +13 -0
  279. package/build/types/object-table/hooks/useFunctionColumnsData.d.ts.map +1 -0
  280. package/build/types/object-table/hooks/useObjectTableData.d.ts +8 -1
  281. package/build/types/object-table/hooks/useObjectTableData.d.ts.map +1 -1
  282. package/build/types/object-table/utils/AsyncCellData.d.ts +8 -0
  283. package/build/types/object-table/utils/AsyncCellData.d.ts.map +1 -0
  284. package/build/types/object-table/utils/constants.d.ts +1 -0
  285. package/build/types/object-table/utils/constants.d.ts.map +1 -1
  286. package/build/types/pdf-viewer/PdfRenderer.d.ts +8 -0
  287. package/build/types/pdf-viewer/PdfRenderer.d.ts.map +1 -0
  288. package/build/types/pdf-viewer/PdfViewer.d.ts +4 -0
  289. package/build/types/pdf-viewer/PdfViewer.d.ts.map +1 -0
  290. package/build/types/pdf-viewer/PdfViewerAnnotationLayer.d.ts +10 -0
  291. package/build/types/pdf-viewer/PdfViewerAnnotationLayer.d.ts.map +1 -0
  292. package/build/types/pdf-viewer/PdfViewerSearchBar.d.ts +12 -0
  293. package/build/types/pdf-viewer/PdfViewerSearchBar.d.ts.map +1 -0
  294. package/build/types/pdf-viewer/PdfViewerSidebar.d.ts +10 -0
  295. package/build/types/pdf-viewer/PdfViewerSidebar.d.ts.map +1 -0
  296. package/build/types/pdf-viewer/PdfViewerThumbnail.d.ts +10 -0
  297. package/build/types/pdf-viewer/PdfViewerThumbnail.d.ts.map +1 -0
  298. package/build/types/pdf-viewer/PdfViewerToolbar.d.ts +14 -0
  299. package/build/types/pdf-viewer/PdfViewerToolbar.d.ts.map +1 -0
  300. package/build/types/pdf-viewer/constants.d.ts +17 -0
  301. package/build/types/pdf-viewer/constants.d.ts.map +1 -0
  302. package/build/types/pdf-viewer/hooks/usePdfAnnotationPortals.d.ts +10 -0
  303. package/build/types/pdf-viewer/hooks/usePdfAnnotationPortals.d.ts.map +1 -0
  304. package/build/types/pdf-viewer/hooks/usePdfDocument.d.ts +9 -0
  305. package/build/types/pdf-viewer/hooks/usePdfDocument.d.ts.map +1 -0
  306. package/build/types/pdf-viewer/hooks/usePdfViewer.d.ts +9 -0
  307. package/build/types/pdf-viewer/hooks/usePdfViewer.d.ts.map +1 -0
  308. package/build/types/pdf-viewer/hooks/usePdfViewerSearch.d.ts +15 -0
  309. package/build/types/pdf-viewer/hooks/usePdfViewerSearch.d.ts.map +1 -0
  310. package/build/types/pdf-viewer/hooks/usePdfViewerSync.d.ts +15 -0
  311. package/build/types/pdf-viewer/hooks/usePdfViewerSync.d.ts.map +1 -0
  312. package/build/types/pdf-viewer/types.d.ts +44 -0
  313. package/build/types/pdf-viewer/types.d.ts.map +1 -0
  314. package/build/types/public/experimental.d.ts +4 -1
  315. package/build/types/public/experimental.d.ts.map +1 -1
  316. package/package.json +5 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @osdk/react-components
2
2
 
3
+ ## 0.2.0-beta.20
4
+
5
+ ### Minor Changes
6
+
7
+ - 9ff2eca: Add function-backed column query
8
+ - 6516ff9: Fix multiple setData calls
9
+ - bc46400: Add skeleton loading states and polish checkbox list, histogram, and range filter inputs
10
+ - 7a3c43d: feat(pdf): pdf-viewer component
11
+ - 532d0d7: Fix lint errors
12
+ - 074a754: Display function-backed column
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [4bb9769]
17
+ - @osdk/api@2.8.0-beta.23
18
+ - @osdk/client@2.8.0-beta.23
19
+ - @osdk/react@0.10.0-beta.10
20
+
3
21
  ## 0.2.0-beta.19
4
22
 
5
23
  ### Minor Changes
@@ -54,7 +54,11 @@ export const ActionForm = typedReactMemo(function ({
54
54
  }, [metadataError, onError]);
55
55
  const parameters = metadata?.parameters;
56
56
  const resolvedFieldDefinitions = useMemo(() => formFieldDefinitions ?? (metadata != null ? getDefaultFieldDefinitions(metadata) : EMPTY_FIELD_DEFINITIONS), [formFieldDefinitions, metadata]);
57
- const rendererFieldDefinitions = useMemo(() => resolvedFieldDefinitions.map(def => ({
57
+ const rendererFieldDefinitions = useMemo(() =>
58
+ // RendererFieldDefinition is a discriminated union keyed by fieldComponent.
59
+ // TypeScript can't verify that the spread preserves the fieldComponent ↔
60
+ // fieldComponentProps pairing, but FormFieldDefinition guarantees it.
61
+ resolvedFieldDefinitions.map(def => ({
58
62
  ...def,
59
63
  fieldKey: String(def.fieldKey),
60
64
  fieldType: parameters?.[String(def.fieldKey)]?.type,
@@ -1 +1 @@
1
- {"version":3,"file":"ActionForm.js","names":["useOsdkMetadata","useOsdkAction","React","useCallback","useEffect","useMemo","typedReactMemo","BaseForm","coerceFieldValue","getDefaultFieldDefinitions","EMPTY_FIELD_DEFINITIONS","ActionForm","actionDefinition","formTitle","formFieldDefinitions","formState","controlledFormState","onFormStateChange","isSubmitDisabled","onSubmit","onValidationResponse","_onValidationResponse","onSuccess","onError","applyAction","osdkApplyAction","isPending","metadata","loading","metadataLoading","error","metadataError","type","parameters","resolvedFieldDefinitions","rendererFieldDefinitions","map","def","fieldKey","String","fieldType","defaultValue","coerceFormState","rawState","coerced","key","value","Object","entries","handleSubmit","rawFormState","result","e","handleFieldValueChange","prev","resolvedTitle","displayName","apiName","commonProps","fieldDefinitions","isLoading","onFieldValueChange","createElement","_extends"],"sources":["ActionForm.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ActionDefinition } from \"@osdk/api\";\nimport { useOsdkMetadata } from \"@osdk/react\";\nimport { useOsdkAction } from \"@osdk/react/experimental\";\nimport React, { useCallback, useEffect, useMemo } from \"react\";\nimport { typedReactMemo } from \"../shared/typedMemo.js\";\nimport type { ActionFormProps, FormState } from \"./ActionFormApi.js\";\nimport { BaseForm } from \"./BaseForm.js\";\nimport type { RendererFieldDefinition } from \"./FormFieldApi.js\";\nimport { coerceFieldValue } from \"./utils/coerceFieldValue.js\";\nimport { getDefaultFieldDefinitions } from \"./utils/getDefaultFieldDefinitions.js\";\n\nconst EMPTY_FIELD_DEFINITIONS: readonly [] = [];\n\nexport const ActionForm: <Q extends ActionDefinition<unknown>>(\n props: ActionFormProps<Q>,\n) => React.ReactElement = typedReactMemo(function ActionFormFn<\n Q extends ActionDefinition<unknown>,\n>({\n actionDefinition,\n formTitle,\n formFieldDefinitions,\n formState: controlledFormState,\n onFormStateChange,\n isSubmitDisabled,\n onSubmit,\n onValidationResponse: _onValidationResponse,\n onSuccess,\n onError,\n}: ActionFormProps<Q>): React.ReactElement {\n const { applyAction: osdkApplyAction, isPending } = useOsdkAction(\n actionDefinition,\n );\n const {\n metadata,\n loading: metadataLoading,\n error: metadataError,\n } = useOsdkMetadata(actionDefinition);\n\n useEffect(\n function saveMetadataError() {\n if (metadataError != null) {\n onError?.({ type: \"unknown\", error: metadataError });\n }\n },\n [metadataError, onError],\n );\n\n const parameters = metadata?.parameters;\n\n const resolvedFieldDefinitions = useMemo(\n () =>\n formFieldDefinitions\n ?? (metadata != null\n ? getDefaultFieldDefinitions<Q>(metadata)\n : EMPTY_FIELD_DEFINITIONS),\n [formFieldDefinitions, metadata],\n );\n\n const rendererFieldDefinitions: ReadonlyArray<RendererFieldDefinition> =\n useMemo(\n () =>\n resolvedFieldDefinitions.map((def) => ({\n ...def,\n fieldKey: String(def.fieldKey),\n fieldType: parameters?.[String(def.fieldKey)]?.type,\n defaultValue: def.defaultValue,\n })),\n [resolvedFieldDefinitions, parameters],\n );\n\n const coerceFormState = useCallback(\n (rawState: Record<string, unknown>): Record<string, unknown> => {\n const coerced: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rawState)) {\n coerced[key] = coerceFieldValue(parameters?.[key]?.type, value);\n }\n return coerced;\n },\n [parameters],\n );\n\n const handleSubmit = useCallback(\n async (rawFormState: Record<string, unknown>) => {\n const formState = coerceFormState(rawFormState) as FormState<Q>;\n try {\n if (onSubmit != null) {\n await onSubmit(formState, osdkApplyAction);\n } else {\n const result = await osdkApplyAction(formState);\n onSuccess?.(result);\n }\n } catch (e) {\n onError?.({ type: \"submission\", error: e });\n }\n },\n [coerceFormState, onSubmit, osdkApplyAction, onSuccess, onError],\n );\n\n const handleFieldValueChange = useCallback(\n (fieldKey: string, value: unknown) => {\n onFormStateChange?.(\n (prev) =>\n ({\n ...prev,\n [fieldKey]: value,\n }) as FormState<Q>,\n );\n },\n [onFormStateChange],\n );\n\n const resolvedTitle = formTitle ?? metadata?.displayName\n ?? actionDefinition.apiName;\n\n const isControlled = controlledFormState != null;\n\n const commonProps = {\n formTitle: resolvedTitle,\n fieldDefinitions: rendererFieldDefinitions,\n onSubmit: handleSubmit,\n isSubmitDisabled,\n isPending,\n isLoading: metadataLoading,\n onFieldValueChange: handleFieldValueChange,\n };\n\n if (!isControlled) {\n return <BaseForm {...commonProps} />;\n }\n\n return <BaseForm {...commonProps} formState={controlledFormState} />;\n});\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AE,CAAC,CAAC;IAC7C;EACF,CAAC,EACD,CAACV,eAAe,EAAEvB,QAAQ,EAAEM,eAAe,EAAEH,SAAS,EAAEC,OAAO,CACjE,CAAC;EAED,MAAM8B,sBAAsB,GAAGlD,WAAW,CACxC,CAACmC,QAAgB,EAAEQ,KAAc,KAAK;IACpC7B,iBAAiB,GACdqC,IAAI,KACF;MACC,GAAGA,IAAI;MACP,CAAChB,QAAQ,GAAGQ;IACd,CAAC,CACL,CAAC;EACH,CAAC,EACD,CAAC7B,iBAAiB,CACpB,CAAC;EAED,MAAMsC,aAAa,GAAG1C,SAAS,IAAIc,QAAQ,EAAE6B,WAAW,IACnD5C,gBAAgB,CAAC6C,OAAO;EAI7B,MAAMC,WAAW,GAAG;IAClB7C,SAAS,EAAE0C,aAAa;IACxBI,gBAAgB,EAAExB,wBAAwB;IAC1ChB,QAAQ,EAAE8B,YAAY;IACtB/B,gBAAgB;IAChBQ,SAAS;IACTkC,SAAS,EAAE/B,eAAe;IAC1BgC,kBAAkB,EAAER;EACtB,CAAC;EAED,IAAI,EAZiBrC,mBAAmB,IAAI,IAAI,CAY/B,EAAE;IACjB,oBAAOd,KAAA,CAAA4D,aAAA,CAACvD,QAAQ,EAAKmD,WAAc,CAAC;EACtC;EAEA,oBAAOxD,KAAA,CAAA4D,aAAA,CAACvD,QAAQ,EAAAwD,QAAA,KAAKL,WAAW;IAAE3C,SAAS,EAAEC;EAAoB,EAAE,CAAC;AACtE,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ActionForm.js","names":["useOsdkMetadata","useOsdkAction","React","useCallback","useEffect","useMemo","typedReactMemo","BaseForm","coerceFieldValue","getDefaultFieldDefinitions","EMPTY_FIELD_DEFINITIONS","ActionForm","actionDefinition","formTitle","formFieldDefinitions","formState","controlledFormState","onFormStateChange","isSubmitDisabled","onSubmit","onValidationResponse","_onValidationResponse","onSuccess","onError","applyAction","osdkApplyAction","isPending","metadata","loading","metadataLoading","error","metadataError","type","parameters","resolvedFieldDefinitions","rendererFieldDefinitions","map","def","fieldKey","String","fieldType","defaultValue","coerceFormState","rawState","coerced","key","value","Object","entries","handleSubmit","rawFormState","result","e","handleFieldValueChange","prev","resolvedTitle","displayName","apiName","commonProps","fieldDefinitions","isLoading","onFieldValueChange","createElement","_extends"],"sources":["ActionForm.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ActionDefinition } from \"@osdk/api\";\nimport { useOsdkMetadata } from \"@osdk/react\";\nimport { useOsdkAction } from \"@osdk/react/experimental\";\nimport React, { useCallback, useEffect, useMemo } from \"react\";\nimport { typedReactMemo } from \"../shared/typedMemo.js\";\nimport type { ActionFormProps, FormState } from \"./ActionFormApi.js\";\nimport { BaseForm } from \"./BaseForm.js\";\nimport type { RendererFieldDefinition } from \"./FormFieldApi.js\";\nimport { coerceFieldValue } from \"./utils/coerceFieldValue.js\";\nimport { getDefaultFieldDefinitions } from \"./utils/getDefaultFieldDefinitions.js\";\n\nconst EMPTY_FIELD_DEFINITIONS: readonly [] = [];\n\nexport const ActionForm: <Q extends ActionDefinition<unknown>>(\n props: ActionFormProps<Q>,\n) => React.ReactElement = typedReactMemo(function ActionFormFn<\n Q extends ActionDefinition<unknown>,\n>({\n actionDefinition,\n formTitle,\n formFieldDefinitions,\n formState: controlledFormState,\n onFormStateChange,\n isSubmitDisabled,\n onSubmit,\n onValidationResponse: _onValidationResponse,\n onSuccess,\n onError,\n}: ActionFormProps<Q>): React.ReactElement {\n const { applyAction: osdkApplyAction, isPending } = useOsdkAction(\n actionDefinition,\n );\n const {\n metadata,\n loading: metadataLoading,\n error: metadataError,\n } = useOsdkMetadata(actionDefinition);\n\n useEffect(\n function saveMetadataError() {\n if (metadataError != null) {\n onError?.({ type: \"unknown\", error: metadataError });\n }\n },\n [metadataError, onError],\n );\n\n const parameters = metadata?.parameters;\n\n const resolvedFieldDefinitions = useMemo(\n () =>\n formFieldDefinitions\n ?? (metadata != null\n ? getDefaultFieldDefinitions<Q>(metadata)\n : EMPTY_FIELD_DEFINITIONS),\n [formFieldDefinitions, metadata],\n );\n\n const rendererFieldDefinitions: ReadonlyArray<RendererFieldDefinition> =\n useMemo(\n () =>\n // RendererFieldDefinition is a discriminated union keyed by fieldComponent.\n // TypeScript can't verify that the spread preserves the fieldComponent ↔\n // fieldComponentProps pairing, but FormFieldDefinition guarantees it.\n resolvedFieldDefinitions.map((def) =>\n ({\n ...def,\n fieldKey: String(def.fieldKey),\n fieldType: parameters?.[String(def.fieldKey)]?.type,\n defaultValue: def.defaultValue,\n }) as RendererFieldDefinition\n ),\n [resolvedFieldDefinitions, parameters],\n );\n\n const coerceFormState = useCallback(\n (rawState: Record<string, unknown>): Record<string, unknown> => {\n const coerced: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rawState)) {\n coerced[key] = coerceFieldValue(parameters?.[key]?.type, value);\n }\n return coerced;\n },\n [parameters],\n );\n\n const handleSubmit = useCallback(\n async (rawFormState: Record<string, unknown>) => {\n const formState = coerceFormState(rawFormState) as FormState<Q>;\n try {\n if (onSubmit != null) {\n await onSubmit(formState, osdkApplyAction);\n } else {\n const result = await osdkApplyAction(formState);\n onSuccess?.(result);\n }\n } catch (e) {\n onError?.({ type: \"submission\", error: e });\n }\n },\n [coerceFormState, onSubmit, osdkApplyAction, onSuccess, onError],\n );\n\n const handleFieldValueChange = useCallback(\n (fieldKey: string, value: unknown) => {\n onFormStateChange?.(\n (prev) =>\n ({\n ...prev,\n [fieldKey]: value,\n }) as FormState<Q>,\n );\n },\n [onFormStateChange],\n );\n\n const resolvedTitle = formTitle ?? metadata?.displayName\n ?? actionDefinition.apiName;\n\n const isControlled = controlledFormState != null;\n\n const commonProps = {\n formTitle: resolvedTitle,\n fieldDefinitions: rendererFieldDefinitions,\n onSubmit: handleSubmit,\n isSubmitDisabled,\n isPending,\n isLoading: metadataLoading,\n onFieldValueChange: handleFieldValueChange,\n };\n\n if (!isControlled) {\n return <BaseForm {...commonProps} />;\n }\n\n return <BaseForm {...commonProps} formState={controlledFormState} />;\n});\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAAQ,aAAa;AAC7C,SAASC,aAAa,QAAQ,0BAA0B;AACxD,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAC9D,SAASC,cAAc,QAAQ,wBAAwB;AAEvD,SAASC,QAAQ,QAAQ,eAAe;AAExC,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,0BAA0B,QAAQ,uCAAuC;AAElF,MAAMC,uBAAoC,GAAG,EAAE;AAE/C,OAAO,MAAMC,UAEU,GAAGL,cAAc,CAAC,UAEvC;EACAM,gBAAgB;EAChBC,SAAS;EACTC,oBAAoB;EACpBC,SAAS,EAAEC,mBAAmB;EAC9BC,iBAAiB;EACjBC,gBAAgB;EAChBC,QAAQ;EACRC,oBAAoB,EAAEC,qBAAqB;EAC3CC,SAAS;EACTC;AACkB,CAAC,EAAsB;EACzC,MAAM;IAAEC,WAAW,EAAEC,eAAe;IAAEC;EAAU,CAAC,GAAGzB,aAAa,CAC/DW,gBACF,CAAC;EACD,MAAM;IACJe,QAAQ;IACRC,OAAO,EAAEC,eAAe;IACxBC,KAAK,EAAEC;EACT,CAAC,GAAG/B,eAAe,CAACY,gBAAgB,CAAC;EAErCR,SAAS,CACP,YAA6B;IAC3B,IAAI2B,aAAa,IAAI,IAAI,EAAE;MACzBR,OAAO,GAAG;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reList":[]}
@@ -47,12 +47,9 @@ export const BaseForm = /*#__PURE__*/memo(function ({
47
47
  onSubmit(controlledFormState ?? rhfValues);
48
48
  }, [onSubmit, controlledFormState]);
49
49
  return /*#__PURE__*/React.createElement("form", {
50
- onSubmit: rhfHandleSubmit(onFormSubmit),
51
- "data-testid": "action-form"
52
- }, formTitle != null && /*#__PURE__*/React.createElement("h2", {
53
- "data-testid": "form-title"
54
- }, formTitle), isLoading && fieldDefinitions.length === 0 && /*#__PURE__*/React.createElement("div", {
55
- "data-testid": "form-loading"
50
+ onSubmit: rhfHandleSubmit(onFormSubmit)
51
+ }, formTitle != null && /*#__PURE__*/React.createElement("h2", null, formTitle), isLoading && fieldDefinitions.length === 0 && /*#__PURE__*/React.createElement("div", {
52
+ role: "status"
56
53
  }, "Loading form fields..."), fieldDefinitions.map(fieldDef => /*#__PURE__*/React.createElement(FieldBridge, {
57
54
  key: fieldDef.fieldKey,
58
55
  fieldDef: fieldDef,
@@ -60,8 +57,7 @@ export const BaseForm = /*#__PURE__*/memo(function ({
60
57
  onExternalChange: onFieldValueChange
61
58
  })), /*#__PURE__*/React.createElement("button", {
62
59
  type: "submit",
63
- disabled: isSubmitDisabled || isPending,
64
- "data-testid": "submit-button"
60
+ disabled: isSubmitDisabled || isPending
65
61
  }, isPending ? "Submitting..." : "Submit"));
66
62
  });
67
63
  function buildDefaultValues(fieldDefinitions) {
@@ -1 +1 @@
1
- {"version":3,"file":"BaseForm.js","names":["React","memo","useCallback","useMemo","useForm","FieldBridge","BaseForm","formTitle","fieldDefinitions","formState","controlledFormState","onFieldValueChange","onSubmit","isSubmitDisabled","isPending","isLoading","defaultValues","buildDefaultValues","control","handleSubmit","rhfHandleSubmit","values","onFormSubmit","rhfValues","createElement","length","map","fieldDef","key","fieldKey","onExternalChange","type","disabled","def","defaultValue"],"sources":["BaseForm.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { memo, useCallback, useMemo } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport type { BaseFormProps } from \"./ActionFormApi.js\";\nimport { FieldBridge } from \"./fields/FieldBridge.js\";\nimport type { RendererFieldDefinition } from \"./FormFieldApi.js\";\n\nexport const BaseForm: React.FC<BaseFormProps> = memo(function BaseFormFn({\n formTitle,\n fieldDefinitions,\n formState: controlledFormState,\n onFieldValueChange,\n onSubmit,\n isSubmitDisabled = false,\n isPending = false,\n isLoading = false,\n}: BaseFormProps): React.ReactElement {\n const isControlled = controlledFormState != null;\n\n const defaultValues = useMemo(\n () => buildDefaultValues(fieldDefinitions),\n [fieldDefinitions],\n );\n\n const { control, handleSubmit: rhfHandleSubmit } = useForm<\n Record<string, unknown>\n >({\n ...(isControlled ? { values: controlledFormState } : { defaultValues }),\n });\n\n const onFormSubmit = useCallback(\n (rhfValues: Record<string, unknown>) => {\n // In controlled mode, always submit the controlled state, not RHF's\n // internal state. Between a user keystroke and the parent re-rendering,\n // RHF's store may hold the user-typed value rather than the parent's\n // value. Using controlledFormState directly preserves the existing\n // guarantee that controlled mode submits the parent's state.\n onSubmit(controlledFormState ?? rhfValues);\n },\n [onSubmit, controlledFormState],\n );\n\n return (\n <form onSubmit={rhfHandleSubmit(onFormSubmit)} data-testid=\"action-form\">\n {formTitle != null && <h2 data-testid=\"form-title\">{formTitle}</h2>}\n {isLoading && fieldDefinitions.length === 0 && (\n <div data-testid=\"form-loading\">Loading form fields...</div>\n )}\n {fieldDefinitions.map((fieldDef) => (\n <FieldBridge\n key={fieldDef.fieldKey}\n fieldDef={fieldDef}\n control={control}\n onExternalChange={onFieldValueChange}\n />\n ))}\n <button\n type=\"submit\"\n disabled={isSubmitDisabled || isPending}\n data-testid=\"submit-button\"\n >\n {isPending ? \"Submitting...\" : \"Submit\"}\n </button>\n </form>\n );\n});\n\nfunction buildDefaultValues(\n fieldDefinitions: ReadonlyArray<RendererFieldDefinition>,\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n for (const def of fieldDefinitions) {\n values[def.fieldKey] = def.defaultValue;\n }\n return values;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACzD,SAASC,OAAO,QAAQ,iBAAiB;AAEzC,SAASC,WAAW,QAAQ,yBAAyB;AAGrD,OAAO,MAAMC,QAAiC,gBAAGL,IAAI,CAAC,UAAoB;EACxEM,SAAS;EACTC,gBAAgB;EAChBC,SAAS,EAAEC,mBAAmB;EAC9BC,kBAAkB;EAClBC,QAAQ;EACRC,gBAAgB,GAAG,KAAK;EACxBC,SAAS,GAAG,KAAK;EACjBC,SAAS,GAAG;AACC,CAAC,EAAsB;EAGpC,MAAMC,aAAa,GAAGb,OAAO,CAC3B,MAAMc,kBAAkB,CAACT,gBAAgB,CAAC,EAC1C,CAACA,gBAAgB,CACnB,CAAC;EAED,MAAM;IAAEU,OAAO;IAAEC,YAAY,EAAEC;EAAgB,CAAC,GAAGhB,OAAO,CAExD;IACA,IAVmBM,mBAAmB,IAAI,IAAI,GAU3B;MAAEW,MAAM,EAAEX;IAAoB,CAAC,GAAG;MAAEM;IAAc,CAAC;EACxE,CAAC,CAAC;EAEF,MAAMM,YAAY,GAAGpB,WAAW,CAC7BqB,SAAkC,IAAK;IACtC;IACA;IACA;IACA;IACA;IACAX,QAAQ,CAACF,mBAAmB,IAAIa,SAAS,CAAC;EAC5C,CAAC,EACD,CAACX,QAAQ,EAAEF,mBAAmB,CAChC,CAAC;EAED,oBACEV,KAAA,CAAAwB,aAAA;IAAMZ,QAAQ,EAAEQ,eAAe,CAACE,YAAY,CAAE;IAAC,eAAY;EAAa,GACrEf,SAAS,IAAI,IAAI,iBAAIP,KAAA,CAAAwB,aAAA;IAAI,eAAY;EAAY,GAAEjB,SAAc,CAAC,EAClEQ,SAAS,IAAIP,gBAAgB,CAACiB,MAAM,KAAK,CAAC,iBACzCzB,KAAA,CAAAwB,aAAA;IAAK,eAAY;EAAc,GAAC,wBAA2B,CAC5D,EACAhB,gBAAgB,CAACkB,GAAG,CAAEC,QAAQ,iBAC7B3B,KAAA,CAAAwB,aAAA,CAACnB,WAAW;IACVuB,GAAG,EAAED,QAAQ,CAACE,QAAS;IACvBF,QAAQ,EAAEA,QAAS;IACnBT,OAAO,EAAEA,OAAQ;IACjBY,gBAAgB,EAAEnB;EAAmB,CACtC,CACF,CAAC,eACFX,KAAA,CAAAwB,aAAA;IACEO,IAAI,EAAC,QAAQ;IACbC,QAAQ,EAAEnB,gBAAgB,IAAIC,SAAU;IACxC,eAAY;EAAe,GAE1BA,SAAS,GAAG,eAAe,GAAG,QACzB,CACJ,CAAC;AAEX,CAAC,CAAC;AAEF,SAASG,kBAAkBA,CACzBT,gBAAwD,EAC/B;EACzB,MAAMa,MAA+B,GAAG,CAAC,CAAC;EAC1C,KAAK,MAAMY,GAAG,IAAIzB,gBAAgB,EAAE;IAClCa,MAAM,CAACY,GAAG,CAACJ,QAAQ,CAAC,GAAGI,GAAG,CAACC,YAAY;EACzC;EACA,OAAOb,MAAM;AACf","ignoreList":[]}
1
+ {"version":3,"file":"BaseForm.js","names":["React","memo","useCallback","useMemo","useForm","FieldBridge","BaseForm","formTitle","fieldDefinitions","formState","controlledFormState","onFieldValueChange","onSubmit","isSubmitDisabled","isPending","isLoading","defaultValues","buildDefaultValues","control","handleSubmit","rhfHandleSubmit","values","onFormSubmit","rhfValues","createElement","length","role","map","fieldDef","key","fieldKey","onExternalChange","type","disabled","def","defaultValue"],"sources":["BaseForm.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { memo, useCallback, useMemo } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport type { BaseFormProps } from \"./ActionFormApi.js\";\nimport { FieldBridge } from \"./fields/FieldBridge.js\";\nimport type { RendererFieldDefinition } from \"./FormFieldApi.js\";\n\nexport const BaseForm: React.FC<BaseFormProps> = memo(function BaseFormFn({\n formTitle,\n fieldDefinitions,\n formState: controlledFormState,\n onFieldValueChange,\n onSubmit,\n isSubmitDisabled = false,\n isPending = false,\n isLoading = false,\n}: BaseFormProps): React.ReactElement {\n const isControlled = controlledFormState != null;\n\n const defaultValues = useMemo(\n () => buildDefaultValues(fieldDefinitions),\n [fieldDefinitions],\n );\n\n const { control, handleSubmit: rhfHandleSubmit } = useForm<\n Record<string, unknown>\n >({\n ...(isControlled ? { values: controlledFormState } : { defaultValues }),\n });\n\n const onFormSubmit = useCallback(\n (rhfValues: Record<string, unknown>) => {\n // In controlled mode, always submit the controlled state, not RHF's\n // internal state. Between a user keystroke and the parent re-rendering,\n // RHF's store may hold the user-typed value rather than the parent's\n // value. Using controlledFormState directly preserves the existing\n // guarantee that controlled mode submits the parent's state.\n onSubmit(controlledFormState ?? rhfValues);\n },\n [onSubmit, controlledFormState],\n );\n\n return (\n <form onSubmit={rhfHandleSubmit(onFormSubmit)}>\n {formTitle != null && <h2>{formTitle}</h2>}\n {isLoading && fieldDefinitions.length === 0 && (\n <div role=\"status\">Loading form fields...</div>\n )}\n {fieldDefinitions.map((fieldDef) => (\n <FieldBridge\n key={fieldDef.fieldKey}\n fieldDef={fieldDef}\n control={control}\n onExternalChange={onFieldValueChange}\n />\n ))}\n <button\n type=\"submit\"\n disabled={isSubmitDisabled || isPending}\n >\n {isPending ? \"Submitting...\" : \"Submit\"}\n </button>\n </form>\n );\n});\n\nfunction buildDefaultValues(\n fieldDefinitions: ReadonlyArray<RendererFieldDefinition>,\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n for (const def of fieldDefinitions) {\n values[def.fieldKey] = def.defaultValue;\n }\n return values;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACzD,SAASC,OAAO,QAAQ,iBAAiB;AAEzC,SAASC,WAAW,QAAQ,yBAAyB;AAGrD,OAAO,MAAMC,QAAiC,gBAAGL,IAAI,CAAC,UAAoB;EACxEM,SAAS;EACTC,gBAAgB;EAChBC,SAAS,EAAEC,mBAAmB;EAC9BC,kBAAkB;EAClBC,QAAQ;EACRC,gBAAgB,GAAG,KAAK;EACxBC,SAAS,GAAG,KAAK;EACjBC,SAAS,GAAG;AACC,CAAC,EAAsB;EAGpC,MAAMC,aAAa,GAAGb,OAAO,CAC3B,MAAMc,kBAAkB,CAACT,gBAAgB,CAAC,EAC1C,CAACA,gBAAgB,CACnB,CAAC;EAED,MAAM;IAAEU,OAAO;IAAEC,YAAY,EAAEC;EAAgB,CAAC,GAAGhB,OAAO,CAExD;IACA,IAVmBM,mBAAmB,IAAI,IAAI,GAU3B;MAAEW,MAAM,EAAEX;IAAoB,CAAC,GAAG;MAAEM;IAAc,CAAC;EACxE,CAAC,CAAC;EAEF,MAAMM,YAAY,GAAGpB,WAAW,CAC7BqB,SAAkC,IAAK;IACtC;IACA;IACA;IACA;IACA;IACAX,QAAQ,CAACF,mBAAmB,IAAIa,SAAS,CAAC;EAC5C,CAAC,EACD,CAACX,QAAQ,EAAEF,mBAAmB,CAChC,CAAC;EAED,oBACEV,KAAA,CAAAwB,aAAA;IAAMZ,QAAQ,EAAEQ,eAAe,CAACE,YAAY;EAAE,GAC3Cf,SAAS,IAAI,IAAI,iBAAIP,KAAA,CAAAwB,aAAA,aAAKjB,SAAc,CAAC,EACzCQ,SAAS,IAAIP,gBAAgB,CAACiB,MAAM,KAAK,CAAC,iBACzCzB,KAAA,CAAAwB,aAAA;IAAKE,IAAI,EAAC;EAAQ,GAAC,wBAA2B,CAC/C,EACAlB,gBAAgB,CAACmB,GAAG,CAAEC,QAAQ,iBAC7B5B,KAAA,CAAAwB,aAAA,CAACnB,WAAW;IACVwB,GAAG,EAAED,QAAQ,CAACE,QAAS;IACvBF,QAAQ,EAAEA,QAAS;IACnBV,OAAO,EAAEA,OAAQ;IACjBa,gBAAgB,EAAEpB;EAAmB,CACtC,CACF,CAAC,eACFX,KAAA,CAAAwB,aAAA;IACEQ,IAAI,EAAC,QAAQ;IACbC,QAAQ,EAAEpB,gBAAgB,IAAIC;EAAU,GAEvCA,SAAS,GAAG,eAAe,GAAG,QACzB,CACJ,CAAC;AAEX,CAAC,CAAC;AAEF,SAASG,kBAAkBA,CACzBT,gBAAwD,EAC/B;EACzB,MAAMa,MAA+B,GAAG,CAAC,CAAC;EAC1C,KAAK,MAAMa,GAAG,IAAI1B,gBAAgB,EAAE;IAClCa,MAAM,CAACa,GAAG,CAACJ,QAAQ,CAAC,GAAGI,GAAG,CAACC,YAAY;EACzC;EACA,OAAOd,MAAM;AACf","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldApi.js","names":[],"sources":["FormFieldApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n CompileTimeMetadata,\n DataValueClientToWire,\n ObjectSet,\n ObjectTypeDefinition,\n} from \"@osdk/api\";\nimport type React from \"react\";\n\n/**\n * A form field definition specifies configuration for a single field\n */\nexport interface FormFieldDefinition<\n Q extends ActionDefinition<unknown>,\n K extends FieldKey<Q> = FieldKey<Q>,\n> {\n /**\n * The field's unique key\n */\n fieldKey: K;\n\n /**\n * Display label for the field\n * If not provided, the form field will not show any label.\n */\n label?: string;\n\n /**\n * Default value of the field\n */\n defaultValue?: FieldValueType<Q, K>;\n\n /**\n * The form field component type to render\n */\n fieldComponent: ValidFormFieldForPropertyType<FieldDescriptorType<Q, K>>;\n\n /**\n * Whether the field is required\n */\n isRequired?: boolean;\n\n /**\n * Placeholder text\n */\n placeholder?: string;\n\n /**\n * Additional information to display on this field\n * The placement of helper text depends on the value of helperTextPlacement prop\n */\n helperText?: string;\n\n /**\n * The placement of the helper text either below the field or in a tooltip\n *\n * @default \"tooltip\"\n */\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n\n /**\n * Whether the field is disabled\n */\n isDisabled?: boolean;\n\n /**\n * A callback to return a custom error message if validation failed\n *\n * @param validationRule the validation rule that failed with the error message\n * @returns the error message to display\n */\n onValidationError?: (error: ValidationError) => string;\n\n /**\n * Additional function to validate the field\n *\n * @param value the current field value\n * @returns a boolean promise indicating whether the value is valid\n */\n validate?: (value: FieldValueType<Q, K>) => Promise<boolean>;\n\n /**\n * The component props for the form field\n * Excludes runtime props (key, onChange) which are managed by ActionForm\n */\n fieldComponentProps?: Omit<\n FormFieldPropsByType[\n ValidFormFieldForPropertyType<FieldDescriptorType<Q, K>>\n ],\n \"key\" | \"onChange\"\n >;\n}\n\ntype ValidationError = { type: ValidationRule; error: string };\n\ntype ValidationRule =\n | \"required\"\n | \"min\"\n | \"max\"\n | \"minLength\"\n | \"maxLength\"\n | \"pattern\"\n | \"validate\";\n\n/**\n * Maps field types to their corresponding props\n */\nexport interface FormFieldPropsByType {\n DATETIME_PICKER: DatetimePickerFieldProps;\n DROPDOWN: DropdownFieldProps<unknown>;\n FILE_PICKER: FilePickerProps;\n NUMBER_INPUT: NumberInputFieldProps;\n OBJECT_SET: ObjectSetFieldProps<ObjectTypeDefinition>;\n RADIO_BUTTONS: RadioButtonsFieldProps<unknown>;\n TEXT_AREA: TextAreaFieldProps;\n TEXT_INPUT: TextInputFieldProps;\n CUSTOM: CustomFieldProps<unknown>;\n}\n\n/**\n * Datetime picker field props\n */\nexport interface DatetimePickerFieldProps extends BaseFormFieldProps<Date> {\n fieldComponent: \"DATETIME_PICKER\";\n\n /**\n * The earliest date the user can select\n * If provided, this will be added to the field validation\n */\n min?: Date;\n\n /**\n * The latest date the user can select\n * If provided, this will be added to the field validation\n */\n max?: Date;\n\n /**\n * Whether to show time picker\n */\n showTime?: boolean;\n\n /**\n * Function to format the date string\n */\n formatDate?: (date: Date) => string;\n}\n\n/**\n * Dropdown field props with selectable options\n */\nexport interface DropdownFieldProps<V, IsMulti extends boolean = false>\n extends BaseFormFieldProps<IsMulti extends true ? V[] : V>\n{\n fieldComponent: \"DROPDOWN\";\n\n /**\n * Available options for the dropdown\n */\n options: Option<V>[];\n\n /**\n * Whether the dropdown allows searching/filtering\n */\n isSearchable?: boolean;\n\n /**\n * Whether multiple values can be selected\n */\n isMulti?: boolean;\n}\n\nexport interface FilePickerProps extends BaseFormFieldProps<File | File[]> {\n fieldComponent: \"FILE_PICKER\";\n\n /**\n * Whether multiple files can be selected\n */\n isMulti?: boolean;\n\n /**\n * Accepted file types (e.g., \"image/*\", \".pdf\")\n */\n accept?: string | string[];\n\n /**\n * Maximum file size in bytes\n */\n maxSize?: number;\n}\n\n/**\n * Text area field props\n */\nexport interface TextAreaFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n | \"rows\"\n | \"wrap\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n fieldComponent: \"TEXT_AREA\";\n}\n\nexport interface TextInputFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n fieldComponent: \"TEXT_INPUT\";\n placeholder?: string;\n}\n\n/**\n * Number input field props\n */\nexport interface NumberInputFieldProps extends\n BaseFormFieldProps<number>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"min\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"max\"\n | \"step\"\n >\n{\n fieldComponent: \"NUMBER_INPUT\";\n}\n\n/**\n * Radio buttons field props\n */\nexport interface RadioButtonsFieldProps<V> extends BaseFormFieldProps<V> {\n fieldComponent: \"RADIO_BUTTONS\";\n\n /**\n * Available options for radio buttons\n */\n options: Option<V>[];\n}\n\n/**\n * Option interface for dropdown and radio options\n */\nexport interface Option<V> {\n label: string;\n value: V;\n}\n\n/**\n * Object set field displays the summary of the count of the given object set\n */\nexport interface ObjectSetFieldProps<T extends ObjectTypeDefinition>\n extends BaseFormFieldProps<ObjectSet<T>>\n{\n fieldComponent: \"OBJECT_SET\";\n}\n\n/**\n * Custom field props for user-defined renderers\n */\nexport interface CustomFieldProps<V> extends BaseFormFieldProps<V> {\n fieldComponent: \"CUSTOM\";\n\n /**\n * Custom renderer function\n */\n customRenderer: (props: BaseFormFieldProps<V>) => React.ReactNode;\n}\n\nexport interface BaseFormFieldProps<V> {\n /**\n * The value of the form field\n */\n value: V;\n /**\n * Called when the field value changes.\n *\n * ActionForm internally wraps this to pass the key to `onFieldValueChange`:\n * ```\n * <DropdownField\n * {...fieldDef}\n * onChange={(value) => onFieldValueChange(fieldDef.key, value)}\n * />\n * ```\n *\n * @param value The new value of the form field\n */\n onChange?: (value?: V) => void;\n}\n\nexport type FieldKey<Q extends ActionDefinition<unknown>> =\n keyof ActionParameters<Q>;\n\n/**\n * Extracts parameters from an ActionDefinition\n */\nexport type ActionParameters<Q extends ActionDefinition<unknown>> =\n CompileTimeMetadata<Q>[\"parameters\"];\n\n/**\n * Extracts the value type for a specific parameter\n *\n * TODO: Re-use `BaseType`\n */\nexport type FieldValueType<\n Q extends ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"] extends\n ActionMetadata.DataType.Object<infer T> ? ActionParam.ObjectType<T>\n : ActionParameters<Q>[K][\"type\"] extends\n ActionMetadata.DataType.ObjectSet<infer T> ? ActionParam.ObjectSetType<T>\n : ActionParameters<Q>[K][\"type\"] extends\n ActionMetadata.DataType.Struct<infer T> ? ActionParam.StructType<T>\n : ActionParameters<Q>[K][\"type\"] extends keyof DataValueClientToWire\n ? DataValueClientToWire[ActionParameters<Q>[K][\"type\"]]\n : never;\n\n/**\n * Extracts the parameter type descriptor for a specific action parameter.\n */\nexport type FieldDescriptorType<\n Q extends ActionDefinition<unknown> = ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"];\n\n/**\n * Available form field component types\n */\nexport type FieldComponent =\n | \"DATETIME_PICKER\"\n | \"DROPDOWN\"\n | \"FILE_PICKER\"\n | \"NUMBER_INPUT\"\n | \"RADIO_BUTTONS\"\n | \"OBJECT_SET\"\n | \"TEXT_AREA\"\n | \"TEXT_INPUT\"\n | \"CUSTOM\";\n\n/**\n * Describes the data type of a form field, independent of OSDK.\n * Mirrors ActionMetadata.DataType to keep the rendering layer OSDK-agnostic.\n */\nexport type FieldType =\n | \"boolean\"\n | \"string\"\n | \"integer\"\n | \"long\"\n | \"double\"\n | \"datetime\"\n | \"timestamp\"\n | \"attachment\"\n | \"marking\"\n | \"mediaReference\"\n | \"objectType\"\n | \"geoshape\"\n | \"geohash\"\n | { type: \"object\"; object: string }\n | { type: \"objectSet\"; objectSet: string }\n | { type: \"interface\"; interface: string }\n | { type: \"struct\"; struct: Record<string, string> };\n\n/**\n * An OSDK-agnostic field definition used by BaseForm and FormFieldRenderer.\n * Contains only the information needed to render a single field — no generics,\n * no compile-time parameter constraints.\n */\nexport interface RendererFieldDefinition {\n fieldKey: string;\n fieldComponent: FieldComponent;\n fieldType?: FieldType;\n label?: string;\n defaultValue?: unknown;\n isRequired?: boolean;\n placeholder?: string;\n helperText?: string;\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n fieldComponentProps?: Record<string, unknown>;\n}\n\n/**\n * Gets valid form field types for a given property type\n */\nexport type ValidFormFieldForPropertyType<P extends FieldDescriptorType> =\n P extends \"objectSet\" ? \"OBJECT_SET\"\n : P extends \"object\" ? \"DROPDOWN\"\n : P extends \"mediaReference\" | \"attachment\" ? \"FILE_PICKER\"\n : P extends \"boolean\" ? \"RADIO_BUTTONS\" | \"DROPDOWN\"\n : P extends \"string\" ? \"TEXT_INPUT\" | \"TEXT_AREA\"\n : P extends \"datetime\" | \"timestamp\" ? \"DATETIME_PICKER\"\n : P extends\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"short\"\n | \"byte\"\n | \"decimal\" ? \"NUMBER_INPUT\"\n : never;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FormFieldApi.js","names":[],"sources":["FormFieldApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n ActionParam,\n CompileTimeMetadata,\n DataValueClientToWire,\n ObjectSet,\n ObjectTypeDefinition,\n} from \"@osdk/api\";\nimport type React from \"react\";\n\n/**\n * A form field definition specifies configuration for a single field\n */\nexport interface FormFieldDefinition<\n Q extends ActionDefinition<unknown>,\n K extends FieldKey<Q> = FieldKey<Q>,\n> {\n /**\n * The field's unique key\n */\n fieldKey: K;\n\n /**\n * Display label for the field\n * If not provided, the form field will not show any label.\n */\n label?: string;\n\n /**\n * Default value of the field\n */\n defaultValue?: FieldValueType<Q, K>;\n\n /**\n * The form field component type to render\n */\n fieldComponent: ValidFormFieldForPropertyType<FieldDescriptorType<Q, K>>;\n\n /**\n * Whether the field is required\n */\n isRequired?: boolean;\n\n /**\n * Placeholder text\n */\n placeholder?: string;\n\n /**\n * Additional information to display on this field\n * The placement of helper text depends on the value of helperTextPlacement prop\n */\n helperText?: string;\n\n /**\n * The placement of the helper text either below the field or in a tooltip\n *\n * @default \"tooltip\"\n */\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n\n /**\n * Whether the field is disabled\n */\n isDisabled?: boolean;\n\n /**\n * A callback to return a custom error message if validation failed\n *\n * @param validationRule the validation rule that failed with the error message\n * @returns the error message to display\n */\n onValidationError?: (error: ValidationError) => string;\n\n /**\n * Additional function to validate the field\n *\n * @param value the current field value\n * @returns a boolean promise indicating whether the value is valid\n */\n validate?: (value: FieldValueType<Q, K>) => Promise<boolean>;\n\n /**\n * The component props for the form field\n * Excludes runtime props (key, onChange) which are managed by ActionForm\n */\n fieldComponentProps?: Omit<\n FormFieldPropsByType[\n ValidFormFieldForPropertyType<\n FieldDescriptorType<Q, K>\n >\n ],\n \"key\" | \"onChange\"\n >;\n}\n\ntype ValidationError = { type: ValidationRule; error: string };\n\ntype ValidationRule =\n | \"required\"\n | \"min\"\n | \"max\"\n | \"minLength\"\n | \"maxLength\"\n | \"pattern\"\n | \"validate\";\n\n/**\n * Maps field types to their corresponding props\n */\nexport interface FormFieldPropsByType {\n DATETIME_PICKER: DatetimePickerFieldProps;\n DROPDOWN: DropdownFieldProps<unknown>;\n FILE_PICKER: FilePickerProps;\n NUMBER_INPUT: NumberInputFieldProps;\n OBJECT_SET: ObjectSetFieldProps<ObjectTypeDefinition>;\n RADIO_BUTTONS: RadioButtonsFieldProps<unknown>;\n TEXT_AREA: TextAreaFieldProps;\n TEXT_INPUT: TextInputFieldProps;\n CUSTOM: CustomFieldProps<unknown>;\n}\n\n/**\n * Datetime picker field props\n */\nexport interface DatetimePickerFieldProps extends BaseFormFieldProps<Date> {\n /**\n * The earliest date the user can select\n * If provided, this will be added to the field validation\n */\n min?: Date;\n\n /**\n * The latest date the user can select\n * If provided, this will be added to the field validation\n */\n max?: Date;\n\n /**\n * Whether to show time picker\n */\n showTime?: boolean;\n\n /**\n * Function to format the date string\n */\n formatDate?: (date: Date) => string;\n}\n\n/**\n * Dropdown field props with selectable items\n */\nexport interface DropdownFieldProps<V, Multiple extends boolean = false>\n extends BaseFormFieldProps<Multiple extends true ? V[] : V>\n{\n /**\n * Available items for the dropdown\n */\n items: V[];\n\n /**\n * Converts an item to a display string. Defaults to `String()`.\n */\n itemToStringLabel?: (item: V) => string;\n\n /**\n * Returns a unique string key for a list item. Used as the React `key`.\n * Falls back to the item's index when not provided.\n */\n itemToKey?: (item: V) => string;\n\n /**\n * Custom equality check for item values. Defaults to `Object.is`.\n * Required when items are objects to ensure correct selection matching.\n */\n isItemEqual?: (a: V, b: V) => boolean;\n\n /**\n * Whether the dropdown allows searching/filtering.\n * When true, renders a Combobox with a search input.\n * When false (default), renders a Select dropdown.\n */\n isSearchable?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Whether multiple values can be selected\n */\n isMultiple?: Multiple;\n}\n\nexport interface FilePickerProps extends BaseFormFieldProps<File | File[]> {\n /**\n * Whether multiple files can be selected\n */\n isMulti?: boolean;\n\n /**\n * Accepted file types (e.g., \"image/*\", \".pdf\")\n */\n accept?: string | string[];\n\n /**\n * Maximum file size in bytes\n */\n maxSize?: number;\n}\n\n/**\n * Text area field props\n */\nexport interface TextAreaFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n | \"rows\"\n | \"wrap\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{}\n\nexport interface TextInputFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n placeholder?: string;\n}\n\n/**\n * Number input field props\n */\nexport interface NumberInputFieldProps extends\n BaseFormFieldProps<number>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"min\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"max\"\n | \"step\"\n >\n{}\n\n/**\n * Radio buttons field props\n */\nexport interface RadioButtonsFieldProps<V> extends BaseFormFieldProps<V> {\n /**\n * Available options for radio buttons\n */\n options: Option<V>[];\n}\n\n/**\n * Option interface for radio button options\n */\nexport interface Option<V> {\n label: string;\n value: V;\n}\n\n/**\n * Object set field displays the summary of the count of the given object set\n */\nexport interface ObjectSetFieldProps<T extends ObjectTypeDefinition>\n extends BaseFormFieldProps<ObjectSet<T>>\n{}\n\n/**\n * Custom field props for user-defined renderers\n */\nexport interface CustomFieldProps<V> extends BaseFormFieldProps<V> {\n /**\n * Custom renderer function\n */\n customRenderer: (props: BaseFormFieldProps<V>) => React.ReactNode;\n}\n\nexport interface BaseFormFieldProps<V> {\n /**\n * The value of the form field\n */\n value: V | null;\n /**\n * Called when the field value changes.\n *\n * ActionForm internally wraps this to pass the key to `onFieldValueChange`:\n * ```\n * <DropdownField\n * {...fieldDef}\n * onChange={(value) => onFieldValueChange(fieldDef.key, value)}\n * />\n * ```\n *\n * @param value The new value of the form field\n */\n onChange?: (value: V | null) => void;\n}\n\nexport type FieldKey<Q extends ActionDefinition<unknown>> =\n keyof ActionParameters<Q>;\n\n/**\n * Extracts parameters from an ActionDefinition\n */\nexport type ActionParameters<Q extends ActionDefinition<unknown>> =\n CompileTimeMetadata<Q>[\"parameters\"];\n\n/**\n * Extracts the value type for a specific parameter\n *\n * TODO: Re-use `BaseType`\n */\nexport type FieldValueType<\n Q extends ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"] extends\n ActionMetadata.DataType.Object<infer T> ? ActionParam.ObjectType<T>\n : ActionParameters<Q>[K][\"type\"] extends ActionMetadata.DataType.ObjectSet<\n infer T\n > ? ActionParam.ObjectSetType<T>\n : ActionParameters<Q>[K][\"type\"] extends ActionMetadata.DataType.Struct<\n infer T\n > ? ActionParam.StructType<T>\n : ActionParameters<Q>[K][\"type\"] extends keyof DataValueClientToWire\n ? DataValueClientToWire[ActionParameters<Q>[K][\"type\"]]\n : never;\n\n/**\n * Extracts the parameter type descriptor for a specific action parameter.\n */\nexport type FieldDescriptorType<\n Q extends ActionDefinition<unknown> = ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"];\n\n/**\n * Available form field component types\n */\nexport type FieldComponent =\n | \"DATETIME_PICKER\"\n | \"DROPDOWN\"\n | \"FILE_PICKER\"\n | \"NUMBER_INPUT\"\n | \"RADIO_BUTTONS\"\n | \"OBJECT_SET\"\n | \"TEXT_AREA\"\n | \"TEXT_INPUT\"\n | \"CUSTOM\";\n\n/**\n * Describes the data type of a form field, independent of OSDK.\n * Mirrors ActionMetadata.DataType to keep the rendering layer OSDK-agnostic.\n */\nexport type FieldType =\n | \"boolean\"\n | \"string\"\n | \"integer\"\n | \"long\"\n | \"double\"\n | \"datetime\"\n | \"timestamp\"\n | \"attachment\"\n | \"marking\"\n | \"mediaReference\"\n | \"objectType\"\n | \"geoshape\"\n | \"geohash\"\n | { type: \"object\"; object: string }\n | { type: \"objectSet\"; objectSet: string }\n | { type: \"interface\"; interface: string }\n | { type: \"struct\"; struct: Record<string, string> };\n\n/**\n * An OSDK-agnostic field definition used by BaseForm and FormFieldRenderer.\n * Contains only the information needed to render a single field — no generics,\n * no compile-time parameter constraints.\n *\n * Implemented as a distributed mapped type: switching on `fieldComponent`\n * narrows `fieldComponentProps` to the correct props type automatically.\n */\nexport type RendererFieldDefinition = {\n [K in FieldComponent]: {\n fieldKey: string;\n fieldComponent: K;\n fieldType?: FieldType;\n label?: string;\n defaultValue?: unknown;\n isRequired?: boolean;\n placeholder?: string;\n helperText?: string;\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n fieldComponentProps?: Omit<FormFieldPropsByType[K], \"value\" | \"onChange\">;\n };\n}[FieldComponent];\n\n/**\n * Gets valid form field types for a given property type\n */\nexport type ValidFormFieldForPropertyType<P extends FieldDescriptorType> =\n P extends \"objectSet\" ? \"OBJECT_SET\"\n : P extends \"object\" ? \"DROPDOWN\"\n : P extends \"mediaReference\" | \"attachment\" ? \"FILE_PICKER\"\n : P extends \"boolean\" ? \"RADIO_BUTTONS\" | \"DROPDOWN\"\n : P extends \"string\" ? \"TEXT_INPUT\" | \"TEXT_AREA\"\n : P extends \"datetime\" | \"timestamp\" ? \"DATETIME_PICKER\"\n : P extends\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"short\"\n | \"byte\"\n | \"decimal\" ? \"NUMBER_INPUT\"\n : never;\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,104 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ /*
3
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ import React, { useCallback } from "react";
19
+ import { Combobox } from "../../base-components/combobox/Combobox.js";
20
+ import { Select } from "../../base-components/select/Select.js";
21
+ import { typedReactMemo } from "../../shared/typedMemo.js";
22
+ export function DropdownField({
23
+ isSearchable = false,
24
+ itemToStringLabel,
25
+ itemToKey,
26
+ ...rest
27
+ }) {
28
+ const resolvedItemToStringLabel = itemToStringLabel ?? defaultItemToStringLabel;
29
+ const getKey = useCallback(item => itemToKey?.(item) ?? resolvedItemToStringLabel(item), [itemToKey, resolvedItemToStringLabel]);
30
+ if (isSearchable) {
31
+ return /*#__PURE__*/React.createElement(ComboboxDropdown, _extends({}, rest, {
32
+ itemToStringLabel: resolvedItemToStringLabel,
33
+ getKey: getKey
34
+ }));
35
+ }
36
+ return /*#__PURE__*/React.createElement(SelectDropdown, _extends({}, rest, {
37
+ itemToStringLabel: resolvedItemToStringLabel,
38
+ getKey: getKey
39
+ }));
40
+ }
41
+ const SelectDropdown = typedReactMemo(function ({
42
+ value,
43
+ onChange,
44
+ items,
45
+ itemToStringLabel,
46
+ getKey,
47
+ isItemEqual,
48
+ isMultiple,
49
+ placeholder
50
+ }) {
51
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select.Root, {
52
+ value: value,
53
+ onValueChange: onChange,
54
+ multiple: isMultiple,
55
+ isItemEqualToValue: isItemEqual,
56
+ itemToStringLabel: itemToStringLabel
57
+ }, /*#__PURE__*/React.createElement(Select.Trigger, {
58
+ placeholder: placeholder
59
+ }), /*#__PURE__*/React.createElement(Select.Portal, null, /*#__PURE__*/React.createElement(Select.Positioner, null, /*#__PURE__*/React.createElement(Select.Popup, null, items.map(item => /*#__PURE__*/React.createElement(Select.Item, {
60
+ key: getKey(item),
61
+ value: item
62
+ }, itemToStringLabel(item))))))));
63
+ });
64
+ const ComboboxDropdown = typedReactMemo(function ({
65
+ value,
66
+ onChange,
67
+ items,
68
+ itemToStringLabel,
69
+ getKey,
70
+ isItemEqual,
71
+ isMultiple,
72
+ placeholder
73
+ }) {
74
+ const renderChips = useCallback(selectedValues => /*#__PURE__*/React.createElement(React.Fragment, null, selectedValues.map(item => /*#__PURE__*/React.createElement(Combobox.Chip, {
75
+ key: getKey(item),
76
+ "aria-label": itemToStringLabel(item)
77
+ }, itemToStringLabel(item), /*#__PURE__*/React.createElement(Combobox.ChipRemove, null))), /*#__PURE__*/React.createElement(Combobox.Input, {
78
+ placeholder: selectedValues.length > 0 ? "" : placeholder ?? "Search…"
79
+ })), [getKey, itemToStringLabel, placeholder]);
80
+ const renderItem = useCallback(item => /*#__PURE__*/React.createElement(Combobox.Item, {
81
+ key: getKey(item),
82
+ value: item
83
+ }, itemToStringLabel(item)), [getKey, itemToStringLabel]);
84
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Combobox.Root, {
85
+ value: value,
86
+ onValueChange: onChange,
87
+ multiple: isMultiple,
88
+ itemToStringLabel: itemToStringLabel,
89
+ isItemEqualToValue: isItemEqual,
90
+ items: items
91
+ }, isMultiple ? /*#__PURE__*/React.createElement(Combobox.Chips, null, /*#__PURE__*/React.createElement(Combobox.Value, null, renderChips)) : /*#__PURE__*/React.createElement(Combobox.Input, {
92
+ placeholder: placeholder
93
+ }), /*#__PURE__*/React.createElement(Combobox.Portal, null, /*#__PURE__*/React.createElement(Combobox.Positioner, null, /*#__PURE__*/React.createElement(Combobox.Popup, null, /*#__PURE__*/React.createElement(Combobox.Empty, null, "No results"), /*#__PURE__*/React.createElement(Combobox.List, null, renderItem))))));
94
+ });
95
+ function defaultItemToStringLabel(item) {
96
+ if (item == null || typeof item !== "object") {
97
+ return String(item);
98
+ }
99
+ if ("label" in item && item.label != null && typeof item.label === "string") {
100
+ return item.label;
101
+ }
102
+ return String(item);
103
+ }
104
+ //# sourceMappingURL=DropdownField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownField.js","names":["React","useCallback","Combobox","Select","typedReactMemo","DropdownField","isSearchable","itemToStringLabel","itemToKey","rest","resolvedItemToStringLabel","defaultItemToStringLabel","getKey","item","createElement","ComboboxDropdown","_extends","SelectDropdown","value","onChange","items","isItemEqual","isMultiple","placeholder","Root","onValueChange","multiple","isItemEqualToValue","Trigger","Portal","Positioner","Popup","map","Item","key","renderChips","selectedValues","Fragment","Chip","ChipRemove","Input","length","renderItem","Chips","Value","Empty","List","String","label"],"sources":["DropdownField.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useCallback } from \"react\";\nimport { Combobox } from \"../../base-components/combobox/Combobox.js\";\nimport { Select } from \"../../base-components/select/Select.js\";\nimport { typedReactMemo } from \"../../shared/typedMemo.js\";\nimport type { DropdownFieldProps } from \"../FormFieldApi.js\";\n\ninterface InnerDropdownProps<V, Multiple extends boolean>\n extends Omit<DropdownFieldProps<V, Multiple>, \"isSearchable\">\n{\n itemToStringLabel: (item: V) => string;\n getKey: (item: V) => string;\n}\n\nexport function DropdownField<V, Multiple extends boolean = false>({\n isSearchable = false,\n itemToStringLabel,\n itemToKey,\n ...rest\n}: DropdownFieldProps<V, Multiple>): React.ReactElement {\n const resolvedItemToStringLabel = itemToStringLabel\n ?? defaultItemToStringLabel;\n\n const getKey = useCallback(\n (item: V) => itemToKey?.(item) ?? resolvedItemToStringLabel(item),\n [itemToKey, resolvedItemToStringLabel],\n );\n\n if (isSearchable) {\n return (\n <ComboboxDropdown\n {...rest}\n itemToStringLabel={resolvedItemToStringLabel}\n getKey={getKey}\n />\n );\n }\n\n return (\n <SelectDropdown\n {...rest}\n itemToStringLabel={resolvedItemToStringLabel}\n getKey={getKey}\n />\n );\n}\n\nconst SelectDropdown = typedReactMemo(function SelectDropdownFn<\n V,\n Multiple extends boolean,\n>({\n value,\n onChange,\n items,\n itemToStringLabel,\n getKey,\n isItemEqual,\n isMultiple,\n placeholder,\n}: InnerDropdownProps<V, Multiple>): React.ReactElement {\n return (\n <div>\n <Select.Root\n value={value}\n onValueChange={onChange}\n multiple={isMultiple}\n isItemEqualToValue={isItemEqual}\n itemToStringLabel={itemToStringLabel}\n >\n <Select.Trigger placeholder={placeholder} />\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {items.map((item) => (\n <Select.Item key={getKey(item)} value={item}>\n {itemToStringLabel(item)}\n </Select.Item>\n ))}\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n </div>\n );\n});\n\nconst ComboboxDropdown = typedReactMemo(function ComboboxDropdownFn<\n V,\n Multiple extends boolean,\n>({\n value,\n onChange,\n items,\n itemToStringLabel,\n getKey,\n isItemEqual,\n isMultiple,\n placeholder,\n}: InnerDropdownProps<V, Multiple>): React.ReactElement {\n const renderChips = useCallback(\n (selectedValues: V[]) => (\n <>\n {selectedValues.map((item) => (\n <Combobox.Chip\n key={getKey(item)}\n aria-label={itemToStringLabel(item)}\n >\n {itemToStringLabel(item)}\n <Combobox.ChipRemove />\n </Combobox.Chip>\n ))}\n <Combobox.Input\n placeholder={selectedValues.length > 0\n ? \"\"\n : (placeholder ?? \"Search…\")}\n />\n </>\n ),\n [getKey, itemToStringLabel, placeholder],\n );\n\n const renderItem = useCallback(\n (item: V) => (\n <Combobox.Item key={getKey(item)} value={item}>\n {itemToStringLabel(item)}\n </Combobox.Item>\n ),\n [getKey, itemToStringLabel],\n );\n\n return (\n <div>\n <Combobox.Root\n value={value}\n onValueChange={onChange}\n multiple={isMultiple}\n itemToStringLabel={itemToStringLabel}\n isItemEqualToValue={isItemEqual}\n items={items}\n >\n {isMultiple\n ? (\n <Combobox.Chips>\n <Combobox.Value>{renderChips}</Combobox.Value>\n </Combobox.Chips>\n )\n : <Combobox.Input placeholder={placeholder} />}\n <Combobox.Portal>\n <Combobox.Positioner>\n <Combobox.Popup>\n <Combobox.Empty>No results</Combobox.Empty>\n <Combobox.List>{renderItem}</Combobox.List>\n </Combobox.Popup>\n </Combobox.Positioner>\n </Combobox.Portal>\n </Combobox.Root>\n </div>\n );\n});\n\nfunction defaultItemToStringLabel<V>(item: V): string {\n if (item == null || typeof item !== \"object\") {\n return String(item);\n }\n if (\"label\" in item && item.label != null && typeof item.label === \"string\") {\n return item.label;\n }\n return String(item);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,QAAQ,QAAQ,4CAA4C;AACrE,SAASC,MAAM,QAAQ,wCAAwC;AAC/D,SAASC,cAAc,QAAQ,2BAA2B;AAU1D,OAAO,SAASC,aAAaA,CAAsC;EACjEC,YAAY,GAAG,KAAK;EACpBC,iBAAiB;EACjBC,SAAS;EACT,GAAGC;AAC4B,CAAC,EAAsB;EACtD,MAAMC,yBAAyB,GAAGH,iBAAiB,IAC9CI,wBAAwB;EAE7B,MAAMC,MA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ind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
2
  /*
2
3
  * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
4
  *
@@ -15,7 +16,9 @@
15
16
  */
16
17
 
17
18
  import React, { memo } from "react";
19
+ import { DropdownField } from "./DropdownField.js";
18
20
  import { TextInputField } from "./TextInputField.js";
21
+ const EMPTY_ITEMS = [];
19
22
  export const FormFieldRenderer = /*#__PURE__*/memo(function ({
20
23
  fieldDefinition,
21
24
  value,
@@ -27,13 +30,11 @@ export const FormFieldRenderer = /*#__PURE__*/memo(function ({
27
30
  helperText,
28
31
  helperTextPlacement
29
32
  } = fieldDefinition;
30
- return /*#__PURE__*/React.createElement("div", {
31
- "data-testid": `form-field-${fieldDefinition.fieldKey}`
32
- }, label != null && /*#__PURE__*/React.createElement("label", null, label, isRequired === true && /*#__PURE__*/React.createElement("span", {
33
+ return /*#__PURE__*/React.createElement("div", null, label != null && /*#__PURE__*/React.createElement("label", {
34
+ htmlFor: fieldDefinition.fieldKey
35
+ }, label, isRequired === true && /*#__PURE__*/React.createElement("span", {
33
36
  "aria-label": "required"
34
- }, "*")), renderFieldComponent(fieldDefinition, value, onFieldValueChange), helperText != null && helperTextPlacement !== "tooltip" && /*#__PURE__*/React.createElement("div", {
35
- "data-testid": "helper-text"
36
- }, helperText));
37
+ }, "*")), renderFieldComponent(fieldDefinition, value, onFieldValueChange), helperText != null && helperTextPlacement !== "tooltip" && /*#__PURE__*/React.createElement("div", null, helperText));
37
38
  });
38
39
  function renderFieldComponent(fieldDefinition, value, onChange) {
39
40
  switch (fieldDefinition.fieldComponent) {
@@ -41,25 +42,35 @@ function renderFieldComponent(fieldDefinition, value, onChange) {
41
42
  // TODO: Render a <textarea> for TEXT_AREA instead of falling through
42
43
  case "TEXT_AREA":
43
44
  return /*#__PURE__*/React.createElement(TextInputField, {
44
- fieldComponent: "TEXT_INPUT"
45
+ id: fieldDefinition.fieldKey
45
46
  // TODO: Use coerceFieldValue
46
47
  ,
47
48
  value: value != null ? String(value) : "",
48
49
  onChange: onChange,
49
50
  placeholder: fieldDefinition.placeholder
50
51
  });
51
- case "NUMBER_INPUT":
52
52
  case "DROPDOWN":
53
+ {
54
+ const {
55
+ items = EMPTY_ITEMS,
56
+ ...dropdownProps
57
+ } = fieldDefinition.fieldComponentProps ?? {};
58
+ return /*#__PURE__*/React.createElement(DropdownField, _extends({
59
+ value: value,
60
+ onChange: onChange,
61
+ items: items,
62
+ placeholder: fieldDefinition.placeholder
63
+ }, dropdownProps));
64
+ }
65
+ case "NUMBER_INPUT":
53
66
  case "RADIO_BUTTONS":
54
67
  case "DATETIME_PICKER":
55
68
  case "FILE_PICKER":
56
69
  case "OBJECT_SET":
57
70
  case "CUSTOM":
58
- return /*#__PURE__*/React.createElement("div", {
59
- "data-testid": "unsupported-field"
60
- }, "Unsupported field type: ", fieldDefinition.fieldComponent);
71
+ return /*#__PURE__*/React.createElement("div", null, "Unsupported field type: ", fieldDefinition.fieldComponent);
61
72
  default:
62
- return assertUnreachableFieldComponent(fieldDefinition.fieldComponent);
73
+ return assertUnreachableFieldComponent(fieldDefinition);
63
74
  }
64
75
  }
65
76
  function assertUnreachableFieldComponent(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldRenderer.js","names":["React","memo","TextInputField","FormFieldRenderer","fieldDefinition","value","onFieldValueChange","label","isRequired","helperText","helperTextPlacement","createElement","fieldKey","renderFieldComponent","onChange","fieldComponent","String","placeholder","assertUnreachableFieldComponent","Error"],"sources":["FormFieldRenderer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { memo } from \"react\";\nimport type { RendererFieldDefinition } from \"../FormFieldApi.js\";\nimport { TextInputField } from \"./TextInputField.js\";\n\nexport interface FormFieldRendererProps {\n fieldDefinition: RendererFieldDefinition;\n value: unknown;\n onFieldValueChange: (value: unknown) => void;\n}\n\nexport const FormFieldRenderer: React.FC<FormFieldRendererProps> = memo(\n function FormFieldRendererFn({\n fieldDefinition,\n value,\n onFieldValueChange,\n }: FormFieldRendererProps): React.ReactElement {\n const { label, isRequired, helperText, helperTextPlacement } =\n fieldDefinition;\n\n return (\n <div data-testid={`form-field-${fieldDefinition.fieldKey}`}>\n {label != null && (\n <label>\n {label}\n {isRequired === true && <span aria-label=\"required\">*</span>}\n </label>\n )}\n {renderFieldComponent(fieldDefinition, value, onFieldValueChange)}\n {helperText != null && helperTextPlacement !== \"tooltip\" && (\n <div data-testid=\"helper-text\">{helperText}</div>\n )}\n </div>\n );\n },\n);\n\nfunction renderFieldComponent(\n fieldDefinition: RendererFieldDefinition,\n value: unknown,\n onChange: (value: unknown) => void,\n): React.ReactElement {\n switch (fieldDefinition.fieldComponent) {\n case \"TEXT_INPUT\":\n // TODO: Render a <textarea> for TEXT_AREA instead of falling through\n case \"TEXT_AREA\":\n return (\n <TextInputField\n fieldComponent=\"TEXT_INPUT\"\n // TODO: Use coerceFieldValue\n value={value != null ? String(value) : \"\"}\n onChange={onChange}\n placeholder={fieldDefinition.placeholder}\n />\n );\n case \"NUMBER_INPUT\":\n case \"DROPDOWN\":\n case \"RADIO_BUTTONS\":\n case \"DATETIME_PICKER\":\n case \"FILE_PICKER\":\n case \"OBJECT_SET\":\n case \"CUSTOM\":\n return (\n <div data-testid=\"unsupported-field\">\n Unsupported field type: {fieldDefinition.fieldComponent}\n </div>\n );\n default:\n return assertUnreachableFieldComponent(fieldDefinition.fieldComponent);\n }\n}\n\nfunction assertUnreachableFieldComponent(value: never): never {\n throw new Error(`Unhandled field component: ${String(value)}`);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AAEnC,SAASC,cAAc,QAAQ,qBAAqB;AAQpD,OAAO,MAAMC,iBAAmD,gBAAGF,IAAI,CACrE,UAA6B;EAC3BG,eAAe;EACfC,KAAK;EACLC;AACsB,CAAC,EAAsB;EAC7C,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAoB,CAAC,GAC1DN,eAAe;EAEjB,oBACEJ,KAAA,CAAAW,aAAA;IAAK,eAAa,cAAcP,eAAe,CAACQ,QAAQ;EAAG,GACxDL,KAAK,IAAI,IAAI,iBACZP,KAAA,CAAAW,aAAA,gBACGJ,KAAK,EACLC,UAAU,KAAK,IAAI,iBAAIR,KAAA,CAAAW,aAAA;IAAM,cAAW;EAAU,GAAC,GAAO,CACtD,CACR,EACAE,oBAAoB,CAACT,eAAe,EAAEC,KAAK,EAAEC,kBAAkB,CAAC,EAChEG,UAAU,IAAI,IAAI,IAAIC,mBAAmB,KAAK,SAAS,iBACtDV,KAAA,CAAAW,aAAA;IAAK,eAAY;EAAa,GAAEF,UAAgB,CAE/C,CAAC;AAEV,CACF,CAAC;AAED,SAASI,oBAAoBA,CAC3BT,eAAwC,EACxCC,KAAc,EACdS,QAAkC,EACd;EACpB,QAAQV,eAAe,CAACW,cAAc;IACpC,KAAK,YAAY;IACjB;IACA,KAAK,WAAW;MACd,oBACEf,KAAA,CAAAW,aAAA,CAACT,cAAc;QACba,cAAc,EAAC;QACf;QAAA;QACAV,KAAK,EAAEA,KAAK,IAAI,IAAI,GAAGW,MAAM,CAACX,KAAK,CAAC,GAAG,EAAG;QAC1CS,QAAQ,EAAEA,QAAS;QACnBG,WAAW,EAAEb,eAAe,CAACa;MAAY,CAC1C,CAAC;IAEN,KAAK,cAAc;IACnB,KAAK,UAAU;IACf,KAAK,eAAe;IACpB,KAAK,iBAAiB;IACtB,KAAK,aAAa;IAClB,KAAK,YAAY;IACjB,KAAK,QAAQ;MACX,oBACEjB,KAAA,CAAAW,aAAA;QAAK,eAAY;MAAmB,GAAC,0BACX,EAACP,eAAe,CAACW,cACtC,CAAC;IAEV;MACE,OAAOG,+BAA+B,CAACd,eAAe,CAACW,cAAc,CAAC;EAC1E;AACF;AAEA,SAASG,+BAA+BA,CAACb,KAAY,EAAS;EAC5D,MAAM,IAAIc,KAAK,CAAC,8BAA8BH,MAAM,CAACX,KAAK,CAAC,EAAE,CAAC;AAChE","ignoreList":[]}
1
+ {"version":3,"file":"FormFieldRenderer.js","names":["React","memo","DropdownField","TextInputField","EMPTY_ITEMS","FormFieldRenderer","fieldDefinition","value","onFieldValueChange","label","isRequired","helperText","helperTextPlacement","createElement","htmlFor","fieldKey","renderFieldComponent","onChange","fieldComponent","id","String","placeholder","items","dropdownProps","fieldComponentProps","_extends","assertUnreachableFieldComponent","Error"],"sources":["FormFieldRenderer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { memo } from \"react\";\nimport type { RendererFieldDefinition } from \"../FormFieldApi.js\";\nimport { DropdownField } from \"./DropdownField.js\";\nimport { TextInputField } from \"./TextInputField.js\";\n\nconst EMPTY_ITEMS: unknown[] = [];\n\nexport interface FormFieldRendererProps {\n fieldDefinition: RendererFieldDefinition;\n value: unknown;\n onFieldValueChange: (value: unknown) => void;\n}\n\nexport const FormFieldRenderer: React.FC<FormFieldRendererProps> = memo(\n function FormFieldRendererFn({\n fieldDefinition,\n value,\n onFieldValueChange,\n }: FormFieldRendererProps): React.ReactElement {\n const { label, isRequired, helperText, helperTextPlacement } =\n fieldDefinition;\n\n return (\n <div>\n {label != null && (\n <label htmlFor={fieldDefinition.fieldKey}>\n {label}\n {isRequired === true && <span aria-label=\"required\">*</span>}\n </label>\n )}\n {renderFieldComponent(fieldDefinition, value, onFieldValueChange)}\n {helperText != null && helperTextPlacement !== \"tooltip\" && (\n <div>{helperText}</div>\n )}\n </div>\n );\n },\n);\n\nfunction renderFieldComponent(\n fieldDefinition: RendererFieldDefinition,\n value: unknown,\n onChange: (value: unknown) => void,\n): React.ReactElement {\n switch (fieldDefinition.fieldComponent) {\n case \"TEXT_INPUT\":\n // TODO: Render a <textarea> for TEXT_AREA instead of falling through\n case \"TEXT_AREA\":\n return (\n <TextInputField\n id={fieldDefinition.fieldKey}\n // TODO: Use coerceFieldValue\n value={value != null ? String(value) : \"\"}\n onChange={onChange}\n placeholder={fieldDefinition.placeholder}\n />\n );\n case \"DROPDOWN\": {\n const { items = EMPTY_ITEMS, ...dropdownProps } =\n fieldDefinition.fieldComponentProps ?? {};\n return (\n <DropdownField\n value={value}\n onChange={onChange}\n items={items}\n placeholder={fieldDefinition.placeholder}\n {...dropdownProps}\n />\n );\n }\n case \"NUMBER_INPUT\":\n case \"RADIO_BUTTONS\":\n case \"DATETIME_PICKER\":\n case \"FILE_PICKER\":\n case \"OBJECT_SET\":\n case \"CUSTOM\":\n return (\n <div>\n Unsupported field type: {fieldDefinition.fieldComponent}\n </div>\n );\n default:\n return assertUnreachableFieldComponent(fieldDefinition);\n }\n}\n\nfunction assertUnreachableFieldComponent(value: never): never {\n throw new Error(`Unhandled field component: ${String(value)}`);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A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AAC,GAC7CjB,eAAe,CAACkB,mBAAmB,IAAI,CAAC,CAAC;QAC3C,oBACExB,KAAA,CAAAa,aAAA,CAACX,aAAa,EAAAuB,QAAA;UACZlB,KAAK,EAAEA,KAAM;UACbU,QAAQ,EAAEA,QAAS;UACnBK,KAAK,EAAEA,KAAM;UACbD,WAAW,EAAEf,eAAe,CAACe;QAAY,GACrCE,aAAa,CAClB,CAAC;MAEN;IACA,KAAK,cAAc;IACnB,KAAK,eAAe;IACpB,KAAK,iBAAiB;IACtB,KAAK,aAAa;IAClB,KAAK,YAAY;IACjB,KAAK,QAAQ;MACX,oBACEvB,KAAA,CAAAa,aAAA,cAAK,0BACqB,EAACP,eAAe,CAACY,cACtC,CAAC;IAEV;MACE,OAAOQ,+BAA+B,CAACpB,eAAe,CAAC;EAC3D;AACF;AAEA,SAASoB,+BAA+BA,CAACnB,KAAY,EAAS;EAC5D,MAAM,IAAIoB,KAAK,CAAC,8BAA8BP,MAAM,CAACb,KAAK,CAAC,EAAE,CAAC;AAChE","ignoreList":[]}
@@ -14,25 +14,24 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import React, { useCallback } from "react";
17
+ import { Input } from "@base-ui/react/input";
18
+ import React from "react";
18
19
  export function TextInputField({
20
+ id,
19
21
  value,
20
22
  onChange,
21
23
  placeholder,
22
24
  minLength,
23
25
  maxLength
24
26
  }) {
25
- const handleChange = useCallback(e => {
26
- onChange?.(e.target.value);
27
- }, [onChange]);
28
- return /*#__PURE__*/React.createElement("input", {
27
+ return /*#__PURE__*/React.createElement(Input, {
28
+ id: id,
29
29
  type: "text",
30
- value: value,
31
- onChange: handleChange,
30
+ value: value ?? "",
31
+ onValueChange: onChange,
32
32
  placeholder: placeholder,
33
33
  minLength: minLength,
34
- maxLength: maxLength,
35
- "data-testid": "text-input-field"
34
+ maxLength: maxLength
36
35
  });
37
36
  }
38
37
  //# sourceMappingURL=TextInputField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextInputField.js","names":["React","useCallback","TextInputField","value","onChange","placeholder","minLength","maxLength","handleChange","e","target","createElement","type"],"sources":["TextInputField.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useCallback } from \"react\";\nimport type { TextInputFieldProps } from \"../FormFieldApi.js\";\n\nexport function TextInputField({\n value,\n onChange,\n placeholder,\n minLength,\n maxLength,\n}: TextInputFieldProps): React.ReactElement {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(e.target.value);\n },\n [onChange],\n );\n\n return (\n <input\n type=\"text\"\n value={value}\n onChange={handleChange}\n placeholder={placeholder}\n minLength={minLength}\n maxLength={maxLength}\n data-testid=\"text-input-field\"\n />\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAG1C,OAAO,SAASC,cAAcA,CAAC;EAC7BC,KAAK;EACLC,QAAQ;EACRC,WAAW;EACXC,SAAS;EACTC;AACmB,CAAC,EAAsB;EAC1C,MAAMC,YAAY,GAAGP,WAAW,CAC7BQ,CAAsC,IAAK;IAC1CL,QAAQ,GAAGK,CAAC,CAACC,MAAM,CAACP,KAAK,CAAC;EAC5B,CAAC,EACD,CAACC,QAAQ,CACX,CAAC;EAED,oBACEJ,KAAA,CAAAW,aAAA;IACEC,IAAI,EAAC,MAAM;IACXT,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEI,YAAa;IACvBH,WAAW,EAAEA,WAAY;IACzBC,SAAS,EAAEA,SAAU;IACrBC,SAAS,EAAEA,SAAU;IACrB,eAAY;EAAkB,CAC/B,CAAC;AAEN","ignoreList":[]}
1
+ {"version":3,"file":"TextInputField.js","names":["Input","React","TextInputField","id","value","onChange","placeholder","minLength","maxLength","createElement","type","onValueChange"],"sources":["TextInputField.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Input } from \"@base-ui/react/input\";\nimport React from \"react\";\nimport type { TextInputFieldProps } from \"../FormFieldApi.js\";\n\nexport function TextInputField({\n id,\n value,\n onChange,\n placeholder,\n minLength,\n maxLength,\n}: TextInputFieldProps & { id?: string }): React.ReactElement {\n return (\n <Input\n id={id}\n type=\"text\"\n value={value ?? \"\"}\n onValueChange={onChange}\n placeholder={placeholder}\n minLength={minLength}\n maxLength={maxLength}\n />\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,sBAAsB;AAC5C,OAAOC,KAAK,MAAM,OAAO;AAGzB,OAAO,SAASC,cAAcA,CAAC;EAC7BC,EAAE;EACFC,KAAK;EACLC,QAAQ;EACRC,WAAW;EACXC,SAAS;EACTC;AACqC,CAAC,EAAsB;EAC5D,oBACEP,KAAA,CAAAQ,aAAA,CAACT,KAAK;IACJG,EAAE,EAAEA,EAAG;IACPO,IAAI,EAAC,MAAM;IACXN,KAAK,EAAEA,KAAK,IAAI,EAAG;IACnBO,aAAa,EAAEN,QAAS;IACxBC,WAAW,EAAEA,WAAY;IACzBC,SAAS,EAAEA,SAAU;IACrBC,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN","ignoreList":[]}
@@ -20,7 +20,7 @@ import { Cross, Search } from "@blueprintjs/icons";
20
20
  import classnames from "classnames";
21
21
  import React from "react";
22
22
  import styles from "./Combobox.module.css.js";
23
- function ComboboxInput({
23
+ function ComboboxSearchInput({
24
24
  className,
25
25
  ...rest
26
26
  }) {
@@ -33,6 +33,14 @@ function ComboboxInput({
33
33
  className: styles.osdkComboboxInput
34
34
  }, rest)));
35
35
  }
36
+ function ComboboxInput({
37
+ className,
38
+ ...rest
39
+ }) {
40
+ return /*#__PURE__*/React.createElement(BaseUICombobox.Input, _extends({
41
+ className: classnames(styles.osdkComboboxInput, className)
42
+ }, rest));
43
+ }
36
44
  function ComboboxPositioner({
37
45
  className,
38
46
  children,
@@ -66,7 +74,9 @@ function ComboboxChips({
66
74
  className
67
75
  }) {
68
76
  return /*#__PURE__*/React.createElement(BaseUICombobox.Chips, {
69
- className: classnames(styles.osdkComboboxChips, className)
77
+ render: props => /*#__PURE__*/React.createElement("div", _extends({}, props, {
78
+ className: classnames(styles.osdkComboboxInputWrapper, className)
79
+ }), props.children)
70
80
  }, children);
71
81
  }
72
82
  function ComboboxChip({
@@ -108,17 +118,29 @@ function ComboboxEmpty({
108
118
  className: classnames(styles.osdkComboboxEmpty, className)
109
119
  }, children);
110
120
  }
121
+ function ComboboxList({
122
+ className,
123
+ children,
124
+ ...rest
125
+ }) {
126
+ return /*#__PURE__*/React.createElement(BaseUICombobox.List, _extends({
127
+ className: classnames(styles.osdkComboboxList, className)
128
+ }, rest), children);
129
+ }
111
130
  export const Combobox = {
112
131
  Root: BaseUICombobox.Root,
132
+ SearchInput: ComboboxSearchInput,
113
133
  Input: ComboboxInput,
114
134
  Portal: BaseUICombobox.Portal,
115
135
  Positioner: ComboboxPositioner,
116
136
  Popup: ComboboxPopup,
137
+ List: ComboboxList,
117
138
  Item: ComboboxItem,
118
139
  Chips: ComboboxChips,
119
140
  Chip: ComboboxChip,
120
141
  ChipRemove: ComboboxChipRemove,
121
142
  Clear: ComboboxClear,
122
- Empty: ComboboxEmpty
143
+ Empty: ComboboxEmpty,
144
+ Value: BaseUICombobox.Value
123
145
  };
124
146
  //# sourceMappingURL=Combobox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.js","names":["Combobox","BaseUICombobox","Cross","Search","classnames","React","styles","ComboboxInput","className","rest","createElement","osdkComboboxInputWrapper","osdkComboboxSearchIcon","color","Input","_extends","osdkComboboxInput","ComboboxPositioner","children","Positioner","osdkComboboxPositioner","sideOffset","ComboboxPopup","Popup","osdkComboboxPopup","ComboboxItem","Item","osdkComboboxItem","ComboboxChips","Chips","osdkComboboxChips","ComboboxChip","Chip","osdkComboboxChip","ComboboxChipRemove","ChipRemove","osdkComboboxChipRemove","ComboboxClear","Clear","osdkComboboxClear","ComboboxEmpty","Empty","osdkComboboxEmpty","Root","Portal"],"sources":["Combobox.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Combobox as BaseUICombobox,\n type ComboboxChipProps,\n type ComboboxChipRemoveProps,\n type ComboboxClearProps,\n type ComboboxInputProps,\n type ComboboxItemProps,\n type ComboboxPopupProps,\n type ComboboxPositionerProps,\n} from \"@base-ui/react/combobox\";\nimport { Cross, Search } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Combobox.module.css\";\n\ninterface ComboboxInputComponentProps\n extends Omit<ComboboxInputProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <div className={classnames(styles.osdkComboboxInputWrapper, className)}>\n <Search className={styles.osdkComboboxSearchIcon} color=\"currentColor\" />\n <BaseUICombobox.Input\n className={styles.osdkComboboxInput}\n {...rest}\n />\n </div>\n );\n}\n\ninterface ComboboxPositionerComponentProps\n extends Omit<ComboboxPositionerProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPositioner({\n className,\n children,\n ...rest\n}: ComboboxPositionerComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Positioner\n className={classnames(styles.osdkComboboxPositioner, className)}\n sideOffset={4}\n {...rest}\n >\n {children}\n </BaseUICombobox.Positioner>\n );\n}\n\ninterface ComboboxPopupComponentProps\n extends Omit<ComboboxPopupProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPopup({\n className,\n children,\n ...rest\n}: ComboboxPopupComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Popup\n className={classnames(styles.osdkComboboxPopup, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Popup>\n );\n}\n\ninterface ComboboxItemComponentProps\n extends Omit<ComboboxItemProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...rest\n}: ComboboxItemComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Item\n className={classnames(styles.osdkComboboxItem, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Item>\n );\n}\n\nfunction ComboboxChips({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Chips\n className={classnames(styles.osdkComboboxChips, className)}\n >\n {children}\n </BaseUICombobox.Chips>\n );\n}\n\ninterface ComboboxChipComponentProps\n extends Omit<ComboboxChipProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChip({\n className,\n children,\n ...rest\n}: ComboboxChipComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Chip\n className={classnames(styles.osdkComboboxChip, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Chip>\n );\n}\n\ninterface ComboboxChipRemoveComponentProps\n extends Omit<ComboboxChipRemoveProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChipRemove({\n className,\n ...rest\n}: ComboboxChipRemoveComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.ChipRemove\n className={classnames(styles.osdkComboboxChipRemove, className)}\n aria-label=\"Remove\"\n {...rest}\n >\n <Cross color=\"currentColor\" />\n </BaseUICombobox.ChipRemove>\n );\n}\n\ninterface ComboboxClearComponentProps\n extends Omit<ComboboxClearProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxClear({\n className,\n ...rest\n}: ComboboxClearComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Clear\n className={classnames(styles.osdkComboboxClear, className)}\n aria-label=\"Clear all\"\n {...rest}\n >\n <Cross color=\"currentColor\" />\n </BaseUICombobox.Clear>\n );\n}\n\nfunction ComboboxEmpty({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Empty\n className={classnames(styles.osdkComboboxEmpty, className)}\n >\n {children}\n </BaseUICombobox.Empty>\n );\n}\n\nexport const Combobox: {\n Root: typeof BaseUICombobox.Root;\n Input: typeof ComboboxInput;\n Portal: typeof BaseUICombobox.Portal;\n Positioner: typeof ComboboxPositioner;\n Popup: typeof ComboboxPopup;\n Item: typeof ComboboxItem;\n Chips: typeof ComboboxChips;\n Chip: typeof ComboboxChip;\n ChipRemove: typeof ComboboxChipRemove;\n Clear: typeof ComboboxClear;\n Empty: typeof ComboboxEmpty;\n} = {\n Root: BaseUICombobox.Root,\n Input: ComboboxInput,\n Portal: BaseUICombobox.Portal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n Item: ComboboxItem,\n Chips: Combobo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,CAAE,CACJ,CAAC;AAEhC;AAQA,SAASwB,aAAaA,CAAC;EACrB7B,SAAS;EACT,GAAGC;AACwB,CAAC,EAAsB;EAClD,oBACEJ,KAAA,CAAAK,aAAA,CAACT,cAAc,CAACqC,KAAK,EAAAvB,QAAA;IACnBP,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACiC,iBAAiB,EAAE/B,SAAS,CAAE;IAC3D,cAAW;EAAW,GAClBC,IAAI,gBAERJ,KAAA,CAAAK,aAAA,CAACR,KAAK;IAACW,KAAK,EAAC;EAAc,CAAE,CACT,CAAC;AAE3B;AAEA,SAAS2B,aAAaA,CAAC;EACrBtB,QAAQ;EACRV;AAIF,CAAC,EAAsB;EACrB,oBACEH,KAAA,CAAAK,aAAA,CAACT,cAAc,CAACwC,KAAK;IACnBjC,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACoC,iBAAiB,EAAElC,SAAS;EAAE,GAE1DU,QACmB,CAAC;AAE3B;AAEA,OAAO,MAAMlB,QAYZ,GAAG;EACF2C,IAAI,EAAE1C,cAAc,CAAC0C,IAAI;EACzB7B,KAAK,EAAEP,aAAa;EACpBqC,MAAM,EAAE3C,cAAc,CAAC2C,MAAM;EAC7BzB,UAAU,EAAEF,kBAAkB;EAC9BM,KAAK,EAAED,aAAa;EACpBI,IAAI,EAAED,YAAY;EAClBI,KAAK,EAAED,aAAa;EACpBI,IAAI,EAAED,YAAY;EAClBI,UAAU,EAAED,kBAAkB;EAC9BI,KAAK,EAAED,aAAa;EACpBI,KAAK,EAAED;AACT,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Combobox.js","names":["Combobox","BaseUICombobox","Cross","Search","classnames","React","styles","ComboboxSearchInput","className","rest","createElement","osdkComboboxInputWrapper","osdkComboboxSearchIcon","color","Input","_extends","osdkComboboxInput","ComboboxInput","ComboboxPositioner","children","Positioner","osdkComboboxPositioner","sideOffset","ComboboxPopup","Popup","osdkComboboxPopup","ComboboxItem","Item","osdkComboboxItem","ComboboxChips","Chips","render","props","ComboboxChip","Chip","osdkComboboxChip","ComboboxChipRemove","ChipRemove","osdkComboboxChipRemove","ComboboxClear","Clear","osdkComboboxClear","ComboboxEmpty","Empty","osdkComboboxEmpty","ComboboxList","List","osdkComboboxList","Root","SearchInput","Portal","Value"],"sources":["Combobox.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Combobox as BaseUICombobox,\n type ComboboxChipProps,\n type ComboboxChipRemoveProps,\n type ComboboxClearProps,\n type ComboboxInputProps,\n type ComboboxItemProps,\n type ComboboxListProps,\n type ComboboxPopupProps,\n type ComboboxPositionerProps,\n} from \"@base-ui/react/combobox\";\nimport { Cross, Search } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Combobox.module.css\";\n\ninterface ComboboxInputComponentProps\n extends Omit<ComboboxInputProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxSearchInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <div className={classnames(styles.osdkComboboxInputWrapper, className)}>\n <Search className={styles.osdkComboboxSearchIcon} color=\"currentColor\" />\n <BaseUICombobox.Input className={styles.osdkComboboxInput} {...rest} />\n </div>\n );\n}\n\nfunction ComboboxInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Input\n className={classnames(styles.osdkComboboxInput, className)}\n {...rest}\n />\n );\n}\n\ninterface ComboboxPositionerComponentProps\n extends Omit<ComboboxPositionerProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPositioner({\n className,\n children,\n ...rest\n}: ComboboxPositionerComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Positioner\n className={classnames(styles.osdkComboboxPositioner, className)}\n sideOffset={4}\n {...rest}\n >\n {children}\n </BaseUICombobox.Positioner>\n );\n}\n\ninterface ComboboxPopupComponentProps\n extends Omit<ComboboxPopupProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPopup({\n className,\n children,\n ...rest\n}: ComboboxPopupComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Popup\n className={classnames(styles.osdkComboboxPopup, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Popup>\n );\n}\n\ninterface ComboboxItemComponentProps\n extends Omit<ComboboxItemProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...rest\n}: ComboboxItemComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Item\n className={classnames(styles.osdkComboboxItem, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Item>\n );\n}\n\nfunction ComboboxChips({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Chips\n render={(props) => (\n <div\n {...props}\n className={classnames(styles.osdkComboboxInputWrapper, className)}\n >\n {props.children}\n </div>\n )}\n >\n {children}\n </BaseUICombobox.Chips>\n );\n}\n\ninterface ComboboxChipComponentProps\n extends Omit<ComboboxChipProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChip({\n className,\n children,\n ...rest\n}: ComboboxChipComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Chip\n className={classnames(styles.osdkComboboxChip, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Chip>\n );\n}\n\ninterface ComboboxChipRemoveComponentProps\n extends Omit<ComboboxChipRemoveProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChipRemove({\n className,\n ...rest\n}: ComboboxChipRemoveComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.ChipRemove\n className={classnames(styles.osdkComboboxChipRemove, className)}\n aria-label=\"Remove\"\n {...rest}\n >\n <Cross color=\"currentColor\" />\n </BaseUICombobox.ChipRemove>\n );\n}\n\ninterface ComboboxClearComponentProps\n extends Omit<ComboboxClearProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxClear({\n className,\n ...rest\n}: ComboboxClearComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Clear\n className={classnames(styles.osdkComboboxClear, className)}\n aria-label=\"Clear all\"\n {...rest}\n >\n <Cross color=\"currentColor\" />\n </BaseUICombobox.Clear>\n );\n}\n\nfunction ComboboxEmpty({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Empty\n className={classnames(styles.osdkComboboxEmpty, className)}\n >\n {children}\n </BaseUICombobox.Empty>\n );\n}\n\ninterface ComboboxListComponentProps\n extends Omit<ComboboxListProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxList({\n className,\n children,\n ...rest\n}: ComboboxListComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.List\n className={classnames(styles.osdkComboboxList, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.List>\n );\n}\n\nexport const Combobox: {\n Root: typeof BaseUICombobox.Root;\n SearchInput: typeof ComboboxSearchInput;\n Input: typeof ComboboxInput;\n Portal: typeof BaseUICombobox.Portal;\n Positioner: typeof ComboboxPositioner;\n Popup: typeof ComboboxPopup;\n List: typeof ComboboxList;\n Item: typeof ComboboxItem;\n Chips: typeof ComboboxChips;\n Chip: typeof ComboboxChip;\n ChipRemove: typeof ComboboxChipRemove;\n Clear: typeof ComboboxClear;\n Empty: typeof ComboboxEmpty;\n Value: typeof BaseUICombobox.Value;\n} = {\n Root: BaseUICombobox.Root,\n SearchInput: ComboboxSearchInput,\n Input: ComboboxInput,\n Portal: BaseUICombobox.Portal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Item: ComboboxItem,\n Chips: ComboboxChips,\n Chip: ComboboxChip,\n ChipRemove: ComboboxChipRemove,\n Clear: ComboboxClear,\n Empty: ComboboxEmpty,\n Value: BaseUICombobox.Value,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,QAAQ,IAAIC,cAAc,QASrB,yBAAyB;AAChC,SAASC,KAAK,EAAEC,MAAM,QAAQ,oBAAoB;AAClD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,uBAAuB;AAQ1C,SAASC,mBAAmBA,CAAC;EAC3BC,SAAS;EACT,GAAGC;AACwB,CAAC,EAAsB;EAClD,oBACEJ,KAAA,CAAAK,aAAA;IAAKF,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACK,wBAAwB,EAAEH,SAAS;EAAE,gBACrEH,KAAA,CAAAK,aAAA,CAACP,MAAM;IAACK,SAAS,EAAEF,MAAM,CAACM,sBAAuB;IAACC,KAAK,EAAC;EAAc,CAAE,CAAC,eACzER,KAAA,CAAAK,aAAA,CAACT,cAAc,CAACa,KAAK,EAAAC,QAAA;IAACP,SAAS,EAAEF,MAAM,CAACU;EAAkB,GAAKP,IAAI,CAAG,CACnE,CAAC;AAEV;AAEA,SAASQ,aAAaA,CAAC;EACrBT,SAAS;EACT,GAAGC;AACwB,CAAC,EAAsB;EAClD,oBACEJ,KAAA,CAAAK,aAAA,CAACT,cAAc,CAACa,KAAK,EAAAC,QAAA;IACnBP,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACU,iBAAiB,EAAER,SAAS;EAAE,GACvDC,IAAI,CACT,CAAC;AAEN;AAQA,SAASS,kBAAkBA,CAAC;EAC1BV,SAAS;EACTW,QAAQ;EACR,GAAGV;AAC6B,CAAC,EAAsB;EACvD,oBACEJ,KAAA,CAAAK,aAAA,CAACT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