@elliemae/ds-datagrids 2.2.0-next.3 → 2.3.0-alpha.1

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 +395 -635
  2. package/cjs/DSDataGrid.js.map +7 -0
  3. package/cjs/DataGridImpl.js +103 -128
  4. package/cjs/DataGridImpl.js.map +7 -0
  5. package/cjs/PaginatedDataGrid.js +68 -68
  6. package/cjs/PaginatedDataGrid.js.map +7 -0
  7. package/cjs/blockNames.js +39 -11
  8. package/cjs/blockNames.js.map +7 -0
  9. package/cjs/columns/IconColumn.js +78 -62
  10. package/cjs/columns/IconColumn.js.map +7 -0
  11. package/cjs/columns/NumberColumn.js +35 -5
  12. package/cjs/columns/NumberColumn.js.map +7 -0
  13. package/cjs/components/BodyCell.js +83 -80
  14. package/cjs/components/BodyCell.js.map +7 -0
  15. package/cjs/components/BodyList.js +52 -52
  16. package/cjs/components/BodyList.js.map +7 -0
  17. package/cjs/components/ColumnVisibilityMenuOption.js +53 -31
  18. package/cjs/components/ColumnVisibilityMenuOption.js.map +7 -0
  19. package/cjs/components/ColumnsOptionsMenuSection.js +59 -44
  20. package/cjs/components/ColumnsOptionsMenuSection.js.map +7 -0
  21. package/cjs/components/EmptyState.js +81 -50
  22. package/cjs/components/EmptyState.js.map +7 -0
  23. package/cjs/components/HeaderCell.js +64 -58
  24. package/cjs/components/HeaderCell.js.map +7 -0
  25. package/cjs/components/List.js +41 -29
  26. package/cjs/components/List.js.map +7 -0
  27. package/cjs/components/ListItem.js +43 -36
  28. package/cjs/components/ListItem.js.map +7 -0
  29. package/cjs/components/NoResults.js +55 -51
  30. package/cjs/components/NoResults.js.map +7 -0
  31. package/cjs/components/RowsLoader.js +42 -22
  32. package/cjs/components/RowsLoader.js.map +7 -0
  33. package/cjs/components/Table.js +78 -87
  34. package/cjs/components/Table.js.map +7 -0
  35. package/cjs/components/TableBody.js +61 -60
  36. package/cjs/components/TableBody.js.map +7 -0
  37. package/cjs/components/TableHeader.js +47 -30
  38. package/cjs/components/TableHeader.js.map +7 -0
  39. package/cjs/components/footer/addOptionalFooterComponents.js +53 -43
  40. package/cjs/components/footer/addOptionalFooterComponents.js.map +7 -0
  41. package/cjs/components/header/PrimaryControls.js +49 -35
  42. package/cjs/components/header/PrimaryControls.js.map +7 -0
  43. package/cjs/components/header/addOptionalHeaderComponents.js +54 -43
  44. package/cjs/components/header/addOptionalHeaderComponents.js.map +7 -0
  45. package/cjs/components/index.js +43 -17
  46. package/cjs/components/index.js.map +7 -0
  47. package/cjs/components/renderers/defaultClassedRenderers.js +64 -57
  48. package/cjs/components/renderers/defaultClassedRenderers.js.map +7 -0
  49. package/cjs/components/renderers/index.js +44 -17
  50. package/cjs/components/renderers/index.js.map +7 -0
  51. package/cjs/components/renderers/renderRowsLoader.js +39 -18
  52. package/cjs/components/renderers/renderRowsLoader.js.map +7 -0
  53. package/cjs/components/tableContext.js +36 -13
  54. package/cjs/components/tableContext.js.map +7 -0
  55. package/cjs/defaultPlugins.js +44 -12
  56. package/cjs/defaultPlugins.js.map +7 -0
  57. package/cjs/index.js +72 -67
  58. package/cjs/index.js.map +7 -0
  59. package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +102 -114
  60. package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +7 -0
  61. package/cjs/plugins/body-header-scroll-sync/index.js +35 -9
  62. package/cjs/plugins/body-header-scroll-sync/index.js.map +7 -0
  63. package/cjs/plugins/column-dnd/DndColumnsPlugin.js +107 -86
  64. package/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +7 -0
  65. package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +43 -27
  66. package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +7 -0
  67. package/cjs/plugins/column-dnd/index.js +35 -9
  68. package/cjs/plugins/column-dnd/index.js.map +7 -0
  69. package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +59 -55
  70. package/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +7 -0
  71. package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +48 -53
  72. package/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +7 -0
  73. package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +40 -13
  74. package/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +7 -0
  75. package/cjs/plugins/column-sizing/ext-points/getTableProps.js +55 -54
  76. package/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +7 -0
  77. package/cjs/plugins/column-sizing/getColumnNameFromProperty.js +37 -9
  78. package/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +7 -0
  79. package/cjs/plugins/column-sizing/index.js +35 -9
  80. package/cjs/plugins/column-sizing/index.js.map +7 -0
  81. package/cjs/plugins/column-sizing/useColumnSizeService.js +72 -86
  82. package/cjs/plugins/column-sizing/useColumnSizeService.js.map +7 -0
  83. package/cjs/plugins/column-sizing/useStylesheetHelpers.js +96 -199
  84. package/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +7 -0
  85. package/cjs/plugins/column-sizing/utils.js +52 -29
  86. package/cjs/plugins/column-sizing/utils.js.map +7 -0
  87. package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +38 -16
  88. package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +7 -0
  89. package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +61 -56
  90. package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +7 -0
  91. package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +58 -60
  92. package/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +7 -0
  93. package/cjs/plugins/custom-cell-renderer/index.js +35 -9
  94. package/cjs/plugins/custom-cell-renderer/index.js.map +7 -0
  95. package/cjs/plugins/editable/EditableComponents/ComboBox.js +50 -53
  96. package/cjs/plugins/editable/EditableComponents/ComboBox.js.map +7 -0
  97. package/cjs/plugins/editable/EditableComponents/TextBox.js +56 -76
  98. package/cjs/plugins/editable/EditableComponents/TextBox.js.map +7 -0
  99. package/cjs/plugins/editable/EditableComponents/index.js +37 -11
  100. package/cjs/plugins/editable/EditableComponents/index.js.map +7 -0
  101. package/cjs/plugins/editable/EditablePlugin.js +60 -75
  102. package/cjs/plugins/editable/EditablePlugin.js.map +7 -0
  103. package/cjs/plugins/editable/decorateEditable.js +61 -98
  104. package/cjs/plugins/editable/decorateEditable.js.map +7 -0
  105. package/cjs/plugins/editable/getEditorComponent.js +70 -76
  106. package/cjs/plugins/editable/getEditorComponent.js.map +7 -0
  107. package/cjs/plugins/editable/index.js +38 -13
  108. package/cjs/plugins/editable/index.js.map +7 -0
  109. package/cjs/plugins/expandable-grid/ExpandableColumn.js +112 -144
  110. package/cjs/plugins/expandable-grid/ExpandableColumn.js.map +7 -0
  111. package/cjs/plugins/expandable-grid/ExpandablePlugin.js +118 -180
  112. package/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +7 -0
  113. package/cjs/plugins/expandable-grid/ExpandedRow.js +117 -139
  114. package/cjs/plugins/expandable-grid/ExpandedRow.js.map +7 -0
  115. package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +54 -52
  116. package/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +7 -0
  117. package/cjs/plugins/expandable-grid/index.js +37 -11
  118. package/cjs/plugins/expandable-grid/index.js.map +7 -0
  119. package/cjs/plugins/expandable-grid/useExpandGridState.js +45 -31
  120. package/cjs/plugins/expandable-grid/useExpandGridState.js.map +7 -0
  121. package/cjs/plugins/export-data/ExportDataPlugin.js +82 -116
  122. package/cjs/plugins/export-data/ExportDataPlugin.js.map +7 -0
  123. package/cjs/plugins/export-data/index.js +35 -12
  124. package/cjs/plugins/export-data/index.js.map +7 -0
  125. package/cjs/plugins/filterable/FilterablePlugin.js +54 -55
  126. package/cjs/plugins/filterable/FilterablePlugin.js.map +7 -0
  127. package/cjs/plugins/filterable/addFilterToColumn.js +40 -28
  128. package/cjs/plugins/filterable/addFilterToColumn.js.map +7 -0
  129. package/cjs/plugins/filterable/components/FilterableHeader.js +119 -107
  130. package/cjs/plugins/filterable/components/FilterableHeader.js.map +7 -0
  131. package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +116 -116
  132. package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +7 -0
  133. package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +97 -73
  134. package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +7 -0
  135. package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +138 -132
  136. package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +7 -0
  137. package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +115 -119
  138. package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +7 -0
  139. package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +35 -7
  140. package/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +7 -0
  141. package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +46 -15
  142. package/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +7 -0
  143. package/cjs/plugins/filterable/filterableFormatter.js +61 -51
  144. package/cjs/plugins/filterable/filterableFormatter.js.map +7 -0
  145. package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +60 -55
  146. package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +7 -0
  147. package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +43 -22
  148. package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +7 -0
  149. package/cjs/plugins/filterable/helper.js +68 -79
  150. package/cjs/plugins/filterable/helper.js.map +7 -0
  151. package/cjs/plugins/filterable/index.js +35 -9
  152. package/cjs/plugins/filterable/index.js.map +7 -0
  153. package/cjs/plugins/filterable/useFilterableState.js +62 -66
  154. package/cjs/plugins/filterable/useFilterableState.js.map +7 -0
  155. package/cjs/plugins/grouping-by/GroupingByPlugin.js +40 -23
  156. package/cjs/plugins/grouping-by/GroupingByPlugin.js.map +7 -0
  157. package/cjs/plugins/grouping-grid/GroupingPlugin.js +86 -109
  158. package/cjs/plugins/grouping-grid/GroupingPlugin.js.map +7 -0
  159. package/cjs/plugins/grouping-grid/walkStrategy.js +46 -26
  160. package/cjs/plugins/grouping-grid/walkStrategy.js.map +7 -0
  161. package/cjs/plugins/index.js +68 -48
  162. package/cjs/plugins/index.js.map +7 -0
  163. package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +64 -88
  164. package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +7 -0
  165. package/cjs/plugins/infinite-scrolling/index.js +35 -9
  166. package/cjs/plugins/infinite-scrolling/index.js.map +7 -0
  167. package/cjs/plugins/pagination/PaginationPlugin.js +73 -90
  168. package/cjs/plugins/pagination/PaginationPlugin.js.map +7 -0
  169. package/cjs/plugins/pagination/components/Pagination.js +54 -35
  170. package/cjs/plugins/pagination/components/Pagination.js.map +7 -0
  171. package/cjs/plugins/pagination/components/Paginator.js +59 -44
  172. package/cjs/plugins/pagination/components/Paginator.js.map +7 -0
  173. package/cjs/plugins/pagination/components/PerPageDropdown.js +51 -63
  174. package/cjs/plugins/pagination/components/PerPageDropdown.js.map +7 -0
  175. package/cjs/plugins/pagination/helper.js +45 -24
  176. package/cjs/plugins/pagination/helper.js.map +7 -0
  177. package/cjs/plugins/pagination/index.js +35 -9
  178. package/cjs/plugins/pagination/index.js.map +7 -0
  179. package/cjs/plugins/pagination/usePaginationState.js +46 -38
  180. package/cjs/plugins/pagination/usePaginationState.js.map +7 -0
  181. package/cjs/plugins/resizable/ResizablePlugin.js +51 -55
  182. package/cjs/plugins/resizable/ResizablePlugin.js.map +7 -0
  183. package/cjs/plugins/resizable/decorateResizable.js +49 -53
  184. package/cjs/plugins/resizable/decorateResizable.js.map +7 -0
  185. package/cjs/plugins/resizable/index.js +35 -9
  186. package/cjs/plugins/resizable/index.js.map +7 -0
  187. package/cjs/plugins/resizable/useResizeHandle.js +56 -50
  188. package/cjs/plugins/resizable/useResizeHandle.js.map +7 -0
  189. package/cjs/plugins/resizable/utils.js +49 -28
  190. package/cjs/plugins/resizable/utils.js.map +7 -0
  191. package/cjs/plugins/row-dnd/DndRowsPlugin.js +103 -82
  192. package/cjs/plugins/row-dnd/DndRowsPlugin.js.map +7 -0
  193. package/cjs/plugins/row-dnd/index.js +35 -9
  194. package/cjs/plugins/row-dnd/index.js.map +7 -0
  195. package/cjs/plugins/selectable/SelectablePlugin.js +101 -134
  196. package/cjs/plugins/selectable/SelectablePlugin.js.map +7 -0
  197. package/cjs/plugins/selectable/addSelectableColumn.js +67 -68
  198. package/cjs/plugins/selectable/addSelectableColumn.js.map +7 -0
  199. package/cjs/plugins/selectable/helper.js +50 -39
  200. package/cjs/plugins/selectable/helper.js.map +7 -0
  201. package/cjs/plugins/selectable/index.js +35 -9
  202. package/cjs/plugins/selectable/index.js.map +7 -0
  203. package/cjs/plugins/selectable/selectableFormatter.js +83 -105
  204. package/cjs/plugins/selectable/selectableFormatter.js.map +7 -0
  205. package/cjs/plugins/selectable/useSelectableState.js +67 -94
  206. package/cjs/plugins/selectable/useSelectableState.js.map +7 -0
  207. package/cjs/plugins/sortable/SortablePlugin.js +62 -76
  208. package/cjs/plugins/sortable/SortablePlugin.js.map +7 -0
  209. package/cjs/plugins/sortable/checkIfSortable.js +37 -14
  210. package/cjs/plugins/sortable/checkIfSortable.js.map +7 -0
  211. package/cjs/plugins/sortable/index.js +35 -9
  212. package/cjs/plugins/sortable/index.js.map +7 -0
  213. package/cjs/plugins/sortable/sortHeaderFormatter.js +56 -50
  214. package/cjs/plugins/sortable/sortHeaderFormatter.js.map +7 -0
  215. package/cjs/plugins/sortable/sortTree.js +40 -47
  216. package/cjs/plugins/sortable/sortTree.js.map +7 -0
  217. package/cjs/plugins/sortable/sorter.js +140 -172
  218. package/cjs/plugins/sortable/sorter.js.map +7 -0
  219. package/cjs/plugins/sortable/useSortableState.js +53 -79
  220. package/cjs/plugins/sortable/useSortableState.js.map +7 -0
  221. package/cjs/plugins/toolbar/RowRenderer.js +75 -76
  222. package/cjs/plugins/toolbar/RowRenderer.js.map +7 -0
  223. package/cjs/plugins/toolbar/ToolbarPlugin.js +49 -33
  224. package/cjs/plugins/toolbar/ToolbarPlugin.js.map +7 -0
  225. package/cjs/plugins/toolbar/ToolbarTrigger.js +89 -70
  226. package/cjs/plugins/toolbar/ToolbarTrigger.js.map +7 -0
  227. package/cjs/plugins/toolbar/index.js +35 -9
  228. package/cjs/plugins/toolbar/index.js.map +7 -0
  229. package/cjs/plugins/virtualization/AutoHeightList.js +64 -52
  230. package/cjs/plugins/virtualization/AutoHeightList.js.map +7 -0
  231. package/cjs/plugins/virtualization/VirtualizationPlugin.js +86 -97
  232. package/cjs/plugins/virtualization/VirtualizationPlugin.js.map +7 -0
  233. package/cjs/plugins/virtualization/VirtualizedBody.js +139 -155
  234. package/cjs/plugins/virtualization/VirtualizedBody.js.map +7 -0
  235. package/cjs/plugins/virtualization/VirtualizedBodyRow.js +39 -17
  236. package/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +7 -0
  237. package/cjs/plugins/virtualization/helper.js +35 -7
  238. package/cjs/plugins/virtualization/helper.js.map +7 -0
  239. package/cjs/plugins/virtualization/index.js +35 -9
  240. package/cjs/plugins/virtualization/index.js.map +7 -0
  241. package/cjs/renders/CellWithAddons.js +98 -50
  242. package/cjs/renders/CellWithAddons.js.map +7 -0
  243. package/cjs/renders/index.js +37 -11
  244. package/cjs/renders/index.js.map +7 -0
  245. package/cjs/renders/styled.js +78 -27
  246. package/cjs/renders/styled.js.map +7 -0
  247. package/cjs/rowSizes.js +44 -12
  248. package/cjs/rowSizes.js.map +7 -0
  249. package/cjs/utilities/DataGridUtilities.json +1315 -0
  250. package/cjs/utilities/getPluginsFromProps.js +67 -39
  251. package/cjs/utilities/getPluginsFromProps.js.map +7 -0
  252. package/cjs/utilities/getScrollbarSize.js +44 -25
  253. package/cjs/utilities/getScrollbarSize.js.map +7 -0
  254. package/cjs/utilities/normalizeData.js +44 -34
  255. package/cjs/utilities/normalizeData.js.map +7 -0
  256. package/esm/DSDataGrid.js +337 -597
  257. package/esm/DSDataGrid.js.map +7 -0
  258. package/esm/DataGridImpl.js +68 -113
  259. package/esm/DataGridImpl.js.map +7 -0
  260. package/esm/PaginatedDataGrid.js +39 -59
  261. package/esm/PaginatedDataGrid.js.map +7 -0
  262. package/esm/blockNames.js +10 -5
  263. package/esm/blockNames.js.map +7 -0
  264. package/esm/columns/IconColumn.js +49 -54
  265. package/esm/columns/IconColumn.js.map +7 -0
  266. package/esm/columns/NumberColumn.js +6 -3
  267. package/esm/columns/NumberColumn.js.map +7 -0
  268. package/esm/components/BodyCell.js +51 -68
  269. package/esm/components/BodyCell.js.map +7 -0
  270. package/esm/components/BodyList.js +23 -43
  271. package/esm/components/BodyList.js.map +7 -0
  272. package/esm/components/ColumnVisibilityMenuOption.js +24 -27
  273. package/esm/components/ColumnVisibilityMenuOption.js.map +7 -0
  274. package/esm/components/ColumnsOptionsMenuSection.js +30 -38
  275. package/esm/components/ColumnsOptionsMenuSection.js.map +7 -0
  276. package/esm/components/EmptyState.js +52 -40
  277. package/esm/components/EmptyState.js.map +7 -0
  278. package/esm/components/HeaderCell.js +33 -48
  279. package/esm/components/HeaderCell.js.map +7 -0
  280. package/esm/components/List.js +12 -23
  281. package/esm/components/List.js.map +7 -0
  282. package/esm/components/ListItem.js +14 -30
  283. package/esm/components/ListItem.js.map +7 -0
  284. package/esm/components/NoResults.js +26 -43
  285. package/esm/components/NoResults.js.map +7 -0
  286. package/esm/components/RowsLoader.js +13 -15
  287. package/esm/components/RowsLoader.js.map +7 -0
  288. package/esm/components/Table.js +45 -76
  289. package/esm/components/Table.js.map +7 -0
  290. package/esm/components/TableBody.js +32 -52
  291. package/esm/components/TableBody.js.map +7 -0
  292. package/esm/components/TableHeader.js +17 -23
  293. package/esm/components/TableHeader.js.map +7 -0
  294. package/esm/components/footer/addOptionalFooterComponents.js +24 -37
  295. package/esm/components/footer/addOptionalFooterComponents.js.map +7 -0
  296. package/esm/components/header/PrimaryControls.js +20 -29
  297. package/esm/components/header/PrimaryControls.js.map +7 -0
  298. package/esm/components/header/addOptionalHeaderComponents.js +25 -36
  299. package/esm/components/header/addOptionalHeaderComponents.js.map +7 -0
  300. package/esm/components/index.js +14 -5
  301. package/esm/components/index.js.map +7 -0
  302. package/esm/components/renderers/defaultClassedRenderers.js +41 -46
  303. package/esm/components/renderers/defaultClassedRenderers.js.map +7 -0
  304. package/esm/components/renderers/index.js +16 -5
  305. package/esm/components/renderers/index.js.map +7 -0
  306. package/esm/components/renderers/renderRowsLoader.js +10 -10
  307. package/esm/components/renderers/renderRowsLoader.js.map +7 -0
  308. package/esm/components/tableContext.js +7 -5
  309. package/esm/components/tableContext.js.map +7 -0
  310. package/esm/defaultPlugins.js +15 -8
  311. package/esm/defaultPlugins.js.map +7 -0
  312. package/esm/index.js +63 -27
  313. package/esm/index.js.map +7 -0
  314. package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +71 -101
  315. package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +7 -0
  316. package/esm/plugins/body-header-scroll-sync/index.js +6 -1
  317. package/esm/plugins/body-header-scroll-sync/index.js.map +7 -0
  318. package/esm/plugins/column-dnd/DndColumnsPlugin.js +69 -68
  319. package/esm/plugins/column-dnd/DndColumnsPlugin.js.map +7 -0
  320. package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +16 -18
  321. package/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +7 -0
  322. package/esm/plugins/column-dnd/index.js +6 -1
  323. package/esm/plugins/column-dnd/index.js.map +7 -0
  324. package/esm/plugins/column-sizing/ColumnSizingPlugin.js +20 -37
  325. package/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +7 -0
  326. package/esm/plugins/column-sizing/columnMeasurerTransformer.js +16 -42
  327. package/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +7 -0
  328. package/esm/plugins/column-sizing/ext-points/decorateColumn.js +9 -7
  329. package/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +7 -0
  330. package/esm/plugins/column-sizing/ext-points/getTableProps.js +23 -43
  331. package/esm/plugins/column-sizing/ext-points/getTableProps.js.map +7 -0
  332. package/esm/plugins/column-sizing/getColumnNameFromProperty.js +8 -7
  333. package/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +7 -0
  334. package/esm/plugins/column-sizing/index.js +6 -1
  335. package/esm/plugins/column-sizing/index.js.map +7 -0
  336. package/esm/plugins/column-sizing/useColumnSizeService.js +34 -71
  337. package/esm/plugins/column-sizing/useColumnSizeService.js.map +7 -0
  338. package/esm/plugins/column-sizing/useStylesheetHelpers.js +64 -171
  339. package/esm/plugins/column-sizing/useStylesheetHelpers.js.map +7 -0
  340. package/esm/plugins/column-sizing/utils.js +23 -21
  341. package/esm/plugins/column-sizing/utils.js.map +7 -0
  342. package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +8 -7
  343. package/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +7 -0
  344. package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +28 -43
  345. package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +7 -0
  346. package/esm/plugins/custom-cell-renderer/getRendererComponent.js +22 -44
  347. package/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +7 -0
  348. package/esm/plugins/custom-cell-renderer/index.js +6 -1
  349. package/esm/plugins/custom-cell-renderer/index.js.map +7 -0
  350. package/esm/plugins/editable/EditableComponents/ComboBox.js +20 -46
  351. package/esm/plugins/editable/EditableComponents/ComboBox.js.map +7 -0
  352. package/esm/plugins/editable/EditableComponents/TextBox.js +26 -68
  353. package/esm/plugins/editable/EditableComponents/TextBox.js.map +7 -0
  354. package/esm/plugins/editable/EditableComponents/index.js +8 -2
  355. package/esm/plugins/editable/EditableComponents/index.js.map +7 -0
  356. package/esm/plugins/editable/EditablePlugin.js +27 -63
  357. package/esm/plugins/editable/EditablePlugin.js.map +7 -0
  358. package/esm/plugins/editable/decorateEditable.js +32 -68
  359. package/esm/plugins/editable/decorateEditable.js.map +7 -0
  360. package/esm/plugins/editable/getEditorComponent.js +39 -66
  361. package/esm/plugins/editable/getEditorComponent.js.map +7 -0
  362. package/esm/plugins/editable/index.js +9 -3
  363. package/esm/plugins/editable/index.js.map +7 -0
  364. package/esm/plugins/expandable-grid/ExpandableColumn.js +82 -133
  365. package/esm/plugins/expandable-grid/ExpandableColumn.js.map +7 -0
  366. package/esm/plugins/expandable-grid/ExpandablePlugin.js +81 -160
  367. package/esm/plugins/expandable-grid/ExpandablePlugin.js.map +7 -0
  368. package/esm/plugins/expandable-grid/ExpandedRow.js +86 -124
  369. package/esm/plugins/expandable-grid/ExpandedRow.js.map +7 -0
  370. package/esm/plugins/expandable-grid/ExpandedRowExtra.js +25 -44
  371. package/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +7 -0
  372. package/esm/plugins/expandable-grid/index.js +8 -2
  373. package/esm/plugins/expandable-grid/index.js.map +7 -0
  374. package/esm/plugins/expandable-grid/useExpandGridState.js +14 -25
  375. package/esm/plugins/expandable-grid/useExpandGridState.js.map +7 -0
  376. package/esm/plugins/export-data/ExportDataPlugin.js +52 -103
  377. package/esm/plugins/export-data/ExportDataPlugin.js.map +7 -0
  378. package/esm/plugins/export-data/index.js +6 -1
  379. package/esm/plugins/export-data/index.js.map +7 -0
  380. package/esm/plugins/filterable/FilterablePlugin.js +22 -44
  381. package/esm/plugins/filterable/FilterablePlugin.js.map +7 -0
  382. package/esm/plugins/filterable/addFilterToColumn.js +11 -20
  383. package/esm/plugins/filterable/addFilterToColumn.js.map +7 -0
  384. package/esm/plugins/filterable/components/FilterableHeader.js +85 -95
  385. package/esm/plugins/filterable/components/FilterableHeader.js.map +7 -0
  386. package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +83 -103
  387. package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +7 -0
  388. package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +68 -63
  389. package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +7 -0
  390. package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +108 -116
  391. package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +7 -0
  392. package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +84 -106
  393. package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +7 -0
  394. package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js +6 -3
  395. package/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +7 -0
  396. package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +16 -12
  397. package/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +7 -0
  398. package/esm/plugins/filterable/filterableFormatter.js +32 -45
  399. package/esm/plugins/filterable/filterableFormatter.js.map +7 -0
  400. package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +29 -44
  401. package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +7 -0
  402. package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +11 -13
  403. package/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +7 -0
  404. package/esm/plugins/filterable/helper.js +42 -62
  405. package/esm/plugins/filterable/helper.js.map +7 -0
  406. package/esm/plugins/filterable/index.js +6 -1
  407. package/esm/plugins/filterable/index.js.map +7 -0
  408. package/esm/plugins/filterable/useFilterableState.js +33 -54
  409. package/esm/plugins/filterable/useFilterableState.js.map +7 -0
  410. package/esm/plugins/grouping-by/GroupingByPlugin.js +10 -14
  411. package/esm/plugins/grouping-by/GroupingByPlugin.js.map +7 -0
  412. package/esm/plugins/grouping-grid/GroupingPlugin.js +53 -94
  413. package/esm/plugins/grouping-grid/GroupingPlugin.js.map +7 -0
  414. package/esm/plugins/grouping-grid/walkStrategy.js +17 -22
  415. package/esm/plugins/grouping-grid/walkStrategy.js.map +7 -0
  416. package/esm/plugins/index.js +39 -19
  417. package/esm/plugins/index.js.map +7 -0
  418. package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +31 -74
  419. package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +7 -0
  420. package/esm/plugins/infinite-scrolling/index.js +6 -1
  421. package/esm/plugins/infinite-scrolling/index.js.map +7 -0
  422. package/esm/plugins/pagination/PaginationPlugin.js +42 -75
  423. package/esm/plugins/pagination/PaginationPlugin.js.map +7 -0
  424. package/esm/plugins/pagination/components/Pagination.js +25 -27
  425. package/esm/plugins/pagination/components/Pagination.js.map +7 -0
  426. package/esm/plugins/pagination/components/Paginator.js +29 -35
  427. package/esm/plugins/pagination/components/Paginator.js.map +7 -0
  428. package/esm/plugins/pagination/components/PerPageDropdown.js +22 -54
  429. package/esm/plugins/pagination/components/PerPageDropdown.js.map +7 -0
  430. package/esm/plugins/pagination/helper.js +16 -19
  431. package/esm/plugins/pagination/helper.js.map +7 -0
  432. package/esm/plugins/pagination/index.js +6 -1
  433. package/esm/plugins/pagination/index.js.map +7 -0
  434. package/esm/plugins/pagination/usePaginationState.js +15 -28
  435. package/esm/plugins/pagination/usePaginationState.js.map +7 -0
  436. package/esm/plugins/resizable/ResizablePlugin.js +20 -45
  437. package/esm/plugins/resizable/ResizablePlugin.js.map +7 -0
  438. package/esm/plugins/resizable/decorateResizable.js +19 -41
  439. package/esm/plugins/resizable/decorateResizable.js.map +7 -0
  440. package/esm/plugins/resizable/index.js +6 -1
  441. package/esm/plugins/resizable/index.js.map +7 -0
  442. package/esm/plugins/resizable/useResizeHandle.js +24 -39
  443. package/esm/plugins/resizable/useResizeHandle.js.map +7 -0
  444. package/esm/plugins/resizable/utils.js +20 -18
  445. package/esm/plugins/resizable/utils.js.map +7 -0
  446. package/esm/plugins/row-dnd/DndRowsPlugin.js +73 -71
  447. package/esm/plugins/row-dnd/DndRowsPlugin.js.map +7 -0
  448. package/esm/plugins/row-dnd/index.js +6 -1
  449. package/esm/plugins/row-dnd/index.js.map +7 -0
  450. package/esm/plugins/selectable/SelectablePlugin.js +64 -117
  451. package/esm/plugins/selectable/SelectablePlugin.js.map +7 -0
  452. package/esm/plugins/selectable/addSelectableColumn.js +39 -57
  453. package/esm/plugins/selectable/addSelectableColumn.js.map +7 -0
  454. package/esm/plugins/selectable/helper.js +19 -25
  455. package/esm/plugins/selectable/helper.js.map +7 -0
  456. package/esm/plugins/selectable/index.js +6 -1
  457. package/esm/plugins/selectable/index.js.map +7 -0
  458. package/esm/plugins/selectable/selectableFormatter.js +54 -97
  459. package/esm/plugins/selectable/selectableFormatter.js.map +7 -0
  460. package/esm/plugins/selectable/useSelectableState.js +34 -78
  461. package/esm/plugins/selectable/useSelectableState.js.map +7 -0
  462. package/esm/plugins/sortable/SortablePlugin.js +30 -43
  463. package/esm/plugins/sortable/SortablePlugin.js.map +7 -0
  464. package/esm/plugins/sortable/checkIfSortable.js +8 -9
  465. package/esm/plugins/sortable/checkIfSortable.js.map +7 -0
  466. package/esm/plugins/sortable/index.js +6 -1
  467. package/esm/plugins/sortable/index.js.map +7 -0
  468. package/esm/plugins/sortable/sortHeaderFormatter.js +27 -43
  469. package/esm/plugins/sortable/sortHeaderFormatter.js.map +7 -0
  470. package/esm/plugins/sortable/sortTree.js +13 -24
  471. package/esm/plugins/sortable/sortTree.js.map +7 -0
  472. package/esm/plugins/sortable/sorter.js +112 -163
  473. package/esm/plugins/sortable/sorter.js.map +7 -0
  474. package/esm/plugins/sortable/useSortableState.js +22 -49
  475. package/esm/plugins/sortable/useSortableState.js.map +7 -0
  476. package/esm/plugins/toolbar/RowRenderer.js +40 -61
  477. package/esm/plugins/toolbar/RowRenderer.js.map +7 -0
  478. package/esm/plugins/toolbar/ToolbarPlugin.js +19 -23
  479. package/esm/plugins/toolbar/ToolbarPlugin.js.map +7 -0
  480. package/esm/plugins/toolbar/ToolbarTrigger.js +59 -57
  481. package/esm/plugins/toolbar/ToolbarTrigger.js.map +7 -0
  482. package/esm/plugins/toolbar/index.js +6 -1
  483. package/esm/plugins/toolbar/index.js.map +7 -0
  484. package/esm/plugins/virtualization/AutoHeightList.js +30 -40
  485. package/esm/plugins/virtualization/AutoHeightList.js.map +7 -0
  486. package/esm/plugins/virtualization/VirtualizationPlugin.js +55 -84
  487. package/esm/plugins/virtualization/VirtualizationPlugin.js.map +7 -0
  488. package/esm/plugins/virtualization/VirtualizedBody.js +94 -132
  489. package/esm/plugins/virtualization/VirtualizedBody.js.map +7 -0
  490. package/esm/plugins/virtualization/VirtualizedBodyRow.js +10 -15
  491. package/esm/plugins/virtualization/VirtualizedBodyRow.js.map +7 -0
  492. package/esm/plugins/virtualization/helper.js +6 -3
  493. package/esm/plugins/virtualization/helper.js.map +7 -0
  494. package/esm/plugins/virtualization/index.js +6 -1
  495. package/esm/plugins/virtualization/index.js.map +7 -0
  496. package/esm/renders/CellWithAddons.js +69 -40
  497. package/esm/renders/CellWithAddons.js.map +7 -0
  498. package/esm/renders/index.js +8 -2
  499. package/esm/renders/index.js.map +7 -0
  500. package/esm/renders/styled.js +49 -16
  501. package/esm/renders/styled.js.map +7 -0
  502. package/esm/rowSizes.js +15 -6
  503. package/esm/rowSizes.js.map +7 -0
  504. package/esm/utilities/DataGridUtilities.json +1315 -0
  505. package/esm/utilities/getPluginsFromProps.js +25 -24
  506. package/esm/utilities/getPluginsFromProps.js.map +7 -0
  507. package/esm/utilities/getScrollbarSize.js +15 -21
  508. package/esm/utilities/getScrollbarSize.js.map +7 -0
  509. package/esm/utilities/normalizeData.js +15 -24
  510. package/esm/utilities/normalizeData.js.map +7 -0
  511. package/package.json +20 -20
  512. package/types/DSDataGrid.d.ts +2 -116
  513. package/types/DataGridImpl.d.ts +3 -2
  514. package/types/PaginatedDataGrid.d.ts +1 -2
  515. package/types/columns/IconColumn.d.ts +3 -2
  516. package/types/components/BodyCell.d.ts +13 -12
  517. package/types/components/ColumnVisibilityMenuOption.d.ts +2 -2
  518. package/types/components/ColumnsOptionsMenuSection.d.ts +1 -0
  519. package/types/components/HeaderCell.d.ts +10 -10
  520. package/types/components/NoResults.d.ts +2 -2
  521. package/types/components/RowsLoader.d.ts +2 -2
  522. package/types/components/Table.d.ts +6 -11
  523. package/types/components/TableBody.d.ts +3 -8
  524. package/types/components/TableHeader.d.ts +2 -1
  525. package/types/components/footer/addOptionalFooterComponents.d.ts +1 -0
  526. package/types/components/header/PrimaryControls.d.ts +1 -0
  527. package/types/components/header/addOptionalHeaderComponents.d.ts +1 -1
  528. package/types/components/renderers/index.d.ts +1 -1
  529. package/types/components/renderers/renderRowsLoader.d.ts +1 -1
  530. package/types/index.d.ts +7 -8
  531. package/types/plugins/body-header-scroll-sync/index.d.ts +1 -1
  532. package/types/plugins/column-dnd/index.d.ts +1 -1
  533. package/types/plugins/column-sizing/getColumnNameFromProperty.d.ts +2 -1
  534. package/types/plugins/column-sizing/index.d.ts +1 -1
  535. package/types/plugins/column-sizing/useColumnSizeService.d.ts +2 -1
  536. package/types/plugins/custom-cell-renderer/addCustomRendererToCell.d.ts +1 -0
  537. package/types/plugins/custom-cell-renderer/getRendererComponent.d.ts +1 -0
  538. package/types/plugins/custom-cell-renderer/index.d.ts +1 -1
  539. package/types/plugins/editable/EditableComponents/ComboBox.d.ts +3 -1
  540. package/types/plugins/editable/EditableComponents/TextBox.d.ts +3 -1
  541. package/types/plugins/editable/getEditorComponent.d.ts +1 -0
  542. package/types/plugins/editable/index.d.ts +2 -2
  543. package/types/plugins/expandable-grid/ExpandableColumn.d.ts +3 -2
  544. package/types/plugins/expandable-grid/ExpandedRow.d.ts +1 -0
  545. package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +1 -0
  546. package/types/plugins/expandable-grid/index.d.ts +2 -2
  547. package/types/plugins/export-data/index.d.ts +1 -1
  548. package/types/plugins/filterable/components/FilterableHeader.d.ts +15 -15
  549. package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +1 -0
  550. package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +1 -0
  551. package/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +2 -1
  552. package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +1 -0
  553. package/types/plugins/filterable/components/filterable-menus/getFilterMenuByType.d.ts +2 -1
  554. package/types/plugins/filterable/filterableFormatter.d.ts +3 -2
  555. package/types/plugins/filterable/filtering-helper/filterRowsByQuery.d.ts +2 -1
  556. package/types/plugins/filterable/filtering-helper/strategiesOperators.d.ts +2 -2
  557. package/types/plugins/filterable/index.d.ts +1 -1
  558. package/types/plugins/index.d.ts +16 -16
  559. package/types/plugins/infinite-scrolling/index.d.ts +1 -1
  560. package/types/plugins/pagination/components/Paginator.d.ts +1 -0
  561. package/types/plugins/pagination/components/PerPageDropdown.d.ts +1 -0
  562. package/types/plugins/pagination/helper.d.ts +3 -2
  563. package/types/plugins/pagination/index.d.ts +1 -1
  564. package/types/plugins/resizable/index.d.ts +1 -1
  565. package/types/plugins/row-dnd/index.d.ts +1 -1
  566. package/types/plugins/selectable/index.d.ts +1 -1
  567. package/types/plugins/selectable/selectableFormatter.d.ts +1 -0
  568. package/types/plugins/sortable/index.d.ts +1 -1
  569. package/types/plugins/sortable/sortHeaderFormatter.d.ts +1 -0
  570. package/types/plugins/sortable/sortTree.d.ts +1 -0
  571. package/types/plugins/sortable/sorter.d.ts +1 -1
  572. package/types/plugins/toolbar/index.d.ts +1 -1
  573. package/types/plugins/virtualization/AutoHeightList.d.ts +1 -1
  574. package/types/plugins/virtualization/VirtualizedBody.d.ts +1 -0
  575. package/types/plugins/virtualization/VirtualizedBodyRow.d.ts +2 -2
  576. package/types/plugins/virtualization/index.d.ts +1 -1
  577. package/types/utilities/getPluginsFromProps.d.ts +2 -1
@@ -1,28 +1,39 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- require('core-js/modules/web.dom-collections.iterator.js');
7
- require('core-js/modules/esnext.async-iterator.filter.js');
8
- require('core-js/modules/esnext.iterator.constructor.js');
9
- require('core-js/modules/esnext.iterator.filter.js');
10
- require('core-js/modules/esnext.async-iterator.for-each.js');
11
- require('core-js/modules/esnext.iterator.for-each.js');
12
- var React = require('react');
13
- var uuid = require('uuid');
14
- var helper = require('./helper.js');
15
-
16
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
-
18
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
19
-
20
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
-
22
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var useFilterableState_exports = {};
29
+ __export(useFilterableState_exports, {
30
+ useFilterableState: () => useFilterableState
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_react = require("react");
34
+ var import_uuid = require("uuid");
35
+ var import_helper = require("./helper");
24
36
  const noop = () => null;
25
-
26
37
  function useFilterableState(grid) {
27
38
  const {
28
39
  filters: filtersProp,
@@ -31,76 +42,61 @@ function useFilterableState(grid) {
31
42
  onRemoveAllFilters = noop,
32
43
  onFiltersChange = noop
33
44
  } = grid.props;
34
- const [filters, setFilters] = React.useState(filtersProp || []);
35
- React.useEffect(() => {
45
+ const [filters, setFilters] = (0, import_react.useState)(filtersProp || []);
46
+ (0, import_react.useEffect)(() => {
36
47
  if (filtersProp && filtersProp !== filters) {
37
48
  setFilters(filtersProp);
38
49
  }
39
50
  }, [filtersProp]);
40
- const queryFromFilters = React.useMemo(() => helper.parseFiltersToQuery(filters || []), [filters]);
41
-
42
- const handleFiltersChange = nextFilters => {
51
+ const queryFromFilters = (0, import_react.useMemo)(() => (0, import_helper.parseFiltersToQuery)(filters || []), [
52
+ filters
53
+ ]);
54
+ const handleFiltersChange = (nextFilters) => {
43
55
  const {
44
- refs: {
45
- body
46
- }
56
+ refs: { body }
47
57
  } = grid.getInstance();
48
58
  body.current.scrollTop = 0;
49
59
  setFilters(nextFilters);
50
- grid.observeRows(rows => onFiltersChange(nextFilters, queryFromFilters, rows));
60
+ grid.observeRows((rows) => onFiltersChange(nextFilters, queryFromFilters, rows));
51
61
  };
52
-
53
62
  const addFilter = (filter, column) => {
54
63
  let hasBeenCalled = false;
55
-
56
- const trimmedFilter = _objectSpread(_objectSpread({}, filter), {}, {
64
+ const trimmedFilter = {
65
+ ...filter,
57
66
  value: String(filter.value).trim()
58
- });
59
- /* eslint-disable indent */
60
-
61
-
62
- const parsedFilter = !filter.group ? _objectSpread(_objectSpread({}, trimmedFilter), {}, {
67
+ };
68
+ const parsedFilter = !filter.group ? {
69
+ ...trimmedFilter,
63
70
  value: String(filter.value).trim(),
64
- group: 'all',
65
- label: 'All',
66
- id: uuid.v4()
67
- }) : _objectSpread(_objectSpread({}, trimmedFilter), {}, {
71
+ group: "all",
72
+ label: "All",
73
+ id: (0, import_uuid.v4)()
74
+ } : {
75
+ ...trimmedFilter,
68
76
  value: String(filter.value).trim(),
69
- id: uuid.v4(),
77
+ id: (0, import_uuid.v4)(),
70
78
  label: column && column.filterLabel || trimmedFilter.label,
71
79
  originalProperty: column.originalProperty || column.property,
72
- customValue: helper.getFilterValue(trimmedFilter, column)
73
- });
74
- /* eslint-enable indent */
75
-
76
- setFilters(prevFilters => {
77
- // This was setted for an issue that was recalling this function on the handleFiltersChange
80
+ customValue: (0, import_helper.getFilterValue)(trimmedFilter, column)
81
+ };
82
+ setFilters((prevFilters) => {
78
83
  if (hasBeenCalled) {
79
84
  return;
80
85
  }
81
-
82
86
  hasBeenCalled = true;
83
- const nextFilters = helper.buildFilterArray(parsedFilter, prevFilters);
84
- handleFiltersChange(nextFilters);
87
+ const nextFilters = (0, import_helper.buildFilterArray)(parsedFilter, prevFilters);
88
+ handleFiltersChange(nextFilters, true);
85
89
  onAddFilter(parsedFilter, nextFilters, column);
86
90
  });
87
91
  };
88
-
89
- const removeFilter = _ref => {
90
- let {
91
- group,
92
- pill,
93
- nextFilters
94
- } = _ref;
92
+ const removeFilter = ({ group, pill, nextFilters }) => {
95
93
  onRemoveFilter(group, pill.value, nextFilters);
96
94
  handleFiltersChange(nextFilters);
97
95
  };
98
-
99
96
  const removeAllFilters = () => {
100
97
  onRemoveAllFilters();
101
98
  handleFiltersChange([]);
102
99
  };
103
-
104
100
  return {
105
101
  actions: {
106
102
  addFilter,
@@ -113,5 +109,5 @@ function useFilterableState(grid) {
113
109
  }
114
110
  };
115
111
  }
116
-
117
- exports.useFilterableState = useFilterableState;
112
+ module.exports = __toCommonJS(useFilterableState_exports);
113
+ //# sourceMappingURL=useFilterableState.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/plugins/filterable/useFilterableState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { useMemo, useState, useEffect } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n buildFilterArray,\n getFilterValue,\n parseFiltersToQuery,\n} from './helper';\n\nconst noop = () => null;\n\nexport function useFilterableState(grid) {\n const {\n filters: filtersProp,\n onAddFilter = noop,\n onRemoveFilter = noop,\n onRemoveAllFilters = noop,\n onFiltersChange = noop,\n } = grid.props;\n\n const [filters, setFilters] = useState(filtersProp || []);\n\n useEffect(() => {\n if (filtersProp && filtersProp !== filters) {\n setFilters(filtersProp);\n }\n }, [filtersProp]);\n\n const queryFromFilters = useMemo(() => parseFiltersToQuery(filters || []), [\n filters,\n ]);\n\n const handleFiltersChange = (nextFilters) => {\n const {\n refs: { body },\n } = grid.getInstance();\n body.current.scrollTop = 0;\n setFilters(nextFilters);\n grid.observeRows((rows) =>\n onFiltersChange(nextFilters, queryFromFilters, rows),\n );\n };\n\n const addFilter = (filter, column) => {\n let hasBeenCalled = false;\n const trimmedFilter = {\n ...filter,\n value: String(filter.value).trim(),\n };\n /* eslint-disable indent */\n const parsedFilter = !filter.group\n ? {\n ...trimmedFilter,\n value: String(filter.value).trim(),\n group: 'all',\n label: 'All',\n id: uuidv4(),\n }\n : {\n ...trimmedFilter,\n value: String(filter.value).trim(),\n id: uuidv4(),\n label: (column && column.filterLabel) || trimmedFilter.label,\n originalProperty: column.originalProperty || column.property,\n customValue: getFilterValue(trimmedFilter, column),\n };\n /* eslint-enable indent */\n setFilters((prevFilters) => {\n // This was setted for an issue that was recalling this function on the handleFiltersChange\n if (hasBeenCalled) {\n return;\n }\n hasBeenCalled = true;\n\n const nextFilters = buildFilterArray(parsedFilter, prevFilters);\n handleFiltersChange(nextFilters, true);\n onAddFilter(parsedFilter, nextFilters, column);\n });\n };\n\n const removeFilter = ({ group, pill, nextFilters }) => {\n onRemoveFilter(group, pill.value, nextFilters);\n handleFiltersChange(nextFilters);\n };\n\n const removeAllFilters = () => {\n onRemoveAllFilters();\n handleFiltersChange([]);\n };\n return {\n actions: {\n addFilter,\n removeFilter,\n removeAllFilters,\n },\n state: {\n query: queryFromFilters,\n filters,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA6C;AAC7C,kBAA6B;AAC7B,oBAIO;AAEP,MAAM,OAAO,MAAM;AAEZ,4BAA4B,MAAM;AACvC,QAAM;AAAA,IACJ,SAAS;AAAA,IACT,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,MAChB,KAAK;AAET,QAAM,CAAC,SAAS,cAAc,2BAAS,eAAe;AAEtD,8BAAU,MAAM;AACd,QAAI,eAAe,gBAAgB,SAAS;AAC1C,iBAAW;AAAA;AAAA,KAEZ,CAAC;AAEJ,QAAM,mBAAmB,0BAAQ,MAAM,uCAAoB,WAAW,KAAK;AAAA,IACzE;AAAA;AAGF,QAAM,sBAAsB,CAAC,gBAAgB;AAC3C,UAAM;AAAA,MACJ,MAAM,EAAE;AAAA,QACN,KAAK;AACT,SAAK,QAAQ,YAAY;AACzB,eAAW;AACX,SAAK,YAAY,CAAC,SAChB,gBAAgB,aAAa,kBAAkB;AAAA;AAInD,QAAM,YAAY,CAAC,QAAQ,WAAW;AACpC,QAAI,gBAAgB;AACpB,UAAM,gBAAgB;AAAA,SACjB;AAAA,MACH,OAAO,OAAO,OAAO,OAAO;AAAA;AAG9B,UAAM,eAAe,CAAC,OAAO,QACzB;AAAA,SACK;AAAA,MACH,OAAO,OAAO,OAAO,OAAO;AAAA,MAC5B,OAAO;AAAA,MACP,OAAO;AAAA,MACP,IAAI;AAAA,QAEN;AAAA,SACK;AAAA,MACH,OAAO,OAAO,OAAO,OAAO;AAAA,MAC5B,IAAI;AAAA,MACJ,OAAQ,UAAU,OAAO,eAAgB,cAAc;AAAA,MACvD,kBAAkB,OAAO,oBAAoB,OAAO;AAAA,MACpD,aAAa,kCAAe,eAAe;AAAA;AAGjD,eAAW,CAAC,gBAAgB;AAE1B,UAAI,eAAe;AACjB;AAAA;AAEF,sBAAgB;AAEhB,YAAM,cAAc,oCAAiB,cAAc;AACnD,0BAAoB,aAAa;AACjC,kBAAY,cAAc,aAAa;AAAA;AAAA;AAI3C,QAAM,eAAe,CAAC,EAAE,OAAO,MAAM,kBAAkB;AACrD,mBAAe,OAAO,KAAK,OAAO;AAClC,wBAAoB;AAAA;AAGtB,QAAM,mBAAmB,MAAM;AAC7B;AACA,wBAAoB;AAAA;AAEtB,SAAO;AAAA,IACL,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,20 +1,41 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.map.js');
6
- require('core-js/modules/esnext.iterator.map.js');
7
- var createInstancePlugin = require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
8
- var lodash = require('lodash');
9
-
10
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
-
12
- var createInstancePlugin__default = /*#__PURE__*/_interopDefaultLegacy(createInstancePlugin);
13
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var GroupingByPlugin_exports = {};
29
+ __export(GroupingByPlugin_exports, {
30
+ GroupingByPlugin: () => GroupingByPlugin
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_createInstancePlugin = require("@elliemae/ds-shared/createDataInstance/createInstancePlugin");
34
+ var import_lodash = require("lodash");
14
35
  const groupedByData = (groupedBy, composedRows) => {
15
- const grouped = lodash.groupBy(composedRows, groupedBy);
36
+ const grouped = (0, import_lodash.groupBy)(composedRows, groupedBy);
16
37
  return Object.keys(grouped).map((c, key) => ({
17
- id: "grouped-by-".concat(groupedBy, "-").concat(key),
38
+ id: `grouped-by-${groupedBy}-${key}`,
18
39
  key: groupedBy,
19
40
  value: c,
20
41
  children: grouped[c],
@@ -22,19 +43,15 @@ const groupedByData = (groupedBy, composedRows) => {
22
43
  isGroup: true
23
44
  }));
24
45
  };
25
-
26
- const GroupingByPlugin = createInstancePlugin__default["default"]('groupedByRows', {
46
+ const GroupingByPlugin = (0, import_createInstancePlugin.createInstancePlugin)("groupedByRows", {
27
47
  decorateGrid(grid) {
28
48
  const {
29
49
  composedRows,
30
- props: {
31
- groupedBy
32
- }
50
+ props: { groupedBy }
33
51
  } = grid.getInstance();
34
52
  grid.composedRows = groupedBy ? groupedByData(groupedBy, composedRows) : composedRows;
35
53
  return grid;
36
54
  }
37
-
38
55
  });
39
-
40
- exports.GroupingByPlugin = GroupingByPlugin;
56
+ module.exports = __toCommonJS(GroupingByPlugin_exports);
57
+ //# sourceMappingURL=GroupingByPlugin.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/plugins/grouping-by/GroupingByPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { groupBy } from 'lodash';\n\nconst groupedByData = (groupedBy, composedRows) => {\n const grouped = groupBy(composedRows, groupedBy);\n return Object.keys(grouped).map((c, key) => ({\n id: `grouped-by-${groupedBy}-${key}`,\n key: groupedBy,\n value: c,\n children: grouped[c],\n _isGroup: true,\n isGroup: true,\n }));\n};\n\nexport const GroupingByPlugin = createInstancePlugin('groupedByRows', {\n decorateGrid(grid) {\n const {\n composedRows,\n props: { groupedBy },\n } = grid.getInstance();\n grid.composedRows = groupedBy\n ? groupedByData(groupedBy, composedRows)\n : composedRows;\n return grid;\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAqC;AACrC,oBAAwB;AAExB,MAAM,gBAAgB,CAAC,WAAW,iBAAiB;AACjD,QAAM,UAAU,2BAAQ,cAAc;AACtC,SAAO,OAAO,KAAK,SAAS,IAAI,CAAC,GAAG,QAAS;AAAA,IAC3C,IAAI,cAAc,aAAa;AAAA,IAC/B,KAAK;AAAA,IACL,OAAO;AAAA,IACP,UAAU,QAAQ;AAAA,IAClB,UAAU;AAAA,IACV,SAAS;AAAA;AAAA;AAIN,MAAM,mBAAmB,sDAAqB,iBAAiB;AAAA,EACpE,aAAa,MAAM;AACjB,UAAM;AAAA,MACJ;AAAA,MACA,OAAO,EAAE;AAAA,QACP,KAAK;AACT,SAAK,eAAe,YAChB,cAAc,WAAW,gBACzB;AACJ,WAAO;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,149 +1,126 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
8
- require('core-js/modules/esnext.async-iterator.filter.js');
9
- require('core-js/modules/esnext.iterator.constructor.js');
10
- require('core-js/modules/esnext.iterator.filter.js');
11
- require('core-js/modules/esnext.async-iterator.map.js');
12
- require('core-js/modules/esnext.iterator.map.js');
13
- require('core-js/modules/esnext.async-iterator.reduce.js');
14
- require('core-js/modules/esnext.iterator.reduce.js');
15
- require('core-js/modules/esnext.async-iterator.for-each.js');
16
- require('core-js/modules/esnext.iterator.for-each.js');
17
- var React = require('react');
18
- var createInstancePlugin = require('@elliemae/ds-shared/createDataInstance/createInstancePlugin');
19
- var dsClassnames = require('@elliemae/ds-classnames');
20
- var reactWindow = require('react-window');
21
- var walkStrategy = require('./walkStrategy.js');
22
- var rowSizes = require('../../rowSizes.js');
23
- var blockNames = require('../../blockNames.js');
24
- var jsxRuntime = require('react/jsx-runtime');
25
-
26
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
27
-
28
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
29
- var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
30
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
31
- var createInstancePlugin__default = /*#__PURE__*/_interopDefaultLegacy(createInstancePlugin);
32
-
33
- const _excluded = ["isExpanded"];
34
-
35
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36
-
37
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
38
- const blockName = "".concat(blockNames.dataGridBlockName, "-group-row-header");
39
- const GroupRowHeaderWrapper = dsClassnames.aggregatedClasses('div')(blockName);
40
- const GroupRowHeaderTitle = dsClassnames.aggregatedClasses('div')(blockName, 'title');
41
- const GroupingPlugin = createInstancePlugin__default["default"]('groupedRows', {
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var GroupingPlugin_exports = {};
29
+ __export(GroupingPlugin_exports, {
30
+ GroupingPlugin: () => GroupingPlugin
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_react = __toESM(require("react"));
34
+ var import_createInstancePlugin = require("@elliemae/ds-shared/createDataInstance/createInstancePlugin");
35
+ var import_ds_classnames = require("@elliemae/ds-classnames");
36
+ var import_react_window = require("react-window");
37
+ var import_walkStrategy = require("./walkStrategy");
38
+ var import_rowSizes = require("../../rowSizes");
39
+ var import_blockNames = require("../../blockNames");
40
+ const blockName = `${import_blockNames.dataGridBlockName}-group-row-header`;
41
+ const GroupRowHeaderWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
42
+ const GroupRowHeaderTitle = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "title");
43
+ const GroupingPlugin = (0, import_createInstancePlugin.createInstancePlugin)("groupedRows", {
42
44
  decorateGrid(grid) {
43
- const {
44
- columns,
45
- composedRows
46
- } = grid.getInstance(); // eslint-disable-next-line react-hooks/rules-of-hooks
47
-
48
- const detailColumns = React.useMemo(() => columns.map(column => _objectSpread(_objectSpread({}, column), {}, {
45
+ const { columns, composedRows } = grid.getInstance();
46
+ const detailColumns = (0, import_react.useMemo)(() => columns.map((column) => ({
47
+ ...column,
49
48
  customRenderer: column.detailCustomRenderer
50
- })).filter(col => !col.expandableColumn), [columns]);
49
+ })).filter((col) => !col.expandableColumn), [columns]);
51
50
  const flatRows = [];
52
- walkStrategy.walkTreeStrategy({
51
+ (0, import_walkStrategy.walkTreeStrategy)({
53
52
  data: composedRows,
54
- cb: n => flatRows.push(n)
53
+ cb: (n) => flatRows.push(n)
55
54
  });
56
55
  return {
57
56
  detailColumns,
58
57
  composedRows: flatRows
59
58
  };
60
59
  },
61
-
62
60
  getBodyProps(bodyProps, grid) {
63
- const {
64
- composedRows: rows
65
- } = grid.getInstance(); // implementation of expandable row single column with aggregation
66
-
67
- const getItemSize = index => {
61
+ const { composedRows: rows } = grid.getInstance();
62
+ const getItemSize = (index) => {
68
63
  const rowData = rows[index];
69
- if (!rowData) return rowSizes.RowSizes.normal;
70
- return rowData._isGroup || rowData.isGroup ? rowSizes.RowSizes.compact : rowSizes.RowSizes.normal;
71
- }; // eslint-disable-next-line no-unused-vars
72
-
73
-
64
+ if (!rowData)
65
+ return import_rowSizes.RowSizes.normal;
66
+ return rowData._isGroup || rowData.isGroup ? import_rowSizes.RowSizes.compact : import_rowSizes.RowSizes.normal;
67
+ };
74
68
  const getListHeight = () => {
75
69
  const size = rows.reduce((h, r) => {
76
- const rowHeight = r._isGroup || r.isGroup ? rowSizes.RowSizes.compact : rowSizes.RowSizes.normal;
70
+ const rowHeight = r._isGroup || r.isGroup ? import_rowSizes.RowSizes.compact : import_rowSizes.RowSizes.normal;
77
71
  return h + rowHeight;
78
72
  }, 0);
79
73
  return size;
80
74
  };
81
-
82
- return _objectSpread(_objectSpread({}, bodyProps), {}, {
75
+ return {
76
+ ...bodyProps,
83
77
  getListHeight,
84
- listComponent: reactWindow.VariableSizeList,
85
- listProps: {
86
- itemSize: getItemSize
87
- }
88
- });
78
+ listComponent: import_react_window.VariableSizeList,
79
+ listProps: { itemSize: getItemSize }
80
+ };
89
81
  },
90
-
91
82
  composeRows: (rows, grid) => {
92
83
  const {
93
84
  composedRows,
94
- props: {
95
- rowKey
96
- }
85
+ props: { rowKey }
97
86
  } = grid.getInstance();
98
-
99
87
  if (Array.isArray(rows)) {
100
- const filterIds = rows.map(r => r.data[rowKey]);
101
- return composedRows.filter(c => filterIds.includes(c.data[rowKey])).map(r => _objectSpread(_objectSpread({}, r.data), {}, {
102
- children: Array.isArray(r.data.children) ? r.data.children.filter(c => filterIds.includes(c[rowKey])) : r.data.children,
88
+ const filterIds = rows.map((r) => r.data[rowKey]);
89
+ return composedRows.filter((c) => filterIds.includes(c.data[rowKey])).map((r) => ({
90
+ ...r.data,
91
+ children: Array.isArray(r.data.children) ? r.data.children.filter((c) => filterIds.includes(c[rowKey])) : r.data.children,
103
92
  _isGroup: r.isGroup
104
- })).filter(g => g.children === undefined || g.children.length > 0);
93
+ })).filter((g) => g.children === void 0 || g.children.length > 0);
105
94
  }
106
-
107
- return _objectSpread(_objectSpread({}, rows), {}, {
108
- allRows: rows.allRows.map(r => _objectSpread(_objectSpread({}, r.data), {}, {
95
+ return {
96
+ ...rows,
97
+ allRows: rows.allRows.map((r) => ({
98
+ ...r.data,
109
99
  _isGroup: r.isGroup
110
100
  })),
111
- rows: rows.rows.map(r => _objectSpread(_objectSpread({}, r.data), {}, {
101
+ rows: rows.rows.map((r) => ({
102
+ ...r.data,
112
103
  _isGroup: r.isGroup
113
104
  }))
114
- });
105
+ };
115
106
  },
116
-
117
107
  decorateRenderers(renderers, grid) {
118
- const Row = renderers.body.row; // eslint-disable-next-line react-hooks/rules-of-hooks
119
-
120
- renderers.body.row = React.useMemo(() => // eslint-disable-next-line react/display-name
121
- // eslint-disable-next-line react/prop-types
122
- _ref => {
123
- let rowProps = _objectWithoutProperties__default["default"](_ref, _excluded);
124
-
125
- const {
126
- composedRows
127
- } = grid.getInstance(); // // https://jira.elliemae.io/browse/PUI-1667
128
-
108
+ const Row = renderers.body.row;
109
+ renderers.body.row = (0, import_react.useMemo)(() => ({ isExpanded, ...rowProps }) => {
110
+ const { composedRows } = grid.getInstance();
129
111
  const node = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;
130
- const {
131
- groupedRowsRenderHeader
132
- } = grid.props; // eslint-disable-next-line no-underscore-dangle
133
-
112
+ const { groupedRowsRenderHeader } = grid.props;
134
113
  if (node && node._isGroup) {
135
- return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
136
- children: /*#__PURE__*/jsxRuntime.jsx(GroupRowHeaderWrapper, _objectSpread(_objectSpread({}, rowProps), {}, {
137
- children: /*#__PURE__*/_jsx__default["default"](GroupRowHeaderTitle, {}, void 0, groupedRowsRenderHeader ? groupedRowsRenderHeader(node) : 'Group')
138
- }))
139
- });
114
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(GroupRowHeaderWrapper, {
115
+ ...rowProps
116
+ }, /* @__PURE__ */ import_react.default.createElement(GroupRowHeaderTitle, null, groupedRowsRenderHeader ? groupedRowsRenderHeader(node) : "Group")));
140
117
  }
141
-
142
- return /*#__PURE__*/jsxRuntime.jsx(Row, _objectSpread({}, rowProps));
118
+ return /* @__PURE__ */ import_react.default.createElement(Row, {
119
+ ...rowProps
120
+ });
143
121
  }, []);
144
122
  return renderers;
145
123
  }
146
-
147
124
  });
148
-
149
- exports.GroupingPlugin = GroupingPlugin;
125
+ module.exports = __toCommonJS(GroupingPlugin_exports);
126
+ //# sourceMappingURL=GroupingPlugin.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/plugins/grouping-grid/GroupingPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable no-underscore-dangle */\nimport React, { useMemo } from 'react';\nimport { createInstancePlugin } from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { VariableSizeList } from 'react-window';\nimport { walkTreeStrategy } from './walkStrategy';\nimport { RowSizes } from '../../rowSizes';\nimport { dataGridBlockName } from '../../blockNames';\n\nconst blockName = `${dataGridBlockName}-group-row-header`;\nconst GroupRowHeaderWrapper = aggregatedClasses('div')(blockName);\nconst GroupRowHeaderTitle = aggregatedClasses('div')(blockName, 'title');\n\nexport const GroupingPlugin = createInstancePlugin('groupedRows', {\n decorateGrid(grid) {\n const { columns, composedRows } = grid.getInstance();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const detailColumns = useMemo(\n () =>\n columns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n const flatRows = [];\n walkTreeStrategy({\n data: composedRows,\n cb: (n) => flatRows.push(n),\n });\n return {\n detailColumns,\n composedRows: flatRows,\n };\n },\n getBodyProps(bodyProps, grid) {\n const { composedRows: rows } = grid.getInstance();\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n if (!rowData) return RowSizes.normal;\n return rowData._isGroup || rowData.isGroup\n ? RowSizes.compact\n : RowSizes.normal;\n };\n // eslint-disable-next-line no-unused-vars\n const getListHeight = () => {\n const size = rows.reduce((h, r) => {\n const rowHeight =\n r._isGroup || r.isGroup ? RowSizes.compact : RowSizes.normal;\n return h + rowHeight;\n }, 0);\n return size;\n };\n return {\n ...bodyProps,\n getListHeight,\n listComponent: VariableSizeList,\n listProps: { itemSize: getItemSize },\n };\n },\n composeRows: (rows, grid) => {\n const {\n composedRows,\n props: { rowKey },\n } = grid.getInstance();\n\n if (Array.isArray(rows)) {\n const filterIds = rows.map((r) => r.data[rowKey]);\n return composedRows\n .filter((c) => filterIds.includes(c.data[rowKey]))\n .map((r) => ({\n ...r.data,\n children: Array.isArray(r.data.children)\n ? r.data.children.filter((c) => filterIds.includes(c[rowKey]))\n : r.data.children,\n _isGroup: r.isGroup,\n }))\n .filter((g) => g.children === undefined || g.children.length > 0);\n }\n return {\n ...rows,\n allRows: rows.allRows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n rows: rows.rows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n };\n },\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n renderers.body.row = useMemo(\n () =>\n // eslint-disable-next-line react/display-name\n // eslint-disable-next-line react/prop-types\n ({ isExpanded, ...rowProps }) => {\n const { composedRows } = grid.getInstance();\n // // https://jira.elliemae.io/browse/PUI-1667\n const node = composedRows[rowProps.index]\n ? composedRows[rowProps.index]\n : rowProps.rowData;\n const { groupedRowsRenderHeader } = grid.props;\n // eslint-disable-next-line no-underscore-dangle\n if (node && node._isGroup) {\n return (\n <>\n <GroupRowHeaderWrapper {...rowProps}>\n <GroupRowHeaderTitle>\n {groupedRowsRenderHeader\n ? groupedRowsRenderHeader(node)\n : 'Group'}\n </GroupRowHeaderTitle>\n </GroupRowHeaderWrapper>\n </>\n );\n }\n return <Row {...rowProps} />;\n },\n [],\n );\n\n return renderers;\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA+B;AAC/B,kCAAqC;AACrC,2BAAkC;AAClC,0BAAiC;AACjC,0BAAiC;AACjC,sBAAyB;AACzB,wBAAkC;AAElC,MAAM,YAAY,GAAG;AACrB,MAAM,wBAAwB,4CAAkB,OAAO;AACvD,MAAM,sBAAsB,4CAAkB,OAAO,WAAW;AAEzD,MAAM,iBAAiB,sDAAqB,eAAe;AAAA,EAChE,aAAa,MAAM;AACjB,UAAM,EAAE,SAAS,iBAAiB,KAAK;AAEvC,UAAM,gBAAgB,0BACpB,MACE,QACG,IAAI,CAAC,WAAY;AAAA,SACb;AAAA,MACH,gBAAgB,OAAO;AAAA,QAExB,OAAO,CAAC,QAAQ,CAAC,IAAI,mBAC1B,CAAC;AAEH,UAAM,WAAW;AACjB,8CAAiB;AAAA,MACf,MAAM;AAAA,MACN,IAAI,CAAC,MAAM,SAAS,KAAK;AAAA;AAE3B,WAAO;AAAA,MACL;AAAA,MACA,cAAc;AAAA;AAAA;AAAA,EAGlB,aAAa,WAAW,MAAM;AAC5B,UAAM,EAAE,cAAc,SAAS,KAAK;AAEpC,UAAM,cAAc,CAAC,UAAU;AAC7B,YAAM,UAAU,KAAK;AACrB,UAAI,CAAC;AAAS,eAAO,yBAAS;AAC9B,aAAO,QAAQ,YAAY,QAAQ,UAC/B,yBAAS,UACT,yBAAS;AAAA;AAGf,UAAM,gBAAgB,MAAM;AAC1B,YAAM,OAAO,KAAK,OAAO,CAAC,GAAG,MAAM;AACjC,cAAM,YACJ,EAAE,YAAY,EAAE,UAAU,yBAAS,UAAU,yBAAS;AACxD,eAAO,IAAI;AAAA,SACV;AACH,aAAO;AAAA;AAET,WAAO;AAAA,SACF;AAAA,MACH;AAAA,MACA,eAAe;AAAA,MACf,WAAW,EAAE,UAAU;AAAA;AAAA;AAAA,EAG3B,aAAa,CAAC,MAAM,SAAS;AAC3B,UAAM;AAAA,MACJ;AAAA,MACA,OAAO,EAAE;AAAA,QACP,KAAK;AAET,QAAI,MAAM,QAAQ,OAAO;AACvB,YAAM,YAAY,KAAK,IAAI,CAAC,MAAM,EAAE,KAAK;AACzC,aAAO,aACJ,OAAO,CAAC,MAAM,UAAU,SAAS,EAAE,KAAK,UACxC,IAAI,CAAC,MAAO;AAAA,WACR,EAAE;AAAA,QACL,UAAU,MAAM,QAAQ,EAAE,KAAK,YAC3B,EAAE,KAAK,SAAS,OAAO,CAAC,MAAM,UAAU,SAAS,EAAE,YACnD,EAAE,KAAK;AAAA,QACX,UAAU,EAAE;AAAA,UAEb,OAAO,CAAC,MAAM,EAAE,aAAa,UAAa,EAAE,SAAS,SAAS;AAAA;AAEnE,WAAO;AAAA,SACF;AAAA,MACH,SAAS,KAAK,QAAQ,IAAI,CAAC,MAAO;AAAA,WAC7B,EAAE;AAAA,QACL,UAAU,EAAE;AAAA;AAAA,MAEd,MAAM,KAAK,KAAK,IAAI,CAAC,MAAO;AAAA,WACvB,EAAE;AAAA,QACL,UAAU,EAAE;AAAA;AAAA;AAAA;AAAA,EAIlB,kBAAkB,WAAW,MAAM;AACjC,UAAM,MAAM,UAAU,KAAK;AAE3B,cAAU,KAAK,MAAM,0BACnB,MAGE,CAAC,EAAE,eAAe,eAAe;AAC/B,YAAM,EAAE,iBAAiB,KAAK;AAE9B,YAAM,OAAO,aAAa,SAAS,SAC/B,aAAa,SAAS,SACtB,SAAS;AACb,YAAM,EAAE,4BAA4B,KAAK;AAEzC,UAAI,QAAQ,KAAK,UAAU;AACzB,eACE,wFACE,mDAAC,uBAAD;AAAA,aAA2B;AAAA,WACzB,mDAAC,qBAAD,MACG,0BACG,wBAAwB,QACxB;AAAA;AAMd,aAAO,mDAAC,KAAD;AAAA,WAAS;AAAA;AAAA,OAEpB;AAGF,WAAO;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,26 +1,49 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/web.dom-collections.iterator.js');
6
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var walkStrategy_exports = {};
29
+ __export(walkStrategy_exports, {
30
+ walkTreeStrategy: () => walkTreeStrategy
31
+ });
32
+ var React = __toESM(require("react"));
7
33
  function getPath(parentNode, index, childrenKey) {
8
- if (!parentNode) return [index];
34
+ if (!parentNode)
35
+ return [index];
9
36
  return [...parentNode.path, childrenKey, index];
10
37
  }
11
-
12
- function walkTreeStrategy(_ref) {
13
- let {
14
- data,
15
- childrenKey = 'children',
16
- level = 0,
17
- getId = item => item.id,
18
- parentNode,
19
- shouldWalkChildren = () => true,
20
- cb
21
- } = _ref;
22
-
23
- // eslint-disable-next-line no-loops/no-loops,no-plusplus
38
+ function walkTreeStrategy({
39
+ data,
40
+ childrenKey = "children",
41
+ level = 0,
42
+ getId = (item) => item.id,
43
+ parentNode,
44
+ shouldWalkChildren = () => true,
45
+ cb
46
+ }) {
24
47
  for (let i = 0; i < data.length; i++) {
25
48
  const currLevel = level + 1;
26
49
  const children = data[i][childrenKey];
@@ -34,13 +57,10 @@ function walkTreeStrategy(_ref) {
34
57
  nestingLevel: currLevel,
35
58
  parentNode: parentNode || {
36
59
  isGroup: true,
37
- data: {
38
- children: data
39
- }
60
+ data: { children: data }
40
61
  }
41
62
  };
42
63
  cb(node);
43
-
44
64
  if (shouldWalkChildren(node) && children && children.length) {
45
65
  walkTreeStrategy({
46
66
  data: children,
@@ -52,5 +72,5 @@ function walkTreeStrategy(_ref) {
52
72
  }
53
73
  }
54
74
  }
55
-
56
- exports.walkTreeStrategy = walkTreeStrategy;
75
+ module.exports = __toCommonJS(walkStrategy_exports);
76
+ //# sourceMappingURL=walkStrategy.js.map