@elliemae/ds-datagrids 2.2.0-alpha.3 → 3.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (577) hide show
  1. package/cjs/DSDataGrid.js +635 -395
  2. package/cjs/DataGridImpl.js +128 -103
  3. package/cjs/PaginatedDataGrid.js +68 -68
  4. package/cjs/blockNames.js +11 -39
  5. package/cjs/columns/IconColumn.js +62 -78
  6. package/cjs/columns/NumberColumn.js +5 -35
  7. package/cjs/components/BodyCell.js +80 -83
  8. package/cjs/components/BodyList.js +52 -52
  9. package/cjs/components/ColumnVisibilityMenuOption.js +31 -53
  10. package/cjs/components/ColumnsOptionsMenuSection.js +44 -59
  11. package/cjs/components/EmptyState.js +50 -81
  12. package/cjs/components/HeaderCell.js +58 -64
  13. package/cjs/components/List.js +29 -41
  14. package/cjs/components/ListItem.js +36 -43
  15. package/cjs/components/NoResults.js +51 -55
  16. package/cjs/components/RowsLoader.js +22 -42
  17. package/cjs/components/Table.js +87 -78
  18. package/cjs/components/TableBody.js +60 -61
  19. package/cjs/components/TableHeader.js +30 -47
  20. package/cjs/components/footer/addOptionalFooterComponents.js +43 -53
  21. package/cjs/components/header/PrimaryControls.js +35 -49
  22. package/cjs/components/header/addOptionalHeaderComponents.js +43 -54
  23. package/cjs/components/index.js +17 -43
  24. package/cjs/components/renderers/defaultClassedRenderers.js +57 -64
  25. package/cjs/components/renderers/index.js +17 -44
  26. package/cjs/components/renderers/renderRowsLoader.js +18 -39
  27. package/cjs/components/tableContext.js +13 -36
  28. package/cjs/defaultPlugins.js +12 -44
  29. package/cjs/index.js +67 -72
  30. package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +114 -102
  31. package/cjs/plugins/body-header-scroll-sync/index.js +9 -35
  32. package/cjs/plugins/column-dnd/DndColumnsPlugin.js +86 -107
  33. package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +27 -43
  34. package/cjs/plugins/column-dnd/index.js +9 -35
  35. package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +55 -59
  36. package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +53 -48
  37. package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +13 -40
  38. package/cjs/plugins/column-sizing/ext-points/getTableProps.js +54 -55
  39. package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +9 -37
  40. package/cjs/plugins/column-sizing/index.js +9 -35
  41. package/cjs/plugins/column-sizing/useColumnSizeService.js +86 -72
  42. package/cjs/plugins/column-sizing/useStylesheetHelpers.js +199 -96
  43. package/cjs/plugins/column-sizing/utils.js +29 -52
  44. package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +16 -38
  45. package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +56 -61
  46. package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +60 -58
  47. package/cjs/plugins/custom-cell-renderer/index.js +9 -35
  48. package/cjs/plugins/editable/EditableComponents/ComboBox.js +53 -50
  49. package/cjs/plugins/editable/EditableComponents/TextBox.js +76 -56
  50. package/cjs/plugins/editable/EditableComponents/index.js +11 -37
  51. package/cjs/plugins/editable/EditablePlugin.js +75 -60
  52. package/cjs/plugins/editable/decorateEditable.js +98 -61
  53. package/cjs/plugins/editable/getEditorComponent.js +76 -70
  54. package/cjs/plugins/editable/index.js +13 -38
  55. package/cjs/plugins/expandable-grid/ExpandableColumn.js +144 -112
  56. package/cjs/plugins/expandable-grid/ExpandablePlugin.js +180 -118
  57. package/cjs/plugins/expandable-grid/ExpandedRow.js +139 -117
  58. package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +52 -54
  59. package/cjs/plugins/expandable-grid/index.js +11 -37
  60. package/cjs/plugins/expandable-grid/useExpandGridState.js +31 -45
  61. package/cjs/plugins/export-data/ExportDataPlugin.js +116 -82
  62. package/cjs/plugins/export-data/index.js +12 -35
  63. package/cjs/plugins/filterable/FilterablePlugin.js +55 -54
  64. package/cjs/plugins/filterable/addFilterToColumn.js +28 -40
  65. package/cjs/plugins/filterable/components/FilterableHeader.js +107 -119
  66. package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +116 -116
  67. package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +73 -97
  68. package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +132 -138
  69. package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +119 -115
  70. package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +7 -35
  71. package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +15 -46
  72. package/cjs/plugins/filterable/filterableFormatter.js +51 -61
  73. package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +55 -60
  74. package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +22 -43
  75. package/cjs/plugins/filterable/helper.js +79 -68
  76. package/cjs/plugins/filterable/index.js +9 -35
  77. package/cjs/plugins/filterable/useFilterableState.js +66 -62
  78. package/cjs/plugins/grouping-by/GroupingByPlugin.js +23 -40
  79. package/cjs/plugins/grouping-grid/GroupingPlugin.js +109 -86
  80. package/cjs/plugins/grouping-grid/walkStrategy.js +26 -46
  81. package/cjs/plugins/index.js +48 -68
  82. package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +88 -64
  83. package/cjs/plugins/infinite-scrolling/index.js +9 -35
  84. package/cjs/plugins/pagination/PaginationPlugin.js +90 -73
  85. package/cjs/plugins/pagination/components/Pagination.js +35 -54
  86. package/cjs/plugins/pagination/components/Paginator.js +44 -59
  87. package/cjs/plugins/pagination/components/PerPageDropdown.js +63 -51
  88. package/cjs/plugins/pagination/helper.js +24 -45
  89. package/cjs/plugins/pagination/index.js +9 -35
  90. package/cjs/plugins/pagination/usePaginationState.js +38 -46
  91. package/cjs/plugins/resizable/ResizablePlugin.js +55 -51
  92. package/cjs/plugins/resizable/decorateResizable.js +53 -49
  93. package/cjs/plugins/resizable/index.js +9 -35
  94. package/cjs/plugins/resizable/useResizeHandle.js +50 -56
  95. package/cjs/plugins/resizable/utils.js +28 -49
  96. package/cjs/plugins/row-dnd/DndRowsPlugin.js +82 -103
  97. package/cjs/plugins/row-dnd/index.js +9 -35
  98. package/cjs/plugins/selectable/SelectablePlugin.js +134 -101
  99. package/cjs/plugins/selectable/addSelectableColumn.js +68 -67
  100. package/cjs/plugins/selectable/helper.js +39 -50
  101. package/cjs/plugins/selectable/index.js +9 -35
  102. package/cjs/plugins/selectable/selectableFormatter.js +105 -83
  103. package/cjs/plugins/selectable/useSelectableState.js +94 -67
  104. package/cjs/plugins/sortable/SortablePlugin.js +76 -62
  105. package/cjs/plugins/sortable/checkIfSortable.js +14 -37
  106. package/cjs/plugins/sortable/index.js +9 -35
  107. package/cjs/plugins/sortable/sortHeaderFormatter.js +50 -56
  108. package/cjs/plugins/sortable/sortTree.js +47 -40
  109. package/cjs/plugins/sortable/sorter.js +172 -140
  110. package/cjs/plugins/sortable/useSortableState.js +79 -53
  111. package/cjs/plugins/toolbar/RowRenderer.js +76 -75
  112. package/cjs/plugins/toolbar/ToolbarPlugin.js +33 -49
  113. package/cjs/plugins/toolbar/ToolbarTrigger.js +70 -89
  114. package/cjs/plugins/toolbar/index.js +9 -35
  115. package/cjs/plugins/virtualization/AutoHeightList.js +52 -64
  116. package/cjs/plugins/virtualization/VirtualizationPlugin.js +97 -86
  117. package/cjs/plugins/virtualization/VirtualizedBody.js +155 -139
  118. package/cjs/plugins/virtualization/VirtualizedBodyRow.js +17 -39
  119. package/cjs/plugins/virtualization/helper.js +7 -35
  120. package/cjs/plugins/virtualization/index.js +9 -35
  121. package/cjs/renders/CellWithAddons.js +50 -98
  122. package/cjs/renders/index.js +11 -37
  123. package/cjs/renders/styled.js +27 -78
  124. package/cjs/rowSizes.js +12 -44
  125. package/cjs/utilities/getPluginsFromProps.js +39 -67
  126. package/cjs/utilities/getScrollbarSize.js +25 -44
  127. package/cjs/utilities/normalizeData.js +34 -44
  128. package/esm/DSDataGrid.js +597 -337
  129. package/esm/DataGridImpl.js +113 -68
  130. package/esm/PaginatedDataGrid.js +59 -39
  131. package/esm/blockNames.js +5 -10
  132. package/esm/columns/IconColumn.js +54 -49
  133. package/esm/columns/NumberColumn.js +3 -6
  134. package/esm/components/BodyCell.js +68 -51
  135. package/esm/components/BodyList.js +43 -23
  136. package/esm/components/ColumnVisibilityMenuOption.js +27 -24
  137. package/esm/components/ColumnsOptionsMenuSection.js +38 -30
  138. package/esm/components/EmptyState.js +40 -52
  139. package/esm/components/HeaderCell.js +48 -33
  140. package/esm/components/List.js +23 -12
  141. package/esm/components/ListItem.js +30 -14
  142. package/esm/components/NoResults.js +43 -26
  143. package/esm/components/RowsLoader.js +15 -13
  144. package/esm/components/Table.js +76 -45
  145. package/esm/components/TableBody.js +52 -32
  146. package/esm/components/TableHeader.js +23 -17
  147. package/esm/components/footer/addOptionalFooterComponents.js +37 -24
  148. package/esm/components/header/PrimaryControls.js +29 -20
  149. package/esm/components/header/addOptionalHeaderComponents.js +36 -25
  150. package/esm/components/index.js +5 -14
  151. package/esm/components/renderers/defaultClassedRenderers.js +46 -41
  152. package/esm/components/renderers/index.js +5 -16
  153. package/esm/components/renderers/renderRowsLoader.js +10 -10
  154. package/esm/components/tableContext.js +5 -7
  155. package/esm/defaultPlugins.js +8 -15
  156. package/esm/index.js +27 -63
  157. package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +101 -71
  158. package/esm/plugins/body-header-scroll-sync/index.js +1 -6
  159. package/esm/plugins/column-dnd/DndColumnsPlugin.js +68 -69
  160. package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +18 -16
  161. package/esm/plugins/column-dnd/index.js +1 -6
  162. package/esm/plugins/column-sizing/ColumnSizingPlugin.js +37 -20
  163. package/esm/plugins/column-sizing/columnMeasurerTransformer.js +42 -16
  164. package/esm/plugins/column-sizing/ext-points/decorateColumn.js +7 -9
  165. package/esm/plugins/column-sizing/ext-points/getTableProps.js +43 -23
  166. package/esm/plugins/column-sizing/getColumnNameFromProperty.js +7 -8
  167. package/esm/plugins/column-sizing/index.js +1 -6
  168. package/esm/plugins/column-sizing/useColumnSizeService.js +71 -34
  169. package/esm/plugins/column-sizing/useStylesheetHelpers.js +171 -64
  170. package/esm/plugins/column-sizing/utils.js +21 -23
  171. package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +7 -8
  172. package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +43 -28
  173. package/esm/plugins/custom-cell-renderer/getRendererComponent.js +44 -22
  174. package/esm/plugins/custom-cell-renderer/index.js +1 -6
  175. package/esm/plugins/editable/EditableComponents/ComboBox.js +46 -20
  176. package/esm/plugins/editable/EditableComponents/TextBox.js +68 -26
  177. package/esm/plugins/editable/EditableComponents/index.js +2 -8
  178. package/esm/plugins/editable/EditablePlugin.js +63 -27
  179. package/esm/plugins/editable/decorateEditable.js +68 -32
  180. package/esm/plugins/editable/getEditorComponent.js +66 -39
  181. package/esm/plugins/editable/index.js +3 -9
  182. package/esm/plugins/expandable-grid/ExpandableColumn.js +133 -82
  183. package/esm/plugins/expandable-grid/ExpandablePlugin.js +160 -81
  184. package/esm/plugins/expandable-grid/ExpandedRow.js +124 -86
  185. package/esm/plugins/expandable-grid/ExpandedRowExtra.js +44 -25
  186. package/esm/plugins/expandable-grid/index.js +2 -8
  187. package/esm/plugins/expandable-grid/useExpandGridState.js +25 -14
  188. package/esm/plugins/export-data/ExportDataPlugin.js +103 -52
  189. package/esm/plugins/export-data/index.js +1 -6
  190. package/esm/plugins/filterable/FilterablePlugin.js +44 -22
  191. package/esm/plugins/filterable/addFilterToColumn.js +20 -11
  192. package/esm/plugins/filterable/components/FilterableHeader.js +95 -85
  193. package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +103 -83
  194. package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +63 -68
  195. package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +116 -108
  196. package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +106 -84
  197. package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +3 -6
  198. package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +12 -16
  199. package/esm/plugins/filterable/filterableFormatter.js +45 -32
  200. package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +44 -29
  201. package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +13 -11
  202. package/esm/plugins/filterable/helper.js +62 -42
  203. package/esm/plugins/filterable/index.js +1 -6
  204. package/esm/plugins/filterable/useFilterableState.js +54 -33
  205. package/esm/plugins/grouping-by/GroupingByPlugin.js +14 -10
  206. package/esm/plugins/grouping-grid/GroupingPlugin.js +94 -53
  207. package/esm/plugins/grouping-grid/walkStrategy.js +22 -17
  208. package/esm/plugins/index.js +19 -39
  209. package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +74 -31
  210. package/esm/plugins/infinite-scrolling/index.js +1 -6
  211. package/esm/plugins/pagination/PaginationPlugin.js +75 -42
  212. package/esm/plugins/pagination/components/Pagination.js +27 -25
  213. package/esm/plugins/pagination/components/Paginator.js +35 -29
  214. package/esm/plugins/pagination/components/PerPageDropdown.js +54 -22
  215. package/esm/plugins/pagination/helper.js +19 -16
  216. package/esm/plugins/pagination/index.js +1 -6
  217. package/esm/plugins/pagination/usePaginationState.js +28 -15
  218. package/esm/plugins/resizable/ResizablePlugin.js +45 -20
  219. package/esm/plugins/resizable/decorateResizable.js +41 -19
  220. package/esm/plugins/resizable/index.js +1 -6
  221. package/esm/plugins/resizable/useResizeHandle.js +39 -24
  222. package/esm/plugins/resizable/utils.js +18 -20
  223. package/esm/plugins/row-dnd/DndRowsPlugin.js +71 -73
  224. package/esm/plugins/row-dnd/index.js +1 -6
  225. package/esm/plugins/selectable/SelectablePlugin.js +117 -64
  226. package/esm/plugins/selectable/addSelectableColumn.js +57 -39
  227. package/esm/plugins/selectable/helper.js +25 -19
  228. package/esm/plugins/selectable/index.js +1 -6
  229. package/esm/plugins/selectable/selectableFormatter.js +97 -54
  230. package/esm/plugins/selectable/useSelectableState.js +78 -34
  231. package/esm/plugins/sortable/SortablePlugin.js +43 -30
  232. package/esm/plugins/sortable/checkIfSortable.js +9 -8
  233. package/esm/plugins/sortable/index.js +1 -6
  234. package/esm/plugins/sortable/sortHeaderFormatter.js +43 -27
  235. package/esm/plugins/sortable/sortTree.js +24 -13
  236. package/esm/plugins/sortable/sorter.js +163 -112
  237. package/esm/plugins/sortable/useSortableState.js +49 -22
  238. package/esm/plugins/toolbar/RowRenderer.js +61 -40
  239. package/esm/plugins/toolbar/ToolbarPlugin.js +23 -19
  240. package/esm/plugins/toolbar/ToolbarTrigger.js +57 -59
  241. package/esm/plugins/toolbar/index.js +1 -6
  242. package/esm/plugins/virtualization/AutoHeightList.js +40 -30
  243. package/esm/plugins/virtualization/VirtualizationPlugin.js +84 -55
  244. package/esm/plugins/virtualization/VirtualizedBody.js +132 -94
  245. package/esm/plugins/virtualization/VirtualizedBodyRow.js +15 -10
  246. package/esm/plugins/virtualization/helper.js +3 -6
  247. package/esm/plugins/virtualization/index.js +1 -6
  248. package/esm/renders/CellWithAddons.js +40 -69
  249. package/esm/renders/index.js +2 -8
  250. package/esm/renders/styled.js +16 -49
  251. package/esm/rowSizes.js +6 -15
  252. package/esm/utilities/getPluginsFromProps.js +24 -25
  253. package/esm/utilities/getScrollbarSize.js +21 -15
  254. package/esm/utilities/normalizeData.js +24 -15
  255. package/package.json +20 -20
  256. package/types/DSDataGrid.d.ts +1 -1
  257. package/types/DataGridImpl.d.ts +2 -3
  258. package/types/PaginatedDataGrid.d.ts +2 -1
  259. package/types/columns/IconColumn.d.ts +2 -3
  260. package/types/components/BodyCell.d.ts +12 -13
  261. package/types/components/ColumnVisibilityMenuOption.d.ts +2 -2
  262. package/types/components/ColumnsOptionsMenuSection.d.ts +0 -1
  263. package/types/components/HeaderCell.d.ts +10 -10
  264. package/types/components/NoResults.d.ts +2 -2
  265. package/types/components/RowsLoader.d.ts +2 -2
  266. package/types/components/Table.d.ts +11 -6
  267. package/types/components/TableBody.d.ts +8 -3
  268. package/types/components/TableHeader.d.ts +1 -2
  269. package/types/components/footer/addOptionalFooterComponents.d.ts +0 -1
  270. package/types/components/header/PrimaryControls.d.ts +0 -1
  271. package/types/components/header/addOptionalHeaderComponents.d.ts +1 -1
  272. package/types/components/renderers/index.d.ts +1 -1
  273. package/types/components/renderers/renderRowsLoader.d.ts +1 -1
  274. package/types/index.d.ts +8 -7
  275. package/types/plugins/body-header-scroll-sync/index.d.ts +1 -1
  276. package/types/plugins/column-dnd/index.d.ts +1 -1
  277. package/types/plugins/column-sizing/getColumnNameFromProperty.d.ts +1 -2
  278. package/types/plugins/column-sizing/index.d.ts +1 -1
  279. package/types/plugins/column-sizing/useColumnSizeService.d.ts +1 -2
  280. package/types/plugins/custom-cell-renderer/addCustomRendererToCell.d.ts +0 -1
  281. package/types/plugins/custom-cell-renderer/getRendererComponent.d.ts +0 -1
  282. package/types/plugins/custom-cell-renderer/index.d.ts +1 -1
  283. package/types/plugins/editable/EditableComponents/ComboBox.d.ts +1 -3
  284. package/types/plugins/editable/EditableComponents/TextBox.d.ts +1 -3
  285. package/types/plugins/editable/getEditorComponent.d.ts +0 -1
  286. package/types/plugins/editable/index.d.ts +2 -2
  287. package/types/plugins/expandable-grid/ExpandableColumn.d.ts +2 -3
  288. package/types/plugins/expandable-grid/ExpandedRow.d.ts +0 -1
  289. package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +0 -1
  290. package/types/plugins/expandable-grid/index.d.ts +2 -2
  291. package/types/plugins/export-data/index.d.ts +1 -1
  292. package/types/plugins/filterable/components/FilterableHeader.d.ts +15 -15
  293. package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +0 -1
  294. package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +0 -1
  295. package/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +1 -2
  296. package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +0 -1
  297. package/types/plugins/filterable/components/filterable-menus/getFilterMenuByType.d.ts +1 -2
  298. package/types/plugins/filterable/filterableFormatter.d.ts +2 -3
  299. package/types/plugins/filterable/filtering-helper/filterRowsByQuery.d.ts +1 -2
  300. package/types/plugins/filterable/filtering-helper/strategiesOperators.d.ts +2 -2
  301. package/types/plugins/filterable/index.d.ts +1 -1
  302. package/types/plugins/index.d.ts +16 -16
  303. package/types/plugins/infinite-scrolling/index.d.ts +1 -1
  304. package/types/plugins/pagination/components/Paginator.d.ts +0 -1
  305. package/types/plugins/pagination/components/PerPageDropdown.d.ts +0 -1
  306. package/types/plugins/pagination/helper.d.ts +2 -3
  307. package/types/plugins/pagination/index.d.ts +1 -1
  308. package/types/plugins/resizable/index.d.ts +1 -1
  309. package/types/plugins/row-dnd/index.d.ts +1 -1
  310. package/types/plugins/selectable/index.d.ts +1 -1
  311. package/types/plugins/selectable/selectableFormatter.d.ts +0 -1
  312. package/types/plugins/sortable/index.d.ts +1 -1
  313. package/types/plugins/sortable/sortHeaderFormatter.d.ts +0 -1
  314. package/types/plugins/sortable/sortTree.d.ts +0 -1
  315. package/types/plugins/sortable/sorter.d.ts +1 -1
  316. package/types/plugins/toolbar/index.d.ts +1 -1
  317. package/types/plugins/virtualization/AutoHeightList.d.ts +1 -1
  318. package/types/plugins/virtualization/VirtualizedBody.d.ts +0 -1
  319. package/types/plugins/virtualization/VirtualizedBodyRow.d.ts +2 -2
  320. package/types/plugins/virtualization/index.d.ts +1 -1
  321. package/types/utilities/getPluginsFromProps.d.ts +1 -2
  322. package/cjs/DSDataGrid.js.map +0 -7
  323. package/cjs/DataGridImpl.js.map +0 -7
  324. package/cjs/PaginatedDataGrid.js.map +0 -7
  325. package/cjs/blockNames.js.map +0 -7
  326. package/cjs/columns/IconColumn.js.map +0 -7
  327. package/cjs/columns/NumberColumn.js.map +0 -7
  328. package/cjs/components/BodyCell.js.map +0 -7
  329. package/cjs/components/BodyList.js.map +0 -7
  330. package/cjs/components/ColumnVisibilityMenuOption.js.map +0 -7
  331. package/cjs/components/ColumnsOptionsMenuSection.js.map +0 -7
  332. package/cjs/components/EmptyState.js.map +0 -7
  333. package/cjs/components/HeaderCell.js.map +0 -7
  334. package/cjs/components/List.js.map +0 -7
  335. package/cjs/components/ListItem.js.map +0 -7
  336. package/cjs/components/NoResults.js.map +0 -7
  337. package/cjs/components/RowsLoader.js.map +0 -7
  338. package/cjs/components/Table.js.map +0 -7
  339. package/cjs/components/TableBody.js.map +0 -7
  340. package/cjs/components/TableHeader.js.map +0 -7
  341. package/cjs/components/footer/addOptionalFooterComponents.js.map +0 -7
  342. package/cjs/components/header/PrimaryControls.js.map +0 -7
  343. package/cjs/components/header/addOptionalHeaderComponents.js.map +0 -7
  344. package/cjs/components/index.js.map +0 -7
  345. package/cjs/components/renderers/defaultClassedRenderers.js.map +0 -7
  346. package/cjs/components/renderers/index.js.map +0 -7
  347. package/cjs/components/renderers/renderRowsLoader.js.map +0 -7
  348. package/cjs/components/tableContext.js.map +0 -7
  349. package/cjs/defaultPlugins.js.map +0 -7
  350. package/cjs/index.js.map +0 -7
  351. package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
  352. package/cjs/plugins/body-header-scroll-sync/index.js.map +0 -7
  353. package/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
  354. package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
  355. package/cjs/plugins/column-dnd/index.js.map +0 -7
  356. package/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
  357. package/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
  358. package/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
  359. package/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
  360. package/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
  361. package/cjs/plugins/column-sizing/index.js.map +0 -7
  362. package/cjs/plugins/column-sizing/useColumnSizeService.js.map +0 -7
  363. package/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
  364. package/cjs/plugins/column-sizing/utils.js.map +0 -7
  365. package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
  366. package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
  367. package/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
  368. package/cjs/plugins/custom-cell-renderer/index.js.map +0 -7
  369. package/cjs/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
  370. package/cjs/plugins/editable/EditableComponents/TextBox.js.map +0 -7
  371. package/cjs/plugins/editable/EditableComponents/index.js.map +0 -7
  372. package/cjs/plugins/editable/EditablePlugin.js.map +0 -7
  373. package/cjs/plugins/editable/decorateEditable.js.map +0 -7
  374. package/cjs/plugins/editable/getEditorComponent.js.map +0 -7
  375. package/cjs/plugins/editable/index.js.map +0 -7
  376. package/cjs/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
  377. package/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
  378. package/cjs/plugins/expandable-grid/ExpandedRow.js.map +0 -7
  379. package/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
  380. package/cjs/plugins/expandable-grid/index.js.map +0 -7
  381. package/cjs/plugins/expandable-grid/useExpandGridState.js.map +0 -7
  382. package/cjs/plugins/export-data/ExportDataPlugin.js.map +0 -7
  383. package/cjs/plugins/export-data/index.js.map +0 -7
  384. package/cjs/plugins/filterable/FilterablePlugin.js.map +0 -7
  385. package/cjs/plugins/filterable/addFilterToColumn.js.map +0 -7
  386. package/cjs/plugins/filterable/components/FilterableHeader.js.map +0 -7
  387. package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
  388. package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
  389. package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
  390. package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
  391. package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
  392. package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
  393. package/cjs/plugins/filterable/filterableFormatter.js.map +0 -7
  394. package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
  395. package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
  396. package/cjs/plugins/filterable/helper.js.map +0 -7
  397. package/cjs/plugins/filterable/index.js.map +0 -7
  398. package/cjs/plugins/filterable/useFilterableState.js.map +0 -7
  399. package/cjs/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
  400. package/cjs/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
  401. package/cjs/plugins/grouping-grid/walkStrategy.js.map +0 -7
  402. package/cjs/plugins/index.js.map +0 -7
  403. package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
  404. package/cjs/plugins/infinite-scrolling/index.js.map +0 -7
  405. package/cjs/plugins/pagination/PaginationPlugin.js.map +0 -7
  406. package/cjs/plugins/pagination/components/Pagination.js.map +0 -7
  407. package/cjs/plugins/pagination/components/Paginator.js.map +0 -7
  408. package/cjs/plugins/pagination/components/PerPageDropdown.js.map +0 -7
  409. package/cjs/plugins/pagination/helper.js.map +0 -7
  410. package/cjs/plugins/pagination/index.js.map +0 -7
  411. package/cjs/plugins/pagination/usePaginationState.js.map +0 -7
  412. package/cjs/plugins/resizable/ResizablePlugin.js.map +0 -7
  413. package/cjs/plugins/resizable/decorateResizable.js.map +0 -7
  414. package/cjs/plugins/resizable/index.js.map +0 -7
  415. package/cjs/plugins/resizable/useResizeHandle.js.map +0 -7
  416. package/cjs/plugins/resizable/utils.js.map +0 -7
  417. package/cjs/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
  418. package/cjs/plugins/row-dnd/index.js.map +0 -7
  419. package/cjs/plugins/selectable/SelectablePlugin.js.map +0 -7
  420. package/cjs/plugins/selectable/addSelectableColumn.js.map +0 -7
  421. package/cjs/plugins/selectable/helper.js.map +0 -7
  422. package/cjs/plugins/selectable/index.js.map +0 -7
  423. package/cjs/plugins/selectable/selectableFormatter.js.map +0 -7
  424. package/cjs/plugins/selectable/useSelectableState.js.map +0 -7
  425. package/cjs/plugins/sortable/SortablePlugin.js.map +0 -7
  426. package/cjs/plugins/sortable/checkIfSortable.js.map +0 -7
  427. package/cjs/plugins/sortable/index.js.map +0 -7
  428. package/cjs/plugins/sortable/sortHeaderFormatter.js.map +0 -7
  429. package/cjs/plugins/sortable/sortTree.js.map +0 -7
  430. package/cjs/plugins/sortable/sorter.js.map +0 -7
  431. package/cjs/plugins/sortable/useSortableState.js.map +0 -7
  432. package/cjs/plugins/toolbar/RowRenderer.js.map +0 -7
  433. package/cjs/plugins/toolbar/ToolbarPlugin.js.map +0 -7
  434. package/cjs/plugins/toolbar/ToolbarTrigger.js.map +0 -7
  435. package/cjs/plugins/toolbar/index.js.map +0 -7
  436. package/cjs/plugins/virtualization/AutoHeightList.js.map +0 -7
  437. package/cjs/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
  438. package/cjs/plugins/virtualization/VirtualizedBody.js.map +0 -7
  439. package/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
  440. package/cjs/plugins/virtualization/helper.js.map +0 -7
  441. package/cjs/plugins/virtualization/index.js.map +0 -7
  442. package/cjs/renders/CellWithAddons.js.map +0 -7
  443. package/cjs/renders/index.js.map +0 -7
  444. package/cjs/renders/styled.js.map +0 -7
  445. package/cjs/rowSizes.js.map +0 -7
  446. package/cjs/utilities/DataGridUtilities.json +0 -1315
  447. package/cjs/utilities/getPluginsFromProps.js.map +0 -7
  448. package/cjs/utilities/getScrollbarSize.js.map +0 -7
  449. package/cjs/utilities/normalizeData.js.map +0 -7
  450. package/esm/DSDataGrid.js.map +0 -7
  451. package/esm/DataGridImpl.js.map +0 -7
  452. package/esm/PaginatedDataGrid.js.map +0 -7
  453. package/esm/blockNames.js.map +0 -7
  454. package/esm/columns/IconColumn.js.map +0 -7
  455. package/esm/columns/NumberColumn.js.map +0 -7
  456. package/esm/components/BodyCell.js.map +0 -7
  457. package/esm/components/BodyList.js.map +0 -7
  458. package/esm/components/ColumnVisibilityMenuOption.js.map +0 -7
  459. package/esm/components/ColumnsOptionsMenuSection.js.map +0 -7
  460. package/esm/components/EmptyState.js.map +0 -7
  461. package/esm/components/HeaderCell.js.map +0 -7
  462. package/esm/components/List.js.map +0 -7
  463. package/esm/components/ListItem.js.map +0 -7
  464. package/esm/components/NoResults.js.map +0 -7
  465. package/esm/components/RowsLoader.js.map +0 -7
  466. package/esm/components/Table.js.map +0 -7
  467. package/esm/components/TableBody.js.map +0 -7
  468. package/esm/components/TableHeader.js.map +0 -7
  469. package/esm/components/footer/addOptionalFooterComponents.js.map +0 -7
  470. package/esm/components/header/PrimaryControls.js.map +0 -7
  471. package/esm/components/header/addOptionalHeaderComponents.js.map +0 -7
  472. package/esm/components/index.js.map +0 -7
  473. package/esm/components/renderers/defaultClassedRenderers.js.map +0 -7
  474. package/esm/components/renderers/index.js.map +0 -7
  475. package/esm/components/renderers/renderRowsLoader.js.map +0 -7
  476. package/esm/components/tableContext.js.map +0 -7
  477. package/esm/defaultPlugins.js.map +0 -7
  478. package/esm/index.js.map +0 -7
  479. package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +0 -7
  480. package/esm/plugins/body-header-scroll-sync/index.js.map +0 -7
  481. package/esm/plugins/column-dnd/DndColumnsPlugin.js.map +0 -7
  482. package/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +0 -7
  483. package/esm/plugins/column-dnd/index.js.map +0 -7
  484. package/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +0 -7
  485. package/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +0 -7
  486. package/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +0 -7
  487. package/esm/plugins/column-sizing/ext-points/getTableProps.js.map +0 -7
  488. package/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +0 -7
  489. package/esm/plugins/column-sizing/index.js.map +0 -7
  490. package/esm/plugins/column-sizing/useColumnSizeService.js.map +0 -7
  491. package/esm/plugins/column-sizing/useStylesheetHelpers.js.map +0 -7
  492. package/esm/plugins/column-sizing/utils.js.map +0 -7
  493. package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +0 -7
  494. package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +0 -7
  495. package/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +0 -7
  496. package/esm/plugins/custom-cell-renderer/index.js.map +0 -7
  497. package/esm/plugins/editable/EditableComponents/ComboBox.js.map +0 -7
  498. package/esm/plugins/editable/EditableComponents/TextBox.js.map +0 -7
  499. package/esm/plugins/editable/EditableComponents/index.js.map +0 -7
  500. package/esm/plugins/editable/EditablePlugin.js.map +0 -7
  501. package/esm/plugins/editable/decorateEditable.js.map +0 -7
  502. package/esm/plugins/editable/getEditorComponent.js.map +0 -7
  503. package/esm/plugins/editable/index.js.map +0 -7
  504. package/esm/plugins/expandable-grid/ExpandableColumn.js.map +0 -7
  505. package/esm/plugins/expandable-grid/ExpandablePlugin.js.map +0 -7
  506. package/esm/plugins/expandable-grid/ExpandedRow.js.map +0 -7
  507. package/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +0 -7
  508. package/esm/plugins/expandable-grid/index.js.map +0 -7
  509. package/esm/plugins/expandable-grid/useExpandGridState.js.map +0 -7
  510. package/esm/plugins/export-data/ExportDataPlugin.js.map +0 -7
  511. package/esm/plugins/export-data/index.js.map +0 -7
  512. package/esm/plugins/filterable/FilterablePlugin.js.map +0 -7
  513. package/esm/plugins/filterable/addFilterToColumn.js.map +0 -7
  514. package/esm/plugins/filterable/components/FilterableHeader.js.map +0 -7
  515. package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +0 -7
  516. package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +0 -7
  517. package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +0 -7
  518. package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +0 -7
  519. package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +0 -7
  520. package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +0 -7
  521. package/esm/plugins/filterable/filterableFormatter.js.map +0 -7
  522. package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +0 -7
  523. package/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +0 -7
  524. package/esm/plugins/filterable/helper.js.map +0 -7
  525. package/esm/plugins/filterable/index.js.map +0 -7
  526. package/esm/plugins/filterable/useFilterableState.js.map +0 -7
  527. package/esm/plugins/grouping-by/GroupingByPlugin.js.map +0 -7
  528. package/esm/plugins/grouping-grid/GroupingPlugin.js.map +0 -7
  529. package/esm/plugins/grouping-grid/walkStrategy.js.map +0 -7
  530. package/esm/plugins/index.js.map +0 -7
  531. package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +0 -7
  532. package/esm/plugins/infinite-scrolling/index.js.map +0 -7
  533. package/esm/plugins/pagination/PaginationPlugin.js.map +0 -7
  534. package/esm/plugins/pagination/components/Pagination.js.map +0 -7
  535. package/esm/plugins/pagination/components/Paginator.js.map +0 -7
  536. package/esm/plugins/pagination/components/PerPageDropdown.js.map +0 -7
  537. package/esm/plugins/pagination/helper.js.map +0 -7
  538. package/esm/plugins/pagination/index.js.map +0 -7
  539. package/esm/plugins/pagination/usePaginationState.js.map +0 -7
  540. package/esm/plugins/resizable/ResizablePlugin.js.map +0 -7
  541. package/esm/plugins/resizable/decorateResizable.js.map +0 -7
  542. package/esm/plugins/resizable/index.js.map +0 -7
  543. package/esm/plugins/resizable/useResizeHandle.js.map +0 -7
  544. package/esm/plugins/resizable/utils.js.map +0 -7
  545. package/esm/plugins/row-dnd/DndRowsPlugin.js.map +0 -7
  546. package/esm/plugins/row-dnd/index.js.map +0 -7
  547. package/esm/plugins/selectable/SelectablePlugin.js.map +0 -7
  548. package/esm/plugins/selectable/addSelectableColumn.js.map +0 -7
  549. package/esm/plugins/selectable/helper.js.map +0 -7
  550. package/esm/plugins/selectable/index.js.map +0 -7
  551. package/esm/plugins/selectable/selectableFormatter.js.map +0 -7
  552. package/esm/plugins/selectable/useSelectableState.js.map +0 -7
  553. package/esm/plugins/sortable/SortablePlugin.js.map +0 -7
  554. package/esm/plugins/sortable/checkIfSortable.js.map +0 -7
  555. package/esm/plugins/sortable/index.js.map +0 -7
  556. package/esm/plugins/sortable/sortHeaderFormatter.js.map +0 -7
  557. package/esm/plugins/sortable/sortTree.js.map +0 -7
  558. package/esm/plugins/sortable/sorter.js.map +0 -7
  559. package/esm/plugins/sortable/useSortableState.js.map +0 -7
  560. package/esm/plugins/toolbar/RowRenderer.js.map +0 -7
  561. package/esm/plugins/toolbar/ToolbarPlugin.js.map +0 -7
  562. package/esm/plugins/toolbar/ToolbarTrigger.js.map +0 -7
  563. package/esm/plugins/toolbar/index.js.map +0 -7
  564. package/esm/plugins/virtualization/AutoHeightList.js.map +0 -7
  565. package/esm/plugins/virtualization/VirtualizationPlugin.js.map +0 -7
  566. package/esm/plugins/virtualization/VirtualizedBody.js.map +0 -7
  567. package/esm/plugins/virtualization/VirtualizedBodyRow.js.map +0 -7
  568. package/esm/plugins/virtualization/helper.js.map +0 -7
  569. package/esm/plugins/virtualization/index.js.map +0 -7
  570. package/esm/renders/CellWithAddons.js.map +0 -7
  571. package/esm/renders/index.js.map +0 -7
  572. package/esm/renders/styled.js.map +0 -7
  573. package/esm/rowSizes.js.map +0 -7
  574. package/esm/utilities/DataGridUtilities.json +0 -1315
  575. package/esm/utilities/getPluginsFromProps.js.map +0 -7
  576. package/esm/utilities/getScrollbarSize.js.map +0 -7
  577. package/esm/utilities/normalizeData.js.map +0 -7
package/esm/DSDataGrid.js CHANGED
@@ -1,370 +1,630 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import { TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
5
- import { DataGridImpl } from "./DataGridImpl";
6
- import { RowSizesOptions, RowSizesOptionsArr } from "./rowSizes";
7
- const DSDataGrids = ({
8
- containerProps = {},
9
- instanceRef,
10
- className = "",
11
- columns = [],
12
- rows = [],
13
- rowKey = "id",
14
- infiniteScrolling = false,
15
- editable = false,
16
- sortable = false,
17
- sortEmptyLast = false,
18
- paginated = false,
19
- dragAndDropRows = false,
20
- selectable = false,
21
- resizeableColumns = false,
22
- searchFilters = false,
23
- dragAndDropColumns = false,
24
- useTreeData = false,
25
- autoScrollToId,
26
- overscanCount = 10,
27
- selectAll = false,
28
- selectedRows = [],
29
- filters = void 0,
30
- onAddFilter = () => null,
31
- onRemoveFilter = () => null,
32
- onFiltersChange = () => null,
33
- showFilterBar = true,
34
- multiSelectFilterOptions = [
35
- { id: "true", label: "Selected" },
36
- { id: "false", label: "Not selected" }
37
- ],
38
- multiSelectFilterLabels = void 0,
39
- multiSelectFilterLabel = "Selection",
40
- aggregations = {},
41
- groupingColumn = void 0,
42
- sortingColumns = {},
43
- minPerPage = 0,
44
- maxPerPage = 50,
45
- onPerPageChange = () => null,
46
- onPageChange = () => null,
47
- paginationStep = 2,
48
- pagination = {
49
- page: 1,
50
- perPage: 10
51
- },
52
- showHeader = true,
53
- fixedHeader = true,
54
- wrapText = false,
55
- height = void 0,
56
- minColumnWidth = 100,
57
- showRowsLoader = false,
58
- visibleColumns = void 0,
59
- showSelectHighlight = false,
60
- showSelectColumn = true,
61
- selectColumnSortable = true,
62
- selectColumnFilterable = false,
63
- selectionColumnDefinition = {},
64
- filterBarOptions = void 0,
65
- renderToolbar = void 0,
66
- toolbarDelayClose = 400,
67
- renderFilterToolbar = void 0,
68
- multiSelectComponent = void 0,
69
- noResultsRender,
70
- noResultsPlaceholder,
71
- fluidHeight = false,
72
- customHandlers = {},
73
- groupedBy = void 0,
74
- onDefaultFiltersLoad = () => null,
75
- onReorder = () => null,
76
- onMoveRowEnd = () => null,
77
- onMoveRowStart = () => null,
78
- onMoveColumnOver = () => null,
79
- onMoveColumnStart = () => null,
80
- onMoveColumnEnd = () => null,
81
- onColumnResize = () => null,
82
- onExpandChange = () => null,
83
- onToggleExpand = () => null,
84
- onExpandRow = () => null,
85
- onFilter = () => null,
86
- onSort = () => null,
87
- onColumnRowEdited = () => null,
88
- onColumnRowEdit = () => null,
89
- onSelectRow = () => null,
90
- onSelectAll = () => null,
91
- onInfiniteScrolling = () => null,
92
- onFilterMenuClose = () => null,
93
- onFilterMenuOpen = () => null,
94
- getData = void 0,
95
- serverSideData = false,
96
- isDataSorted = false,
97
- isDataFiltered = false,
98
- virtualized = true,
99
- numRowsVisible = void 0,
100
- isColumnEditable = (column) => column.editable,
101
- groupedRows = false,
102
- groupedRowsRenderHeader = void 0,
103
- renderExpandedDetails = () => null,
104
- detailColumns,
105
- expandable = false,
106
- getChildrenRows = (row) => row.children,
107
- expandableSubrowsVisible = 7,
108
- renderRowDetails = () => null,
109
- getExpandedRowSize = void 0,
110
- getExpandedRowMinSize,
111
- rowSize = RowSizesOptions.normal,
112
- subRowSize = RowSizesOptions.normal,
113
- bindColumnsSizeTo = void 0,
114
- bindRowSizeTo = void 0,
115
- onToggleShowAllRows,
116
- expandedRows,
117
- autoHeight = false,
118
- noColumnsPlaceholder,
119
- plugins = [],
120
- normalizeDataKeys = false
121
- }) => /* @__PURE__ */ React2.createElement(TooltipTextProvider, null, /* @__PURE__ */ React2.createElement(DataGridImpl, {
122
- aggregations,
123
- autoHeight: autoHeight && !fluidHeight,
124
- autoScrollToId,
125
- bindColumnsSizeTo,
126
- bindRowSizeTo,
127
- className,
128
- columns,
129
- containerProps,
130
- customHandlers,
131
- detailColumns,
132
- dragAndDropColumns,
133
- dragAndDropRows,
134
- editable,
135
- expandable,
136
- expandableSubrowsVisible,
137
- expandedRows,
138
- filterBarOptions,
139
- filters,
140
- fixedHeader,
141
- fluidHeight,
142
- getChildrenRows,
143
- getData,
144
- getExpandedRowMinSize,
145
- getExpandedRowSize,
146
- groupedBy,
147
- groupedRows,
148
- groupedRowsRenderHeader,
149
- groupingColumn,
150
- height,
151
- infiniteScrolling,
152
- instanceRef,
153
- isColumnEditable,
154
- isDataFiltered,
155
- isDataSorted,
156
- maxPerPage,
157
- minColumnWidth,
158
- minPerPage,
159
- multiSelectComponent,
160
- multiSelectFilterLabel,
161
- multiSelectFilterLabels,
162
- multiSelectFilterOptions,
163
- noColumnsPlaceholder,
164
- noResultsPlaceholder,
165
- noResultsRender,
166
- normalizeDataKeys,
167
- numRowsVisible,
168
- onAddFilter,
169
- onColumnResize,
170
- onColumnRowEdit,
171
- onColumnRowEdited,
172
- onExpandRow,
173
- onExpandChange,
174
- onFilter,
175
- onFiltersChange,
176
- onFilterMenuClose,
177
- onFilterMenuOpen,
178
- onDefaultFiltersLoad,
179
- onInfiniteScrolling,
180
- onMoveColumnEnd,
181
- onMoveColumnOver,
182
- onMoveColumnStart,
183
- onMoveRowEnd,
184
- onMoveRowStart,
185
- onPageChange,
186
- onPerPageChange,
187
- onRemoveFilter,
188
- onReorder,
189
- onSelectAll,
190
- onSelectRow,
191
- onSort,
192
- onToggleExpand,
193
- onToggleShowAllRows,
194
- overscanCount,
195
- paginated,
196
- pagination,
197
- paginationStep,
198
- plugins,
199
- renderExpandedDetails,
200
- renderFilterToolbar,
201
- renderRowDetails,
202
- renderToolbar,
203
- resizeableColumns,
204
- rowKey,
205
- rows,
206
- rowSize,
207
- searchFilters,
208
- selectable,
209
- selectAll,
210
- selectColumnFilterable,
211
- selectColumnSortable,
212
- selectedRows,
213
- selectionColumnDefinition,
214
- serverSideData,
215
- showFilterBar,
216
- showHeader,
217
- showRowsLoader,
218
- showSelectColumn,
219
- showSelectHighlight,
220
- sortable,
221
- sortEmptyLast,
222
- sortingColumns,
223
- subrowSize: subRowSize,
224
- toolbarDelayClose,
225
- useTreeData,
226
- virtualized,
227
- visibleColumns,
228
- wrapText
229
- }));
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { PropTypes, describe } from 'react-desc';
4
+ import { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';
5
+ import DataGridImpl from './DataGridImpl.js';
6
+ import { RowSizesOptionsArr, RowSizesOptions } from './rowSizes.js';
7
+
8
+ const DSDataGrids = _ref => {
9
+ let {
10
+ containerProps = {},
11
+ instanceRef,
12
+ className = '',
13
+ // data
14
+ columns = [],
15
+ rows = [],
16
+ rowKey = 'id',
17
+ // features
18
+ infiniteScrolling = false,
19
+ editable = false,
20
+ sortable = false,
21
+ sortEmptyLast = false,
22
+ paginated = false,
23
+ dragAndDropRows = false,
24
+ selectable = false,
25
+ resizeableColumns = false,
26
+ searchFilters = false,
27
+ dragAndDropColumns = false,
28
+ useTreeData = false,
29
+ autoScrollToId,
30
+ // virtualization props
31
+ overscanCount = 10,
32
+ // feature state
33
+ selectAll = false,
34
+ // todo: change to isAllSelected
35
+ selectedRows = [],
36
+ filters = undefined,
37
+ onAddFilter = () => null,
38
+ onRemoveFilter = () => null,
39
+ onFiltersChange = () => null,
40
+ showFilterBar = true,
41
+ multiSelectFilterOptions = [{
42
+ id: 'true',
43
+ label: 'Selected'
44
+ }, {
45
+ id: 'false',
46
+ label: 'Not selected'
47
+ }],
48
+ multiSelectFilterLabels = undefined,
49
+ multiSelectFilterLabel = 'Selection',
50
+ aggregations = {},
51
+ groupingColumn = undefined,
52
+ sortingColumns = {},
53
+ // pagination
54
+ minPerPage = 0,
55
+ maxPerPage = 50,
56
+ onPerPageChange = () => null,
57
+ onPageChange = () => null,
58
+ paginationStep = 2,
59
+ pagination = {
60
+ page: 1,
61
+ perPage: 10
62
+ },
63
+ // visual
64
+ showHeader = true,
65
+ fixedHeader = true,
66
+ wrapText = false,
67
+ height = undefined,
68
+ minColumnWidth = 100,
69
+ showRowsLoader = false,
70
+ visibleColumns = undefined,
71
+ // this enforces visibility of columns
72
+ showSelectHighlight = false,
73
+ showSelectColumn = true,
74
+ selectColumnSortable = true,
75
+ selectColumnFilterable = false,
76
+ selectionColumnDefinition = {},
77
+ filterBarOptions = undefined,
78
+ // searchGrid = false,
79
+ renderToolbar = undefined,
80
+ toolbarDelayClose = 400,
81
+ renderFilterToolbar = undefined,
82
+ multiSelectComponent = undefined,
83
+ // todo: deprecate this
84
+ noResultsRender,
85
+ noResultsPlaceholder,
86
+ fluidHeight = false,
87
+ customHandlers = {},
88
+ // grouping feature
89
+ groupedBy = undefined,
90
+ // callbacks
91
+ onDefaultFiltersLoad = () => null,
92
+ onReorder = () => null,
93
+ onMoveRowEnd = () => null,
94
+ onMoveRowStart = () => null,
95
+ onMoveColumnOver = () => null,
96
+ onMoveColumnStart = () => null,
97
+ onMoveColumnEnd = () => null,
98
+ onColumnResize = () => null,
99
+ onExpandChange = () => null,
100
+ onToggleExpand = () => null,
101
+ onExpandRow = () => null,
102
+ onFilter = () => null,
103
+ onSort = () => null,
104
+ onColumnRowEdited = () => null,
105
+ onColumnRowEdit = () => null,
106
+ onSelectRow = () => null,
107
+ onSelectAll = () => null,
108
+ onInfiniteScrolling = () => null,
109
+ onFilterMenuClose = () => null,
110
+ onFilterMenuOpen = () => null,
111
+ getData = undefined,
112
+ // todo: change to onGetMoreData
113
+ serverSideData = false,
114
+ isDataSorted = false,
115
+ isDataFiltered = false,
116
+ virtualized = true,
117
+ numRowsVisible = undefined,
118
+ isColumnEditable = column => column.editable,
119
+ // grouped props
120
+ groupedRows = false,
121
+ groupedRowsRenderHeader = undefined,
122
+ // expandable props
123
+ renderExpandedDetails = () => null,
124
+ detailColumns,
125
+ expandable = false,
126
+ getChildrenRows = row => row.children,
127
+ expandableSubrowsVisible = 7,
128
+ renderRowDetails = () => null,
129
+ getExpandedRowSize = undefined,
130
+ getExpandedRowMinSize,
131
+ rowSize = RowSizesOptions.normal,
132
+ subRowSize = RowSizesOptions.normal,
133
+ bindColumnsSizeTo = undefined,
134
+ bindRowSizeTo = undefined,
135
+ onToggleShowAllRows,
136
+ expandedRows,
137
+ autoHeight = false,
138
+ noColumnsPlaceholder,
139
+ plugins = [],
140
+ normalizeDataKeys = false
141
+ } = _ref;
142
+ return /*#__PURE__*/_jsx(TooltipTextProvider, {}, void 0, /*#__PURE__*/_jsx(DataGridImpl, {
143
+ aggregations: aggregations,
144
+ autoHeight: autoHeight && !fluidHeight,
145
+ autoScrollToId: autoScrollToId,
146
+ bindColumnsSizeTo: bindColumnsSizeTo,
147
+ bindRowSizeTo: bindRowSizeTo,
148
+ className: className,
149
+ columns: columns,
150
+ containerProps: containerProps,
151
+ customHandlers: customHandlers,
152
+ detailColumns: detailColumns,
153
+ dragAndDropColumns: dragAndDropColumns,
154
+ dragAndDropRows: dragAndDropRows,
155
+ editable: editable,
156
+ expandable: expandable,
157
+ expandableSubrowsVisible: expandableSubrowsVisible,
158
+ expandedRows: expandedRows,
159
+ filterBarOptions: filterBarOptions,
160
+ filters: filters,
161
+ fixedHeader: fixedHeader,
162
+ fluidHeight: fluidHeight,
163
+ getChildrenRows: getChildrenRows,
164
+ getData: getData,
165
+ getExpandedRowMinSize: getExpandedRowMinSize,
166
+ getExpandedRowSize: getExpandedRowSize,
167
+ groupedBy: groupedBy,
168
+ groupedRows: groupedRows,
169
+ groupedRowsRenderHeader: groupedRowsRenderHeader,
170
+ groupingColumn: groupingColumn,
171
+ height: height,
172
+ infiniteScrolling: infiniteScrolling,
173
+ instanceRef: instanceRef,
174
+ isColumnEditable: isColumnEditable,
175
+ isDataFiltered: isDataFiltered,
176
+ isDataSorted: isDataSorted,
177
+ maxPerPage: maxPerPage,
178
+ minColumnWidth: minColumnWidth,
179
+ minPerPage: minPerPage,
180
+ multiSelectComponent: multiSelectComponent,
181
+ multiSelectFilterLabel: multiSelectFilterLabel,
182
+ multiSelectFilterLabels: multiSelectFilterLabels,
183
+ multiSelectFilterOptions: multiSelectFilterOptions,
184
+ noColumnsPlaceholder: noColumnsPlaceholder,
185
+ noResultsPlaceholder: noResultsPlaceholder,
186
+ noResultsRender: noResultsRender,
187
+ normalizeDataKeys: normalizeDataKeys,
188
+ numRowsVisible: numRowsVisible // if defined, fluidHeight is disabled
189
+ ,
190
+ onAddFilter: onAddFilter,
191
+ onColumnResize: onColumnResize,
192
+ onColumnRowEdit: onColumnRowEdit,
193
+ onColumnRowEdited: onColumnRowEdited,
194
+ onExpandRow: onExpandRow,
195
+ onExpandChange: onExpandChange,
196
+ onFilter: onFilter,
197
+ onFiltersChange: onFiltersChange,
198
+ onFilterMenuClose: onFilterMenuClose,
199
+ onFilterMenuOpen: onFilterMenuOpen,
200
+ onDefaultFiltersLoad: onDefaultFiltersLoad,
201
+ onInfiniteScrolling: onInfiniteScrolling,
202
+ onMoveColumnEnd: onMoveColumnEnd,
203
+ onMoveColumnOver: onMoveColumnOver,
204
+ onMoveColumnStart: onMoveColumnStart,
205
+ onMoveRowEnd: onMoveRowEnd,
206
+ onMoveRowStart: onMoveRowStart,
207
+ onPageChange: onPageChange,
208
+ onPerPageChange: onPerPageChange,
209
+ onRemoveFilter: onRemoveFilter,
210
+ onReorder: onReorder,
211
+ onSelectAll: onSelectAll,
212
+ onSelectRow: onSelectRow,
213
+ onSort: onSort,
214
+ onToggleExpand: onToggleExpand,
215
+ onToggleShowAllRows: onToggleShowAllRows,
216
+ overscanCount: overscanCount,
217
+ paginated: paginated,
218
+ pagination: pagination,
219
+ paginationStep: paginationStep,
220
+ plugins: plugins,
221
+ renderExpandedDetails: renderExpandedDetails,
222
+ renderFilterToolbar: renderFilterToolbar,
223
+ renderRowDetails: renderRowDetails,
224
+ renderToolbar: renderToolbar,
225
+ resizeableColumns: resizeableColumns,
226
+ rowKey: rowKey,
227
+ rows: rows,
228
+ rowSize: rowSize,
229
+ searchFilters: searchFilters,
230
+ selectable: selectable,
231
+ selectAll: selectAll,
232
+ selectColumnFilterable: selectColumnFilterable,
233
+ selectColumnSortable: selectColumnSortable,
234
+ selectedRows: selectedRows,
235
+ selectionColumnDefinition: selectionColumnDefinition,
236
+ serverSideData: serverSideData,
237
+ showFilterBar: showFilterBar,
238
+ showHeader: showHeader,
239
+ showRowsLoader: showRowsLoader,
240
+ showSelectColumn: showSelectColumn,
241
+ showSelectHighlight: showSelectHighlight,
242
+ sortable: sortable,
243
+ sortEmptyLast: sortEmptyLast,
244
+ sortingColumns: sortingColumns,
245
+ subrowSize: subRowSize,
246
+ toolbarDelayClose: toolbarDelayClose,
247
+ useTreeData: useTreeData,
248
+ virtualized: virtualized,
249
+ visibleColumns: visibleColumns,
250
+ wrapText: wrapText
251
+ }));
252
+ };
253
+
230
254
  const props = {
231
- instanceRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]).description("ref to the instance of the datagrid, handle it imperatively"),
232
- className: PropTypes.string.description("class for data grid wrapper"),
233
- containerProps: PropTypes.object.description("inject props to datagrid wrapper"),
255
+ /** ref to the instance of the datagrid, handle it imperatively */
256
+ instanceRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
257
+ current: PropTypes.any
258
+ })]).description('ref to the instance of the datagrid, handle it imperatively'),
259
+
260
+ /** class for data grid wrapper */
261
+ className: PropTypes.string.description('class for data grid wrapper'),
262
+
263
+ /** inject props to datagrid wrapper */
264
+ containerProps: PropTypes.object.description('inject props to datagrid wrapper'),
265
+
266
+ /** FilterBar props passed down to FilterBar */
234
267
  filterBarOptions: PropTypes.shape({
235
268
  minWidth: PropTypes.number,
236
269
  maxWidth: PropTypes.number
237
- }).description("FilterBar props passed down to FilterBar"),
270
+ }).description('FilterBar props passed down to FilterBar'),
271
+
272
+ /** datagrid columns */
238
273
  columns: PropTypes.arrayOf(PropTypes.shape({
274
+ /** Column property as an identifier */
239
275
  property: PropTypes.string.isRequired,
276
+
277
+ /** Label in the header */
240
278
  label: PropTypes.string,
279
+
280
+ /** Defines the width of the column, can be a string with percentages ("50%"), if not defined the width is flexible */
241
281
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
282
+
283
+ /** Min width for this column. NOTE: Has prevalence over the general minColumnWidth */
242
284
  minWidth: PropTypes.number,
285
+
286
+ /** Function returning a custom editor for that cell ({ value, onValue, rowData }) => Element */
243
287
  customEditor: PropTypes.func,
288
+
289
+ /** Function returning an element to render in the cell ({ value, customHandlers, metaData: { rowData } }) => Element */
244
290
  customRenderer: PropTypes.func,
291
+
292
+ /** Activates 'searchable' feature for this column */
245
293
  searchable: PropTypes.bool,
294
+
295
+ /** Activates 'sortable' feature for this column */
246
296
  sortable: PropTypes.bool,
297
+
298
+ /** Activates 'resizable' feature for this column */
247
299
  resizable: PropTypes.bool,
300
+
301
+ /** Activates 'editable' feature for this column */
248
302
  editable: PropTypes.bool,
303
+
304
+ /** Whether this column is visible or not */
249
305
  visible: PropTypes.bool
250
- })).description("datagrid columns"),
251
- rows: PropTypes.arrayOf(PropTypes.object).description("datagrid rows"),
252
- rowKey: PropTypes.string.description("key for each row"),
253
- infiniteScrolling: PropTypes.bool.description("toggle infinite scroll loading behavior"),
306
+ })).description('datagrid columns'),
307
+
308
+ /** datagrid rows */
309
+ rows: PropTypes.arrayOf(PropTypes.object).description('datagrid rows'),
310
+
311
+ /** key for each row */
312
+ rowKey: PropTypes.string.description('key for each row'),
313
+
314
+ /** toggle infinite scroll loading behavior */
315
+ infiniteScrolling: PropTypes.bool.description('toggle infinite scroll loading behavior'),
316
+
317
+ /** Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well */
254
318
  overscanCount: PropTypes.number.description("Activates 'editable' feature on the DataGrid NOTE: needs to be activated in the column definition as well"),
255
- editable: PropTypes.bool.description("turn datagrid to editable mode"),
319
+
320
+ /** turn datagrid to editable mode */
321
+ editable: PropTypes.bool.description('turn datagrid to editable mode'),
322
+
323
+ /** Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well */
256
324
  sortable: PropTypes.bool.description("Activates 'sortable' feature on the GataGrid NOTE: needs to be activated in the column definition as well"),
257
- sortEmptyLast: PropTypes.bool.description("Put empty values always last on the column after sorting"),
325
+
326
+ /** Put empty values always last on the column after sorting */
327
+ sortEmptyLast: PropTypes.bool.description('Put empty values always last on the column after sorting'),
328
+
329
+ /** Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well */
258
330
  paginated: PropTypes.bool.description("Activates 'pagination' feature on the datagrid NOTE: needs to be activated in the column definition as well"),
259
- paginationStep: PropTypes.number.description("Pagination step for clicking the next pages"),
331
+
332
+ /** Pagination step for clicking the next pages */
333
+ paginationStep: PropTypes.number.description('Pagination step for clicking the next pages'),
334
+
335
+ /** Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well */
260
336
  dragAndDropRows: PropTypes.bool.description("Activates 'drag and drop rows' feature on the datagrid NOTE: needs to be activated in the column definition as well"),
337
+
338
+ /** Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well */
261
339
  selectable: PropTypes.bool.description("Activates 'selection' feature on the datagrid NOTE: needs to be activated in the column definition as well"),
340
+
341
+ /** Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well */
262
342
  resizeableColumns: PropTypes.bool.description("Activates 'resize' feature on the datagrid NOTE: needs to be activated in the column definition as well"),
263
- noResultsPlaceholder: PropTypes.oneOf([PropTypes.string, PropTypes.element]).description("Placeholder rendered when no rows are visible"),
343
+
344
+ /** Placeholder rendered when no rows are visible */
345
+ noResultsPlaceholder: PropTypes.oneOf([PropTypes.string, PropTypes.element]).description('Placeholder rendered when no rows are visible'),
346
+
347
+ /** Activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well */
264
348
  searchFilters: PropTypes.bool.description("activates 'filtering' feature on the datagrid NOTE: needs to be activated in the column definition as well"),
349
+
350
+ /** Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well */
265
351
  dragAndDropColumns: PropTypes.bool.description("Activates 'drag and drop columns' feature on the datagrid NOTE: needs to be activated in the column definition as well"),
352
+
353
+ /** Activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well */
266
354
  useTreeData: PropTypes.bool.description("activates 'grouping and tree data' feature on the datagrid NOTE: needs to be activated in the column definition as well"),
267
- autoScrollToId: PropTypes.any.description("AutoScroll to row ID"),
268
- selectAll: PropTypes.bool.description("Whether all rows are selected or not"),
269
- selectedRows: PropTypes.arrayOf(PropTypes.object).description(" Defines the selected rows"),
270
- filters: PropTypes.arrayOf(PropTypes.object).description("Filters to be applied to the grid"),
271
- onExpandRow: PropTypes.func.description("Handler when user expands a row"),
272
- onExpandChange: PropTypes.func.description("Handler when user expands a row with full expand state"),
273
- onToggleExpand: PropTypes.func.description("Handler when user expands a row (old API)"),
274
- onAddFilter: PropTypes.func.description("Handler when user adds a filter"),
275
- onRemoveFilter: PropTypes.func.description("Handler when user removes a filter"),
276
- onFiltersChange: PropTypes.func.description("Handler when the filters state has changed "),
277
- onDefaultFiltersLoad: PropTypes.func.description("Handler when the default filters load. Returns the rows rendered"),
278
- onMoveColumnOver: PropTypes.func.description("Handler when column move is over another column"),
279
- onMoveColumnStart: PropTypes.func.description(" Handler when column move starts"),
280
- onMoveColumnEnd: PropTypes.func.description("Handler when column move ends"),
281
- showFilterBar: PropTypes.bool.description("Whether to show the filter bar or not"),
282
- multiSelectFilterOptions: PropTypes.arrayOf(PropTypes.object).description("Custom option for the header with multi select"),
283
- multiSelectFilterLabel: PropTypes.string.description("Label to the header column for multi select"),
284
- multiSelectFilterLabels: PropTypes.arrayOf(PropTypes.string).description("Labels for multi selects"),
285
- aggregations: PropTypes.object.description("").deprecated(""),
286
- groupingColumn: PropTypes.string.description("Column which rows would be grouped by").deprecated(""),
287
- groupedBy: PropTypes.string.description("group by"),
355
+
356
+ /** AutoScroll to row ID */
357
+ autoScrollToId: PropTypes.any.description('AutoScroll to row ID'),
358
+
359
+ /** Whether all rows are selected or not */
360
+ selectAll: PropTypes.bool.description('Whether all rows are selected or not'),
361
+
362
+ /** Defines the selected rows */
363
+ selectedRows: PropTypes.arrayOf(PropTypes.object).description(' Defines the selected rows'),
364
+
365
+ /** Filters to be applied to the grid */
366
+ filters: PropTypes.arrayOf(PropTypes.object).description('Filters to be applied to the grid'),
367
+ // todo: define params for handlers
368
+
369
+ /** Handler when user expands a row */
370
+ onExpandRow: PropTypes.func.description('Handler when user expands a row'),
371
+
372
+ /** Handler when user expands a row with full expand state */
373
+ onExpandChange: PropTypes.func.description('Handler when user expands a row with full expand state'),
374
+
375
+ /** Handler when user expands a row (old API) */
376
+ onToggleExpand: PropTypes.func.description('Handler when user expands a row (old API)'),
377
+
378
+ /** Handler when user adds a filter */
379
+ onAddFilter: PropTypes.func.description('Handler when user adds a filter'),
380
+
381
+ /** Handler when user removes a filter */
382
+ onRemoveFilter: PropTypes.func.description('Handler when user removes a filter'),
383
+
384
+ /** Handler when the filters state has changed */
385
+ onFiltersChange: PropTypes.func.description('Handler when the filters state has changed '),
386
+
387
+ /** Handler when the default filters load. Returns the rows rendered */
388
+ onDefaultFiltersLoad: PropTypes.func.description('Handler when the default filters load. Returns the rows rendered'),
389
+
390
+ /** Handler when column move is over another column */
391
+ onMoveColumnOver: PropTypes.func.description('Handler when column move is over another column'),
392
+
393
+ /** Handler when column move starts */
394
+ onMoveColumnStart: PropTypes.func.description(' Handler when column move starts'),
395
+
396
+ /** Handler when column move ends */
397
+ onMoveColumnEnd: PropTypes.func.description('Handler when column move ends'),
398
+
399
+ /** Whether to show the filter bar or not */
400
+ showFilterBar: PropTypes.bool.description('Whether to show the filter bar or not'),
401
+
402
+ /** Custom option for the header with multi select */
403
+ multiSelectFilterOptions: PropTypes.arrayOf(PropTypes.object).description('Custom option for the header with multi select'),
404
+
405
+ /** Label to the header column for multi select */
406
+ multiSelectFilterLabel: PropTypes.string.description('Label to the header column for multi select'),
407
+
408
+ /** Labels for multi selects */
409
+ multiSelectFilterLabels: PropTypes.arrayOf(PropTypes.string).description('Labels for multi selects'),
410
+
411
+ /** unstable */
412
+ aggregations: PropTypes.object.description('').deprecated(''),
413
+
414
+ /** unstable */
415
+
416
+ /** Column which rows would be grouped by */
417
+ groupingColumn: PropTypes.string.description('Column which rows would be grouped by').deprecated(''),
418
+
419
+ /** group by */
420
+ groupedBy: PropTypes.string.description('group by'),
421
+
422
+ /** Defines the sorting state */
288
423
  sortingColumns: PropTypes.objectOf(PropTypes.shape({
289
- direction: PropTypes.oneOf(["asc", "desc"]),
424
+ // eslint-disable-next-line react/no-unused-prop-types
425
+ direction: PropTypes.oneOf(['asc', 'desc']),
426
+ // eslint-disable-next-line react/no-unused-prop-types
290
427
  position: PropTypes.number
291
- })).description("Defines the sorting state"),
292
- visibleColumns: PropTypes.arrayOf(PropTypes.string).description("Visible columns property"),
293
- minPerPage: PropTypes.string.description("Pagination: Minimum number of rows per page"),
294
- maxPerPage: PropTypes.string.description("Pagination: Maximum number of rows per page"),
295
- onPerPageChange: PropTypes.string.description("Pagination: Handler when user changes the amount of rows per page"),
296
- onPageChange: PropTypes.string.description("Pagination: Handler when user changes the page"),
428
+ })).description('Defines the sorting state'),
429
+
430
+ /** Visible columns property */
431
+ visibleColumns: PropTypes.arrayOf(PropTypes.string).description('Visible columns property'),
432
+
433
+ /** Pagination: Minimum number of rows per page */
434
+ minPerPage: PropTypes.string.description('Pagination: Minimum number of rows per page'),
435
+
436
+ /** Pagination: Maximum number of rows per page */
437
+ maxPerPage: PropTypes.string.description('Pagination: Maximum number of rows per page'),
438
+
439
+ /** Pagination: Handler when user changes the amount of rows per page */
440
+ onPerPageChange: PropTypes.string.description('Pagination: Handler when user changes the amount of rows per page'),
441
+
442
+ /** Pagination: Handler when user changes the page */
443
+ onPageChange: PropTypes.string.description('Pagination: Handler when user changes the page'),
444
+
445
+ /** Pagination state */
297
446
  pagination: PropTypes.shape({
447
+ // eslint-disable-next-line react/no-unused-prop-types
298
448
  page: PropTypes.number,
449
+ // eslint-disable-next-line react/no-unused-prop-types
299
450
  perPage: PropTypes.number
300
- }).description("pagination state"),
301
- showHeader: PropTypes.bool.description("Whether to show the header or not"),
302
- fixedHeader: PropTypes.bool.description("Whether to header is fixed or not"),
303
- height: PropTypes.number.description("Defines the height of the DataGrid"),
304
- minColumnWidth: PropTypes.number.description("General min column width for all the columns "),
305
- showRowsLoader: PropTypes.bool.description("Whether to show a loader instead of the rows or not"),
306
- showSelectHighlight: PropTypes.bool.description("When a user selects a row, that row get highlighted"),
307
- showSelectColumn: PropTypes.bool.description("Whether to show the select column when the selection feature is active"),
308
- selectColumnSortable: PropTypes.bool.description("activates sortable feature to selection column"),
309
- selectColumnFilterable: PropTypes.bool.description("Activates filterable feature to selection column"),
310
- selectionColumnDefinition: PropTypes.object.description("Define the definition for the selection column"),
311
- renderToolbar: PropTypes.func.description("Function that returns a toolbar to show when the user hovers the row"),
312
- toolbarDelayClose: PropTypes.number.description(" Timeout to close the toolbar"),
313
- renderFilterToolbar: PropTypes.func.description("Function that returns a toolbar in the FilterBar component"),
314
- multiSelectComponent: PropTypes.element.description("Custom component for the selection"),
315
- normalizeDataKeys: PropTypes.bool.description("Normalize the keys of the data received and the columns"),
316
- noResultsRender: PropTypes.func.description("Function that returns an Element when there are no rows"),
317
- fluidHeight: PropTypes.bool.description("The height of the DataGrid will expand to its container"),
318
- customHandlers: PropTypes.object.description("").deprecated(""),
319
- onFilterMenuClose: PropTypes.func.description("Handler when user closes the filter menu"),
320
- onFilterMenuOpen: PropTypes.func.description("Handler when user opens the filter menu"),
321
- onReorder: PropTypes.func.description("handler when user drags a row "),
322
- onMoveRowEnd: PropTypes.func.description("Handler when user stops dragging a row "),
323
- onMoveRowStart: PropTypes.func.description("Handler when user starts dragging a row"),
324
- onColumnResize: PropTypes.func.description("Handler when user has resized a column"),
325
- onFilter: PropTypes.func.description("Handler when user filters by a column"),
326
- onSort: PropTypes.func.description("Handler when user sorts by a column "),
327
- onColumnRowEdited: PropTypes.func.description("Handler when user has edited a cell row"),
328
- onColumnRowEdit: PropTypes.func.description(" Handler when user activates the cell row editing functionality"),
329
- onSelectRow: PropTypes.func.description("Handler when user selects a row"),
330
- onSelectAll: PropTypes.func.description("Handler when user checks the selection header controller"),
331
- getData: PropTypes.func.description("Handler to get more data when infinite scroll is activated"),
332
- onInfiniteScrolling: PropTypes.func.description("Handler to get more data when infinite scroll is activated without side-effect"),
333
- serverSideData: PropTypes.bool.description("Flag to override empty sort when data is from server"),
334
- virtualized: PropTypes.bool.description("Flag to force virtualization. Not used"),
335
- numRowsVisible: PropTypes.oneOf([PropTypes.number, "all"]).description("Number of rows visible. Not used"),
336
- isColumnEditable: PropTypes.func.description("Callback to check if column is editable"),
337
- groupedRows: PropTypes.bool.description("Flag for groupedRows"),
338
- groupedRowsRenderHeader: PropTypes.oneOf([PropTypes.func, PropTypes.element]).description("Header for grouped rows"),
339
- isDataSorted: PropTypes.bool.description("Once activated will disable the internal logic for sorting"),
340
- isDataFiltered: PropTypes.bool.description("Once activated will disable the internal logic for filtering"),
341
- rowSize: PropTypes.oneOf(RowSizesOptionsArr).description("Change row size"),
342
- wrapText: PropTypes.bool.description("Whether to wrap the text of the data grid or not"),
343
- renderExpandedDetails: PropTypes.oneOf([PropTypes.func, PropTypes.element]).description("Element to render expanded details"),
344
- detailColumns: PropTypes.arrayOf(PropTypes.object).description("Columns to render on the details of an expanded row"),
345
- expandable: PropTypes.bool.description("Flag to enable the expandable feature "),
346
- getChildrenRows: PropTypes.func.description("Callback to get the row children"),
347
- expandableSubrowsVisible: PropTypes.number.description("Number of rows visible on the details of an expanded row"),
348
- renderRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description("Element to render inside expanded row"),
349
- getExpandedRowSize: PropTypes.func.description("Callback to get the expanded row size"),
350
- getExpandedRowMinSize: PropTypes.func.description("Callback to get the expanded row minimum size"),
351
- subRowSize: PropTypes.oneOf(RowSizesOptionsArr).description("Change expanded/details rows size"),
352
- bindColumnsSizeTo: PropTypes.string.description("Bind the column size to another grid instance"),
353
- bindRowSizeTo: PropTypes.string.description("Bind the row size to another grid instance"),
354
- onToggleShowAllRows: PropTypes.func.description("Handler when toggle show all is clicked"),
355
- expandedRows: PropTypes.object.description("Expanded row state"),
356
- autoHeight: PropTypes.bool.description("Flag to enable autoheight"),
357
- noColumnsPlaceholder: PropTypes.oneOf([PropTypes.string, PropTypes.element]).description("Placeholder rendered when no columns are visible"),
358
- plugins: PropTypes.arrayOf(PropTypes.any).description("Plugin additional array")
451
+ }).description('pagination state'),
452
+
453
+ /** Whether to show the header or not */
454
+ showHeader: PropTypes.bool.description('Whether to show the header or not'),
455
+
456
+ /** Whether to header is fixed or not */
457
+ fixedHeader: PropTypes.bool.description('Whether to header is fixed or not'),
458
+
459
+ /** Defines the height of the DataGrid */
460
+ height: PropTypes.number.description('Defines the height of the DataGrid'),
461
+
462
+ /** General min column width for all the columns */
463
+ minColumnWidth: PropTypes.number.description('General min column width for all the columns '),
464
+
465
+ /** Whether to show a loader instead of the rows or not */
466
+ showRowsLoader: PropTypes.bool.description('Whether to show a loader instead of the rows or not'),
467
+
468
+ /** When a user selects a row, that row get highlighted */
469
+ showSelectHighlight: PropTypes.bool.description('When a user selects a row, that row get highlighted'),
470
+
471
+ /** Whether to show the select column when the selection feature is active */
472
+ showSelectColumn: PropTypes.bool.description('Whether to show the select column when the selection feature is active'),
473
+
474
+ /** Activates sortable feature to selection column */
475
+ selectColumnSortable: PropTypes.bool.description('activates sortable feature to selection column'),
476
+
477
+ /** Activates filterable feature to selection column */
478
+ selectColumnFilterable: PropTypes.bool.description('Activates filterable feature to selection column'),
479
+
480
+ /** Define the definition for the selection column */
481
+ selectionColumnDefinition: PropTypes.object.description('Define the definition for the selection column'),
482
+
483
+ /** Function that returns a toolbar to show when the user hovers the row */
484
+ renderToolbar: PropTypes.func.description('Function that returns a toolbar to show when the user hovers the row'),
485
+
486
+ /** Timeout to close the toolbar */
487
+ toolbarDelayClose: PropTypes.number.description(' Timeout to close the toolbar'),
488
+
489
+ /** Function that returns a toolbar in the FilterBar component */
490
+ renderFilterToolbar: PropTypes.func.description('Function that returns a toolbar in the FilterBar component'),
491
+
492
+ /** Custom component for the selection */
493
+ multiSelectComponent: PropTypes.element.description('Custom component for the selection'),
494
+
495
+ /** Normalize the keys of the data received and the columns */
496
+ normalizeDataKeys: PropTypes.bool.description('Normalize the keys of the data received and the columns'),
497
+
498
+ /** Function that returns an Element when there are no rows */
499
+ noResultsRender: PropTypes.func.description('Function that returns an Element when there are no rows'),
500
+
501
+ /** The height of the DataGrid will expand to its container */
502
+ fluidHeight: PropTypes.bool.description('The height of the DataGrid will expand to its container'),
503
+
504
+ /** @deprecated */
505
+ customHandlers: PropTypes.object.description('').deprecated(''),
506
+
507
+ /** Handler when user closes the filter menu */
508
+ onFilterMenuClose: PropTypes.func.description('Handler when user closes the filter menu'),
509
+
510
+ /** Handler when user opens the filter menu */
511
+ onFilterMenuOpen: PropTypes.func.description('Handler when user opens the filter menu'),
512
+
513
+ /** Handler when user drags a row */
514
+ onReorder: PropTypes.func.description('handler when user drags a row '),
515
+
516
+ /** Handler when user stops dragging a row */
517
+ onMoveRowEnd: PropTypes.func.description('Handler when user stops dragging a row '),
518
+
519
+ /** Handler when user starts dragging a row */
520
+ onMoveRowStart: PropTypes.func.description('Handler when user starts dragging a row'),
521
+
522
+ /** Handler when user has resized a column */
523
+ onColumnResize: PropTypes.func.description('Handler when user has resized a column'),
524
+
525
+ /** Handler when user filters by a column */
526
+ onFilter: PropTypes.func.description('Handler when user filters by a column'),
527
+
528
+ /** Handler when user sorts by a column */
529
+ onSort: PropTypes.func.description('Handler when user sorts by a column '),
530
+
531
+ /** Handler when user has edited a cell row */
532
+ onColumnRowEdited: PropTypes.func.description('Handler when user has edited a cell row'),
533
+
534
+ /** Handler when user activates the cell row editing functionality */
535
+ onColumnRowEdit: PropTypes.func.description(' Handler when user activates the cell row editing functionality'),
536
+
537
+ /** Handler when user selects a row */
538
+ onSelectRow: PropTypes.func.description('Handler when user selects a row'),
539
+
540
+ /** Handler when user checks the selection header controller */
541
+ onSelectAll: PropTypes.func.description('Handler when user checks the selection header controller'),
542
+
543
+ /** Handler to get more data when infinite scroll is activated */
544
+ getData: PropTypes.func.description('Handler to get more data when infinite scroll is activated'),
545
+
546
+ /** Handler to get more data when infinite scroll is activated without side-effect */
547
+ onInfiniteScrolling: PropTypes.func.description('Handler to get more data when infinite scroll is activated without side-effect'),
548
+
549
+ /** Flag to override empty sort when data is from server */
550
+ serverSideData: PropTypes.bool.description('Flag to override empty sort when data is from server'),
551
+
552
+ /** Flag to force virtualization. Not used */
553
+ virtualized: PropTypes.bool.description('Flag to force virtualization. Not used'),
554
+
555
+ /** Number of rows visible. Not used */
556
+ numRowsVisible: PropTypes.oneOf([PropTypes.number, 'all']).description('Number of rows visible. Not used'),
557
+
558
+ /** Callback to check if column is editable */
559
+ isColumnEditable: PropTypes.func.description('Callback to check if column is editable'),
560
+
561
+ /** Flag for groupedRows */
562
+ groupedRows: PropTypes.bool.description('Flag for groupedRows'),
563
+
564
+ /** Header for grouped rows */
565
+ groupedRowsRenderHeader: PropTypes.oneOf([PropTypes.func, PropTypes.element]).description('Header for grouped rows'),
566
+
567
+ /** Once activated will disable the internal logic for sorting */
568
+ isDataSorted: PropTypes.bool.description('Once activated will disable the internal logic for sorting'),
569
+
570
+ /** Once activated will disable the internal logic for filtering */
571
+ isDataFiltered: PropTypes.bool.description('Once activated will disable the internal logic for filtering'),
572
+
573
+ /** Change row size */
574
+ rowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change row size'),
575
+
576
+ /** Whether to wrap the text of the data grid or not */
577
+ wrapText: PropTypes.bool.description('Whether to wrap the text of the data grid or not'),
578
+
579
+ /** Element to render expanded details */
580
+ renderExpandedDetails: PropTypes.oneOf([PropTypes.func, PropTypes.element]).description('Element to render expanded details'),
581
+
582
+ /** Columns to render on the details of an expanded row */
583
+ detailColumns: PropTypes.arrayOf(PropTypes.object).description('Columns to render on the details of an expanded row'),
584
+
585
+ /** Flag to enable the expandable feature */
586
+ expandable: PropTypes.bool.description('Flag to enable the expandable feature '),
587
+
588
+ /** Callback to get the row children */
589
+ getChildrenRows: PropTypes.func.description('Callback to get the row children'),
590
+
591
+ /** Number of rows visible on the details of an expanded row */
592
+ expandableSubrowsVisible: PropTypes.number.description('Number of rows visible on the details of an expanded row'),
593
+
594
+ /** Element to render inside expanded row */
595
+ renderRowDetails: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).description('Element to render inside expanded row'),
596
+
597
+ /** Callback to get the expanded row size */
598
+ getExpandedRowSize: PropTypes.func.description('Callback to get the expanded row size'),
599
+
600
+ /** Callback to get the expanded row minimum size */
601
+ getExpandedRowMinSize: PropTypes.func.description('Callback to get the expanded row minimum size'),
602
+
603
+ /** Change expanded/details rows size */
604
+ subRowSize: PropTypes.oneOf(RowSizesOptionsArr).description('Change expanded/details rows size'),
605
+
606
+ /** Bind the column size to another grid instance */
607
+ bindColumnsSizeTo: PropTypes.string.description('Bind the column size to another grid instance'),
608
+
609
+ /** Bind the row size to another grid instance */
610
+ bindRowSizeTo: PropTypes.string.description('Bind the row size to another grid instance'),
611
+
612
+ /** Handler when toggle show all is clicked */
613
+ onToggleShowAllRows: PropTypes.func.description('Handler when toggle show all is clicked'),
614
+
615
+ /** Expanded row state */
616
+ expandedRows: PropTypes.object.description('Expanded row state'),
617
+
618
+ /** Flag to enable autoheight */
619
+ autoHeight: PropTypes.bool.description('Flag to enable autoheight'),
620
+
621
+ /** Placeholder rendered when no columns are visible */
622
+ noColumnsPlaceholder: PropTypes.oneOf([PropTypes.string, PropTypes.element]).description('Placeholder rendered when no columns are visible'),
623
+
624
+ /** Plugin additional array */
625
+ plugins: PropTypes.arrayOf(PropTypes.any).description('Plugin additional array')
359
626
  };
360
- DSDataGrids.propTypes = props;
361
627
  const DSDataGridsWithSchema = describe(DSDataGrids);
362
628
  DSDataGridsWithSchema.propTypes = props;
363
- var DSDataGrid_default = DSDataGrids;
364
- export {
365
- DSDataGrids as DSDataGrid,
366
- DSDataGrids,
367
- DSDataGridsWithSchema,
368
- DSDataGrid_default as default
369
- };
370
- //# sourceMappingURL=DSDataGrid.js.map
629
+
630
+ export { DSDataGridsWithSchema, DSDataGrids as default };