@elliemae/ds-datagrids 3.16.0-next.2 → 3.16.0-next.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (468) hide show
  1. package/dist/cjs/DSDataGrid.js +392 -241
  2. package/dist/cjs/DSDataGrid.js.map +2 -2
  3. package/dist/cjs/DataGridImpl.js +15 -11
  4. package/dist/cjs/DataGridImpl.js.map +2 -2
  5. package/dist/cjs/PaginatedDataGrid.js +13 -9
  6. package/dist/cjs/PaginatedDataGrid.js.map +2 -2
  7. package/dist/cjs/blockNames.js +4 -0
  8. package/dist/cjs/blockNames.js.map +1 -1
  9. package/dist/cjs/columns/IconColumn.js +4 -0
  10. package/dist/cjs/columns/IconColumn.js.map +1 -1
  11. package/dist/cjs/columns/NumberColumn.js +4 -0
  12. package/dist/cjs/columns/NumberColumn.js.map +1 -1
  13. package/dist/cjs/components/BodyCell.js +6 -0
  14. package/dist/cjs/components/BodyCell.js.map +1 -1
  15. package/dist/cjs/components/BodyList.js +7 -5
  16. package/dist/cjs/components/BodyList.js.map +2 -2
  17. package/dist/cjs/components/ColumnVisibilityMenuOption.js +5 -6
  18. package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +2 -2
  19. package/dist/cjs/components/ColumnsOptionsMenuSection.js +7 -11
  20. package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +2 -2
  21. package/dist/cjs/components/EmptyState.js +9 -6
  22. package/dist/cjs/components/EmptyState.js.map +3 -3
  23. package/dist/cjs/components/HeaderCell.js +4 -0
  24. package/dist/cjs/components/HeaderCell.js.map +1 -1
  25. package/dist/cjs/components/List.js +6 -2
  26. package/dist/cjs/components/List.js.map +2 -2
  27. package/dist/cjs/components/ListItem.js +7 -6
  28. package/dist/cjs/components/ListItem.js.map +2 -2
  29. package/dist/cjs/components/NoResults.js +8 -10
  30. package/dist/cjs/components/NoResults.js.map +2 -2
  31. package/dist/cjs/components/RowsLoader.js +5 -1
  32. package/dist/cjs/components/RowsLoader.js.map +2 -2
  33. package/dist/cjs/components/Table.js +9 -5
  34. package/dist/cjs/components/Table.js.map +2 -2
  35. package/dist/cjs/components/TableBody.js +6 -7
  36. package/dist/cjs/components/TableBody.js.map +2 -2
  37. package/dist/cjs/components/TableHeader.js +5 -1
  38. package/dist/cjs/components/TableHeader.js.map +2 -2
  39. package/dist/cjs/components/footer/addOptionalFooterComponents.js +5 -1
  40. package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +2 -2
  41. package/dist/cjs/components/header/PrimaryControls.js +4 -0
  42. package/dist/cjs/components/header/PrimaryControls.js.map +1 -1
  43. package/dist/cjs/components/header/addOptionalHeaderComponents.js +4 -0
  44. package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +1 -1
  45. package/dist/cjs/components/index.js +9 -5
  46. package/dist/cjs/components/index.js.map +2 -2
  47. package/dist/cjs/components/renderers/defaultClassedRenderers.js +20 -36
  48. package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +2 -2
  49. package/dist/cjs/components/renderers/index.js +6 -2
  50. package/dist/cjs/components/renderers/index.js.map +2 -2
  51. package/dist/cjs/components/renderers/renderRowsLoader.js +6 -4
  52. package/dist/cjs/components/renderers/renderRowsLoader.js.map +2 -2
  53. package/dist/cjs/components/tableContext.js +4 -0
  54. package/dist/cjs/components/tableContext.js.map +1 -1
  55. package/dist/cjs/defaultPlugins.js +9 -10
  56. package/dist/cjs/defaultPlugins.js.map +2 -2
  57. package/dist/cjs/index.js +13 -9
  58. package/dist/cjs/index.js.map +2 -2
  59. package/dist/cjs/package.json +7 -0
  60. package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +26 -18
  61. package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
  62. package/dist/cjs/plugins/body-header-scroll-sync/index.js +5 -1
  63. package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +2 -2
  64. package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js +5 -1
  65. package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +2 -2
  66. package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +4 -0
  67. package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
  68. package/dist/cjs/plugins/column-dnd/index.js +5 -1
  69. package/dist/cjs/plugins/column-dnd/index.js.map +2 -2
  70. package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js +8 -4
  71. package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +2 -2
  72. package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js +4 -0
  73. package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
  74. package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js +5 -1
  75. package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +2 -2
  76. package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js +5 -1
  77. package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +2 -2
  78. package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js +4 -0
  79. package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
  80. package/dist/cjs/plugins/column-sizing/index.js +5 -1
  81. package/dist/cjs/plugins/column-sizing/index.js.map +2 -2
  82. package/dist/cjs/plugins/column-sizing/useColumnSizeService.js +11 -26
  83. package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +2 -2
  84. package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js +7 -2
  85. package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +2 -2
  86. package/dist/cjs/plugins/column-sizing/utils.js +4 -0
  87. package/dist/cjs/plugins/column-sizing/utils.js.map +1 -1
  88. package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +5 -1
  89. package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +2 -2
  90. package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +6 -1
  91. package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +2 -2
  92. package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js +5 -1
  93. package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +2 -2
  94. package/dist/cjs/plugins/custom-cell-renderer/index.js +5 -1
  95. package/dist/cjs/plugins/custom-cell-renderer/index.js.map +2 -2
  96. package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js +4 -0
  97. package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +2 -2
  98. package/dist/cjs/plugins/editable/EditableComponents/TextBox.js +4 -0
  99. package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +2 -2
  100. package/dist/cjs/plugins/editable/EditableComponents/index.js +6 -2
  101. package/dist/cjs/plugins/editable/EditableComponents/index.js.map +2 -2
  102. package/dist/cjs/plugins/editable/EditablePlugin.js +5 -1
  103. package/dist/cjs/plugins/editable/EditablePlugin.js.map +2 -2
  104. package/dist/cjs/plugins/editable/decorateEditable.js +5 -1
  105. package/dist/cjs/plugins/editable/decorateEditable.js.map +2 -2
  106. package/dist/cjs/plugins/editable/getEditorComponent.js +7 -16
  107. package/dist/cjs/plugins/editable/getEditorComponent.js.map +2 -2
  108. package/dist/cjs/plugins/editable/index.js +6 -2
  109. package/dist/cjs/plugins/editable/index.js.map +2 -2
  110. package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js +27 -25
  111. package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +2 -2
  112. package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js +9 -5
  113. package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +2 -2
  114. package/dist/cjs/plugins/expandable-grid/ExpandedRow.js +10 -6
  115. package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +2 -2
  116. package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js +16 -8
  117. package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +2 -2
  118. package/dist/cjs/plugins/expandable-grid/index.js +6 -2
  119. package/dist/cjs/plugins/expandable-grid/index.js.map +2 -2
  120. package/dist/cjs/plugins/expandable-grid/useExpandGridState.js +4 -0
  121. package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +2 -2
  122. package/dist/cjs/plugins/export-data/ExportDataPlugin.js +4 -0
  123. package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +1 -1
  124. package/dist/cjs/plugins/export-data/index.js +5 -1
  125. package/dist/cjs/plugins/export-data/index.js.map +2 -2
  126. package/dist/cjs/plugins/filterable/FilterablePlugin.js +7 -3
  127. package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +2 -2
  128. package/dist/cjs/plugins/filterable/addFilterToColumn.js +5 -1
  129. package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +2 -2
  130. package/dist/cjs/plugins/filterable/components/FilterableHeader.js +5 -1
  131. package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +2 -2
  132. package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +50 -47
  133. package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +2 -2
  134. package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +50 -48
  135. package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +2 -2
  136. package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +48 -45
  137. package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +2 -2
  138. package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +7 -3
  139. package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +2 -2
  140. package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js +4 -0
  141. package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
  142. package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +9 -7
  143. package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +2 -2
  144. package/dist/cjs/plugins/filterable/filterableFormatter.js +33 -37
  145. package/dist/cjs/plugins/filterable/filterableFormatter.js.map +2 -2
  146. package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +6 -4
  147. package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +2 -2
  148. package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +4 -0
  149. package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +2 -2
  150. package/dist/cjs/plugins/filterable/helper.js +4 -0
  151. package/dist/cjs/plugins/filterable/helper.js.map +2 -2
  152. package/dist/cjs/plugins/filterable/index.js +5 -1
  153. package/dist/cjs/plugins/filterable/index.js.map +2 -2
  154. package/dist/cjs/plugins/filterable/useFilterableState.js +7 -7
  155. package/dist/cjs/plugins/filterable/useFilterableState.js.map +2 -2
  156. package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js +4 -0
  157. package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
  158. package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js +19 -11
  159. package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +2 -2
  160. package/dist/cjs/plugins/grouping-grid/walkStrategy.js +4 -0
  161. package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +2 -2
  162. package/dist/cjs/plugins/index.js +20 -16
  163. package/dist/cjs/plugins/index.js.map +2 -2
  164. package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +4 -0
  165. package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
  166. package/dist/cjs/plugins/infinite-scrolling/index.js +5 -1
  167. package/dist/cjs/plugins/infinite-scrolling/index.js.map +2 -2
  168. package/dist/cjs/plugins/pagination/PaginationPlugin.js +9 -4
  169. package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +2 -2
  170. package/dist/cjs/plugins/pagination/components/Pagination.js +9 -24
  171. package/dist/cjs/plugins/pagination/components/Pagination.js.map +2 -2
  172. package/dist/cjs/plugins/pagination/components/Paginator.js +15 -10
  173. package/dist/cjs/plugins/pagination/components/Paginator.js.map +2 -2
  174. package/dist/cjs/plugins/pagination/components/PerPageDropdown.js +6 -2
  175. package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +2 -2
  176. package/dist/cjs/plugins/pagination/helper.js +4 -0
  177. package/dist/cjs/plugins/pagination/helper.js.map +2 -2
  178. package/dist/cjs/plugins/pagination/index.js +5 -1
  179. package/dist/cjs/plugins/pagination/index.js.map +2 -2
  180. package/dist/cjs/plugins/pagination/usePaginationState.js +5 -1
  181. package/dist/cjs/plugins/pagination/usePaginationState.js.map +2 -2
  182. package/dist/cjs/plugins/resizable/ResizablePlugin.js +5 -1
  183. package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +2 -2
  184. package/dist/cjs/plugins/resizable/decorateResizable.js +8 -2
  185. package/dist/cjs/plugins/resizable/decorateResizable.js.map +2 -2
  186. package/dist/cjs/plugins/resizable/index.js +5 -1
  187. package/dist/cjs/plugins/resizable/index.js.map +2 -2
  188. package/dist/cjs/plugins/resizable/useResizeHandle.js +10 -13
  189. package/dist/cjs/plugins/resizable/useResizeHandle.js.map +2 -2
  190. package/dist/cjs/plugins/resizable/utils.js +4 -0
  191. package/dist/cjs/plugins/resizable/utils.js.map +1 -1
  192. package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js +5 -0
  193. package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
  194. package/dist/cjs/plugins/row-dnd/index.js +5 -1
  195. package/dist/cjs/plugins/row-dnd/index.js.map +2 -2
  196. package/dist/cjs/plugins/selectable/SelectablePlugin.js +7 -3
  197. package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +2 -2
  198. package/dist/cjs/plugins/selectable/addSelectableColumn.js +7 -1
  199. package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +2 -2
  200. package/dist/cjs/plugins/selectable/helper.js +4 -0
  201. package/dist/cjs/plugins/selectable/helper.js.map +1 -1
  202. package/dist/cjs/plugins/selectable/index.js +5 -1
  203. package/dist/cjs/plugins/selectable/index.js.map +2 -2
  204. package/dist/cjs/plugins/selectable/selectableFormatter.js +5 -1
  205. package/dist/cjs/plugins/selectable/selectableFormatter.js.map +2 -2
  206. package/dist/cjs/plugins/selectable/useSelectableState.js +7 -1
  207. package/dist/cjs/plugins/selectable/useSelectableState.js.map +2 -2
  208. package/dist/cjs/plugins/sortable/SortablePlugin.js +7 -3
  209. package/dist/cjs/plugins/sortable/SortablePlugin.js.map +2 -2
  210. package/dist/cjs/plugins/sortable/checkIfSortable.js +4 -0
  211. package/dist/cjs/plugins/sortable/checkIfSortable.js.map +1 -1
  212. package/dist/cjs/plugins/sortable/index.js +5 -1
  213. package/dist/cjs/plugins/sortable/index.js.map +2 -2
  214. package/dist/cjs/plugins/sortable/sortHeaderFormatter.js +4 -0
  215. package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +1 -1
  216. package/dist/cjs/plugins/sortable/sortTree.js +4 -0
  217. package/dist/cjs/plugins/sortable/sortTree.js.map +2 -2
  218. package/dist/cjs/plugins/sortable/sorter.js +5 -0
  219. package/dist/cjs/plugins/sortable/sorter.js.map +1 -1
  220. package/dist/cjs/plugins/sortable/useSortableState.js +6 -4
  221. package/dist/cjs/plugins/sortable/useSortableState.js.map +2 -2
  222. package/dist/cjs/plugins/toolbar/RowRenderer.js +7 -2
  223. package/dist/cjs/plugins/toolbar/RowRenderer.js.map +2 -2
  224. package/dist/cjs/plugins/toolbar/ToolbarPlugin.js +5 -1
  225. package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +2 -2
  226. package/dist/cjs/plugins/toolbar/ToolbarTrigger.js +5 -0
  227. package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +1 -1
  228. package/dist/cjs/plugins/toolbar/index.js +5 -1
  229. package/dist/cjs/plugins/toolbar/index.js.map +2 -2
  230. package/dist/cjs/plugins/virtualization/AutoHeightList.js +4 -0
  231. package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +2 -2
  232. package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js +8 -2
  233. package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +2 -2
  234. package/dist/cjs/plugins/virtualization/VirtualizedBody.js +9 -4
  235. package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +2 -2
  236. package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js +5 -0
  237. package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
  238. package/dist/cjs/plugins/virtualization/helper.js +4 -0
  239. package/dist/cjs/plugins/virtualization/helper.js.map +1 -1
  240. package/dist/cjs/plugins/virtualization/index.js +5 -1
  241. package/dist/cjs/plugins/virtualization/index.js.map +2 -2
  242. package/dist/cjs/renders/CellWithAddons.js +15 -1
  243. package/dist/cjs/renders/CellWithAddons.js.map +2 -2
  244. package/dist/cjs/renders/index.js +6 -2
  245. package/dist/cjs/renders/index.js.map +2 -2
  246. package/dist/cjs/renders/styled.js +4 -0
  247. package/dist/cjs/renders/styled.js.map +1 -1
  248. package/dist/cjs/rowSizes.js +5 -5
  249. package/dist/cjs/rowSizes.js.map +2 -2
  250. package/dist/cjs/utilities/getPluginsFromProps.js +17 -13
  251. package/dist/cjs/utilities/getPluginsFromProps.js.map +2 -2
  252. package/dist/cjs/utilities/getScrollbarSize.js +4 -0
  253. package/dist/cjs/utilities/getScrollbarSize.js.map +1 -1
  254. package/dist/cjs/utilities/normalizeData.js +4 -0
  255. package/dist/cjs/utilities/normalizeData.js.map +2 -2
  256. package/dist/esm/DSDataGrid.js +264 -117
  257. package/dist/esm/DSDataGrid.js.map +2 -2
  258. package/dist/esm/DataGridImpl.js +11 -11
  259. package/dist/esm/DataGridImpl.js.map +2 -2
  260. package/dist/esm/PaginatedDataGrid.js +9 -9
  261. package/dist/esm/PaginatedDataGrid.js.map +2 -2
  262. package/dist/esm/columns/IconColumn.js.map +1 -1
  263. package/dist/esm/components/BodyCell.js +2 -0
  264. package/dist/esm/components/BodyCell.js.map +1 -1
  265. package/dist/esm/components/BodyList.js +3 -5
  266. package/dist/esm/components/BodyList.js.map +2 -2
  267. package/dist/esm/components/ColumnVisibilityMenuOption.js +1 -6
  268. package/dist/esm/components/ColumnVisibilityMenuOption.js.map +2 -2
  269. package/dist/esm/components/ColumnsOptionsMenuSection.js +3 -11
  270. package/dist/esm/components/ColumnsOptionsMenuSection.js.map +2 -2
  271. package/dist/esm/components/EmptyState.js +1 -2
  272. package/dist/esm/components/EmptyState.js.map +2 -2
  273. package/dist/esm/components/List.js +2 -2
  274. package/dist/esm/components/List.js.map +2 -2
  275. package/dist/esm/components/ListItem.js +3 -6
  276. package/dist/esm/components/ListItem.js.map +2 -2
  277. package/dist/esm/components/NoResults.js +4 -10
  278. package/dist/esm/components/NoResults.js.map +2 -2
  279. package/dist/esm/components/RowsLoader.js +1 -1
  280. package/dist/esm/components/RowsLoader.js.map +1 -1
  281. package/dist/esm/components/Table.js +5 -5
  282. package/dist/esm/components/Table.js.map +2 -2
  283. package/dist/esm/components/TableBody.js +2 -7
  284. package/dist/esm/components/TableBody.js.map +2 -2
  285. package/dist/esm/components/TableHeader.js +1 -1
  286. package/dist/esm/components/TableHeader.js.map +2 -2
  287. package/dist/esm/components/footer/addOptionalFooterComponents.js +1 -1
  288. package/dist/esm/components/footer/addOptionalFooterComponents.js.map +1 -1
  289. package/dist/esm/components/index.js +5 -5
  290. package/dist/esm/components/index.js.map +1 -1
  291. package/dist/esm/components/renderers/defaultClassedRenderers.js +16 -40
  292. package/dist/esm/components/renderers/defaultClassedRenderers.js.map +2 -2
  293. package/dist/esm/components/renderers/index.js +2 -2
  294. package/dist/esm/components/renderers/index.js.map +1 -1
  295. package/dist/esm/components/renderers/renderRowsLoader.js +2 -4
  296. package/dist/esm/components/renderers/renderRowsLoader.js.map +2 -2
  297. package/dist/esm/defaultPlugins.js +5 -10
  298. package/dist/esm/defaultPlugins.js.map +2 -2
  299. package/dist/esm/index.js +9 -9
  300. package/dist/esm/index.js.map +1 -1
  301. package/dist/esm/package.json +7 -0
  302. package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +22 -18
  303. package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +2 -2
  304. package/dist/esm/plugins/body-header-scroll-sync/index.js +1 -1
  305. package/dist/esm/plugins/body-header-scroll-sync/index.js.map +1 -1
  306. package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js +1 -1
  307. package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +2 -2
  308. package/dist/esm/plugins/column-dnd/index.js +1 -1
  309. package/dist/esm/plugins/column-dnd/index.js.map +1 -1
  310. package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js +4 -4
  311. package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
  312. package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
  313. package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
  314. package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
  315. package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js +1 -1
  316. package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
  317. package/dist/esm/plugins/column-sizing/index.js +1 -1
  318. package/dist/esm/plugins/column-sizing/index.js.map +1 -1
  319. package/dist/esm/plugins/column-sizing/useColumnSizeService.js +7 -26
  320. package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +2 -2
  321. package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js +3 -2
  322. package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +2 -2
  323. package/dist/esm/plugins/column-sizing/utils.js.map +1 -1
  324. package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js +1 -1
  325. package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
  326. package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +2 -1
  327. package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +2 -2
  328. package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js +1 -1
  329. package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +2 -2
  330. package/dist/esm/plugins/custom-cell-renderer/index.js +1 -1
  331. package/dist/esm/plugins/custom-cell-renderer/index.js.map +1 -1
  332. package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
  333. package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +1 -1
  334. package/dist/esm/plugins/editable/EditableComponents/index.js +2 -2
  335. package/dist/esm/plugins/editable/EditableComponents/index.js.map +1 -1
  336. package/dist/esm/plugins/editable/EditablePlugin.js +1 -1
  337. package/dist/esm/plugins/editable/EditablePlugin.js.map +2 -2
  338. package/dist/esm/plugins/editable/decorateEditable.js +1 -1
  339. package/dist/esm/plugins/editable/decorateEditable.js.map +2 -2
  340. package/dist/esm/plugins/editable/getEditorComponent.js +3 -16
  341. package/dist/esm/plugins/editable/getEditorComponent.js.map +2 -2
  342. package/dist/esm/plugins/editable/index.js +2 -2
  343. package/dist/esm/plugins/editable/index.js.map +1 -1
  344. package/dist/esm/plugins/expandable-grid/ExpandableColumn.js +23 -25
  345. package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +2 -2
  346. package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js +5 -5
  347. package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +2 -2
  348. package/dist/esm/plugins/expandable-grid/ExpandedRow.js +6 -6
  349. package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +2 -2
  350. package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js +12 -8
  351. package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +2 -2
  352. package/dist/esm/plugins/expandable-grid/index.js +2 -2
  353. package/dist/esm/plugins/expandable-grid/index.js.map +1 -1
  354. package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +2 -2
  355. package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +1 -1
  356. package/dist/esm/plugins/export-data/index.js +1 -1
  357. package/dist/esm/plugins/export-data/index.js.map +1 -1
  358. package/dist/esm/plugins/filterable/FilterablePlugin.js +3 -3
  359. package/dist/esm/plugins/filterable/FilterablePlugin.js.map +2 -2
  360. package/dist/esm/plugins/filterable/addFilterToColumn.js +1 -1
  361. package/dist/esm/plugins/filterable/addFilterToColumn.js.map +1 -1
  362. package/dist/esm/plugins/filterable/components/FilterableHeader.js +1 -1
  363. package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +2 -2
  364. package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +46 -47
  365. package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +2 -2
  366. package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +46 -48
  367. package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +2 -2
  368. package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +44 -45
  369. package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +2 -2
  370. package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +3 -3
  371. package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +2 -2
  372. package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js +5 -7
  373. package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +2 -2
  374. package/dist/esm/plugins/filterable/filterableFormatter.js +29 -37
  375. package/dist/esm/plugins/filterable/filterableFormatter.js.map +2 -2
  376. package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +2 -4
  377. package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +2 -2
  378. package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +2 -2
  379. package/dist/esm/plugins/filterable/helper.js +1 -7
  380. package/dist/esm/plugins/filterable/helper.js.map +2 -2
  381. package/dist/esm/plugins/filterable/index.js +1 -1
  382. package/dist/esm/plugins/filterable/index.js.map +1 -1
  383. package/dist/esm/plugins/filterable/useFilterableState.js +3 -11
  384. package/dist/esm/plugins/filterable/useFilterableState.js.map +2 -2
  385. package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
  386. package/dist/esm/plugins/grouping-grid/GroupingPlugin.js +15 -11
  387. package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +2 -2
  388. package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +2 -2
  389. package/dist/esm/plugins/index.js +16 -16
  390. package/dist/esm/plugins/index.js.map +1 -1
  391. package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
  392. package/dist/esm/plugins/infinite-scrolling/index.js +1 -1
  393. package/dist/esm/plugins/infinite-scrolling/index.js.map +1 -1
  394. package/dist/esm/plugins/pagination/PaginationPlugin.js +5 -4
  395. package/dist/esm/plugins/pagination/PaginationPlugin.js.map +2 -2
  396. package/dist/esm/plugins/pagination/components/Pagination.js +5 -24
  397. package/dist/esm/plugins/pagination/components/Pagination.js.map +2 -2
  398. package/dist/esm/plugins/pagination/components/Paginator.js +12 -11
  399. package/dist/esm/plugins/pagination/components/Paginator.js.map +2 -2
  400. package/dist/esm/plugins/pagination/components/PerPageDropdown.js +2 -2
  401. package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +2 -2
  402. package/dist/esm/plugins/pagination/helper.js.map +2 -2
  403. package/dist/esm/plugins/pagination/index.js +1 -1
  404. package/dist/esm/plugins/pagination/index.js.map +1 -1
  405. package/dist/esm/plugins/pagination/usePaginationState.js +1 -1
  406. package/dist/esm/plugins/pagination/usePaginationState.js.map +1 -1
  407. package/dist/esm/plugins/resizable/ResizablePlugin.js +1 -1
  408. package/dist/esm/plugins/resizable/ResizablePlugin.js.map +2 -2
  409. package/dist/esm/plugins/resizable/decorateResizable.js +4 -2
  410. package/dist/esm/plugins/resizable/decorateResizable.js.map +2 -2
  411. package/dist/esm/plugins/resizable/index.js +1 -1
  412. package/dist/esm/plugins/resizable/index.js.map +1 -1
  413. package/dist/esm/plugins/resizable/useResizeHandle.js +6 -13
  414. package/dist/esm/plugins/resizable/useResizeHandle.js.map +2 -2
  415. package/dist/esm/plugins/row-dnd/DndRowsPlugin.js +1 -0
  416. package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
  417. package/dist/esm/plugins/row-dnd/index.js +1 -1
  418. package/dist/esm/plugins/row-dnd/index.js.map +1 -1
  419. package/dist/esm/plugins/selectable/SelectablePlugin.js +3 -3
  420. package/dist/esm/plugins/selectable/SelectablePlugin.js.map +2 -2
  421. package/dist/esm/plugins/selectable/addSelectableColumn.js +3 -1
  422. package/dist/esm/plugins/selectable/addSelectableColumn.js.map +2 -2
  423. package/dist/esm/plugins/selectable/helper.js.map +1 -1
  424. package/dist/esm/plugins/selectable/index.js +1 -1
  425. package/dist/esm/plugins/selectable/index.js.map +1 -1
  426. package/dist/esm/plugins/selectable/selectableFormatter.js +1 -1
  427. package/dist/esm/plugins/selectable/selectableFormatter.js.map +2 -2
  428. package/dist/esm/plugins/selectable/useSelectableState.js +3 -5
  429. package/dist/esm/plugins/selectable/useSelectableState.js.map +2 -2
  430. package/dist/esm/plugins/sortable/SortablePlugin.js +3 -3
  431. package/dist/esm/plugins/sortable/SortablePlugin.js.map +2 -2
  432. package/dist/esm/plugins/sortable/checkIfSortable.js.map +1 -1
  433. package/dist/esm/plugins/sortable/index.js +1 -1
  434. package/dist/esm/plugins/sortable/index.js.map +1 -1
  435. package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +1 -1
  436. package/dist/esm/plugins/sortable/sortTree.js.map +2 -2
  437. package/dist/esm/plugins/sortable/sorter.js +1 -0
  438. package/dist/esm/plugins/sortable/sorter.js.map +1 -1
  439. package/dist/esm/plugins/sortable/useSortableState.js +2 -4
  440. package/dist/esm/plugins/sortable/useSortableState.js.map +2 -2
  441. package/dist/esm/plugins/toolbar/RowRenderer.js +3 -2
  442. package/dist/esm/plugins/toolbar/RowRenderer.js.map +2 -2
  443. package/dist/esm/plugins/toolbar/ToolbarPlugin.js +1 -1
  444. package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +2 -2
  445. package/dist/esm/plugins/toolbar/ToolbarTrigger.js +1 -0
  446. package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +1 -1
  447. package/dist/esm/plugins/toolbar/index.js +1 -1
  448. package/dist/esm/plugins/toolbar/index.js.map +1 -1
  449. package/dist/esm/plugins/virtualization/AutoHeightList.js.map +2 -2
  450. package/dist/esm/plugins/virtualization/VirtualizationPlugin.js +4 -2
  451. package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +2 -2
  452. package/dist/esm/plugins/virtualization/VirtualizedBody.js +5 -4
  453. package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +2 -2
  454. package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js +1 -0
  455. package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
  456. package/dist/esm/plugins/virtualization/index.js +1 -1
  457. package/dist/esm/plugins/virtualization/index.js.map +1 -1
  458. package/dist/esm/renders/CellWithAddons.js +11 -1
  459. package/dist/esm/renders/CellWithAddons.js.map +2 -2
  460. package/dist/esm/renders/index.js +2 -2
  461. package/dist/esm/renders/index.js.map +1 -1
  462. package/dist/esm/renders/styled.js.map +1 -1
  463. package/dist/esm/rowSizes.js +1 -5
  464. package/dist/esm/rowSizes.js.map +2 -2
  465. package/dist/esm/utilities/getPluginsFromProps.js +13 -13
  466. package/dist/esm/utilities/getPluginsFromProps.js.map +2 -2
  467. package/dist/esm/utilities/normalizeData.js.map +2 -2
  468. package/package.json +26 -25
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -30,12 +34,9 @@ module.exports = __toCommonJS(Pagination_exports);
30
34
  var React = __toESM(require("react"));
31
35
  var import_jsx_runtime = require("react/jsx-runtime");
32
36
  var import_ds_classnames = require("@elliemae/ds-classnames");
33
- var import_Paginator = require("./Paginator");
34
- var import_PerPageDropdown = require("./PerPageDropdown");
35
- const PaginationControls = (0, import_ds_classnames.aggregatedClasses)("div")(
36
- "data-grid",
37
- "controls-pagination"
38
- );
37
+ var import_Paginator = require("./Paginator.js");
38
+ var import_PerPageDropdown = require("./PerPageDropdown.js");
39
+ const PaginationControls = (0, import_ds_classnames.aggregatedClasses)("div")("data-grid", "controls-pagination");
39
40
  const Pagination = ({
40
41
  paginated,
41
42
  pagination = {},
@@ -49,24 +50,8 @@ const Pagination = ({
49
50
  if (pagination && pagination.conditionalPagination === true && paginated.amount === 1)
50
51
  return null;
51
52
  return paginated.amount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(PaginationControls, { children: [
52
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
- import_PerPageDropdown.PerPageDropdown,
54
- {
55
- max: maxPerPage,
56
- min: minPerPage,
57
- onChange: onPerPage,
58
- step: paginationStep,
59
- value: perPage
60
- }
61
- ),
62
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
- import_Paginator.Paginator,
64
- {
65
- onSelect: onPageSelect,
66
- pages: paginated.amount,
67
- pagination
68
- }
69
- )
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PerPageDropdown.PerPageDropdown, { max: maxPerPage, min: minPerPage, onChange: onPerPage, step: paginationStep, value: perPage }),
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Paginator.Paginator, { onSelect: onPageSelect, pages: paginated.amount, pagination })
70
55
  ] }) : null;
71
56
  };
72
57
  //# sourceMappingURL=Pagination.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/plugins/pagination/components/Pagination.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { Paginator } from './Paginator';\nimport { PerPageDropdown } from './PerPageDropdown';\n\nconst PaginationControls = aggregatedClasses('div')(\n 'data-grid',\n 'controls-pagination',\n);\n\nconst Pagination = ({\n paginated,\n pagination = {},\n onPerPage,\n onPageSelect,\n paginationStep = 5,\n maxPerPage = 10,\n minPerPage = 5,\n}) => {\n const { perPage } = pagination;\n if (\n pagination &&\n pagination.conditionalPagination === true &&\n paginated.amount === 1\n )\n return null;\n return paginated.amount > 0 ? (\n <PaginationControls>\n <PerPageDropdown\n max={maxPerPage}\n min={minPerPage}\n onChange={onPerPage}\n step={paginationStep}\n value={perPage}\n />\n <Paginator\n onSelect={onPageSelect}\n pages={paginated.amount}\n pagination={pagination}\n />\n </PaginationControls>\n ) : null;\n};\n\nexport { Pagination };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2BnB;AA1BJ,2BAAkC;AAClC,uBAA0B;AAC1B,6BAAgC;AAEhC,MAAM,yBAAqB,wCAAkB,KAAK;AAAA,EAChD;AAAA,EACA;AACF;AAEA,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA,aAAa,CAAC;AAAA,EACd;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AACf,MAAM;AACJ,QAAM,EAAE,QAAQ,IAAI;AACpB,MACE,cACA,WAAW,0BAA0B,QACrC,UAAU,WAAW;AAErB,WAAO;AACT,SAAO,UAAU,SAAS,IACxB,6CAAC,sBACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,KAAK;AAAA,QACL,UAAU;AAAA,QACV,MAAM;AAAA,QACN,OAAO;AAAA;AAAA,IACT;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,OAAO,UAAU;AAAA,QACjB;AAAA;AAAA,IACF;AAAA,KACF,IACE;AACN;",
4
+ "sourcesContent": ["import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { Paginator } from './Paginator.js';\nimport { PerPageDropdown } from './PerPageDropdown.js';\n\nconst PaginationControls = aggregatedClasses('div')('data-grid', 'controls-pagination');\n\nconst Pagination = ({\n paginated,\n pagination = {},\n onPerPage,\n onPageSelect,\n paginationStep = 5,\n maxPerPage = 10,\n minPerPage = 5,\n}) => {\n const { perPage } = pagination;\n if (pagination && pagination.conditionalPagination === true && paginated.amount === 1) return null;\n return paginated.amount > 0 ? (\n <PaginationControls>\n <PerPageDropdown max={maxPerPage} min={minPerPage} onChange={onPerPage} step={paginationStep} value={perPage} />\n <Paginator onSelect={onPageSelect} pages={paginated.amount} pagination={pagination} />\n </PaginationControls>\n ) : null;\n};\n\nexport { Pagination };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBnB;AAlBJ,2BAAkC;AAClC,uBAA0B;AAC1B,6BAAgC;AAEhC,MAAM,yBAAqB,wCAAkB,KAAK,EAAE,aAAa,qBAAqB;AAEtF,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA,aAAa,CAAC;AAAA,EACd;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AACf,MAAM;AACJ,QAAM,EAAE,QAAQ,IAAI;AACpB,MAAI,cAAc,WAAW,0BAA0B,QAAQ,UAAU,WAAW;AAAG,WAAO;AAC9F,SAAO,UAAU,SAAS,IACxB,6CAAC,sBACC;AAAA,gDAAC,0CAAgB,KAAK,YAAY,KAAK,YAAY,UAAU,WAAW,MAAM,gBAAgB,OAAO,SAAS;AAAA,IAC9G,4CAAC,8BAAU,UAAU,cAAc,OAAO,UAAU,QAAQ,YAAwB;AAAA,KACtF,IACE;AACN;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -33,9 +37,10 @@ var import_jsx_runtime = require("react/jsx-runtime");
33
37
  var import_react_pagify = __toESM(require("react-pagify"));
34
38
  var import_segmentize = __toESM(require("segmentize"));
35
39
  var import_ds_classnames = require("@elliemae/ds-classnames");
40
+ const Comp = import_react_pagify.default?.default ?? import_react_pagify.default;
36
41
  const blockName = "data-grid";
37
42
  const PaginationContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "pagination");
38
- const PagifyContext = (0, import_ds_classnames.aggregatedClasses)(import_react_pagify.default?.Context)(blockName, "pagify-pagination");
43
+ const PagifyContext = (0, import_ds_classnames.aggregatedClasses)(Comp?.Context)(blockName, "pagify-pagination");
39
44
  const Paginator = ({ pagination, pages, onSelect, labelPrevious = "Previous", labelNext = "Next" }) => {
40
45
  const prevPage = pagination.page - 1;
41
46
  const nextPage = pagination.page + 1;
@@ -51,15 +56,15 @@ const Paginator = ({ pagination, pages, onSelect, labelPrevious = "Previous", la
51
56
  sidePages: 1
52
57
  }),
53
58
  children: [
54
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Button, { className: pagination.page <= 1 ? "button-disabled" : "", page: prevPage, children: labelPrevious }),
55
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { field: "beginPages" }),
56
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Ellipsis, { className: "ellipsis", nextField: "previousPages", previousField: "beginPages" }),
57
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { field: "previousPages" }),
58
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { className: "selected", field: "centerPage" }),
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { field: "nextPages" }),
60
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Ellipsis, { className: "ellipsis", nextField: "endPages", previousField: "nextPages" }),
61
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Segment, { field: "endPages" }),
62
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_pagify.default.Button, { className: pagination.page >= pages ? "button-disabled" : "", page: nextPage, children: labelNext })
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Button, { className: pagination.page <= 1 ? "button-disabled" : "", page: prevPage, children: labelPrevious }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "beginPages" }),
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Ellipsis, { className: "ellipsis", nextField: "previousPages", previousField: "beginPages" }),
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "previousPages" }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { className: "selected", field: "centerPage" }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "nextPages" }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Ellipsis, { className: "ellipsis", nextField: "endPages", previousField: "nextPages" }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Segment, { field: "endPages" }),
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp.Button, { className: pagination.page >= pages ? "button-disabled" : "", page: nextPage, children: labelNext })
63
68
  ]
64
69
  }
65
70
  ) });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/plugins/pagination/components/Paginator.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport ReactPagify from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'data-grid';\n\nconst PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');\nconst PagifyContext = aggregatedClasses(ReactPagify?.Context)(blockName, 'pagify-pagination');\n\nconst Paginator = ({ pagination, pages, onSelect, labelPrevious = 'Previous', labelNext = 'Next' }) => {\n const prevPage = pagination.page - 1;\n const nextPage = pagination.page + 1;\n return (\n <PaginationContainer>\n <PagifyContext\n onSelect={(page) => page !== pagination.page && onSelect(page)}\n segments={segmentize({\n page: pagination.page,\n pages,\n beginPages: 1,\n endPages: 1,\n sidePages: 1,\n })}\n >\n <ReactPagify.Button className={pagination.page <= 1 ? 'button-disabled' : ''} page={prevPage}>\n {labelPrevious}\n </ReactPagify.Button>\n\n <ReactPagify.Segment field=\"beginPages\" />\n\n <ReactPagify.Ellipsis className=\"ellipsis\" nextField=\"previousPages\" previousField=\"beginPages\" />\n\n <ReactPagify.Segment field=\"previousPages\" />\n <ReactPagify.Segment className=\"selected\" field=\"centerPage\" />\n <ReactPagify.Segment field=\"nextPages\" />\n\n <ReactPagify.Ellipsis className=\"ellipsis\" nextField=\"endPages\" previousField=\"nextPages\" />\n\n <ReactPagify.Segment field=\"endPages\" />\n\n <ReactPagify.Button className={pagination.page >= pages ? 'button-disabled' : ''} page={nextPage}>\n {labelNext}\n </ReactPagify.Button>\n </PagifyContext>\n </PaginationContainer>\n );\n};\n\nexport { Paginator };\nexport default Paginator;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBjB;AAdN,0BAAwB;AACxB,wBAAuB;AACvB,2BAAkC;AAElC,MAAM,YAAY;AAElB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,YAAY;AAC5E,MAAM,oBAAgB,wCAAkB,oBAAAA,SAAa,OAAO,EAAE,WAAW,mBAAmB;AAE5F,MAAM,YAAY,CAAC,EAAE,YAAY,OAAO,UAAU,gBAAgB,YAAY,YAAY,OAAO,MAAM;AACrG,QAAM,WAAW,WAAW,OAAO;AACnC,QAAM,WAAW,WAAW,OAAO;AACnC,SACE,4CAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC,SAAS,SAAS,WAAW,QAAQ,SAAS,IAAI;AAAA,MAC7D,cAAU,kBAAAC,SAAW;AAAA,QACnB,MAAM,WAAW;AAAA,QACjB;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,MACb,CAAC;AAAA,MAED;AAAA,oDAAC,oBAAAD,QAAY,QAAZ,EAAmB,WAAW,WAAW,QAAQ,IAAI,oBAAoB,IAAI,MAAM,UACjF,yBACH;AAAA,QAEA,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,OAAM,cAAa;AAAA,QAExC,4CAAC,oBAAAA,QAAY,UAAZ,EAAqB,WAAU,YAAW,WAAU,iBAAgB,eAAc,cAAa;AAAA,QAEhG,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,OAAM,iBAAgB;AAAA,QAC3C,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,WAAU,YAAW,OAAM,cAAa;AAAA,QAC7D,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,OAAM,aAAY;AAAA,QAEvC,4CAAC,oBAAAA,QAAY,UAAZ,EAAqB,WAAU,YAAW,WAAU,YAAW,eAAc,aAAY;AAAA,QAE1F,4CAAC,oBAAAA,QAAY,SAAZ,EAAoB,OAAM,YAAW;AAAA,QAEtC,4CAAC,oBAAAA,QAAY,QAAZ,EAAmB,WAAW,WAAW,QAAQ,QAAQ,oBAAoB,IAAI,MAAM,UACrF,qBACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAGA,IAAO,oBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport { default as ReactPagify } from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst Comp = (ReactPagify as any)?.default ?? ReactPagify;\nconst blockName = 'data-grid';\nconst PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');\nconst PagifyContext = aggregatedClasses(Comp?.Context)(blockName, 'pagify-pagination');\n\nconst Paginator = ({ pagination, pages, onSelect, labelPrevious = 'Previous', labelNext = 'Next' }) => {\n const prevPage = pagination.page - 1;\n const nextPage = pagination.page + 1;\n\n return (\n <PaginationContainer>\n <PagifyContext\n onSelect={(page) => page !== pagination.page && onSelect(page)}\n segments={segmentize({\n page: pagination.page,\n pages,\n beginPages: 1,\n endPages: 1,\n sidePages: 1,\n })}\n >\n <Comp.Button className={pagination.page <= 1 ? 'button-disabled' : ''} page={prevPage}>\n {labelPrevious}\n </Comp.Button>\n\n <Comp.Segment field=\"beginPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"previousPages\" previousField=\"beginPages\" />\n\n <Comp.Segment field=\"previousPages\" />\n <Comp.Segment className=\"selected\" field=\"centerPage\" />\n <Comp.Segment field=\"nextPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"endPages\" previousField=\"nextPages\" />\n\n <Comp.Segment field=\"endPages\" />\n\n <Comp.Button className={pagination.page >= pages ? 'button-disabled' : ''} page={nextPage}>\n {labelNext}\n </Comp.Button>\n </PagifyContext>\n </PaginationContainer>\n );\n};\n\nexport { Paginator };\nexport default Paginator;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBjB;AAfN,0BAAuC;AACvC,wBAAuB;AACvB,2BAAkC;AAElC,MAAM,OAAQ,oBAAAA,SAAqB,WAAW,oBAAAA;AAC9C,MAAM,YAAY;AAClB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,YAAY;AAC5E,MAAM,oBAAgB,wCAAkB,MAAM,OAAO,EAAE,WAAW,mBAAmB;AAErF,MAAM,YAAY,CAAC,EAAE,YAAY,OAAO,UAAU,gBAAgB,YAAY,YAAY,OAAO,MAAM;AACrG,QAAM,WAAW,WAAW,OAAO;AACnC,QAAM,WAAW,WAAW,OAAO;AAEnC,SACE,4CAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC,SAAS,SAAS,WAAW,QAAQ,SAAS,IAAI;AAAA,MAC7D,cAAU,kBAAAC,SAAW;AAAA,QACnB,MAAM,WAAW;AAAA,QACjB;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,MACb,CAAC;AAAA,MAED;AAAA,oDAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,IAAI,oBAAoB,IAAI,MAAM,UAC1E,yBACH;AAAA,QAEA,4CAAC,KAAK,SAAL,EAAa,OAAM,cAAa;AAAA,QAEjC,4CAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,iBAAgB,eAAc,cAAa;AAAA,QAEzF,4CAAC,KAAK,SAAL,EAAa,OAAM,iBAAgB;AAAA,QACpC,4CAAC,KAAK,SAAL,EAAa,WAAU,YAAW,OAAM,cAAa;AAAA,QACtD,4CAAC,KAAK,SAAL,EAAa,OAAM,aAAY;AAAA,QAEhC,4CAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,YAAW,eAAc,aAAY;AAAA,QAEnF,4CAAC,KAAK,SAAL,EAAa,OAAM,YAAW;AAAA,QAE/B,4CAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,QAAQ,oBAAoB,IAAI,MAAM,UAC9E,qBACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAGA,IAAO,oBAAQ;",
6
6
  "names": ["ReactPagify", "segmentize"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -46,7 +50,7 @@ const getOptions = (0, import_memoize_one.default)((step, min, max) => {
46
50
  const options = (0, import_ds_utilities.range)(min, max + step, step).map(generateOption);
47
51
  return min === 0 ? options.slice(1, options.length) : options;
48
52
  });
49
- function PerPageDropdown({ min = 0, max = 100, step = 5, value = 0, onChange = () => null }) {
53
+ const PerPageDropdown = ({ min = 0, max = 100, step = 5, value = 0, onChange = () => null }) => {
50
54
  const options = getOptions(step, min, max);
51
55
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
56
  import_ds_form.DSComboBox,
@@ -65,6 +69,6 @@ function PerPageDropdown({ min = 0, max = 100, step = 5, value = 0, onChange = (
65
69
  value
66
70
  }
67
71
  );
68
- }
72
+ };
69
73
  var PerPageDropdown_default = PerPageDropdown;
70
74
  //# sourceMappingURL=PerPageDropdown.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/plugins/pagination/components/PerPageDropdown.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport memoize from 'memoize-one';\nimport { range } from '@elliemae/ds-utilities';\nimport { DSComboBox, components } from '@elliemae/ds-form';\n\nconst SingleValue = ({ children, ...props }) => (\n <components.SingleValue {...props}>\n {children} <span>per page</span>\n </components.SingleValue>\n);\n\nconst generateOption = (value) => ({\n value,\n label: value,\n});\nconst getOptions = memoize((step, min, max) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n});\n\nfunction PerPageDropdown({ min = 0, max = 100, step = 5, value = 0, onChange = () => null }) {\n const options = getOptions(step, min, max);\n return (\n <DSComboBox\n className=\"per-page-dropdown\"\n components={{\n SingleValue,\n }}\n containerProps={{\n 'data-testid': 'per-page-dropdown',\n }}\n maxOptions={10}\n onChange={onChange}\n options={options}\n searchable={false}\n value={value}\n />\n );\n}\n\nexport { PerPageDropdown };\nexport default PerPageDropdown;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADMrB;AALF,yBAAoB;AACpB,0BAAsB;AACtB,qBAAuC;AAEvC,MAAM,cAAc,CAAC,EAAE,aAAa,MAAM,MACxC,6CAAC,0BAAW,aAAX,EAAwB,GAAG,OACzB;AAAA;AAAA,EAAS;AAAA,EAAC,4CAAC,UAAK,sBAAQ;AAAA,GAC3B;AAGF,MAAM,iBAAiB,CAAC,WAAW;AAAA,EACjC;AAAA,EACA,OAAO;AACT;AACA,MAAM,iBAAa,mBAAAA,SAAQ,CAAC,MAAM,KAAK,QAAQ;AAC7C,QAAM,cAAU,2BAAM,KAAK,MAAM,MAAM,IAAI,EAAE,IAAI,cAAc;AAC/D,SAAO,QAAQ,IAAI,QAAQ,MAAM,GAAG,QAAQ,MAAM,IAAI;AACxD,CAAC;AAED,SAAS,gBAAgB,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,GAAG,QAAQ,GAAG,WAAW,MAAM,KAAK,GAAG;AAC3F,QAAM,UAAU,WAAW,MAAM,KAAK,GAAG;AACzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,YAAY;AAAA,QACV;AAAA,MACF;AAAA,MACA,gBAAgB;AAAA,QACd,eAAe;AAAA,MACjB;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ;AAAA;AAAA,EACF;AAEJ;AAGA,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport memoize from 'memoize-one';\nimport { range } from '@elliemae/ds-utilities';\nimport { DSComboBox, components } from '@elliemae/ds-form';\n\nconst SingleValue = ({ children, ...props }) => (\n <components.SingleValue {...props}>\n {children} <span>per page</span>\n </components.SingleValue>\n);\n\nconst generateOption = (value) => ({\n value,\n label: value,\n});\nconst getOptions = memoize((step, min, max) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n});\n\nconst PerPageDropdown = ({ min = 0, max = 100, step = 5, value = 0, onChange = () => null }) => {\n const options = getOptions(step, min, max);\n return (\n <DSComboBox\n className=\"per-page-dropdown\"\n components={{\n SingleValue,\n }}\n containerProps={{\n 'data-testid': 'per-page-dropdown',\n }}\n maxOptions={10}\n onChange={onChange}\n options={options}\n searchable={false}\n value={value}\n />\n );\n};\n\nexport { PerPageDropdown };\nexport default PerPageDropdown;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADMrB;AALF,yBAAoB;AACpB,0BAAsB;AACtB,qBAAuC;AAEvC,MAAM,cAAc,CAAC,EAAE,UAAU,GAAG,MAAM,MACxC,6CAAC,0BAAW,aAAX,EAAwB,GAAG,OACzB;AAAA;AAAA,EAAS;AAAA,EAAC,4CAAC,UAAK,sBAAQ;AAAA,GAC3B;AAGF,MAAM,iBAAiB,CAAC,WAAW;AAAA,EACjC;AAAA,EACA,OAAO;AACT;AACA,MAAM,iBAAa,mBAAAA,SAAQ,CAAC,MAAM,KAAK,QAAQ;AAC7C,QAAM,cAAU,2BAAM,KAAK,MAAM,MAAM,IAAI,EAAE,IAAI,cAAc;AAC/D,SAAO,QAAQ,IAAI,QAAQ,MAAM,GAAG,QAAQ,MAAM,IAAI;AACxD,CAAC;AAED,MAAM,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,GAAG,QAAQ,GAAG,WAAW,MAAM,KAAK,MAAM;AAC9F,QAAM,UAAU,WAAW,MAAM,KAAK,GAAG;AACzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,YAAY;AAAA,QACV;AAAA,MACF;AAAA,MACA,gBAAgB;AAAA,QACd,eAAe;AAAA,MACjB;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ;AAAA;AAAA,EACF;AAEJ;AAGA,IAAO,0BAAQ;",
6
6
  "names": ["memoize"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/pagination/helper.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const parsePerPageNumber = (number, max, min = 1) => {\n if (number > max) return max;\n if (number < min) return min;\n return number;\n};\n\nexport const paginate = (\n rows,\n { page, perPage = 1, amountOfPages: amount, totalRows },\n) => {\n // return if pagination state is controlled\n if (amount && totalRows) {\n return {\n amount,\n rows,\n page,\n };\n }\n // adapt to zero indexed logic\n const p = page - 1 || 0;\n\n const amountOfPages = perPage\n ? Math.ceil(rows.length / (perPage > 0 ? perPage : 1))\n : 1;\n const startPage = p < amountOfPages ? p : 0;\n\n return {\n amount: amountOfPages,\n rows: perPage\n ? rows.slice(startPage * perPage, startPage * perPage + perPage)\n : rows,\n allRows: rows,\n page: startPage,\n };\n};\n\nexport default paginate;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,qBAAqB,CAAC,QAAQ,KAAK,MAAM,MAAM;AAC1D,MAAI,SAAS;AAAK,WAAO;AACzB,MAAI,SAAS;AAAK,WAAO;AACzB,SAAO;AACT;AAEO,MAAM,WAAW,CACtB,MACA,EAAE,MAAM,UAAU,GAAG,eAAe,QAAQ,UAAU,MACnD;AAEH,MAAI,UAAU,WAAW;AACvB,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,IAAI,OAAO,KAAK;AAEtB,QAAM,gBAAgB,UAClB,KAAK,KAAK,KAAK,UAAU,UAAU,IAAI,UAAU,EAAE,IACnD;AACJ,QAAM,YAAY,IAAI,gBAAgB,IAAI;AAE1C,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,MAAM,UACF,KAAK,MAAM,YAAY,SAAS,YAAY,UAAU,OAAO,IAC7D;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACF;AAEA,IAAO,iBAAQ;",
4
+ "sourcesContent": ["export const parsePerPageNumber = (number, max, min = 1) => {\n if (number > max) return max;\n if (number < min) return min;\n return number;\n};\n\nexport const paginate = (rows, { page, perPage = 1, amountOfPages: amount, totalRows }) => {\n // return if pagination state is controlled\n if (amount && totalRows) {\n return {\n amount,\n rows,\n page,\n };\n }\n // adapt to zero indexed logic\n const p = page - 1 || 0;\n\n const amountOfPages = perPage ? Math.ceil(rows.length / (perPage > 0 ? perPage : 1)) : 1;\n const startPage = p < amountOfPages ? p : 0;\n\n return {\n amount: amountOfPages,\n rows: perPage ? rows.slice(startPage * perPage, startPage * perPage + perPage) : rows,\n allRows: rows,\n page: startPage,\n };\n};\n\nexport default paginate;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,qBAAqB,CAAC,QAAQ,KAAK,MAAM,MAAM;AAC1D,MAAI,SAAS;AAAK,WAAO;AACzB,MAAI,SAAS;AAAK,WAAO;AACzB,SAAO;AACT;AAEO,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,UAAU,GAAG,eAAe,QAAQ,UAAU,MAAM;AAEzF,MAAI,UAAU,WAAW;AACvB,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,IAAI,OAAO,KAAK;AAEtB,QAAM,gBAAgB,UAAU,KAAK,KAAK,KAAK,UAAU,UAAU,IAAI,UAAU,EAAE,IAAI;AACvF,QAAM,YAAY,IAAI,gBAAgB,IAAI;AAE1C,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,MAAM,UAAU,KAAK,MAAM,YAAY,SAAS,YAAY,UAAU,OAAO,IAAI;AAAA,IACjF,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACF;AAEA,IAAO,iBAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -28,5 +32,5 @@ __export(pagination_exports, {
28
32
  });
29
33
  module.exports = __toCommonJS(pagination_exports);
30
34
  var React = __toESM(require("react"));
31
- var import_PaginationPlugin = require("./PaginationPlugin");
35
+ var import_PaginationPlugin = require("./PaginationPlugin.js");
32
36
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/pagination/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { PaginationPlugin } from './PaginationPlugin';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
4
+ "sourcesContent": ["export { PaginationPlugin } from './PaginationPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -29,7 +33,7 @@ __export(usePaginationState_exports, {
29
33
  module.exports = __toCommonJS(usePaginationState_exports);
30
34
  var React = __toESM(require("react"));
31
35
  var import_ds_utilities = require("@elliemae/ds-utilities");
32
- var import_helper = require("./helper");
36
+ var import_helper = require("./helper.js");
33
37
  function usePaginationState(grid) {
34
38
  const {
35
39
  minPerPage = 0,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/pagination/usePaginationState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { parsePerPageNumber } from './helper';\n\nexport function usePaginationState(grid) {\n const {\n minPerPage = 0,\n maxPerPage = 50,\n onPerPageChange = () => null,\n onPageChange = () => null,\n pagination: paginationProp = {\n page: 1,\n perPage: 10,\n },\n groupedRows,\n } = grid.props;\n const { composedRows, rows } = grid.getInstance();\n const [pagination, setPagination] = useDerivedStateFromProps(paginationProp);\n\n const onPerPage = (perPageNumber) => {\n const parsedPerPageNumber = parsePerPageNumber(perPageNumber, maxPerPage, minPerPage);\n const actualNumber = parsedPerPageNumber ? parseInt(parsedPerPageNumber, 10) : 0;\n\n setPagination((prevPagination) => {\n onPerPageChange(actualNumber);\n return {\n page: prevPagination.page,\n perPage: actualNumber,\n };\n });\n };\n\n const onPageSelect = (page) => {\n const length = groupedRows ? composedRows.length : rows.length;\n setPagination((prevPagination) => {\n const pages = Math.ceil(length / prevPagination.perPage);\n onPageChange(page);\n return {\n ...prevPagination,\n page: Math.min(Math.max(page, 1), pages),\n };\n });\n };\n\n return {\n state: {\n pagination,\n },\n actions: {\n onPerPage,\n onPageSelect,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyC;AACzC,oBAAmC;AAE5B,SAAS,mBAAmB,MAAM;AACvC,QAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,kBAAkB,MAAM;AAAA,IACxB,eAAe,MAAM;AAAA,IACrB,YAAY,iBAAiB;AAAA,MAC3B,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA;AAAA,EACF,IAAI,KAAK;AACT,QAAM,EAAE,cAAc,KAAK,IAAI,KAAK,YAAY;AAChD,QAAM,CAAC,YAAY,aAAa,QAAI,8CAAyB,cAAc;AAE3E,QAAM,YAAY,CAAC,kBAAkB;AACnC,UAAM,0BAAsB,kCAAmB,eAAe,YAAY,UAAU;AACpF,UAAM,eAAe,sBAAsB,SAAS,qBAAqB,EAAE,IAAI;AAE/E,kBAAc,CAAC,mBAAmB;AAChC,sBAAgB,YAAY;AAC5B,aAAO;AAAA,QACL,MAAM,eAAe;AAAA,QACrB,SAAS;AAAA,MACX;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM,eAAe,CAAC,SAAS;AAC7B,UAAM,SAAS,cAAc,aAAa,SAAS,KAAK;AACxD,kBAAc,CAAC,mBAAmB;AAChC,YAAM,QAAQ,KAAK,KAAK,SAAS,eAAe,OAAO;AACvD,mBAAa,IAAI;AACjB,aAAO;AAAA,QACL,GAAG;AAAA,QACH,MAAM,KAAK,IAAI,KAAK,IAAI,MAAM,CAAC,GAAG,KAAK;AAAA,MACzC;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { parsePerPageNumber } from './helper.js';\n\nexport function usePaginationState(grid) {\n const {\n minPerPage = 0,\n maxPerPage = 50,\n onPerPageChange = () => null,\n onPageChange = () => null,\n pagination: paginationProp = {\n page: 1,\n perPage: 10,\n },\n groupedRows,\n } = grid.props;\n const { composedRows, rows } = grid.getInstance();\n const [pagination, setPagination] = useDerivedStateFromProps(paginationProp);\n\n const onPerPage = (perPageNumber) => {\n const parsedPerPageNumber = parsePerPageNumber(perPageNumber, maxPerPage, minPerPage);\n const actualNumber = parsedPerPageNumber ? parseInt(parsedPerPageNumber, 10) : 0;\n\n setPagination((prevPagination) => {\n onPerPageChange(actualNumber);\n return {\n page: prevPagination.page,\n perPage: actualNumber,\n };\n });\n };\n\n const onPageSelect = (page) => {\n const length = groupedRows ? composedRows.length : rows.length;\n setPagination((prevPagination) => {\n const pages = Math.ceil(length / prevPagination.perPage);\n onPageChange(page);\n return {\n ...prevPagination,\n page: Math.min(Math.max(page, 1), pages),\n };\n });\n };\n\n return {\n state: {\n pagination,\n },\n actions: {\n onPerPage,\n onPageSelect,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyC;AACzC,oBAAmC;AAE5B,SAAS,mBAAmB,MAAM;AACvC,QAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,kBAAkB,MAAM;AAAA,IACxB,eAAe,MAAM;AAAA,IACrB,YAAY,iBAAiB;AAAA,MAC3B,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA;AAAA,EACF,IAAI,KAAK;AACT,QAAM,EAAE,cAAc,KAAK,IAAI,KAAK,YAAY;AAChD,QAAM,CAAC,YAAY,aAAa,QAAI,8CAAyB,cAAc;AAE3E,QAAM,YAAY,CAAC,kBAAkB;AACnC,UAAM,0BAAsB,kCAAmB,eAAe,YAAY,UAAU;AACpF,UAAM,eAAe,sBAAsB,SAAS,qBAAqB,EAAE,IAAI;AAE/E,kBAAc,CAAC,mBAAmB;AAChC,sBAAgB,YAAY;AAC5B,aAAO;AAAA,QACL,MAAM,eAAe;AAAA,QACrB,SAAS;AAAA,MACX;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM,eAAe,CAAC,SAAS;AAC7B,UAAM,SAAS,cAAc,aAAa,SAAS,KAAK;AACxD,kBAAc,CAAC,mBAAmB;AAChC,YAAM,QAAQ,KAAK,KAAK,SAAS,eAAe,OAAO;AACvD,mBAAa,IAAI;AACjB,aAAO;AAAA,QACL,GAAG;AAAA,QACH,MAAM,KAAK,IAAI,KAAK,IAAI,MAAM,CAAC,GAAG,KAAK;AAAA,MACzC;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -30,7 +34,7 @@ module.exports = __toCommonJS(ResizablePlugin_exports);
30
34
  var React = __toESM(require("react"));
31
35
  var import_ds_utilities = require("@elliemae/ds-utilities");
32
36
  var import_ds_shared = require("@elliemae/ds-shared");
33
- var import_decorateResizable = require("./decorateResizable");
37
+ var import_decorateResizable = require("./decorateResizable.js");
34
38
  const noop = () => null;
35
39
  const DELTA_LAST_COLUMN = 25;
36
40
  const decorateColumn = (column, grid, index) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/resizable/ResizablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-statements */\nimport { runAll } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addResizableToColumn, resizableFormatter } from './decorateResizable';\n\nconst noop = () => null;\n\nconst DELTA_LAST_COLUMN = 25;\n\n// eslint-disable-next-line no-unused-vars\nconst decorateColumn = (column, grid, index) => {\n const {\n onResizeEnd = noop,\n onResizeStart = noop,\n minColumnWidth = 90,\n isColumnResizeActive = (col) => col.resizable && !col.expandableColumn,\n onColumnResize,\n } = grid.props;\n\n const { decoratedColumns } = grid.getInstance();\n // need to do this because the decorated columns which the index in the function call\n // could be different from the final decorated columns because a plugin could add a\n // column afterwards\n const colIndex = decoratedColumns.findIndex((col) => col.property === column.property);\n const isLast = colIndex === decoratedColumns.length - 1;\n\n if (!isColumnResizeActive(column)) return column;\n return addResizableToColumn(\n column,\n resizableFormatter({\n onDragStart: () => {\n grid.isDragging.current = true;\n grid.disableEvents();\n onResizeStart();\n onColumnResize('onResizeStart', { column });\n },\n onDrag: (width, increasing) => {\n const { resizedColumns, refs } = grid.getInstance();\n if (isLast && increasing) {\n const thisCol = resizedColumns.current[column.uuid] || 0;\n width = Math.max(thisCol + DELTA_LAST_COLUMN, width);\n }\n column.updateBodyHeaderWidth(width, width);\n grid.updateRowWidth();\n if (isLast && increasing) {\n // TODO: Move this to packages/ds-shared/src/ScrollSync/ScrollSync.js\n // It isn't watching the scrollLeft so you have to move both at the same time\n refs.header.current.scrollLeft += DELTA_LAST_COLUMN;\n refs.body.current.scrollLeft += DELTA_LAST_COLUMN;\n }\n },\n onDragEnd: (width, increasing, extraData) => {\n const { resizedColumns } = grid.getInstance();\n if (isLast && increasing) {\n const thisCol = resizedColumns.current[column.uuid] || 0;\n width = Math.max(thisCol + DELTA_LAST_COLUMN, width);\n }\n resizedColumns.current[column.uuid] = width;\n\n grid.isDragging.current = false;\n grid.enableEvents();\n try {\n const total = grid.getInstance().refs.body.current.scrollWidth;\n const sum = Object.keys(grid.resizedColumns.current).reduce((p, n) => grid.resizedColumns.current[n] + p, 0);\n const lastKey = grid.decoratedColumns[grid.columns.length - 1].uuid;\n if (sum < total) {\n const lastCol = grid.getInstance().columnSizeService.columns[lastKey];\n lastCol.updateWidth(grid.resizedColumns.current[lastKey] + total - sum);\n lastCol.updateBodyHeaderWidth(grid.resizedColumns.current[lastKey] + total - sum);\n grid.getInstance().columnSizeService.updateMissingWidths(total);\n }\n } catch (error) {\n console.error(\n 'Unexpected error in the addResizableToColumn trying to use the remaining grid space to the last column',\n error,\n );\n }\n\n onColumnResize('onResizeEnd', {\n column,\n width,\n extraData,\n });\n runAll(onResizeEnd)(width, extraData);\n grid.updateRowWidth();\n },\n minWidth: (column.minWidth || minColumnWidth) - (isLast ? DELTA_LAST_COLUMN : 0),\n isLast,\n }),\n );\n};\n\nexport const ResizablePlugin = createInstancePlugin('resizable', {\n decorateColumn,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAuB;AACvB,uBAAqC;AACrC,+BAAyD;AAEzD,MAAM,OAAO,MAAM;AAEnB,MAAM,oBAAoB;AAG1B,MAAM,iBAAiB,CAAC,QAAQ,MAAM,UAAU;AAC9C,QAAM;AAAA,IACJ,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,uBAAuB,CAAC,QAAQ,IAAI,aAAa,CAAC,IAAI;AAAA,IACtD;AAAA,EACF,IAAI,KAAK;AAET,QAAM,EAAE,iBAAiB,IAAI,KAAK,YAAY;AAI9C,QAAM,WAAW,iBAAiB,UAAU,CAAC,QAAQ,IAAI,aAAa,OAAO,QAAQ;AACrF,QAAM,SAAS,aAAa,iBAAiB,SAAS;AAEtD,MAAI,CAAC,qBAAqB,MAAM;AAAG,WAAO;AAC1C,aAAO;AAAA,IACL;AAAA,QACA,6CAAmB;AAAA,MACjB,aAAa,MAAM;AACjB,aAAK,WAAW,UAAU;AAC1B,aAAK,cAAc;AACnB,sBAAc;AACd,uBAAe,iBAAiB,EAAE,OAAO,CAAC;AAAA,MAC5C;AAAA,MACA,QAAQ,CAAC,OAAO,eAAe;AAC7B,cAAM,EAAE,gBAAgB,KAAK,IAAI,KAAK,YAAY;AAClD,YAAI,UAAU,YAAY;AACxB,gBAAM,UAAU,eAAe,QAAQ,OAAO,SAAS;AACvD,kBAAQ,KAAK,IAAI,UAAU,mBAAmB,KAAK;AAAA,QACrD;AACA,eAAO,sBAAsB,OAAO,KAAK;AACzC,aAAK,eAAe;AACpB,YAAI,UAAU,YAAY;AAGxB,eAAK,OAAO,QAAQ,cAAc;AAClC,eAAK,KAAK,QAAQ,cAAc;AAAA,QAClC;AAAA,MACF;AAAA,MACA,WAAW,CAAC,OAAO,YAAY,cAAc;AAC3C,cAAM,EAAE,eAAe,IAAI,KAAK,YAAY;AAC5C,YAAI,UAAU,YAAY;AACxB,gBAAM,UAAU,eAAe,QAAQ,OAAO,SAAS;AACvD,kBAAQ,KAAK,IAAI,UAAU,mBAAmB,KAAK;AAAA,QACrD;AACA,uBAAe,QAAQ,OAAO,QAAQ;AAEtC,aAAK,WAAW,UAAU;AAC1B,aAAK,aAAa;AAClB,YAAI;AACF,gBAAM,QAAQ,KAAK,YAAY,EAAE,KAAK,KAAK,QAAQ;AACnD,gBAAM,MAAM,OAAO,KAAK,KAAK,eAAe,OAAO,EAAE,OAAO,CAAC,GAAG,MAAM,KAAK,eAAe,QAAQ,KAAK,GAAG,CAAC;AAC3G,gBAAM,UAAU,KAAK,iBAAiB,KAAK,QAAQ,SAAS,GAAG;AAC/D,cAAI,MAAM,OAAO;AACf,kBAAM,UAAU,KAAK,YAAY,EAAE,kBAAkB,QAAQ;AAC7D,oBAAQ,YAAY,KAAK,eAAe,QAAQ,WAAW,QAAQ,GAAG;AACtE,oBAAQ,sBAAsB,KAAK,eAAe,QAAQ,WAAW,QAAQ,GAAG;AAChF,iBAAK,YAAY,EAAE,kBAAkB,oBAAoB,KAAK;AAAA,UAChE;AAAA,QACF,SAAS,OAAP;AACA,kBAAQ;AAAA,YACN;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAEA,uBAAe,eAAe;AAAA,UAC5B;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AACD,wCAAO,WAAW,EAAE,OAAO,SAAS;AACpC,aAAK,eAAe;AAAA,MACtB;AAAA,MACA,WAAW,OAAO,YAAY,mBAAmB,SAAS,oBAAoB;AAAA,MAC9E;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,MAAM,sBAAkB,uCAAqB,aAAa;AAAA,EAC/D;AACF,CAAC;",
4
+ "sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-statements */\nimport { runAll } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addResizableToColumn, resizableFormatter } from './decorateResizable.js';\n\nconst noop = () => null;\n\nconst DELTA_LAST_COLUMN = 25;\n\n// eslint-disable-next-line no-unused-vars\nconst decorateColumn = (column, grid, index) => {\n const {\n onResizeEnd = noop,\n onResizeStart = noop,\n minColumnWidth = 90,\n isColumnResizeActive = (col) => col.resizable && !col.expandableColumn,\n onColumnResize,\n } = grid.props;\n\n const { decoratedColumns } = grid.getInstance();\n // need to do this because the decorated columns which the index in the function call\n // could be different from the final decorated columns because a plugin could add a\n // column afterwards\n const colIndex = decoratedColumns.findIndex((col) => col.property === column.property);\n const isLast = colIndex === decoratedColumns.length - 1;\n\n if (!isColumnResizeActive(column)) return column;\n return addResizableToColumn(\n column,\n resizableFormatter({\n onDragStart: () => {\n grid.isDragging.current = true;\n grid.disableEvents();\n onResizeStart();\n onColumnResize('onResizeStart', { column });\n },\n onDrag: (width, increasing) => {\n const { resizedColumns, refs } = grid.getInstance();\n if (isLast && increasing) {\n const thisCol = resizedColumns.current[column.uuid] || 0;\n width = Math.max(thisCol + DELTA_LAST_COLUMN, width);\n }\n column.updateBodyHeaderWidth(width, width);\n grid.updateRowWidth();\n if (isLast && increasing) {\n // TODO: Move this to packages/ds-shared/src/ScrollSync/ScrollSync.js\n // It isn't watching the scrollLeft so you have to move both at the same time\n refs.header.current.scrollLeft += DELTA_LAST_COLUMN;\n refs.body.current.scrollLeft += DELTA_LAST_COLUMN;\n }\n },\n onDragEnd: (width, increasing, extraData) => {\n const { resizedColumns } = grid.getInstance();\n if (isLast && increasing) {\n const thisCol = resizedColumns.current[column.uuid] || 0;\n width = Math.max(thisCol + DELTA_LAST_COLUMN, width);\n }\n resizedColumns.current[column.uuid] = width;\n\n grid.isDragging.current = false;\n grid.enableEvents();\n try {\n const total = grid.getInstance().refs.body.current.scrollWidth;\n const sum = Object.keys(grid.resizedColumns.current).reduce((p, n) => grid.resizedColumns.current[n] + p, 0);\n const lastKey = grid.decoratedColumns[grid.columns.length - 1].uuid;\n if (sum < total) {\n const lastCol = grid.getInstance().columnSizeService.columns[lastKey];\n lastCol.updateWidth(grid.resizedColumns.current[lastKey] + total - sum);\n lastCol.updateBodyHeaderWidth(grid.resizedColumns.current[lastKey] + total - sum);\n grid.getInstance().columnSizeService.updateMissingWidths(total);\n }\n } catch (error) {\n console.error(\n 'Unexpected error in the addResizableToColumn trying to use the remaining grid space to the last column',\n error,\n );\n }\n\n onColumnResize('onResizeEnd', {\n column,\n width,\n extraData,\n });\n runAll(onResizeEnd)(width, extraData);\n grid.updateRowWidth();\n },\n minWidth: (column.minWidth || minColumnWidth) - (isLast ? DELTA_LAST_COLUMN : 0),\n isLast,\n }),\n );\n};\n\nexport const ResizablePlugin = createInstancePlugin('resizable', {\n decorateColumn,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAuB;AACvB,uBAAqC;AACrC,+BAAyD;AAEzD,MAAM,OAAO,MAAM;AAEnB,MAAM,oBAAoB;AAG1B,MAAM,iBAAiB,CAAC,QAAQ,MAAM,UAAU;AAC9C,QAAM;AAAA,IACJ,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,uBAAuB,CAAC,QAAQ,IAAI,aAAa,CAAC,IAAI;AAAA,IACtD;AAAA,EACF,IAAI,KAAK;AAET,QAAM,EAAE,iBAAiB,IAAI,KAAK,YAAY;AAI9C,QAAM,WAAW,iBAAiB,UAAU,CAAC,QAAQ,IAAI,aAAa,OAAO,QAAQ;AACrF,QAAM,SAAS,aAAa,iBAAiB,SAAS;AAEtD,MAAI,CAAC,qBAAqB,MAAM;AAAG,WAAO;AAC1C,aAAO;AAAA,IACL;AAAA,QACA,6CAAmB;AAAA,MACjB,aAAa,MAAM;AACjB,aAAK,WAAW,UAAU;AAC1B,aAAK,cAAc;AACnB,sBAAc;AACd,uBAAe,iBAAiB,EAAE,OAAO,CAAC;AAAA,MAC5C;AAAA,MACA,QAAQ,CAAC,OAAO,eAAe;AAC7B,cAAM,EAAE,gBAAgB,KAAK,IAAI,KAAK,YAAY;AAClD,YAAI,UAAU,YAAY;AACxB,gBAAM,UAAU,eAAe,QAAQ,OAAO,IAAI,KAAK;AACvD,kBAAQ,KAAK,IAAI,UAAU,mBAAmB,KAAK;AAAA,QACrD;AACA,eAAO,sBAAsB,OAAO,KAAK;AACzC,aAAK,eAAe;AACpB,YAAI,UAAU,YAAY;AAGxB,eAAK,OAAO,QAAQ,cAAc;AAClC,eAAK,KAAK,QAAQ,cAAc;AAAA,QAClC;AAAA,MACF;AAAA,MACA,WAAW,CAAC,OAAO,YAAY,cAAc;AAC3C,cAAM,EAAE,eAAe,IAAI,KAAK,YAAY;AAC5C,YAAI,UAAU,YAAY;AACxB,gBAAM,UAAU,eAAe,QAAQ,OAAO,IAAI,KAAK;AACvD,kBAAQ,KAAK,IAAI,UAAU,mBAAmB,KAAK;AAAA,QACrD;AACA,uBAAe,QAAQ,OAAO,IAAI,IAAI;AAEtC,aAAK,WAAW,UAAU;AAC1B,aAAK,aAAa;AAClB,YAAI;AACF,gBAAM,QAAQ,KAAK,YAAY,EAAE,KAAK,KAAK,QAAQ;AACnD,gBAAM,MAAM,OAAO,KAAK,KAAK,eAAe,OAAO,EAAE,OAAO,CAAC,GAAG,MAAM,KAAK,eAAe,QAAQ,CAAC,IAAI,GAAG,CAAC;AAC3G,gBAAM,UAAU,KAAK,iBAAiB,KAAK,QAAQ,SAAS,CAAC,EAAE;AAC/D,cAAI,MAAM,OAAO;AACf,kBAAM,UAAU,KAAK,YAAY,EAAE,kBAAkB,QAAQ,OAAO;AACpE,oBAAQ,YAAY,KAAK,eAAe,QAAQ,OAAO,IAAI,QAAQ,GAAG;AACtE,oBAAQ,sBAAsB,KAAK,eAAe,QAAQ,OAAO,IAAI,QAAQ,GAAG;AAChF,iBAAK,YAAY,EAAE,kBAAkB,oBAAoB,KAAK;AAAA,UAChE;AAAA,QACF,SAAS,OAAP;AACA,kBAAQ;AAAA,YACN;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAEA,uBAAe,eAAe;AAAA,UAC5B;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AACD,wCAAO,WAAW,EAAE,OAAO,SAAS;AACpC,aAAK,eAAe;AAAA,MACtB;AAAA,MACA,WAAW,OAAO,YAAY,mBAAmB,SAAS,oBAAoB;AAAA,MAC9E;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,MAAM,sBAAkB,uCAAqB,aAAa;AAAA,EAC/D;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -32,7 +36,7 @@ var React = __toESM(require("react"));
32
36
  var import_jsx_runtime = require("react/jsx-runtime");
33
37
  var import_react = __toESM(require("react"));
34
38
  var import_ds_shared = require("@elliemae/ds-shared");
35
- var import_useResizeHandle = require("./useResizeHandle");
39
+ var import_useResizeHandle = require("./useResizeHandle.js");
36
40
  const addResizableToColumn = (column, formatter) => (0, import_ds_shared.appendHeaderFormatter)(formatter, column);
37
41
  const ResizableWrapper = import_react.default.memo(({ value, onDrag, onDragEnd, onDragStart, minWidth, handleClassName }) => {
38
42
  const { containerRef, Handle } = (0, import_useResizeHandle.useResizeHandle)({
@@ -47,5 +51,7 @@ const ResizableWrapper = import_react.default.memo(({ value, onDrag, onDragEnd,
47
51
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Handle, {})
48
52
  ] });
49
53
  });
50
- const resizableFormatter = (options) => (value) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResizableWrapper, { ...options, value });
54
+ const resizableFormatter = (options) => function(value) {
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResizableWrapper, { ...options, value });
56
+ };
51
57
  //# sourceMappingURL=decorateResizable.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/resizable/decorateResizable.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { appendHeaderFormatter } from '@elliemae/ds-shared';\nimport { useResizeHandle } from './useResizeHandle';\n\nconst addResizableToColumn = (column, formatter) => appendHeaderFormatter(formatter, column);\n\nconst ResizableWrapper = React.memo(({ value, onDrag, onDragEnd, onDragStart, minWidth, handleClassName }) => {\n const { containerRef, Handle } = useResizeHandle({\n onDrag,\n onDragEnd,\n onDragStart,\n minWidth,\n handleClassName,\n });\n return (\n <div ref={containerRef} className=\"resize-container\">\n {value}\n <Handle />\n </div>\n );\n});\n\n// eslint-disable-next-line react/display-name\nconst resizableFormatter = (options) => (value) => <ResizableWrapper {...options} value={value} />;\n\nexport { addResizableToColumn, resizableFormatter };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADenB;AAfJ,mBAAkB;AAClB,uBAAsC;AACtC,6BAAgC;AAEhC,MAAM,uBAAuB,CAAC,QAAQ,kBAAc,wCAAsB,WAAW,MAAM;AAE3F,MAAM,mBAAmB,aAAAA,QAAM,KAAK,CAAC,EAAE,OAAO,QAAQ,WAAW,aAAa,UAAU,gBAAgB,MAAM;AAC5G,QAAM,EAAE,cAAc,OAAO,QAAI,wCAAgB;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SACE,6CAAC,SAAI,KAAK,cAAc,WAAU,oBAC/B;AAAA;AAAA,IACD,4CAAC,UAAO;AAAA,KACV;AAEJ,CAAC;AAGD,MAAM,qBAAqB,CAAC,YAAY,CAAC,UAAU,4CAAC,oBAAkB,GAAG,SAAS,OAAc;",
4
+ "sourcesContent": ["import React from 'react';\nimport { appendHeaderFormatter } from '@elliemae/ds-shared';\nimport { useResizeHandle } from './useResizeHandle.js';\n\nconst addResizableToColumn = (column, formatter) => appendHeaderFormatter(formatter, column);\n\nconst ResizableWrapper = React.memo(({ value, onDrag, onDragEnd, onDragStart, minWidth, handleClassName }) => {\n const { containerRef, Handle } = useResizeHandle({\n onDrag,\n onDragEnd,\n onDragStart,\n minWidth,\n handleClassName,\n });\n return (\n <div ref={containerRef} className=\"resize-container\">\n {value}\n <Handle />\n </div>\n );\n});\n\n// eslint-disable-next-line react/display-name\nconst resizableFormatter = (options) =>\n function (value) {\n return <ResizableWrapper {...options} value={value} />;\n };\n\nexport { addResizableToColumn, resizableFormatter };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADenB;AAfJ,mBAAkB;AAClB,uBAAsC;AACtC,6BAAgC;AAEhC,MAAM,uBAAuB,CAAC,QAAQ,kBAAc,wCAAsB,WAAW,MAAM;AAE3F,MAAM,mBAAmB,aAAAA,QAAM,KAAK,CAAC,EAAE,OAAO,QAAQ,WAAW,aAAa,UAAU,gBAAgB,MAAM;AAC5G,QAAM,EAAE,cAAc,OAAO,QAAI,wCAAgB;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SACE,6CAAC,SAAI,KAAK,cAAc,WAAU,oBAC/B;AAAA;AAAA,IACD,4CAAC,UAAO;AAAA,KACV;AAEJ,CAAC;AAGD,MAAM,qBAAqB,CAAC,YAC1B,SAAU,OAAO;AACf,SAAO,4CAAC,oBAAkB,GAAG,SAAS,OAAc;AACtD;",
6
6
  "names": ["React"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -28,5 +32,5 @@ __export(resizable_exports, {
28
32
  });
29
33
  module.exports = __toCommonJS(resizable_exports);
30
34
  var React = __toESM(require("react"));
31
- var import_ResizablePlugin = require("./ResizablePlugin");
35
+ var import_ResizablePlugin = require("./ResizablePlugin.js");
32
36
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/resizable/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { ResizablePlugin } from './ResizablePlugin';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAgC;",
4
+ "sourcesContent": ["export { ResizablePlugin } from './ResizablePlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAgC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -28,25 +32,18 @@ __export(useResizeHandle_exports, {
28
32
  });
29
33
  module.exports = __toCommonJS(useResizeHandle_exports);
30
34
  var React = __toESM(require("react"));
31
- var import_jsx_runtime = require("react/jsx-runtime");
35
+ var import_jsx_runtime = (
36
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
37
+ require("react/jsx-runtime")
38
+ );
32
39
  var import_react = require("react");
33
- const useResizeHandle = ({
34
- onDragStart,
35
- onDrag,
36
- onDragEnd,
37
- minWidth = 10,
38
- isLast = false
39
- }) => {
40
+ const useResizeHandle = ({ onDragStart, onDrag, onDragEnd, minWidth = 10, isLast = false }) => {
40
41
  const startX = (0, import_react.useRef)();
41
42
  const startWidth = (0, import_react.useRef)();
42
43
  const containerRef = (0, import_react.useRef)();
43
44
  const triggerMove = (handler, event) => {
44
45
  const increasing = startX.current - event.clientX < 0;
45
- handler(
46
- Math.max(startWidth.current - startX.current + event.clientX, minWidth),
47
- increasing,
48
- {}
49
- );
46
+ handler(Math.max(startWidth.current - startX.current + event.clientX, minWidth), increasing, {});
50
47
  };
51
48
  const onMouseMove = (event) => {
52
49
  event.stopPropagation();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/resizable/useResizeHandle.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useRef } from 'react';\n\nexport const useResizeHandle = ({\n onDragStart,\n onDrag,\n onDragEnd,\n minWidth = 10,\n isLast = false,\n}) => {\n const startX = useRef();\n const startWidth = useRef();\n const containerRef = useRef();\n\n const triggerMove = (handler, event) => {\n const increasing = startX.current - event.clientX < 0;\n handler(\n Math.max(startWidth.current - startX.current + event.clientX, minWidth),\n increasing,\n {},\n );\n };\n\n const onMouseMove = event => {\n event.stopPropagation();\n event.preventDefault();\n\n triggerMove(onDrag, event);\n };\n\n const onMouseUp = event => {\n event.stopPropagation();\n event.preventDefault();\n\n triggerMove(onDragEnd, event);\n\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n const onMouseDown = event => {\n event.stopPropagation();\n event.preventDefault();\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n\n startX.current = event.clientX;\n startWidth.current = containerRef.current.offsetWidth;\n\n triggerMove(onDragStart, event);\n };\n\n const HandleComponent = ({ className = 'resize-handle' }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div className={className} onMouseDown={onMouseDown} />\n );\n\n return {\n containerRef,\n Handle: HandleComponent,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsDnB;AAtDJ,mBAA2C;AAEpC,MAAM,kBAAkB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,SAAS;AACX,MAAM;AACJ,QAAM,aAAS,qBAAO;AACtB,QAAM,iBAAa,qBAAO;AAC1B,QAAM,mBAAe,qBAAO;AAE5B,QAAM,cAAc,CAAC,SAAS,UAAU;AACtC,UAAM,aAAa,OAAO,UAAU,MAAM,UAAU;AACpD;AAAA,MACE,KAAK,IAAI,WAAW,UAAU,OAAO,UAAU,MAAM,SAAS,QAAQ;AAAA,MACtE;AAAA,MACA,CAAC;AAAA,IACH;AAAA,EACF;AAEA,QAAM,cAAc,WAAS;AAC3B,UAAM,gBAAgB;AACtB,UAAM,eAAe;AAErB,gBAAY,QAAQ,KAAK;AAAA,EAC3B;AAEA,QAAM,YAAY,WAAS;AACzB,UAAM,gBAAgB;AACtB,UAAM,eAAe;AAErB,gBAAY,WAAW,KAAK;AAE5B,aAAS,oBAAoB,aAAa,WAAW;AACrD,aAAS,oBAAoB,WAAW,SAAS;AAAA,EACnD;AAEA,QAAM,cAAc,WAAS;AAC3B,UAAM,gBAAgB;AACtB,UAAM,eAAe;AAErB,aAAS,iBAAiB,aAAa,WAAW;AAClD,aAAS,iBAAiB,WAAW,SAAS;AAE9C,WAAO,UAAU,MAAM;AACvB,eAAW,UAAU,aAAa,QAAQ;AAE1C,gBAAY,aAAa,KAAK;AAAA,EAChC;AAEA,QAAM,kBAAkB,CAAC,EAAE,YAAY,gBAAgB,MAErD,4CAAC,SAAI,WAAsB,aAA0B;AAGvD,SAAO;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EACV;AACF;",
4
+ "sourcesContent": ["import React, { useCallback, useRef } from 'react';\n\nexport const useResizeHandle = ({ onDragStart, onDrag, onDragEnd, minWidth = 10, isLast = false }) => {\n const startX = useRef();\n const startWidth = useRef();\n const containerRef = useRef();\n\n const triggerMove = (handler, event) => {\n const increasing = startX.current - event.clientX < 0;\n handler(Math.max(startWidth.current - startX.current + event.clientX, minWidth), increasing, {});\n };\n\n const onMouseMove = (event) => {\n event.stopPropagation();\n event.preventDefault();\n\n triggerMove(onDrag, event);\n };\n\n const onMouseUp = (event) => {\n event.stopPropagation();\n event.preventDefault();\n\n triggerMove(onDragEnd, event);\n\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n const onMouseDown = (event) => {\n event.stopPropagation();\n event.preventDefault();\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n\n startX.current = event.clientX;\n startWidth.current = containerRef.current.offsetWidth;\n\n triggerMove(onDragStart, event);\n };\n\n const HandleComponent = ({ className = 'resize-handle' }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div className={className} onMouseDown={onMouseDown} />\n );\n\n return {\n containerRef,\n Handle: HandleComponent,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4CnB;AAAA;AAAA;AAAA;AA5CJ,mBAA2C;AAEpC,MAAM,kBAAkB,CAAC,EAAE,aAAa,QAAQ,WAAW,WAAW,IAAI,SAAS,MAAM,MAAM;AACpG,QAAM,aAAS,qBAAO;AACtB,QAAM,iBAAa,qBAAO;AAC1B,QAAM,mBAAe,qBAAO;AAE5B,QAAM,cAAc,CAAC,SAAS,UAAU;AACtC,UAAM,aAAa,OAAO,UAAU,MAAM,UAAU;AACpD,YAAQ,KAAK,IAAI,WAAW,UAAU,OAAO,UAAU,MAAM,SAAS,QAAQ,GAAG,YAAY,CAAC,CAAC;AAAA,EACjG;AAEA,QAAM,cAAc,CAAC,UAAU;AAC7B,UAAM,gBAAgB;AACtB,UAAM,eAAe;AAErB,gBAAY,QAAQ,KAAK;AAAA,EAC3B;AAEA,QAAM,YAAY,CAAC,UAAU;AAC3B,UAAM,gBAAgB;AACtB,UAAM,eAAe;AAErB,gBAAY,WAAW,KAAK;AAE5B,aAAS,oBAAoB,aAAa,WAAW;AACrD,aAAS,oBAAoB,WAAW,SAAS;AAAA,EACnD;AAEA,QAAM,cAAc,CAAC,UAAU;AAC7B,UAAM,gBAAgB;AACtB,UAAM,eAAe;AAErB,aAAS,iBAAiB,aAAa,WAAW;AAClD,aAAS,iBAAiB,WAAW,SAAS;AAE9C,WAAO,UAAU,MAAM;AACvB,eAAW,UAAU,aAAa,QAAQ;AAE1C,gBAAY,aAAa,KAAK;AAAA,EAChC;AAEA,QAAM,kBAAkB,CAAC,EAAE,YAAY,gBAAgB,MAErD,4CAAC,SAAI,WAAsB,aAA0B;AAGvD,SAAO;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EACV;AACF;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/resizable/utils.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { parseInt } from '@elliemae/ds-utilities';\nimport memoizeOne from 'memoize-one';\n\nexport const isPercentNumber = (stringNumber) => typeof stringNumber === 'string' && stringNumber.indexOf('%') !== -1;\nexport const isPxNumber = (stringNumber) => typeof stringNumber === 'string' && stringNumber.indexOf('px') !== -1;\n\nexport const translatePercentageToPx = memoizeOne((totalWidth, percentage, minWidth = 0) => {\n const parsedPercentatge = parseInt(percentage.replace('%', ''));\n const width = (totalWidth * parsedPercentatge) / 100;\n return width > minWidth ? width : minWidth;\n});\n\nconst translateStringPxToNumberPx = memoizeOne((pxNumber) => parseInt(pxNumber.replace('%', '')));\nconst translatePxToPercentage = memoizeOne((totalWidth, pxWidth) => `${(pxWidth / totalWidth) * 100}%`);\n\nconst getWidth = memoizeOne((gridWidth, width = 0, minWidth) => {\n if (isPercentNumber(width)) return translatePercentageToPx(gridWidth, width, minWidth);\n if (isPxNumber(width)) return translateStringPxToNumberPx(width);\n return width;\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyB;AACzB,yBAAuB;AAEhB,MAAM,kBAAkB,CAAC,iBAAiB,OAAO,iBAAiB,YAAY,aAAa,QAAQ,GAAG,MAAM;AAC5G,MAAM,aAAa,CAAC,iBAAiB,OAAO,iBAAiB,YAAY,aAAa,QAAQ,IAAI,MAAM;AAExG,MAAM,8BAA0B,mBAAAA,SAAW,CAAC,YAAY,YAAY,WAAW,MAAM;AAC1F,QAAM,wBAAoB,8BAAS,WAAW,QAAQ,KAAK,EAAE,CAAC;AAC9D,QAAM,QAAS,aAAa,oBAAqB;AACjD,SAAO,QAAQ,WAAW,QAAQ;AACpC,CAAC;AAED,MAAM,kCAA8B,mBAAAA,SAAW,CAAC,iBAAa,8BAAS,SAAS,QAAQ,KAAK,EAAE,CAAC,CAAC;AAChG,MAAM,8BAA0B,mBAAAA,SAAW,CAAC,YAAY,YAAY,GAAI,UAAU,aAAc,MAAM;AAEtG,MAAM,eAAW,mBAAAA,SAAW,CAAC,WAAW,QAAQ,GAAG,aAAa;AAC9D,MAAI,gBAAgB,KAAK;AAAG,WAAO,wBAAwB,WAAW,OAAO,QAAQ;AACrF,MAAI,WAAW,KAAK;AAAG,WAAO,4BAA4B,KAAK;AAC/D,SAAO;AACT,CAAC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyB;AACzB,yBAAuB;AAEhB,MAAM,kBAAkB,CAAC,iBAAiB,OAAO,iBAAiB,YAAY,aAAa,QAAQ,GAAG,MAAM;AAC5G,MAAM,aAAa,CAAC,iBAAiB,OAAO,iBAAiB,YAAY,aAAa,QAAQ,IAAI,MAAM;AAExG,MAAM,8BAA0B,mBAAAA,SAAW,CAAC,YAAY,YAAY,WAAW,MAAM;AAC1F,QAAM,wBAAoB,8BAAS,WAAW,QAAQ,KAAK,EAAE,CAAC;AAC9D,QAAM,QAAS,aAAa,oBAAqB;AACjD,SAAO,QAAQ,WAAW,QAAQ;AACpC,CAAC;AAED,MAAM,kCAA8B,mBAAAA,SAAW,CAAC,iBAAa,8BAAS,SAAS,QAAQ,KAAK,EAAE,CAAC,CAAC;AAChG,MAAM,8BAA0B,mBAAAA,SAAW,CAAC,YAAY,YAAY,GAAI,UAAU,aAAc,MAAM;AAEtG,MAAM,eAAW,mBAAAA,SAAW,CAAC,WAAW,QAAQ,GAAG,aAAa;AAC9D,MAAI,gBAAgB,KAAK;AAAG,WAAO,wBAAwB,WAAW,OAAO,QAAQ;AACrF,MAAI,WAAW,KAAK;AAAG,WAAO,4BAA4B,KAAK;AAC/D,SAAO;AACT,CAAC;",
6
6
  "names": ["memoizeOne"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -103,6 +107,7 @@ const getBodyProps = (props, grid) => {
103
107
  lockAxis: "y",
104
108
  useDragHandle: true,
105
109
  helperClass: "row-drag-helper",
110
+ // a promise is needed, since sortable it's mounted before it's container
106
111
  getContainer: () => new Promise((resolve) => {
107
112
  setTimeout(() => {
108
113
  resolve(grid.refs.innerBody.current || grid.refs.body.current);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/row-dnd/DndRowsPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react-hooks/rules-of-hooks */\nimport React, { useMemo } from 'react';\nimport { SortableElement, SortableContainer, SortableHandle } from 'react-sortable-hoc';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { omit } from '@elliemae/ds-utilities';\nimport { appendCellFormatter, createInstancePlugin } from '@elliemae/ds-shared';\n\n// todo: remove once it's fixed in react-sortable-hoc library\nconst keysToOmit = [\n 'axis',\n 'contentWindow',\n 'disableAutoscroll',\n 'distance',\n 'getContainer',\n 'getHelperDimensions',\n 'helperClass',\n 'helperContainer',\n 'hideSortableGhost',\n 'keyboardSortingTransitionDuration',\n 'lockAxis',\n 'lockOffset',\n 'lockToContainerEdges',\n 'onSortEnd',\n 'onSortMove',\n 'onSortOver',\n 'onSortStart',\n 'pressDelay',\n 'pressThreshold',\n 'shouldCancelStart',\n 'transitionDuration',\n 'updateBeforeSortStart',\n 'useDragHandle',\n 'useWindowAsScrollContainer',\n];\n\nconst DragHandle = SortableHandle(() => <GripperVertical className=\"drag-handle\" />);\n\nconst translateDnDData = ({ oldIndex, newIndex, index }) => ({\n sourceIndex: oldIndex,\n targetIndex: newIndex,\n fromIndex: index === undefined ? oldIndex : index,\n});\n\nconst decorateColumns = (columns) => {\n const dragColumn = {\n property: 'drag',\n label: '',\n visible: true,\n width: 24,\n minWidth: 24,\n special: true,\n };\n return [\n appendCellFormatter(\n () => (\n <>\n <DragHandle />\n </>\n ),\n dragColumn,\n ),\n ...columns,\n ];\n};\n\nconst getBodyProps = (props, grid) => {\n const { onMoveRowEnd, onReorder, onMoveRowStart } = grid.props;\n return {\n ...props,\n onSortEnd: (data) => {\n grid.enableEvents();\n grid.setIsRowDragging(false);\n onMoveRowEnd(translateDnDData(data));\n },\n onSortStart: (...args) => {\n grid.disableEvents();\n grid.setIsRowDragging(true);\n onMoveRowStart(...args);\n },\n onSortOver: (data) => {\n onReorder(translateDnDData(data));\n },\n lockAxis: 'y',\n useDragHandle: true,\n helperClass: 'row-drag-helper',\n // a promise is needed, since sortable it's mounted before it's container\n getContainer: () =>\n new Promise((resolve) => {\n setTimeout(() => {\n resolve(grid.refs.innerBody.current || grid.refs.body.current);\n }, 100);\n }),\n };\n};\n\nconst decorateRenderers = (renderers) => {\n const RowComponent = renderers.body.row;\n const BodyWrapperComponent = renderers.body.wrapper;\n\n const Row = useMemo(() => SortableElement(RowComponent), []);\n\n const BodyWrapper = useMemo(\n () => SortableContainer((props) => <BodyWrapperComponent {...omit(props, keysToOmit)} />),\n [],\n );\n\n return {\n ...renderers,\n body: {\n ...renderers.body,\n wrapper: BodyWrapper,\n row: Row,\n },\n };\n};\n\nexport const DndRowsPlugin = createInstancePlugin('dnd-rows', {\n decorateColumns,\n getBodyProps,\n decorateRenderers,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoCiB;AAlCxC,mBAA+B;AAC/B,gCAAmE;AACnE,sBAAgC;AAChC,0BAAqB;AACrB,uBAA0D;AAG1D,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,iBAAa,0CAAe,MAAM,4CAAC,mCAAgB,WAAU,eAAc,CAAE;AAEnF,MAAM,mBAAmB,CAAC,EAAE,UAAU,UAAU,MAAM,OAAO;AAAA,EAC3D,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW,UAAU,SAAY,WAAW;AAC9C;AAEA,MAAM,kBAAkB,CAAC,YAAY;AACnC,QAAM,aAAa;AAAA,IACjB,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AACA,SAAO;AAAA,QACL;AAAA,MACE,MACE,2EACE,sDAAC,cAAW,GACd;AAAA,MAEF;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACL;AACF;AAEA,MAAM,eAAe,CAAC,OAAO,SAAS;AACpC,QAAM,EAAE,cAAc,WAAW,eAAe,IAAI,KAAK;AACzD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,CAAC,SAAS;AACnB,WAAK,aAAa;AAClB,WAAK,iBAAiB,KAAK;AAC3B,mBAAa,iBAAiB,IAAI,CAAC;AAAA,IACrC;AAAA,IACA,aAAa,IAAI,SAAS;AACxB,WAAK,cAAc;AACnB,WAAK,iBAAiB,IAAI;AAC1B,qBAAe,GAAG,IAAI;AAAA,IACxB;AAAA,IACA,YAAY,CAAC,SAAS;AACpB,gBAAU,iBAAiB,IAAI,CAAC;AAAA,IAClC;AAAA,IACA,UAAU;AAAA,IACV,eAAe;AAAA,IACf,aAAa;AAAA,IAEb,cAAc,MACZ,IAAI,QAAQ,CAAC,YAAY;AACvB,iBAAW,MAAM;AACf,gBAAQ,KAAK,KAAK,UAAU,WAAW,KAAK,KAAK,KAAK,OAAO;AAAA,MAC/D,GAAG,GAAG;AAAA,IACR,CAAC;AAAA,EACL;AACF;AAEA,MAAM,oBAAoB,CAAC,cAAc;AACvC,QAAM,eAAe,UAAU,KAAK;AACpC,QAAM,uBAAuB,UAAU,KAAK;AAE5C,QAAM,UAAM,sBAAQ,UAAM,2CAAgB,YAAY,GAAG,CAAC,CAAC;AAE3D,QAAM,kBAAc;AAAA,IAClB,UAAM,6CAAkB,CAAC,UAAU,4CAAC,wBAAsB,OAAG,0BAAK,OAAO,UAAU,GAAG,CAAE;AAAA,IACxF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM;AAAA,MACJ,GAAG,UAAU;AAAA,MACb,SAAS;AAAA,MACT,KAAK;AAAA,IACP;AAAA,EACF;AACF;AAEO,MAAM,oBAAgB,uCAAqB,YAAY;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AACF,CAAC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoCiB;AAlCxC,mBAA+B;AAC/B,gCAAmE;AACnE,sBAAgC;AAChC,0BAAqB;AACrB,uBAA0D;AAG1D,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,iBAAa,0CAAe,MAAM,4CAAC,mCAAgB,WAAU,eAAc,CAAE;AAEnF,MAAM,mBAAmB,CAAC,EAAE,UAAU,UAAU,MAAM,OAAO;AAAA,EAC3D,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW,UAAU,SAAY,WAAW;AAC9C;AAEA,MAAM,kBAAkB,CAAC,YAAY;AACnC,QAAM,aAAa;AAAA,IACjB,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AACA,SAAO;AAAA,QACL;AAAA,MACE,MACE,2EACE,sDAAC,cAAW,GACd;AAAA,MAEF;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACL;AACF;AAEA,MAAM,eAAe,CAAC,OAAO,SAAS;AACpC,QAAM,EAAE,cAAc,WAAW,eAAe,IAAI,KAAK;AACzD,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,CAAC,SAAS;AACnB,WAAK,aAAa;AAClB,WAAK,iBAAiB,KAAK;AAC3B,mBAAa,iBAAiB,IAAI,CAAC;AAAA,IACrC;AAAA,IACA,aAAa,IAAI,SAAS;AACxB,WAAK,cAAc;AACnB,WAAK,iBAAiB,IAAI;AAC1B,qBAAe,GAAG,IAAI;AAAA,IACxB;AAAA,IACA,YAAY,CAAC,SAAS;AACpB,gBAAU,iBAAiB,IAAI,CAAC;AAAA,IAClC;AAAA,IACA,UAAU;AAAA,IACV,eAAe;AAAA,IACf,aAAa;AAAA;AAAA,IAEb,cAAc,MACZ,IAAI,QAAQ,CAAC,YAAY;AACvB,iBAAW,MAAM;AACf,gBAAQ,KAAK,KAAK,UAAU,WAAW,KAAK,KAAK,KAAK,OAAO;AAAA,MAC/D,GAAG,GAAG;AAAA,IACR,CAAC;AAAA,EACL;AACF;AAEA,MAAM,oBAAoB,CAAC,cAAc;AACvC,QAAM,eAAe,UAAU,KAAK;AACpC,QAAM,uBAAuB,UAAU,KAAK;AAE5C,QAAM,UAAM,sBAAQ,UAAM,2CAAgB,YAAY,GAAG,CAAC,CAAC;AAE3D,QAAM,kBAAc;AAAA,IAClB,UAAM,6CAAkB,CAAC,UAAU,4CAAC,wBAAsB,OAAG,0BAAK,OAAO,UAAU,GAAG,CAAE;AAAA,IACxF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM;AAAA,MACJ,GAAG,UAAU;AAAA,MACb,SAAS;AAAA,MACT,KAAK;AAAA,IACP;AAAA,EACF;AACF;AAEO,MAAM,oBAAgB,uCAAqB,YAAY;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -28,5 +32,5 @@ __export(row_dnd_exports, {
28
32
  });
29
33
  module.exports = __toCommonJS(row_dnd_exports);
30
34
  var React = __toESM(require("react"));
31
- var import_DndRowsPlugin = require("./DndRowsPlugin");
35
+ var import_DndRowsPlugin = require("./DndRowsPlugin.js");
32
36
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/row-dnd/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { DndRowsPlugin } from './DndRowsPlugin';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAA8B;",
4
+ "sourcesContent": ["export { DndRowsPlugin } from './DndRowsPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAA8B;",
6
6
  "names": []
7
7
  }