@elliemae/ds-datagrids 2.0.0-alpha.1 → 2.0.0-alpha.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 (213) hide show
  1. package/cjs/DSDataGrid.js +247 -244
  2. package/cjs/DataGridImpl.js +22 -13
  3. package/cjs/PaginatedDataGrid.js +11 -6
  4. package/cjs/blockNames.js +2 -2
  5. package/cjs/columns/IconColumn.js +23 -21
  6. package/cjs/columns/NumberColumn.js +2 -4
  7. package/cjs/components/BodyCell.js +23 -15
  8. package/cjs/components/BodyList.js +11 -4
  9. package/cjs/components/ColumnVisibilityMenuOption.js +12 -6
  10. package/cjs/components/ColumnsOptionsMenuSection.js +35 -28
  11. package/cjs/components/EmptyState.js +23 -21
  12. package/cjs/components/HeaderCell.js +17 -11
  13. package/cjs/components/List.js +6 -1
  14. package/cjs/components/ListItem.js +8 -1
  15. package/cjs/components/NoResults.js +8 -3
  16. package/cjs/components/RowsLoader.js +6 -5
  17. package/cjs/components/Table.js +9 -4
  18. package/cjs/components/TableBody.js +8 -3
  19. package/cjs/components/TableHeader.js +6 -1
  20. package/cjs/components/footer/addOptionalFooterComponents.js +6 -5
  21. package/cjs/components/header/PrimaryControls.js +20 -15
  22. package/cjs/components/header/addOptionalHeaderComponents.js +5 -4
  23. package/cjs/components/renderers/defaultClassedRenderers.js +35 -23
  24. package/cjs/components/renderers/renderRowsLoader.js +1 -1
  25. package/cjs/components/tableContext.js +1 -1
  26. package/cjs/index.js +1 -1
  27. package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +54 -43
  28. package/cjs/plugins/column-dnd/DndColumnsPlugin.js +13 -9
  29. package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +3 -4
  30. package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +12 -10
  31. package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +14 -7
  32. package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +3 -3
  33. package/cjs/plugins/column-sizing/ext-points/getTableProps.js +24 -18
  34. package/cjs/plugins/column-sizing/useColumnSizeService.js +14 -4
  35. package/cjs/plugins/column-sizing/useStylesheetHelpers.js +70 -56
  36. package/cjs/plugins/column-sizing/utils.js +10 -6
  37. package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +2 -2
  38. package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +11 -6
  39. package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +24 -25
  40. package/cjs/plugins/editable/EditableComponents/ComboBox.js +10 -7
  41. package/cjs/plugins/editable/EditableComponents/TextBox.js +24 -19
  42. package/cjs/plugins/editable/EditablePlugin.js +17 -16
  43. package/cjs/plugins/editable/decorateEditable.js +25 -19
  44. package/cjs/plugins/editable/getEditorComponent.js +46 -35
  45. package/cjs/plugins/expandable-grid/ExpandableColumn.js +66 -59
  46. package/cjs/plugins/expandable-grid/ExpandablePlugin.js +42 -30
  47. package/cjs/plugins/expandable-grid/ExpandedRow.js +41 -31
  48. package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +22 -16
  49. package/cjs/plugins/expandable-grid/useExpandGridState.js +4 -8
  50. package/cjs/plugins/export-data/ExportDataPlugin.js +34 -19
  51. package/cjs/plugins/filterable/FilterablePlugin.js +9 -8
  52. package/cjs/plugins/filterable/addFilterToColumn.js +6 -1
  53. package/cjs/plugins/filterable/components/FilterableHeader.js +39 -30
  54. package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +52 -45
  55. package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +38 -33
  56. package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +127 -161
  57. package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +38 -29
  58. package/cjs/plugins/filterable/filterableFormatter.js +16 -11
  59. package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +18 -6
  60. package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +11 -8
  61. package/cjs/plugins/filterable/helper.js +18 -8
  62. package/cjs/plugins/filterable/useFilterableState.js +13 -6
  63. package/cjs/plugins/grouping-by/GroupingByPlugin.js +4 -2
  64. package/cjs/plugins/grouping-grid/GroupingPlugin.js +14 -5
  65. package/cjs/plugins/grouping-grid/walkStrategy.js +13 -9
  66. package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +11 -4
  67. package/cjs/plugins/pagination/PaginationPlugin.js +17 -10
  68. package/cjs/plugins/pagination/components/Pagination.js +12 -11
  69. package/cjs/plugins/pagination/components/Paginator.js +23 -22
  70. package/cjs/plugins/pagination/components/PerPageDropdown.js +24 -17
  71. package/cjs/plugins/pagination/helper.js +11 -8
  72. package/cjs/plugins/pagination/usePaginationState.js +9 -4
  73. package/cjs/plugins/resizable/ResizablePlugin.js +6 -5
  74. package/cjs/plugins/resizable/decorateResizable.js +16 -10
  75. package/cjs/plugins/resizable/useResizeHandle.js +21 -16
  76. package/cjs/plugins/resizable/utils.js +9 -6
  77. package/cjs/plugins/row-dnd/DndRowsPlugin.js +27 -19
  78. package/cjs/plugins/selectable/SelectablePlugin.js +13 -12
  79. package/cjs/plugins/selectable/addSelectableColumn.js +25 -17
  80. package/cjs/plugins/selectable/helper.js +13 -4
  81. package/cjs/plugins/selectable/selectableFormatter.js +83 -74
  82. package/cjs/plugins/selectable/useSelectableState.js +26 -12
  83. package/cjs/plugins/sortable/SortablePlugin.js +11 -12
  84. package/cjs/plugins/sortable/checkIfSortable.js +1 -1
  85. package/cjs/plugins/sortable/sortHeaderFormatter.js +17 -18
  86. package/cjs/plugins/sortable/sortTree.js +16 -8
  87. package/cjs/plugins/sortable/sorter.js +153 -135
  88. package/cjs/plugins/sortable/useSortableState.js +12 -6
  89. package/cjs/plugins/toolbar/RowRenderer.js +13 -7
  90. package/cjs/plugins/toolbar/ToolbarPlugin.js +3 -2
  91. package/cjs/plugins/toolbar/ToolbarTrigger.js +26 -21
  92. package/cjs/plugins/virtualization/AutoHeightList.js +12 -10
  93. package/cjs/plugins/virtualization/VirtualizationPlugin.js +35 -28
  94. package/cjs/plugins/virtualization/VirtualizedBody.js +23 -13
  95. package/cjs/plugins/virtualization/VirtualizedBodyRow.js +8 -7
  96. package/cjs/renders/CellWithAddons.js +23 -21
  97. package/cjs/renders/styled.js +7 -18
  98. package/cjs/utilities/getPluginsFromProps.js +5 -1
  99. package/cjs/utilities/getScrollbarSize.js +2 -1
  100. package/cjs/utilities/normalizeData.js +8 -2
  101. package/esm/DSDataGrid.js +246 -243
  102. package/esm/DataGridImpl.js +18 -9
  103. package/esm/PaginatedDataGrid.js +5 -0
  104. package/esm/blockNames.js +2 -2
  105. package/esm/columns/IconColumn.js +19 -17
  106. package/esm/columns/NumberColumn.js +2 -4
  107. package/esm/components/BodyCell.js +20 -12
  108. package/esm/components/BodyList.js +7 -0
  109. package/esm/components/ColumnVisibilityMenuOption.js +12 -6
  110. package/esm/components/ColumnsOptionsMenuSection.js +35 -28
  111. package/esm/components/EmptyState.js +18 -15
  112. package/esm/components/HeaderCell.js +15 -9
  113. package/esm/components/List.js +5 -0
  114. package/esm/components/ListItem.js +7 -0
  115. package/esm/components/NoResults.js +5 -0
  116. package/esm/components/RowsLoader.js +5 -4
  117. package/esm/components/Table.js +5 -0
  118. package/esm/components/TableBody.js +5 -0
  119. package/esm/components/TableHeader.js +5 -0
  120. package/esm/components/footer/addOptionalFooterComponents.js +5 -4
  121. package/esm/components/header/PrimaryControls.js +20 -14
  122. package/esm/components/header/addOptionalHeaderComponents.js +4 -3
  123. package/esm/components/renderers/defaultClassedRenderers.js +35 -23
  124. package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +50 -39
  125. package/esm/plugins/column-dnd/DndColumnsPlugin.js +8 -4
  126. package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -1
  127. package/esm/plugins/column-sizing/ColumnSizingPlugin.js +10 -8
  128. package/esm/plugins/column-sizing/columnMeasurerTransformer.js +12 -5
  129. package/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
  130. package/esm/plugins/column-sizing/ext-points/getTableProps.js +22 -15
  131. package/esm/plugins/column-sizing/useColumnSizeService.js +13 -3
  132. package/esm/plugins/column-sizing/useStylesheetHelpers.js +67 -51
  133. package/esm/plugins/column-sizing/utils.js +8 -4
  134. package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +6 -1
  135. package/esm/plugins/custom-cell-renderer/getRendererComponent.js +15 -11
  136. package/esm/plugins/editable/EditableComponents/ComboBox.js +8 -4
  137. package/esm/plugins/editable/EditableComponents/TextBox.js +21 -15
  138. package/esm/plugins/editable/EditablePlugin.js +14 -12
  139. package/esm/plugins/editable/decorateEditable.js +18 -9
  140. package/esm/plugins/editable/getEditorComponent.js +49 -38
  141. package/esm/plugins/expandable-grid/ExpandableColumn.js +59 -50
  142. package/esm/plugins/expandable-grid/ExpandablePlugin.js +34 -20
  143. package/esm/plugins/expandable-grid/ExpandedRow.js +27 -17
  144. package/esm/plugins/expandable-grid/ExpandedRowExtra.js +17 -11
  145. package/esm/plugins/expandable-grid/useExpandGridState.js +2 -2
  146. package/esm/plugins/export-data/ExportDataPlugin.js +31 -16
  147. package/esm/plugins/filterable/FilterablePlugin.js +5 -4
  148. package/esm/plugins/filterable/addFilterToColumn.js +5 -0
  149. package/esm/plugins/filterable/components/FilterableHeader.js +32 -22
  150. package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +41 -33
  151. package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +28 -22
  152. package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +121 -154
  153. package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +28 -18
  154. package/esm/plugins/filterable/filterableFormatter.js +15 -10
  155. package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +14 -2
  156. package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
  157. package/esm/plugins/filterable/helper.js +11 -1
  158. package/esm/plugins/filterable/useFilterableState.js +12 -5
  159. package/esm/plugins/grouping-by/GroupingByPlugin.js +3 -1
  160. package/esm/plugins/grouping-grid/GroupingPlugin.js +10 -1
  161. package/esm/plugins/grouping-grid/walkStrategy.js +13 -9
  162. package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +8 -1
  163. package/esm/plugins/pagination/PaginationPlugin.js +8 -1
  164. package/esm/plugins/pagination/components/Pagination.js +10 -9
  165. package/esm/plugins/pagination/components/Paginator.js +20 -19
  166. package/esm/plugins/pagination/components/PerPageDropdown.js +17 -9
  167. package/esm/plugins/pagination/helper.js +10 -7
  168. package/esm/plugins/pagination/usePaginationState.js +7 -1
  169. package/esm/plugins/resizable/ResizablePlugin.js +4 -3
  170. package/esm/plugins/resizable/decorateResizable.js +14 -8
  171. package/esm/plugins/resizable/useResizeHandle.js +21 -16
  172. package/esm/plugins/resizable/utils.js +7 -4
  173. package/esm/plugins/row-dnd/DndRowsPlugin.js +22 -13
  174. package/esm/plugins/selectable/SelectablePlugin.js +10 -9
  175. package/esm/plugins/selectable/addSelectableColumn.js +24 -16
  176. package/esm/plugins/selectable/helper.js +10 -1
  177. package/esm/plugins/selectable/selectableFormatter.js +79 -68
  178. package/esm/plugins/selectable/useSelectableState.js +20 -5
  179. package/esm/plugins/sortable/SortablePlugin.js +5 -4
  180. package/esm/plugins/sortable/sortHeaderFormatter.js +12 -11
  181. package/esm/plugins/sortable/sortTree.js +13 -3
  182. package/esm/plugins/sortable/sorter.js +152 -134
  183. package/esm/plugins/sortable/useSortableState.js +8 -0
  184. package/esm/plugins/toolbar/RowRenderer.js +8 -2
  185. package/esm/plugins/toolbar/ToolbarPlugin.js +1 -0
  186. package/esm/plugins/toolbar/ToolbarTrigger.js +17 -11
  187. package/esm/plugins/virtualization/AutoHeightList.js +6 -3
  188. package/esm/plugins/virtualization/VirtualizationPlugin.js +31 -24
  189. package/esm/plugins/virtualization/VirtualizedBody.js +16 -6
  190. package/esm/plugins/virtualization/VirtualizedBodyRow.js +8 -7
  191. package/esm/renders/CellWithAddons.js +15 -14
  192. package/esm/renders/styled.js +3 -15
  193. package/esm/utilities/getPluginsFromProps.js +5 -1
  194. package/esm/utilities/getScrollbarSize.js +2 -1
  195. package/esm/utilities/normalizeData.js +7 -1
  196. package/package.json +27 -18
  197. package/types/DSDataGrid.d.ts +744 -105
  198. package/types/components/BodyCell.d.ts +1 -1
  199. package/types/components/HeaderCell.d.ts +1 -1
  200. package/types/plugins/column-sizing/columnMeasurerTransformer.d.ts +1 -1
  201. package/types/plugins/column-sizing/ext-points/getTableProps.d.ts +1 -1
  202. package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +1 -1
  203. package/types/plugins/expandable-grid/useExpandGridState.d.ts +4 -4
  204. package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +1 -1
  205. package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +1 -1
  206. package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +1 -1
  207. package/types/plugins/filterable/helper.d.ts +15 -3
  208. package/types/plugins/pagination/components/Paginator.d.ts +1 -1
  209. package/types/plugins/pagination/components/PerPageDropdown.d.ts +1 -1
  210. package/types/plugins/sortable/sorter.d.ts +1 -1
  211. package/types/renders/styled.d.ts +3 -3
  212. package/cjs/package.json +0 -7
  213. 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;
@@ -1,21 +1,22 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import 'react';
3
- import Pagify from 'react-pagify';
3
+ import ReactPagify from 'react-pagify';
4
4
  import segmentize from 'segmentize';
5
5
  import { aggregatedClasses } from '@elliemae/ds-classnames';
6
6
 
7
- var _Pagify$Segment, _Pagify$Ellipsis, _Pagify$Segment2, _Pagify$Segment3, _Pagify$Segment4, _Pagify$Ellipsis2, _Pagify$Segment5;
7
+ var _ReactPagify$Segment, _ReactPagify$Ellipsis, _ReactPagify$Segment2, _ReactPagify$Segment3, _ReactPagify$Segment4, _ReactPagify$Ellipsis2, _ReactPagify$Segment5;
8
8
  const blockName = 'data-grid';
9
9
  const PaginationContainer = aggregatedClasses('div')(blockName, 'pagination');
10
- const PagifyContext = aggregatedClasses(Pagify.Context)(blockName, 'pagify-pagination');
10
+ const PagifyContext = aggregatedClasses(ReactPagify === null || ReactPagify === void 0 ? void 0 : ReactPagify.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, {
@@ -27,29 +28,29 @@ const Paginator = ({
27
28
  endPages: 1,
28
29
  sidePages: 1
29
30
  })
30
- }, void 0, /*#__PURE__*/_jsx(Pagify.Button, {
31
+ }, void 0, /*#__PURE__*/_jsx(ReactPagify.Button, {
31
32
  className: pagination.page <= 1 ? 'button-disabled' : '',
32
33
  page: prevPage
33
- }, void 0, labelPrevious), _Pagify$Segment || (_Pagify$Segment = /*#__PURE__*/_jsx(Pagify.Segment, {
34
+ }, void 0, labelPrevious), _ReactPagify$Segment || (_ReactPagify$Segment = /*#__PURE__*/_jsx(ReactPagify.Segment, {
34
35
  field: "beginPages"
35
- })), _Pagify$Ellipsis || (_Pagify$Ellipsis = /*#__PURE__*/_jsx(Pagify.Ellipsis, {
36
+ })), _ReactPagify$Ellipsis || (_ReactPagify$Ellipsis = /*#__PURE__*/_jsx(ReactPagify.Ellipsis, {
36
37
  className: "ellipsis",
37
38
  nextField: "previousPages",
38
39
  previousField: "beginPages"
39
- })), _Pagify$Segment2 || (_Pagify$Segment2 = /*#__PURE__*/_jsx(Pagify.Segment, {
40
+ })), _ReactPagify$Segment2 || (_ReactPagify$Segment2 = /*#__PURE__*/_jsx(ReactPagify.Segment, {
40
41
  field: "previousPages"
41
- })), _Pagify$Segment3 || (_Pagify$Segment3 = /*#__PURE__*/_jsx(Pagify.Segment, {
42
+ })), _ReactPagify$Segment3 || (_ReactPagify$Segment3 = /*#__PURE__*/_jsx(ReactPagify.Segment, {
42
43
  className: "selected",
43
44
  field: "centerPage"
44
- })), _Pagify$Segment4 || (_Pagify$Segment4 = /*#__PURE__*/_jsx(Pagify.Segment, {
45
+ })), _ReactPagify$Segment4 || (_ReactPagify$Segment4 = /*#__PURE__*/_jsx(ReactPagify.Segment, {
45
46
  field: "nextPages"
46
- })), _Pagify$Ellipsis2 || (_Pagify$Ellipsis2 = /*#__PURE__*/_jsx(Pagify.Ellipsis, {
47
+ })), _ReactPagify$Ellipsis2 || (_ReactPagify$Ellipsis2 = /*#__PURE__*/_jsx(ReactPagify.Ellipsis, {
47
48
  className: "ellipsis",
48
49
  nextField: "endPages",
49
50
  previousField: "nextPages"
50
- })), _Pagify$Segment5 || (_Pagify$Segment5 = /*#__PURE__*/_jsx(Pagify.Segment, {
51
+ })), _ReactPagify$Segment5 || (_ReactPagify$Segment5 = /*#__PURE__*/_jsx(ReactPagify.Segment, {
51
52
  field: "endPages"
52
- })), /*#__PURE__*/_jsx(Pagify.Button, {
53
+ })), /*#__PURE__*/_jsx(ReactPagify.Button, {
53
54
  className: pagination.page >= pages ? 'button-disabled' : '',
54
55
  page: nextPage
55
56
  }, void 0, labelNext)));
@@ -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));