@elliemae/ds-datagrids 2.0.0-next.1 → 2.0.0-next.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/cjs/DSDataGrid.js +246 -243
  2. package/cjs/DataGridImpl.js +18 -9
  3. package/cjs/PaginatedDataGrid.js +5 -0
  4. package/cjs/blockNames.js +2 -2
  5. package/cjs/columns/IconColumn.js +19 -17
  6. package/cjs/columns/NumberColumn.js +2 -4
  7. package/cjs/components/BodyCell.js +20 -12
  8. package/cjs/components/BodyList.js +7 -0
  9. package/cjs/components/ColumnVisibilityMenuOption.js +12 -6
  10. package/cjs/components/ColumnsOptionsMenuSection.js +35 -28
  11. package/cjs/components/EmptyState.js +19 -17
  12. package/cjs/components/HeaderCell.js +15 -9
  13. package/cjs/components/List.js +5 -0
  14. package/cjs/components/ListItem.js +7 -0
  15. package/cjs/components/NoResults.js +5 -0
  16. package/cjs/components/RowsLoader.js +5 -4
  17. package/cjs/components/Table.js +5 -0
  18. package/cjs/components/TableBody.js +5 -0
  19. package/cjs/components/TableHeader.js +5 -0
  20. package/cjs/components/footer/addOptionalFooterComponents.js +5 -4
  21. package/cjs/components/header/PrimaryControls.js +20 -15
  22. package/cjs/components/header/addOptionalHeaderComponents.js +4 -3
  23. package/cjs/components/renderers/defaultClassedRenderers.js +35 -23
  24. package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +50 -39
  25. package/cjs/plugins/column-dnd/DndColumnsPlugin.js +11 -7
  26. package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +2 -3
  27. package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +11 -9
  28. package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +13 -6
  29. package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +3 -3
  30. package/cjs/plugins/column-sizing/ext-points/getTableProps.js +23 -17
  31. package/cjs/plugins/column-sizing/useColumnSizeService.js +13 -3
  32. package/cjs/plugins/column-sizing/useStylesheetHelpers.js +69 -53
  33. package/cjs/plugins/column-sizing/utils.js +10 -6
  34. package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +9 -4
  35. package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +20 -21
  36. package/cjs/plugins/editable/EditableComponents/ComboBox.js +7 -3
  37. package/cjs/plugins/editable/EditableComponents/TextBox.js +20 -14
  38. package/cjs/plugins/editable/EditablePlugin.js +16 -15
  39. package/cjs/plugins/editable/decorateEditable.js +19 -11
  40. package/cjs/plugins/editable/getEditorComponent.js +45 -34
  41. package/cjs/plugins/expandable-grid/ExpandableColumn.js +60 -53
  42. package/cjs/plugins/expandable-grid/ExpandablePlugin.js +38 -26
  43. package/cjs/plugins/expandable-grid/ExpandedRow.js +28 -18
  44. package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +18 -12
  45. package/cjs/plugins/expandable-grid/useExpandGridState.js +4 -8
  46. package/cjs/plugins/export-data/ExportDataPlugin.js +31 -17
  47. package/cjs/plugins/filterable/FilterablePlugin.js +7 -6
  48. package/cjs/plugins/filterable/addFilterToColumn.js +5 -0
  49. package/cjs/plugins/filterable/components/FilterableHeader.js +36 -27
  50. package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +41 -34
  51. package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +27 -22
  52. package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +122 -156
  53. package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +29 -20
  54. package/cjs/plugins/filterable/filterableFormatter.js +15 -10
  55. package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +16 -4
  56. package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
  57. package/cjs/plugins/filterable/helper.js +17 -7
  58. package/cjs/plugins/filterable/useFilterableState.js +12 -5
  59. package/cjs/plugins/grouping-by/GroupingByPlugin.js +3 -1
  60. package/cjs/plugins/grouping-grid/GroupingPlugin.js +10 -1
  61. package/cjs/plugins/grouping-grid/walkStrategy.js +13 -9
  62. package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +8 -1
  63. package/cjs/plugins/pagination/PaginationPlugin.js +9 -2
  64. package/cjs/plugins/pagination/components/Pagination.js +10 -9
  65. package/cjs/plugins/pagination/components/Paginator.js +8 -7
  66. package/cjs/plugins/pagination/components/PerPageDropdown.js +20 -13
  67. package/cjs/plugins/pagination/helper.js +10 -7
  68. package/cjs/plugins/pagination/usePaginationState.js +8 -3
  69. package/cjs/plugins/resizable/ResizablePlugin.js +5 -4
  70. package/cjs/plugins/resizable/decorateResizable.js +14 -8
  71. package/cjs/plugins/resizable/useResizeHandle.js +21 -16
  72. package/cjs/plugins/resizable/utils.js +9 -6
  73. package/cjs/plugins/row-dnd/DndRowsPlugin.js +24 -16
  74. package/cjs/plugins/selectable/SelectablePlugin.js +11 -10
  75. package/cjs/plugins/selectable/addSelectableColumn.js +24 -16
  76. package/cjs/plugins/selectable/helper.js +12 -3
  77. package/cjs/plugins/selectable/selectableFormatter.js +80 -71
  78. package/cjs/plugins/selectable/useSelectableState.js +25 -11
  79. package/cjs/plugins/sortable/SortablePlugin.js +8 -7
  80. package/cjs/plugins/sortable/sortHeaderFormatter.js +14 -15
  81. package/cjs/plugins/sortable/sortTree.js +13 -3
  82. package/cjs/plugins/sortable/sorter.js +152 -134
  83. package/cjs/plugins/sortable/useSortableState.js +8 -0
  84. package/cjs/plugins/toolbar/RowRenderer.js +9 -3
  85. package/cjs/plugins/toolbar/ToolbarPlugin.js +1 -0
  86. package/cjs/plugins/toolbar/ToolbarTrigger.js +18 -13
  87. package/cjs/plugins/virtualization/AutoHeightList.js +10 -8
  88. package/cjs/plugins/virtualization/VirtualizationPlugin.js +32 -25
  89. package/cjs/plugins/virtualization/VirtualizedBody.js +20 -10
  90. package/cjs/plugins/virtualization/VirtualizedBodyRow.js +8 -7
  91. package/cjs/renders/CellWithAddons.js +20 -18
  92. package/cjs/renders/styled.js +5 -16
  93. package/cjs/utilities/getPluginsFromProps.js +5 -1
  94. package/cjs/utilities/getScrollbarSize.js +2 -1
  95. package/cjs/utilities/normalizeData.js +7 -1
  96. package/esm/DSDataGrid.js +246 -243
  97. package/esm/DataGridImpl.js +18 -9
  98. package/esm/PaginatedDataGrid.js +5 -0
  99. package/esm/blockNames.js +2 -2
  100. package/esm/columns/IconColumn.js +19 -17
  101. package/esm/columns/NumberColumn.js +2 -4
  102. package/esm/components/BodyCell.js +20 -12
  103. package/esm/components/BodyList.js +7 -0
  104. package/esm/components/ColumnVisibilityMenuOption.js +12 -6
  105. package/esm/components/ColumnsOptionsMenuSection.js +35 -28
  106. package/esm/components/EmptyState.js +18 -15
  107. package/esm/components/HeaderCell.js +15 -9
  108. package/esm/components/List.js +5 -0
  109. package/esm/components/ListItem.js +7 -0
  110. package/esm/components/NoResults.js +5 -0
  111. package/esm/components/RowsLoader.js +5 -4
  112. package/esm/components/Table.js +5 -0
  113. package/esm/components/TableBody.js +5 -0
  114. package/esm/components/TableHeader.js +5 -0
  115. package/esm/components/footer/addOptionalFooterComponents.js +5 -4
  116. package/esm/components/header/PrimaryControls.js +20 -14
  117. package/esm/components/header/addOptionalHeaderComponents.js +4 -3
  118. package/esm/components/renderers/defaultClassedRenderers.js +35 -23
  119. package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +50 -39
  120. package/esm/plugins/column-dnd/DndColumnsPlugin.js +8 -4
  121. package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -1
  122. package/esm/plugins/column-sizing/ColumnSizingPlugin.js +10 -8
  123. package/esm/plugins/column-sizing/columnMeasurerTransformer.js +12 -5
  124. package/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
  125. package/esm/plugins/column-sizing/ext-points/getTableProps.js +22 -15
  126. package/esm/plugins/column-sizing/useColumnSizeService.js +13 -3
  127. package/esm/plugins/column-sizing/useStylesheetHelpers.js +67 -51
  128. package/esm/plugins/column-sizing/utils.js +8 -4
  129. package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +6 -1
  130. package/esm/plugins/custom-cell-renderer/getRendererComponent.js +15 -11
  131. package/esm/plugins/editable/EditableComponents/ComboBox.js +6 -1
  132. package/esm/plugins/editable/EditableComponents/TextBox.js +19 -12
  133. package/esm/plugins/editable/EditablePlugin.js +14 -12
  134. package/esm/plugins/editable/decorateEditable.js +18 -9
  135. package/esm/plugins/editable/getEditorComponent.js +49 -38
  136. package/esm/plugins/expandable-grid/ExpandableColumn.js +59 -50
  137. package/esm/plugins/expandable-grid/ExpandablePlugin.js +34 -20
  138. package/esm/plugins/expandable-grid/ExpandedRow.js +27 -17
  139. package/esm/plugins/expandable-grid/ExpandedRowExtra.js +17 -11
  140. package/esm/plugins/expandable-grid/useExpandGridState.js +2 -2
  141. package/esm/plugins/export-data/ExportDataPlugin.js +30 -16
  142. package/esm/plugins/filterable/FilterablePlugin.js +5 -4
  143. package/esm/plugins/filterable/addFilterToColumn.js +5 -0
  144. package/esm/plugins/filterable/components/FilterableHeader.js +32 -22
  145. package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +41 -33
  146. package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +27 -21
  147. package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +121 -154
  148. package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +28 -18
  149. package/esm/plugins/filterable/filterableFormatter.js +15 -10
  150. package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +14 -2
  151. package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
  152. package/esm/plugins/filterable/helper.js +11 -1
  153. package/esm/plugins/filterable/useFilterableState.js +12 -5
  154. package/esm/plugins/grouping-by/GroupingByPlugin.js +3 -1
  155. package/esm/plugins/grouping-grid/GroupingPlugin.js +10 -1
  156. package/esm/plugins/grouping-grid/walkStrategy.js +13 -9
  157. package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +8 -1
  158. package/esm/plugins/pagination/PaginationPlugin.js +8 -1
  159. package/esm/plugins/pagination/components/Pagination.js +10 -9
  160. package/esm/plugins/pagination/components/Paginator.js +8 -7
  161. package/esm/plugins/pagination/components/PerPageDropdown.js +17 -9
  162. package/esm/plugins/pagination/helper.js +10 -7
  163. package/esm/plugins/pagination/usePaginationState.js +7 -1
  164. package/esm/plugins/resizable/ResizablePlugin.js +4 -3
  165. package/esm/plugins/resizable/decorateResizable.js +14 -8
  166. package/esm/plugins/resizable/useResizeHandle.js +21 -16
  167. package/esm/plugins/resizable/utils.js +7 -4
  168. package/esm/plugins/row-dnd/DndRowsPlugin.js +22 -13
  169. package/esm/plugins/selectable/SelectablePlugin.js +10 -9
  170. package/esm/plugins/selectable/addSelectableColumn.js +24 -16
  171. package/esm/plugins/selectable/helper.js +10 -1
  172. package/esm/plugins/selectable/selectableFormatter.js +79 -68
  173. package/esm/plugins/selectable/useSelectableState.js +20 -5
  174. package/esm/plugins/sortable/SortablePlugin.js +5 -4
  175. package/esm/plugins/sortable/sortHeaderFormatter.js +12 -11
  176. package/esm/plugins/sortable/sortTree.js +13 -3
  177. package/esm/plugins/sortable/sorter.js +152 -134
  178. package/esm/plugins/sortable/useSortableState.js +8 -0
  179. package/esm/plugins/toolbar/RowRenderer.js +8 -2
  180. package/esm/plugins/toolbar/ToolbarPlugin.js +1 -0
  181. package/esm/plugins/toolbar/ToolbarTrigger.js +17 -11
  182. package/esm/plugins/virtualization/AutoHeightList.js +6 -3
  183. package/esm/plugins/virtualization/VirtualizationPlugin.js +31 -24
  184. package/esm/plugins/virtualization/VirtualizedBody.js +16 -6
  185. package/esm/plugins/virtualization/VirtualizedBodyRow.js +8 -7
  186. package/esm/renders/CellWithAddons.js +15 -14
  187. package/esm/renders/styled.js +3 -15
  188. package/esm/utilities/getPluginsFromProps.js +5 -1
  189. package/esm/utilities/getScrollbarSize.js +2 -1
  190. package/esm/utilities/normalizeData.js +7 -1
  191. package/package.json +19 -18
  192. package/types/components/BodyCell.d.ts +1 -1
  193. package/types/components/HeaderCell.d.ts +1 -1
  194. package/types/plugins/column-sizing/columnMeasurerTransformer.d.ts +1 -1
  195. package/types/plugins/column-sizing/ext-points/getTableProps.d.ts +1 -1
  196. package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +1 -1
  197. package/types/plugins/expandable-grid/useExpandGridState.d.ts +4 -4
  198. package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +1 -1
  199. package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +1 -1
  200. package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +1 -1
  201. package/types/plugins/filterable/helper.d.ts +15 -3
  202. package/types/plugins/pagination/components/PerPageDropdown.d.ts +1 -1
  203. package/cjs/package.json +0 -7
  204. package/esm/package.json +0 -7
@@ -1,18 +1,23 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/esnext.async-iterator.filter.js';
3
+ import 'core-js/modules/esnext.iterator.constructor.js';
4
+ import 'core-js/modules/esnext.iterator.filter.js';
2
5
  import 'react';
3
6
  import FilterableHeader from './components/FilterableHeader.js';
4
7
  import { getFilterLabelsGroup, getFilterLabels } from './helper.js';
5
8
 
6
- function FilterableFormatter({
7
- grid,
8
- onAddFilter,
9
- onRemoveFilter,
10
- query,
11
- filterMenuRef
12
- }) {
13
- return (value, {
14
- column
15
- }) => {
9
+ function FilterableFormatter(_ref) {
10
+ let {
11
+ grid,
12
+ onAddFilter,
13
+ onRemoveFilter,
14
+ query,
15
+ filterMenuRef
16
+ } = _ref;
17
+ return (value, _ref2) => {
18
+ let {
19
+ column
20
+ } = _ref2;
16
21
  const {
17
22
  rows,
18
23
  composedRows,
@@ -1,5 +1,14 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import { isFunction } from '@elliemae/ds-utilities/utils';
2
+ import 'core-js/modules/esnext.async-iterator.some.js';
3
+ import 'core-js/modules/esnext.iterator.constructor.js';
4
+ import 'core-js/modules/esnext.iterator.some.js';
5
+ import 'core-js/modules/esnext.async-iterator.reduce.js';
6
+ import 'core-js/modules/esnext.iterator.reduce.js';
7
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
9
+ import 'core-js/modules/esnext.async-iterator.filter.js';
10
+ import 'core-js/modules/esnext.iterator.filter.js';
11
+ import { isFunction } from '@elliemae/ds-utilities';
3
12
  import strategiesOperators from './strategiesOperators.js';
4
13
 
5
14
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -23,7 +32,10 @@ const executeFilterStrategy = (rule, row) => {
23
32
  return filterStrategy(transformedRowValue, transformedValue);
24
33
  };
25
34
 
26
- const filterByRules = (rules, condition = 'AND') => row => condition === 'AND' ? rules.reduce((isFiltered, rule) => rule.rules && rule.rules.length ? isFiltered && filterByRules(rule.rules, rule.condition)(row) : isFiltered && executeFilterStrategy(rule, row), true) : rules.some(rule => rule.rules && rule.rules.length ? filterByRules(rule.rules, rule.condition)(row) : executeFilterStrategy(rule, row));
35
+ const filterByRules = function (rules) {
36
+ let condition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'AND';
37
+ return row => condition === 'AND' ? rules.reduce((isFiltered, rule) => rule.rules && rule.rules.length ? isFiltered && filterByRules(rule.rules, rule.condition)(row) : isFiltered && executeFilterStrategy(rule, row), true) : rules.some(rule => rule.rules && rule.rules.length ? filterByRules(rule.rules, rule.condition)(row) : executeFilterStrategy(rule, row));
38
+ };
27
39
 
28
40
  function filterRowsByQueryGroup(rows, query, composedRows) {
29
41
  if (query && query.rules && query.rules.length === 0) return rows;
@@ -1,10 +1,13 @@
1
1
  import compare from 'comparejs';
2
2
 
3
3
  var strategiesOperators = (op => ({
4
- range: (rowValue, {
5
- start,
6
- end
7
- }) => start <= rowValue && end >= rowValue,
4
+ range: (rowValue, _ref) => {
5
+ let {
6
+ start,
7
+ end
8
+ } = _ref;
9
+ return start <= rowValue && end >= rowValue;
10
+ },
8
11
  equal: (value1, value2) => compare.id(value1, value2),
9
12
  greaterThan: compare.gt,
10
13
  lessThan: compare.lt,
@@ -1,5 +1,15 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import { uniqBy, property, get, isFunction, groupBy } from '@elliemae/ds-utilities/utils';
2
+ import 'core-js/modules/esnext.async-iterator.filter.js';
3
+ import 'core-js/modules/esnext.iterator.constructor.js';
4
+ import 'core-js/modules/esnext.iterator.filter.js';
5
+ import 'core-js/modules/esnext.async-iterator.map.js';
6
+ import 'core-js/modules/esnext.iterator.map.js';
7
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
9
+ import 'core-js/modules/web.dom-collections.iterator.js';
10
+ import 'core-js/modules/esnext.async-iterator.reduce.js';
11
+ import 'core-js/modules/esnext.iterator.reduce.js';
12
+ import { uniqBy, property, get, isFunction, groupBy } from '@elliemae/ds-utilities';
3
13
 
4
14
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
5
15
 
@@ -1,4 +1,10 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
8
  import { useState, useEffect, useMemo } from 'react';
3
9
  import { v4 } from 'uuid';
4
10
  import { parseFiltersToQuery, getFilterValue, buildFilterArray } from './helper.js';
@@ -72,11 +78,12 @@ function useFilterableState(grid) {
72
78
  });
73
79
  };
74
80
 
75
- const removeFilter = ({
76
- group,
77
- pill,
78
- nextFilters
79
- }) => {
81
+ const removeFilter = _ref => {
82
+ let {
83
+ group,
84
+ pill,
85
+ nextFilters
86
+ } = _ref;
80
87
  onRemoveFilter(group, pill.value, nextFilters);
81
88
  handleFiltersChange(nextFilters);
82
89
  };
@@ -1,10 +1,12 @@
1
+ import 'core-js/modules/esnext.async-iterator.map.js';
2
+ import 'core-js/modules/esnext.iterator.map.js';
1
3
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
2
4
  import { groupBy } from 'lodash';
3
5
 
4
6
  const groupedByData = (groupedBy, composedRows) => {
5
7
  const grouped = groupBy(composedRows, groupedBy);
6
8
  return Object.keys(grouped).map((c, key) => ({
7
- id: `grouped-by-${groupedBy}-${key}`,
9
+ id: "grouped-by-".concat(groupedBy, "-").concat(key),
8
10
  key: groupedBy,
9
11
  value: c,
10
12
  children: grouped[c],
@@ -1,6 +1,15 @@
1
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
2
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
3
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
4
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
5
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
6
+ import 'core-js/modules/esnext.async-iterator.filter.js';
7
+ import 'core-js/modules/esnext.iterator.constructor.js';
8
+ import 'core-js/modules/esnext.iterator.filter.js';
9
+ import 'core-js/modules/esnext.async-iterator.map.js';
10
+ import 'core-js/modules/esnext.iterator.map.js';
11
+ import 'core-js/modules/esnext.async-iterator.reduce.js';
12
+ import 'core-js/modules/esnext.iterator.reduce.js';
4
13
  import { useMemo } from 'react';
5
14
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
6
15
  import { aggregatedClasses } from '@elliemae/ds-classnames';
@@ -15,7 +24,7 @@ const _excluded = ["isExpanded"];
15
24
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
16
25
 
17
26
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
18
- const blockName = `${dataGridBlockName}-group-row-header`;
27
+ const blockName = "".concat(dataGridBlockName, "-group-row-header");
19
28
  const GroupRowHeaderWrapper = aggregatedClasses('div')(blockName);
20
29
  const GroupRowHeaderTitle = aggregatedClasses('div')(blockName, 'title');
21
30
  const GroupingPlugin = createInstancePlugin('groupedRows', {
@@ -1,17 +1,21 @@
1
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
+
1
3
  function getPath(parentNode, index, childrenKey) {
2
4
  if (!parentNode) return [index];
3
5
  return [...parentNode.path, childrenKey, index];
4
6
  }
5
7
 
6
- function walkTreeStrategy({
7
- data,
8
- childrenKey = 'children',
9
- level = 0,
10
- getId = item => item.id,
11
- parentNode,
12
- shouldWalkChildren = () => true,
13
- cb
14
- }) {
8
+ function walkTreeStrategy(_ref) {
9
+ let {
10
+ data,
11
+ childrenKey = 'children',
12
+ level = 0,
13
+ getId = item => item.id,
14
+ parentNode,
15
+ shouldWalkChildren = () => true,
16
+ cb
17
+ } = _ref;
18
+
15
19
  // eslint-disable-next-line no-loops/no-loops,no-plusplus
16
20
  for (let i = 0; i < data.length; i++) {
17
21
  const currLevel = level + 1;
@@ -1,5 +1,11 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
4
+ import 'core-js/modules/esnext.async-iterator.filter.js';
5
+ import 'core-js/modules/esnext.iterator.constructor.js';
6
+ import 'core-js/modules/esnext.iterator.filter.js';
7
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
3
9
  import { useRef, useState, useEffect } from 'react';
4
10
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
5
11
 
@@ -21,7 +27,8 @@ const registerStateHook = grid => {
21
27
  } = grid;
22
28
  const loading = useRef(false);
23
29
 
24
- const addMoreData = (data = []) => {
30
+ const addMoreData = function () {
31
+ let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
25
32
  loading.current = false;
26
33
  updateRows(prevRows => prevRows.concat(data || []));
27
34
  };
@@ -1,8 +1,15 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
3
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
4
+ import 'core-js/modules/esnext.async-iterator.map.js';
5
+ import 'core-js/modules/esnext.iterator.map.js';
6
+ import 'core-js/modules/esnext.async-iterator.filter.js';
7
+ import 'core-js/modules/esnext.iterator.constructor.js';
8
+ import 'core-js/modules/esnext.iterator.filter.js';
9
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
10
+ import 'core-js/modules/esnext.iterator.for-each.js';
4
11
  import React, { useMemo } from 'react';
5
- import { mergeRefs } from '@elliemae/ds-utilities/system';
12
+ import { mergeRefs } from '@elliemae/ds-utilities';
6
13
  import FocusGridManager from '@elliemae/ds-shared/FocusGroup/FocusGrid';
7
14
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
8
15
  import paginate from './helper.js';
@@ -6,15 +6,16 @@ import PerPageDropdown from './PerPageDropdown.js';
6
6
 
7
7
  const PaginationControls = aggregatedClasses('div')('data-grid', 'controls-pagination');
8
8
 
9
- const Pagination = ({
10
- paginated,
11
- pagination = {},
12
- onPerPage,
13
- onPageSelect,
14
- paginationStep = 5,
15
- maxPerPage = 10,
16
- minPerPage = 5
17
- }) => {
9
+ const Pagination = _ref => {
10
+ let {
11
+ paginated,
12
+ pagination = {},
13
+ onPerPage,
14
+ onPageSelect,
15
+ paginationStep = 5,
16
+ maxPerPage = 10,
17
+ minPerPage = 5
18
+ } = _ref;
18
19
  const {
19
20
  perPage
20
21
  } = pagination;
@@ -9,13 +9,14 @@ const blockName = 'data-grid';
9
9
  const PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');
10
10
  const PagifyContext = aggregatedClasses(Pagify.Context)(blockName, 'pagify-pagination');
11
11
 
12
- const Paginator = ({
13
- pagination,
14
- pages,
15
- onSelect,
16
- labelPrevious = 'Previous',
17
- labelNext = 'Next'
18
- }) => {
12
+ const Paginator = _ref => {
13
+ let {
14
+ pagination,
15
+ pages,
16
+ onSelect,
17
+ labelPrevious = 'Previous',
18
+ labelNext = 'Next'
19
+ } = _ref;
19
20
  const prevPage = pagination.page - 1;
20
21
  const nextPage = pagination.page + 1;
21
22
  return /*#__PURE__*/_jsx(PaginationContainer, {}, void 0, /*#__PURE__*/_jsx(PagifyContext, {
@@ -1,10 +1,17 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
7
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
8
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
9
+ import 'core-js/modules/esnext.async-iterator.map.js';
10
+ import 'core-js/modules/esnext.iterator.map.js';
4
11
  import 'react';
5
12
  import memoizeOne from 'memoize-one';
6
- import { range } from '@elliemae/ds-utilities/utils';
7
- import DSComboBox, { components } from '@elliemae/ds-basic/form/ComboBox';
13
+ import { range } from '@elliemae/ds-utilities';
14
+ import { DSComboBox, components } from '@elliemae/ds-form';
8
15
  import { jsxs } from 'react/jsx-runtime';
9
16
 
10
17
  var _span;
@@ -36,13 +43,14 @@ const getOptions = memoizeOne((step, min, max) => {
36
43
  return min === 0 ? options.slice(1, options.length) : options;
37
44
  });
38
45
 
39
- function PerPageDropdown({
40
- min = 0,
41
- max = 100,
42
- step = 5,
43
- value = 0,
44
- onChange = () => null
45
- }) {
46
+ function PerPageDropdown(_ref2) {
47
+ let {
48
+ min = 0,
49
+ max = 100,
50
+ step = 5,
51
+ value = 0,
52
+ onChange = () => null
53
+ } = _ref2;
46
54
  const options = getOptions(step, min, max);
47
55
  return /*#__PURE__*/_jsx(DSComboBox, {
48
56
  className: "per-page-dropdown",
@@ -1,14 +1,17 @@
1
- const parsePerPageNumber = (number, max, min = 1) => {
1
+ const parsePerPageNumber = function (number, max) {
2
+ let min = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
2
3
  if (number > max) return max;
3
4
  if (number < min) return min;
4
5
  return number;
5
6
  };
6
- function paginate(rows, {
7
- page,
8
- perPage = 1,
9
- amountOfPages: amount,
10
- totalRows
11
- }) {
7
+ function paginate(rows, _ref) {
8
+ let {
9
+ page,
10
+ perPage = 1,
11
+ amountOfPages: amount,
12
+ totalRows
13
+ } = _ref;
14
+
12
15
  // return if pagination state is controlled
13
16
  if (amount && totalRows) {
14
17
  return {
@@ -1,5 +1,11 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import useDerivedStateFromProps from '@elliemae/ds-utilities/hooks/useDerivedStateFromProps';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
8
+ import { useDerivedStateFromProps } from '@elliemae/ds-utilities';
3
9
  import { parsePerPageNumber } from './helper.js';
4
10
 
5
11
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -1,9 +1,10 @@
1
- import { runAll } from '@elliemae/ds-utilities/utils';
1
+ import 'core-js/modules/esnext.async-iterator.reduce.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.reduce.js';
4
+ import { runAll } from '@elliemae/ds-utilities';
2
5
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
3
6
  import { addResizableToColumn, resizableFormatter } from './decorateResizable.js';
4
7
 
5
- /* eslint-disable no-param-reassign */
6
-
7
8
  const noop = () => null;
8
9
 
9
10
  const DELTA_LAST_COLUMN = 25; // eslint-disable-next-line no-unused-vars
@@ -1,3 +1,8 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
7
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
8
  import React from 'react';
@@ -11,14 +16,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
11
16
 
12
17
  const addResizableToColumn = (column, formatter) => appendHeaderFormatter(formatter, column);
13
18
 
14
- const ResizableWrapper = /*#__PURE__*/React.memo(({
15
- value,
16
- onDrag,
17
- onDragEnd,
18
- onDragStart,
19
- minWidth,
20
- handleClassName
21
- }) => {
19
+ const ResizableWrapper = /*#__PURE__*/React.memo(_ref => {
20
+ let {
21
+ value,
22
+ onDrag,
23
+ onDragEnd,
24
+ onDragStart,
25
+ minWidth,
26
+ handleClassName
27
+ } = _ref;
22
28
  const {
23
29
  containerRef,
24
30
  Handle
@@ -1,13 +1,14 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import { useRef } from 'react';
3
3
 
4
- const useResizeHandle = ({
5
- onDragStart,
6
- onDrag,
7
- onDragEnd,
8
- minWidth = 10,
9
- isLast = false
10
- }) => {
4
+ const useResizeHandle = _ref => {
5
+ let {
6
+ onDragStart,
7
+ onDrag,
8
+ onDragEnd,
9
+ minWidth = 10,
10
+ isLast = false
11
+ } = _ref;
11
12
  const startX = useRef();
12
13
  const startWidth = useRef();
13
14
  const containerRef = useRef();
@@ -41,15 +42,19 @@ const useResizeHandle = ({
41
42
  triggerMove(onDragStart, event);
42
43
  };
43
44
 
44
- const HandleComponent = ({
45
- className = 'resize-handle'
46
- }) =>
47
- /*#__PURE__*/
48
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
49
- _jsx("div", {
50
- className: className,
51
- onMouseDown: onMouseDown
52
- });
45
+ const HandleComponent = _ref2 => {
46
+ let {
47
+ className = 'resize-handle'
48
+ } = _ref2;
49
+ return (
50
+ /*#__PURE__*/
51
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
52
+ _jsx("div", {
53
+ className: className,
54
+ onMouseDown: onMouseDown
55
+ })
56
+ );
57
+ };
53
58
 
54
59
  return {
55
60
  containerRef,
@@ -1,17 +1,20 @@
1
1
  import 'core-js/modules/es.string.replace.js';
2
- import { parseInt } from '@elliemae/ds-utilities/utils';
2
+ import { parseInt } from '@elliemae/ds-utilities';
3
3
  import memoizeOne from 'memoize-one';
4
4
 
5
5
  const isPercentNumber = stringNumber => typeof stringNumber === 'string' && stringNumber.indexOf('%') !== -1;
6
6
  const isPxNumber = stringNumber => typeof stringNumber === 'string' && stringNumber.indexOf('px') !== -1;
7
- const translatePercentageToPx = memoizeOne((totalWidth, percentage, minWidth = 0) => {
7
+ const translatePercentageToPx = memoizeOne(function (totalWidth, percentage) {
8
+ let minWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
8
9
  const parsedPercentatge = parseInt(percentage.replace('%', ''));
9
10
  const width = totalWidth * parsedPercentatge / 100;
10
11
  return width > minWidth ? width : minWidth;
11
12
  });
12
13
  const translateStringPxToNumberPx = memoizeOne(pxNumber => parseInt(pxNumber.replace('%', '')));
13
- memoizeOne((totalWidth, pxWidth) => `${pxWidth / totalWidth * 100}%`);
14
- memoizeOne((gridWidth, width = 0, minWidth) => {
14
+ memoizeOne((totalWidth, pxWidth) => "".concat(pxWidth / totalWidth * 100, "%"));
15
+ memoizeOne(function (gridWidth) {
16
+ let width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
17
+ let minWidth = arguments.length > 2 ? arguments[2] : undefined;
15
18
  if (isPercentNumber(width)) return translatePercentageToPx(gridWidth, width, minWidth);
16
19
  if (isPxNumber(width)) return translateStringPxToNumberPx(width);
17
20
  return width;
@@ -1,9 +1,15 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
4
+ import 'core-js/modules/esnext.async-iterator.filter.js';
5
+ import 'core-js/modules/esnext.iterator.constructor.js';
6
+ import 'core-js/modules/esnext.iterator.filter.js';
7
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
3
9
  import { useMemo } from 'react';
4
10
  import { SortableHandle, SortableElement, SortableContainer } from 'react-sortable-hoc';
5
- import GripperVertical from '@elliemae/ds-icons/GripperVertical';
6
- import { omit } from '@elliemae/ds-utilities/utils';
11
+ import { GripperVertical } from '@elliemae/ds-icons';
12
+ import { omit } from '@elliemae/ds-utilities';
7
13
  import { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
8
14
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
9
15
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -18,15 +24,18 @@ const DragHandle = SortableHandle(() => _GripperVertical || (_GripperVertical =
18
24
  className: "drag-handle"
19
25
  })));
20
26
 
21
- const translateDnDData = ({
22
- oldIndex,
23
- newIndex,
24
- index
25
- }) => ({
26
- sourceIndex: oldIndex,
27
- targetIndex: newIndex,
28
- fromIndex: index === undefined ? oldIndex : index
29
- });
27
+ const translateDnDData = _ref => {
28
+ let {
29
+ oldIndex,
30
+ newIndex,
31
+ index
32
+ } = _ref;
33
+ return {
34
+ sourceIndex: oldIndex,
35
+ targetIndex: newIndex,
36
+ fromIndex: index === undefined ? oldIndex : index
37
+ };
38
+ };
30
39
 
31
40
  const decorateColumns = columns => {
32
41
  const dragColumn = {
@@ -54,10 +63,10 @@ const getBodyProps = (props, grid) => {
54
63
  grid.setIsRowDragging(false);
55
64
  onMoveRowEnd(translateDnDData(data));
56
65
  },
57
- onSortStart: (...args) => {
66
+ onSortStart: function () {
58
67
  grid.disableEvents();
59
68
  grid.setIsRowDragging(true);
60
- onMoveRowStart(...args);
69
+ onMoveRowStart(...arguments);
61
70
  },
62
71
  onSortOver: data => {
63
72
  onReorder(translateDnDData(data));
@@ -1,13 +1,12 @@
1
+ import 'core-js/modules/web.dom-collections.iterator.js';
1
2
  import { useState, useCallback, useEffect } from 'react';
2
3
  import cx from 'obj-str';
3
- import { isFunction } from '@elliemae/ds-utilities/utils';
4
+ import { isFunction } from '@elliemae/ds-utilities';
4
5
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
5
6
  import { selectionColumnCreator } from './addSelectableColumn.js';
6
7
  import { useSelectableState } from './useSelectableState.js';
7
8
  import { selectMultipleRow, selectSingleRow } from './helper.js';
8
9
 
9
- /* eslint-disable react-hooks/rules-of-hooks */
10
-
11
10
  const decorateColumns = (columns, grid) => {
12
11
  const {
13
12
  props: {
@@ -49,9 +48,10 @@ const decorateColumns = (columns, grid) => {
49
48
  return columns;
50
49
  };
51
50
 
52
- const getRowProps = (rowProps, grid, {
53
- rowData
54
- }) => {
51
+ const getRowProps = (rowProps, grid, _ref) => {
52
+ let {
53
+ rowData
54
+ } = _ref;
55
55
  const {
56
56
  props: {
57
57
  showSelectHighlight,
@@ -151,9 +151,10 @@ const SelectablePlugin = createInstancePlugin('selectable', {
151
151
  registerHotKeys(grid) {
152
152
  return [{
153
153
  key: 'space',
154
- handler: ({
155
- rowIndex
156
- }) => {
154
+ handler: _ref2 => {
155
+ let {
156
+ rowIndex
157
+ } = _ref2;
157
158
  const {
158
159
  composedRows,
159
160
  props: {