@osdk/react-components 0.2.0-beta.15 → 0.2.0-beta.16

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 (337) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/browser/base-components/action-button/ActionButton.module.css +0 -4
  3. package/build/browser/base-components/checkbox/Checkbox.module.css +0 -4
  4. package/build/browser/base-components/dialog/Dialog.module.css +0 -8
  5. package/build/browser/base-components/draggable-list/DraggableList.js +4 -2
  6. package/build/browser/base-components/draggable-list/DraggableList.js.map +1 -1
  7. package/build/browser/base-components/draggable-list/DraggableList.module.css +0 -8
  8. package/build/browser/filter-list/FilterInput.js +132 -0
  9. package/build/browser/filter-list/FilterInput.js.map +1 -0
  10. package/build/browser/filter-list/FilterList.js +91 -0
  11. package/build/browser/filter-list/FilterList.js.map +1 -0
  12. package/build/browser/filter-list/FilterListApi.js.map +1 -1
  13. package/build/browser/filter-list/FilterListItemApi.js.map +1 -1
  14. package/build/browser/filter-list/base/{FilterList.js → BaseFilterList.js} +30 -31
  15. package/build/browser/filter-list/base/BaseFilterList.js.map +1 -0
  16. package/build/browser/filter-list/base/BaseFilterListApi.js +2 -0
  17. package/build/browser/filter-list/base/BaseFilterListApi.js.map +1 -0
  18. package/build/browser/filter-list/base/FilterIcons.js +63 -0
  19. package/build/browser/filter-list/base/FilterIcons.js.map +1 -0
  20. package/build/browser/filter-list/base/FilterList.module.css +22 -1
  21. package/build/browser/filter-list/base/FilterList.module.css.js +2 -0
  22. package/build/browser/filter-list/base/FilterListContent.js +21 -20
  23. package/build/browser/filter-list/base/FilterListContent.js.map +1 -1
  24. package/build/browser/filter-list/base/FilterListHeader.js +8 -3
  25. package/build/browser/filter-list/base/FilterListHeader.js.map +1 -1
  26. package/build/browser/filter-list/base/FilterListHeader.module.css +25 -1
  27. package/build/browser/filter-list/base/FilterListHeader.module.css.js +3 -0
  28. package/build/browser/filter-list/base/FilterListItem.js +36 -17
  29. package/build/browser/filter-list/base/FilterListItem.js.map +1 -1
  30. package/build/browser/filter-list/base/FilterListItem.module.css +58 -2
  31. package/build/browser/filter-list/base/FilterListItem.module.css.js +2 -0
  32. package/build/browser/filter-list/base/SortableFilterListItem.js +6 -6
  33. package/build/browser/filter-list/base/SortableFilterListItem.js.map +1 -1
  34. package/build/browser/filter-list/base/index.js +1 -2
  35. package/build/browser/filter-list/base/index.js.map +1 -1
  36. package/build/browser/filter-list/base/inputs/CheckboxListInput.js +34 -15
  37. package/build/browser/filter-list/base/inputs/CheckboxListInput.js.map +1 -1
  38. package/build/browser/filter-list/base/inputs/CheckboxListInput.module.css +13 -0
  39. package/build/browser/filter-list/base/inputs/CheckboxListInput.module.css.js +2 -1
  40. package/build/browser/filter-list/base/inputs/DateRangeInput.js.map +1 -1
  41. package/build/browser/filter-list/base/inputs/ListogramInput.js +17 -21
  42. package/build/browser/filter-list/base/inputs/ListogramInput.js.map +1 -1
  43. package/build/browser/filter-list/base/inputs/ListogramInput.module.css +25 -19
  44. package/build/browser/filter-list/base/inputs/MultiDateInput.module.css +6 -4
  45. package/build/browser/filter-list/base/inputs/MultiSelectInput.js +7 -14
  46. package/build/browser/filter-list/base/inputs/MultiSelectInput.js.map +1 -1
  47. package/build/browser/filter-list/base/inputs/MultiSelectInput.module.css +4 -1
  48. package/build/browser/filter-list/base/inputs/MultiSelectInput.module.css.js +1 -1
  49. package/build/browser/filter-list/base/inputs/NullValueWrapper.js +4 -23
  50. package/build/browser/filter-list/base/inputs/NullValueWrapper.js.map +1 -1
  51. package/build/browser/filter-list/base/inputs/NullValueWrapper.module.css +3 -2
  52. package/build/browser/filter-list/base/inputs/NumberRangeInput.js.map +1 -1
  53. package/build/browser/filter-list/base/inputs/RangeInput.js +2 -32
  54. package/build/browser/filter-list/base/inputs/RangeInput.js.map +1 -1
  55. package/build/browser/filter-list/base/inputs/RangeInput.module.css +16 -14
  56. package/build/browser/filter-list/base/inputs/SingleDateInput.module.css +2 -1
  57. package/build/browser/filter-list/base/inputs/SingleSelectInput.js +6 -13
  58. package/build/browser/filter-list/base/inputs/SingleSelectInput.js.map +1 -1
  59. package/build/browser/filter-list/base/inputs/TextTagsInput.js +6 -14
  60. package/build/browser/filter-list/base/inputs/TextTagsInput.js.map +1 -1
  61. package/build/browser/filter-list/base/inputs/TimelineInput.js +2 -2
  62. package/build/browser/filter-list/base/inputs/TimelineInput.js.map +1 -1
  63. package/build/browser/filter-list/base/inputs/TimelineInput.module.css +14 -12
  64. package/build/browser/filter-list/base/inputs/shared.module.css +5 -4
  65. package/build/browser/filter-list/hooks/useFilterListState.js +24 -3
  66. package/build/browser/filter-list/hooks/useFilterListState.js.map +1 -1
  67. package/build/browser/filter-list/hooks/usePropertyAggregation.js.map +1 -1
  68. package/build/browser/filter-list/inputs/CheckboxListFilterInput.js +56 -0
  69. package/build/browser/filter-list/inputs/CheckboxListFilterInput.js.map +1 -0
  70. package/build/browser/filter-list/inputs/ContainsTextFilterInput.js +38 -0
  71. package/build/browser/filter-list/inputs/ContainsTextFilterInput.js.map +1 -0
  72. package/build/browser/filter-list/inputs/DateRangeFilterInput.js +105 -0
  73. package/build/browser/filter-list/inputs/DateRangeFilterInput.js.map +1 -0
  74. package/build/browser/filter-list/inputs/LinkedPropertyInput.js +508 -0
  75. package/build/browser/filter-list/inputs/LinkedPropertyInput.js.map +1 -0
  76. package/build/browser/filter-list/inputs/ListogramFilterInput.js +62 -0
  77. package/build/browser/filter-list/inputs/ListogramFilterInput.js.map +1 -0
  78. package/build/browser/filter-list/inputs/MultiDateFilterInput.js +38 -0
  79. package/build/browser/filter-list/inputs/MultiDateFilterInput.js.map +1 -0
  80. package/build/browser/filter-list/inputs/MultiSelectFilterInput.js +55 -0
  81. package/build/browser/filter-list/inputs/MultiSelectFilterInput.js.map +1 -0
  82. package/build/browser/filter-list/inputs/NumberRangeFilterInput.js +105 -0
  83. package/build/browser/filter-list/inputs/NumberRangeFilterInput.js.map +1 -0
  84. package/build/browser/filter-list/inputs/PropertyFilterInput.js +129 -0
  85. package/build/browser/filter-list/inputs/PropertyFilterInput.js.map +1 -0
  86. package/build/browser/filter-list/inputs/SingleDateFilterInput.js +38 -0
  87. package/build/browser/filter-list/inputs/SingleDateFilterInput.js.map +1 -0
  88. package/build/browser/filter-list/inputs/SingleSelectFilterInput.js +55 -0
  89. package/build/browser/filter-list/inputs/SingleSelectFilterInput.js.map +1 -0
  90. package/build/browser/filter-list/inputs/TextTagsFilterInput.js +54 -0
  91. package/build/browser/filter-list/inputs/TextTagsFilterInput.js.map +1 -0
  92. package/build/browser/filter-list/inputs/TimelineFilterInput.js +49 -0
  93. package/build/browser/filter-list/inputs/TimelineFilterInput.js.map +1 -0
  94. package/build/browser/filter-list/inputs/ToggleFilterInput.js +36 -0
  95. package/build/browser/filter-list/inputs/ToggleFilterInput.js.map +1 -0
  96. package/build/browser/filter-list/types/AggregationTypes.js +2 -0
  97. package/build/browser/filter-list/types/AggregationTypes.js.map +1 -0
  98. package/build/browser/filter-list/types/LinkedFilterTypes.js.map +1 -1
  99. package/build/browser/filter-list/types/index.js +0 -2
  100. package/build/browser/filter-list/types/index.js.map +1 -1
  101. package/build/browser/filter-list/utils/filterStateSerialization.js +42 -0
  102. package/build/browser/filter-list/utils/filterStateSerialization.js.map +1 -0
  103. package/build/browser/filter-list/utils/filterStateToWhereClause.js +19 -11
  104. package/build/browser/filter-list/utils/filterStateToWhereClause.js.map +1 -1
  105. package/build/browser/filter-list/utils/filterValues.js +26 -0
  106. package/build/browser/filter-list/utils/filterValues.js.map +1 -1
  107. package/build/browser/object-table/ColumnConfigDialog.module.css +0 -9
  108. package/build/browser/object-table/MultiColumnSortDialog.module.css +0 -4
  109. package/build/browser/object-table/TableHeaderWithPopover.module.css +0 -12
  110. package/build/browser/public/experimental.js +4 -1
  111. package/build/browser/public/experimental.js.map +1 -1
  112. package/build/browser/shared/ErrorBoundary.module.css +14 -14
  113. package/build/browser/styles.css +207 -124
  114. package/build/cjs/public/experimental.cjs +3144 -2551
  115. package/build/cjs/public/experimental.cjs.map +1 -1
  116. package/build/cjs/public/experimental.css +591 -513
  117. package/build/cjs/public/experimental.css.map +1 -1
  118. package/build/cjs/public/experimental.d.cts +62 -2
  119. package/build/esm/base-components/action-button/ActionButton.module.css +0 -4
  120. package/build/esm/base-components/checkbox/Checkbox.module.css +0 -4
  121. package/build/esm/base-components/dialog/Dialog.module.css +0 -8
  122. package/build/esm/base-components/draggable-list/DraggableList.js +4 -2
  123. package/build/esm/base-components/draggable-list/DraggableList.js.map +1 -1
  124. package/build/esm/base-components/draggable-list/DraggableList.module.css +0 -8
  125. package/build/esm/filter-list/FilterInput.js +132 -0
  126. package/build/esm/filter-list/FilterInput.js.map +1 -0
  127. package/build/esm/filter-list/FilterList.js +91 -0
  128. package/build/esm/filter-list/FilterList.js.map +1 -0
  129. package/build/esm/filter-list/FilterListApi.js.map +1 -1
  130. package/build/esm/filter-list/FilterListItemApi.js.map +1 -1
  131. package/build/esm/filter-list/base/{FilterList.js → BaseFilterList.js} +30 -31
  132. package/build/esm/filter-list/base/BaseFilterList.js.map +1 -0
  133. package/build/esm/filter-list/base/BaseFilterListApi.js +2 -0
  134. package/build/esm/filter-list/base/BaseFilterListApi.js.map +1 -0
  135. package/build/esm/filter-list/base/FilterIcons.js +63 -0
  136. package/build/esm/filter-list/base/FilterIcons.js.map +1 -0
  137. package/build/esm/filter-list/base/FilterList.module.css +22 -1
  138. package/build/esm/filter-list/base/FilterListContent.js +21 -20
  139. package/build/esm/filter-list/base/FilterListContent.js.map +1 -1
  140. package/build/esm/filter-list/base/FilterListHeader.js +8 -3
  141. package/build/esm/filter-list/base/FilterListHeader.js.map +1 -1
  142. package/build/esm/filter-list/base/FilterListHeader.module.css +25 -1
  143. package/build/esm/filter-list/base/FilterListItem.js +36 -17
  144. package/build/esm/filter-list/base/FilterListItem.js.map +1 -1
  145. package/build/esm/filter-list/base/FilterListItem.module.css +58 -2
  146. package/build/esm/filter-list/base/SortableFilterListItem.js +6 -6
  147. package/build/esm/filter-list/base/SortableFilterListItem.js.map +1 -1
  148. package/build/esm/filter-list/base/index.js +1 -2
  149. package/build/esm/filter-list/base/index.js.map +1 -1
  150. package/build/esm/filter-list/base/inputs/CheckboxListInput.js +34 -15
  151. package/build/esm/filter-list/base/inputs/CheckboxListInput.js.map +1 -1
  152. package/build/esm/filter-list/base/inputs/CheckboxListInput.module.css +13 -0
  153. package/build/esm/filter-list/base/inputs/DateRangeInput.js.map +1 -1
  154. package/build/esm/filter-list/base/inputs/ListogramInput.js +17 -21
  155. package/build/esm/filter-list/base/inputs/ListogramInput.js.map +1 -1
  156. package/build/esm/filter-list/base/inputs/ListogramInput.module.css +25 -19
  157. package/build/esm/filter-list/base/inputs/MultiDateInput.module.css +6 -4
  158. package/build/esm/filter-list/base/inputs/MultiSelectInput.js +7 -14
  159. package/build/esm/filter-list/base/inputs/MultiSelectInput.js.map +1 -1
  160. package/build/esm/filter-list/base/inputs/MultiSelectInput.module.css +4 -1
  161. package/build/esm/filter-list/base/inputs/NullValueWrapper.js +4 -23
  162. package/build/esm/filter-list/base/inputs/NullValueWrapper.js.map +1 -1
  163. package/build/esm/filter-list/base/inputs/NullValueWrapper.module.css +3 -2
  164. package/build/esm/filter-list/base/inputs/NumberRangeInput.js.map +1 -1
  165. package/build/esm/filter-list/base/inputs/RangeInput.js +2 -32
  166. package/build/esm/filter-list/base/inputs/RangeInput.js.map +1 -1
  167. package/build/esm/filter-list/base/inputs/RangeInput.module.css +16 -14
  168. package/build/esm/filter-list/base/inputs/SingleDateInput.module.css +2 -1
  169. package/build/esm/filter-list/base/inputs/SingleSelectInput.js +6 -13
  170. package/build/esm/filter-list/base/inputs/SingleSelectInput.js.map +1 -1
  171. package/build/esm/filter-list/base/inputs/TextTagsInput.js +6 -14
  172. package/build/esm/filter-list/base/inputs/TextTagsInput.js.map +1 -1
  173. package/build/esm/filter-list/base/inputs/TimelineInput.js +2 -2
  174. package/build/esm/filter-list/base/inputs/TimelineInput.js.map +1 -1
  175. package/build/esm/filter-list/base/inputs/TimelineInput.module.css +14 -12
  176. package/build/esm/filter-list/base/inputs/shared.module.css +5 -4
  177. package/build/esm/filter-list/hooks/useFilterListState.js +24 -3
  178. package/build/esm/filter-list/hooks/useFilterListState.js.map +1 -1
  179. package/build/esm/filter-list/hooks/usePropertyAggregation.js.map +1 -1
  180. package/build/esm/filter-list/inputs/CheckboxListFilterInput.js +56 -0
  181. package/build/esm/filter-list/inputs/CheckboxListFilterInput.js.map +1 -0
  182. package/build/esm/filter-list/inputs/ContainsTextFilterInput.js +38 -0
  183. package/build/esm/filter-list/inputs/ContainsTextFilterInput.js.map +1 -0
  184. package/build/esm/filter-list/inputs/DateRangeFilterInput.js +105 -0
  185. package/build/esm/filter-list/inputs/DateRangeFilterInput.js.map +1 -0
  186. package/build/esm/filter-list/inputs/LinkedPropertyInput.js +508 -0
  187. package/build/esm/filter-list/inputs/LinkedPropertyInput.js.map +1 -0
  188. package/build/esm/filter-list/inputs/ListogramFilterInput.js +62 -0
  189. package/build/esm/filter-list/inputs/ListogramFilterInput.js.map +1 -0
  190. package/build/esm/filter-list/inputs/MultiDateFilterInput.js +38 -0
  191. package/build/esm/filter-list/inputs/MultiDateFilterInput.js.map +1 -0
  192. package/build/esm/filter-list/inputs/MultiSelectFilterInput.js +55 -0
  193. package/build/esm/filter-list/inputs/MultiSelectFilterInput.js.map +1 -0
  194. package/build/esm/filter-list/inputs/NumberRangeFilterInput.js +105 -0
  195. package/build/esm/filter-list/inputs/NumberRangeFilterInput.js.map +1 -0
  196. package/build/esm/filter-list/inputs/PropertyFilterInput.js +129 -0
  197. package/build/esm/filter-list/inputs/PropertyFilterInput.js.map +1 -0
  198. package/build/esm/filter-list/inputs/SingleDateFilterInput.js +38 -0
  199. package/build/esm/filter-list/inputs/SingleDateFilterInput.js.map +1 -0
  200. package/build/esm/filter-list/inputs/SingleSelectFilterInput.js +55 -0
  201. package/build/esm/filter-list/inputs/SingleSelectFilterInput.js.map +1 -0
  202. package/build/esm/filter-list/inputs/TextTagsFilterInput.js +54 -0
  203. package/build/esm/filter-list/inputs/TextTagsFilterInput.js.map +1 -0
  204. package/build/esm/filter-list/inputs/TimelineFilterInput.js +49 -0
  205. package/build/esm/filter-list/inputs/TimelineFilterInput.js.map +1 -0
  206. package/build/esm/filter-list/inputs/ToggleFilterInput.js +36 -0
  207. package/build/esm/filter-list/inputs/ToggleFilterInput.js.map +1 -0
  208. package/build/esm/filter-list/types/AggregationTypes.js +2 -0
  209. package/build/esm/filter-list/types/AggregationTypes.js.map +1 -0
  210. package/build/esm/filter-list/types/LinkedFilterTypes.js.map +1 -1
  211. package/build/esm/filter-list/types/index.js +0 -2
  212. package/build/esm/filter-list/types/index.js.map +1 -1
  213. package/build/esm/filter-list/utils/filterStateSerialization.js +42 -0
  214. package/build/esm/filter-list/utils/filterStateSerialization.js.map +1 -0
  215. package/build/esm/filter-list/utils/filterStateToWhereClause.js +19 -11
  216. package/build/esm/filter-list/utils/filterStateToWhereClause.js.map +1 -1
  217. package/build/esm/filter-list/utils/filterValues.js +26 -0
  218. package/build/esm/filter-list/utils/filterValues.js.map +1 -1
  219. package/build/esm/object-table/ColumnConfigDialog.module.css +0 -9
  220. package/build/esm/object-table/MultiColumnSortDialog.module.css +0 -4
  221. package/build/esm/object-table/TableHeaderWithPopover.module.css +0 -12
  222. package/build/esm/public/experimental.js +4 -1
  223. package/build/esm/public/experimental.js.map +1 -1
  224. package/build/esm/shared/ErrorBoundary.module.css +14 -14
  225. package/build/types/filter-list/{base/FilterInput.d.ts → FilterInput.d.ts} +2 -2
  226. package/build/types/filter-list/FilterInput.d.ts.map +1 -0
  227. package/build/types/filter-list/{base/FilterList.d.ts → FilterList.d.ts} +1 -1
  228. package/build/types/filter-list/FilterList.d.ts.map +1 -0
  229. package/build/types/filter-list/FilterListApi.d.ts +14 -0
  230. package/build/types/filter-list/FilterListApi.d.ts.map +1 -1
  231. package/build/types/filter-list/FilterListItemApi.d.ts +13 -0
  232. package/build/types/filter-list/FilterListItemApi.d.ts.map +1 -1
  233. package/build/types/filter-list/base/BaseFilterList.d.ts +3 -0
  234. package/build/types/filter-list/base/BaseFilterList.d.ts.map +1 -0
  235. package/build/types/filter-list/base/BaseFilterListApi.d.ts +29 -0
  236. package/build/types/filter-list/base/BaseFilterListApi.d.ts.map +1 -0
  237. package/build/types/filter-list/base/FilterIcons.d.ts +4 -0
  238. package/build/types/filter-list/base/FilterIcons.d.ts.map +1 -0
  239. package/build/types/filter-list/base/FilterListContent.d.ts +8 -8
  240. package/build/types/filter-list/base/FilterListContent.d.ts.map +1 -1
  241. package/build/types/filter-list/base/FilterListHeader.d.ts.map +1 -1
  242. package/build/types/filter-list/base/FilterListItem.d.ts +7 -8
  243. package/build/types/filter-list/base/FilterListItem.d.ts.map +1 -1
  244. package/build/types/filter-list/base/SortableFilterListItem.d.ts +7 -8
  245. package/build/types/filter-list/base/SortableFilterListItem.d.ts.map +1 -1
  246. package/build/types/filter-list/base/index.d.ts +2 -2
  247. package/build/types/filter-list/base/index.d.ts.map +1 -1
  248. package/build/types/filter-list/base/inputs/CheckboxListInput.d.ts +7 -13
  249. package/build/types/filter-list/base/inputs/CheckboxListInput.d.ts.map +1 -1
  250. package/build/types/filter-list/base/inputs/DateRangeInput.d.ts +7 -12
  251. package/build/types/filter-list/base/inputs/DateRangeInput.d.ts.map +1 -1
  252. package/build/types/filter-list/base/inputs/ListogramInput.d.ts +10 -13
  253. package/build/types/filter-list/base/inputs/ListogramInput.d.ts.map +1 -1
  254. package/build/types/filter-list/base/inputs/MultiSelectInput.d.ts +7 -13
  255. package/build/types/filter-list/base/inputs/MultiSelectInput.d.ts.map +1 -1
  256. package/build/types/filter-list/base/inputs/NullValueWrapper.d.ts +5 -11
  257. package/build/types/filter-list/base/inputs/NullValueWrapper.d.ts.map +1 -1
  258. package/build/types/filter-list/base/inputs/NumberRangeInput.d.ts +7 -12
  259. package/build/types/filter-list/base/inputs/NumberRangeInput.d.ts.map +1 -1
  260. package/build/types/filter-list/base/inputs/RangeInput.d.ts +7 -14
  261. package/build/types/filter-list/base/inputs/RangeInput.d.ts.map +1 -1
  262. package/build/types/filter-list/base/inputs/SingleSelectInput.d.ts +7 -13
  263. package/build/types/filter-list/base/inputs/SingleSelectInput.d.ts.map +1 -1
  264. package/build/types/filter-list/base/inputs/TextTagsInput.d.ts +7 -13
  265. package/build/types/filter-list/base/inputs/TextTagsInput.d.ts.map +1 -1
  266. package/build/types/filter-list/hooks/useFilterListState.d.ts +1 -0
  267. package/build/types/filter-list/hooks/useFilterListState.d.ts.map +1 -1
  268. package/build/types/filter-list/hooks/usePropertyAggregation.d.ts +2 -5
  269. package/build/types/filter-list/hooks/usePropertyAggregation.d.ts.map +1 -1
  270. package/build/types/filter-list/inputs/CheckboxListFilterInput.d.ts +14 -0
  271. package/build/types/filter-list/inputs/CheckboxListFilterInput.d.ts.map +1 -0
  272. package/build/types/filter-list/inputs/ContainsTextFilterInput.d.ts +10 -0
  273. package/build/types/filter-list/inputs/ContainsTextFilterInput.d.ts.map +1 -0
  274. package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts +12 -0
  275. package/build/types/filter-list/inputs/DateRangeFilterInput.d.ts.map +1 -0
  276. package/build/types/filter-list/{base/inputs → inputs}/LinkedPropertyInput.d.ts +2 -2
  277. package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts.map +1 -0
  278. package/build/types/filter-list/inputs/ListogramFilterInput.d.ts +16 -0
  279. package/build/types/filter-list/inputs/ListogramFilterInput.d.ts.map +1 -0
  280. package/build/types/filter-list/inputs/MultiDateFilterInput.d.ts +9 -0
  281. package/build/types/filter-list/inputs/MultiDateFilterInput.d.ts.map +1 -0
  282. package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts +13 -0
  283. package/build/types/filter-list/inputs/MultiSelectFilterInput.d.ts.map +1 -0
  284. package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts +12 -0
  285. package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts.map +1 -0
  286. package/build/types/filter-list/inputs/PropertyFilterInput.d.ts +17 -0
  287. package/build/types/filter-list/inputs/PropertyFilterInput.d.ts.map +1 -0
  288. package/build/types/filter-list/inputs/SingleDateFilterInput.d.ts +9 -0
  289. package/build/types/filter-list/inputs/SingleDateFilterInput.d.ts.map +1 -0
  290. package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts +13 -0
  291. package/build/types/filter-list/inputs/SingleSelectFilterInput.d.ts.map +1 -0
  292. package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts +13 -0
  293. package/build/types/filter-list/inputs/TextTagsFilterInput.d.ts.map +1 -0
  294. package/build/types/filter-list/inputs/TimelineFilterInput.d.ts +9 -0
  295. package/build/types/filter-list/inputs/TimelineFilterInput.d.ts.map +1 -0
  296. package/build/types/filter-list/inputs/ToggleFilterInput.d.ts +9 -0
  297. package/build/types/filter-list/inputs/ToggleFilterInput.d.ts.map +1 -0
  298. package/build/types/filter-list/types/AggregationTypes.d.ts +5 -0
  299. package/build/types/filter-list/types/AggregationTypes.d.ts.map +1 -0
  300. package/build/types/filter-list/types/LinkedFilterTypes.d.ts +0 -19
  301. package/build/types/filter-list/types/LinkedFilterTypes.d.ts.map +1 -1
  302. package/build/types/filter-list/types/index.d.ts +0 -2
  303. package/build/types/filter-list/types/index.d.ts.map +1 -1
  304. package/build/types/filter-list/utils/filterStateSerialization.d.ts +3 -0
  305. package/build/types/filter-list/utils/filterStateSerialization.d.ts.map +1 -0
  306. package/build/types/filter-list/utils/filterStateToWhereClause.d.ts +1 -1
  307. package/build/types/filter-list/utils/filterStateToWhereClause.d.ts.map +1 -1
  308. package/build/types/filter-list/utils/filterValues.d.ts +2 -0
  309. package/build/types/filter-list/utils/filterValues.d.ts.map +1 -1
  310. package/build/types/public/experimental.d.ts +4 -1
  311. package/build/types/public/experimental.d.ts.map +1 -1
  312. package/package.json +3 -3
  313. package/build/browser/filter-list/base/FilterInput.js +0 -542
  314. package/build/browser/filter-list/base/FilterInput.js.map +0 -1
  315. package/build/browser/filter-list/base/FilterList.js.map +0 -1
  316. package/build/browser/filter-list/base/inputs/LinkedPropertyInput.js +0 -237
  317. package/build/browser/filter-list/base/inputs/LinkedPropertyInput.js.map +0 -1
  318. package/build/browser/filter-list/types/AddFilterMenuTypes.js +0 -2
  319. package/build/browser/filter-list/types/AddFilterMenuTypes.js.map +0 -1
  320. package/build/browser/filter-list/types/FilterPanelTypes.js +0 -2
  321. package/build/browser/filter-list/types/FilterPanelTypes.js.map +0 -1
  322. package/build/esm/filter-list/base/FilterInput.js +0 -542
  323. package/build/esm/filter-list/base/FilterInput.js.map +0 -1
  324. package/build/esm/filter-list/base/FilterList.js.map +0 -1
  325. package/build/esm/filter-list/base/inputs/LinkedPropertyInput.js +0 -237
  326. package/build/esm/filter-list/base/inputs/LinkedPropertyInput.js.map +0 -1
  327. package/build/esm/filter-list/types/AddFilterMenuTypes.js +0 -2
  328. package/build/esm/filter-list/types/AddFilterMenuTypes.js.map +0 -1
  329. package/build/esm/filter-list/types/FilterPanelTypes.js +0 -2
  330. package/build/esm/filter-list/types/FilterPanelTypes.js.map +0 -1
  331. package/build/types/filter-list/base/FilterInput.d.ts.map +0 -1
  332. package/build/types/filter-list/base/FilterList.d.ts.map +0 -1
  333. package/build/types/filter-list/base/inputs/LinkedPropertyInput.d.ts.map +0 -1
  334. package/build/types/filter-list/types/AddFilterMenuTypes.d.ts +0 -56
  335. package/build/types/filter-list/types/AddFilterMenuTypes.d.ts.map +0 -1
  336. package/build/types/filter-list/types/FilterPanelTypes.d.ts +0 -18
  337. package/build/types/filter-list/types/FilterPanelTypes.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @osdk/react-components
2
2
 
3
+ ## 0.2.0-beta.16
4
+
5
+ ### Minor Changes
6
+
7
+ - 06095fa: Restructure FilterList into base and osdk layers
8
+ - f6649a5: add collapsible panel, select all, include/exclude toggle, per-item colors, histogram display modes, and session persistence support to filter list
9
+ - 1135a27: Update Blueprint css import
10
+
11
+ ### Patch Changes
12
+
13
+ - @osdk/api@2.8.0-beta.19
14
+ - @osdk/client@2.8.0-beta.19
15
+ - @osdk/react@0.10.0-beta.8
16
+
3
17
  ## 0.2.0-beta.15
4
18
 
5
19
  ### Minor Changes
@@ -21,10 +21,6 @@
21
21
  font-size: var(--osdk-typography-size-body-medium);
22
22
  cursor: pointer;
23
23
 
24
- &:focus {
25
- outline: none;
26
- }
27
-
28
24
  &:focus-visible {
29
25
  outline: var(--osdk-focus-outline);
30
26
  outline-offset: var(--osdk-focus-visible-outline-offset);
@@ -55,10 +55,6 @@
55
55
  }
56
56
  }
57
57
 
58
- &:focus {
59
- outline: none;
60
- }
61
-
62
58
  &:focus-visible {
63
59
  outline: var(--osdk-focus-outline);
64
60
  outline-offset: calc(-1 * var(--osdk-focus-visible-outline-offset));
@@ -36,10 +36,6 @@
36
36
  z-index: var(--osdk-surface-z-index-2);
37
37
  display: flex;
38
38
  flex-direction: column;
39
-
40
- &:focus {
41
- outline: none;
42
- }
43
39
  }
44
40
 
45
41
  .header {
@@ -84,10 +80,6 @@
84
80
  background-color: var(--osdk-surface-background-color-default-hover);
85
81
  }
86
82
 
87
- &:focus {
88
- outline: none;
89
- }
90
-
91
83
  &:focus-visible {
92
84
  outline: var(--osdk-focus-outline);
93
85
  outline-offset: var(--osdk-focus-visible-outline-offset);
@@ -56,7 +56,8 @@ function DraggableListItem({
56
56
  className: styles.dragHandle,
57
57
  "aria-label": `Reorder ${item.label}`
58
58
  }, attributes, listeners), /*#__PURE__*/React.createElement(DragHandleVertical, {
59
- className: styles.icon
59
+ className: styles.icon,
60
+ color: "currentColor"
60
61
  })), /*#__PURE__*/React.createElement("div", {
61
62
  className: styles.itemContent
62
63
  }, renderContent ? renderContent(item) : item.label), onRemove && /*#__PURE__*/React.createElement(Button, {
@@ -64,7 +65,8 @@ function DraggableListItem({
64
65
  onClick: handleRemove,
65
66
  "aria-label": `Remove ${item.label}`
66
67
  }, /*#__PURE__*/React.createElement(RemoveIcon, {
67
- className: styles.icon
68
+ className: styles.icon,
69
+ color: "currentColor"
68
70
  })));
69
71
  }
70
72
  export function DraggableList({
@@ -1 +1 @@
1
- {"version":3,"file":"DraggableList.js","names":["Button","DragHandleVertical","SmallCross","Trash","closestCenter","DndContext","BaseDndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","SortableContext","sortableKeyboardCoordinates","useSortable","verticalListSortingStrategy","CSS","classNames","React","useCallback","useEffect","useMemo","useRef","styles","DraggableListItem","item","onRemove","removeIconVariant","renderContent","attributes","listeners","setNodeRef","transform","transition","isDragging","id","style","Transform","toString","handleRemove","RemoveIcon","createElement","ref","className","draggableItem","_extends","dragHandle","label","icon","itemContent","removeButton","onClick","DraggableList","items","onReorder","emptyMessage","itemIds","map","sensors","activationConstraint","distance","coordinateGetter","handleDragEnd","event","active","over","oldIndex","findIndex","newIndex","containerRef","useKeyboardEvents","draggableListContainer","collisionDetection","onDragEnd","strategy","key","length","emptyState","el","current","ARROW_KEYS","Set","handleCapture","has","querySelector","stopPropagation","document","dispatchEvent","KeyboardEvent","code","bubbles","addEventListener","removeEventListener"],"sources":["DraggableList.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 { Button } from \"@base-ui/react/button\";\nimport { DragHandleVertical, SmallCross, Trash } from \"@blueprintjs/icons\";\nimport {\n closestCenter,\n DndContext as BaseDndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport type { RefObject } from \"react\";\nimport React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport styles from \"./DraggableList.module.css\";\n\nexport interface DraggableItem {\n id: string;\n label: string;\n}\n\ntype RemoveIconVariant = \"trash\" | \"cross\";\n\ninterface DraggableListItemProps<T extends DraggableItem> {\n item: T;\n onRemove?: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n}\n\nfunction DraggableListItem<T extends DraggableItem>({\n item,\n onRemove,\n removeIconVariant = \"trash\",\n renderContent,\n}: DraggableListItemProps<T>): React.ReactElement {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: item.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const handleRemove = useCallback(() => {\n onRemove?.(item.id);\n }, [item.id, onRemove]);\n\n const RemoveIcon = removeIconVariant === \"trash\" ? Trash : SmallCross;\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={styles.draggableItem}\n data-dragging={isDragging}\n >\n <div\n className={styles.dragHandle}\n aria-label={`Reorder ${item.label}`}\n {...attributes}\n {...listeners}\n >\n <DragHandleVertical className={styles.icon} />\n </div>\n <div className={styles.itemContent}>\n {renderContent ? renderContent(item) : item.label}\n </div>\n {onRemove && (\n <Button\n className={styles.removeButton}\n onClick={handleRemove}\n aria-label={`Remove ${item.label}`}\n >\n <RemoveIcon className={styles.icon} />\n </Button>\n )}\n </div>\n );\n}\n\nexport interface DraggableListProps<T extends DraggableItem> {\n items: T[];\n onReorder: (fromIndex: number, toIndex: number) => void;\n onRemove: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n emptyMessage?: string;\n className?: string;\n}\n\nexport function DraggableList<T extends DraggableItem>({\n items,\n onReorder,\n onRemove,\n removeIconVariant = \"cross\",\n renderContent,\n emptyMessage,\n className,\n}: DraggableListProps<T>): React.ReactElement {\n const itemIds = useMemo(() => items.map((item) => item.id), [items]);\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 5,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (over && active.id !== over.id) {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over.id);\n onReorder(oldIndex, newIndex);\n }\n },\n [items, onReorder],\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n useKeyboardEvents(containerRef);\n\n // TODO: Revert when @types/react is fixed\n const DndContext = BaseDndContext as any;\n\n return (\n <div\n ref={containerRef}\n className={classNames(styles.draggableListContainer, className)}\n >\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={itemIds}\n strategy={verticalListSortingStrategy}\n >\n {items.map((item) => (\n <DraggableListItem<T>\n key={item.id}\n item={item}\n onRemove={onRemove}\n removeIconVariant={removeIconVariant}\n renderContent={renderContent}\n />\n ))}\n </SortableContext>\n </DndContext>\n {items.length === 0 && emptyMessage && (\n <div className={styles.emptyState}>{emptyMessage}</div>\n )}\n </div>\n );\n}\n\nconst useKeyboardEvents = (containerRef: RefObject<HTMLDivElement>) => {\n // Base UI's DialogPopup calls stopPropagation on arrow key events, which\n // prevents them from reaching @dnd-kit's document-level KeyboardSensor\n // listener. We use a native capture-phase listener to intercept arrow keys\n // before the dialog can swallow them, and re-dispatch them on the document\n // so @dnd-kit can process keyboard-driven reordering.\n useEffect(() => {\n const el = containerRef.current;\n if (el == null) {\n return;\n }\n\n const ARROW_KEYS = new Set([\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n ]);\n\n function handleCapture(event: KeyboardEvent) {\n if (!ARROW_KEYS.has(event.key)) {\n return;\n }\n\n // Only intercept when a drag is active (an item has [data-dragging=\"true\"])\n if (el!.querySelector(\"[data-dragging=\\\"true\\\"]\") == null) {\n return;\n }\n\n event.stopPropagation();\n\n document.dispatchEvent(\n new KeyboardEvent(\"keydown\", {\n key: event.key,\n code: event.code,\n bubbles: true,\n }),\n );\n }\n\n el.addEventListener(\"keydown\", handleCapture, true);\n return () => el.removeEventListener(\"keydown\", handleCapture, true);\n }, [containerRef]);\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,kBAAkB,EAAEC,UAAU,EAAEC,KAAK,QAAQ,oBAAoB;AAC1E,SACEC,aAAa,EACbC,UAAU,IAAIC,cAAc,EAE5BC,cAAc,EACdC,aAAa,EACbC,SAAS,EACTC,UAAU,QACL,eAAe;AACtB,SACEC,eAAe,EACfC,2BAA2B,EAC3BC,WAAW,EACXC,2BAA2B,QACtB,mBAAmB;AAC1B,SAASC,GAAG,QAAQ,oBAAoB;AACxC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACtE,OAAOC,MAAM,MAAM,4BAA4B;AAgB/C,SAASC,iBAAiBA,CAA0B;EAClDC,IAAI;EACJC,QAAQ;EACRC,iBAAiB,GAAG,OAAO;EAC3BC;AACyB,CAAC,EAAsB;EAChD,MAAM;IACJC,UAAU;IACVC,SAAS;IACTC,UAAU;IACVC,SAAS;IACTC,UAAU;IACVC;EACF,CAAC,GAAGpB,WAAW,CAAC;IAAEqB,EAAE,EAAEV,IAAI,CAACU;EAAG,CAAC,CAAC;EAEhC,MAAMC,KAAK,GAAG;IACZJ,SAAS,EAAEhB,GAAG,CAACqB,S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AEZ,KAAK,CAACY,GAAG;QACdc,IAAI,EAAE1B,KAAK,CAAC0B,IAAI;QAChBC,OAAO,EAAE;MACX,CAAC,CACH,CAAC;IACH;IAEAZ,EAAE,CAACa,gBAAgB,CAAC,SAAS,EAAET,aAAa,EAAE,IAAI,CAAC;IACnD,OAAO,MAAMJ,EAAE,CAACc,mBAAmB,CAAC,SAAS,EAAEV,aAAa,EAAE,IAAI,CAAC;EACrE,CAAC,EAAE,CAACb,YAAY,CAAC,CAAC;AACpB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"DraggableList.js","names":["Button","DragHandleVertical","SmallCross","Trash","closestCenter","DndContext","BaseDndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","SortableContext","sortableKeyboardCoordinates","useSortable","verticalListSortingStrategy","CSS","classNames","React","useCallback","useEffect","useMemo","useRef","styles","DraggableListItem","item","onRemove","removeIconVariant","renderContent","attributes","listeners","setNodeRef","transform","transition","isDragging","id","style","Transform","toString","handleRemove","RemoveIcon","createElement","ref","className","draggableItem","_extends","dragHandle","label","icon","color","itemContent","removeButton","onClick","DraggableList","items","onReorder","emptyMessage","itemIds","map","sensors","activationConstraint","distance","coordinateGetter","handleDragEnd","event","active","over","oldIndex","findIndex","newIndex","containerRef","useKeyboardEvents","draggableListContainer","collisionDetection","onDragEnd","strategy","key","length","emptyState","el","current","ARROW_KEYS","Set","handleCapture","has","querySelector","stopPropagation","document","dispatchEvent","KeyboardEvent","code","bubbles","addEventListener","removeEventListener"],"sources":["DraggableList.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 { Button } from \"@base-ui/react/button\";\nimport { DragHandleVertical, SmallCross, Trash } from \"@blueprintjs/icons\";\nimport {\n closestCenter,\n DndContext as BaseDndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport type { RefObject } from \"react\";\nimport React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport styles from \"./DraggableList.module.css\";\n\nexport interface DraggableItem {\n id: string;\n label: string;\n}\n\ntype RemoveIconVariant = \"trash\" | \"cross\";\n\ninterface DraggableListItemProps<T extends DraggableItem> {\n item: T;\n onRemove?: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n}\n\nfunction DraggableListItem<T extends DraggableItem>({\n item,\n onRemove,\n removeIconVariant = \"trash\",\n renderContent,\n}: DraggableListItemProps<T>): React.ReactElement {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: item.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const handleRemove = useCallback(() => {\n onRemove?.(item.id);\n }, [item.id, onRemove]);\n\n const RemoveIcon = removeIconVariant === \"trash\" ? Trash : SmallCross;\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={styles.draggableItem}\n data-dragging={isDragging}\n >\n <div\n className={styles.dragHandle}\n aria-label={`Reorder ${item.label}`}\n {...attributes}\n {...listeners}\n >\n <DragHandleVertical className={styles.icon} color={\"currentColor\"} />\n </div>\n <div className={styles.itemContent}>\n {renderContent ? renderContent(item) : item.label}\n </div>\n {onRemove && (\n <Button\n className={styles.removeButton}\n onClick={handleRemove}\n aria-label={`Remove ${item.label}`}\n >\n <RemoveIcon className={styles.icon} color={\"currentColor\"} />\n </Button>\n )}\n </div>\n );\n}\n\nexport interface DraggableListProps<T extends DraggableItem> {\n items: T[];\n onReorder: (fromIndex: number, toIndex: number) => void;\n onRemove: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n emptyMessage?: string;\n className?: string;\n}\n\nexport function DraggableList<T extends DraggableItem>({\n items,\n onReorder,\n onRemove,\n removeIconVariant = \"cross\",\n renderContent,\n emptyMessage,\n className,\n}: DraggableListProps<T>): React.ReactElement {\n const itemIds = useMemo(() => items.map((item) => item.id), [items]);\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 5,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (over && active.id !== over.id) {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over.id);\n onReorder(oldIndex, newIndex);\n }\n },\n [items, onReorder],\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n useKeyboardEvents(containerRef);\n\n // TODO: Revert when @types/react is fixed\n const DndContext = BaseDndContext as any;\n\n return (\n <div\n ref={containerRef}\n className={classNames(styles.draggableListContainer, className)}\n >\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={itemIds}\n strategy={verticalListSortingStrategy}\n >\n {items.map((item) => (\n <DraggableListItem<T>\n key={item.id}\n item={item}\n onRemove={onRemove}\n removeIconVariant={removeIconVariant}\n renderContent={renderContent}\n />\n ))}\n </SortableContext>\n </DndContext>\n {items.length === 0 && emptyMessage && (\n <div className={styles.emptyState}>{emptyMessage}</div>\n )}\n </div>\n );\n}\n\nconst useKeyboardEvents = (containerRef: RefObject<HTMLDivElement>) => {\n // Base UI's DialogPopup calls stopPropagation on arrow key events, which\n // prevents them from reaching @dnd-kit's document-level KeyboardSensor\n // listener. We use a native capture-phase listener to intercept arrow keys\n // before the dialog can swallow them, and re-dispatch them on the document\n // so @dnd-kit can process keyboard-driven reordering.\n useEffect(() => {\n const el = containerRef.current;\n if (el == null) {\n return;\n }\n\n const ARROW_KEYS = new Set([\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n ]);\n\n function handleCapture(event: KeyboardEvent) {\n if (!ARROW_KEYS.has(event.key)) {\n return;\n }\n\n // Only intercept when a drag is active (an item has [data-dragging=\"true\"])\n if (el!.querySelector(\"[data-dragging=\\\"true\\\"]\") == null) {\n return;\n }\n\n event.stopPropagation();\n\n document.dispatchEvent(\n new KeyboardEvent(\"keydown\", {\n key: event.key,\n code: event.code,\n bubbles: true,\n }),\n );\n }\n\n el.addEventListener(\"keydown\", handleCapture, true);\n return () => el.removeEventListener(\"keydown\", handleCapture, true);\n }, [containerRef]);\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,kBAAkB,EAAEC,UAAU,EAAEC,KAAK,QAAQ,oBAAoB;AAC1E,SACEC,aAAa,EACbC,UAAU,IAAIC,cAAc,EAE5BC,cAAc,EACdC,aAAa,EACbC,SAAS,EACTC,UAAU,QACL,eAAe;AACtB,SACEC,eAAe,EACfC,2BAA2B,EAC3BC,WAAW,EACXC,2BAA2B,QACtB,mBAAmB;AAC1B,SAASC,GAAG,QAAQ,oBAAoB;AACxC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACtE,OAAOC,MAAM,MAAM,4BAA4B;AAgB/C,SAASC,iBAAiBA,CAA0B;EAClDC,IAAI;EACJC,QAAQ;EACRC,iBAAiB,GAAG,OAAO;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MAC3C,IAAI,CAACiB,UAAU,CAACG,GAAG,CAACpB,KAAK,CAACY,GAAG,CAAC,EAAE;QAC9B;MACF;;MAEA;MACA,IAAIG,EAAE,CAAEM,aAAa,CAAC,0BAA0B,CAAC,IAAI,IAAI,EAAE;QACzD;MACF;MAEArB,KAAK,CAACsB,eAAe,CAAC,CAAC;MAEvBC,QAAQ,CAACC,aAAa,CACpB,IAAIC,aAAa,CAAC,SAAS,EAAE;QAC3Bb,GAAG,EAAEZ,KAAK,CAACY,GAAG;QACdc,IAAI,EAAE1B,KAAK,CAAC0B,IAAI;QAChBC,OAAO,EAAE;MACX,CAAC,CACH,CAAC;IACH;IAEAZ,EAAE,CAACa,gBAAgB,CAAC,SAAS,EAAET,aAAa,EAAE,IAAI,CAAC;IACnD,OAAO,MAAMJ,EAAE,CAACc,mBAAmB,CAAC,SAAS,EAAEV,aAAa,EAAE,IAAI,CAAC;EACrE,CAAC,EAAE,CAACb,YAAY,CAAC,CAAC;AACpB,CAAC","ignoreList":[]}
@@ -51,10 +51,6 @@
51
51
  cursor: var(--osdk-drag-handle-cursor-active);
52
52
  }
53
53
 
54
- &:focus {
55
- outline: none;
56
- }
57
-
58
54
  &:focus-visible {
59
55
  outline: var(--osdk-focus-outline);
60
56
  outline-offset: var(--osdk-focus-visible-outline-offset);
@@ -90,10 +86,6 @@
90
86
  );
91
87
  }
92
88
 
93
- &:focus {
94
- outline: none;
95
- }
96
-
97
89
  &:focus-visible {
98
90
  outline: var(--osdk-focus-outline);
99
91
  outline-offset: var(--osdk-focus-visible-outline-offset);
@@ -0,0 +1,132 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React, { memo, useCallback } from "react";
18
+ import { ContainsTextInput } from "./base/inputs/ContainsTextInput.js";
19
+ import { ToggleInput } from "./base/inputs/ToggleInput.js";
20
+ import { LinkedPropertyInput } from "./inputs/LinkedPropertyInput.js";
21
+ import { PropertyFilterInput } from "./inputs/PropertyFilterInput.js";
22
+ function FilterInputInner({
23
+ objectType,
24
+ objectSet,
25
+ definition,
26
+ filterState,
27
+ onFilterStateChanged,
28
+ whereClause
29
+ }) {
30
+ return /*#__PURE__*/React.createElement(FilterInputContent, {
31
+ objectType: objectType,
32
+ objectSet: objectSet,
33
+ definition: definition,
34
+ filterState: filterState,
35
+ onFilterStateChanged: onFilterStateChanged,
36
+ whereClause: whereClause
37
+ });
38
+ }
39
+ export const FilterInput = /*#__PURE__*/memo(FilterInputInner);
40
+ function FilterInputContent({
41
+ objectType,
42
+ objectSet,
43
+ definition,
44
+ filterState,
45
+ onFilterStateChanged,
46
+ whereClause
47
+ }) {
48
+ switch (definition.type) {
49
+ case "HAS_LINK":
50
+ return /*#__PURE__*/React.createElement(HasLinkInput, {
51
+ filterState: filterState,
52
+ onFilterStateChanged: onFilterStateChanged
53
+ });
54
+ case "LINKED_PROPERTY":
55
+ return /*#__PURE__*/React.createElement(LinkedPropertyInput, {
56
+ objectSet: objectSet,
57
+ definition: definition,
58
+ filterState: filterState,
59
+ onFilterStateChanged: onFilterStateChanged
60
+ });
61
+ case "KEYWORD_SEARCH":
62
+ return /*#__PURE__*/React.createElement(KeywordSearchInput, {
63
+ filterState: filterState,
64
+ onFilterStateChanged: onFilterStateChanged,
65
+ placeholder: definition.label ?? "Search..."
66
+ });
67
+ case "CUSTOM":
68
+ {
69
+ if (!definition.renderInput) {
70
+ return /*#__PURE__*/React.createElement("div", {
71
+ "data-unsupported": "true"
72
+ }, "Custom filter missing renderInput");
73
+ }
74
+ const customFilterState = filterState?.type === "custom" ? filterState : definition.filterState;
75
+ return /*#__PURE__*/React.createElement(React.Fragment, null, definition.renderInput({
76
+ objectSet,
77
+ filterState: customFilterState,
78
+ onFilterStateChanged: state => onFilterStateChanged(state)
79
+ }));
80
+ }
81
+ case "PROPERTY":
82
+ return /*#__PURE__*/React.createElement(PropertyFilterInput, {
83
+ objectType: objectType,
84
+ objectSet: objectSet,
85
+ definition: definition,
86
+ filterState: filterState,
87
+ onFilterStateChanged: onFilterStateChanged,
88
+ whereClause: whereClause
89
+ });
90
+ default:
91
+ return /*#__PURE__*/React.createElement("div", {
92
+ "data-unsupported": "true"
93
+ }, "Unsupported filter type");
94
+ }
95
+ }
96
+ const HasLinkInput = /*#__PURE__*/memo(function ({
97
+ filterState,
98
+ onFilterStateChanged
99
+ }) {
100
+ const hasLink = filterState?.type === "hasLink" ? filterState.hasLink : false;
101
+ const handleChange = useCallback(hasLink => {
102
+ onFilterStateChanged({
103
+ type: "hasLink",
104
+ hasLink
105
+ });
106
+ }, [onFilterStateChanged]);
107
+ return /*#__PURE__*/React.createElement(ToggleInput, {
108
+ enabled: hasLink,
109
+ onChange: handleChange
110
+ });
111
+ });
112
+ const KeywordSearchInput = /*#__PURE__*/memo(function ({
113
+ filterState,
114
+ onFilterStateChanged,
115
+ placeholder
116
+ }) {
117
+ const searchTerm = filterState?.type === "keywordSearch" ? filterState.searchTerm : undefined;
118
+ const operator = filterState?.type === "keywordSearch" ? filterState.operator : "AND";
119
+ const handleChange = useCallback(newSearchTerm => {
120
+ onFilterStateChanged({
121
+ type: "keywordSearch",
122
+ searchTerm: newSearchTerm ?? "",
123
+ operator
124
+ });
125
+ }, [onFilterStateChanged, operator]);
126
+ return /*#__PURE__*/React.createElement(ContainsTextInput, {
127
+ value: searchTerm,
128
+ onChange: handleChange,
129
+ placeholder: placeholder
130
+ });
131
+ });
132
+ //# sourceMappingURL=FilterInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterInput.js","names":["React","memo","useCallback","ContainsTextInput","ToggleInput","LinkedPropertyInput","PropertyFilterInput","FilterInputInner","objectType","objectSet","definition","filterState","onFilterStateChanged","whereClause","createElement","FilterInputContent","FilterInput","type","HasLinkInput","KeywordSearchInput","placeholder","label","renderInput","customFilterState","Fragment","state","hasLink","handleChange","enabled","onChange","searchTerm","undefined","operator","newSearchTerm","value"],"sources":["FilterInput.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 { ObjectSet, ObjectTypeDefinition, WhereClause } from \"@osdk/api\";\nimport React, { memo, useCallback } from \"react\";\nimport { ContainsTextInput } from \"./base/inputs/ContainsTextInput.js\";\nimport { ToggleInput } from \"./base/inputs/ToggleInput.js\";\nimport type { FilterDefinitionUnion } from \"./FilterListApi.js\";\nimport type { FilterState } from \"./FilterListItemApi.js\";\nimport { LinkedPropertyInput } from \"./inputs/LinkedPropertyInput.js\";\nimport { PropertyFilterInput } from \"./inputs/PropertyFilterInput.js\";\n\ninterface FilterInputProps<Q extends ObjectTypeDefinition> {\n objectType: Q;\n objectSet: ObjectSet<Q>;\n definition: FilterDefinitionUnion<Q>;\n filterState: FilterState | undefined;\n onFilterStateChanged: (state: FilterState) => void;\n whereClause: WhereClause<Q>;\n}\n\nfunction FilterInputInner<Q extends ObjectTypeDefinition>({\n objectType,\n objectSet,\n definition,\n filterState,\n onFilterStateChanged,\n whereClause,\n}: FilterInputProps<Q>): React.ReactElement {\n return (\n <FilterInputContent\n objectType={objectType}\n objectSet={objectSet}\n definition={definition}\n filterState={filterState}\n onFilterStateChanged={onFilterStateChanged}\n whereClause={whereClause}\n />\n );\n}\n\nexport const FilterInput = memo(FilterInputInner) as typeof FilterInputInner;\n\nfunction FilterInputContent<Q extends ObjectTypeDefinition>({\n objectType,\n objectSet,\n definition,\n filterState,\n onFilterStateChanged,\n whereClause,\n}: FilterInputProps<Q>): React.ReactElement {\n switch (definition.type) {\n case \"HAS_LINK\":\n return (\n <HasLinkInput\n filterState={filterState}\n onFilterStateChanged={onFilterStateChanged}\n />\n );\n\n case \"LINKED_PROPERTY\":\n return (\n <LinkedPropertyInput\n objectSet={objectSet}\n definition={definition}\n filterState={filterState}\n onFilterStateChanged={onFilterStateChanged}\n />\n );\n\n case \"KEYWORD_SEARCH\":\n return (\n <KeywordSearchInput\n filterState={filterState}\n onFilterStateChanged={onFilterStateChanged}\n placeholder={definition.label ?? \"Search...\"}\n />\n );\n\n case \"CUSTOM\": {\n if (!definition.renderInput) {\n return (\n <div data-unsupported=\"true\">Custom filter missing renderInput</div>\n );\n }\n const customFilterState = filterState?.type === \"custom\"\n ? filterState\n : definition.filterState;\n return (\n <>\n {definition.renderInput({\n objectSet,\n filterState: customFilterState,\n onFilterStateChanged: (state) => onFilterStateChanged(state),\n })}\n </>\n );\n }\n\n case \"PROPERTY\":\n return (\n <PropertyFilterInput\n objectType={objectType}\n objectSet={objectSet}\n definition={definition}\n filterState={filterState}\n onFilterStateChanged={onFilterStateChanged}\n whereClause={whereClause}\n />\n );\n\n default:\n return <div data-unsupported=\"true\">Unsupported filter type</div>;\n }\n}\n\ninterface HasLinkInputProps {\n filterState: FilterState | undefined;\n onFilterStateChanged: (state: FilterState) => void;\n}\n\nconst HasLinkInput = memo(function HasLinkInput({\n filterState,\n onFilterStateChanged,\n}: HasLinkInputProps): React.ReactElement {\n const hasLink = filterState?.type === \"hasLink\"\n ? filterState.hasLink\n : false;\n\n const handleChange = useCallback(\n (hasLink: boolean) => {\n onFilterStateChanged({ type: \"hasLink\", hasLink });\n },\n [onFilterStateChanged],\n );\n\n return <ToggleInput enabled={hasLink} onChange={handleChange} />;\n});\n\ninterface KeywordSearchInputProps {\n filterState: FilterState | undefined;\n onFilterStateChanged: (state: FilterState) => void;\n placeholder: string;\n}\n\nconst KeywordSearchInput = memo(function KeywordSearchInput({\n filterState,\n onFilterStateChanged,\n placeholder,\n}: KeywordSearchInputProps): React.ReactElement {\n const searchTerm = filterState?.type === \"keywordSearch\"\n ? filterState.searchTerm\n : undefined;\n const operator = filterState?.type === \"keywordSearch\"\n ? filterState.operator\n : \"AND\";\n\n const handleChange = useCallback(\n (newSearchTerm: string | undefined) => {\n onFilterStateChanged({\n type: \"keywordSearch\",\n searchTerm: newSearchTerm ?? \"\",\n operator,\n });\n },\n [onFilterStateChanged, operator],\n );\n\n return (\n <ContainsTextInput\n value={searchTerm}\n onChange={handleChange}\n placeholder={placeholder}\n />\n );\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAChD,SAASC,iBAAiB,QAAQ,oCAAoC;AACtE,SAASC,WAAW,QAAQ,8BAA8B;AAG1D,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,mBAAmB,QAAQ,iCAAiC;AAWrE,SAASC,gBAAgBA,CAAiC;EACxDC,UAAU;EACVC,SAAS;EACTC,UAAU;EACVC,WAAW;EACXC,oBAAoB;EACpBC;AACmB,CAAC,EAAsB;EAC1C,oBACEb,KAAA,CAAAc,aAAA,CAACC,kBAAkB;IACjBP,UAAU,EAAEA,UAAW;IACvBC,SAAS,EAAEA,SAAU;IACrBC,UAAU,EAAEA,UAAW;IACvBC,WAAW,EAAEA,WAAY;IACzBC,oBAAoB,EAAEA,oBAAqB;IAC3CC,WAAW,EAAEA;EAAY,CAC1B,CAAC;AAEN;AAEA,OAAO,MAAMG,WAAW,gBAAGf,IAAI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D,CAACpB,oBAAoB,EAAEoB,QAAQ,CACjC,CAAC;EAED,oBACEhC,KAAA,CAAAc,aAAA,CAACX,iBAAiB;IAChB+B,KAAK,EAAEJ,UAAW;IAClBD,QAAQ,EAAEF,YAAa;IACvBP,WAAW,EAAEA;EAAY,CAC1B,CAAC;AAEN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import React, { useCallback, useMemo } from "react";
18
+ import { BaseFilterList } from "./base/BaseFilterList.js";
19
+ import { FilterInput } from "./FilterInput.js";
20
+ import { useFilterListState } from "./hooks/useFilterListState.js";
21
+ import { getFilterKey } from "./utils/getFilterKey.js";
22
+ import { getFilterLabel } from "./utils/getFilterLabel.js";
23
+ export function FilterList(props) {
24
+ const {
25
+ objectSet,
26
+ title,
27
+ titleIcon,
28
+ collapsed,
29
+ onCollapsedChange,
30
+ filterDefinitions,
31
+ showResetButton = false,
32
+ onReset,
33
+ showActiveFilterCount = false,
34
+ className,
35
+ enableSorting,
36
+ onFilterRemoved,
37
+ renderAddFilterButton
38
+ } = props;
39
+ const objectType = objectSet.$objectSetInternals.def;
40
+ const {
41
+ filterStates,
42
+ setFilterState,
43
+ perFilterWhereClauses,
44
+ activeFilterCount,
45
+ reset
46
+ } = useFilterListState(props);
47
+ const handleReset = useCallback(() => {
48
+ reset();
49
+ onReset?.();
50
+ }, [reset, onReset]);
51
+ const visibleFilterDefinitions = useMemo(() => {
52
+ if (!filterDefinitions) {
53
+ return undefined;
54
+ }
55
+ return filterDefinitions.filter(def => def.isVisible !== false);
56
+ }, [filterDefinitions]);
57
+ const renderInput = useCallback(({
58
+ definition,
59
+ filterKey,
60
+ filterState,
61
+ onFilterStateChanged
62
+ }) => /*#__PURE__*/React.createElement(FilterInput, {
63
+ objectType: objectType,
64
+ objectSet: objectSet,
65
+ definition: definition,
66
+ filterState: filterState,
67
+ onFilterStateChanged: onFilterStateChanged,
68
+ whereClause: perFilterWhereClauses.get(filterKey) ?? {}
69
+ }), [objectType, objectSet, perFilterWhereClauses]);
70
+ return /*#__PURE__*/React.createElement(BaseFilterList, {
71
+ title: title,
72
+ titleIcon: titleIcon,
73
+ collapsed: collapsed,
74
+ onCollapsedChange: onCollapsedChange,
75
+ filterDefinitions: visibleFilterDefinitions,
76
+ filterStates: filterStates,
77
+ onFilterStateChanged: setFilterState,
78
+ renderInput: renderInput,
79
+ getFilterKey: getFilterKey,
80
+ getFilterLabel: getFilterLabel,
81
+ activeFilterCount: activeFilterCount,
82
+ onReset: handleReset,
83
+ showResetButton: showResetButton,
84
+ showActiveFilterCount: showActiveFilterCount,
85
+ enableSorting: enableSorting,
86
+ onFilterRemoved: onFilterRemoved,
87
+ className: className,
88
+ renderAddFilterButton: renderAddFilterButton
89
+ });
90
+ }
91
+ //# sourceMappingURL=FilterList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterList.js","names":["React","useCallback","useMemo","BaseFilterList","FilterInput","useFilterListState","getFilterKey","getFilterLabel","FilterList","props","objectSet","title","titleIcon","collapsed","onCollapsedChange","filterDefinitions","showResetButton","onReset","showActiveFilterCount","className","enableSorting","onFilterRemoved","renderAddFilterButton","objectType","$objectSetInternals","def","filterStates","setFilterState","perFilterWhereClauses","activeFilterCount","reset","handleReset","visibleFilterDefinitions","undefined","filter","isVisible","renderInput","definition","filterKey","filterState","onFilterStateChanged","createElement","whereClause","get"],"sources":["FilterList.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 { ObjectTypeDefinition, WhereClause } from \"@osdk/api\";\nimport React, { useCallback, useMemo } from \"react\";\nimport { BaseFilterList } from \"./base/BaseFilterList.js\";\nimport type { RenderFilterInput } from \"./base/BaseFilterListApi.js\";\nimport { FilterInput } from \"./FilterInput.js\";\nimport type {\n FilterDefinitionUnion,\n FilterListProps,\n} from \"./FilterListApi.js\";\nimport { useFilterListState } from \"./hooks/useFilterListState.js\";\nimport { getFilterKey } from \"./utils/getFilterKey.js\";\nimport { getFilterLabel } from \"./utils/getFilterLabel.js\";\n\nexport function FilterList<Q extends ObjectTypeDefinition>(\n props: FilterListProps<Q>,\n): React.ReactElement {\n const {\n objectSet,\n title,\n titleIcon,\n collapsed,\n onCollapsedChange,\n filterDefinitions,\n showResetButton = false,\n onReset,\n showActiveFilterCount = false,\n className,\n enableSorting,\n onFilterRemoved,\n renderAddFilterButton,\n } = props;\n\n const objectType = objectSet.$objectSetInternals.def;\n\n const {\n filterStates,\n setFilterState,\n perFilterWhereClauses,\n activeFilterCount,\n reset,\n } = useFilterListState(props);\n\n const handleReset = useCallback(() => {\n reset();\n onReset?.();\n }, [reset, onReset]);\n\n const visibleFilterDefinitions = useMemo(() => {\n if (!filterDefinitions) {\n return undefined;\n }\n return filterDefinitions.filter(\n (def: FilterDefinitionUnion<Q>) => def.isVisible !== false,\n );\n }, [filterDefinitions]);\n\n const renderInput = useCallback<RenderFilterInput<FilterDefinitionUnion<Q>>>(\n ({ definition, filterKey, filterState, onFilterStateChanged }) => (\n <FilterInput\n objectType={objectType}\n objectSet={objectSet}\n definition={definition}\n filterState={filterState}\n onFilterStateChanged={onFilterStateChanged}\n whereClause={perFilterWhereClauses.get(filterKey)\n ?? ({} as WhereClause<Q>)}\n />\n ),\n [objectType, objectSet, perFilterWhereClauses],\n );\n\n return (\n <BaseFilterList\n title={title}\n titleIcon={titleIcon}\n collapsed={collapsed}\n onCollapsedChange={onCollapsedChange}\n filterDefinitions={visibleFilterDefinitions}\n filterStates={filterStates}\n onFilterStateChanged={setFilterState}\n renderInput={renderInput}\n getFilterKey={getFilterKey}\n getFilterLabel={getFilterLabel}\n activeFilterCount={activeFilterCount}\n onReset={handleReset}\n showResetButton={showResetButton}\n showActiveFilterCount={showActiveFilterCount}\n enableSorting={enableSorting}\n onFilterRemoved={onFilterRemoved}\n className={className}\n renderAddFilterButton={renderAddFilterButton}\n />\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,SAASC,WAAW,QAAQ,kBAAkB;AAK9C,SAASC,kBAAkB,QAAQ,+BAA+B;AAClE,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,cAAc,QAAQ,2BAA2B;AAE1D,OAAO,SAASC,UAAUA,CACxBC,KAAyB,EACL;EACpB,MAAM;IACJC,SAAS;IACTC,KAAK;IACLC,SAAS;IACTC,SAAS;IACTC,iBAAiB;IACjBC,iBAAiB;IACjBC,eAAe,GAAG,KAAK;IACvBC,OAAO;IACPC,qBAAqB,GAAG,KAAK;IAC7BC,SAAS;IACTC,aAAa;IACbC,eAAe;IACfC;EACF,CAAC,GAAGb,KAAK;EAET,MAAMc,UAAU,GAAGb,SAAS,CAACc,mBAAmB,CAACC,GAAG;EAEpD,MAAM;IACJC,YAAY;IACZC,cAAc;IACdC,qBA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AAc,EAAEA,cAAe;IAC/BsB,iBAAiB,EAAEA,iBAAkB;IACrCZ,OAAO,EAAEc,WAAY;IACrBf,eAAe,EAAEA,eAAgB;IACjCE,qBAAqB,EAAEA,qBAAsB;IAC7CE,aAAa,EAAEA,aAAc;IAC7BC,eAAe,EAAEA,eAAgB;IACjCF,SAAS,EAAEA,SAAU;IACrBG,qBAAqB,EAAEA;EAAsB,CAC9C,CAAC;AAEN","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FilterListApi.js","names":[],"sources":["FilterListApi.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 LinkNames,\n ObjectSet,\n ObjectTypeDefinition,\n WhereClause,\n} from \"@osdk/api\";\nimport type React from \"react\";\nimport type {\n FilterState as FilterStateType,\n PropertyFilterDefinition,\n} from \"./FilterListItemApi.js\";\nimport type { CustomFilterDefinition } from \"./types/CustomRendererTypes.js\";\nimport type { KeywordSearchFilterDefinition } from \"./types/KeywordSearchTypes.js\";\nimport type {\n HasLinkFilterDefinition,\n LinkedPropertyFilterDefinition,\n} from \"./types/LinkedFilterTypes.js\";\n\n/**\n * Union type of all filter definition types\n */\nexport type FilterDefinitionUnion<Q extends ObjectTypeDefinition> =\n | PropertyFilterDefinition<Q>\n | HasLinkFilterDefinition<Q>\n | LinkedPropertyFilterDefinition<Q, LinkNames<Q>>\n | KeywordSearchFilterDefinition<Q>\n | CustomFilterDefinition<Q>;\n\n/**\n * Extract the key from a filter definition union\n */\nexport type FilterKey<Q extends ObjectTypeDefinition> =\n FilterDefinitionUnion<Q> extends infer D ? D extends { key: infer K } ? K\n : D extends { linkName: infer L } ? L\n : never\n : never;\n\n/**\n * Extract the filter state from a filter definition union\n */\nexport type FilterState<Q extends ObjectTypeDefinition> =\n FilterDefinitionUnion<Q> extends infer D\n ? D extends { filterState: infer S } ? S\n : never\n : never;\n\n/**\n * Map from filter definition objects to their current state.\n * Uses object identity for keys, ensuring stable lookups across reorders.\n */\nexport type FilterStatesMap<Q extends ObjectTypeDefinition> = Map<\n FilterDefinitionUnion<Q>,\n FilterStateType\n>;\n\nexport interface FilterListProps<Q extends ObjectTypeDefinition> {\n /**\n * The set of objects to be filtered\n */\n objectSet: ObjectSet<Q>;\n\n /**\n * Optional title to display in the filter list header\n */\n title?: string;\n\n /**\n * Optional icon to display next to the title\n */\n titleIcon?: React.ReactNode;\n\n /**\n * The definition for all supported filter items in the list\n * If not supplied, all filterable properties will be available\n */\n filterDefinitions?: Array<FilterDefinitionUnion<Q>>;\n\n /**\n * The current where clause to filter the objectSet.\n * If provided, the filter clause is controlled.\n */\n filterClause?: WhereClause<Q>;\n\n /**\n * Called when the filter clause changes.\n * The filters are joined by the selected filterOperator.\n * Required in controlled mode.\n *\n * @param newClause The updated filter clause\n */\n onFilterClauseChanged?: (newClause: WhereClause<Q>) => void;\n\n /**\n * The logical operator to join multiple filters\n *\n * @default \"and\"\n */\n filterOperator?: \"and\" | \"or\";\n\n /**\n * Called when filter state changes\n *\n * @param definition The filter definition whose state changed\n * @param newState The updated filter state\n */\n onFilterStateChanged?: (\n definition: FilterDefinitionUnion<Q>,\n newState: FilterStateType,\n ) => void;\n\n /**\n * Called when a filter is added\n * If provided, user will be allowed to add filters\n *\n * @param filterKey The key of the added filter\n * @param newDefinitions The filter list with the new filter added\n */\n onFilterAdded?: (\n filterKey: FilterKey<Q>,\n newDefinitions: Array<FilterDefinitionUnion<Q>>,\n ) => void;\n\n /**\n * Called when a filter is removed\n * If provided, user will be allowed to remove filters\n *\n * @param filterKey The key of the removed filter\n */\n onFilterRemoved?: (filterKey: FilterKey<Q>) => void;\n\n /**\n * Enable drag-and-drop reordering of filters.\n * When true, drag handles are rendered and filters can be reordered.\n * Reorder state is managed internally; consumers who need to track order\n * should use controlled filterDefinitions.\n */\n enableSorting?: boolean;\n\n /**\n * Show reset filters button in header\n */\n showResetButton?: boolean;\n\n /**\n * Called when reset button is clicked\n */\n onReset?: () => void;\n\n /**\n * Show count of active filters in header\n */\n showActiveFilterCount?: boolean;\n\n /**\n * Additional CSS class name\n */\n className?: string;\n\n /**\n * Custom render function for the \"Add filter\" button.\n * When not provided, a default button is shown if onFilterAdded is set.\n */\n renderAddFilterButton?: () => React.ReactNode;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FilterListApi.js","names":[],"sources":["FilterListApi.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 LinkNames,\n ObjectSet,\n ObjectTypeDefinition,\n WhereClause,\n} from \"@osdk/api\";\nimport type React from \"react\";\nimport type {\n FilterState as FilterStateType,\n PropertyFilterDefinition,\n} from \"./FilterListItemApi.js\";\nimport type { CustomFilterDefinition } from \"./types/CustomRendererTypes.js\";\nimport type { KeywordSearchFilterDefinition } from \"./types/KeywordSearchTypes.js\";\nimport type {\n HasLinkFilterDefinition,\n LinkedPropertyFilterDefinition,\n} from \"./types/LinkedFilterTypes.js\";\n\n/**\n * Union type of all filter definition types\n */\nexport type FilterDefinitionUnion<Q extends ObjectTypeDefinition> =\n | PropertyFilterDefinition<Q>\n | HasLinkFilterDefinition<Q>\n | LinkedPropertyFilterDefinition<Q, LinkNames<Q>>\n | KeywordSearchFilterDefinition<Q>\n | CustomFilterDefinition<Q>;\n\n/**\n * Extract the key from a filter definition union\n */\nexport type FilterKey<Q extends ObjectTypeDefinition> =\n FilterDefinitionUnion<Q> extends infer D ? D extends { key: infer K } ? K\n : D extends { linkName: infer L } ? L\n : never\n : never;\n\n/**\n * Extract the filter state from a filter definition union\n */\nexport type FilterState<Q extends ObjectTypeDefinition> =\n FilterDefinitionUnion<Q> extends infer D\n ? D extends { filterState: infer S } ? S\n : never\n : never;\n\n/**\n * Map from filter definition objects to their current state.\n * Uses object identity for keys, ensuring stable lookups across reorders.\n */\nexport type FilterStatesMap<Q extends ObjectTypeDefinition> = Map<\n FilterDefinitionUnion<Q>,\n FilterStateType\n>;\n\nexport interface FilterListProps<Q extends ObjectTypeDefinition> {\n /**\n * The set of objects to be filtered\n */\n objectSet: ObjectSet<Q>;\n\n /**\n * Optional title to display in the filter list header\n */\n title?: string;\n\n /**\n * Optional icon to display next to the title\n */\n titleIcon?: React.ReactNode;\n\n /**\n * The definition for all supported filter items in the list\n * If not supplied, all filterable properties will be available\n */\n filterDefinitions?: Array<FilterDefinitionUnion<Q>>;\n\n /**\n * The current where clause to filter the objectSet.\n * If provided, the filter clause is controlled.\n */\n filterClause?: WhereClause<Q>;\n\n /**\n * Called when the filter clause changes.\n * The filters are joined by the selected filterOperator.\n * Required in controlled mode.\n *\n * @param newClause The updated filter clause\n */\n onFilterClauseChanged?: (newClause: WhereClause<Q>) => void;\n\n /**\n * The logical operator to join multiple filters\n *\n * @default \"and\"\n */\n filterOperator?: \"and\" | \"or\";\n\n /**\n * Called when filter state changes\n *\n * @param definition The filter definition whose state changed\n * @param newState The updated filter state\n */\n onFilterStateChanged?: (\n definition: FilterDefinitionUnion<Q>,\n newState: FilterStateType,\n ) => void;\n\n /**\n * Called when a filter is added\n * If provided, user will be allowed to add filters\n *\n * @param filterKey The key of the added filter\n * @param newDefinitions The filter list with the new filter added\n */\n onFilterAdded?: (\n filterKey: FilterKey<Q>,\n newDefinitions: Array<FilterDefinitionUnion<Q>>,\n ) => void;\n\n /**\n * Called when a filter is removed\n * If provided, user will be allowed to remove filters\n *\n * @param filterKey The key of the removed filter\n */\n onFilterRemoved?: (filterKey: FilterKey<Q>) => void;\n\n /**\n * Enable drag-and-drop reordering of filters.\n * When true, drag handles are rendered and filters can be reordered.\n * Reorder state is managed internally; consumers who need to track order\n * should use controlled filterDefinitions.\n */\n enableSorting?: boolean;\n\n /**\n * Whether the filter list panel is collapsed\n */\n collapsed?: boolean;\n\n /**\n * Called when the collapsed state changes\n */\n onCollapsedChange?: (collapsed: boolean) => void;\n\n /**\n * Initial filter states for hydrating from external storage.\n * These states are merged over definition defaults on mount.\n * Use onFilterStateChanged to persist state changes externally.\n */\n initialFilterStates?: Map<string, FilterStateType>;\n\n /**\n * Show reset filters button in header\n */\n showResetButton?: boolean;\n\n /**\n * Called when reset button is clicked\n */\n onReset?: () => void;\n\n /**\n * Show count of active filters in header\n */\n showActiveFilterCount?: boolean;\n\n /**\n * Additional CSS class name\n */\n className?: string;\n\n /**\n * Custom render function for the \"Add filter\" button.\n * When not provided, a default button is shown if onFilterAdded is set.\n */\n renderAddFilterButton?: () => React.ReactNode;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"FilterListItemApi.js","names":[],"sources":["FilterListItemApi.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 CompileTimeMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n PropertyKeys,\n WirePropertyTypes,\n} from \"@osdk/api\";\nimport type { CustomFilterState } from \"./types/CustomRendererTypes.js\";\nimport type { KeywordSearchFilterState } from \"./types/KeywordSearchTypes.js\";\nimport type {\n HasLinkFilterState,\n LinkedPropertyFilterState,\n} from \"./types/LinkedFilterTypes.js\";\n\n/**\n * Helper type to extract the property type from an ObjectTypeDefinition given a property key\n */\nexport type PropertyTypeFromKey<\n Q extends ObjectTypeDefinition,\n K extends PropertyKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][K][\"type\"];\n\n/**\n * All available filter component types\n */\nexport type FilterComponentType =\n | \"LISTOGRAM\"\n | \"DATE_RANGE\"\n | \"NUMBER_RANGE\"\n | \"TEXT_TAGS\"\n | \"CONTAINS_TEXT\"\n | \"SINGLE_SELECT\"\n | \"MULTI_SELECT\"\n | \"SINGLE_DATE\"\n | \"MULTI_DATE\"\n | \"TIMELINE\"\n | \"CHECKBOX_LIST\"\n | \"TOGGLE\";\n\n/**\n * Gets valid component types for a given property type\n */\nexport type ValidComponentsForPropertyType<P extends WirePropertyTypes> =\n P extends \"boolean\"\n ? \"LISTOGRAM\" | \"CHECKBOX_LIST\" | \"SINGLE_SELECT\" | \"TOGGLE\"\n : P extends \"string\" ?\n | \"LISTOGRAM\"\n | \"TEXT_TAGS\"\n | \"CONTAINS_TEXT\"\n | \"SINGLE_SELECT\"\n | \"MULTI_SELECT\"\n | \"CHECKBOX_LIST\"\n : P extends \"datetime\" | \"timestamp\"\n ? \"DATE_RANGE\" | \"SINGLE_DATE\" | \"MULTI_DATE\" | \"TIMELINE\"\n : P extends\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"short\"\n | \"byte\"\n | \"decimal\" ? \"NUMBER_RANGE\" | \"SINGLE_SELECT\" | \"MULTI_SELECT\"\n : never;\n\n/**\n * Union of all possible filter states\n */\nexport type FilterState =\n | ExactMatchFilterState<string | boolean>\n | DateRangeFilterState\n | ContainsTextFilterState\n | NumberRangeFilterState\n | SelectFilterState<string | boolean | number>\n | SelectFilterState<Date>\n | TimelineFilterState\n | ToggleFilterState\n | HasLinkFilterState\n | LinkedPropertyFilterState\n | KeywordSearchFilterState\n | CustomFilterState;\n\n/**\n * Maps component types to their corresponding state types\n */\nexport interface FilterStateByComponentType {\n LISTOGRAM: ExactMatchFilterState<string | boolean>;\n DATE_RANGE: DateRangeFilterState;\n TEXT_TAGS: ExactMatchFilterState<string>;\n CONTAINS_TEXT: ContainsTextFilterState;\n NUMBER_RANGE: NumberRangeFilterState;\n SINGLE_SELECT: SelectFilterState<string | boolean | number>;\n MULTI_SELECT: SelectFilterState<string | boolean | number>;\n SINGLE_DATE: SelectFilterState<Date>;\n MULTI_DATE: SelectFilterState<Date>;\n TIMELINE: TimelineFilterState;\n CHECKBOX_LIST: SelectFilterState<string>;\n TOGGLE: ToggleFilterState;\n}\n\n/**\n * All filter state discriminator types\n */\nexport type FilterStateType =\n | \"EXACT_MATCH\"\n | \"DATE_RANGE\"\n | \"NUMBER_RANGE\"\n | \"CONTAINS_TEXT\"\n | \"SELECT\"\n | \"TIMELINE\"\n | \"TOGGLE\"\n | \"hasLink\"\n | \"linkedProperty\"\n | \"keywordSearch\"\n | \"custom\";\n\n/**\n * Base interface for all filter states\n * Contains common properties shared across all filter types\n */\nexport interface BaseFilterState {\n /**\n * The type of filter component\n */\n type: FilterStateType;\n\n /**\n * If true, the objects satisfying the filter are excluded\n * @default false\n */\n isExcluding?: boolean;\n\n /**\n * If true, include objects that have no value\n * @default false\n */\n includeNull?: boolean;\n}\n\nexport interface ExactMatchFilterState<T = string | boolean>\n extends BaseFilterState\n{\n type: \"EXACT_MATCH\";\n values: T[];\n}\n\nexport interface DateRangeFilterState extends BaseFilterState {\n type: \"DATE_RANGE\";\n /**\n * The earliest date the user can select\n */\n minValue?: Date;\n /**\n * The latest date the user can select\n */\n maxValue?: Date;\n}\n\nexport interface ContainsTextFilterState extends BaseFilterState {\n type: \"CONTAINS_TEXT\";\n value?: string;\n}\n\nexport interface NumberRangeFilterState extends BaseFilterState {\n type: \"NUMBER_RANGE\";\n /**\n * Minimum numeric value (inclusive)\n */\n minValue?: number;\n /**\n * Maximum numeric value (inclusive)\n */\n maxValue?: number;\n}\n\n/**\n * Consolidated state type for select-based filters.\n * Used by SINGLE_SELECT, MULTI_SELECT, SINGLE_DATE, MULTI_DATE, and CHECKBOX_LIST.\n */\nexport interface SelectFilterState<T = string | boolean | number | Date>\n extends BaseFilterState\n{\n type: \"SELECT\";\n selectedValues: T[];\n}\n\nexport interface TimelineFilterState extends BaseFilterState {\n type: \"TIMELINE\";\n startDate?: Date;\n endDate?: Date;\n granularity?: \"day\" | \"week\" | \"month\" | \"quarter\" | \"year\";\n}\n\nexport interface ToggleFilterState extends BaseFilterState {\n type: \"TOGGLE\";\n enabled: boolean;\n}\n\n/**\n * A property filter definition specifies configuration for filtering on a single property\n *\n * The component type C must be compatible with the property type derived from the key.\n * For example, boolean properties can only use LISTOGRAM, CHECKBOX_LIST, or SINGLE_SELECT,\n * while string properties can use LISTOGRAM, TEXT_TAGS, CONTAINS_TEXT, SINGLE_SELECT, MULTI_SELECT, or CHECKBOX_LIST.\n */\nexport interface PropertyFilterDefinition<\n Q extends ObjectTypeDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n C extends ValidComponentsForPropertyType<\n PropertyTypeFromKey<Q, K>\n > = ValidComponentsForPropertyType<PropertyTypeFromKey<Q, K>>,\n> {\n /**\n * Discriminator for filter definition type\n */\n type: \"PROPERTY\";\n\n /**\n * Optional unique identifier for stable keying across filter reorders.\n */\n id?: string;\n\n /**\n * The property key to filter on\n */\n key: K;\n\n /**\n * Display label for the filter\n */\n label?: string;\n\n /**\n * The filter component type to render\n * Must be compatible with the property type derived from the key, see ValidComponentsForPropertyType\n */\n filterComponent: C;\n\n /**\n * The current state of the filter.\n * If provided, the filter is controlled.\n */\n filterState: FilterStateByComponentType[C];\n\n /**\n * Controls whether this filter is rendered.\n * When false, the filter is hidden but its state is preserved.\n * @default true\n */\n isVisible?: boolean;\n}\n\n/**\n * Props for a single filter list item component.\n * Extends PropertyFilterDefinition with runtime props for rendering.\n */\nexport interface FilterListItemProps<\n Q extends ObjectTypeDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n C extends ValidComponentsForPropertyType<\n PropertyTypeFromKey<Q, K>\n > = ValidComponentsForPropertyType<PropertyTypeFromKey<Q, K>>,\n> extends PropertyFilterDefinition<Q, K, C> {\n objectSet: ObjectSet<Q>;\n\n /**\n * Called when the state of the filter changes.\n * Required in controlled mode.\n */\n onFilterStateChanged: (state: FilterStateByComponentType[C]) => void;\n\n onFilterRemoved?: (key: PropertyKeys<Q>) => void;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"FilterListItemApi.js","names":[],"sources":["FilterListItemApi.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 CompileTimeMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n PropertyKeys,\n WirePropertyTypes,\n} from \"@osdk/api\";\nimport type { CustomFilterState } from \"./types/CustomRendererTypes.js\";\nimport type { KeywordSearchFilterState } from \"./types/KeywordSearchTypes.js\";\nimport type {\n HasLinkFilterState,\n LinkedPropertyFilterState,\n} from \"./types/LinkedFilterTypes.js\";\n\n/**\n * Helper type to extract the property type from an ObjectTypeDefinition given a property key\n */\nexport type PropertyTypeFromKey<\n Q extends ObjectTypeDefinition,\n K extends PropertyKeys<Q>,\n> = CompileTimeMetadata<Q>[\"properties\"][K][\"type\"];\n\n/**\n * All available filter component types\n */\nexport type FilterComponentType =\n | \"LISTOGRAM\"\n | \"DATE_RANGE\"\n | \"NUMBER_RANGE\"\n | \"TEXT_TAGS\"\n | \"CONTAINS_TEXT\"\n | \"SINGLE_SELECT\"\n | \"MULTI_SELECT\"\n | \"SINGLE_DATE\"\n | \"MULTI_DATE\"\n | \"TIMELINE\"\n | \"CHECKBOX_LIST\"\n | \"TOGGLE\";\n\n/**\n * Gets valid component types for a given property type\n */\nexport type ValidComponentsForPropertyType<P extends WirePropertyTypes> =\n P extends \"boolean\"\n ? \"LISTOGRAM\" | \"CHECKBOX_LIST\" | \"SINGLE_SELECT\" | \"TOGGLE\"\n : P extends \"string\" ?\n | \"LISTOGRAM\"\n | \"TEXT_TAGS\"\n | \"CONTAINS_TEXT\"\n | \"SINGLE_SELECT\"\n | \"MULTI_SELECT\"\n | \"CHECKBOX_LIST\"\n : P extends \"datetime\" | \"timestamp\"\n ? \"DATE_RANGE\" | \"SINGLE_DATE\" | \"MULTI_DATE\" | \"TIMELINE\"\n : P extends\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"short\"\n | \"byte\"\n | \"decimal\" ? \"NUMBER_RANGE\" | \"SINGLE_SELECT\" | \"MULTI_SELECT\"\n : never;\n\n/**\n * Union of all possible filter states\n */\nexport type FilterState =\n | ExactMatchFilterState<string | boolean>\n | DateRangeFilterState\n | ContainsTextFilterState\n | NumberRangeFilterState\n | SelectFilterState<string | boolean | number>\n | SelectFilterState<Date>\n | TimelineFilterState\n | ToggleFilterState\n | HasLinkFilterState\n | LinkedPropertyFilterState\n | KeywordSearchFilterState\n | CustomFilterState;\n\n/**\n * Maps component types to their corresponding state types\n */\nexport interface FilterStateByComponentType {\n LISTOGRAM: ExactMatchFilterState<string | boolean>;\n DATE_RANGE: DateRangeFilterState;\n TEXT_TAGS: ExactMatchFilterState<string>;\n CONTAINS_TEXT: ContainsTextFilterState;\n NUMBER_RANGE: NumberRangeFilterState;\n SINGLE_SELECT: SelectFilterState<string | boolean | number>;\n MULTI_SELECT: SelectFilterState<string | boolean | number>;\n SINGLE_DATE: SelectFilterState<Date>;\n MULTI_DATE: SelectFilterState<Date>;\n TIMELINE: TimelineFilterState;\n CHECKBOX_LIST: SelectFilterState<string>;\n TOGGLE: ToggleFilterState;\n}\n\n/**\n * All filter state discriminator types\n */\nexport type FilterStateType =\n | \"EXACT_MATCH\"\n | \"DATE_RANGE\"\n | \"NUMBER_RANGE\"\n | \"CONTAINS_TEXT\"\n | \"SELECT\"\n | \"TIMELINE\"\n | \"TOGGLE\"\n | \"hasLink\"\n | \"linkedProperty\"\n | \"keywordSearch\"\n | \"custom\";\n\n/**\n * Base interface for all filter states\n * Contains common properties shared across all filter types\n */\nexport interface BaseFilterState {\n /**\n * The type of filter component\n */\n type: FilterStateType;\n\n /**\n * If true, the objects satisfying the filter are excluded\n * @default false\n */\n isExcluding?: boolean;\n\n /**\n * If true, include objects that have no value\n * @default false\n */\n includeNull?: boolean;\n}\n\nexport interface ExactMatchFilterState<T = string | boolean>\n extends BaseFilterState\n{\n type: \"EXACT_MATCH\";\n values: T[];\n}\n\nexport interface DateRangeFilterState extends BaseFilterState {\n type: \"DATE_RANGE\";\n /**\n * The earliest date the user can select\n */\n minValue?: Date;\n /**\n * The latest date the user can select\n */\n maxValue?: Date;\n}\n\nexport interface ContainsTextFilterState extends BaseFilterState {\n type: \"CONTAINS_TEXT\";\n value?: string;\n}\n\nexport interface NumberRangeFilterState extends BaseFilterState {\n type: \"NUMBER_RANGE\";\n /**\n * Minimum numeric value (inclusive)\n */\n minValue?: number;\n /**\n * Maximum numeric value (inclusive)\n */\n maxValue?: number;\n}\n\n/**\n * Consolidated state type for select-based filters.\n * Used by SINGLE_SELECT, MULTI_SELECT, SINGLE_DATE, MULTI_DATE, and CHECKBOX_LIST.\n */\nexport interface SelectFilterState<T = string | boolean | number | Date>\n extends BaseFilterState\n{\n type: \"SELECT\";\n selectedValues: T[];\n}\n\nexport interface TimelineFilterState extends BaseFilterState {\n type: \"TIMELINE\";\n startDate?: Date;\n endDate?: Date;\n granularity?: \"day\" | \"week\" | \"month\" | \"quarter\" | \"year\";\n}\n\nexport interface ToggleFilterState extends BaseFilterState {\n type: \"TOGGLE\";\n enabled: boolean;\n}\n\n/**\n * A property filter definition specifies configuration for filtering on a single property\n *\n * The component type C must be compatible with the property type derived from the key.\n * For example, boolean properties can only use LISTOGRAM, CHECKBOX_LIST, or SINGLE_SELECT,\n * while string properties can use LISTOGRAM, TEXT_TAGS, CONTAINS_TEXT, SINGLE_SELECT, MULTI_SELECT, or CHECKBOX_LIST.\n */\nexport interface PropertyFilterDefinition<\n Q extends ObjectTypeDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n C extends ValidComponentsForPropertyType<\n PropertyTypeFromKey<Q, K>\n > = ValidComponentsForPropertyType<PropertyTypeFromKey<Q, K>>,\n> {\n /**\n * Discriminator for filter definition type\n */\n type: \"PROPERTY\";\n\n /**\n * Optional unique identifier for stable keying across filter reorders.\n */\n id?: string;\n\n /**\n * The property key to filter on\n */\n key: K;\n\n /**\n * Display label for the filter\n */\n label?: string;\n\n /**\n * The filter component type to render\n * Must be compatible with the property type derived from the key, see ValidComponentsForPropertyType\n */\n filterComponent: C;\n\n /**\n * The current state of the filter.\n * If provided, the filter is controlled.\n */\n filterState: FilterStateByComponentType[C];\n\n /**\n * Maps filter values to colors for visual differentiation.\n * Used by CHECKBOX_LIST (color dots) and LISTOGRAM (per-row bar colors).\n */\n colorMap?: Record<string, string>;\n\n /**\n * Configuration for LISTOGRAM display mode.\n * Only applies when filterComponent is \"LISTOGRAM\".\n */\n listogramConfig?: {\n displayMode?: \"full\" | \"count\" | \"minimal\";\n maxVisibleItems?: number;\n };\n\n /**\n * Controls whether this filter is rendered.\n * When false, the filter is hidden but its state is preserved.\n * @default true\n */\n isVisible?: boolean;\n}\n\n/**\n * Props for a single filter list item component.\n * Extends PropertyFilterDefinition with runtime props for rendering.\n */\nexport interface FilterListItemProps<\n Q extends ObjectTypeDefinition,\n K extends PropertyKeys<Q> = PropertyKeys<Q>,\n C extends ValidComponentsForPropertyType<\n PropertyTypeFromKey<Q, K>\n > = ValidComponentsForPropertyType<PropertyTypeFromKey<Q, K>>,\n> extends PropertyFilterDefinition<Q, K, C> {\n objectSet: ObjectSet<Q>;\n\n /**\n * Called when the state of the filter changes.\n * Required in controlled mode.\n */\n onFilterStateChanged: (state: FilterStateByComponentType[C]) => void;\n\n onFilterRemoved?: (key: PropertyKeys<Q>) => void;\n}\n"],"mappings":"","ignoreList":[]}
@@ -16,64 +16,63 @@
16
16
 
17
17
  import { Button } from "@base-ui/react/button";
18
18
  import classnames from "classnames";
19
- import React, { useCallback, useMemo } from "react";
20
- import { useFilterListState } from "../hooks/useFilterListState.js";
19
+ import React from "react";
21
20
  import styles from "./FilterList.module.css.js";
22
21
  import { FilterListContent } from "./FilterListContent.js";
23
22
  import { FilterListHeader } from "./FilterListHeader.js";
24
- export function FilterList(props) {
23
+ export function BaseFilterList(props) {
25
24
  const {
26
- objectSet,
27
25
  title,
28
26
  titleIcon,
27
+ collapsed = false,
28
+ onCollapsedChange,
29
29
  filterDefinitions,
30
- showResetButton = false,
30
+ filterStates,
31
+ onFilterStateChanged,
32
+ renderInput,
33
+ getFilterKey,
34
+ getFilterLabel,
35
+ activeFilterCount,
31
36
  onReset,
32
37
  onFilterAdded,
38
+ onFilterRemoved,
39
+ showResetButton = false,
33
40
  showActiveFilterCount = false,
34
41
  enableSorting,
35
42
  className,
36
43
  renderAddFilterButton
37
44
  } = props;
38
- const objectType = objectSet.$objectSetInternals.def;
39
- const {
40
- filterStates,
41
- setFilterState,
42
- whereClause,
43
- activeFilterCount,
44
- reset
45
- } = useFilterListState(props);
46
- const handleReset = useCallback(() => {
47
- reset();
48
- onReset?.();
49
- }, [reset, onReset]);
50
- const visibleFilterDefinitions = useMemo(() => {
51
- if (!filterDefinitions) return undefined;
52
- return filterDefinitions.filter(def => def.isVisible !== false);
53
- }, [filterDefinitions]);
54
45
  return /*#__PURE__*/React.createElement("div", {
55
46
  className: classnames(styles.filterList, className),
56
47
  "data-active-count": activeFilterCount
57
- }, (title || titleIcon || showResetButton || showActiveFilterCount) && /*#__PURE__*/React.createElement(FilterListHeader, {
48
+ }, (title || titleIcon || showResetButton || showActiveFilterCount || onCollapsedChange) && /*#__PURE__*/React.createElement(FilterListHeader, {
58
49
  title: title,
59
50
  titleIcon: titleIcon,
51
+ collapsed: collapsed,
52
+ onCollapsedChange: onCollapsedChange,
60
53
  showResetButton: showResetButton,
61
- onReset: handleReset,
54
+ onReset: onReset,
62
55
  showActiveFilterCount: showActiveFilterCount,
63
56
  activeFilterCount: activeFilterCount
64
- }), /*#__PURE__*/React.createElement(FilterListContent, {
65
- objectType: objectType,
66
- objectSet: objectSet,
67
- filterDefinitions: visibleFilterDefinitions,
57
+ }), /*#__PURE__*/React.createElement("div", {
58
+ className: styles.contentWrapper,
59
+ "data-collapsed": collapsed
60
+ }, /*#__PURE__*/React.createElement("div", {
61
+ className: styles.contentInner
62
+ }, /*#__PURE__*/React.createElement(FilterListContent, {
63
+ filterDefinitions: filterDefinitions,
68
64
  filterStates: filterStates,
69
- onFilterStateChanged: setFilterState,
70
- whereClause: whereClause,
65
+ onFilterStateChanged: onFilterStateChanged,
66
+ onFilterRemoved: onFilterRemoved,
67
+ renderInput: renderInput,
68
+ getFilterKey: getFilterKey,
69
+ getFilterLabel: getFilterLabel,
71
70
  enableSorting: enableSorting
72
- }), (renderAddFilterButton != null || onFilterAdded != null) && /*#__PURE__*/React.createElement("div", {
71
+ }))), !collapsed && (renderAddFilterButton != null || onFilterAdded != null) && /*#__PURE__*/React.createElement("div", {
73
72
  className: styles.addButtonContainer
74
73
  }, renderAddFilterButton ? renderAddFilterButton() : /*#__PURE__*/React.createElement(Button, {
75
74
  type: "button",
76
75
  className: styles.addButton
77
76
  }, "+ Add filter")));
78
77
  }
79
- //# sourceMappingURL=FilterList.js.map
78
+ //# sourceMappingURL=BaseFilterList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseFilterList.js","names":["Button","classnames","React","styles","FilterListContent","FilterListHeader","BaseFilterList","props","title","titleIcon","collapsed","onCollapsedChange","filterDefinitions","filterStates","onFilterStateChanged","renderInput","getFilterKey","getFilterLabel","activeFilterCount","onReset","onFilterAdded","onFilterRemoved","showResetButton","showActiveFilterCount","enableSorting","className","renderAddFilterButton","createElement","filterList","contentWrapper","contentInner","addButtonContainer","type","addButton"],"sources":["BaseFilterList.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 { Button } from \"@base-ui/react/button\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport type { BaseFilterListProps } from \"./BaseFilterListApi.js\";\nimport styles from \"./FilterList.module.css\";\nimport { FilterListContent } from \"./FilterListContent.js\";\nimport { FilterListHeader } from \"./FilterListHeader.js\";\n\nexport function BaseFilterList<D>(\n props: BaseFilterListProps<D>,\n): React.ReactElement {\n const {\n title,\n titleIcon,\n collapsed = false,\n onCollapsedChange,\n filterDefinitions,\n filterStates,\n onFilterStateChanged,\n renderInput,\n getFilterKey,\n getFilterLabel,\n activeFilterCount,\n onReset,\n onFilterAdded,\n onFilterRemoved,\n showResetButton = false,\n showActiveFilterCount = false,\n enableSorting,\n className,\n renderAddFilterButton,\n } = props;\n\n const showHeader = title || titleIcon || showResetButton\n || showActiveFilterCount || onCollapsedChange;\n\n const showAddButton = renderAddFilterButton != null || onFilterAdded != null;\n\n return (\n <div\n className={classnames(styles.filterList, className)}\n data-active-count={activeFilterCount}\n >\n {showHeader && (\n <FilterListHeader\n title={title}\n titleIcon={titleIcon}\n collapsed={collapsed}\n onCollapsedChange={onCollapsedChange}\n showResetButton={showResetButton}\n onReset={onReset}\n showActiveFilterCount={showActiveFilterCount}\n activeFilterCount={activeFilterCount}\n />\n )}\n\n <div\n className={styles.contentWrapper}\n data-collapsed={collapsed}\n >\n <div className={styles.contentInner}>\n <FilterListContent\n filterDefinitions={filterDefinitions}\n filterStates={filterStates}\n onFilterStateChanged={onFilterStateChanged}\n onFilterRemoved={onFilterRemoved}\n renderInput={renderInput}\n getFilterKey={getFilterKey}\n getFilterLabel={getFilterLabel}\n enableSorting={enableSorting}\n />\n </div>\n </div>\n\n {!collapsed && showAddButton && (\n <div className={styles.addButtonContainer}>\n {renderAddFilterButton\n ? renderAddFilterButton()\n : (\n <Button type=\"button\" className={styles.addButton}>\n + Add filter\n </Button>\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,OAAO,SAASC,cAAcA,CAC5BC,KAA6B,EACT;EACpB,MAAM;IACJC,KAAK;IACLC,SAAS;IACTC,SAAS,GAAG,KAAK;IACjBC,iBAAiB;IACjBC,iBAAiB;IACjBC,YAAY;IACZC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,cAAc;IACdC,iBAAiB;IACjBC,OAAO;IACPC,aAAa;IACbC,eAAe;IACfC,eAAe,GAAG,KAAK;IACvBC,qBAAqB,GAAG,KAAK;IAC7BC,aAAa;IACbC,SAAS;IAC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IAAI,EAAC,QAAQ;IAACP,SAAS,EAAEtB,MAAM,CAAC8B;EAAU,GAAC,cAE3C,CAET,CAEJ,CAAC;AAEV","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BaseFilterListApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseFilterListApi.js","names":[],"sources":["BaseFilterListApi.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 React from \"react\";\nimport type { FilterState } from \"../FilterListItemApi.js\";\n\nexport type RenderFilterInput<D> = (props: {\n definition: D;\n filterKey: string;\n filterState: FilterState | undefined;\n onFilterStateChanged: (state: FilterState) => void;\n}) => React.ReactNode;\n\nexport interface BaseFilterListProps<D> {\n filterDefinitions?: Array<D>;\n filterStates: Map<string, FilterState>;\n onFilterStateChanged: (filterKey: string, state: FilterState) => void;\n renderInput: RenderFilterInput<D>;\n getFilterKey: (definition: D) => string;\n getFilterLabel: (definition: D) => string;\n activeFilterCount: number;\n onReset?: () => void;\n onFilterAdded?: () => void;\n onFilterRemoved?: (filterKey: string) => void;\n\n collapsed?: boolean;\n onCollapsedChange?: (collapsed: boolean) => void;\n title?: string;\n titleIcon?: React.ReactNode;\n showResetButton?: boolean;\n showActiveFilterCount?: boolean;\n enableSorting?: boolean;\n className?: string;\n renderAddFilterButton?: () => React.ReactNode;\n}\n"],"mappings":"","ignoreList":[]}