@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,8 +1,12 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
3
+ import 'core-js/modules/esnext.iterator.constructor.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
5
+ import 'core-js/modules/esnext.async-iterator.filter.js';
6
+ import 'core-js/modules/esnext.iterator.filter.js';
2
7
  import { useRef, useEffect, useMemo } from 'react';
3
8
  import { SortableContainer, SortableElement } from 'react-sortable-hoc';
4
- import { omit, arrayMove } from '@elliemae/ds-utilities/utils';
5
- import { mergeRefs } from '@elliemae/ds-utilities/system';
9
+ import { mergeRefs, omit, arrayMove } from '@elliemae/ds-utilities';
6
10
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
7
11
  import { addDragAndDropToColumn } from './decorateGridWithDndColumns.js';
8
12
  import { jsx } from 'react/jsx-runtime';
@@ -45,11 +49,11 @@ const getHeaderRowProps = (props, grid) => {
45
49
  columnDraggingOffset.current += forward ? newColumnWidth : newColumnWidth * -1;
46
50
  newColumn.updateStyle({
47
51
  transitionDuration: '300ms',
48
- transform: `translate3d(${columnTranslate}px, 0, 0)`
52
+ transform: "translate3d(".concat(columnTranslate, "px, 0, 0)")
49
53
  });
50
54
  oldColumn.updateStyle({
51
55
  transitionDuration: '300ms',
52
- transform: `translate3d(${columnDraggingOffset.current}px, 0, 0)`
56
+ transform: "translate3d(".concat(columnDraggingOffset.current, "px, 0, 0)")
53
57
  });
54
58
  sortedColumns.current = arrayMove(sortedColumns.current, oldIndex, newIndex);
55
59
  onMoveColumnOver(params);
@@ -1,7 +1,7 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import 'react';
3
3
  import { SortableHandle } from 'react-sortable-hoc';
4
- import GripperVertical from '@elliemae/ds-icons/GripperVertical';
4
+ import { GripperVertical } from '@elliemae/ds-icons';
5
5
  import { appendHeaderFormatter, mergeClassNameToColumnHeader } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
6
6
  import { jsxs, Fragment } from 'react/jsx-runtime';
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { useRef } from 'react';
2
- import { cx } from '@elliemae/ds-utilities/utils';
2
+ import { cx } from '@elliemae/ds-utilities';
3
3
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
4
4
  import { useStylesheetHelpers } from './useStylesheetHelpers.js';
5
5
  import useColumnSizeService from './useColumnSizeService.js';
@@ -8,16 +8,18 @@ import { decorateColumn } from './ext-points/decorateColumn.js';
8
8
 
9
9
  /* eslint-disable no-param-reassign */
10
10
 
11
- const getHeaderRowProps = (rowProps, {
12
- rowsStylesheet
13
- }) => {
14
- rowProps.className = `${rowsStylesheet.getRowClassName()}-header`;
11
+ const getHeaderRowProps = (rowProps, _ref) => {
12
+ let {
13
+ rowsStylesheet
14
+ } = _ref;
15
+ rowProps.className = "".concat(rowsStylesheet.getRowClassName(), "-header");
15
16
  return rowProps;
16
17
  };
17
18
 
18
- const getRowProps = (rowProps, {
19
- rowsStylesheet
20
- }) => {
19
+ const getRowProps = (rowProps, _ref2) => {
20
+ let {
21
+ rowsStylesheet
22
+ } = _ref2;
21
23
  rowProps.className = cx(rowProps.className, rowsStylesheet.getRowClassName());
22
24
  return rowProps;
23
25
  };
@@ -1,14 +1,21 @@
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 { useRef, useLayoutEffect } from 'react';
3
- import { mergeRefs } from '@elliemae/ds-utilities/system';
8
+ import { mergeRefs } from '@elliemae/ds-utilities';
4
9
 
5
10
  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
11
 
7
12
  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; }
8
- const columnMeasurerTransformer = columnSizeService => (value, {
9
- column,
10
- grid
11
- }, props = {}) => {
13
+ const columnMeasurerTransformer = columnSizeService => function (value, _ref) {
14
+ let {
15
+ column,
16
+ grid
17
+ } = _ref;
18
+ let props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
12
19
  const {
13
20
  registerColumn
14
21
  } = columnSizeService;
@@ -1,4 +1,4 @@
1
- import { get, set } from '@elliemae/ds-utilities/utils';
1
+ import { get, set } from '@elliemae/ds-utilities';
2
2
  import { columnMeasurerTransformer } from '../columnMeasurerTransformer.js';
3
3
 
4
4
  function decorateColumn(column, grid, index) {
@@ -1,26 +1,33 @@
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 } from 'react';
3
- import useResizeObserver from '@elliemae/ds-utilities/hooks/useResizeObserver';
4
- import { mergeRefs } from '@elliemae/ds-utilities/system';
9
+ import { useResizeObserver, mergeRefs } from '@elliemae/ds-utilities';
5
10
  import { getScrollbarSizeFromHeaderAndBody } from '../utils.js';
6
11
 
7
12
  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; }
8
13
 
9
14
  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; }
10
- function getTableProps(tableProps, {
11
- refs,
12
- tableRef,
13
- bodyWidth,
14
- scrollbarWidth,
15
- isDragging,
16
- columnSizeService,
17
- updateRowWidth,
18
- columns
19
- }) {
15
+ function getTableProps(tableProps, _ref) {
16
+ let {
17
+ refs,
18
+ tableRef,
19
+ bodyWidth,
20
+ scrollbarWidth,
21
+ isDragging,
22
+ columnSizeService,
23
+ updateRowWidth,
24
+ columns
25
+ } = _ref;
20
26
  const [tableNode, tableRefCallback] = useState();
21
- useResizeObserver(({
22
- width
23
- }) => {
27
+ useResizeObserver(_ref2 => {
28
+ let {
29
+ width
30
+ } = _ref2;
24
31
  if (!refs.header.current) return;
25
32
  if (typeof scrollbarWidth.current !== 'number') scrollbarWidth.current = getScrollbarSizeFromHeaderAndBody(refs);
26
33
  if (typeof bodyWidth.current !== 'number') bodyWidth.current = refs.body.offsetWidth; // DataGrid: header with width 0 after redirect from details page (https://jira.elliemae.io/browse/PUI-2162)
@@ -1,4 +1,14 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
+ import 'core-js/modules/esnext.iterator.constructor.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import 'core-js/modules/esnext.async-iterator.map.js';
7
+ import 'core-js/modules/esnext.iterator.map.js';
8
+ import 'core-js/modules/esnext.async-iterator.filter.js';
9
+ import 'core-js/modules/esnext.iterator.filter.js';
10
+ import 'core-js/modules/esnext.async-iterator.reduce.js';
11
+ import 'core-js/modules/esnext.iterator.reduce.js';
2
12
  import { useRef, useState, useLayoutEffect } from 'react';
3
13
  import { getColumnWidthSize, getPercentageValue } from './utils.js';
4
14
 
@@ -41,7 +51,7 @@ function useColumnSizeService(instance) {
41
51
  const columnsArray = Object.values(columns.current);
42
52
  columnsArray.forEach(column => {
43
53
  const columnOffsetWidth = column.node.offsetWidth;
44
- column.updateBodyHeaderWidth(`${columnOffsetWidth}px`, `${columnOffsetWidth}px`);
54
+ column.updateBodyHeaderWidth("".concat(columnOffsetWidth, "px"), "".concat(columnOffsetWidth, "px"));
45
55
  });
46
56
  };
47
57
 
@@ -95,7 +105,7 @@ function useColumnSizeService(instance) {
95
105
 
96
106
  if (percentValue) {
97
107
  const pxs = gridWidth * percentValue / 100;
98
- const pxWidths = `${getColumnWidthSize(pxs, minColumnWidth, column)}px`;
108
+ const pxWidths = "".concat(getColumnWidthSize(pxs, minColumnWidth, column), "px");
99
109
  column.updateBodyHeaderWidth(pxWidths, pxWidths);
100
110
  columns.current[column.uuid].computedWidth = pxs;
101
111
 
@@ -108,7 +118,7 @@ function useColumnSizeService(instance) {
108
118
  const percentWidth = columnFixWidth / gridWidth * 100;
109
119
  const pxs = gridWidth * percentWidth / 100;
110
120
  const actualWidthAfterChecks = getColumnWidthSize(pxs, minColumnWidth, column);
111
- column.updateBodyHeaderWidth(`${actualWidthAfterChecks}px`, column.minWidth || minColumnWidth ? `${column.minWidth || minColumnWidth}px` : `${pxs}px`);
121
+ column.updateBodyHeaderWidth("".concat(actualWidthAfterChecks, "px"), column.minWidth || minColumnWidth ? "".concat(column.minWidth || minColumnWidth, "px") : "".concat(pxs, "px"));
112
122
  resizedColumns.current[column.uuid] = actualWidthAfterChecks;
113
123
  columns.current[column.uuid].computedWidth = actualWidthAfterChecks;
114
124
  }
@@ -1,22 +1,25 @@
1
+ import 'core-js/modules/esnext.async-iterator.map.js';
2
+ import 'core-js/modules/esnext.iterator.map.js';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
1
4
  import * as stylesheet from 'stylesheet-helpers';
2
5
  import { useState, useEffect } from 'react';
3
- import { set } from '@elliemae/ds-utilities/utils';
6
+ import { set } from '@elliemae/ds-utilities';
4
7
  import getColumnFromProperty from './getColumnNameFromProperty.js';
5
8
  import { getScrollbarWidth } from '../../utilities/getScrollbarSize.js';
6
9
 
7
- /* eslint-disable no-param-reassign */
8
10
  const SCROLLBAR_WIDTH = getScrollbarWidth();
9
- const RowStylesheetHelper = ({
10
- grid,
11
- className
12
- }) => {
11
+ const RowStylesheetHelper = _ref => {
12
+ let {
13
+ grid,
14
+ className
15
+ } = _ref;
13
16
  const {
14
17
  styleSheet,
15
18
  styleSheetElement
16
19
  } = stylesheet.create();
17
20
 
18
21
  const update = width => {
19
- const widths = typeof width === 'string' ? width : `${width}px`;
22
+ const widths = typeof width === 'string' ? width : "".concat(width, "px");
20
23
  stylesheet.updateProperties(window, styleSheet, className, width ? {
21
24
  width: widths,
22
25
  minWidth: widths,
@@ -29,8 +32,8 @@ const RowStylesheetHelper = ({
29
32
  const {
30
33
  hasScroll
31
34
  } = grid.getState();
32
- const headerWidth = `${width + (hasScroll ? SCROLLBAR_WIDTH : 0)}px`;
33
- stylesheet.updateProperties(window, styleSheet, `${className}-header`, width ? {
35
+ const headerWidth = "".concat(width + (hasScroll ? SCROLLBAR_WIDTH : 0), "px");
36
+ stylesheet.updateProperties(window, styleSheet, "".concat(className, "-header"), width ? {
34
37
  width: headerWidth,
35
38
  minWidth: headerWidth,
36
39
  maxWidth: headerWidth
@@ -52,58 +55,68 @@ const RowStylesheetHelper = ({
52
55
  };
53
56
  };
54
57
 
55
- const getColumnClassName = ({
56
- globalId,
57
- column,
58
- isHeader = false,
59
- getId
60
- }) => `column-${globalId}-${getId(column)}${isHeader ? '-header' : ''}`;
61
-
62
- function setWidth({
63
- styleSheet,
64
- className,
65
- width,
66
- minWidth
67
- }) {
58
+ const getColumnClassName = _ref2 => {
59
+ let {
60
+ globalId,
61
+ column,
62
+ isHeader = false,
63
+ getId
64
+ } = _ref2;
65
+ return "column-".concat(globalId, "-").concat(getId(column)).concat(isHeader ? '-header' : '');
66
+ };
67
+
68
+ function setWidth(_ref3) {
69
+ let {
70
+ styleSheet,
71
+ className,
72
+ width,
73
+ minWidth
74
+ } = _ref3;
68
75
  let widths;
69
76
  if (typeof width === 'string') widths = width;
70
- if (typeof width === 'number') widths = `${width}px`;
77
+ if (typeof width === 'number') widths = "".concat(width, "px");
71
78
  let minWidths;
72
79
  if (typeof minWidth === 'string') minWidths = minWidth;
73
- if (typeof minWidth === 'number') minWidths = `${minWidth}px`;
80
+ if (typeof minWidth === 'number') minWidths = "".concat(minWidth, "px");
74
81
  stylesheet.updateProperties(window, styleSheet, className, {
75
- width: `${widths || minWidths}`,
76
- minWidth: `${widths || minWidths}`,
82
+ width: "".concat(widths || minWidths),
83
+ minWidth: "".concat(widths || minWidths),
77
84
  // minWidth: `${minWidths || widths}`,
78
- maxWidth: `${widths || minWidths}`
85
+ maxWidth: "".concat(widths || minWidths)
79
86
  });
80
87
  }
81
88
 
82
- function updateStyle({
83
- styleSheet,
84
- className,
85
- style
86
- }) {
89
+ function updateStyle(_ref4) {
90
+ let {
91
+ styleSheet,
92
+ className,
93
+ style
94
+ } = _ref4;
87
95
  stylesheet.updateProperties(window, styleSheet, className, style);
88
96
  }
89
97
 
90
- function columnSizesHelperImpl({
91
- globalId,
92
- getId = ({
93
- property
94
- }) => getColumnFromProperty(property)
95
- }) {
98
+ function columnSizesHelperImpl(_ref5) {
99
+ let {
100
+ globalId,
101
+ getId = _ref6 => {
102
+ let {
103
+ property
104
+ } = _ref6;
105
+ return getColumnFromProperty(property);
106
+ }
107
+ } = _ref5;
96
108
  const {
97
109
  styleSheetElement,
98
110
  styleSheet
99
111
  } = stylesheet.create();
100
112
 
101
- const updateBodyHeaderWidth = ({
102
- className,
103
- headerClassName,
104
- width,
105
- minWidth
106
- }) => {
113
+ const updateBodyHeaderWidth = _ref7 => {
114
+ let {
115
+ className,
116
+ headerClassName,
117
+ width,
118
+ minWidth
119
+ } = _ref7;
107
120
  setWidth({
108
121
  styleSheet,
109
122
  className,
@@ -132,7 +145,7 @@ function columnSizesHelperImpl({
132
145
  getId,
133
146
  column
134
147
  });
135
- const headerClassName = `${cellClassName}-header`;
148
+ const headerClassName = "".concat(cellClassName, "-header");
136
149
  set(column, 'header.props.className', headerClassName);
137
150
  set(column, 'cell.props.className', cellClassName);
138
151
 
@@ -187,11 +200,11 @@ function columnSizesHelperImpl({
187
200
  },
188
201
 
189
202
  getColumnHeaderClassName(column) {
190
- return `${getColumnClassName({
203
+ return "".concat(getColumnClassName({
191
204
  globalId,
192
205
  getId,
193
206
  column
194
- })}-header`;
207
+ }), "-header");
195
208
  },
196
209
 
197
210
  cleanup() {
@@ -210,11 +223,14 @@ function useStylesheetHelpers(grid) {
210
223
  } = grid;
211
224
  const [columnsStylesheet] = useState(() => columnSizesHelperImpl({
212
225
  globalId: bindColumnsSizeTo || grid.uuid,
213
- getId: ({
214
- uuid
215
- }) => getColumnFromProperty(uuid)
226
+ getId: _ref8 => {
227
+ let {
228
+ uuid
229
+ } = _ref8;
230
+ return getColumnFromProperty(uuid);
231
+ }
216
232
  }));
217
- const rowClassName = `row-${bindRowSizeTo || grid.uuid}`;
233
+ const rowClassName = "row-".concat(bindRowSizeTo || grid.uuid);
218
234
  const [rowsStylesheet] = useState(() => RowStylesheetHelper({
219
235
  grid,
220
236
  className: rowClassName
@@ -1,4 +1,7 @@
1
- import { get } from '@elliemae/ds-utilities/utils';
1
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.for-each.js';
4
+ import { get } from '@elliemae/ds-utilities';
2
5
 
3
6
  function getScrollbarSizeFromHeaderAndBody(refs) {
4
7
  const innerBodyOffsetWidth = get(refs, ['innerBody', 'current', 'offsetWidth']);
@@ -21,9 +24,10 @@ const getColumnWidthSize = (width, minWidth, column) => {
21
24
  };
22
25
  const calculateMinWidthForWrappedText = columns => {
23
26
  let longestWord = 0;
24
- columns.forEach(({
25
- label
26
- }) => {
27
+ columns.forEach(_ref => {
28
+ let {
29
+ label
30
+ } = _ref;
27
31
  const localLongestWord = label.split(' ').sort((a, b) => b.length - a.length)[0].length;
28
32
  if (localLongestWord > longestWord) longestWord = localLongestWord;
29
33
  });
@@ -1,5 +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';
2
- import { get, isFunction } from '@elliemae/ds-utilities/utils';
7
+ import { get, isFunction } from '@elliemae/ds-utilities';
3
8
  import { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
4
9
  import getRendererComponent from './getRendererComponent.js';
5
10
 
@@ -1,12 +1,13 @@
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/esnext.async-iterator.for-each.js';
4
+ import 'core-js/modules/esnext.iterator.constructor.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import 'core-js/modules/esnext.async-iterator.filter.js';
7
+ import 'core-js/modules/esnext.iterator.filter.js';
3
8
  import 'react';
4
- import DSButton from '@elliemae/ds-basic/Button';
5
- import DSCheckbox from '@elliemae/ds-basic/form/Checkbox';
6
- import DSComboBox from '@elliemae/ds-basic/form/ComboBox';
7
- import DSRadio from '@elliemae/ds-basic/form/Radio';
8
- import DSTextBox from '@elliemae/ds-basic/form/TextBox';
9
- import DSToggle from '@elliemae/ds-basic/form/Toggle';
9
+ import DSButton from '@elliemae/ds-button';
10
+ import { DSCheckbox, DSComboBox, DSRadio, DSTextBox, DSToggle } from '@elliemae/ds-form';
10
11
  import DSDropdownMenu from '@elliemae/ds-dropdownmenu';
11
12
  import * as index from '../../components/renderers/index.js';
12
13
  import { jsx } from 'react/jsx-runtime';
@@ -26,11 +27,14 @@ const components = {
26
27
  DSDropdownMenu
27
28
  };
28
29
 
29
- const getRendererComponent = ({
30
- props
31
- }, _ref, {
32
- rowData
33
- }) => {
30
+ const getRendererComponent = (_ref2, _ref, _ref3) => {
31
+ let {
32
+ props
33
+ } = _ref2;
34
+ let {
35
+ rowData
36
+ } = _ref3;
37
+
34
38
  let {
35
39
  type = 'DSTextBox',
36
40
  handlers
@@ -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 { Component } from 'react';
3
- import DSComboBox from '@elliemae/ds-basic/form/ComboBox';
8
+ import { DSComboBox } from '@elliemae/ds-form';
4
9
  import { jsx } from 'react/jsx-runtime';
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; }
@@ -53,9 +58,8 @@ class ComboBox extends Component {
53
58
  }
54
59
 
55
60
  }
56
-
57
- _defineProperty(ComboBox, "defaultProps", {
61
+ ComboBox.defaultProps = {
58
62
  onValue: () => null
59
- });
63
+ };
60
64
 
61
65
  export { ComboBox as default };
@@ -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 React, { Component } from 'react';
3
- import DSTextBox from '@elliemae/ds-basic/form/TextBox';
8
+ import { DSTextBox } from '@elliemae/ds-form';
4
9
  import { jsx } from 'react/jsx-runtime';
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; }
@@ -27,12 +32,13 @@ class TextBox extends Component {
27
32
  }, 50);
28
33
  }
29
34
 
30
- handleKeyUp({
31
- key,
32
- target: {
33
- value
34
- }
35
- }) {
35
+ handleKeyUp(_ref) {
36
+ let {
37
+ key,
38
+ target: {
39
+ value
40
+ }
41
+ } = _ref;
36
42
  const {
37
43
  onValue
38
44
  } = this.props;
@@ -61,11 +67,12 @@ class TextBox extends Component {
61
67
  onValue(value);
62
68
  }
63
69
 
64
- handleChange({
65
- target: {
66
- value
67
- }
68
- }) {
70
+ handleChange(_ref2) {
71
+ let {
72
+ target: {
73
+ value
74
+ }
75
+ } = _ref2;
69
76
  this.setState({
70
77
  value
71
78
  });
@@ -89,9 +96,8 @@ class TextBox extends Component {
89
96
  }
90
97
 
91
98
  }
92
-
93
- _defineProperty(TextBox, "defaultProps", {
99
+ TextBox.defaultProps = {
94
100
  onValue: () => null
95
- });
101
+ };
96
102
 
97
103
  export { TextBox as default };
@@ -1,5 +1,5 @@
1
- import useDerivedStateFromProps from '@elliemae/ds-utilities/hooks/useDerivedStateFromProps';
2
- import { toggleInObject } from '@elliemae/ds-utilities/utils';
1
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
+ import { useDerivedStateFromProps, toggleInObject } from '@elliemae/ds-utilities';
3
3
  import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
4
4
  import { makeEditableConfig, addEditableToCell } from './decorateEditable.js';
5
5
 
@@ -30,12 +30,13 @@ const registerStateHook = grid => {
30
30
  });
31
31
  };
32
32
 
33
- const editValue = ({
34
- value,
35
- rowData,
36
- property,
37
- rowIndex
38
- }) => {
33
+ const editValue = _ref => {
34
+ let {
35
+ value,
36
+ rowData,
37
+ property,
38
+ rowIndex
39
+ } = _ref;
39
40
  setEditingRows({});
40
41
  onColumnRowEdited({
41
42
  value,
@@ -78,10 +79,11 @@ const EditablePlugin = createInstancePlugin('editable', {
78
79
  registerHotKeys(grid) {
79
80
  return {
80
81
  key: 'enter',
81
- handler: ({
82
- rowIndex,
83
- cellIndex
84
- }) => {
82
+ handler: _ref2 => {
83
+ let {
84
+ rowIndex,
85
+ cellIndex
86
+ } = _ref2;
85
87
  const {
86
88
  composedRows,
87
89
  decoratedColumns,
@@ -1,10 +1,16 @@
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 _jsx from '@babel/runtime/helpers/esm/jsx';
2
7
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
8
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
9
+ import 'core-js/modules/web.dom-collections.iterator.js';
4
10
  import 'react';
5
11
  import * as edit from 'react-edit';
6
- import EditPencil from '@elliemae/ds-icons/EditPencil';
7
- import { cx } from '@elliemae/ds-utilities/utils';
12
+ import { EditPencil } from '@elliemae/ds-icons';
13
+ import { cx } from '@elliemae/ds-utilities';
8
14
  import { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
9
15
  import getEditorComponent from './getEditorComponent.js';
10
16
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -47,16 +53,19 @@ const makeEditableConfig = grid => edit.edit({
47
53
  return editingRows[rowData[rowKey]] === columnIndex || column.alwaysEditing || isCustomEditing;
48
54
  },
49
55
  onActivate: () => null,
50
- onValue: (...args) => grid.getInstance().actions.editValue(...args)
56
+ onValue: function () {
57
+ return grid.getInstance().actions.editValue(...arguments);
58
+ }
51
59
  });
52
60
 
53
- const addEditableToCell = ({
54
- column,
55
- config,
56
- handlers
57
- }, grid) => {
61
+ const addEditableToCell = (_ref2, grid) => {
62
+ let {
63
+ column,
64
+ config,
65
+ handlers
66
+ } = _ref2;
58
67
  column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));
59
- column.cell.props.className = cx(column.cell.props.className, `editable${column.customEditor ? ' customEditor' : ''}`);
68
+ column.cell.props.className = cx(column.cell.props.className, "editable".concat(column.customEditor ? ' customEditor' : ''));
60
69
  return appendCellFormatter([(value, extraParams) => /*#__PURE__*/jsx(Fragment, {
61
70
  children: /*#__PURE__*/_jsx("div", {
62
71
  onClick: e => {