@elliemae/ds-datagrids 2.0.0-next.7 → 2.0.0-rc.2

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 (198) hide show
  1. package/cjs/DSDataGrid.js +246 -243
  2. package/cjs/DataGridImpl.js +16 -8
  3. package/cjs/PaginatedDataGrid.js +5 -0
  4. package/cjs/columns/IconColumn.js +19 -17
  5. package/cjs/columns/NumberColumn.js +2 -4
  6. package/cjs/components/BodyCell.js +17 -10
  7. package/cjs/components/BodyList.js +7 -0
  8. package/cjs/components/ColumnVisibilityMenuOption.js +10 -6
  9. package/cjs/components/ColumnsOptionsMenuSection.js +34 -28
  10. package/cjs/components/EmptyState.js +19 -17
  11. package/cjs/components/HeaderCell.js +14 -8
  12. package/cjs/components/List.js +5 -0
  13. package/cjs/components/ListItem.js +7 -0
  14. package/cjs/components/NoResults.js +5 -0
  15. package/cjs/components/RowsLoader.js +5 -4
  16. package/cjs/components/Table.js +5 -0
  17. package/cjs/components/TableBody.js +5 -0
  18. package/cjs/components/TableHeader.js +5 -0
  19. package/cjs/components/footer/addOptionalFooterComponents.js +5 -4
  20. package/cjs/components/header/PrimaryControls.js +20 -15
  21. package/cjs/components/header/addOptionalHeaderComponents.js +4 -3
  22. package/cjs/components/renderers/defaultClassedRenderers.js +33 -21
  23. package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +46 -35
  24. package/cjs/plugins/column-dnd/DndColumnsPlugin.js +9 -5
  25. package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +2 -3
  26. package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +10 -8
  27. package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +13 -6
  28. package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +3 -3
  29. package/cjs/plugins/column-sizing/ext-points/getTableProps.js +22 -17
  30. package/cjs/plugins/column-sizing/useColumnSizeService.js +9 -0
  31. package/cjs/plugins/column-sizing/useStylesheetHelpers.js +56 -40
  32. package/cjs/plugins/column-sizing/utils.js +10 -6
  33. package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +9 -4
  34. package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +20 -21
  35. package/cjs/plugins/editable/EditableComponents/ComboBox.js +7 -3
  36. package/cjs/plugins/editable/EditableComponents/TextBox.js +20 -14
  37. package/cjs/plugins/editable/EditablePlugin.js +15 -15
  38. package/cjs/plugins/editable/decorateEditable.js +18 -11
  39. package/cjs/plugins/editable/getEditorComponent.js +45 -34
  40. package/cjs/plugins/expandable-grid/ExpandableColumn.js +57 -50
  41. package/cjs/plugins/expandable-grid/ExpandablePlugin.js +37 -26
  42. package/cjs/plugins/expandable-grid/ExpandedRow.js +28 -18
  43. package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +16 -10
  44. package/cjs/plugins/expandable-grid/useExpandGridState.js +3 -8
  45. package/cjs/plugins/export-data/ExportDataPlugin.js +23 -10
  46. package/cjs/plugins/filterable/FilterablePlugin.js +7 -6
  47. package/cjs/plugins/filterable/addFilterToColumn.js +5 -0
  48. package/cjs/plugins/filterable/components/FilterableHeader.js +35 -27
  49. package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +38 -32
  50. package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +26 -22
  51. package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +119 -154
  52. package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +28 -20
  53. package/cjs/plugins/filterable/filterableFormatter.js +15 -10
  54. package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +16 -4
  55. package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
  56. package/cjs/plugins/filterable/helper.js +16 -7
  57. package/cjs/plugins/filterable/useFilterableState.js +11 -5
  58. package/cjs/plugins/grouping-by/GroupingByPlugin.js +2 -0
  59. package/cjs/plugins/grouping-grid/GroupingPlugin.js +9 -0
  60. package/cjs/plugins/grouping-grid/walkStrategy.js +11 -9
  61. package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +7 -1
  62. package/cjs/plugins/pagination/PaginationPlugin.js +9 -2
  63. package/cjs/plugins/pagination/components/Pagination.js +10 -9
  64. package/cjs/plugins/pagination/components/Paginator.js +8 -7
  65. package/cjs/plugins/pagination/components/PerPageDropdown.js +20 -13
  66. package/cjs/plugins/pagination/helper.js +10 -7
  67. package/cjs/plugins/pagination/usePaginationState.js +7 -3
  68. package/cjs/plugins/resizable/ResizablePlugin.js +5 -4
  69. package/cjs/plugins/resizable/decorateResizable.js +14 -8
  70. package/cjs/plugins/resizable/useResizeHandle.js +21 -16
  71. package/cjs/plugins/resizable/utils.js +8 -5
  72. package/cjs/plugins/row-dnd/DndRowsPlugin.js +23 -16
  73. package/cjs/plugins/selectable/SelectablePlugin.js +10 -8
  74. package/cjs/plugins/selectable/addSelectableColumn.js +24 -16
  75. package/cjs/plugins/selectable/helper.js +12 -3
  76. package/cjs/plugins/selectable/selectableFormatter.js +80 -71
  77. package/cjs/plugins/selectable/useSelectableState.js +24 -11
  78. package/cjs/plugins/sortable/SortablePlugin.js +8 -7
  79. package/cjs/plugins/sortable/sortHeaderFormatter.js +14 -15
  80. package/cjs/plugins/sortable/sortTree.js +13 -3
  81. package/cjs/plugins/sortable/sorter.js +151 -134
  82. package/cjs/plugins/sortable/useSortableState.js +7 -0
  83. package/cjs/plugins/toolbar/RowRenderer.js +7 -2
  84. package/cjs/plugins/toolbar/ToolbarTrigger.js +15 -10
  85. package/cjs/plugins/virtualization/AutoHeightList.js +10 -8
  86. package/cjs/plugins/virtualization/VirtualizationPlugin.js +32 -25
  87. package/cjs/plugins/virtualization/VirtualizedBody.js +18 -9
  88. package/cjs/plugins/virtualization/VirtualizedBodyRow.js +8 -7
  89. package/cjs/renders/CellWithAddons.js +20 -18
  90. package/cjs/renders/styled.js +3 -2
  91. package/cjs/utilities/getPluginsFromProps.js +5 -1
  92. package/cjs/utilities/getScrollbarSize.js +2 -1
  93. package/cjs/utilities/normalizeData.js +7 -1
  94. package/esm/DSDataGrid.js +246 -243
  95. package/esm/DataGridImpl.js +16 -8
  96. package/esm/PaginatedDataGrid.js +5 -0
  97. package/esm/columns/IconColumn.js +18 -16
  98. package/esm/columns/NumberColumn.js +2 -4
  99. package/esm/components/BodyCell.js +17 -10
  100. package/esm/components/BodyList.js +7 -0
  101. package/esm/components/ColumnVisibilityMenuOption.js +10 -6
  102. package/esm/components/ColumnsOptionsMenuSection.js +34 -28
  103. package/esm/components/EmptyState.js +18 -15
  104. package/esm/components/HeaderCell.js +14 -8
  105. package/esm/components/List.js +5 -0
  106. package/esm/components/ListItem.js +7 -0
  107. package/esm/components/NoResults.js +5 -0
  108. package/esm/components/RowsLoader.js +5 -4
  109. package/esm/components/Table.js +5 -0
  110. package/esm/components/TableBody.js +5 -0
  111. package/esm/components/TableHeader.js +5 -0
  112. package/esm/components/footer/addOptionalFooterComponents.js +5 -4
  113. package/esm/components/header/PrimaryControls.js +20 -14
  114. package/esm/components/header/addOptionalHeaderComponents.js +4 -3
  115. package/esm/components/renderers/defaultClassedRenderers.js +33 -21
  116. package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +46 -35
  117. package/esm/plugins/column-dnd/DndColumnsPlugin.js +6 -2
  118. package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -1
  119. package/esm/plugins/column-sizing/ColumnSizingPlugin.js +9 -7
  120. package/esm/plugins/column-sizing/columnMeasurerTransformer.js +12 -5
  121. package/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
  122. package/esm/plugins/column-sizing/ext-points/getTableProps.js +21 -15
  123. package/esm/plugins/column-sizing/useColumnSizeService.js +9 -0
  124. package/esm/plugins/column-sizing/useStylesheetHelpers.js +54 -38
  125. package/esm/plugins/column-sizing/utils.js +8 -4
  126. package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +6 -1
  127. package/esm/plugins/custom-cell-renderer/getRendererComponent.js +15 -11
  128. package/esm/plugins/editable/EditableComponents/ComboBox.js +6 -1
  129. package/esm/plugins/editable/EditableComponents/TextBox.js +19 -12
  130. package/esm/plugins/editable/EditablePlugin.js +13 -12
  131. package/esm/plugins/editable/decorateEditable.js +16 -8
  132. package/esm/plugins/editable/getEditorComponent.js +49 -38
  133. package/esm/plugins/expandable-grid/ExpandableColumn.js +56 -47
  134. package/esm/plugins/expandable-grid/ExpandablePlugin.js +33 -20
  135. package/esm/plugins/expandable-grid/ExpandedRow.js +27 -17
  136. package/esm/plugins/expandable-grid/ExpandedRowExtra.js +15 -9
  137. package/esm/plugins/expandable-grid/useExpandGridState.js +1 -2
  138. package/esm/plugins/export-data/ExportDataPlugin.js +22 -9
  139. package/esm/plugins/filterable/FilterablePlugin.js +5 -4
  140. package/esm/plugins/filterable/addFilterToColumn.js +5 -0
  141. package/esm/plugins/filterable/components/FilterableHeader.js +31 -22
  142. package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +38 -31
  143. package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +26 -21
  144. package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +118 -152
  145. package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +27 -18
  146. package/esm/plugins/filterable/filterableFormatter.js +15 -10
  147. package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +14 -2
  148. package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
  149. package/esm/plugins/filterable/helper.js +10 -1
  150. package/esm/plugins/filterable/useFilterableState.js +11 -5
  151. package/esm/plugins/grouping-by/GroupingByPlugin.js +2 -0
  152. package/esm/plugins/grouping-grid/GroupingPlugin.js +9 -0
  153. package/esm/plugins/grouping-grid/walkStrategy.js +11 -9
  154. package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +7 -1
  155. package/esm/plugins/pagination/PaginationPlugin.js +8 -1
  156. package/esm/plugins/pagination/components/Pagination.js +10 -9
  157. package/esm/plugins/pagination/components/Paginator.js +8 -7
  158. package/esm/plugins/pagination/components/PerPageDropdown.js +17 -9
  159. package/esm/plugins/pagination/helper.js +10 -7
  160. package/esm/plugins/pagination/usePaginationState.js +6 -1
  161. package/esm/plugins/resizable/ResizablePlugin.js +4 -3
  162. package/esm/plugins/resizable/decorateResizable.js +14 -8
  163. package/esm/plugins/resizable/useResizeHandle.js +21 -16
  164. package/esm/plugins/resizable/utils.js +6 -3
  165. package/esm/plugins/row-dnd/DndRowsPlugin.js +21 -13
  166. package/esm/plugins/selectable/SelectablePlugin.js +9 -7
  167. package/esm/plugins/selectable/addSelectableColumn.js +24 -16
  168. package/esm/plugins/selectable/helper.js +10 -1
  169. package/esm/plugins/selectable/selectableFormatter.js +79 -68
  170. package/esm/plugins/selectable/useSelectableState.js +19 -5
  171. package/esm/plugins/sortable/SortablePlugin.js +5 -4
  172. package/esm/plugins/sortable/sortHeaderFormatter.js +12 -11
  173. package/esm/plugins/sortable/sortTree.js +13 -3
  174. package/esm/plugins/sortable/sorter.js +151 -134
  175. package/esm/plugins/sortable/useSortableState.js +7 -0
  176. package/esm/plugins/toolbar/RowRenderer.js +6 -1
  177. package/esm/plugins/toolbar/ToolbarTrigger.js +14 -8
  178. package/esm/plugins/virtualization/AutoHeightList.js +6 -3
  179. package/esm/plugins/virtualization/VirtualizationPlugin.js +31 -24
  180. package/esm/plugins/virtualization/VirtualizedBody.js +14 -5
  181. package/esm/plugins/virtualization/VirtualizedBodyRow.js +8 -7
  182. package/esm/renders/CellWithAddons.js +15 -14
  183. package/esm/renders/styled.js +1 -1
  184. package/esm/utilities/getPluginsFromProps.js +5 -1
  185. package/esm/utilities/getScrollbarSize.js +2 -1
  186. package/esm/utilities/normalizeData.js +7 -1
  187. package/package.json +19 -18
  188. package/types/components/BodyCell.d.ts +1 -1
  189. package/types/components/HeaderCell.d.ts +1 -1
  190. package/types/plugins/column-sizing/columnMeasurerTransformer.d.ts +1 -1
  191. package/types/plugins/column-sizing/ext-points/getTableProps.d.ts +1 -1
  192. package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +1 -1
  193. package/types/plugins/expandable-grid/useExpandGridState.d.ts +4 -4
  194. package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +1 -1
  195. package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +1 -1
  196. package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +1 -1
  197. package/types/plugins/filterable/helper.d.ts +15 -3
  198. package/types/plugins/pagination/components/PerPageDropdown.d.ts +1 -1
@@ -1,6 +1,15 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
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';
2
9
  import 'core-js/modules/web.dom-collections.iterator.js';
3
- import { uniqBy, property, get, isFunction, groupBy } from '@elliemae/ds-utilities/utils';
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';
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; }
6
15
 
@@ -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 'core-js/modules/web.dom-collections.iterator.js';
3
8
  import { useState, useEffect, useMemo } from 'react';
@@ -73,11 +78,12 @@ function useFilterableState(grid) {
73
78
  });
74
79
  };
75
80
 
76
- const removeFilter = ({
77
- group,
78
- pill,
79
- nextFilters
80
- }) => {
81
+ const removeFilter = _ref => {
82
+ let {
83
+ group,
84
+ pill,
85
+ nextFilters
86
+ } = _ref;
81
87
  onRemoveFilter(group, pill.value, nextFilters);
82
88
  handleFiltersChange(nextFilters);
83
89
  };
@@ -1,3 +1,5 @@
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
 
@@ -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';
@@ -5,15 +5,17 @@ function getPath(parentNode, index, childrenKey) {
5
5
  return [...parentNode.path, childrenKey, index];
6
6
  }
7
7
 
8
- function walkTreeStrategy({
9
- data,
10
- childrenKey = 'children',
11
- level = 0,
12
- getId = item => item.id,
13
- parentNode,
14
- shouldWalkChildren = () => true,
15
- cb
16
- }) {
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
+
17
19
  // eslint-disable-next-line no-loops/no-loops,no-plusplus
18
20
  for (let i = 0; i < data.length; i++) {
19
21
  const currLevel = level + 1;
@@ -1,6 +1,11 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
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';
4
9
  import { useRef, useState, useEffect } from 'react';
5
10
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
6
11
 
@@ -22,7 +27,8 @@ const registerStateHook = grid => {
22
27
  } = grid;
23
28
  const loading = useRef(false);
24
29
 
25
- const addMoreData = (data = []) => {
30
+ const addMoreData = function () {
31
+ let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
26
32
  loading.current = false;
27
33
  updateRows(prevRows => prevRows.concat(data || []));
28
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,6 +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
7
  import 'core-js/modules/web.dom-collections.iterator.js';
3
- import useDerivedStateFromProps from '@elliemae/ds-utilities/hooks/useDerivedStateFromProps';
8
+ import { useDerivedStateFromProps } from '@elliemae/ds-utilities';
4
9
  import { parsePerPageNumber } from './helper.js';
5
10
 
6
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
14
  memoizeOne((totalWidth, pxWidth) => "".concat(pxWidth / totalWidth * 100, "%"));
14
- memoizeOne((gridWidth, width = 0, minWidth) => {
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,10 +1,15 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
2
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
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';
4
9
  import { useMemo } from 'react';
5
10
  import { SortableHandle, SortableElement, SortableContainer } from 'react-sortable-hoc';
6
- import GripperVertical from '@elliemae/ds-icons/GripperVertical';
7
- import { omit } from '@elliemae/ds-utilities/utils';
11
+ import { GripperVertical } from '@elliemae/ds-icons';
12
+ import { omit } from '@elliemae/ds-utilities';
8
13
  import { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
9
14
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
10
15
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -19,15 +24,18 @@ const DragHandle = SortableHandle(() => _GripperVertical || (_GripperVertical =
19
24
  className: "drag-handle"
20
25
  })));
21
26
 
22
- const translateDnDData = ({
23
- oldIndex,
24
- newIndex,
25
- index
26
- }) => ({
27
- sourceIndex: oldIndex,
28
- targetIndex: newIndex,
29
- fromIndex: index === undefined ? oldIndex : index
30
- });
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
+ };
31
39
 
32
40
  const decorateColumns = columns => {
33
41
  const dragColumn = {
@@ -55,10 +63,10 @@ const getBodyProps = (props, grid) => {
55
63
  grid.setIsRowDragging(false);
56
64
  onMoveRowEnd(translateDnDData(data));
57
65
  },
58
- onSortStart: (...args) => {
66
+ onSortStart: function () {
59
67
  grid.disableEvents();
60
68
  grid.setIsRowDragging(true);
61
- onMoveRowStart(...args);
69
+ onMoveRowStart(...arguments);
62
70
  },
63
71
  onSortOver: data => {
64
72
  onReorder(translateDnDData(data));
@@ -1,7 +1,7 @@
1
1
  import 'core-js/modules/web.dom-collections.iterator.js';
2
2
  import { useState, useCallback, useEffect } from 'react';
3
3
  import cx from 'obj-str';
4
- import { isFunction } from '@elliemae/ds-utilities/utils';
4
+ import { isFunction } from '@elliemae/ds-utilities';
5
5
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
6
6
  import { selectionColumnCreator } from './addSelectableColumn.js';
7
7
  import { useSelectableState } from './useSelectableState.js';
@@ -48,9 +48,10 @@ const decorateColumns = (columns, grid) => {
48
48
  return columns;
49
49
  };
50
50
 
51
- const getRowProps = (rowProps, grid, {
52
- rowData
53
- }) => {
51
+ const getRowProps = (rowProps, grid, _ref) => {
52
+ let {
53
+ rowData
54
+ } = _ref;
54
55
  const {
55
56
  props: {
56
57
  showSelectHighlight,
@@ -150,9 +151,10 @@ const SelectablePlugin = createInstancePlugin('selectable', {
150
151
  registerHotKeys(grid) {
151
152
  return [{
152
153
  key: 'space',
153
- handler: ({
154
- rowIndex
155
- }) => {
154
+ handler: _ref2 => {
155
+ let {
156
+ rowIndex
157
+ } = _ref2;
156
158
  const {
157
159
  composedRows,
158
160
  props: {
@@ -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 _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
3
8
  import { appendCellFormatter, appendHeaderFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
@@ -8,26 +13,29 @@ const _excluded = ["visible", "isDataColumn", "width", "minWidth", "cellRenderer
8
13
  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; }
9
14
 
10
15
  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; }
11
- function selectionColumnCreator({
12
- grid,
13
- selectAll,
14
- selectionComponent,
15
- onSelectRow,
16
- onSelectAll,
17
- multiple,
18
- // backward compatibility: later this needed to be passed through column definition
19
- multiSelectFilterLabel,
20
- multiSelectFilterOptions,
21
- multiSelectFilterLabels,
22
- multiSelectComponent // favor selectionComponent
16
+ function selectionColumnCreator(_ref) {
17
+ let {
18
+ grid,
19
+ selectAll,
20
+ selectionComponent,
21
+ onSelectRow,
22
+ onSelectAll,
23
+ multiple,
24
+ // backward compatibility: later this needed to be passed through column definition
25
+ multiSelectFilterLabel,
26
+ multiSelectFilterOptions,
27
+ multiSelectFilterLabels,
28
+ multiSelectComponent // favor selectionComponent
23
29
 
24
- }) {
30
+ } = _ref;
25
31
  const {
26
32
  props: {
27
33
  rowKey
28
34
  }
29
35
  } = grid;
30
- return (_ref = {}) => {
36
+ return function () {
37
+ let _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
38
+
31
39
  let {
32
40
  visible = true,
33
41
  isDataColumn = false,
@@ -37,8 +45,8 @@ function selectionColumnCreator({
37
45
  headerCellRenderer,
38
46
  customRenderer,
39
47
  header
40
- } = _ref,
41
- column = _objectWithoutProperties(_ref, _excluded);
48
+ } = _ref2,
49
+ column = _objectWithoutProperties(_ref2, _excluded);
42
50
 
43
51
  let selectionColumn = _objectSpread(_objectSpread({}, column), {}, {
44
52
  property: 'metaData.selected',
@@ -1,5 +1,14 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
3
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
5
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
- import { toggleInObject } from '@elliemae/ds-utilities/utils';
6
+ import 'core-js/modules/esnext.async-iterator.reduce.js';
7
+ import 'core-js/modules/esnext.iterator.constructor.js';
8
+ import 'core-js/modules/esnext.iterator.reduce.js';
9
+ import 'core-js/modules/esnext.async-iterator.map.js';
10
+ import 'core-js/modules/esnext.iterator.map.js';
11
+ import { toggleInObject } from '@elliemae/ds-utilities';
3
12
 
4
13
  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
14