@elliemae/ds-datagrids 3.16.0 → 3.16.1-rc.10

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 +145 -2
  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 +141 -2
  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 +25 -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,7 +34,7 @@ __export(useColumnSizeService_exports, {
30
34
  module.exports = __toCommonJS(useColumnSizeService_exports);
31
35
  var React = __toESM(require("react"));
32
36
  var import_react = require("react");
33
- var import_utils = require("./utils");
37
+ var import_utils = require("./utils.js");
34
38
  const useColumnSizeService = (instance) => {
35
39
  const columns = (0, import_react.useRef)({});
36
40
  const [expandableGridDetailWidth, setExpandableGridDetailWidth] = (0, import_react.useState)(0);
@@ -59,10 +63,7 @@ const useColumnSizeService = (instance) => {
59
63
  const columnsArray = Object.values(columns.current);
60
64
  columnsArray.forEach((column) => {
61
65
  const columnOffsetWidth = column.node.offsetWidth;
62
- column.updateBodyHeaderWidth(
63
- `${columnOffsetWidth}px`,
64
- `${columnOffsetWidth}px`
65
- );
66
+ column.updateBodyHeaderWidth(`${columnOffsetWidth}px`, `${columnOffsetWidth}px`);
66
67
  });
67
68
  };
68
69
  const updateMissingWidths = (totalWidth) => {
@@ -78,16 +79,11 @@ const useColumnSizeService = (instance) => {
78
79
  if (!initialUsedSpace.current)
79
80
  return;
80
81
  const columnUuids = columnDefinitions.map((c) => c.uuid);
81
- const columnsArray = Object.values(columns.current).filter(
82
- (c) => columnUuids.includes(c.uuid)
83
- );
82
+ const columnsArray = Object.values(columns.current).filter((c) => columnUuids.includes(c.uuid));
84
83
  initialUsedSpace.current = { space: 0, amount: 0, percentage: 0 };
85
84
  columnsArray.forEach((column) => {
86
85
  if (column.width && column.width !== "string" && !initialUsedSpace[column.uuid]) {
87
- increaseUsedSpace(
88
- (0, import_utils.getColumnWidthSize)(column.width, minColumnWidth, column),
89
- column.uuid
90
- );
86
+ increaseUsedSpace((0, import_utils.getColumnWidthSize)(column.width, minColumnWidth, column), column.uuid);
91
87
  }
92
88
  });
93
89
  const nextColumnDict = {};
@@ -100,11 +96,7 @@ const useColumnSizeService = (instance) => {
100
96
  nextColumnDict[column.uuid] = column;
101
97
  return;
102
98
  }
103
- const {
104
- space: usedSpace,
105
- amount: usedAmount,
106
- percentage: usedPercentage
107
- } = initialUsedSpace.current;
99
+ const { space: usedSpace, amount: usedAmount, percentage: usedPercentage } = initialUsedSpace.current;
108
100
  const percentValue = (0, import_utils.getPercentageValue)(column.width);
109
101
  if (percentValue) {
110
102
  const pxs = gridWidth * percentValue / 100;
@@ -118,11 +110,7 @@ const useColumnSizeService = (instance) => {
118
110
  const columnFixWidth = (gridWidth * (1 - usedPercentage / 100) - usedSpace) / (columnsArray.length - usedAmount);
119
111
  const percentWidth = columnFixWidth / gridWidth * 100;
120
112
  const pxs = gridWidth * percentWidth / 100;
121
- const actualWidthAfterChecks = (0, import_utils.getColumnWidthSize)(
122
- pxs,
123
- minColumnWidth,
124
- column
125
- );
113
+ const actualWidthAfterChecks = (0, import_utils.getColumnWidthSize)(pxs, minColumnWidth, column);
126
114
  column.updateBodyHeaderWidth(
127
115
  `${actualWidthAfterChecks}px`,
128
116
  column.minWidth || minColumnWidth ? `${column.minWidth || minColumnWidth}px` : `${pxs}px`
@@ -140,10 +128,7 @@ const useColumnSizeService = (instance) => {
140
128
  }, [expandableColumnWidth]);
141
129
  const computeColumnsTotalSize = () => {
142
130
  const columnsArray = Object.values(columns.current);
143
- return columnsArray.reduce(
144
- (totalSize, column) => totalSize + column.node.offsetWidth,
145
- 0
146
- );
131
+ return columnsArray.reduce((totalSize, column) => totalSize + column.node.offsetWidth, 0);
147
132
  };
148
133
  return {
149
134
  columns: columns.current,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/column-sizing/useColumnSizeService.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport { useRef, useState, useLayoutEffect } from 'react';\nimport { getColumnWidthSize, getPercentageValue } from './utils';\n\nexport const useColumnSizeService = (instance) => {\n const columns = useRef({});\n const [expandableGridDetailWidth, setExpandableGridDetailWidth] = useState(0);\n const [expandableColumnWidth, setExpandableColumnWidth] = useState(0);\n const expandedToContentColumns = useRef({});\n const previousTotalWidth = useRef(0);\n const initialUsedSpace = useRef({\n space: 0,\n amount: 0,\n percentage: 0,\n });\n\n const increaseUsedSpace = (space, columnUuid) => {\n if (typeof space === 'number') {\n initialUsedSpace.current.space += space;\n } else if (space && space.endsWith('%')) {\n initialUsedSpace.current.percentage += Number(space.slice(0, -1));\n }\n initialUsedSpace.current.amount += 1;\n initialUsedSpace.current[columnUuid] = true;\n };\n\n // eslint-disable-next-line no-return-assign\n const registerColumn = (column) => (node) =>\n (columns.current[column.uuid] = { ...column, node });\n\n const unregisterColumn = (column) => {\n delete columns.current[column.property];\n };\n\n const setActualColumnsSizesFixed = () => {\n const columnsArray = Object.values(columns.current);\n\n columnsArray.forEach((column) => {\n const columnOffsetWidth = column.node.offsetWidth;\n column.updateBodyHeaderWidth(\n `${columnOffsetWidth}px`,\n `${columnOffsetWidth}px`,\n );\n });\n };\n\n const updateMissingWidths = (totalWidth) => {\n if (totalWidth) {\n previousTotalWidth.current = totalWidth;\n }\n const gridWidth = previousTotalWidth.current - 4;\n const {\n props: { minColumnWidth, expandable },\n resizedColumns,\n decoratedColumns: columnDefinitions,\n } = instance.getInstance();\n if (!initialUsedSpace.current) return;\n const columnUuids = columnDefinitions.map((c) => c.uuid);\n const columnsArray = Object.values(columns.current).filter((c) =>\n columnUuids.includes(c.uuid),\n );\n // reset the initial space to the last columns\n initialUsedSpace.current = { space: 0, amount: 0, percentage: 0 };\n columnsArray.forEach((column) => {\n if (\n column.width &&\n column.width !== 'string' &&\n !initialUsedSpace[column.uuid]\n ) {\n increaseUsedSpace(\n getColumnWidthSize(column.width, minColumnWidth, column),\n column.uuid,\n );\n }\n });\n\n const nextColumnDict = {};\n // eslint-disable-next-line max-statements\n columnsArray.forEach((column) => {\n if (typeof column.width === 'number') {\n nextColumnDict[column.uuid] = column;\n return;\n }\n if (resizedColumns.current[column.uuid]) {\n nextColumnDict[column.uuid] = column;\n return;\n }\n const {\n space: usedSpace,\n amount: usedAmount,\n percentage: usedPercentage,\n } = initialUsedSpace.current;\n\n const percentValue = getPercentageValue(column.width);\n // check if is percentage value\n if (percentValue) {\n const pxs = (gridWidth * percentValue) / 100;\n const pxWidths = `${getColumnWidthSize(pxs, minColumnWidth, column)}px`;\n column.updateBodyHeaderWidth(pxWidths, pxWidths);\n columns.current[column.uuid].computedWidth = pxs;\n if (expandable && column.expandableColumn) {\n setExpandableColumnWidth(pxs);\n }\n } else {\n // otherwise the values are auto calculated from the total size\n const columnFixWidth =\n (gridWidth * (1 - usedPercentage / 100) - usedSpace) /\n (columnsArray.length - usedAmount);\n const percentWidth = (columnFixWidth / gridWidth) * 100;\n const pxs = (gridWidth * percentWidth) / 100;\n const actualWidthAfterChecks = getColumnWidthSize(\n pxs,\n minColumnWidth,\n column,\n );\n column.updateBodyHeaderWidth(\n `${actualWidthAfterChecks}px`,\n column.minWidth || minColumnWidth\n ? `${column.minWidth || minColumnWidth}px`\n : `${pxs}px`,\n );\n resizedColumns.current[column.uuid] = actualWidthAfterChecks;\n columns.current[column.uuid].computedWidth = actualWidthAfterChecks;\n }\n nextColumnDict[column.uuid] = column;\n });\n columns.current = nextColumnDict;\n };\n\n useLayoutEffect(() => {\n const totalWidth = computeColumnsTotalSize();\n setExpandableGridDetailWidth(totalWidth - expandableColumnWidth);\n }, [expandableColumnWidth]);\n\n // todo: make this incremental\n const computeColumnsTotalSize = () => {\n const columnsArray = Object.values(columns.current);\n return columnsArray.reduce(\n (totalSize, column) => totalSize + column.node.offsetWidth,\n 0,\n );\n };\n\n return {\n columns: columns.current,\n expandedToContentColumns: expandedToContentColumns.current,\n initialUsedSpace: initialUsedSpace.current,\n increaseUsedSpace,\n registerColumn,\n unregisterColumn,\n updateMissingWidths,\n computeColumnsTotalSize,\n setActualColumnsSizesFixed,\n expandableGridDetailWidth,\n expandableColumnWidth,\n };\n};\n\nexport default useColumnSizeService;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkD;AAClD,mBAAuD;AAEhD,MAAM,uBAAuB,CAAC,aAAa;AAChD,QAAM,cAAU,qBAAO,CAAC,CAAC;AACzB,QAAM,CAAC,2BAA2B,4BAA4B,QAAI,uBAAS,CAAC;AAC5E,QAAM,CAAC,uBAAuB,wBAAwB,QAAI,uBAAS,CAAC;AACpE,QAAM,+BAA2B,qBAAO,CAAC,CAAC;AAC1C,QAAM,yBAAqB,qBAAO,CAAC;AACnC,QAAM,uBAAmB,qBAAO;AAAA,IAC9B,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,YAAY;AAAA,EACd,CAAC;AAED,QAAM,oBAAoB,CAAC,OAAO,eAAe;AAC/C,QAAI,OAAO,UAAU,UAAU;AAC7B,uBAAiB,QAAQ,SAAS;AAAA,IACpC,WAAW,SAAS,MAAM,SAAS,GAAG,GAAG;AACvC,uBAAiB,QAAQ,cAAc,OAAO,MAAM,MAAM,GAAG,EAAE,CAAC;AAAA,IAClE;AACA,qBAAiB,QAAQ,UAAU;AACnC,qBAAiB,QAAQ,cAAc;AAAA,EACzC;AAGA,QAAM,iBAAiB,CAAC,WAAW,CAAC,SACjC,QAAQ,QAAQ,OAAO,QAAQ,EAAE,GAAG,QAAQ,KAAK;AAEpD,QAAM,mBAAmB,CAAC,WAAW;AACnC,WAAO,QAAQ,QAAQ,OAAO;AAAA,EAChC;AAEA,QAAM,6BAA6B,MAAM;AACvC,UAAM,eAAe,OAAO,OAAO,QAAQ,OAAO;AAElD,i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State, useLayoutEffect } from 'react';\nimport { getColumnWidthSize, getPercentageValue } from './utils.js';\n\nexport const useColumnSizeService = (instance) => {\n const columns = useRef({});\n const [expandableGridDetailWidth, setExpandableGridDetailWidth] = useState(0);\n const [expandableColumnWidth, setExpandableColumnWidth] = useState(0);\n const expandedToContentColumns = useRef({});\n const previousTotalWidth = useRef(0);\n const initialUsedSpace = useRef({\n space: 0,\n amount: 0,\n percentage: 0,\n });\n\n const increaseUsedSpace = (space, columnUuid) => {\n if (typeof space === 'number') {\n initialUsedSpace.current.space += space;\n } else if (space && space.endsWith('%')) {\n initialUsedSpace.current.percentage += Number(space.slice(0, -1));\n }\n initialUsedSpace.current.amount += 1;\n initialUsedSpace.current[columnUuid] = true;\n };\n\n // eslint-disable-next-line no-return-assign\n const registerColumn = (column) => (node) => (columns.current[column.uuid] = { ...column, node });\n\n const unregisterColumn = (column) => {\n delete columns.current[column.property];\n };\n\n const setActualColumnsSizesFixed = () => {\n const columnsArray = Object.values(columns.current);\n\n columnsArray.forEach((column) => {\n const columnOffsetWidth = column.node.offsetWidth;\n column.updateBodyHeaderWidth(`${columnOffsetWidth}px`, `${columnOffsetWidth}px`);\n });\n };\n\n const updateMissingWidths = (totalWidth) => {\n if (totalWidth) {\n previousTotalWidth.current = totalWidth;\n }\n const gridWidth = previousTotalWidth.current - 4;\n const {\n props: { minColumnWidth, expandable },\n resizedColumns,\n decoratedColumns: columnDefinitions,\n } = instance.getInstance();\n if (!initialUsedSpace.current) return;\n const columnUuids = columnDefinitions.map((c) => c.uuid);\n const columnsArray = Object.values(columns.current).filter((c) => columnUuids.includes(c.uuid));\n // reset the initial space to the last columns\n initialUsedSpace.current = { space: 0, amount: 0, percentage: 0 };\n columnsArray.forEach((column) => {\n if (column.width && column.width !== 'string' && !initialUsedSpace[column.uuid]) {\n increaseUsedSpace(getColumnWidthSize(column.width, minColumnWidth, column), column.uuid);\n }\n });\n\n const nextColumnDict = {};\n // eslint-disable-next-line max-statements\n columnsArray.forEach((column) => {\n if (typeof column.width === 'number') {\n nextColumnDict[column.uuid] = column;\n return;\n }\n if (resizedColumns.current[column.uuid]) {\n nextColumnDict[column.uuid] = column;\n return;\n }\n const { space: usedSpace, amount: usedAmount, percentage: usedPercentage } = initialUsedSpace.current;\n\n const percentValue = getPercentageValue(column.width);\n // check if is percentage value\n if (percentValue) {\n const pxs = (gridWidth * percentValue) / 100;\n const pxWidths = `${getColumnWidthSize(pxs, minColumnWidth, column)}px`;\n column.updateBodyHeaderWidth(pxWidths, pxWidths);\n columns.current[column.uuid].computedWidth = pxs;\n if (expandable && column.expandableColumn) {\n setExpandableColumnWidth(pxs);\n }\n } else {\n // otherwise the values are auto calculated from the total size\n const columnFixWidth =\n (gridWidth * (1 - usedPercentage / 100) - usedSpace) / (columnsArray.length - usedAmount);\n const percentWidth = (columnFixWidth / gridWidth) * 100;\n const pxs = (gridWidth * percentWidth) / 100;\n const actualWidthAfterChecks = getColumnWidthSize(pxs, minColumnWidth, column);\n column.updateBodyHeaderWidth(\n `${actualWidthAfterChecks}px`,\n column.minWidth || minColumnWidth ? `${column.minWidth || minColumnWidth}px` : `${pxs}px`,\n );\n resizedColumns.current[column.uuid] = actualWidthAfterChecks;\n columns.current[column.uuid].computedWidth = actualWidthAfterChecks;\n }\n nextColumnDict[column.uuid] = column;\n });\n columns.current = nextColumnDict;\n };\n\n useLayoutEffect(() => {\n const totalWidth = computeColumnsTotalSize();\n setExpandableGridDetailWidth(totalWidth - expandableColumnWidth);\n }, [expandableColumnWidth]);\n\n // todo: make this incremental\n const computeColumnsTotalSize = () => {\n const columnsArray = Object.values(columns.current);\n return columnsArray.reduce((totalSize, column) => totalSize + column.node.offsetWidth, 0);\n };\n\n return {\n columns: columns.current,\n expandedToContentColumns: expandedToContentColumns.current,\n initialUsedSpace: initialUsedSpace.current,\n increaseUsedSpace,\n registerColumn,\n unregisterColumn,\n updateMissingWidths,\n computeColumnsTotalSize,\n setActualColumnsSizesFixed,\n expandableGridDetailWidth,\n expandableCol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YAAI,cAAc,OAAO,kBAAkB;AACzC,mCAAyB,GAAG;AAAA,QAC9B;AAAA,MACF,OAAO;AAEL,cAAM,kBACH,aAAa,IAAI,iBAAiB,OAAO,cAAc,aAAa,SAAS;AAChF,cAAM,eAAgB,iBAAiB,YAAa;AACpD,cAAM,MAAO,YAAY,eAAgB;AACzC,cAAM,6BAAyB,iCAAmB,KAAK,gBAAgB,MAAM;AAC7E,eAAO;AAAA,UACL,GAAG;AAAA,UACH,OAAO,YAAY,iBAAiB,GAAG,OAAO,YAAY,qBAAqB,GAAG;AAAA,QACpF;AACA,uBAAe,QAAQ,OAAO,IAAI,IAAI;AACtC,gBAAQ,QAAQ,OAAO,IAAI,EAAE,gBAAgB;AAAA,MAC/C;AACA,qBAAe,OAAO,IAAI,IAAI;AAAA,IAChC,CAAC;AACD,YAAQ,UAAU;AAAA,EACpB;AAEA,oCAAgB,MAAM;AACpB,UAAM,aAAa,wBAAwB;AAC3C,iCAA6B,aAAa,qBAAqB;AAAA,EACjE,GAAG,CAAC,qBAAqB,CAAC;AAG1B,QAAM,0BAA0B,MAAM;AACpC,UAAM,eAAe,OAAO,OAAO,QAAQ,OAAO;AAClD,WAAO,aAAa,OAAO,CAAC,WAAW,WAAW,YAAY,OAAO,KAAK,aAAa,CAAC;AAAA,EAC1F;AAEA,SAAO;AAAA,IACL,SAAS,QAAQ;AAAA,IACjB,0BAA0B,yBAAyB;AAAA,IACnD,kBAAkB,iBAAiB;AAAA,IACnC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,+BAAQ;",
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,8 +36,8 @@ var React = __toESM(require("react"));
32
36
  var stylesheet = __toESM(require("stylesheet-helpers"));
33
37
  var import_react = require("react");
34
38
  var import_ds_utilities = require("@elliemae/ds-utilities");
35
- var import_getColumnNameFromProperty = require("./getColumnNameFromProperty");
36
- var import_getScrollbarSize = require("../../utilities/getScrollbarSize");
39
+ var import_getColumnNameFromProperty = require("./getColumnNameFromProperty.js");
40
+ var import_getScrollbarSize = require("../../utilities/getScrollbarSize.js");
37
41
  const SCROLLBAR_WIDTH = (0, import_getScrollbarSize.getScrollbarWidth)();
38
42
  const RowStylesheetHelper = ({ grid, className }) => {
39
43
  const { styleSheet, styleSheetElement } = stylesheet.create();
@@ -77,6 +81,7 @@ function setWidth({ styleSheet, className, width, minWidth }) {
77
81
  stylesheet.updateProperties(window, styleSheet, className, {
78
82
  width: `${widths || minWidths}`,
79
83
  minWidth: `${widths || minWidths}`,
84
+ // minWidth: `${minWidths || widths}`,
80
85
  maxWidth: `${widths || minWidths}`
81
86
  });
82
87
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/column-sizing/useStylesheetHelpers.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-lines */\nimport * as stylesheet from 'stylesheet-helpers';\nimport { useState, useEffect } from 'react';\nimport { set } from '@elliemae/ds-utilities';\nimport { getColumnNameFromProperty } from './getColumnNameFromProperty';\nimport { getScrollbarWidth } from '../../utilities/getScrollbarSize';\n\nconst SCROLLBAR_WIDTH = getScrollbarWidth();\n\nexport const RowStylesheetHelper = ({ grid, className }) => {\n const { styleSheet, styleSheetElement } = stylesheet.create();\n const update = (width) => {\n const widths = typeof width === 'string' ? width : `${width}px`;\n stylesheet.updateProperties(\n window,\n styleSheet,\n className,\n width ? { width: widths, minWidth: widths, maxWidth: widths } : { width: null, minWidth: null, maxWidth: null },\n );\n const { hasScroll } = grid.getState();\n const headerWidth = `${width + (hasScroll ? SCROLLBAR_WIDTH : 0)}px`;\n stylesheet.updateProperties(\n window,\n styleSheet,\n `${className}-header`,\n width\n ? { width: headerWidth, minWidth: headerWidth, maxWidth: headerWidth }\n : { width: null, minWidth: null, maxWidth: null },\n );\n };\n const remove = () => styleSheetElement.remove();\n const getRowClassName = () => className;\n return {\n update,\n remove,\n getRowClassName,\n };\n};\n\nconst getColumnClassName = ({ globalId, column, isHeader = false, getId }) =>\n `column-${globalId}-${getId(column)}${isHeader ? '-header' : ''}`;\n\nfunction setWidth({ styleSheet, className, width, minWidth }) {\n let widths;\n if (typeof width === 'string') widths = width;\n if (typeof width === 'number') widths = `${width}px`;\n\n let minWidths;\n if (typeof minWidth === 'string') minWidths = minWidth;\n if (typeof minWidth === 'number') minWidths = `${minWidth}px`;\n\n stylesheet.updateProperties(window, styleSheet, className, {\n width: `${widths || minWidths}`,\n minWidth: `${widths || minWidths}`,\n // minWidth: `${minWidths || widths}`,\n maxWidth: `${widths || minWidths}`,\n });\n}\n\nfunction updateStyle({ styleSheet, className, style }) {\n stylesheet.updateProperties(window, styleSheet, className, style);\n}\n\nfunction columnSizesHelperImpl({ globalId, getId = ({ property }) => getColumnNameFromProperty(property) }) {\n const { styleSheetElement, styleSheet } = stylesheet.create();\n\n const updateBodyHeaderWidth = ({ className, headerClassName, width, minWidth }) => {\n setWidth({\n styleSheet,\n className,\n width,\n minWidth,\n });\n setWidth({\n styleSheet,\n className: headerClassName,\n width,\n minWidth,\n isHeader: true,\n });\n };\n\n return {\n decorateColumns: (columns, grid) => {\n const {\n props: { minColumnWidth },\n } = grid.getInstance();\n return columns.map((column) => {\n const cellClassName = getColumnClassName({ globalId, getId, column });\n const headerClassName = `${cellClassName}-header`;\n\n set(column, 'header.props.className', headerClassName);\n set(column, 'cell.props.className', cellClassName);\n\n column.updateBodyHeaderWidth = (width, minWidth) => {\n updateBodyHeaderWidth({\n className: cellClassName,\n headerClassName,\n width,\n minWidth,\n });\n };\n column.updateWidth = (width, minWidth) => {\n setWidth({\n styleSheet,\n className: cellClassName,\n width,\n minWidth,\n });\n };\n column.updateStyle = (style) =>\n updateStyle({\n styleSheet,\n className: cellClassName,\n style,\n });\n\n column.headerHookEffects = [\n () => {\n useEffect(() => {\n const { resizedColumns } = grid.getInstance();\n const resizedWidth = resizedColumns.current[column.uuid];\n updateBodyHeaderWidth({\n className: cellClassName,\n headerClassName,\n width: resizedWidth || column.width || minColumnWidth,\n minWidth: resizedWidth || column.minWidth || minColumnWidth || column.width,\n });\n }, [column.uuid]);\n },\n ];\n\n return column;\n });\n },\n getColumnCellClassName(column) {\n return getColumnClassName({ globalId, getId, column });\n },\n getColumnHeaderClassName(column) {\n return `${getColumnClassName({ globalId, getId, column })}-header`;\n },\n cleanup() {\n styleSheetElement.remove();\n },\n };\n}\n\nexport function useStylesheetHelpers(grid) {\n const {\n props: { bindColumnsSizeTo, bindRowSizeTo },\n } = grid;\n\n const [columnsStylesheet] = useState(() =>\n columnSizesHelperImpl({\n globalId: bindColumnsSizeTo || grid.uuid,\n getId: ({ uuid }) => getColumnNameFromProperty(uuid),\n }),\n );\n const rowClassName = `row-${bindRowSizeTo || grid.uuid}`;\n const [rowsStylesheet] = useState(() => RowStylesheetHelper({ grid, className: rowClassName }));\n\n return { columnsStylesheet, rowsStylesheet, rowClassName };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,iBAA4B;AAC5B,mBAAoC;AACpC,0BAAoB;AACpB,uCAA0C;AAC1C,8BAAkC;AAElC,MAAM,sBAAkB,2CAAkB;AAEnC,MA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,EAAE,eAAe,IAAI,KAAK,YAAY;AAC5C,oBAAM,eAAe,eAAe,QAAQ,OAAO;AACnD,oCAAsB;AAAA,gBACpB,WAAW;AAAA,gBACX;AAAA,gBACA,OAAO,gBAAgB,OAAO,SAAS;AAAA,gBACvC,UAAU,gBAAgB,OAAO,YAAY,kBAAkB,OAAO;AAAA,cACxE,CAAC;AAAA,YACH,GAAG,CAAC,OAAO,IAAI,CAAC;AAAA,UAClB;AAAA,QACF;AAEA,eAAO;AAAA,MACT,CAAC;AAAA,IACH;AAAA,IACA,uBAAuB,QAAQ;AAC7B,aAAO,mBAAmB,EAAE,UAAU,OAAO,OAAO,CAAC;AAAA,IACvD;AAAA,IACA,yBAAyB,QAAQ;AAC/B,aAAO,GAAG,mBAAmB,EAAE,UAAU,OAAO,OAAO,CAAC;AAAA,IAC1D;AAAA,IACA,UAAU;AACR,wBAAkB,OAAO;AAAA,IAC3B;AAAA,EACF;AACF;AAEO,SAAS,qBAAqB,MAAM;AACzC,QAAM;AAAA,IACJ,OAAO,EAAE,mBAAmB,cAAc;AAAA,EAC5C,IAAI;AAEJ,QAAM,CAAC,iBAAiB,QAAI;AAAA,IAAS,MACnC,sBAAsB;AAAA,MACpB,UAAU,qBAAqB,KAAK;AAAA,MACpC,OAAO,CAAC,EAAE,KAAK,UAAM,4DAA0B,IAAI;AAAA,IACrD,CAAC;AAAA,EACH;AACA,QAAM,eAAe,OAAO,iBAAiB,KAAK;AAClD,QAAM,CAAC,cAAc,QAAI,uBAAS,MAAM,oBAAoB,EAAE,MAAM,WAAW,aAAa,CAAC,CAAC;AAE9F,SAAO,EAAE,mBAAmB,gBAAgB,aAAa;AAC3D;",
4
+ "sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-lines */\nimport * as stylesheet from 'stylesheet-helpers';\nimport { useState, useEffect } from 'react';\nimport { set } from '@elliemae/ds-utilities';\nimport { getColumnNameFromProperty } from './getColumnNameFromProperty.js';\nimport { getScrollbarWidth } from '../../utilities/getScrollbarSize.js';\n\nconst SCROLLBAR_WIDTH = getScrollbarWidth();\n\nexport const RowStylesheetHelper = ({ grid, className }) => {\n const { styleSheet, styleSheetElement } = stylesheet.create();\n const update = (width) => {\n const widths = typeof width === 'string' ? width : `${width}px`;\n stylesheet.updateProperties(\n window,\n styleSheet,\n className,\n width ? { width: widths, minWidth: widths, maxWidth: widths } : { width: null, minWidth: null, maxWidth: null },\n );\n const { hasScroll } = grid.getState();\n const headerWidth = `${width + (hasScroll ? SCROLLBAR_WIDTH : 0)}px`;\n stylesheet.updateProperties(\n window,\n styleSheet,\n `${className}-header`,\n width\n ? { width: headerWidth, minWidth: headerWidth, maxWidth: headerWidth }\n : { width: null, minWidth: null, maxWidth: null },\n );\n };\n const remove = () => styleSheetElement.remove();\n const getRowClassName = () => className;\n return {\n update,\n remove,\n getRowClassName,\n };\n};\n\nconst getColumnClassName = ({ globalId, column, isHeader = false, getId }) =>\n `column-${globalId}-${getId(column)}${isHeader ? '-header' : ''}`;\n\nfunction setWidth({ styleSheet, className, width, minWidth }) {\n let widths;\n if (typeof width === 'string') widths = width;\n if (typeof width === 'number') widths = `${width}px`;\n\n let minWidths;\n if (typeof minWidth === 'string') minWidths = minWidth;\n if (typeof minWidth === 'number') minWidths = `${minWidth}px`;\n\n stylesheet.updateProperties(window, styleSheet, className, {\n width: `${widths || minWidths}`,\n minWidth: `${widths || minWidths}`,\n // minWidth: `${minWidths || widths}`,\n maxWidth: `${widths || minWidths}`,\n });\n}\n\nfunction updateStyle({ styleSheet, className, style }) {\n stylesheet.updateProperties(window, styleSheet, className, style);\n}\n\nfunction columnSizesHelperImpl({ globalId, getId = ({ property }) => getColumnNameFromProperty(property) }) {\n const { styleSheetElement, styleSheet } = stylesheet.create();\n\n const updateBodyHeaderWidth = ({ className, headerClassName, width, minWidth }) => {\n setWidth({\n styleSheet,\n className,\n width,\n minWidth,\n });\n setWidth({\n styleSheet,\n className: headerClassName,\n width,\n minWidth,\n isHeader: true,\n });\n };\n\n return {\n decorateColumns: (columns, grid) => {\n const {\n props: { minColumnWidth },\n } = grid.getInstance();\n return columns.map((column) => {\n const cellClassName = getColumnClassName({ globalId, getId, column });\n const headerClassName = `${cellClassName}-header`;\n\n set(column, 'header.props.className', headerClassName);\n set(column, 'cell.props.className', cellClassName);\n\n column.updateBodyHeaderWidth = (width, minWidth) => {\n updateBodyHeaderWidth({\n className: cellClassName,\n headerClassName,\n width,\n minWidth,\n });\n };\n column.updateWidth = (width, minWidth) => {\n setWidth({\n styleSheet,\n className: cellClassName,\n width,\n minWidth,\n });\n };\n column.updateStyle = (style) =>\n updateStyle({\n styleSheet,\n className: cellClassName,\n style,\n });\n\n column.headerHookEffects = [\n () => {\n useEffect(() => {\n const { resizedColumns } = grid.getInstance();\n const resizedWidth = resizedColumns.current[column.uuid];\n updateBodyHeaderWidth({\n className: cellClassName,\n headerClassName,\n width: resizedWidth || column.width || minColumnWidth,\n minWidth: resizedWidth || column.minWidth || minColumnWidth || column.width,\n });\n }, [column.uuid]);\n },\n ];\n\n return column;\n });\n },\n getColumnCellClassName(column) {\n return getColumnClassName({ globalId, getId, column });\n },\n getColumnHeaderClassName(column) {\n return `${getColumnClassName({ globalId, getId, column })}-header`;\n },\n cleanup() {\n styleSheetElement.remove();\n },\n };\n}\n\nexport function useStylesheetHelpers(grid) {\n const {\n props: { bindColumnsSizeTo, bindRowSizeTo },\n } = grid;\n\n const [columnsStylesheet] = useState(() =>\n columnSizesHelperImpl({\n globalId: bindColumnsSizeTo || grid.uuid,\n getId: ({ uuid }) => getColumnNameFromProperty(uuid),\n }),\n );\n const rowClassName = `row-${bindRowSizeTo || grid.uuid}`;\n const [rowsStylesheet] = useState(() => RowStylesheetHelper({ grid, className: rowClassName }));\n\n return { columnsStylesheet, rowsStylesheet, rowClassName };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YA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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/column-sizing/utils.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { get } from '@elliemae/ds-utilities';\n\nexport function getScrollbarSizeFromHeaderAndBody(refs) {\n const innerBodyOffsetWidth = get(refs, ['innerBody', 'current', 'offsetWidth']);\n const headerOffsetWidth = get(refs, ['header', 'current', 'offsetWidth']);\n\n return headerOffsetWidth - innerBodyOffsetWidth;\n}\n\nexport const isScrollbarVisible = (element) => element.scrollHeight > element.clientHeight;\n\nexport const getPercentageValue = (percentString) => {\n if (typeof percentString !== 'string') return null;\n const result = percentString.match(/(\\d+|\\d*[.,]\\d{1,2})/);\n\n return result && Number(result[0]);\n};\n\nexport const getColumnWidthSize = (width, minWidth, column) => {\n if (column.special) {\n return column.width;\n }\n if (minWidth && minWidth > width) return minWidth;\n return width;\n};\n\nexport const calculateMinWidthForWrappedText = (columns) => {\n let longestWord = 0;\n\n columns.forEach(({ label }) => {\n const localLongestWord = label.split(' ').sort((a, b) => b.length - a.length)[0].length;\n if (localLongestWord > longestWord) longestWord = localLongestWord;\n });\n\n return longestWord * 8.5;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAoB;AAEb,SAAS,kCAAkC,MAAM;AACt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;AAC9C,QAAM,SAAS,cAAc,MAAM,sBAAsB;AAEzD,SAAO,UAAU,OAAO,OAAO,CAAC,CAAC;AACnC;AAEO,MAAM,qBAAqB,CAAC,OAAO,UAAU,WAAW;AAC7D,MAAI,OAAO,SAAS;AAClB,WAAO,OAAO;AAAA,EAChB;AACA,MAAI,YAAY,WAAW;AAAO,WAAO;AACzC,SAAO;AACT;AAEO,MAAM,kCAAkC,CAAC,YAAY;AAC1D,MAAI,cAAc;AAElB,UAAQ,QAAQ,CAAC,EAAE,MAAM,MAAM;AAC7B,UAAM,mBAAmB,MAAM,MAAM,GAAG,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE;AACjF,QAAI,mBAAmB;AAAa,oBAAc;AAAA,EACpD,CAAC;AAED,SAAO,cAAc;AACvB;",
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(CustomRendererPlugin_exports, {
29
33
  module.exports = __toCommonJS(CustomRendererPlugin_exports);
30
34
  var React = __toESM(require("react"));
31
35
  var import_ds_shared = require("@elliemae/ds-shared");
32
- var import_addCustomRendererToCell = require("./addCustomRendererToCell");
36
+ var import_addCustomRendererToCell = require("./addCustomRendererToCell.js");
33
37
  const decorateColumn = (column, grid) => (0, import_addCustomRendererToCell.addCustomRendererToCell)(grid)(column);
34
38
  const CustomRendererPlugin = (0, import_ds_shared.createInstancePlugin)("custom-renderer", {
35
39
  decorateColumn
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/custom-cell-renderer/CustomRendererPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addCustomRendererToCell } from './addCustomRendererToCell';\n\n// todo: this probably needs to go to the core\n\nconst decorateColumn = (column, grid) => addCustomRendererToCell(grid)(column);\n\nexport const CustomRendererPlugin = createInstancePlugin('custom-renderer', {\n decorateColumn,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAqC;AACrC,qCAAwC;AAIxC,MAAM,iBAAiB,CAAC,QAAQ,aAAS,wDAAwB,IAAI,EAAE,MAAM;AAEtE,MAAM,2BAAuB,uCAAqB,mBAAmB;AAAA,EAC1E;AACF,CAAC;",
4
+ "sourcesContent": ["import { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addCustomRendererToCell } from './addCustomRendererToCell.js';\n\n// todo: this probably needs to go to the core\n\nconst decorateColumn = (column, grid) => addCustomRendererToCell(grid)(column);\n\nexport const CustomRendererPlugin = createInstancePlugin('custom-renderer', {\n decorateColumn,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAqC;AACrC,qCAAwC;AAIxC,MAAM,iBAAiB,CAAC,QAAQ,aAAS,wDAAwB,IAAI,EAAE,MAAM;AAEtE,MAAM,2BAAuB,uCAAqB,mBAAmB;AAAA,EAC1E;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 @@ module.exports = __toCommonJS(addCustomRendererToCell_exports);
32
36
  var React = __toESM(require("react"));
33
37
  var import_ds_utilities = require("@elliemae/ds-utilities");
34
38
  var import_ds_shared = require("@elliemae/ds-shared");
35
- var import_getRendererComponent = require("./getRendererComponent");
39
+ var import_getRendererComponent = require("./getRendererComponent.js");
36
40
  const getRenderer = (renderer, grid, column) => (value, metaData) => {
37
41
  const {
38
42
  props: { customHandlers, parentRowData }
@@ -42,6 +46,7 @@ const getRenderer = (renderer, grid, column) => (value, metaData) => {
42
46
  value.props.children[0],
43
47
  renderer({
44
48
  value: value.props.children[1],
49
+ // apply custom render only to the original value not the arrow
45
50
  metaData: { ...metaData, parentRowData },
46
51
  customHandlers
47
52
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/custom-cell-renderer/addCustomRendererToCell.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-statements */\nimport { isFunction, get } from '@elliemae/ds-utilities';\nimport { appendCellFormatter } from '@elliemae/ds-shared';\nimport { getRendererComponent } from './getRendererComponent';\n\nexport const getRenderer = (renderer, grid, column) => (value, metaData) => {\n const {\n props: { customHandlers, parentRowData },\n } = grid.getInstance();\n if (\n column &&\n column.formatExpandable &&\n value &&\n value.props &&\n value.props.children &&\n value.props.children.length === 2\n ) {\n return [\n value.props.children[0],\n renderer({\n value: value.props.children[1], // apply custom render only to the original value not the arrow\n metaData: { ...metaData, parentRowData },\n customHandlers,\n }),\n ];\n }\n return renderer({\n value,\n metaData: { ...metaData, parentRowData },\n customHandlers,\n });\n};\n\nconst addCustomRendererToCell = (grid) => (column) => {\n const { customRenderer } = column;\n const customHeaderRenderer = get(column, ['header', 'customRenderer']);\n if (!customRenderer && !customHeaderRenderer) return column;\n\n if (isFunction(customHeaderRenderer)) {\n column.header.formatters.push(getRenderer(customHeaderRenderer, grid));\n }\n\n if (isFunction(customRenderer)) {\n column = appendCellFormatter(getRenderer(customRenderer, grid, column), column);\n } else {\n if (!customRenderer) return column;\n column.cell.formatters.push((value, columnData) => getRendererComponent(grid, customRenderer, columnData));\n }\n\n return column;\n};\n\nexport { addCustomRendererToCell };\nexport default addCustomRendererToCell;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAgC;AAChC,uBAAoC;AACpC,kCAAqC;AAE9B,MAAM,cAAc,CAAC,UAAU,MAAM,WAAW,CAAC,OAAO,aAAa;AAC1E,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB,cAAc;AAAA,EACzC,IAAI,KAAK,YAAY;AACrB,MACE,UACA,OAAO,oBACP,SACA,MAAM,SACN,MAAM,MAAM,YACZ,MAAM,MAAM,SAAS,WAAW,GAChC;AACA,WAAO;AAAA,MACL,MAAM,MAAM,SAAS;AAAA,MACrB,SAAS;AAAA,QACP,OAAO,MAAM,MAAM,SAAS;AAAA,QAC5B,UAAU,EAAE,GAAG,UAAU,cAAc;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO,SAAS;AAAA,IACd;AAAA,IACA,UAAU,EAAE,GAAG,UAAU,cAAc;AAAA,IACvC;AAAA,EACF,CAAC;AACH;AAEA,MAAM,0BAA0B,CAAC,SAAS,CAAC,WAAW;AACpD,QAAM,EAAE,eAAe,IAAI;AAC3B,QAAM,2BAAuB,yBAAI,QAAQ,CAAC,UAAU,gBAAgB,CAAC;AACrE,MAAI,CAAC,kBAAkB,CAAC;AAAsB,WAAO;AAErD,UAAI,gCAAW,oBAAoB,GAAG;AACpC,WAAO,OAAO,WAAW,KAAK,YAAY,sBAAsB,IAAI,CAAC;AAAA,EACvE;AAEA,UAAI,gCAAW,cAAc,GAAG;AAC9B,iBAAS,sCAAoB,YAAY,gBAAgB,MAAM,MAAM,GAAG,MAAM;AAAA,EAChF,OAAO;AACL,QAAI,CAAC;AAAgB,aAAO;AAC5B,WAAO,KAAK,WAAW,KAAK,CAAC,OAAO,mBAAe,kDAAqB,MAAM,gBAAgB,UAAU,CAAC;AAAA,EAC3G;AAEA,SAAO;AACT;AAGA,IAAO,kCAAQ;",
4
+ "sourcesContent": ["/* eslint-disable max-statements */\nimport { isFunction, get } from '@elliemae/ds-utilities';\nimport { appendCellFormatter } from '@elliemae/ds-shared';\nimport { getRendererComponent } from './getRendererComponent.js';\n\nexport const getRenderer = (renderer, grid, column) => (value, metaData) => {\n const {\n props: { customHandlers, parentRowData },\n } = grid.getInstance();\n if (\n column &&\n column.formatExpandable &&\n value &&\n value.props &&\n value.props.children &&\n value.props.children.length === 2\n ) {\n return [\n value.props.children[0],\n renderer({\n value: value.props.children[1], // apply custom render only to the original value not the arrow\n metaData: { ...metaData, parentRowData },\n customHandlers,\n }),\n ];\n }\n return renderer({\n value,\n metaData: { ...metaData, parentRowData },\n customHandlers,\n });\n};\n\nconst addCustomRendererToCell = (grid) => (column) => {\n const { customRenderer } = column;\n const customHeaderRenderer = get(column, ['header', 'customRenderer']);\n if (!customRenderer && !customHeaderRenderer) return column;\n\n if (isFunction(customHeaderRenderer)) {\n column.header.formatters.push(getRenderer(customHeaderRenderer, grid));\n }\n\n if (isFunction(customRenderer)) {\n column = appendCellFormatter(getRenderer(customRenderer, grid, column), column);\n } else {\n if (!customRenderer) return column;\n column.cell.formatters.push((value, columnData) => getRendererComponent(grid, customRenderer, columnData));\n }\n\n return column;\n};\n\nexport { addCustomRendererToCell };\nexport default addCustomRendererToCell;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAgC;AAChC,uBAAoC;AACpC,kCAAqC;AAE9B,MAAM,cAAc,CAAC,UAAU,MAAM,WAAW,CAAC,OAAO,aAAa;AAC1E,QAAM;AAAA,IACJ,OAAO,EAAE,gBAAgB,cAAc;AAAA,EACzC,IAAI,KAAK,YAAY;AACrB,MACE,UACA,OAAO,oBACP,SACA,MAAM,SACN,MAAM,MAAM,YACZ,MAAM,MAAM,SAAS,WAAW,GAChC;AACA,WAAO;AAAA,MACL,MAAM,MAAM,SAAS,CAAC;AAAA,MACtB,SAAS;AAAA,QACP,OAAO,MAAM,MAAM,SAAS,CAAC;AAAA;AAAA,QAC7B,UAAU,EAAE,GAAG,UAAU,cAAc;AAAA,QACvC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO,SAAS;AAAA,IACd;AAAA,IACA,UAAU,EAAE,GAAG,UAAU,cAAc;AAAA,IACvC;AAAA,EACF,CAAC;AACH;AAEA,MAAM,0BAA0B,CAAC,SAAS,CAAC,WAAW;AACpD,QAAM,EAAE,eAAe,IAAI;AAC3B,QAAM,2BAAuB,yBAAI,QAAQ,CAAC,UAAU,gBAAgB,CAAC;AACrE,MAAI,CAAC,kBAAkB,CAAC;AAAsB,WAAO;AAErD,UAAI,gCAAW,oBAAoB,GAAG;AACpC,WAAO,OAAO,WAAW,KAAK,YAAY,sBAAsB,IAAI,CAAC;AAAA,EACvE;AAEA,UAAI,gCAAW,cAAc,GAAG;AAC9B,iBAAS,sCAAoB,YAAY,gBAAgB,MAAM,MAAM,GAAG,MAAM;AAAA,EAChF,OAAO;AACL,QAAI,CAAC;AAAgB,aAAO;AAC5B,WAAO,KAAK,WAAW,KAAK,CAAC,OAAO,mBAAe,kDAAqB,MAAM,gBAAgB,UAAU,CAAC;AAAA,EAC3G;AAEA,SAAO;AACT;AAGA,IAAO,kCAAQ;",
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,7 +37,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
33
37
  var import_ds_button = require("@elliemae/ds-button");
34
38
  var import_ds_form = require("@elliemae/ds-form");
35
39
  var import_ds_dropdownmenu = require("@elliemae/ds-dropdownmenu");
36
- var renderers = __toESM(require("../../components/renderers"));
40
+ var renderers = __toESM(require("../../components/renderers/index.js"));
37
41
  const components = {
38
42
  DSButton: import_ds_button.DSButton,
39
43
  DSCheckbox: import_ds_form.DSCheckbox,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/custom-cell-renderer/getRendererComponent.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSCheckbox, DSComboBox, DSRadio, DSTextBox, DSToggle } from '@elliemae/ds-form';\nimport { DSDropdownMenu } from '@elliemae/ds-dropdownmenu';\nimport * as renderers from '../../components/renderers';\n\nconst components = {\n DSButton: DSButton,\n DSCheckbox: DSCheckbox,\n DSComboBox: DSComboBox,\n DSRadio: DSRadio,\n DSTextBox: DSTextBox,\n DSToggle: DSToggle,\n DSDropdownMenu: DSDropdownMenu,\n};\n\nconst getRendererComponent = ({ props }, { type = 'DSTextBox', handlers, ...rest }, { rowData }) => {\n const Component = components[type] || renderers[type];\n const { customHandlers, rowKey } = props;\n const mappedHandlers = {};\n\n Object.keys(handlers).forEach((key) => {\n mappedHandlers[handlers[key]] = () =>\n typeof customHandlers[key] === 'function' ? customHandlers[key](rowData, rowData[rowKey]) : null;\n });\n return <Component {...rowData} {...mappedHandlers} {...rest} />;\n};\n\nexport { getRendererComponent };\nexport default getRendererComponent;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBd;AAxBT,uBAAyB;AACzB,qBAAqE;AACrE,6BAA+B;AAC/B,gBAA2B;AAE3B,MAAM,aAAa;AAAA,EACjB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAClB;AAEA,MAAM,uBAAuB,CAAC,EAAE,MAAM,GAAG,EAAE,OAAO,aAAa,aAAa,KAAK,GAAG,EAAE,QAAQ,MAAM;AAClG,QAAM,YAAY,WAAW,SAAS,UAAU;AAChD,QAAM,EAAE,gBAAgB,OAAO,IAAI;AACnC,QAAM,iBAAiB,CAAC;AAExB,SAAO,KAAK,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AACrC,mBAAe,SAAS,QAAQ,MAC9B,OAAO,eAAe,SAAS,aAAa,eAAe,KAAK,SAAS,QAAQ,OAAO,IAAI;AAAA,EAChG,CAAC;AACD,SAAO,4CAAC,aAAW,GAAG,SAAU,GAAG,gBAAiB,GAAG,MAAM;AAC/D;AAGA,IAAO,+BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { DSButton } from '@elliemae/ds-button';\nimport { DSCheckbox, DSComboBox, DSRadio, DSTextBox, DSToggle } from '@elliemae/ds-form';\nimport { DSDropdownMenu } from '@elliemae/ds-dropdownmenu';\nimport * as renderers from '../../components/renderers/index.js';\n\nconst components = {\n DSButton: DSButton,\n DSCheckbox: DSCheckbox,\n DSComboBox: DSComboBox,\n DSRadio: DSRadio,\n DSTextBox: DSTextBox,\n DSToggle: DSToggle,\n DSDropdownMenu: DSDropdownMenu,\n};\n\nconst getRendererComponent = ({ props }, { type = 'DSTextBox', handlers, ...rest }, { rowData }) => {\n const Component = components[type] || renderers[type];\n const { customHandlers, rowKey } = props;\n const mappedHandlers = {};\n\n Object.keys(handlers).forEach((key) => {\n mappedHandlers[handlers[key]] = () =>\n typeof customHandlers[key] === 'function' ? customHandlers[key](rowData, rowData[rowKey]) : null;\n });\n return <Component {...rowData} {...mappedHandlers} {...rest} />;\n};\n\nexport { getRendererComponent };\nexport default getRendererComponent;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBd;AAxBT,uBAAyB;AACzB,qBAAqE;AACrE,6BAA+B;AAC/B,gBAA2B;AAE3B,MAAM,aAAa;AAAA,EACjB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAClB;AAEA,MAAM,uBAAuB,CAAC,EAAE,MAAM,GAAG,EAAE,OAAO,aAAa,UAAU,GAAG,KAAK,GAAG,EAAE,QAAQ,MAAM;AAClG,QAAM,YAAY,WAAW,IAAI,KAAK,UAAU,IAAI;AACpD,QAAM,EAAE,gBAAgB,OAAO,IAAI;AACnC,QAAM,iBAAiB,CAAC;AAExB,SAAO,KAAK,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AACrC,mBAAe,SAAS,GAAG,CAAC,IAAI,MAC9B,OAAO,eAAe,GAAG,MAAM,aAAa,eAAe,GAAG,EAAE,SAAS,QAAQ,MAAM,CAAC,IAAI;AAAA,EAChG,CAAC;AACD,SAAO,4CAAC,aAAW,GAAG,SAAU,GAAG,gBAAiB,GAAG,MAAM;AAC/D;AAGA,IAAO,+BAAQ;",
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(custom_cell_renderer_exports, {
28
32
  });
29
33
  module.exports = __toCommonJS(custom_cell_renderer_exports);
30
34
  var React = __toESM(require("react"));
31
- var import_CustomRendererPlugin = require("./CustomRendererPlugin");
35
+ var import_CustomRendererPlugin = require("./CustomRendererPlugin.js");
32
36
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/custom-cell-renderer/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { CustomRendererPlugin } from './CustomRendererPlugin';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAqC;",
4
+ "sourcesContent": ["export { CustomRendererPlugin } from './CustomRendererPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAqC;",
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
  ));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nclass ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange = (value) => {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n }\n\n handleBlur = () => {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n\nexport { ComboBox };\nexport default ComboBox;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCjB;AAhCN,mBAAiC;AACjC,qBAA2B;AAE3B,MAAM,iBAAiB,uBAAU;AAAA,EAK/B,YAAY,OAAO;AACjB,UAAM,KAAK;AAIb,wBAAe,CAAC,UAAU;AACxB,YAAM,EAAE,QAAQ,IAAI,KAAK;AAKzB,iBAAW,MAAM,QAAQ,KAAK,GAAG,CAAC;AAClC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AAEA,sBAAa,MAAM;AACjB,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,YAAM,EAAE,MAAM,IAAI,KAAK;AACvB,cAAQ,KAAK;AAAA,IACf;AAjBE,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAkBA,SAAS;AACP,UAAM,EAAE,MAAM,IAAI,KAAK;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG,KAAK;AAAA,QACT,YAAU;AAAA,QACV,QAAQ,KAAK;AAAA,QACb,UAAU,KAAK;AAAA,QACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,QAClC;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAvCM,SACG,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AAuCF,IAAO,mBAAQ;",
4
+ "sourcesContent": ["import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nclass ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange = (value) => {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n };\n\n handleBlur = () => {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n };\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n\nexport { ComboBox };\nexport default ComboBox;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCjB;AAhCN,mBAAiC;AACjC,qBAA2B;AAE3B,MAAM,iBAAiB,uBAAU;AAAA,EAK/B,YAAY,OAAO;AACjB,UAAM,KAAK;AAIb,wBAAe,CAAC,UAAU;AACxB,YAAM,EAAE,QAAQ,IAAI,KAAK;AAKzB,iBAAW,MAAM,QAAQ,KAAK,GAAG,CAAC;AAClC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AAEA,sBAAa,MAAM;AACjB,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,YAAM,EAAE,MAAM,IAAI,KAAK;AACvB,cAAQ,KAAK;AAAA,IACf;AAjBE,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAkBA,SAAS;AACP,UAAM,EAAE,MAAM,IAAI,KAAK;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG,KAAK;AAAA,QACT,YAAU;AAAA,QACV,QAAQ,KAAK;AAAA,QACb,UAAU,KAAK;AAAA,QACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,QAClC;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAvCM,SACG,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AAuCF,IAAO,mBAAQ;",
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
  ));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/plugins/editable/EditableComponents/TextBox.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nclass TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp = ({ key, target: { value } }) => {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n }\n\n handleKeyDown = (e) => {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }\n\n handleBlur = (e) => {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n }\n\n handleChange = ({ target: { value } }) => {\n this.setState({ value });\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n\nexport { TextBox };\nexport default TextBox;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsDjB;AApDN,mBAAiC;AACjC,qBAA0B;AAG1B,MAAM,gBAAgB,uBAAU;AAAA,EAK9B,YAAY,OAAO;AACjB,UAAM,KAAK;AAab,uBAAc,CAAC,EAAE,KAAK,QAAQ,EAAE,MAAM,EAAE,MAAM;AAC5C,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,UAAI,QAAQ,SAAS;AACnB,gBAAQ,KAAK;AAAA,MACf;AAAA,IACF;AAEA,yBAAgB,CAAC,MAAM;AAErB,UAAI,EAAE,QAAQ,SAAS;AACrB,UAAE,eAAe;AAAA,MACnB;AAAA,IACF;AAEA,sBAAa,CAAC,MAAM;AAClB,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,YAAM;AAAA,QACJ,QAAQ,EAAE,MAAM;AAAA,MAClB,IAAI;AACJ,cAAQ,KAAK;AAAA,IACf;AAEA,wBAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM;AACxC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AApCE,SAAK,WAAW,aAAAA,QAAM,UAAU;AAChC,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAEA,oBAAoB;AAClB,eAAW,MAAM;AACf,UAAI,KAAK,YAAY,KAAK,SAAS,SAAS;AAC1C,aAAK,SAAS,QAAQ,MAAM;AAAA,MAC9B;AAAA,IACF,GAAG,EAAE;AAAA,EACP;AAAA,EA4BA,SAAS;AACP,UAAM,EAAE,MAAM,IAAI,KAAK;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAY;AAAA,QACX,GAAG,KAAK;AAAA,QACT,UAAU,KAAK;AAAA,QACf,QAAQ,KAAK;AAAA,QACb,UAAU,KAAK;AAAA,QACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,QAClC,SAAS,KAAK;AAAA,QACd,WAAW,KAAK;AAAA,QAChB;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AA7DM,QACG,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AA6DF,IAAO,kBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nclass TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp = ({ key, target: { value } }) => {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n };\n\n handleKeyDown = (e) => {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n };\n\n handleBlur = (e) => {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n };\n\n handleChange = ({ target: { value } }) => {\n this.setState({ value });\n };\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n\nexport { TextBox };\nexport default TextBox;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsDjB;AApDN,mBAAiC;AACjC,qBAA0B;AAG1B,MAAM,gBAAgB,uBAAU;AAAA,EAK9B,YAAY,OAAO;AACjB,UAAM,KAAK;AAab,uBAAc,CAAC,EAAE,KAAK,QAAQ,EAAE,MAAM,EAAE,MAAM;AAC5C,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,UAAI,QAAQ,SAAS;AACnB,gBAAQ,KAAK;AAAA,MACf;AAAA,IACF;AAEA,yBAAgB,CAAC,MAAM;AAErB,UAAI,EAAE,QAAQ,SAAS;AACrB,UAAE,eAAe;AAAA,MACnB;AAAA,IACF;AAEA,sBAAa,CAAC,MAAM;AAClB,YAAM,EAAE,QAAQ,IAAI,KAAK;AACzB,YAAM;AAAA,QACJ,QAAQ,EAAE,MAAM;AAAA,MAClB,IAAI;AACJ,cAAQ,KAAK;AAAA,IACf;AAEA,wBAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM;AACxC,WAAK,SAAS,EAAE,MAAM,CAAC;AAAA,IACzB;AApCE,SAAK,WAAW,aAAAA,QAAM,UAAU;AAChC,SAAK,QAAQ,EAAE,OAAO,MAAM,MAAM;AAAA,EACpC;AAAA,EAEA,oBAAoB;AAClB,eAAW,MAAM;AACf,UAAI,KAAK,YAAY,KAAK,SAAS,SAAS;AAC1C,aAAK,SAAS,QAAQ,MAAM;AAAA,MAC9B;AAAA,IACF,GAAG,EAAE;AAAA,EACP;AAAA,EA4BA,SAAS;AACP,UAAM,EAAE,MAAM,IAAI,KAAK;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAY;AAAA,QACX,GAAG,KAAK;AAAA,QACT,UAAU,KAAK;AAAA,QACf,QAAQ,KAAK;AAAA,QACb,UAAU,KAAK;AAAA,QACf,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,QAClC,SAAS,KAAK;AAAA,QACd,WAAW,KAAK;AAAA,QAChB;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AA7DM,QACG,eAAe;AAAA,EACpB,SAAS,MAAM;AACjB;AA6DF,IAAO,kBAAQ;",
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
  ));
@@ -29,6 +33,6 @@ __export(EditableComponents_exports, {
29
33
  });
30
34
  module.exports = __toCommonJS(EditableComponents_exports);
31
35
  var React = __toESM(require("react"));
32
- var import_ComboBox = __toESM(require("./ComboBox"));
33
- var import_TextBox = __toESM(require("./TextBox"));
36
+ var import_ComboBox = __toESM(require("./ComboBox.js"));
37
+ var import_TextBox = __toESM(require("./TextBox.js"));
34
38
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/plugins/editable/EditableComponents/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { default as ComboBox } from './ComboBox';\nexport { default as TextBox } from './TextBox';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAAoC;AACpC,qBAAmC;",
4
+ "sourcesContent": ["export { default as ComboBox } from './ComboBox.js';\nexport { default as TextBox } from './TextBox.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAAoC;AACpC,qBAAmC;",
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(EditablePlugin_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_decorateEditable = require("./decorateEditable");
37
+ var import_decorateEditable = require("./decorateEditable.js");
34
38
  const registerStateHook = (grid) => {
35
39
  const { rowKey = "id", editingRows: editingRowsProp, onColumnRowEdited, onColumnRowEdit } = grid.props;
36
40
  const [editingRows, setEditingRows] = (0, import_ds_utilities.useDerivedStateFromProps)(editingRowsProp || {});
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/editable/EditablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useDerivedStateFromProps, toggleInObject } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addEditableToCell, makeEditableConfig } from './decorateEditable';\n\nconst registerStateHook = (grid) => {\n const { rowKey = 'id', editingRows: editingRowsProp, onColumnRowEdited, onColumnRowEdit } = grid.props;\n const [editingRows, setEditingRows] = useDerivedStateFromProps(editingRowsProp || {});\n\n const activateEdit = (editParams) => {\n const { shouldRefocus } = grid.getInstance();\n const { rowData, columnIndex } = editParams;\n shouldRefocus.current = { forced: true, value: false };\n setEditingRows((prevEditingRows) => {\n onColumnRowEdit(editParams);\n return toggleInObject(prevEditingRows, rowData[rowKey], columnIndex);\n });\n };\n\n const editValue = ({ value, rowData, property, rowIndex }) => {\n setEditingRows({});\n onColumnRowEdited({\n value,\n rowData,\n property,\n rowIndex,\n });\n };\n\n return {\n state: { editingRows },\n actions: {\n activateEdit,\n editValue,\n },\n };\n};\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isColumnEditable = (col) => col.editable, customHandlers },\n } = grid;\n\n const editableConfig = makeEditableConfig(grid);\n\n return isColumnEditable(column)\n ? addEditableToCell(\n {\n column,\n config: editableConfig,\n handlers: customHandlers,\n },\n grid,\n )\n : column;\n};\n\nexport const EditablePlugin = createInstancePlugin('editable', {\n registerStateHook,\n decorateColumn,\n registerHotKeys(grid) {\n return {\n key: 'enter',\n handler: ({ rowIndex, cellIndex }) => {\n const {\n composedRows,\n decoratedColumns,\n actions: { activateEdit },\n props: { isColumnEditable },\n } = grid.getInstance();\n\n if (!isColumnEditable(decoratedColumns[cellIndex])) return;\n\n const rows = composedRows.rows || composedRows;\n const row = rows[rowIndex];\n if (!row) return;\n\n activateEdit({\n rowData: row,\n columnIndex: cellIndex,\n });\n },\n options: {\n keydown: false,\n keyup: true,\n },\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyD;AACzD,uBAAqC;AACrC,8BAAsD;AAEtD,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM,EAAE,SAAS,MAAM,aAAa,iBAAiB,mBAAmB,gBAAgB,IAAI,KAAK;AACjG,QAAM,CAAC,aAAa,cAAc,QAAI,8CAAyB,mBAAmB,CAAC,CAAC;AAEpF,QAAM,eAAe,CAAC,eAAe;AACnC,UAAM,EAAE,cAAc,IAAI,KAAK,YAAY;AAC3C,UAAM,EAAE,SAAS,YAAY,IAAI;AACjC,kBAAc,UAAU,EAAE,QAAQ,MAAM,OAAO,MAAM;AACrD,mBAAe,CAAC,oBAAoB;AAClC,sBAAgB,UAAU;AAC1B,iBAAO,oCAAe,iBAAiB,QAAQ,SAAS,WAAW;AAAA,IACrE,CAAC;AAAA,EACH;AAEA,QAAM,YAAY,CAAC,EAAE,OAAO,SAAS,UAAU,SAAS,MAAM;AAC5D,mBAAe,CAAC,CAAC;AACjB,sBAAkB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,OAAO,EAAE,YAAY;AAAA,IACrB,SAAS;AAAA,MACP;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QAAM;AAAA,IACJ,OAAO,EAAE,mBAAmB,CAAC,QAAQ,IAAI,UAAU,eAAe;AAAA,EACpE,IAAI;AAEJ,QAAM,qBAAiB,4CAAmB,IAAI;AAE9C,SAAO,iBAAiB,MAAM,QAC1B;AAAA,IACE;AAAA,MACE;AAAA,MACA,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,EACF,IACA;AACN;AAEO,MAAM,qBAAiB,uCAAqB,YAAY;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,gBAAgB,MAAM;AACpB,WAAO;AAAA,MACL,KAAK;AAAA,MACL,SAAS,CAAC,EAAE,UAAU,UAAU,MAAM;AACpC,cAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA,SAAS,EAAE,aAAa;AAAA,UACxB,OAAO,EAAE,iBAAiB;AAAA,QAC5B,IAAI,KAAK,YAAY;AAErB,YAAI,CAAC,iBAAiB,iBAAiB,UAAU;AAAG;AAEpD,cAAM,OAAO,aAAa,QAAQ;AAClC,cAAM,MAAM,KAAK;AACjB,YAAI,CAAC;AAAK;AAEV,qBAAa;AAAA,UACX,SAAS;AAAA,UACT,aAAa;AAAA,QACf,CAAC;AAAA,MACH;AAAA,MACA,SAAS;AAAA,QACP,SAAS;AAAA,QACT,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
4
+ "sourcesContent": ["import { useDerivedStateFromProps, toggleInObject } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addEditableToCell, makeEditableConfig } from './decorateEditable.js';\n\nconst registerStateHook = (grid) => {\n const { rowKey = 'id', editingRows: editingRowsProp, onColumnRowEdited, onColumnRowEdit } = grid.props;\n const [editingRows, setEditingRows] = useDerivedStateFromProps(editingRowsProp || {});\n\n const activateEdit = (editParams) => {\n const { shouldRefocus } = grid.getInstance();\n const { rowData, columnIndex } = editParams;\n shouldRefocus.current = { forced: true, value: false };\n setEditingRows((prevEditingRows) => {\n onColumnRowEdit(editParams);\n return toggleInObject(prevEditingRows, rowData[rowKey], columnIndex);\n });\n };\n\n const editValue = ({ value, rowData, property, rowIndex }) => {\n setEditingRows({});\n onColumnRowEdited({\n value,\n rowData,\n property,\n rowIndex,\n });\n };\n\n return {\n state: { editingRows },\n actions: {\n activateEdit,\n editValue,\n },\n };\n};\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isColumnEditable = (col) => col.editable, customHandlers },\n } = grid;\n\n const editableConfig = makeEditableConfig(grid);\n\n return isColumnEditable(column)\n ? addEditableToCell(\n {\n column,\n config: editableConfig,\n handlers: customHandlers,\n },\n grid,\n )\n : column;\n};\n\nexport const EditablePlugin = createInstancePlugin('editable', {\n registerStateHook,\n decorateColumn,\n registerHotKeys(grid) {\n return {\n key: 'enter',\n handler: ({ rowIndex, cellIndex }) => {\n const {\n composedRows,\n decoratedColumns,\n actions: { activateEdit },\n props: { isColumnEditable },\n } = grid.getInstance();\n\n if (!isColumnEditable(decoratedColumns[cellIndex])) return;\n\n const rows = composedRows.rows || composedRows;\n const row = rows[rowIndex];\n if (!row) return;\n\n activateEdit({\n rowData: row,\n columnIndex: cellIndex,\n });\n },\n options: {\n keydown: false,\n keyup: true,\n },\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyD;AACzD,uBAAqC;AACrC,8BAAsD;AAEtD,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM,EAAE,SAAS,MAAM,aAAa,iBAAiB,mBAAmB,gBAAgB,IAAI,KAAK;AACjG,QAAM,CAAC,aAAa,cAAc,QAAI,8CAAyB,mBAAmB,CAAC,CAAC;AAEpF,QAAM,eAAe,CAAC,eAAe;AACnC,UAAM,EAAE,cAAc,IAAI,KAAK,YAAY;AAC3C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,qBAAa;AAAA,UACX,SAAS;AAAA,UACT,aAAa;AAAA,QACf,CAAC;AAAA,MACH;AAAA,MACA,SAAS;AAAA,QACP,SAAS;AAAA,QACT,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;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
  ));
@@ -34,7 +38,7 @@ var edit = __toESM(require("react-edit"));
34
38
  var import_ds_icons = require("@elliemae/ds-icons");
35
39
  var import_ds_utilities = require("@elliemae/ds-utilities");
36
40
  var import_ds_shared = require("@elliemae/ds-shared");
37
- var import_getEditorComponent = require("./getEditorComponent");
41
+ var import_getEditorComponent = require("./getEditorComponent.js");
38
42
  const makeEditableConfig = (grid) => edit.edit({
39
43
  isEditing: ({ columnIndex, rowData, column = {}, ...rest }) => {
40
44
  const {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/editable/decorateEditable.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport * as edit from 'react-edit';\nimport { EditPencil } from '@elliemae/ds-icons';\nimport { cx } from '@elliemae/ds-utilities';\nimport { appendCellFormatter } from '@elliemae/ds-shared';\nimport { getEditorComponent } from './getEditorComponent';\n\nconst makeEditableConfig = (grid) =>\n edit.edit({\n isEditing: ({ columnIndex, rowData, column = {}, ...rest }) => {\n const {\n state: { editingRows },\n props: { rowKey },\n } = grid.getInstance();\n let isCustomEditing;\n\n if (typeof column.isEditing === 'function') {\n isCustomEditing = column.isEditing({\n columnIndex,\n rowData,\n column,\n ...rest,\n });\n }\n return editingRows[rowData[rowKey]] === columnIndex || column.alwaysEditing || isCustomEditing;\n },\n onActivate: () => null,\n onValue: (...args) => grid.getInstance().actions.editValue(...args),\n });\nconst addEditableToCell = ({ column, config, handlers }, grid) => {\n column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));\n column.cell.props.className = cx(\n column.cell.props.className,\n `editable${column.customEditor ? ' customEditor' : ''}`,\n );\n return appendCellFormatter(\n [\n (value, extraParams) => (\n <>\n <div\n onClick={(e) => {\n e.stopPropagation();\n grid.getInstance().actions.activateEdit(extraParams);\n }}\n onKeyUp={(e) => {\n e.stopPropagation();\n if (e.keyCode === 33) {\n grid.getInstance().actions.activateEdit(extraParams);\n }\n }}\n role=\"gridcell\"\n tabIndex={0}\n >\n {value}\n <EditPencil className=\"edit-pencil\" />\n <span className=\"edit-separator\"> </span>\n </div>\n </>\n ),\n ],\n column,\n );\n};\n\nexport { makeEditableConfig, addEditableToCell };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCf;AArCR,WAAsB;AACtB,sBAA2B;AAC3B,0BAAmB;AACnB,uBAAoC;AACpC,gCAAmC;AAEnC,MAAM,qBAAqB,CAAC,SAC1B,KAAK,KAAK;AAAA,EACR,WAAW,CAAC,EAAE,aAAa,SAAS,SAAS,CAAC,MAAM,KAAK,MAAM;AAC7D,UAAM;AAAA,MACJ,OAAO,EAAE,YAAY;AAAA,MACrB,OAAO,EAAE,OAAO;AAAA,IAClB,IAAI,KAAK,YAAY;AACrB,QAAI;AAEJ,QAAI,OAAO,OAAO,cAAc,YAAY;AAC1C,wBAAkB,OAAO,UAAU;AAAA,QACjC;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAAA,IACH;AACA,WAAO,YAAY,QAAQ,aAAa,eAAe,OAAO,iBAAiB;AAAA,EACjF;AAAA,EACA,YAAY,MAAM;AAAA,EAClB,SAAS,IAAI,SAAS,KAAK,YAAY,EAAE,QAAQ,UAAU,GAAG,IAAI;AACpE,CAAC;AACH,MAAM,oBAAoB,CAAC,EAAE,QAAQ,QAAQ,SAAS,GAAG,SAAS;AAChE,SAAO,KAAK,WAAW,KAAK,WAAO,8CAAmB,OAAO,cAAc,QAAQ,CAAC,CAAC;AACrF,SAAO,KAAK,MAAM,gBAAY;AAAA,IAC5B,OAAO,KAAK,MAAM;AAAA,IAClB,WAAW,OAAO,eAAe,kBAAkB;AAAA,EACrD;AACA,aAAO;AAAA,IACL;AAAA,MACE,CAAC,OAAO,gBACN,2EACE;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,iBAAK,YAAY,EAAE,QAAQ,aAAa,WAAW;AAAA,UACrD;AAAA,UACA,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,gBAAI,EAAE,YAAY,IAAI;AACpB,mBAAK,YAAY,EAAE,QAAQ,aAAa,WAAW;AAAA,YACrD;AAAA,UACF;AAAA,UACA,MAAK;AAAA,UACL,UAAU;AAAA,UAET;AAAA;AAAA,YACD,4CAAC,8BAAW,WAAU,eAAc;AAAA,YACpC,4CAAC,UAAK,WAAU,kBAAiB,eAAC;AAAA;AAAA;AAAA,MACpC,GACF;AAAA,IAEJ;AAAA,IACA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import React from 'react';\nimport * as edit from 'react-edit';\nimport { EditPencil } from '@elliemae/ds-icons';\nimport { cx } from '@elliemae/ds-utilities';\nimport { appendCellFormatter } from '@elliemae/ds-shared';\nimport { getEditorComponent } from './getEditorComponent.js';\n\nconst makeEditableConfig = (grid) =>\n edit.edit({\n isEditing: ({ columnIndex, rowData, column = {}, ...rest }) => {\n const {\n state: { editingRows },\n props: { rowKey },\n } = grid.getInstance();\n let isCustomEditing;\n\n if (typeof column.isEditing === 'function') {\n isCustomEditing = column.isEditing({\n columnIndex,\n rowData,\n column,\n ...rest,\n });\n }\n return editingRows[rowData[rowKey]] === columnIndex || column.alwaysEditing || isCustomEditing;\n },\n onActivate: () => null,\n onValue: (...args) => grid.getInstance().actions.editValue(...args),\n });\nconst addEditableToCell = ({ column, config, handlers }, grid) => {\n column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));\n column.cell.props.className = cx(\n column.cell.props.className,\n `editable${column.customEditor ? ' customEditor' : ''}`,\n );\n return appendCellFormatter(\n [\n (value, extraParams) => (\n <>\n <div\n onClick={(e) => {\n e.stopPropagation();\n grid.getInstance().actions.activateEdit(extraParams);\n }}\n onKeyUp={(e) => {\n e.stopPropagation();\n if (e.keyCode === 33) {\n grid.getInstance().actions.activateEdit(extraParams);\n }\n }}\n role=\"gridcell\"\n tabIndex={0}\n >\n {value}\n <EditPencil className=\"edit-pencil\" />\n <span className=\"edit-separator\"> </span>\n </div>\n </>\n ),\n ],\n column,\n );\n};\n\nexport { makeEditableConfig, addEditableToCell };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCf;AArCR,WAAsB;AACtB,sBAA2B;AAC3B,0BAAmB;AACnB,uBAAoC;AACpC,gCAAmC;AAEnC,MAAM,qBAAqB,CAAC,SAC1B,KAAK,KAAK;AAAA,EACR,WAAW,CAAC,EAAE,aAAa,SAAS,SAAS,CAAC,GAAG,GAAG,KAAK,MAAM;AAC7D,UAAM;AAAA,MACJ,OAAO,EAAE,YAAY;AAAA,MACrB,OAAO,EAAE,OAAO;AAAA,IAClB,IAAI,KAAK,YAAY;AACrB,QAAI;AAEJ,QAAI,OAAO,OAAO,cAAc,YAAY;AAC1C,wBAAkB,OAAO,UAAU;AAAA,QACjC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