@elliemae/ds-datagrids 3.22.0-next.3 → 3.22.0-next.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) hide show
  1. package/dist/cjs/DSDataGrid.js.map +1 -1
  2. package/dist/cjs/DataGridImpl.js.map +1 -1
  3. package/dist/cjs/PaginatedDataGrid.js.map +1 -1
  4. package/dist/cjs/blockNames.js.map +1 -1
  5. package/dist/cjs/columns/IconColumn.js.map +1 -1
  6. package/dist/cjs/columns/NumberColumn.js.map +1 -1
  7. package/dist/cjs/components/BodyCell.js.map +1 -1
  8. package/dist/cjs/components/BodyList.js.map +1 -1
  9. package/dist/cjs/components/ColumnVisibilityMenuOption.js.map +1 -1
  10. package/dist/cjs/components/ColumnsOptionsMenuSection.js.map +1 -1
  11. package/dist/cjs/components/EmptyState.js.map +1 -1
  12. package/dist/cjs/components/HeaderCell.js.map +1 -1
  13. package/dist/cjs/components/List.js.map +1 -1
  14. package/dist/cjs/components/ListItem.js.map +1 -1
  15. package/dist/cjs/components/NoResults.js.map +1 -1
  16. package/dist/cjs/components/RowsLoader.js.map +1 -1
  17. package/dist/cjs/components/Table.js.map +1 -1
  18. package/dist/cjs/components/TableBody.js.map +1 -1
  19. package/dist/cjs/components/TableHeader.js.map +1 -1
  20. package/dist/cjs/components/footer/addOptionalFooterComponents.js.map +1 -1
  21. package/dist/cjs/components/header/PrimaryControls.js.map +1 -1
  22. package/dist/cjs/components/header/addOptionalHeaderComponents.js.map +1 -1
  23. package/dist/cjs/components/index.js.map +1 -1
  24. package/dist/cjs/components/renderers/defaultClassedRenderers.js.map +1 -1
  25. package/dist/cjs/components/renderers/index.js.map +1 -1
  26. package/dist/cjs/components/renderers/renderRowsLoader.js.map +1 -1
  27. package/dist/cjs/components/tableContext.js.map +1 -1
  28. package/dist/cjs/defaultPlugins.js.map +1 -1
  29. package/dist/cjs/index.js.map +1 -1
  30. package/dist/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +1 -1
  31. package/dist/cjs/plugins/body-header-scroll-sync/index.js.map +1 -1
  32. package/dist/cjs/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
  33. package/dist/cjs/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
  34. package/dist/cjs/plugins/column-dnd/index.js.map +1 -1
  35. package/dist/cjs/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
  36. package/dist/cjs/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
  37. package/dist/cjs/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
  38. package/dist/cjs/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
  39. package/dist/cjs/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
  40. package/dist/cjs/plugins/column-sizing/index.js.map +1 -1
  41. package/dist/cjs/plugins/column-sizing/useColumnSizeService.js.map +1 -1
  42. package/dist/cjs/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
  43. package/dist/cjs/plugins/column-sizing/utils.js.map +1 -1
  44. package/dist/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
  45. package/dist/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
  46. package/dist/cjs/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
  47. package/dist/cjs/plugins/custom-cell-renderer/index.js.map +1 -1
  48. package/dist/cjs/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
  49. package/dist/cjs/plugins/editable/EditableComponents/TextBox.js.map +1 -1
  50. package/dist/cjs/plugins/editable/EditableComponents/index.js.map +1 -1
  51. package/dist/cjs/plugins/editable/EditablePlugin.js.map +1 -1
  52. package/dist/cjs/plugins/editable/decorateEditable.js.map +1 -1
  53. package/dist/cjs/plugins/editable/getEditorComponent.js.map +1 -1
  54. package/dist/cjs/plugins/editable/index.js.map +1 -1
  55. package/dist/cjs/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
  56. package/dist/cjs/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
  57. package/dist/cjs/plugins/expandable-grid/ExpandedRow.js.map +1 -1
  58. package/dist/cjs/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
  59. package/dist/cjs/plugins/expandable-grid/index.js.map +1 -1
  60. package/dist/cjs/plugins/expandable-grid/useExpandGridState.js.map +1 -1
  61. package/dist/cjs/plugins/export-data/ExportDataPlugin.js.map +1 -1
  62. package/dist/cjs/plugins/export-data/index.js.map +1 -1
  63. package/dist/cjs/plugins/filterable/FilterablePlugin.js.map +1 -1
  64. package/dist/cjs/plugins/filterable/addFilterToColumn.js.map +1 -1
  65. package/dist/cjs/plugins/filterable/components/FilterableHeader.js.map +1 -1
  66. package/dist/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
  67. package/dist/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
  68. package/dist/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
  69. package/dist/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
  70. package/dist/cjs/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
  71. package/dist/cjs/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
  72. package/dist/cjs/plugins/filterable/filterableFormatter.js.map +1 -1
  73. package/dist/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
  74. package/dist/cjs/plugins/filterable/filtering-helper/strategiesOperators.js.map +1 -1
  75. package/dist/cjs/plugins/filterable/helper.js.map +1 -1
  76. package/dist/cjs/plugins/filterable/index.js.map +1 -1
  77. package/dist/cjs/plugins/filterable/useFilterableState.js.map +1 -1
  78. package/dist/cjs/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
  79. package/dist/cjs/plugins/grouping-grid/GroupingPlugin.js.map +1 -1
  80. package/dist/cjs/plugins/grouping-grid/walkStrategy.js.map +1 -1
  81. package/dist/cjs/plugins/index.js.map +1 -1
  82. package/dist/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
  83. package/dist/cjs/plugins/infinite-scrolling/index.js.map +1 -1
  84. package/dist/cjs/plugins/pagination/PaginationPlugin.js.map +1 -1
  85. package/dist/cjs/plugins/pagination/components/Pagination.js.map +1 -1
  86. package/dist/cjs/plugins/pagination/components/Paginator.js.map +1 -1
  87. package/dist/cjs/plugins/pagination/components/PerPageDropdown.js.map +1 -1
  88. package/dist/cjs/plugins/pagination/helper.js.map +1 -1
  89. package/dist/cjs/plugins/pagination/index.js.map +1 -1
  90. package/dist/cjs/plugins/pagination/usePaginationState.js.map +1 -1
  91. package/dist/cjs/plugins/resizable/ResizablePlugin.js.map +1 -1
  92. package/dist/cjs/plugins/resizable/decorateResizable.js.map +1 -1
  93. package/dist/cjs/plugins/resizable/index.js.map +1 -1
  94. package/dist/cjs/plugins/resizable/useResizeHandle.js.map +1 -1
  95. package/dist/cjs/plugins/resizable/utils.js.map +1 -1
  96. package/dist/cjs/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
  97. package/dist/cjs/plugins/row-dnd/index.js.map +1 -1
  98. package/dist/cjs/plugins/selectable/SelectablePlugin.js.map +1 -1
  99. package/dist/cjs/plugins/selectable/addSelectableColumn.js.map +1 -1
  100. package/dist/cjs/plugins/selectable/helper.js.map +1 -1
  101. package/dist/cjs/plugins/selectable/index.js.map +1 -1
  102. package/dist/cjs/plugins/selectable/selectableFormatter.js.map +1 -1
  103. package/dist/cjs/plugins/selectable/useSelectableState.js.map +1 -1
  104. package/dist/cjs/plugins/sortable/SortablePlugin.js.map +1 -1
  105. package/dist/cjs/plugins/sortable/checkIfSortable.js.map +1 -1
  106. package/dist/cjs/plugins/sortable/index.js.map +1 -1
  107. package/dist/cjs/plugins/sortable/sortHeaderFormatter.js.map +1 -1
  108. package/dist/cjs/plugins/sortable/sortTree.js.map +1 -1
  109. package/dist/cjs/plugins/sortable/sorter.js.map +1 -1
  110. package/dist/cjs/plugins/sortable/useSortableState.js.map +1 -1
  111. package/dist/cjs/plugins/toolbar/RowRenderer.js.map +1 -1
  112. package/dist/cjs/plugins/toolbar/ToolbarPlugin.js.map +1 -1
  113. package/dist/cjs/plugins/toolbar/ToolbarTrigger.js.map +1 -1
  114. package/dist/cjs/plugins/toolbar/index.js.map +1 -1
  115. package/dist/cjs/plugins/virtualization/AutoHeightList.js.map +1 -1
  116. package/dist/cjs/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
  117. package/dist/cjs/plugins/virtualization/VirtualizedBody.js.map +1 -1
  118. package/dist/cjs/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
  119. package/dist/cjs/plugins/virtualization/helper.js.map +1 -1
  120. package/dist/cjs/plugins/virtualization/index.js.map +1 -1
  121. package/dist/cjs/renders/CellWithAddons.js.map +1 -1
  122. package/dist/cjs/renders/index.js.map +1 -1
  123. package/dist/cjs/renders/styled.js.map +1 -1
  124. package/dist/cjs/rowSizes.js.map +1 -1
  125. package/dist/cjs/utilities/getPluginsFromProps.js.map +1 -1
  126. package/dist/cjs/utilities/getScrollbarSize.js.map +1 -1
  127. package/dist/cjs/utilities/normalizeData.js.map +1 -1
  128. package/dist/esm/DSDataGrid.js.map +1 -1
  129. package/dist/esm/DataGridImpl.js.map +1 -1
  130. package/dist/esm/PaginatedDataGrid.js.map +1 -1
  131. package/dist/esm/blockNames.js.map +1 -1
  132. package/dist/esm/columns/IconColumn.js.map +1 -1
  133. package/dist/esm/columns/NumberColumn.js.map +1 -1
  134. package/dist/esm/components/BodyCell.js.map +1 -1
  135. package/dist/esm/components/BodyList.js.map +1 -1
  136. package/dist/esm/components/ColumnVisibilityMenuOption.js.map +1 -1
  137. package/dist/esm/components/ColumnsOptionsMenuSection.js.map +1 -1
  138. package/dist/esm/components/EmptyState.js.map +1 -1
  139. package/dist/esm/components/HeaderCell.js.map +1 -1
  140. package/dist/esm/components/List.js.map +1 -1
  141. package/dist/esm/components/ListItem.js.map +1 -1
  142. package/dist/esm/components/NoResults.js.map +1 -1
  143. package/dist/esm/components/RowsLoader.js.map +1 -1
  144. package/dist/esm/components/Table.js.map +1 -1
  145. package/dist/esm/components/TableBody.js.map +1 -1
  146. package/dist/esm/components/TableHeader.js.map +1 -1
  147. package/dist/esm/components/footer/addOptionalFooterComponents.js.map +1 -1
  148. package/dist/esm/components/header/PrimaryControls.js.map +1 -1
  149. package/dist/esm/components/header/addOptionalHeaderComponents.js.map +1 -1
  150. package/dist/esm/components/index.js.map +1 -1
  151. package/dist/esm/components/renderers/defaultClassedRenderers.js.map +1 -1
  152. package/dist/esm/components/renderers/index.js.map +1 -1
  153. package/dist/esm/components/renderers/renderRowsLoader.js.map +1 -1
  154. package/dist/esm/components/tableContext.js.map +1 -1
  155. package/dist/esm/defaultPlugins.js.map +1 -1
  156. package/dist/esm/index.js.map +1 -1
  157. package/dist/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js.map +1 -1
  158. package/dist/esm/plugins/body-header-scroll-sync/index.js.map +1 -1
  159. package/dist/esm/plugins/column-dnd/DndColumnsPlugin.js.map +1 -1
  160. package/dist/esm/plugins/column-dnd/decorateGridWithDndColumns.js.map +1 -1
  161. package/dist/esm/plugins/column-dnd/index.js.map +1 -1
  162. package/dist/esm/plugins/column-sizing/ColumnSizingPlugin.js.map +1 -1
  163. package/dist/esm/plugins/column-sizing/columnMeasurerTransformer.js.map +1 -1
  164. package/dist/esm/plugins/column-sizing/ext-points/decorateColumn.js.map +1 -1
  165. package/dist/esm/plugins/column-sizing/ext-points/getTableProps.js.map +1 -1
  166. package/dist/esm/plugins/column-sizing/getColumnNameFromProperty.js.map +1 -1
  167. package/dist/esm/plugins/column-sizing/index.js.map +1 -1
  168. package/dist/esm/plugins/column-sizing/useColumnSizeService.js.map +1 -1
  169. package/dist/esm/plugins/column-sizing/useStylesheetHelpers.js.map +1 -1
  170. package/dist/esm/plugins/column-sizing/utils.js.map +1 -1
  171. package/dist/esm/plugins/custom-cell-renderer/CustomRendererPlugin.js.map +1 -1
  172. package/dist/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js.map +1 -1
  173. package/dist/esm/plugins/custom-cell-renderer/getRendererComponent.js.map +1 -1
  174. package/dist/esm/plugins/custom-cell-renderer/index.js.map +1 -1
  175. package/dist/esm/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
  176. package/dist/esm/plugins/editable/EditableComponents/TextBox.js.map +1 -1
  177. package/dist/esm/plugins/editable/EditableComponents/index.js.map +1 -1
  178. package/dist/esm/plugins/editable/EditablePlugin.js.map +1 -1
  179. package/dist/esm/plugins/editable/decorateEditable.js.map +1 -1
  180. package/dist/esm/plugins/editable/getEditorComponent.js.map +1 -1
  181. package/dist/esm/plugins/editable/index.js.map +1 -1
  182. package/dist/esm/plugins/expandable-grid/ExpandableColumn.js.map +1 -1
  183. package/dist/esm/plugins/expandable-grid/ExpandablePlugin.js.map +1 -1
  184. package/dist/esm/plugins/expandable-grid/ExpandedRow.js.map +1 -1
  185. package/dist/esm/plugins/expandable-grid/ExpandedRowExtra.js.map +1 -1
  186. package/dist/esm/plugins/expandable-grid/index.js.map +1 -1
  187. package/dist/esm/plugins/expandable-grid/useExpandGridState.js.map +1 -1
  188. package/dist/esm/plugins/export-data/ExportDataPlugin.js.map +1 -1
  189. package/dist/esm/plugins/export-data/index.js.map +1 -1
  190. package/dist/esm/plugins/filterable/FilterablePlugin.js.map +1 -1
  191. package/dist/esm/plugins/filterable/addFilterToColumn.js.map +1 -1
  192. package/dist/esm/plugins/filterable/components/FilterableHeader.js.map +1 -1
  193. package/dist/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js.map +1 -1
  194. package/dist/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js.map +1 -1
  195. package/dist/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js.map +1 -1
  196. package/dist/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js.map +1 -1
  197. package/dist/esm/plugins/filterable/components/filterable-menus/defaultDateFormat.js.map +1 -1
  198. package/dist/esm/plugins/filterable/components/filterable-menus/getFilterMenuByType.js.map +1 -1
  199. package/dist/esm/plugins/filterable/filterableFormatter.js.map +1 -1
  200. package/dist/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js.map +1 -1
  201. package/dist/esm/plugins/filterable/filtering-helper/strategiesOperators.js.map +1 -1
  202. package/dist/esm/plugins/filterable/helper.js.map +1 -1
  203. package/dist/esm/plugins/filterable/index.js.map +1 -1
  204. package/dist/esm/plugins/filterable/useFilterableState.js.map +1 -1
  205. package/dist/esm/plugins/grouping-by/GroupingByPlugin.js.map +1 -1
  206. package/dist/esm/plugins/grouping-grid/GroupingPlugin.js.map +1 -1
  207. package/dist/esm/plugins/grouping-grid/walkStrategy.js.map +1 -1
  208. package/dist/esm/plugins/index.js.map +1 -1
  209. package/dist/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js.map +1 -1
  210. package/dist/esm/plugins/infinite-scrolling/index.js.map +1 -1
  211. package/dist/esm/plugins/pagination/PaginationPlugin.js.map +1 -1
  212. package/dist/esm/plugins/pagination/components/Pagination.js.map +1 -1
  213. package/dist/esm/plugins/pagination/components/Paginator.js.map +1 -1
  214. package/dist/esm/plugins/pagination/components/PerPageDropdown.js.map +1 -1
  215. package/dist/esm/plugins/pagination/helper.js.map +1 -1
  216. package/dist/esm/plugins/pagination/index.js.map +1 -1
  217. package/dist/esm/plugins/pagination/usePaginationState.js.map +1 -1
  218. package/dist/esm/plugins/resizable/ResizablePlugin.js.map +1 -1
  219. package/dist/esm/plugins/resizable/decorateResizable.js.map +1 -1
  220. package/dist/esm/plugins/resizable/index.js.map +1 -1
  221. package/dist/esm/plugins/resizable/useResizeHandle.js.map +1 -1
  222. package/dist/esm/plugins/resizable/utils.js.map +1 -1
  223. package/dist/esm/plugins/row-dnd/DndRowsPlugin.js.map +1 -1
  224. package/dist/esm/plugins/row-dnd/index.js.map +1 -1
  225. package/dist/esm/plugins/selectable/SelectablePlugin.js.map +1 -1
  226. package/dist/esm/plugins/selectable/addSelectableColumn.js.map +1 -1
  227. package/dist/esm/plugins/selectable/helper.js.map +1 -1
  228. package/dist/esm/plugins/selectable/index.js.map +1 -1
  229. package/dist/esm/plugins/selectable/selectableFormatter.js.map +1 -1
  230. package/dist/esm/plugins/selectable/useSelectableState.js.map +1 -1
  231. package/dist/esm/plugins/sortable/SortablePlugin.js.map +1 -1
  232. package/dist/esm/plugins/sortable/checkIfSortable.js.map +1 -1
  233. package/dist/esm/plugins/sortable/index.js.map +1 -1
  234. package/dist/esm/plugins/sortable/sortHeaderFormatter.js.map +1 -1
  235. package/dist/esm/plugins/sortable/sortTree.js.map +1 -1
  236. package/dist/esm/plugins/sortable/sorter.js.map +1 -1
  237. package/dist/esm/plugins/sortable/useSortableState.js.map +1 -1
  238. package/dist/esm/plugins/toolbar/RowRenderer.js.map +1 -1
  239. package/dist/esm/plugins/toolbar/ToolbarPlugin.js.map +1 -1
  240. package/dist/esm/plugins/toolbar/ToolbarTrigger.js.map +1 -1
  241. package/dist/esm/plugins/toolbar/index.js.map +1 -1
  242. package/dist/esm/plugins/virtualization/AutoHeightList.js.map +1 -1
  243. package/dist/esm/plugins/virtualization/VirtualizationPlugin.js.map +1 -1
  244. package/dist/esm/plugins/virtualization/VirtualizedBody.js.map +1 -1
  245. package/dist/esm/plugins/virtualization/VirtualizedBodyRow.js.map +1 -1
  246. package/dist/esm/plugins/virtualization/helper.js.map +1 -1
  247. package/dist/esm/plugins/virtualization/index.js.map +1 -1
  248. package/dist/esm/renders/CellWithAddons.js.map +1 -1
  249. package/dist/esm/renders/index.js.map +1 -1
  250. package/dist/esm/renders/styled.js.map +1 -1
  251. package/dist/esm/rowSizes.js.map +1 -1
  252. package/dist/esm/utilities/getPluginsFromProps.js.map +1 -1
  253. package/dist/esm/utilities/getScrollbarSize.js.map +1 -1
  254. package/dist/esm/utilities/normalizeData.js.map +1 -1
  255. package/dist/types/blockNames.d.ts +2 -2
  256. package/dist/types/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.d.ts +1 -0
  257. package/package.json +25 -26
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/TextFilterMenu.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/TextFilterMenu.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { compact } from 'lodash';\nimport { DSDropdownMenu } from '@elliemae/ds-dropdownmenu';\nimport { DSButton } from '@elliemae/ds-button';\nimport { PopperPositions as Position } from '@elliemae/ds-popper';\nimport { Menu, MenuCombobox } from '@elliemae/ds-menu';\nimport { SearchSmall } from '@elliemae/ds-icons';\n\nconst TextFilterMenu = ({\n column,\n menuStyle = {},\n className,\n filters = [],\n isMenuOpened = false,\n onOpenMenu = () => null,\n onClose = () => null,\n placement = Position.BOTTOM_END,\n menuProps = {},\n onAddFilter = () => null,\n onRemoveFilter = () => null,\n maxOptions = 10,\n isMulti = false,\n}) => {\n const { options, ...otherMenuProps } = menuProps;\n\n const generateOption = (option, idx) => <Menu.ItemCheckbox key={idx} label={option.label} name={option.id} />;\n\n const renderOptions = (arr) => arr.map(generateOption);\n\n const filtersForColumn = filters.filter((f) => f.group === column.property);\n\n const initialSelectedOptions = filtersForColumn.map((f) => f.value);\n\n const [selected, setSelected] = useState(initialSelectedOptions);\n\n React.useEffect(() => {\n const filtersForColumn2 = filters.filter((f) => f.group === column.property);\n setSelected(filtersForColumn2.map((f) => f.value));\n }, [filters]);\n\n const filterGroup = column.searchBy || column.property;\n\n const onCloseMulti = () => {\n let nextFilters = [...filters];\n const shouldRemove = [];\n // if selected doesn't includes item, then we have to remove the filter\n // but given that we are maintaining state here and updating the grid state\n // is not implemented on useFilterableState, we have to do this in 2 traverses\n // as doing it in one gives trouble when removing and adding at the same time.\n initialSelectedOptions.forEach((item) => {\n if (!selected.includes(item)) {\n nextFilters = nextFilters.filter((filter) => !(filter.group === filterGroup && filter.value === item));\n shouldRemove.push({ group: filterGroup, pill: { value: item } });\n }\n });\n shouldRemove.forEach((removedFilter) => {\n onRemoveFilter({\n ...removedFilter,\n nextFilters,\n });\n });\n selected.forEach((item) => {\n // if initialSelectedOptions includes item, then we do nothing\n if (!initialSelectedOptions.includes(item)) {\n onAddFilter(\n {\n group: filterGroup,\n label: column.label,\n value: item,\n operator: column?.filter?.operator || 'contains',\n transformRowValue: column.valueTransformation,\n },\n column,\n );\n }\n });\n onClose();\n };\n\n return (\n <DSDropdownMenu\n closeMenuOnItemSelection\n contentStyle={menuStyle}\n customMenu={\n isMulti ? (\n <Menu containerProps={{ id: 'text-filter-menu-multiple' }} className=\"dg-multiple-filter\" visible>\n <Menu.SelectionGroup\n active={selected}\n onSelect={(newValues) => {\n setSelected(newValues);\n }}\n focusOnOpen\n multi\n searchable\n >\n {renderOptions(options)}\n </Menu.SelectionGroup>\n </Menu>\n ) : (\n <MenuCombobox\n {...otherMenuProps}\n className={className}\n dropdownFilterOptions={{\n ...column.dropdownFilterOptions,\n maxOptions,\n }}\n maxWidth={column.filterMenuMaxWidth}\n minWidth={column.filterMenuMinWidth}\n onSelectMenuItem={(selectedValue) => {\n if (selectedValue) {\n onAddFilter(\n {\n group: column.searchBy || column.property,\n label: column.label,\n value: selectedValue,\n operator: column?.filter?.operator || 'contains',\n transformRowValue: column.valueTransformation,\n },\n column,\n );\n onOpenMenu(false);\n }\n }}\n />\n )\n }\n isOpen={isMenuOpened}\n maxWidth={column.filterMenuMaxWidth}\n menuProps={menuProps}\n minWidth={column.filterMenuMinWidth}\n onOpenMenu={onOpenMenu}\n onClose={isMulti ? onCloseMulti : onClose}\n options={compact(options)}\n placement={placement}\n triggerComponent={\n <DSButton\n buttonType=\"text\"\n icon={<SearchSmall />}\n onClick={() => (isMenuOpened ? onOpenMenu(false) : onOpenMenu(true))}\n size=\"s\"\n />\n }\n />\n );\n};\n\nTextFilterMenu.propTypes = {\n column: PropTypes.any,\n menuStyle: PropTypes.shape({}),\n className: PropTypes.string,\n filters: PropTypes.arrayOf(PropTypes.shape({})),\n isMenuOpened: PropTypes.bool,\n onOpenMenu: PropTypes.func,\n onClose: PropTypes.func,\n placement: PropTypes.string,\n menuProps: PropTypes.shape({}),\n onAddFilter: PropTypes.func,\n onRemoveFilter: PropTypes.func,\n maxOptions: PropTypes.number,\n isMulti: PropTypes.bool,\n};\n\nexport { TextFilterMenu };\nexport default TextFilterMenu;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2BmB;AA1B1C,mBAAgC;AAChC,wBAAsB;AACtB,oBAAwB;AACxB,6BAA+B;AAC/B,uBAAyB;AACzB,uBAA4C;AAC5C,qBAAmC;AACnC,sBAA4B;AAE5B,MAAM,iBAAiB,CAAC;AAAA,EACtB;AAAA,EACA,YAAY,CAAC;AAAA,EACb;AAAA,EACA,UAAU,CAAC;AAAA,EACX,eAAe;AAAA,EACf,aAAa,MAAM;AAAA,EACnB,UAAU,MAAM;AAAA,EAChB,YAAY,iBAAAA,gBAAS;AAAA,EACrB,YAAY,CAAC;AAAA,EACb,cAAc,MAAM;AAAA,EACpB,iBAAiB,MAAM;AAAA,EACvB,aAAa;AAAA,EACb,UAAU;AACZ,MAAM;AACJ,QAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AAEvC,QAAM,iBAAiB,CAAC,QAAQ,QAAQ,4CAAC,oBAAK,cAAL,EAA4B,OAAO,OAAO,OAAO,MAAM,OAAO,MAAvC,GAA2C;AAE3G,QAAM,gBAAgB,CAAC,QAAQ,IAAI,IAAI,cAAc;AAErD,QAAM,mBAAmB,QAAQ,OAAO,CAAC,MAAM,EAAE,UAAU,OAAO,QAAQ;AAE1E,QAAM,yBAAyB,iBAAiB,IAAI,CAAC,MAAM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AM,CAAC,CAAC,CAAC;AAAA,EAC9C,cAAc,kBAAAA,QAAU;AAAA,EACxB,YAAY,kBAAAA,QAAU;AAAA,EACtB,SAAS,kBAAAA,QAAU;AAAA,EACnB,WAAW,kBAAAA,QAAU;AAAA,EACrB,WAAW,kBAAAA,QAAU,MAAM,CAAC,CAAC;AAAA,EAC7B,aAAa,kBAAAA,QAAU;AAAA,EACvB,gBAAgB,kBAAAA,QAAU;AAAA,EAC1B,YAAY,kBAAAA,QAAU;AAAA,EACtB,SAAS,kBAAAA,QAAU;AACrB;AAGA,IAAO,yBAAQ;",
6
6
  "names": ["Position", "React", "PropTypes"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/defaultDateFormat.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/defaultDateFormat.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const DEFAULT_DATE_FORMAT = 'MM/DD/YYYY';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,sBAAsB;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/getFilterMenuByType.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../../src/plugins/filterable/components/filterable-menus/getFilterMenuByType.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { DateRangeFilterMenu } from './DateRangeFilterMenu.js';\nimport { SingleDateFilterMenu } from './SingleDateFilterMenu.js'; // implement\nimport { SingleRangeSwitcherMenu } from './SingleRangeSwitcherMenu.js'; // implement\nimport { TextFilterMenu } from './TextFilterMenu.js';\n\nconst ComponentTypes = {\n 'date-range': DateRangeFilterMenu,\n 'single-date': SingleDateFilterMenu,\n 'date-switcher': SingleRangeSwitcherMenu,\n string: TextFilterMenu,\n};\n\nexport const getFilterMenuByType = (type) => ComponentTypes[type] || ComponentTypes.string;\n\nexport default getFilterMenuByType;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAAoC;AACpC,kCAAqC;AACrC,qCAAwC;AACxC,4BAA+B;AAE/B,MAAM,iBAAiB;AAAA,EACrB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,QAAQ;AACV;AAEO,MAAM,sBAAsB,CAAC,SAAS,eAAe,IAAI,KAAK,eAAe;AAEpF,IAAO,8BAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/filterable/filterableFormatter.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/filterable/filterableFormatter.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/display-name */\nimport React from 'react';\nimport { FilterableHeader } from './components/FilterableHeader.js';\nimport { getFilterLabels, getFilterLabelsGroup } from './helper.js';\n\nconst FilterableFormatter = ({ grid, onAddFilter, onRemoveFilter, query, filterMenuRef }) =>\n function (value, { column }) {\n const {\n rows,\n composedRows,\n props: { groupedRows, groupedBy, onFilterMenuClose, onFilterMenuOpen },\n state: { filters },\n } = grid.getInstance();\n\n let rowsToUse = composedRows;\n if (column.filter && column.filter.isMulti) {\n rowsToUse = rows;\n }\n\n const filteredLabels =\n groupedRows && !groupedBy\n ? getFilterLabelsGroup(column, rows, query)\n : getFilterLabels(column, rowsToUse.rows || rowsToUse, query);\n\n const columnData = column.filterOptions || filteredLabels;\n return (\n <FilterableHeader\n column={column}\n columnData={columnData}\n filters={filters}\n filterMenuRef={filterMenuRef}\n onAddFilter={onAddFilter}\n onFilterMenuClose={onFilterMenuClose}\n onFilterMenuOpen={onFilterMenuOpen}\n onRemoveFilter={onRemoveFilter}\n isMulti={column.filter && column.filter.isMulti}\n value={value}\n />\n );\n };\n\nexport { FilterableFormatter };\nexport default FilterableFormatter;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BjB;AAxBN,8BAAiC;AACjC,oBAAsD;AAEtD,MAAM,sBAAsB,CAAC,EAAE,MAAM,aAAa,gBAAgB,OAAO,cAAc,MACrF,SAAU,OAAO,EAAE,OAAO,GAAG;AAC3B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO,EAAE,aAAa,WAAW,mBAAmB,iBAAiB;AAAA,IACrE,OAAO,EAAE,QAAQ;AAAA,EACnB,IAAI,KAAK,YAAY;AAErB,MAAI,YAAY;AAChB,MAAI,OAAO,UAAU,OAAO,OAAO,SAAS;AAC1C,gBAAY;AAAA,EACd;AAEA,QAAM,iBACJ,eAAe,CAAC,gBACZ,oCAAqB,QAAQ,MAAM,KAAK,QACxC,+BAAgB,QAAQ,UAAU,QAAQ,WAAW,KAAK;AAEhE,QAAM,aAAa,OAAO,iBAAiB;AAC3C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,OAAO,UAAU,OAAO,OAAO;AAAA,MACxC;AAAA;AAAA,EACF;AAEJ;AAGF,IAAO,8BAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/filterable/filtering-helper/filterRowsByQuery.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/filterable/filtering-helper/filterRowsByQuery.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { isFunction } from '@elliemae/ds-utilities';\nimport { strategiesOperators } from './strategiesOperators.js';\n\nconst getRuleStrategyOperator = (rule) => rule.strategy || strategiesOperators(rule.operator);\n\nconst executeFilterStrategy = (rule, row) => {\n const { value, field, transform, transformRowValue } = rule;\n if (field === 'all') return Object.values(row).some((colValue) => strategiesOperators('contains')(colValue, value));\n const rowValue = row[field];\n const transformedValue = isFunction(transform) ? transform(value) : value;\n const transformedRowValue = isFunction(transformRowValue) ? transformRowValue(rowValue) : rowValue;\n\n const filterStrategy = getRuleStrategyOperator(rule);\n return filterStrategy(transformedRowValue, transformedValue);\n};\n\nconst filterByRules =\n (rules, condition = 'AND') =>\n (row) =>\n condition === 'AND'\n ? rules.reduce(\n (isFiltered, rule) =>\n rule.rules && rule.rules.length\n ? isFiltered && filterByRules(rule.rules, rule.condition)(row)\n : isFiltered && executeFilterStrategy(rule, row),\n true,\n )\n : rules.some((rule) =>\n rule.rules && rule.rules.length\n ? filterByRules(rule.rules, rule.condition)(row)\n : executeFilterStrategy(rule, row),\n );\n\nexport function filterRowsByQueryGroup(rows, query, composedRows) {\n if (query && query.rules && query.rules.length === 0) return rows;\n const newRows = [];\n const parentMap = {};\n composedRows.forEach((parentRow) => {\n if (parentRow.isGroup) {\n newRows.push({\n ...parentRow,\n _filtered: true,\n });\n } else if (!parentRow.isGroup && filterByRules(query.rules, query.condition)(parentRow.data)) {\n newRows.push({\n ...parentRow,\n _filtered: true,\n });\n parentMap[parentRow.parentNode.id] = true;\n }\n });\n\n return newRows.filter((r) => {\n if (r.isGroup && !parentMap[r.id]) return false;\n return true;\n });\n}\n\nexport const filterRowsByQuery = (rows, query) => rows.filter(filterByRules(query.rules, query.condition));\n\nexport default filterRowsByQuery;\n", "import * as React from 'react';\nexport { React };\n"],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A,QACX,GAAG;AAAA,QACH,WAAW;AAAA,MACb,CAAC;AAAA,IACH,WAAW,CAAC,UAAU,WAAW,cAAc,MAAM,OAAO,MAAM,SAAS,EAAE,UAAU,IAAI,GAAG;AAC5F,cAAQ,KAAK;AAAA,QACX,GAAG;AAAA,QACH,WAAW;AAAA,MACb,CAAC;AACD,gBAAU,UAAU,WAAW,EAAE,IAAI;AAAA,IACvC;AAAA,EACF,CAAC;AAED,SAAO,QAAQ,OAAO,CAAC,MAAM;AAC3B,QAAI,EAAE,WAAW,CAAC,UAAU,EAAE,EAAE;AAAG,aAAO;AAC1C,WAAO;AAAA,EACT,CAAC;AACH;AAEO,MAAM,oBAAoB,CAAC,MAAM,UAAU,KAAK,OAAO,cAAc,MAAM,OAAO,MAAM,SAAS,CAAC;AAEzG,IAAO,4BAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/filterable/filtering-helper/strategiesOperators.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/filterable/filtering-helper/strategiesOperators.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import compare from 'comparejs';\n\nexport const strategiesOperators = (op) =>\n ({\n range: (rowValue, { start, end }) => start <= rowValue && end >= rowValue,\n equal: (value1, value2) => compare.id(value1, value2),\n greaterThan: compare.gt,\n lessThan: compare.lt,\n contains: (rowValue, value) => String(rowValue).toLowerCase().indexOf(String(value).toLowerCase()) !== -1,\n }[op] || compare.id);\n\nexport default strategiesOperators;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAoB;AAEb,MAAM,sBAAsB,CAAC,QACjC;AAAA,EACC,OAAO,CAAC,UAAU,EAAE,OAAO,IAAI,MAAM,SAAS,YAAY,OAAO;AAAA,EACjE,OAAO,CAAC,QAAQ,WAAW,iBAAAA,QAAQ,GAAG,QAAQ,MAAM;AAAA,EACpD,aAAa,iBAAAA,QAAQ;AAAA,EACrB,UAAU,iBAAAA,QAAQ;AAAA,EAClB,UAAU,CAAC,UAAU,UAAU,OAAO,QAAQ,EAAE,YAAY,EAAE,QAAQ,OAAO,KAAK,EAAE,YAAY,CAAC,MAAM;AACzG,GAAE,EAAE,KAAK,iBAAAA,QAAQ;AAEnB,IAAO,8BAAQ;",
6
6
  "names": ["compare"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/filterable/helper.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/filterable/helper.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { isFunction, uniqBy, get, groupBy, property } from '@elliemae/ds-utilities';\n\nexport const getFilterLabel = (column, value) => (column.filterLabels ? column.filterLabels[value] || value : value);\n\nexport const getFilterLabels = (column, rows) =>\n uniqBy(rows, property(column.searchBy || column.property))\n .map((row) => {\n const value = get(row, column.searchBy || column.property);\n if (value === undefined) return {};\n const rowColumnValue = String(get(row, column.searchBy || column.property));\n if (isFunction(column.valueTransformation)) {\n const nextValue = column.valueTransformation(rowColumnValue);\n return { id: nextValue, label: nextValue };\n }\n const label = getFilterLabel(column, rowColumnValue);\n return { id: rowColumnValue || label, label };\n })\n .filter((row) => row.id)\n .filter((row) => {\n if (row.id.startsWith) return !row.id.startsWith('grouped-by');\n return true;\n });\n\nexport const getFilterLabelsGroup = (column, rows) => {\n let flat = [];\n rows.forEach((r) => {\n if (r.children) {\n flat = [...flat, ...r.children];\n }\n });\n return getFilterLabels(column, flat);\n};\n\nexport function getFilterValue(filter, column) {\n const { value } = filter;\n\n if (!column) return value;\n\n const { filterOptions, filterLabels } = column;\n\n if (filterOptions) {\n const foundOption = column.filterOptions.filter((option) => option.id === value)[0];\n if (foundOption) return foundOption.label;\n return value;\n }\n if (filterLabels) {\n return filterLabels[value];\n }\n\n return value;\n}\n\nexport function buildFilterArray(newFilter, filters) {\n // if (newFilter.type && newFilter.type === 'date') return [...filters.slice(1), newFilter]\n return uniqBy([...filters, newFilter], (v) => [v.group, v.value].join());\n}\n\nexport const groupFilters = (filters) => filters.filter((filter) => !filter.fixed);\n\nfunction parseFilterToRule(filter) {\n return {\n ...filter,\n value: filter.filterParams || filter.value,\n field: filter.group,\n };\n}\n\nexport function parseFiltersToQuery(filters) {\n const groupedFilters = groupBy(groupFilters(filters), (filter) => filter.group);\n return Object.keys(groupedFilters).reduce(\n (queryResult, field) => {\n const filter = groupedFilters[field];\n if (Array.isArray(filter) && filter.length > 1) {\n // create query group with 'OR' condition\n queryResult.rules.push({\n condition: 'OR',\n rules: filter.map(parseFilterToRule),\n });\n } else {\n queryResult.rules.push(parseFilterToRule(filter[0]));\n }\n return queryResult;\n },\n { condition: 'AND', rules: [] },\n );\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA2D;AAEpD,MAAM,iBAAiB,CAAC,QAAQ,UAAW,OAAO,eAAe,OAAO,aAAa,KAAK,KAAK,QAAQ;AAEvG,MAAM,kBAAkB,CAAC,QAAQ,aACtC,4BAAO,UAAM,8BAAS,OAAO,YAAY,OAAO,QAAQ,CAAC,EACtD,IAAI,CAAC,QAAQ;AACZ,QAAM,YAAQ,yBAAI,KAAK,OAAO,YAAY,OAAO,QAAQ;AACzD,MAAI,UAAU;AAAW,WAAO,CAAC;AACjC,QAAM,iBAAiB,WAAO,yBAAI,KAAK,OAAO,YAAY,OAAO,QAAQ,CAAC;AAC1E,UAAI,gCAAW,OAAO,mBAAmB,GAAG;AAC1C,UAAM,YAAY,OAAO,oBAAoB,cAAc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AAAA,EAChB;AACF;AAEO,SAAS,oBAAoB,SAAS;AAC3C,QAAM,qBAAiB,6BAAQ,aAAa,OAAO,GAAG,CAAC,WAAW,OAAO,KAAK;AAC9E,SAAO,OAAO,KAAK,cAAc,EAAE;AAAA,IACjC,CAAC,aAAa,UAAU;AACtB,YAAM,SAAS,eAAe,KAAK;AACnC,UAAI,MAAM,QAAQ,MAAM,KAAK,OAAO,SAAS,GAAG;AAE9C,oBAAY,MAAM,KAAK;AAAA,UACrB,WAAW;AAAA,UACX,OAAO,OAAO,IAAI,iBAAiB;AAAA,QACrC,CAAC;AAAA,MACH,OAAO;AACL,oBAAY,MAAM,KAAK,kBAAkB,OAAO,CAAC,CAAC,CAAC;AAAA,MACrD;AACA,aAAO;AAAA,IACT;AAAA,IACA,EAAE,WAAW,OAAO,OAAO,CAAC,EAAE;AAAA,EAChC;AACF;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/filterable/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/filterable/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { FilterablePlugin } from './FilterablePlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/filterable/useFilterableState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/filterable/useFilterableState.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useMemo, useState, useEffect } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { buildFilterArray, getFilterValue, parseFiltersToQuery } from './helper.js';\n\nconst noop = () => null;\n\nexport function useFilterableState(grid) {\n const {\n filters: filtersProp,\n onAddFilter = noop,\n onRemoveFilter = noop,\n onRemoveAllFilters = noop,\n onFiltersChange = noop,\n } = grid.props;\n\n const [filters, setFilters] = useState(filtersProp || []);\n\n useEffect(() => {\n if (filtersProp && filtersProp !== filters) {\n setFilters(filtersProp);\n }\n }, [filtersProp]);\n\n const queryFromFilters = useMemo(() => parseFiltersToQuery(filters || []), [filters]);\n\n const handleFiltersChange = (nextFilters) => {\n const {\n refs: { body },\n } = grid.getInstance();\n body.current.scrollTop = 0;\n setFilters(nextFilters);\n grid.observeRows((rows) => onFiltersChange(nextFilters, queryFromFilters, rows));\n };\n\n const addFilter = (filter, column) => {\n let hasBeenCalled = false;\n const trimmedFilter = {\n ...filter,\n value: String(filter.value).trim(),\n };\n /* eslint-disable indent */\n const parsedFilter = !filter.group\n ? {\n ...trimmedFilter,\n value: String(filter.value).trim(),\n group: 'all',\n label: 'All',\n id: uuidv4(),\n }\n : {\n ...trimmedFilter,\n value: String(filter.value).trim(),\n id: uuidv4(),\n label: (column && column.filterLabel) || trimmedFilter.label,\n originalProperty: column.originalProperty || column.property,\n customValue: getFilterValue(trimmedFilter, column),\n };\n /* eslint-enable indent */\n setFilters((prevFilters) => {\n // This was setted for an issue that was recalling this function on the handleFiltersChange\n if (hasBeenCalled) {\n return;\n }\n hasBeenCalled = true;\n\n const nextFilters = buildFilterArray(parsedFilter, prevFilters);\n handleFiltersChange(nextFilters, true);\n onAddFilter(parsedFilter, nextFilters, column);\n });\n };\n\n const removeFilter = ({ group, pill, nextFilters }) => {\n onRemoveFilter(group, pill.value, nextFilters);\n handleFiltersChange(nextFilters);\n };\n\n const removeAllFilters = () => {\n onRemoveAllFilters();\n handleFiltersChange([]);\n };\n return {\n actions: {\n addFilter,\n removeFilter,\n removeAllFilters,\n },\n state: {\n query: queryFromFilters,\n filters,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;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A,MACX,OAAQ,UAAU,OAAO,eAAgB,cAAc;AAAA,MACvD,kBAAkB,OAAO,oBAAoB,OAAO;AAAA,MACpD,iBAAa,8BAAe,eAAe,MAAM;AAAA,IACnD;AAEJ,eAAW,CAAC,gBAAgB;AAE1B,UAAI,eAAe;AACjB;AAAA,MACF;AACA,sBAAgB;AAEhB,YAAM,kBAAc,gCAAiB,cAAc,WAAW;AAC9D,0BAAoB,aAAa,IAAI;AACrC,kBAAY,cAAc,aAAa,MAAM;AAAA,IAC/C,CAAC;AAAA,EACH;AAEA,QAAM,eAAe,CAAC,EAAE,OAAO,MAAM,YAAY,MAAM;AACrD,mBAAe,OAAO,KAAK,OAAO,WAAW;AAC7C,wBAAoB,WAAW;AAAA,EACjC;AAEA,QAAM,mBAAmB,MAAM;AAC7B,uBAAmB;AACnB,wBAAoB,CAAC,CAAC;AAAA,EACxB;AACA,SAAO;AAAA,IACL,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": ["uuidv4"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/grouping-by/GroupingByPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/grouping-by/GroupingByPlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { createInstancePlugin } from '@elliemae/ds-shared';\nimport { groupBy } from 'lodash';\n\nconst groupedByData = (groupedBy, composedRows) => {\n const grouped = groupBy(composedRows, groupedBy);\n return Object.keys(grouped).map((c, key) => ({\n id: `grouped-by-${groupedBy}-${key}`,\n key: groupedBy,\n value: c,\n children: grouped[c],\n _isGroup: true,\n isGroup: true,\n }));\n};\n\nexport const GroupingByPlugin = createInstancePlugin('groupedByRows', {\n decorateGrid(grid) {\n const {\n composedRows,\n props: { groupedBy },\n } = grid.getInstance();\n grid.composedRows = groupedBy ? groupedByData(groupedBy, composedRows) : composedRows;\n return grid;\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAqC;AACrC,oBAAwB;AAExB,MAAM,gBAAgB,CAAC,WAAW,iBAAiB;AACjD,QAAM,cAAU,uBAAQ,cAAc,SAAS;AAC/C,SAAO,OAAO,KAAK,OAAO,EAAE,IAAI,CAAC,GAAG,SAAS;AAAA,IAC3C,IAAI,cAAc,aAAa;AAAA,IAC/B,KAAK;AAAA,IACL,OAAO;AAAA,IACP,UAAU,QAAQ,CAAC;AAAA,IACnB,UAAU;AAAA,IACV,SAAS;AAAA,EACX,EAAE;AACJ;AAEO,MAAM,uBAAmB,uCAAqB,iBAAiB;AAAA,EACpE,aAAa,MAAM;AACjB,UAAM;AAAA,MACJ;AAAA,MACA,OAAO,EAAE,UAAU;AAAA,IACrB,IAAI,KAAK,YAAY;AACrB,SAAK,eAAe,YAAY,cAAc,WAAW,YAAY,IAAI;AACzE,WAAO;AAAA,EACT;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/grouping-grid/GroupingPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/grouping-grid/GroupingPlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable no-underscore-dangle */\nimport React, { useMemo } from 'react';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { VariableSizeList } from 'react-window';\nimport { walkTreeStrategy } from './walkStrategy.js';\nimport { RowSizes } from '../../rowSizes.js';\nimport { dataGridBlockName } from '../../blockNames.js';\n\nconst blockName = `${dataGridBlockName}-group-row-header`;\nconst GroupRowHeaderWrapper = aggregatedClasses('div')(blockName);\nconst GroupRowHeaderTitle = aggregatedClasses('div')(blockName, 'title');\n\nexport const GroupingPlugin = createInstancePlugin('groupedRows', {\n decorateGrid(grid) {\n const { columns, composedRows } = grid.getInstance();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const detailColumns = useMemo(\n () =>\n columns\n .map((column) => ({\n ...column,\n customRenderer: column.detailCustomRenderer,\n }))\n .filter((col) => !col.expandableColumn),\n [columns],\n );\n const flatRows = [];\n walkTreeStrategy({\n data: composedRows,\n cb: (n) => flatRows.push(n),\n });\n return {\n detailColumns,\n composedRows: flatRows,\n };\n },\n getBodyProps(bodyProps, grid) {\n const { composedRows: rows } = grid.getInstance();\n // implementation of expandable row single column with aggregation\n const getItemSize = (index) => {\n const rowData = rows[index];\n if (!rowData) return RowSizes.normal;\n return rowData._isGroup || rowData.isGroup ? RowSizes.compact : RowSizes.normal;\n };\n // eslint-disable-next-line no-unused-vars\n const getListHeight = () => {\n const size = rows.reduce((h, r) => {\n const rowHeight = r._isGroup || r.isGroup ? RowSizes.compact : RowSizes.normal;\n return h + rowHeight;\n }, 0);\n return size;\n };\n return {\n ...bodyProps,\n getListHeight,\n listComponent: VariableSizeList,\n listProps: { itemSize: getItemSize },\n };\n },\n composeRows: (rows, grid) => {\n const {\n composedRows,\n props: { rowKey },\n } = grid.getInstance();\n\n if (Array.isArray(rows)) {\n const filterIds = rows.map((r) => r.data[rowKey]);\n return composedRows\n .filter((c) => filterIds.includes(c.data[rowKey]))\n .map((r) => ({\n ...r.data,\n children: Array.isArray(r.data.children)\n ? r.data.children.filter((c) => filterIds.includes(c[rowKey]))\n : r.data.children,\n _isGroup: r.isGroup,\n }))\n .filter((g) => g.children === undefined || g.children.length > 0);\n }\n return {\n ...rows,\n allRows: rows.allRows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n rows: rows.rows.map((r) => ({\n ...r.data,\n _isGroup: r.isGroup,\n })),\n };\n },\n decorateRenderers(renderers, grid) {\n const Row = renderers.body.row;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n renderers.body.row = useMemo(\n () =>\n // eslint-disable-next-line react/display-name\n // eslint-disable-next-line react/prop-types\n function ({ isExpanded, ...rowProps }) {\n const { composedRows } = grid.getInstance();\n // // https://jira.elliemae.io/browse/PUI-1667\n const node = composedRows[rowProps.index] ? composedRows[rowProps.index] : rowProps.rowData;\n const { groupedRowsRenderHeader } = grid.props;\n // eslint-disable-next-line no-underscore-dangle\n if (node && node._isGroup) {\n return (\n <>\n <GroupRowHeaderWrapper {...rowProps}>\n <GroupRowHeaderTitle>\n {groupedRowsRenderHeader ? groupedRowsRenderHeader(node) : 'Group'}\n </GroupRowHeaderTitle>\n </GroupRowHeaderWrapper>\n </>\n );\n }\n return <Row {...rowProps} />;\n },\n [],\n );\n\n return renderers;\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2GT;AAzGd,mBAA+B;AAC/B,uBAAqC;AACrC,2BAAkC;AAClC,0BAAiC;AACjC,0BAAiC;AACjC,sBAAyB;AACzB,wBAAkC;AAElC,MAAM,YAAY,GAAG;AACrB,MAAM,4BAAwB,wCAAkB,KAAK,EAAE,SAAS;AAChE,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,OAAO;AAEhE,MAAM,qBAAiB,uCAAqB,eAAe;AAAA,EAChE,aAAa,MAAM;AACjB,UAAM,EAAE,SAAS,aAAa,IAAI,KAAK,YAAY;AAEnD,UAAM,oBAAgB;AAAA,MACpB,MACE,QACG,IAAI,CAAC,YAAY;AAAA,QAChB,GAAG;AAAA,QACH,gBAAgB,OAAO;AAAA,MACzB,EAAE,EACD,OAAO,CAAC,QAAQ,CAAC,IAAI,gBAAgB;AAAA,MAC1C,CAAC,OAAO;AA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,IAC3D,EAAE,KAAK;AAAA,QACX,UAAU,EAAE;AAAA,MACd,EAAE,EACD,OAAO,CAAC,MAAM,EAAE,aAAa,UAAa,EAAE,SAAS,SAAS,CAAC;AAAA,IACpE;AACA,WAAO;AAAA,MACL,GAAG;AAAA,MACH,SAAS,KAAK,QAAQ,IAAI,CAAC,OAAO;AAAA,QAChC,GAAG,EAAE;AAAA,QACL,UAAU,EAAE;AAAA,MACd,EAAE;AAAA,MACF,MAAM,KAAK,KAAK,IAAI,CAAC,OAAO;AAAA,QAC1B,GAAG,EAAE;AAAA,QACL,UAAU,EAAE;AAAA,MACd,EAAE;AAAA,IACJ;AAAA,EACF;AAAA,EACA,kBAAkB,WAAW,MAAM;AACjC,UAAM,MAAM,UAAU,KAAK;AAE3B,cAAU,KAAK,UAAM;AAAA,MACnB;AAAA;AAAA;AAAA,QAGE,SAAU,EAAE,YAAY,GAAG,SAAS,GAAG;AACrC,gBAAM,EAAE,aAAa,IAAI,KAAK,YAAY;AAE1C,gBAAM,OAAO,aAAa,SAAS,KAAK,IAAI,aAAa,SAAS,KAAK,IAAI,SAAS;AACpF,gBAAM,EAAE,wBAAwB,IAAI,KAAK;AAEzC,cAAI,QAAQ,KAAK,UAAU;AACzB,mBACE,2EACE,sDAAC,yBAAuB,GAAG,UACzB,sDAAC,uBACE,oCAA0B,wBAAwB,IAAI,IAAI,SAC7D,GACF,GACF;AAAA,UAEJ;AACA,iBAAO,4CAAC,OAAK,GAAG,UAAU;AAAA,QAC5B;AAAA;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO;AAAA,EACT;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/grouping-grid/walkStrategy.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/grouping-grid/walkStrategy.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["function getPath(parentNode, index, childrenKey) {\n if (!parentNode) return [index];\n return [...parentNode.path, childrenKey, index];\n}\n\nexport function walkTreeStrategy({\n data,\n childrenKey = 'children',\n level = 0,\n getId = (item) => item.id,\n parentNode,\n shouldWalkChildren = () => true,\n cb,\n}) {\n // eslint-disable-next-line no-loops/no-loops,no-plusplus\n for (let i = 0; i < data.length; i++) {\n const currLevel = level + 1;\n const children = data[i][childrenKey];\n const isGroup = children && !!children.length;\n const node = {\n index: i,\n id: getId(data[i]),\n data: data[i],\n path: getPath(parentNode, i, childrenKey),\n isGroup,\n nestingLevel: currLevel,\n parentNode: parentNode || {\n isGroup: true,\n data: { children: data },\n },\n };\n cb(node);\n if (shouldWalkChildren(node) && children && children.length) {\n walkTreeStrategy({\n data: children,\n level: currLevel,\n parentNode: node,\n shouldWalkChildren,\n cb,\n });\n }\n }\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,SAAS,QAAQ,YAAY,OAAO,aAAa;AAC/C,MAAI,CAAC;AAAY,WAAO,CAAC,KAAK;AAC9B,SAAO,CAAC,GAAG,WAAW,MAAM,aAAa,KAAK;AAChD;AAEO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ,CAAC,SAAS,KAAK;AAAA,EACvB;AAAA,EACA,qBAAqB,MAAM;AAAA,EAC3B;AACF,GAAG;AAED,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,YAAY,QAAQ;AAC1B,UAAM,WAAW,KAAK,CAAC,EAAE,WAAW;AACpC,UAAM,UAAU,YAAY,CAAC,CAAC,SAAS;AACvC,UAAM,OAAO;AAAA,MACX,OAAO;AAAA,MACP,IAAI,MAAM,KAAK,CAAC,CAAC;AAAA,MACjB,MAAM,KAAK,CAAC;AAAA,MACZ,MAAM,QAAQ,YAAY,GAAG,WAAW;AAAA,MACxC;AAAA,MACA,cAAc;AAAA,MACd,YAAY,cAAc;AAAA,QACxB,SAAS;AAAA,QACT,MAAM,EAAE,UAAU,KAAK;AAAA,MACzB;AAAA,IACF;AACA,OAAG,IAAI;AACP,QAAI,mBAAmB,IAAI,KAAK,YAAY,SAAS,QAAQ;AAC3D,uBAAiB;AAAA,QACf,MAAM;AAAA,QACN,OAAO;AAAA,QACP,YAAY;AAAA,QACZ;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/plugins/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../src/plugins/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { BodyHeaderScrollSyncPlugin } from './body-header-scroll-sync/index.js';\nexport { DndColumnsPlugin } from './column-dnd/index.js';\nexport { ColumnSizingPlugin } from './column-sizing/index.js';\nexport { CustomRendererPlugin } from './custom-cell-renderer/index.js';\nexport { EditablePlugin, ComboBox, TextBox } from './editable/index.js';\nexport { ExpandableColumn, ExpandablePlugin } from './expandable-grid/index.js';\nexport { FilterablePlugin } from './filterable/index.js';\nexport { InfiniteScrollPlugin } from './infinite-scrolling/index.js';\nexport { PaginationPlugin } from './pagination/index.js';\nexport { ResizablePlugin } from './resizable/index.js';\nexport { DndRowsPlugin } from './row-dnd/index.js';\nexport { SelectablePlugin } from './selectable/index.js';\nexport { SortablePlugin } from './sortable/index.js';\nexport { ToolbarPlugin } from './toolbar/index.js';\nexport { ExportDataPlugin } from './export-data/index.js';\nexport { VirtualizationPlugin } from './virtualization/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qCAA2C;AAC3C,wBAAiC;AACjC,2BAAmC;AACnC,kCAAqC;AACrC,sBAAkD;AAClD,6BAAmD;AACnD,wBAAiC;AACjC,gCAAqC;AACrC,wBAAiC;AACjC,uBAAgC;AAChC,qBAA8B;AAC9B,wBAAiC;AACjC,sBAA+B;AAC/B,qBAA8B;AAC9B,yBAAiC;AACjC,4BAAqC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/infinite-scrolling/InfiniteScrollPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/infinite-scrolling/InfiniteScrollPlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useRef, useEffect, useState } from 'react';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\n\n// TODO: EXPORT A SEPARATED INFINITE LOADER GRID\n\nconst registerStateHook = (grid) => {\n const {\n props: { getData, onInfiniteScrolling = () => null },\n actions: { updateRows },\n } = grid;\n\n const loading = useRef(false);\n\n const addMoreData = (data = []) => {\n loading.current = false;\n updateRows((prevRows) => prevRows.concat(data || []));\n };\n\n const doLoadData = async (currentRows) => {\n loading.current = true;\n return Promise.resolve(getData(currentRows)).then(addMoreData);\n };\n\n const loadMoreData = (currentRows) => {\n onInfiniteScrolling(currentRows);\n if (loading.current || !getData) return;\n doLoadData(currentRows);\n };\n\n return {\n actions: {\n loadMoreData,\n },\n };\n};\n\nconst getBodyProps = ({ children, ...props }, grid) => {\n const { loadMoreData } = grid.getInstance().actions;\n\n const [bodyNode, setBodyRef] = useState();\n const prevScroll = useRef();\n prevScroll.current = 0;\n\n const handleBodyScroll = (event, s) => {\n const { target } = event;\n const { scrollHeight, scrollTop, offsetHeight, scrollLeft } = target;\n const { composedRows } = grid.getInstance();\n // prevent horizontal scroll triggering infinite scrolling callbacks\n if (prevScroll.current !== scrollLeft) {\n prevScroll.current = scrollLeft;\n return;\n }\n // todo: clean this. Better approach using another component for the infinite scroll\n if (bodyNode !== target) return;\n if (scrollTop + offsetHeight >= scrollHeight - 1) {\n loadMoreData(composedRows);\n }\n };\n\n useEffect(() => {\n if (bodyNode) {\n bodyNode.addEventListener('scroll', handleBodyScroll);\n }\n return () => {\n if (bodyNode) {\n bodyNode.removeEventListener('scroll', handleBodyScroll);\n }\n };\n }, [bodyNode]);\n\n return {\n ...props,\n listProps: { outerRef: setBodyRef },\n };\n};\n\nexport const InfiniteScrollPlugin = createInstancePlugin('infinite-scroll', {\n registerStateHook,\n getBodyProps,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4C;AAC5C,uBAAqC;AAIrC,MAAM,oBAAoB,CAAC,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,SAAS,sBAAsB,MAAM,KAAK;AAAA,IACnD,SAAS,EAAE,WAAW;AAAA,EACxB,IAAI;AAEJ,QAAM,cAAU,qBAAO,KAAK;AAE5B,QAAM,cAAc,CAAC,OAAO,CAAC,MAAM;AACjC,YAAQ,UAAU;AAClB,eAAW,CAAC,aAAa,SAAS,OAAO,QAAQ,CAAC,CAAC,CAAC;AAAA,EACtD;AAEA,QAAM,aAAa,OAAO,gBAAgB;AACxC,YAAQ,UAAU;AAClB,WAAO,QAAQ,QAAQ,QAAQ,WAAW,CAAC,EAAE,KAAK,WAAW;AAAA,EAC/D;AAEA,QAAM,eAAe,CAAC,gBAAgB;AACpC,wBAAoB,WAAW;AAC/B,QAAI,QAAQ,WAAW,CAAC;AAAS;AACjC,eAAW,WAAW;AAAA,EACxB;AAEA,SAAO;AAAA,IACL,SAAS;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS;AACrD,QAAM,EAAE,aAAa,IAAI,KAAK,YAAY,EAAE;AAE5C,QAAM,CAAC,UAAU,UAAU,QAAI,uBAAS;AACxC,QAAM,iBAAa,qBAAO;AAC1B,aAAW,UAAU;AAErB,QAAM,mBAAmB,CAAC,OAAO,MAAM;AACrC,UAAM,EAAE,OAAO,IAAI;AACnB,UAAM,EAAE,cAAc,WAAW,cAAc,WAAW,IAAI;AAC9D,UAAM,EAAE,aAAa,IAAI,KAAK,YAAY;AAE1C,QAAI,WAAW,YAAY,YAAY;AACrC,iBAAW,UAAU;AACrB;AAAA,IACF;AAEA,QAAI,aAAa;AAAQ;AACzB,QAAI,YAAY,gBAAgB,eAAe,GAAG;AAChD,mBAAa,YAAY;AAAA,IAC3B;AAAA,EACF;AAEA,8BAAU,MAAM;AACd,QAAI,UAAU;AACZ,eAAS,iBAAiB,UAAU,gBAAgB;AAAA,IACtD;AACA,WAAO,MAAM;AACX,UAAI,UAAU;AACZ,iBAAS,oBAAoB,UAAU,gBAAgB;AAAA,MACzD;AAAA,IACF;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AAEb,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,EAAE,UAAU,WAAW;AAAA,EACpC;AACF;AAEO,MAAM,2BAAuB,uCAAqB,mBAAmB;AAAA,EAC1E;AAAA,EACA;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/infinite-scrolling/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/infinite-scrolling/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { InfiniteScrollPlugin } from './InfiniteScrollPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAqC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/pagination/PaginationPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/pagination/PaginationPlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/display-name */\nimport React, { useMemo } from 'react';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { createInstancePlugin, FocusGrid } from '@elliemae/ds-shared';\nimport { paginate } from './helper.js';\nimport { usePaginationState } from './usePaginationState.js';\nimport { NoResults } from '../../components/NoResults.js';\n\nconst composeRows = (rows, grid) => {\n const {\n state: { pagination },\n props: { groupedRows },\n } = grid.getInstance();\n if (groupedRows) return rows; // disable pagination with grouping\n if (groupedRows) {\n const filterIds = rows.map((r) => r.id);\n return paginate(\n rows\n .filter((c) => filterIds.includes(c.id))\n .map((r) => ({\n ...r,\n _isGroup: r.isGroup,\n })),\n pagination,\n );\n }\n\n return paginate(rows, pagination);\n};\n\nconst Body = React.memo(\n ({\n component: Component,\n rows,\n rowRenderer,\n noResultsPlaceholder,\n innerRef,\n innerBodyRef, // depends on body-header-scroll-sync\n isPlaceholderActive = false,\n ...otherBodyProps\n }) => (\n <Component {...otherBodyProps} innerRef={mergeRefs(innerRef)}>\n {!isPlaceholderActive ? (\n rows.map((row, index) => rowRenderer(row, { index, rowIndex: index }, {}))\n ) : (\n <NoResults innerRef={innerRef} rowRenderer={rowRenderer}>\n {noResultsPlaceholder}\n </NoResults>\n )}\n </Component>\n ),\n);\n\nconst decorateRenderers = (renderers, grid) => {\n const BodyWrapper = renderers.body.wrapper;\n renderers.body.wrapper = useMemo(\n () =>\n function (props) {\n const { hotKeys, shouldRefocus, state } = grid.getInstance();\n return (\n <FocusGrid hotKeys={hotKeys} shouldRefocus={false}>\n <Body {...props} component={BodyWrapper} />\n </FocusGrid>\n );\n },\n [],\n );\n return renderers;\n};\n\nexport const PaginationPlugin = createInstancePlugin('pagination', {\n registerStateHook: usePaginationState,\n decorateRenderers,\n composeRows,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6Cf;AA5CR,mBAA+B;AAC/B,0BAA0B;AAC1B,uBAAgD;AAChD,oBAAyB;AACzB,gCAAmC;AACnC,uBAA0B;AAE1B,MAAM,cAAc,CAAC,MAAM,SAAS;AAClC,QAAM;AAAA,IACJ,OAAO,EAAE,WAAW;AAAA,IACpB,OAAO,EAAE,YAAY;AAAA,EACvB,IAAI,KAAK,YAAY;AACrB,MAAI;AAAa,WAAO;AACxB,MAAI,aAAa;AACf,UAAM,YAAY,KAAK,IAAI,CAAC,MAAM,EAAE,EAAE;AACtC,eAAO;AAAA,MACL,KACG,OAAO,CAAC,MAAM,UAAU,SAAS,EAAE,EAAE,CAAC,EACtC,IAAI,CAAC,OAAO;AAAA,QACX,GAAG;AAAA,QACH,UAAU,EAAE;AAAA,MACd,EAAE;AAAA,MACJ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,wBAAS,MAAM,UAAU;AAClC;AAEA,MAAM,OAAO,aAAAA,QAAM;AAAA,EACjB,CAAC;AAAA,IACC,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IACA,sBAAsB;AAAA,IACtB,GAAG;AAAA,EACL,MACE,4CAAC,aAAW,GAAG,gBAAgB,cAAU,+BAAU,QAAQ,GACxD,WAAC,sBACA,KAAK,IAAI,CAAC,KAAK,UAAU,YAAY,KAAK,EAAE,OAAO,UAAU,MAAM,GAAG,CAAC,CAAC,CAAC,IAEzE,4CAAC,8BAAU,UAAoB,aAC5B,gCACH,GAEJ;AAEJ;AAEA,MAAM,oBAAoB,CAAC,WAAW,SAAS;AAC7C,QAAM,cAAc,UAAU,KAAK;AACnC,YAAU,KAAK,cAAU;AAAA,IACvB,MACE,SAAU,OAAO;AACf,YAAM,EAAE,SAAS,eAAe,MAAM,IAAI,KAAK,YAAY;AAC3D,aACE,4CAAC,8BAAU,SAAkB,eAAe,OAC1C,sDAAC,QAAM,GAAG,OAAO,WAAW,aAAa,GAC3C;AAAA,IAEJ;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT;AAEO,MAAM,uBAAmB,uCAAqB,cAAc;AAAA,EACjE,mBAAmB;AAAA,EACnB;AAAA,EACA;AACF,CAAC;",
6
6
  "names": ["React"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/pagination/components/Pagination.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/pagination/components/Pagination.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { Paginator } from './Paginator.js';\nimport { PerPageDropdown } from './PerPageDropdown.js';\n\nconst PaginationControls = aggregatedClasses('div')('data-grid', 'controls-pagination');\n\nconst Pagination = ({\n paginated,\n pagination = {},\n onPerPage,\n onPageSelect,\n paginationStep = 5,\n maxPerPage = 10,\n minPerPage = 5,\n}) => {\n const { perPage } = pagination;\n if (pagination && pagination.conditionalPagination === true && paginated.amount === 1) return null;\n return paginated.amount > 0 ? (\n <PaginationControls>\n <PerPageDropdown max={maxPerPage} min={minPerPage} onChange={onPerPage} step={paginationStep} value={perPage} />\n <Paginator onSelect={onPageSelect} pages={paginated.amount} pagination={pagination} />\n </PaginationControls>\n ) : null;\n};\n\nexport { Pagination };\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBnB;AAlBJ,2BAAkC;AAClC,uBAA0B;AAC1B,6BAAgC;AAEhC,MAAM,yBAAqB,wCAAkB,KAAK,EAAE,aAAa,qBAAqB;AAEtF,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA,aAAa,CAAC;AAAA,EACd;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AACf,MAAM;AACJ,QAAM,EAAE,QAAQ,IAAI;AACpB,MAAI,cAAc,WAAW,0BAA0B,QAAQ,UAAU,WAAW;AAAG,WAAO;AAC9F,SAAO,UAAU,SAAS,IACxB,6CAAC,sBACC;AAAA,gDAAC,0CAAgB,KAAK,YAAY,KAAK,YAAY,UAAU,WAAW,MAAM,gBAAgB,OAAO,SAAS;AAAA,IAC9G,4CAAC,8BAAU,UAAU,cAAc,OAAO,UAAU,QAAQ,YAAwB;AAAA,KACtF,IACE;AACN;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/pagination/components/Paginator.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/pagination/components/Paginator.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport React from 'react';\nimport { default as ReactPagify } from 'react-pagify';\nimport segmentize from 'segmentize';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst Comp = (ReactPagify as any)?.default ?? ReactPagify;\nconst blockName = 'data-grid';\nconst PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');\nconst PagifyContext = aggregatedClasses(Comp?.Context)(blockName, 'pagify-pagination');\n\nconst Paginator = ({ pagination, pages, onSelect, labelPrevious = 'Previous', labelNext = 'Next' }) => {\n const prevPage = pagination.page - 1;\n const nextPage = pagination.page + 1;\n\n return (\n <PaginationContainer>\n <PagifyContext\n onSelect={(page) => page !== pagination.page && onSelect(page)}\n segments={segmentize({\n page: pagination.page,\n pages,\n beginPages: 1,\n endPages: 1,\n sidePages: 1,\n })}\n >\n <Comp.Button className={pagination.page <= 1 ? 'button-disabled' : ''} page={prevPage}>\n {labelPrevious}\n </Comp.Button>\n\n <Comp.Segment field=\"beginPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"previousPages\" previousField=\"beginPages\" />\n\n <Comp.Segment field=\"previousPages\" />\n <Comp.Segment className=\"selected\" field=\"centerPage\" />\n <Comp.Segment field=\"nextPages\" />\n\n <Comp.Ellipsis className=\"ellipsis\" nextField=\"endPages\" previousField=\"nextPages\" />\n\n <Comp.Segment field=\"endPages\" />\n\n <Comp.Button className={pagination.page >= pages ? 'button-disabled' : ''} page={nextPage}>\n {labelNext}\n </Comp.Button>\n </PagifyContext>\n </PaginationContainer>\n );\n};\n\nexport { Paginator };\nexport default Paginator;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBjB;AAfN,0BAAuC;AACvC,wBAAuB;AACvB,2BAAkC;AAElC,MAAM,OAAQ,oBAAAA,SAAqB,WAAW,oBAAAA;AAC9C,MAAM,YAAY;AAClB,MAAM,0BAAsB,wCAAkB,KAAK,EAAE,WAAW,YAAY;AAC5E,MAAM,oBAAgB,wCAAkB,MAAM,OAAO,EAAE,WAAW,mBAAmB;AAErF,MAAM,YAAY,CAAC,EAAE,YAAY,OAAO,UAAU,gBAAgB,YAAY,YAAY,OAAO,MAAM;AACrG,QAAM,WAAW,WAAW,OAAO;AACnC,QAAM,WAAW,WAAW,OAAO;AAEnC,SACE,4CAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC,SAAS,SAAS,WAAW,QAAQ,SAAS,IAAI;AAAA,MAC7D,cAAU,kBAAAC,SAAW;AAAA,QACnB,MAAM,WAAW;AAAA,QACjB;AAAA,QACA,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,WAAW;AAAA,MACb,CAAC;AAAA,MAED;AAAA,oDAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,IAAI,oBAAoB,IAAI,MAAM,UAC1E,yBACH;AAAA,QAEA,4CAAC,KAAK,SAAL,EAAa,OAAM,cAAa;AAAA,QAEjC,4CAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,iBAAgB,eAAc,cAAa;AAAA,QAEzF,4CAAC,KAAK,SAAL,EAAa,OAAM,iBAAgB;AAAA,QACpC,4CAAC,KAAK,SAAL,EAAa,WAAU,YAAW,OAAM,cAAa;AAAA,QACtD,4CAAC,KAAK,SAAL,EAAa,OAAM,aAAY;AAAA,QAEhC,4CAAC,KAAK,UAAL,EAAc,WAAU,YAAW,WAAU,YAAW,eAAc,aAAY;AAAA,QAEnF,4CAAC,KAAK,SAAL,EAAa,OAAM,YAAW;AAAA,QAE/B,4CAAC,KAAK,QAAL,EAAY,WAAW,WAAW,QAAQ,QAAQ,oBAAoB,IAAI,MAAM,UAC9E,qBACH;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;AAGA,IAAO,oBAAQ;",
6
6
  "names": ["ReactPagify", "segmentize"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../../src/plugins/pagination/components/PerPageDropdown.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../../src/plugins/pagination/components/PerPageDropdown.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport memoize from 'memoize-one';\nimport { range } from '@elliemae/ds-utilities';\nimport { DSComboBox, components } from '@elliemae/ds-form';\n\nconst SingleValue = ({ children, ...props }) => (\n <components.SingleValue {...props}>\n {children} <span>per page</span>\n </components.SingleValue>\n);\n\nconst generateOption = (value) => ({\n value,\n label: value,\n});\nconst getOptions = memoize((step, min, max) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n});\n\nconst PerPageDropdown = ({ min = 0, max = 100, step = 5, value = 0, onChange = () => null }) => {\n const options = getOptions(step, min, max);\n return (\n <DSComboBox\n className=\"per-page-dropdown\"\n components={{\n SingleValue,\n }}\n containerProps={{\n 'data-testid': 'per-page-dropdown',\n }}\n maxOptions={10}\n onChange={onChange}\n options={options}\n searchable={false}\n value={value}\n />\n );\n};\n\nexport { PerPageDropdown };\nexport default PerPageDropdown;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADMrB;AALF,yBAAoB;AACpB,0BAAsB;AACtB,qBAAuC;AAEvC,MAAM,cAAc,CAAC,EAAE,UAAU,GAAG,MAAM,MACxC,6CAAC,0BAAW,aAAX,EAAwB,GAAG,OACzB;AAAA;AAAA,EAAS;AAAA,EAAC,4CAAC,UAAK,sBAAQ;AAAA,GAC3B;AAGF,MAAM,iBAAiB,CAAC,WAAW;AAAA,EACjC;AAAA,EACA,OAAO;AACT;AACA,MAAM,iBAAa,mBAAAA,SAAQ,CAAC,MAAM,KAAK,QAAQ;AAC7C,QAAM,cAAU,2BAAM,KAAK,MAAM,MAAM,IAAI,EAAE,IAAI,cAAc;AAC/D,SAAO,QAAQ,IAAI,QAAQ,MAAM,GAAG,QAAQ,MAAM,IAAI;AACxD,CAAC;AAED,MAAM,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,GAAG,QAAQ,GAAG,WAAW,MAAM,KAAK,MAAM;AAC9F,QAAM,UAAU,WAAW,MAAM,KAAK,GAAG;AACzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,YAAY;AAAA,QACV;AAAA,MACF;AAAA,MACA,gBAAgB;AAAA,QACd,eAAe;AAAA,MACjB;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ;AAAA;AAAA,EACF;AAEJ;AAGA,IAAO,0BAAQ;",
6
6
  "names": ["memoize"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/pagination/helper.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/pagination/helper.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const parsePerPageNumber = (number, max, min = 1) => {\n if (number > max) return max;\n if (number < min) return min;\n return number;\n};\n\nexport const paginate = (rows, { page, perPage = 1, amountOfPages: amount, totalRows }) => {\n // return if pagination state is controlled\n if (amount && totalRows) {\n return {\n amount,\n rows,\n page,\n };\n }\n // adapt to zero indexed logic\n const p = page - 1 || 0;\n\n const amountOfPages = perPage ? Math.ceil(rows.length / (perPage > 0 ? perPage : 1)) : 1;\n const startPage = p < amountOfPages ? p : 0;\n\n return {\n amount: amountOfPages,\n rows: perPage ? rows.slice(startPage * perPage, startPage * perPage + perPage) : rows,\n allRows: rows,\n page: startPage,\n };\n};\n\nexport default paginate;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,qBAAqB,CAAC,QAAQ,KAAK,MAAM,MAAM;AAC1D,MAAI,SAAS;AAAK,WAAO;AACzB,MAAI,SAAS;AAAK,WAAO;AACzB,SAAO;AACT;AAEO,MAAM,WAAW,CAAC,MAAM,EAAE,MAAM,UAAU,GAAG,eAAe,QAAQ,UAAU,MAAM;AAEzF,MAAI,UAAU,WAAW;AACvB,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,IAAI,OAAO,KAAK;AAEtB,QAAM,gBAAgB,UAAU,KAAK,KAAK,KAAK,UAAU,UAAU,IAAI,UAAU,EAAE,IAAI;AACvF,QAAM,YAAY,IAAI,gBAAgB,IAAI;AAE1C,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,MAAM,UAAU,KAAK,MAAM,YAAY,SAAS,YAAY,UAAU,OAAO,IAAI;AAAA,IACjF,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACF;AAEA,IAAO,iBAAQ;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/pagination/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/pagination/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { PaginationPlugin } from './PaginationPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/pagination/usePaginationState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/pagination/usePaginationState.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { parsePerPageNumber } from './helper.js';\n\nexport function usePaginationState(grid) {\n const {\n minPerPage = 0,\n maxPerPage = 50,\n onPerPageChange = () => null,\n onPageChange = () => null,\n pagination: paginationProp = {\n page: 1,\n perPage: 10,\n },\n groupedRows,\n } = grid.props;\n const { composedRows, rows } = grid.getInstance();\n const [pagination, setPagination] = useDerivedStateFromProps(paginationProp);\n\n const onPerPage = (perPageNumber) => {\n const parsedPerPageNumber = parsePerPageNumber(perPageNumber, maxPerPage, minPerPage);\n const actualNumber = parsedPerPageNumber ? parseInt(parsedPerPageNumber, 10) : 0;\n\n setPagination((prevPagination) => {\n onPerPageChange(actualNumber);\n return {\n page: prevPagination.page,\n perPage: actualNumber,\n };\n });\n };\n\n const onPageSelect = (page) => {\n const length = groupedRows ? composedRows.length : rows.length;\n setPagination((prevPagination) => {\n const pages = Math.ceil(length / prevPagination.perPage);\n onPageChange(page);\n return {\n ...prevPagination,\n page: Math.min(Math.max(page, 1), pages),\n };\n });\n };\n\n return {\n state: {\n pagination,\n },\n actions: {\n onPerPage,\n onPageSelect,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyC;AACzC,oBAAmC;AAE5B,SAAS,mBAAmB,MAAM;AACvC,QAAM;AAAA,IACJ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,kBAAkB,MAAM;AAAA,IACxB,eAAe,MAAM;AAAA,IACrB,YAAY,iBAAiB;AAAA,MAC3B,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA;AAAA,EACF,IAAI,KAAK;AACT,QAAM,EAAE,cAAc,KAAK,IAAI,KAAK,YAAY;AAChD,QAAM,CAAC,YAAY,aAAa,QAAI,8CAAyB,cAAc;AAE3E,QAAM,YAAY,CAAC,kBAAkB;AACnC,UAAM,0BAAsB,kCAAmB,eAAe,YAAY,UAAU;AACpF,UAAM,eAAe,sBAAsB,SAAS,qBAAqB,EAAE,IAAI;AAE/E,kBAAc,CAAC,mBAAmB;AAChC,sBAAgB,YAAY;AAC5B,aAAO;AAAA,QACL,MAAM,eAAe;AAAA,QACrB,SAAS;AAAA,MACX;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM,eAAe,CAAC,SAAS;AAC7B,UAAM,SAAS,cAAc,aAAa,SAAS,KAAK;AACxD,kBAAc,CAAC,mBAAmB;AAChC,YAAM,QAAQ,KAAK,KAAK,SAAS,eAAe,OAAO;AACvD,mBAAa,IAAI;AACjB,aAAO;AAAA,QACL,GAAG;AAAA,QACH,MAAM,KAAK,IAAI,KAAK,IAAI,MAAM,CAAC,GAAG,KAAK;AAAA,MACzC;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/resizable/ResizablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/resizable/ResizablePlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-statements */\nimport { runAll } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { addResizableToColumn, resizableFormatter } from './decorateResizable.js';\n\nconst noop = () => null;\n\nconst DELTA_LAST_COLUMN = 25;\n\n// eslint-disable-next-line no-unused-vars\nconst decorateColumn = (column, grid, index) => {\n const {\n onResizeEnd = noop,\n onResizeStart = noop,\n minColumnWidth = 90,\n isColumnResizeActive = (col) => col.resizable && !col.expandableColumn,\n onColumnResize,\n } = grid.props;\n\n const { decoratedColumns } = grid.getInstance();\n // need to do this because the decorated columns which the index in the function call\n // could be different from the final decorated columns because a plugin could add a\n // column afterwards\n const colIndex = decoratedColumns.findIndex((col) => col.property === column.property);\n const isLast = colIndex === decoratedColumns.length - 1;\n\n if (!isColumnResizeActive(column)) return column;\n return addResizableToColumn(\n column,\n resizableFormatter({\n onDragStart: () => {\n grid.isDragging.current = true;\n grid.disableEvents();\n onResizeStart();\n onColumnResize('onResizeStart', { column });\n },\n onDrag: (width, increasing) => {\n const { resizedColumns, refs } = grid.getInstance();\n if (isLast && increasing) {\n const thisCol = resizedColumns.current[column.uuid] || 0;\n width = Math.max(thisCol + DELTA_LAST_COLUMN, width);\n }\n column.updateBodyHeaderWidth(width, width);\n grid.updateRowWidth();\n if (isLast && increasing) {\n // TODO: Move this to packages/ds-shared/src/ScrollSync/ScrollSync.js\n // It isn't watching the scrollLeft so you have to move both at the same time\n refs.header.current.scrollLeft += DELTA_LAST_COLUMN;\n refs.body.current.scrollLeft += DELTA_LAST_COLUMN;\n }\n },\n onDragEnd: (width, increasing, extraData) => {\n const { resizedColumns } = grid.getInstance();\n if (isLast && increasing) {\n const thisCol = resizedColumns.current[column.uuid] || 0;\n width = Math.max(thisCol + DELTA_LAST_COLUMN, width);\n }\n resizedColumns.current[column.uuid] = width;\n\n grid.isDragging.current = false;\n grid.enableEvents();\n try {\n const total = grid.getInstance().refs.body.current.scrollWidth;\n const sum = Object.keys(grid.resizedColumns.current).reduce((p, n) => grid.resizedColumns.current[n] + p, 0);\n const lastKey = grid.decoratedColumns[grid.columns.length - 1].uuid;\n if (sum < total) {\n const lastCol = grid.getInstance().columnSizeService.columns[lastKey];\n lastCol.updateWidth(grid.resizedColumns.current[lastKey] + total - sum);\n lastCol.updateBodyHeaderWidth(grid.resizedColumns.current[lastKey] + total - sum);\n grid.getInstance().columnSizeService.updateMissingWidths(total);\n }\n } catch (error) {\n console.error(\n 'Unexpected error in the addResizableToColumn trying to use the remaining grid space to the last column',\n error,\n );\n }\n\n onColumnResize('onResizeEnd', {\n column,\n width,\n extraData,\n });\n runAll(onResizeEnd)(width, extraData);\n grid.updateRowWidth();\n },\n minWidth: (column.minWidth || minColumnWidth) - (isLast ? DELTA_LAST_COLUMN : 0),\n isLast,\n }),\n );\n};\n\nexport const ResizablePlugin = createInstancePlugin('resizable', {\n decorateColumn,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAuB;AACvB,u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AmB,KAAK;AAAA,QACrD;AACA,uBAAe,QAAQ,OAAO,IAAI,IAAI;AAEtC,aAAK,WAAW,UAAU;AAC1B,aAAK,aAAa;AAClB,YAAI;AACF,gBAAM,QAAQ,KAAK,YAAY,EAAE,KAAK,KAAK,QAAQ;AACnD,gBAAM,MAAM,OAAO,KAAK,KAAK,eAAe,OAAO,EAAE,OAAO,CAAC,GAAG,MAAM,KAAK,eAAe,QAAQ,CAAC,IAAI,GAAG,CAAC;AAC3G,gBAAM,UAAU,KAAK,iBAAiB,KAAK,QAAQ,SAAS,CAAC,EAAE;AAC/D,cAAI,MAAM,OAAO;AACf,kBAAM,UAAU,KAAK,YAAY,EAAE,kBAAkB,QAAQ,OAAO;AACpE,oBAAQ,YAAY,KAAK,eAAe,QAAQ,OAAO,IAAI,QAAQ,GAAG;AACtE,oBAAQ,sBAAsB,KAAK,eAAe,QAAQ,OAAO,IAAI,QAAQ,GAAG;AAChF,iBAAK,YAAY,EAAE,kBAAkB,oBAAoB,KAAK;AAAA,UAChE;AAAA,QACF,SAAS,OAAP;AACA,kBAAQ;AAAA,YACN;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAEA,uBAAe,eAAe;AAAA,UAC5B;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AACD,wCAAO,WAAW,EAAE,OAAO,SAAS;AACpC,aAAK,eAAe;AAAA,MACtB;AAAA,MACA,WAAW,OAAO,YAAY,mBAAmB,SAAS,oBAAoB;AAAA,MAC9E;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,MAAM,sBAAkB,uCAAqB,aAAa;AAAA,EAC/D;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/resizable/decorateResizable.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/resizable/decorateResizable.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport { appendHeaderFormatter } from '@elliemae/ds-shared';\nimport { useResizeHandle } from './useResizeHandle.js';\n\nconst addResizableToColumn = (column, formatter) => appendHeaderFormatter(formatter, column);\n\nconst ResizableWrapper = React.memo(({ value, onDrag, onDragEnd, onDragStart, minWidth, handleClassName }) => {\n const { containerRef, Handle } = useResizeHandle({\n onDrag,\n onDragEnd,\n onDragStart,\n minWidth,\n handleClassName,\n });\n return (\n <div ref={containerRef} className=\"resize-container\">\n {value}\n <Handle />\n </div>\n );\n});\n\n// eslint-disable-next-line react/display-name\nconst resizableFormatter = (options) =>\n function (value) {\n return <ResizableWrapper {...options} value={value} />;\n };\n\nexport { addResizableToColumn, resizableFormatter };\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADenB;AAfJ,mBAAkB;AAClB,uBAAsC;AACtC,6BAAgC;AAEhC,MAAM,uBAAuB,CAAC,QAAQ,kBAAc,wCAAsB,WAAW,MAAM;AAE3F,MAAM,mBAAmB,aAAAA,QAAM,KAAK,CAAC,EAAE,OAAO,QAAQ,WAAW,aAAa,UAAU,gBAAgB,MAAM;AAC5G,QAAM,EAAE,cAAc,OAAO,QAAI,wCAAgB;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SACE,6CAAC,SAAI,KAAK,cAAc,WAAU,oBAC/B;AAAA;AAAA,IACD,4CAAC,UAAO;AAAA,KACV;AAEJ,CAAC;AAGD,MAAM,qBAAqB,CAAC,YAC1B,SAAU,OAAO;AACf,SAAO,4CAAC,oBAAkB,GAAG,SAAS,OAAc;AACtD;",
6
6
  "names": ["React"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/resizable/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/resizable/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { ResizablePlugin } from './ResizablePlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAgC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/resizable/useResizeHandle.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/resizable/useResizeHandle.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React, { useCallback, useRef } from 'react';\n\nexport const useResizeHandle = ({ onDragStart, onDrag, onDragEnd, minWidth = 10, isLast = false }) => {\n const startX = useRef();\n const startWidth = useRef();\n const containerRef = useRef();\n\n const triggerMove = (handler, event) => {\n const increasing = startX.current - event.clientX < 0;\n handler(Math.max(startWidth.current - startX.current + event.clientX, minWidth), increasing, {});\n };\n\n const onMouseMove = (event) => {\n event.stopPropagation();\n event.preventDefault();\n\n triggerMove(onDrag, event);\n };\n\n const onMouseUp = (event) => {\n event.stopPropagation();\n event.preventDefault();\n\n triggerMove(onDragEnd, event);\n\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n\n const onMouseDown = (event) => {\n event.stopPropagation();\n event.preventDefault();\n\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n\n startX.current = event.clientX;\n startWidth.current = containerRef.current.offsetWidth;\n\n triggerMove(onDragStart, event);\n };\n\n const HandleComponent = ({ className = 'resize-handle' }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div className={className} onMouseDown={onMouseDown} />\n );\n\n return {\n containerRef,\n Handle: HandleComponent,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],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../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/resizable/utils.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { parseInt } from '@elliemae/ds-utilities';\nimport memoizeOne from 'memoize-one';\n\nexport const isPercentNumber = (stringNumber) => typeof stringNumber === 'string' && stringNumber.indexOf('%') !== -1;\nexport const isPxNumber = (stringNumber) => typeof stringNumber === 'string' && stringNumber.indexOf('px') !== -1;\n\nexport const translatePercentageToPx = memoizeOne((totalWidth, percentage, minWidth = 0) => {\n const parsedPercentatge = parseInt(percentage.replace('%', ''));\n const width = (totalWidth * parsedPercentatge) / 100;\n return width > minWidth ? width : minWidth;\n});\n\nconst translateStringPxToNumberPx = memoizeOne((pxNumber) => parseInt(pxNumber.replace('%', '')));\nconst translatePxToPercentage = memoizeOne((totalWidth, pxWidth) => `${(pxWidth / totalWidth) * 100}%`);\n\nconst getWidth = memoizeOne((gridWidth, width = 0, minWidth) => {\n if (isPercentNumber(width)) return translatePercentageToPx(gridWidth, width, minWidth);\n if (isPxNumber(width)) return translateStringPxToNumberPx(width);\n return width;\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyB;AACzB,yBAAuB;AAEhB,MAAM,kBAAkB,CAAC,iBAAiB,OAAO,iBAAiB,YAAY,aAAa,QAAQ,GAAG,MAAM;AAC5G,MAAM,aAAa,CAAC,iBAAiB,OAAO,iBAAiB,YAAY,aAAa,QAAQ,IAAI,MAAM;AAExG,MAAM,8BAA0B,mBAAAA,SAAW,CAAC,YAAY,YAAY,WAAW,MAAM;AAC1F,QAAM,wBAAoB,8BAAS,WAAW,QAAQ,KAAK,EAAE,CAAC;AAC9D,QAAM,QAAS,aAAa,oBAAqB;AACjD,SAAO,QAAQ,WAAW,QAAQ;AACpC,CAAC;AAED,MAAM,kCAA8B,mBAAAA,SAAW,CAAC,iBAAa,8BAAS,SAAS,QAAQ,KAAK,EAAE,CAAC,CAAC;AAChG,MAAM,8BAA0B,mBAAAA,SAAW,CAAC,YAAY,YAAY,GAAI,UAAU,aAAc,MAAM;AAEtG,MAAM,eAAW,mBAAAA,SAAW,CAAC,WAAW,QAAQ,GAAG,aAAa;AAC9D,MAAI,gBAAgB,KAAK;AAAG,WAAO,wBAAwB,WAAW,OAAO,QAAQ;AACrF,MAAI,WAAW,KAAK;AAAG,WAAO,4BAA4B,KAAK;AAC/D,SAAO;AACT,CAAC;",
6
6
  "names": ["memoizeOne"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/row-dnd/DndRowsPlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/row-dnd/DndRowsPlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react-hooks/rules-of-hooks */\nimport React, { useMemo } from 'react';\nimport { SortableElement, SortableContainer, SortableHandle } from 'react-sortable-hoc';\nimport { GripperVertical } from '@elliemae/ds-icons';\nimport { omit } from '@elliemae/ds-utilities';\nimport { appendCellFormatter, createInstancePlugin } from '@elliemae/ds-shared';\n\n// todo: remove once it's fixed in react-sortable-hoc library\nconst keysToOmit = [\n 'axis',\n 'contentWindow',\n 'disableAutoscroll',\n 'distance',\n 'getContainer',\n 'getHelperDimensions',\n 'helperClass',\n 'helperContainer',\n 'hideSortableGhost',\n 'keyboardSortingTransitionDuration',\n 'lockAxis',\n 'lockOffset',\n 'lockToContainerEdges',\n 'onSortEnd',\n 'onSortMove',\n 'onSortOver',\n 'onSortStart',\n 'pressDelay',\n 'pressThreshold',\n 'shouldCancelStart',\n 'transitionDuration',\n 'updateBeforeSortStart',\n 'useDragHandle',\n 'useWindowAsScrollContainer',\n];\n\nconst DragHandle = SortableHandle(() => <GripperVertical className=\"drag-handle\" />);\n\nconst translateDnDData = ({ oldIndex, newIndex, index }) => ({\n sourceIndex: oldIndex,\n targetIndex: newIndex,\n fromIndex: index === undefined ? oldIndex : index,\n});\n\nconst decorateColumns = (columns) => {\n const dragColumn = {\n property: 'drag',\n label: '',\n visible: true,\n width: 24,\n minWidth: 24,\n special: true,\n };\n return [\n appendCellFormatter(\n () => (\n <>\n <DragHandle />\n </>\n ),\n dragColumn,\n ),\n ...columns,\n ];\n};\n\nconst getBodyProps = (props, grid) => {\n const { onMoveRowEnd, onReorder, onMoveRowStart } = grid.props;\n return {\n ...props,\n onSortEnd: (data) => {\n grid.enableEvents();\n grid.setIsRowDragging(false);\n onMoveRowEnd(translateDnDData(data));\n },\n onSortStart: (...args) => {\n grid.disableEvents();\n grid.setIsRowDragging(true);\n onMoveRowStart(...args);\n },\n onSortOver: (data) => {\n onReorder(translateDnDData(data));\n },\n lockAxis: 'y',\n useDragHandle: true,\n helperClass: 'row-drag-helper',\n // a promise is needed, since sortable it's mounted before it's container\n getContainer: () =>\n new Promise((resolve) => {\n setTimeout(() => {\n resolve(grid.refs.innerBody.current || grid.refs.body.current);\n }, 100);\n }),\n };\n};\n\nconst decorateRenderers = (renderers) => {\n const RowComponent = renderers.body.row;\n const BodyWrapperComponent = renderers.body.wrapper;\n\n const Row = useMemo(() => SortableElement(RowComponent), []);\n\n const BodyWrapper = useMemo(\n () => SortableContainer((props) => <BodyWrapperComponent {...omit(props, keysToOmit)} />),\n [],\n );\n\n return {\n ...renderers,\n body: {\n ...renderers.body,\n wrapper: BodyWrapper,\n row: Row,\n },\n };\n};\n\nexport const DndRowsPlugin = createInstancePlugin('dnd-rows', {\n decorateColumns,\n getBodyProps,\n decorateRenderers,\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoCiB;AAlCxC,mBAA+B;AAC/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AA,IAClC;AAAA,IACA,UAAU;AAAA,IACV,eAAe;AAAA,IACf,aAAa;AAAA;AAAA,IAEb,cAAc,MACZ,IAAI,QAAQ,CAAC,YAAY;AACvB,iBAAW,MAAM;AACf,gBAAQ,KAAK,KAAK,UAAU,WAAW,KAAK,KAAK,KAAK,OAAO;AAAA,MAC/D,GAAG,GAAG;AAAA,IACR,CAAC;AAAA,EACL;AACF;AAEA,MAAM,oBAAoB,CAAC,cAAc;AACvC,QAAM,eAAe,UAAU,KAAK;AACpC,QAAM,uBAAuB,UAAU,KAAK;AAE5C,QAAM,UAAM,sBAAQ,UAAM,2CAAgB,YAAY,GAAG,CAAC,CAAC;AAE3D,QAAM,kBAAc;AAAA,IAClB,UAAM,6CAAkB,CAAC,UAAU,4CAAC,wBAAsB,OAAG,0BAAK,OAAO,UAAU,GAAG,CAAE;AAAA,IACxF,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,MAAM;AAAA,MACJ,GAAG,UAAU;AAAA,MACb,SAAS;AAAA,MACT,KAAK;AAAA,IACP;AAAA,EACF;AACF;AAEO,MAAM,oBAAgB,uCAAqB,YAAY;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/row-dnd/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/row-dnd/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { DndRowsPlugin } from './DndRowsPlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAA8B;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/selectable/SelectablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/selectable/SelectablePlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable max-lines */\nimport { useEffect, useState, useCallback } from 'react';\nimport cx from 'obj-str';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { createInstancePlugin } from '@elliemae/ds-shared';\nimport { selectionColumnCreator } from './addSelectableColumn.js';\nimport { useSelectableState } from './useSelectableState.js';\nimport { selectMultipleRow, selectSingleRow } from './helper.js';\n\n// DECORATORS\nconst decorateColumns = (columns, grid) => {\n const {\n props: {\n selectable,\n multiSelectFilterLabel,\n multiSelectFilterOptions,\n multiSelectFilterLabels,\n multiSelectComponent,\n },\n actions: { selectAll: handleSelectAll, selectRow: handleSelectRow },\n state: { selection },\n } = grid;\n\n const createSelectionColumn = selectionColumnCreator({\n grid,\n multiple: selectable === 'multi',\n selectAll: selection.selectAll,\n onSelectAll: handleSelectAll,\n onSelectRow: handleSelectRow,\n multiSelectFilterLabel,\n multiSelectFilterOptions,\n multiSelectFilterLabels,\n multiSelectComponent,\n });\n\n const { showSelectColumn, selectionColumnDefinition } = grid.props;\n\n if (showSelectColumn) {\n const selectionColumn = createSelectionColumn(selectionColumnDefinition);\n return [selectionColumn, ...columns];\n }\n return columns;\n};\n\nconst getRowProps = (rowProps, grid, { rowData }) => {\n const {\n props: { showSelectHighlight, showSelectColumn, rowKey },\n actions: { selectRow },\n } = grid.getInstance();\n\n const { _index } = rowData;\n const isSelected = rowData['metaData.selected'];\n\n if (!showSelectColumn) {\n rowProps.onClick = () => selectRow(rowData[rowKey], _index);\n }\n\n rowProps.className = cx({\n [rowProps.className]: true,\n selected: isSelected,\n 'select-highlight': showSelectHighlight && isSelected,\n });\n\n return rowProps;\n};\n\nconst composeRows = (rows, grid) => {\n const {\n props: { isRowSelected, multiple, rowKey },\n state: { selection },\n } = grid.getInstance();\n\n const selectionPredicate = (row) =>\n isFunction(isRowSelected) ? isRowSelected(row) : !!selection.selectedRows[row[rowKey]];\n\n return multiple ? selectMultipleRow(rows, selectionPredicate) : selectSingleRow(rows, selectionPredicate);\n};\n\nconst decorateGrid = (grid) => {\n // const handler = useRef();\n const {\n props: { isRowSelected, rowKey },\n actions: { selectRow },\n state: { selection },\n } = grid.getInstance();\n const [shiftPressed, setShiftPressed] = useState(false);\n const [lastSelectedRow, setLastSelectedRow] = useState(null);\n\n const selectRowHandler = useCallback(\n (rowData, index) => () => selectRow(rowData[rowKey], index, shiftPressed),\n [isRowSelected, selection, shiftPressed],\n );\n\n useEffect(() => {\n const keyDownListener = (event) => {\n if (\n event.key === 'Shift' &&\n event.target.tagName.toLowerCase() !== 'input' &&\n event.target.parentNode.className !== 'em-ds-combobox__input'\n ) {\n setShiftPressed(true);\n }\n };\n const keyUpListener = (event) => {\n if (\n event.key === 'Shift' &&\n event.target.tagName.toLowerCase() !== 'input' &&\n event.target.parentNode.className !== 'em-ds-combobox__input'\n ) {\n setShiftPressed(false);\n }\n };\n window.addEventListener('keydown', keyDownListener);\n window.addEventListener('keyup', keyUpListener);\n return () => {\n window.removeEventListener('keydown', keyDownListener);\n window.removeEventListener('keyup', keyUpListener);\n };\n });\n\n return {\n shiftPressed,\n selectRowHandler,\n setLastSelectedRow,\n lastSelectedRow,\n };\n};\n\nexport const SelectablePlugin = createInstancePlugin('selectable', {\n decorateGrid,\n registerStateHook: useSelectableState,\n decorateColumns,\n getRowProps,\n composeRows,\n registerHotKeys(grid) {\n return [\n {\n key: 'space',\n handler: ({ rowIndex }) => {\n const {\n composedRows,\n props: { rowKey },\n actions: { selectRow },\n } = grid.getInstance();\n const rows = composedRows.rows || composedRows;\n const row = rows[rowIndex];\n if (!row) return;\n selectRow(row[rowKey], rowIndex);\n },\n },\n {\n key: 'ctrl+a',\n handler: () => {\n const {\n state: { selection },\n actions: { selectAll },\n } = grid.getInstance();\n\n selectAll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B,WAAW,eAAe;AAClD,WAAO,iBAAiB,SAAS,aAAa;AAC9C,WAAO,MAAM;AACX,aAAO,oBAAoB,WAAW,eAAe;AACrD,aAAO,oBAAoB,SAAS,aAAa;AAAA,IACnD;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEO,MAAM,uBAAmB,uCAAqB,cAAc;AAAA,EACjE;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB,MAAM;AACpB,WAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,QACL,SAAS,CAAC,EAAE,SAAS,MAAM;AACzB,gBAAM;AAAA,YACJ;AAAA,YACA,OAAO,EAAE,OAAO;AAAA,YAChB,SAAS,EAAE,UAAU;AAAA,UACvB,IAAI,KAAK,YAAY;AACrB,gBAAM,OAAO,aAAa,QAAQ;AAClC,gBAAM,MAAM,KAAK,QAAQ;AACzB,cAAI,CAAC;AAAK;AACV,oBAAU,IAAI,MAAM,GAAG,QAAQ;AAAA,QACjC;AAAA,MACF;AAAA,MACA;AAAA,QACE,KAAK;AAAA,QACL,SAAS,MAAM;AACb,gBAAM;AAAA,YACJ,OAAO,EAAE,UAAU;AAAA,YACnB,SAAS,EAAE,UAAU;AAAA,UACvB,IAAI,KAAK,YAAY;AAErB,oBAAU,CAAC,UAAU,SAAS;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
6
6
  "names": ["cx"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/selectable/addSelectableColumn.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/selectable/addSelectableColumn.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { appendCellFormatter, appendHeaderFormatter } from '@elliemae/ds-shared';\nimport { selectableFormatter } from './selectableFormatter.js';\n\nexport function selectionColumnCreator({\n grid,\n selectAll,\n selectionComponent,\n onSelectRow,\n onSelectAll,\n multiple,\n\n // backward compatibility: later this needed to be passed through column definition\n multiSelectFilterLabel,\n multiSelectFilterOptions,\n multiSelectFilterLabels,\n multiSelectComponent, // favor selectionComponent\n}) {\n const {\n props: { rowKey },\n } = grid;\n\n return ({\n visible = true,\n isDataColumn = false,\n width = 40,\n minWidth,\n cellRenderer,\n headerCellRenderer,\n customRenderer,\n header,\n ...column\n } = {}) => {\n let selectionColumn = {\n ...column,\n property: 'metaData.selected',\n filterLabel: multiSelectFilterLabel,\n filterOptions: multiSelectFilterOptions,\n filterLabels: multiSelectFilterLabels,\n visible,\n width,\n minWidth: minWidth || width,\n isDataColumn,\n };\n selectionColumn = appendCellFormatter(\n selectableFormatter(\n {\n isMultiSelect: multiple,\n renderer: selectionComponent || multiSelectComponent,\n onSelect: onSelectRow,\n },\n grid,\n ),\n )(selectionColumn);\n\n if (multiple) {\n selectionColumn = appendHeaderFormatter(\n selectableFormatter(\n {\n rowKey,\n selectAll,\n isMultiSelect: true,\n isHeader: true,\n className: 'multi-select-wrapper',\n renderer: selectionComponent || multiSelectComponent,\n onSelect: onSelectAll,\n },\n grid,\n ),\n )(selectionColumn);\n }\n return selectionColumn;\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA2D;AAC3D,iCAAoC;AAE7B,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AACF,GAAG;AACD,QAAM;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,EAClB,IAAI;AAEJ,SAAO,CAAC;AAAA,IACN,UAAU;AAAA,IACV,eAAe;AAAA,IACf,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI,CAAC,MAAM;AACT,QAAI,kBAAkB;AAAA,MACpB,GAAG;AAAA,MACH,UAAU;AAAA,MACV,aAAa;AAAA,MACb,eAAe;AAAA,MACf,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA,UAAU,YAAY;AAAA,MACtB;AAAA,IACF;AACA,0BAAkB;AAAA,UAChB;AAAA,QACE;AAAA,UACE,eAAe;AAAA,UACf,UAAU,sBAAsB;AAAA,UAChC,UAAU;AAAA,QACZ;AAAA,QACA;AAAA,MACF;AAAA,IACF,EAAE,eAAe;AAEjB,QAAI,UAAU;AACZ,4BAAkB;AAAA,YAChB;AAAA,UACE;AAAA,YACE;AAAA,YACA;AAAA,YACA,eAAe;AAAA,YACf,UAAU;AAAA,YACV,WAAW;AAAA,YACX,UAAU,sBAAsB;AAAA,YAChC,UAAU;AAAA,UACZ;AAAA,UACA;AAAA,QACF;AAAA,MACF,EAAE,eAAe;AAAA,IACnB;AACA,WAAO;AAAA,EACT;AACF;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/selectable/helper.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/selectable/helper.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { toggleInObject } from '@elliemae/ds-utilities';\n\nexport const checkAllRowsSelected = (rows, selectedRows) => {\n if (rows.length && selectedRows.length === rows.length) return true;\n if (selectedRows.length) return 'mixed';\n return false;\n};\n\nexport const toggleSelectAll = (rows, checked) =>\n !checked ? {} : rows.reduce((nextSelRows, row) => toggleInObject(nextSelRows, row.id, true), {});\n\nexport const toggleSingleSelectable = (selectedRows, id) => (!selectedRows[id] ? toggleInObject({}, id, true) : {});\n\nconst mergeSelectedToMetaData = (selected) => (row) => ({\n ...row,\n 'metaData.selected': selected,\n});\n\nexport const selectSingleRow = (rows, filter) => rows.map((row) => mergeSelectedToMetaData(filter(row))(row));\n\nexport const selectMultipleRow = (rows, isRowSelectedPredicate) =>\n rows.map((row) => mergeSelectedToMetaData(isRowSelectedPredicate(row))(row));\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA+B;AAExB,MAAM,uBAAuB,CAAC,MAAM,iBAAiB;AAC1D,MAAI,KAAK,UAAU,aAAa,WAAW,KAAK;AAAQ,WAAO;AAC/D,MAAI,aAAa;AAAQ,WAAO;AAChC,SAAO;AACT;AAEO,MAAM,kBAAkB,CAAC,MAAM,YACpC,CAAC,UAAU,CAAC,IAAI,KAAK,OAAO,CAAC,aAAa,YAAQ,oCAAe,aAAa,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC;AAE1F,MAAM,yBAAyB,CAAC,cAAc,OAAQ,CAAC,aAAa,EAAE,QAAI,oCAAe,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC;AAEjH,MAAM,0BAA0B,CAAC,aAAa,CAAC,SAAS;AAAA,EACtD,GAAG;AAAA,EACH,qBAAqB;AACvB;AAEO,MAAM,kBAAkB,CAAC,MAAM,WAAW,KAAK,IAAI,CAAC,QAAQ,wBAAwB,OAAO,GAAG,CAAC,EAAE,GAAG,CAAC;AAErG,MAAM,oBAAoB,CAAC,MAAM,2BACtC,KAAK,IAAI,CAAC,QAAQ,wBAAwB,uBAAuB,GAAG,CAAC,EAAE,GAAG,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/selectable/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/selectable/index.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export { SelectablePlugin } from './SelectablePlugin.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/selectable/selectableFormatter.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/selectable/selectableFormatter.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable indent */\n/* eslint-disable jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events,react/display-name */\nimport React, { forwardRef, useEffect, useRef } from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { DSCheckbox, DSRadio } from '@elliemae/ds-form';\n\nconst SelectableWrapper = ({ className, children }) => (\n <div className={className} onClick={(e) => e.stopPropagation()}>\n {children}\n </div>\n);\n\nconst SelectableComponent = React.memo(\n forwardRef(\n ({ className, isMultiSelect, isHeader, onSelect, isSelected, value }, ref) => {\n const SelectComponent = isMultiSelect || isHeader ? DSCheckbox : DSRadio;\n\n return (\n <SelectableWrapper className={className}>\n <SelectComponent\n checked={isSelected}\n data-testid=\"column-selectable-component\"\n innerRef={ref}\n onChange={onSelect}\n tabIndex={-1}\n value={value}\n />\n </SelectableWrapper>\n );\n },\n (prev, next) => next.isScrolling,\n ),\n);\n\nconst selectableFormatter = ({ isMultiSelect = false, renderer, className, isHeader, onSelect }, grid) =>\n function (valueRender, extraParams) {\n const { registerFocus } = extraParams;\n const ref = useRef();\n const {\n props: { rowKey },\n state: { selection },\n shiftPressed,\n lastSelectedRow,\n } = grid.getInstance();\n const { rowData, isScrolling } = extraParams;\n\n useEffect(() => {\n if (registerFocus) registerFocus(ref.current);\n }, [ref.current]);\n\n const isSelected = isHeader ? selection.selectAll : !!selection.selectedRows[rowData[rowKey]];\n\n const handleSelect = isHeader\n ? () => onSelect(!isSelected)\n : () => onSelect(rowData[rowKey], extraParams.rowIndex, shiftPressed, lastSelectedRow);\n\n if (isFunction(renderer)) {\n return (\n <SelectableWrapper className={className}>\n {renderer({\n rowData: {},\n ...extraParams,\n value: isSelected,\n isHeader,\n onSelect: handleSelect,\n })}\n </SelectableWrapper>\n );\n }\n\n return (\n <SelectableComponent\n ref={ref}\n className={className}\n isMultiSelect={isMultiSelect}\n isScrolling={isScrolling}\n isSelected={isSelected}\n onSelect={handleSelect}\n value={!isHeader ? rowData[rowKey] : 'header-select-all'}\n />\n );\n };\n\nexport { selectableFormatter };\nexport default selectableFormatter;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADQrB;AALF,mBAAqD;AACrD,0BAA2B;AAC3B,qBAAoC;AAEpC,MAAM,oBAAoB,CAAC,EAAE,WAAW,SAAS,MAC/C,4CAAC,SAAI,WAAsB,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAC1D,UACH;AAGF,MAAM,sBAAsB,aAAAA,QAAM;AAAA,MAChC;AAAA,IACE,CAAC,EAAE,WAAW,eAAe,UAAU,UAAU,YAAY,MAAM,GAAG,QAAQ;AAC5E,YAAM,kBAAkB,iBAAiB,WAAW,4BAAa;AAEjE,aACE,4CAAC,qBAAkB,WACjB;AAAA,QAAC;AAAA;AAAA,UACC,SAAS;AAAA,UACT,eAAY;AAAA,UACZ,UAAU;AAAA,UACV,UAAU;AAAA,UACV,UAAU;AAAA,UACV;AAAA;AAAA,MACF,GACF;AAAA,IAEJ;AAAA,IACA,CAAC,MAAM,SAAS,KAAK;AAAA,EACvB;AACF;AAEA,MAAM,sBAAsB,CAAC,EAAE,gBAAgB,OAAO,UAAU,WAAW,UAAU,SAAS,GAAG,SAC/F,SAAU,aAAa,aAAa;AAClC,QAAM,EAAE,cAAc,IAAI;AAC1B,QAAM,UAAM,qBAAO;AACnB,QAAM;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,IAChB,OAAO,EAAE,UAAU;AAAA,IACnB;AAAA,IACA;AAAA,EACF,IAAI,KAAK,YAAY;AACrB,QAAM,EAAE,SAAS,YAAY,IAAI;AAEjC,8BAAU,MAAM;AACd,QAAI;AAAe,oBAAc,IAAI,OAAO;AAAA,EAC9C,GAAG,CAAC,IAAI,OAAO,CAAC;AAEhB,QAAM,aAAa,WAAW,UAAU,YAAY,CAAC,CAAC,UAAU,aAAa,QAAQ,MAAM,CAAC;AAE5F,QAAM,eAAe,WACjB,MAAM,SAAS,CAAC,UAAU,IAC1B,MAAM,SAAS,QAAQ,MAAM,GAAG,YAAY,UAAU,cAAc,eAAe;AAEvF,UAAI,gCAAW,QAAQ,GAAG;AACxB,WACE,4CAAC,qBAAkB,WAChB,mBAAS;AAAA,MACR,SAAS,CAAC;AAAA,MACV,GAAG;AAAA,MACH,OAAO;AAAA,MACP;AAAA,MACA,UAAU;AAAA,IACZ,CAAC,GACH;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,OAAO,CAAC,WAAW,QAAQ,MAAM,IAAI;AAAA;AAAA,EACvC;AAEJ;AAGF,IAAO,8BAAQ;",
6
6
  "names": ["React"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/selectable/useSelectableState.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/selectable/useSelectableState.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport { useDerivedStateFromProps } from '@elliemae/ds-utilities';\nimport { toggleInObject, hashArray, omit } from '@elliemae/ds-utilities';\nimport { checkAllRowsSelected, toggleSelectAll, toggleSingleSelectable } from './helper.js';\n\nfunction deriveSelectedStateFromPropsOnUpdate(rows) {\n return (nextProp = {}, prevProp = {}) => {\n if (nextProp.selectAll !== prevProp.selectAll) {\n const nextSelectedRows = nextProp.selectAll\n ? toggleSelectAll(rows, true)\n : hashArray(nextProp.selectedRows || []);\n return {\n selectedRows: nextSelectedRows,\n selectAll: checkAllRowsSelected(rows, Object.keys(nextSelectedRows)),\n };\n }\n return {\n selectedRows: hashArray(nextProp.selectedRows || []),\n selectAll: checkAllRowsSelected(rows, Object.keys(nextProp.selectedRows)),\n };\n };\n}\n\nexport function useSelectableState(grid) {\n const {\n props: { rowKey = 'id', selectedRows, selectAll, selectable, onSelectRow, onSelectAll },\n rows,\n setLastSelectedRow,\n } = grid.getInstance();\n\n const multiple = selectable === 'multi';\n const [selection, setSelectedRowsState] = useDerivedStateFromProps(\n { selectedRows, selectAll },\n { onUpdate: deriveSelectedStateFromPropsOnUpdate(rows) },\n );\n\n // ACTIONS\n const handleSelectRow = (\n id,\n index,\n shift = false,\n lastSelectedRow = null,\n // eslint-disable-next-line max-params\n ) => {\n setSelectedRowsState((prevState) => {\n const { rows: nextRows } = grid.getInstance();\n const wasSelected = Object.keys(prevState.selectedRows).some(\n // we need to match softly as the id may be a number\n // eslint-disable-next-line eqeqeq\n (elem) => elem == id,\n );\n let nextSelectedRows = multiple\n ? toggleInObject(prevState.selectedRows, id, true)\n : toggleSingleSelectable(prevState.selectedRows, id);\n setLastSelectedRow({ index, mode: wasSelected ? 'deselect' : 'select' });\n if (shift && lastSelectedRow) {\n const prevSmallest = lastSelectedRow.index < index + 1;\n const sliceStart = prevSmallest ? lastSelectedRow.index : index;\n const sliceEnd = prevSmallest ? index + 1 : lastSelectedRow.index + 1;\n const rowSegment = nextRows.slice(sliceStart, sliceEnd).map((row) => row[rowKey]);\n if (lastSelectedRow.mode === 'deselect') {\n nextSelectedRows = omit(prevState.selectedRows, rowSegment);\n } else {\n const selectedSegment = rowSegment.reduce((o, key) => ({ ...o, [key]: true }), {});\n nextSelectedRows = {\n ...prevState.selectedRows,\n ...selectedSegment,\n };\n }\n }\n\n const nextState = {\n selectedRows: nextSelectedRows,\n selectAll: checkAllRowsSelected(nextRows, Object.keys(nextSelectedRows)),\n };\n if (index !== null && index !== undefined) {\n onSelectRow(\n nextRows.filter((row) => nextState.selectedRows[row[rowKey]]),\n nextState.selectAll,\n index,\n );\n }\n\n return nextState;\n });\n };\n\n const handleSelectAll = (checked) => {\n if (!multiple) return;\n setLastSelectedRow(null);\n setSelectedRowsState(() => {\n const { composedRows: nextRows } = grid.getInstance();\n\n const nextState = {\n selectAll: checked,\n selectedRows: toggleSelectAll(nextRows, checked),\n };\n\n onSelectAll(nextState.selectAll);\n onSelectRow(checked ? nextRows : [], nextState.selectAll);\n\n return nextState;\n });\n };\n\n return {\n actions: {\n selectRow: handleSelectRow,\n selectAll: handleSelectAll,\n },\n state: {\n selection,\n },\n };\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAAyC;AACzC,IAAAA,uBAAgD;AAChD,oBAA8E;AAE9E,SAAS,qCAAqC,MAAM;AAClD,SAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,MAAM;AACvC,QAAI,SAAS,cAAc,SAAS,WAAW;AAC7C,YAAM,mBAAmB,SAAS,gBAC9B,+BAAgB,MAAM,IAAI,QAC1B,gCAAU,SAAS,gBAAgB,CAAC,CAAC;AACzC,aAAO;AAAA,QACL,cAAc;AAAA,QACd,eAAW,oCAAqB,MAAM,OAAO,KAAK,gBAAgB,CAAC;AAAA,MACrE;AAAA,IACF;AACA,WAAO;AAAA,MACL,kBAAc,gCAAU,SAAS,gBAAgB,CAAC,CAAC;AAAA,MACnD,eAAW,oCAAqB,MAAM,OAAO,KAAK,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AAAA,YACb,GAAG;AAAA,UACL;AAAA,QACF;AAAA,MACF;AAEA,YAAM,YAAY;AAAA,QAChB,cAAc;AAAA,QACd,eAAW,oCAAqB,UAAU,OAAO,KAAK,gBAAgB,CAAC;AAAA,MACzE;AACA,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC;AAAA,UACE,SAAS,OAAO,CAAC,QAAQ,UAAU,aAAa,IAAI,MAAM,CAAC,CAAC;AAAA,UAC5D,UAAU;AAAA,UACV;AAAA,QACF;AAAA,MACF;AAEA,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,kBAAkB,CAAC,YAAY;AACnC,QAAI,CAAC;AAAU;AACf,uBAAmB,IAAI;AACvB,yBAAqB,MAAM;AACzB,YAAM,EAAE,cAAc,SAAS,IAAI,KAAK,YAAY;AAEpD,YAAM,YAAY;AAAA,QAChB,WAAW;AAAA,QACX,kBAAc,+BAAgB,UAAU,OAAO;AAAA,MACjD;AAEA,kBAAY,UAAU,SAAS;AAC/B,kBAAY,UAAU,WAAW,CAAC,GAAG,UAAU,SAAS;AAExD,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,SAAO;AAAA,IACL,SAAS;AAAA,MACP,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,OAAO;AAAA,MACL;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": ["import_ds_utilities"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/sortable/SortablePlugin.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/sortable/SortablePlugin.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import * as sortabular from 'sortabular';\nimport { compose, isEmpty, orderBy } from '@elliemae/ds-utilities';\nimport { createInstancePlugin, appendHeaderFormatter, mergeClassNameToColumnHeader } from '@elliemae/ds-shared';\nimport { sortHeaderFormatter } from './sortHeaderFormatter.js';\nimport { useSortableState } from './useSortableState.js';\nimport { sorter, sorterGroups } from './sorter.js';\n\nconst decorateColumn = (column, grid) => {\n const {\n props: { isSortableColumnActive = (col) => col.sortable, groupedRows },\n } = grid;\n\n if (groupedRows) return column;\n if (!isSortableColumnActive(column)) return column;\n\n const formatter = sortHeaderFormatter(\n sortabular.sort({\n getSortingColumns: () => grid.getState().sortingColumns || [],\n onSort: grid.actions.sort,\n strategy: sortabular.strategies.byProperty,\n }),\n grid,\n );\n\n return compose(appendHeaderFormatter(formatter), mergeClassNameToColumnHeader('with-sortable'))(column);\n};\n\nconst composeRows = (rows, grid) => {\n const {\n state: { sortingColumns },\n props: { isDataSorted, groupedRows, groupedBy, sortEmptyLast },\n rows: rowsData,\n composedRows,\n decoratedColumns,\n } = grid.getInstance();\n\n const sortingConfig = {\n columns: decoratedColumns,\n sortingColumns: !isEmpty(sortingColumns) && sortingColumns,\n sort: orderBy,\n emptyLast: sortEmptyLast,\n };\n\n // TODO: 1572 FIX\n if (groupedRows && !groupedBy) {\n return !isDataSorted ? sorterGroups(sortingConfig)(composedRows, rowsData, groupedBy) : rows;\n }\n\n return !isDataSorted ? sorter(sortingConfig)(rows) : rows;\n};\n\nexport const SortablePlugin = createInstancePlugin('sortable', {\n registerStateHook: useSortableState,\n decorateColumn,\n composeRows,\n registerHotKeys(grid) {\n return {\n key: 'ctrl+s',\n handler: ({ cellIndex }) => {\n const {\n actions: { sort },\n decoratedColumns,\n } = grid.getInstance();\n const column = decoratedColumns[cellIndex];\n if (!column) return;\n sort(column.property);\n },\n };\n },\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iBAA4B;AAC5B,0BAA0C;AAC1C,uBAA0F;AAC1F,iCAAoC;AACpC,8BAAiC;AACjC,oBAAqC;AAErC,MAAM,iBAAiB,CAAC,QAAQ,SAAS;AACvC,QA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S;AACzC,YAAI,CAAC;AAAQ;AACb,aAAK,OAAO,QAAQ;AAAA,MACtB;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
6
6
  "names": []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/plugins/sortable/checkIfSortable.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
3
+ "sources": ["../../../../src/plugins/sortable/checkIfSortable.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable no-plusplus */\n/* eslint-disable no-loops/no-loops */\nexport const checkIfSortable = (column, rows) => {\n for (let index = 0; index < rows.length; index++) {\n const element = rows[index][column];\n if (!(element === null || element === undefined)) {\n // PUI-6452\n return true;\n }\n }\n return false;\n};\n\nexport default checkIfSortable;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,kBAAkB,CAAC,QAAQ,SAAS;AAC/C,WAAS,QAAQ,GAAG,QAAQ,KAAK,QAAQ,SAAS;AAChD,UAAM,UAAU,KAAK,KAAK,EAAE,MAAM;AAClC,QAAI,EAAE,YAAY,QAAQ,YAAY,SAAY;AAEhD,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEA,IAAO,0BAAQ;",
6
6
  "names": []