@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.
- package/cjs/DSDataGrid.js +246 -243
- package/cjs/DataGridImpl.js +16 -8
- package/cjs/PaginatedDataGrid.js +5 -0
- package/cjs/columns/IconColumn.js +19 -17
- package/cjs/columns/NumberColumn.js +2 -4
- package/cjs/components/BodyCell.js +17 -10
- package/cjs/components/BodyList.js +7 -0
- package/cjs/components/ColumnVisibilityMenuOption.js +10 -6
- package/cjs/components/ColumnsOptionsMenuSection.js +34 -28
- package/cjs/components/EmptyState.js +19 -17
- package/cjs/components/HeaderCell.js +14 -8
- package/cjs/components/List.js +5 -0
- package/cjs/components/ListItem.js +7 -0
- package/cjs/components/NoResults.js +5 -0
- package/cjs/components/RowsLoader.js +5 -4
- package/cjs/components/Table.js +5 -0
- package/cjs/components/TableBody.js +5 -0
- package/cjs/components/TableHeader.js +5 -0
- package/cjs/components/footer/addOptionalFooterComponents.js +5 -4
- package/cjs/components/header/PrimaryControls.js +20 -15
- package/cjs/components/header/addOptionalHeaderComponents.js +4 -3
- package/cjs/components/renderers/defaultClassedRenderers.js +33 -21
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +46 -35
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +9 -5
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +2 -3
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +10 -8
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +13 -6
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +3 -3
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +22 -17
- package/cjs/plugins/column-sizing/useColumnSizeService.js +9 -0
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +56 -40
- package/cjs/plugins/column-sizing/utils.js +10 -6
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +9 -4
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +20 -21
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +7 -3
- package/cjs/plugins/editable/EditableComponents/TextBox.js +20 -14
- package/cjs/plugins/editable/EditablePlugin.js +15 -15
- package/cjs/plugins/editable/decorateEditable.js +18 -11
- package/cjs/plugins/editable/getEditorComponent.js +45 -34
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +57 -50
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +37 -26
- package/cjs/plugins/expandable-grid/ExpandedRow.js +28 -18
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +16 -10
- package/cjs/plugins/expandable-grid/useExpandGridState.js +3 -8
- package/cjs/plugins/export-data/ExportDataPlugin.js +23 -10
- package/cjs/plugins/filterable/FilterablePlugin.js +7 -6
- package/cjs/plugins/filterable/addFilterToColumn.js +5 -0
- package/cjs/plugins/filterable/components/FilterableHeader.js +35 -27
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +38 -32
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +26 -22
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +119 -154
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +28 -20
- package/cjs/plugins/filterable/filterableFormatter.js +15 -10
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +16 -4
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
- package/cjs/plugins/filterable/helper.js +16 -7
- package/cjs/plugins/filterable/useFilterableState.js +11 -5
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +2 -0
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +9 -0
- package/cjs/plugins/grouping-grid/walkStrategy.js +11 -9
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +7 -1
- package/cjs/plugins/pagination/PaginationPlugin.js +9 -2
- package/cjs/plugins/pagination/components/Pagination.js +10 -9
- package/cjs/plugins/pagination/components/Paginator.js +8 -7
- package/cjs/plugins/pagination/components/PerPageDropdown.js +20 -13
- package/cjs/plugins/pagination/helper.js +10 -7
- package/cjs/plugins/pagination/usePaginationState.js +7 -3
- package/cjs/plugins/resizable/ResizablePlugin.js +5 -4
- package/cjs/plugins/resizable/decorateResizable.js +14 -8
- package/cjs/plugins/resizable/useResizeHandle.js +21 -16
- package/cjs/plugins/resizable/utils.js +8 -5
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +23 -16
- package/cjs/plugins/selectable/SelectablePlugin.js +10 -8
- package/cjs/plugins/selectable/addSelectableColumn.js +24 -16
- package/cjs/plugins/selectable/helper.js +12 -3
- package/cjs/plugins/selectable/selectableFormatter.js +80 -71
- package/cjs/plugins/selectable/useSelectableState.js +24 -11
- package/cjs/plugins/sortable/SortablePlugin.js +8 -7
- package/cjs/plugins/sortable/sortHeaderFormatter.js +14 -15
- package/cjs/plugins/sortable/sortTree.js +13 -3
- package/cjs/plugins/sortable/sorter.js +151 -134
- package/cjs/plugins/sortable/useSortableState.js +7 -0
- package/cjs/plugins/toolbar/RowRenderer.js +7 -2
- package/cjs/plugins/toolbar/ToolbarTrigger.js +15 -10
- package/cjs/plugins/virtualization/AutoHeightList.js +10 -8
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +32 -25
- package/cjs/plugins/virtualization/VirtualizedBody.js +18 -9
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +8 -7
- package/cjs/renders/CellWithAddons.js +20 -18
- package/cjs/renders/styled.js +3 -2
- package/cjs/utilities/getPluginsFromProps.js +5 -1
- package/cjs/utilities/getScrollbarSize.js +2 -1
- package/cjs/utilities/normalizeData.js +7 -1
- package/esm/DSDataGrid.js +246 -243
- package/esm/DataGridImpl.js +16 -8
- package/esm/PaginatedDataGrid.js +5 -0
- package/esm/columns/IconColumn.js +18 -16
- package/esm/columns/NumberColumn.js +2 -4
- package/esm/components/BodyCell.js +17 -10
- package/esm/components/BodyList.js +7 -0
- package/esm/components/ColumnVisibilityMenuOption.js +10 -6
- package/esm/components/ColumnsOptionsMenuSection.js +34 -28
- package/esm/components/EmptyState.js +18 -15
- package/esm/components/HeaderCell.js +14 -8
- package/esm/components/List.js +5 -0
- package/esm/components/ListItem.js +7 -0
- package/esm/components/NoResults.js +5 -0
- package/esm/components/RowsLoader.js +5 -4
- package/esm/components/Table.js +5 -0
- package/esm/components/TableBody.js +5 -0
- package/esm/components/TableHeader.js +5 -0
- package/esm/components/footer/addOptionalFooterComponents.js +5 -4
- package/esm/components/header/PrimaryControls.js +20 -14
- package/esm/components/header/addOptionalHeaderComponents.js +4 -3
- package/esm/components/renderers/defaultClassedRenderers.js +33 -21
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +46 -35
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +6 -2
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -1
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +9 -7
- package/esm/plugins/column-sizing/columnMeasurerTransformer.js +12 -5
- package/esm/plugins/column-sizing/ext-points/decorateColumn.js +1 -1
- package/esm/plugins/column-sizing/ext-points/getTableProps.js +21 -15
- package/esm/plugins/column-sizing/useColumnSizeService.js +9 -0
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +54 -38
- package/esm/plugins/column-sizing/utils.js +8 -4
- package/esm/plugins/custom-cell-renderer/addCustomRendererToCell.js +6 -1
- package/esm/plugins/custom-cell-renderer/getRendererComponent.js +15 -11
- package/esm/plugins/editable/EditableComponents/ComboBox.js +6 -1
- package/esm/plugins/editable/EditableComponents/TextBox.js +19 -12
- package/esm/plugins/editable/EditablePlugin.js +13 -12
- package/esm/plugins/editable/decorateEditable.js +16 -8
- package/esm/plugins/editable/getEditorComponent.js +49 -38
- package/esm/plugins/expandable-grid/ExpandableColumn.js +56 -47
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +33 -20
- package/esm/plugins/expandable-grid/ExpandedRow.js +27 -17
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +15 -9
- package/esm/plugins/expandable-grid/useExpandGridState.js +1 -2
- package/esm/plugins/export-data/ExportDataPlugin.js +22 -9
- package/esm/plugins/filterable/FilterablePlugin.js +5 -4
- package/esm/plugins/filterable/addFilterToColumn.js +5 -0
- package/esm/plugins/filterable/components/FilterableHeader.js +31 -22
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +38 -31
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +26 -21
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +118 -152
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +27 -18
- package/esm/plugins/filterable/filterableFormatter.js +15 -10
- package/esm/plugins/filterable/filtering-helper/filterRowsByQuery.js +14 -2
- package/esm/plugins/filterable/filtering-helper/strategiesOperators.js +7 -4
- package/esm/plugins/filterable/helper.js +10 -1
- package/esm/plugins/filterable/useFilterableState.js +11 -5
- package/esm/plugins/grouping-by/GroupingByPlugin.js +2 -0
- package/esm/plugins/grouping-grid/GroupingPlugin.js +9 -0
- package/esm/plugins/grouping-grid/walkStrategy.js +11 -9
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +7 -1
- package/esm/plugins/pagination/PaginationPlugin.js +8 -1
- package/esm/plugins/pagination/components/Pagination.js +10 -9
- package/esm/plugins/pagination/components/Paginator.js +8 -7
- package/esm/plugins/pagination/components/PerPageDropdown.js +17 -9
- package/esm/plugins/pagination/helper.js +10 -7
- package/esm/plugins/pagination/usePaginationState.js +6 -1
- package/esm/plugins/resizable/ResizablePlugin.js +4 -3
- package/esm/plugins/resizable/decorateResizable.js +14 -8
- package/esm/plugins/resizable/useResizeHandle.js +21 -16
- package/esm/plugins/resizable/utils.js +6 -3
- package/esm/plugins/row-dnd/DndRowsPlugin.js +21 -13
- package/esm/plugins/selectable/SelectablePlugin.js +9 -7
- package/esm/plugins/selectable/addSelectableColumn.js +24 -16
- package/esm/plugins/selectable/helper.js +10 -1
- package/esm/plugins/selectable/selectableFormatter.js +79 -68
- package/esm/plugins/selectable/useSelectableState.js +19 -5
- package/esm/plugins/sortable/SortablePlugin.js +5 -4
- package/esm/plugins/sortable/sortHeaderFormatter.js +12 -11
- package/esm/plugins/sortable/sortTree.js +13 -3
- package/esm/plugins/sortable/sorter.js +151 -134
- package/esm/plugins/sortable/useSortableState.js +7 -0
- package/esm/plugins/toolbar/RowRenderer.js +6 -1
- package/esm/plugins/toolbar/ToolbarTrigger.js +14 -8
- package/esm/plugins/virtualization/AutoHeightList.js +6 -3
- package/esm/plugins/virtualization/VirtualizationPlugin.js +31 -24
- package/esm/plugins/virtualization/VirtualizedBody.js +14 -5
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +8 -7
- package/esm/renders/CellWithAddons.js +15 -14
- package/esm/renders/styled.js +1 -1
- package/esm/utilities/getPluginsFromProps.js +5 -1
- package/esm/utilities/getScrollbarSize.js +2 -1
- package/esm/utilities/normalizeData.js +7 -1
- package/package.json +19 -18
- package/types/components/BodyCell.d.ts +1 -1
- package/types/components/HeaderCell.d.ts +1 -1
- package/types/plugins/column-sizing/columnMeasurerTransformer.d.ts +1 -1
- package/types/plugins/column-sizing/ext-points/getTableProps.d.ts +1 -1
- package/types/plugins/expandable-grid/ExpandedRowExtra.d.ts +1 -1
- package/types/plugins/expandable-grid/useExpandGridState.d.ts +4 -4
- package/types/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.d.ts +1 -1
- package/types/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.d.ts +1 -1
- package/types/plugins/filterable/components/filterable-menus/TextFilterMenu.d.ts +1 -1
- package/types/plugins/filterable/helper.d.ts +15 -3
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +1 -1
|
@@ -1,8 +1,13 @@
|
|
|
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 _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
4
9
|
import { useMemo, useRef, useEffect } from 'react';
|
|
5
|
-
import { mergeRefs } from '@elliemae/ds-utilities
|
|
10
|
+
import { mergeRefs } from '@elliemae/ds-utilities';
|
|
6
11
|
import { ScrollSync, ScrollSyncPane } from '@elliemae/ds-shared/ScrollSync';
|
|
7
12
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
8
13
|
import { getScrollbarWidth } from '../../utilities/getScrollbarSize.js';
|
|
@@ -15,13 +20,16 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
15
20
|
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; }
|
|
16
21
|
getScrollbarWidth(2);
|
|
17
22
|
|
|
18
|
-
const HeaderSyncHoc = Component => props => /*#__PURE__*/_jsx(ScrollSyncPane, {}, void 0,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
+
const HeaderSyncHoc = Component => props => /*#__PURE__*/_jsx(ScrollSyncPane, {}, void 0, _ref => {
|
|
24
|
+
let {
|
|
25
|
+
registerPane
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, props), {}, {
|
|
28
|
+
innerRef: mergeRefs(props.innerRef, registerPane)
|
|
29
|
+
}));
|
|
30
|
+
});
|
|
23
31
|
|
|
24
|
-
const BodySyncHoc = (Component, notPaginated, grid) =>
|
|
32
|
+
const BodySyncHoc = (Component, notPaginated, grid) => _ref2 => {
|
|
25
33
|
let {
|
|
26
34
|
children,
|
|
27
35
|
classProps,
|
|
@@ -44,8 +52,8 @@ const BodySyncHoc = (Component, notPaginated, grid) => _ref => {
|
|
|
44
52
|
useDragHandle,
|
|
45
53
|
className,
|
|
46
54
|
listComponent
|
|
47
|
-
} =
|
|
48
|
-
rest = _objectWithoutProperties(
|
|
55
|
+
} = _ref2,
|
|
56
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
49
57
|
|
|
50
58
|
const t = useRef();
|
|
51
59
|
|
|
@@ -65,32 +73,35 @@ const BodySyncHoc = (Component, notPaginated, grid) => _ref => {
|
|
|
65
73
|
});
|
|
66
74
|
return /*#__PURE__*/_jsx(ScrollSyncPane, {
|
|
67
75
|
notPaginated: notPaginated
|
|
68
|
-
}, void 0,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
76
|
+
}, void 0, _ref3 => {
|
|
77
|
+
let {
|
|
78
|
+
registerPane
|
|
79
|
+
} = _ref3;
|
|
80
|
+
return /*#__PURE__*/jsx(Component, _objectSpread({
|
|
81
|
+
ref: t,
|
|
82
|
+
classProps: classProps,
|
|
83
|
+
className: className,
|
|
84
|
+
listComponent: listComponent,
|
|
85
|
+
columns: columns,
|
|
86
|
+
getContainer: getContainer,
|
|
87
|
+
helperClass: helperClass,
|
|
88
|
+
innerBodyRef: innerBodyRef // innerRef={innerRef}
|
|
89
|
+
,
|
|
90
|
+
isPlaceholderActive: isPlaceholderActive,
|
|
91
|
+
listProps: listProps,
|
|
92
|
+
lockAxis: lockAxis,
|
|
93
|
+
noResultsPlaceholder: noResultsPlaceholder,
|
|
94
|
+
numRowsVisible: numRowsVisible,
|
|
95
|
+
onSortEnd: onSortEnd,
|
|
96
|
+
onSortOver: onSortOver,
|
|
97
|
+
onSortStart: onSortStart,
|
|
98
|
+
rowKey: rowKey,
|
|
99
|
+
rowRenderer: rowRenderer,
|
|
100
|
+
rows: rows,
|
|
101
|
+
useDragHandle: useDragHandle,
|
|
102
|
+
innerRef: mergeRefs(innerRef, registerPane, t)
|
|
103
|
+
}, rest));
|
|
104
|
+
});
|
|
94
105
|
};
|
|
95
106
|
|
|
96
107
|
const TableSyncHoc = Component => props => /*#__PURE__*/_jsx(ScrollSync, {
|
|
@@ -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
|
|
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';
|
|
@@ -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
|
|
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
|
|
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
|
-
|
|
13
|
-
|
|
11
|
+
const getHeaderRowProps = (rowProps, _ref) => {
|
|
12
|
+
let {
|
|
13
|
+
rowsStylesheet
|
|
14
|
+
} = _ref;
|
|
14
15
|
rowProps.className = "".concat(rowsStylesheet.getRowClassName(), "-header");
|
|
15
16
|
return rowProps;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
const getRowProps = (rowProps, {
|
|
19
|
-
|
|
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
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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,27 +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';
|
|
2
7
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
8
|
import { useState, useEffect } from 'react';
|
|
4
|
-
import useResizeObserver from '@elliemae/ds-utilities
|
|
5
|
-
import { mergeRefs } from '@elliemae/ds-utilities/system';
|
|
9
|
+
import { useResizeObserver, mergeRefs } from '@elliemae/ds-utilities';
|
|
6
10
|
import { getScrollbarSizeFromHeaderAndBody } from '../utils.js';
|
|
7
11
|
|
|
8
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; }
|
|
9
13
|
|
|
10
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; }
|
|
11
|
-
function getTableProps(tableProps, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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;
|
|
21
26
|
const [tableNode, tableRefCallback] = useState();
|
|
22
|
-
useResizeObserver(
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
useResizeObserver(_ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
width
|
|
30
|
+
} = _ref2;
|
|
25
31
|
if (!refs.header.current) return;
|
|
26
32
|
if (typeof scrollbarWidth.current !== 'number') scrollbarWidth.current = getScrollbarSizeFromHeaderAndBody(refs);
|
|
27
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,5 +1,14 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
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';
|
|
3
12
|
import { useRef, useState, useLayoutEffect } from 'react';
|
|
4
13
|
import { getColumnWidthSize, getPercentageValue } from './utils.js';
|
|
5
14
|
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
1
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
4
|
import * as stylesheet from 'stylesheet-helpers';
|
|
3
5
|
import { useState, useEffect } from 'react';
|
|
4
|
-
import { set } from '@elliemae/ds-utilities
|
|
6
|
+
import { set } from '@elliemae/ds-utilities';
|
|
5
7
|
import getColumnFromProperty from './getColumnNameFromProperty.js';
|
|
6
8
|
import { getScrollbarWidth } from '../../utilities/getScrollbarSize.js';
|
|
7
9
|
|
|
8
10
|
const SCROLLBAR_WIDTH = getScrollbarWidth();
|
|
9
|
-
const RowStylesheetHelper =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const RowStylesheetHelper = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
grid,
|
|
14
|
+
className
|
|
15
|
+
} = _ref;
|
|
13
16
|
const {
|
|
14
17
|
styleSheet,
|
|
15
18
|
styleSheetElement
|
|
@@ -52,19 +55,23 @@ const RowStylesheetHelper = ({
|
|
|
52
55
|
};
|
|
53
56
|
};
|
|
54
57
|
|
|
55
|
-
const getColumnClassName =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
77
|
if (typeof width === 'number') widths = "".concat(width, "px");
|
|
@@ -79,31 +86,37 @@ function setWidth({
|
|
|
79
86
|
});
|
|
80
87
|
}
|
|
81
88
|
|
|
82
|
-
function updateStyle({
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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,
|
|
@@ -210,9 +223,12 @@ function useStylesheetHelpers(grid) {
|
|
|
210
223
|
} = grid;
|
|
211
224
|
const [columnsStylesheet] = useState(() => columnSizesHelperImpl({
|
|
212
225
|
globalId: bindColumnsSizeTo || grid.uuid,
|
|
213
|
-
getId:
|
|
214
|
-
|
|
215
|
-
|
|
226
|
+
getId: _ref8 => {
|
|
227
|
+
let {
|
|
228
|
+
uuid
|
|
229
|
+
} = _ref8;
|
|
230
|
+
return getColumnFromProperty(uuid);
|
|
231
|
+
}
|
|
216
232
|
}));
|
|
217
233
|
const rowClassName = "row-".concat(bindRowSizeTo || grid.uuid);
|
|
218
234
|
const [rowsStylesheet] = useState(() => RowStylesheetHelper({
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
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
|
|
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-
|
|
5
|
-
import DSCheckbox from '@elliemae/ds-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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-
|
|
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; }
|
|
@@ -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-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
handleChange(_ref2) {
|
|
71
|
+
let {
|
|
72
|
+
target: {
|
|
73
|
+
value
|
|
74
|
+
}
|
|
75
|
+
} = _ref2;
|
|
69
76
|
this.setState({
|
|
70
77
|
value
|
|
71
78
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
|
-
import useDerivedStateFromProps from '@elliemae/ds-utilities
|
|
3
|
-
import { toggleInObject } from '@elliemae/ds-utilities/utils';
|
|
2
|
+
import { useDerivedStateFromProps, toggleInObject } from '@elliemae/ds-utilities';
|
|
4
3
|
import createInstancePlugin from '@elliemae/ds-shared/createDataInstance/createInstancePlugin';
|
|
5
4
|
import { makeEditableConfig, addEditableToCell } from './decorateEditable.js';
|
|
6
5
|
|
|
@@ -31,12 +30,13 @@ const registerStateHook = grid => {
|
|
|
31
30
|
});
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
const editValue =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
const editValue = _ref => {
|
|
34
|
+
let {
|
|
35
|
+
value,
|
|
36
|
+
rowData,
|
|
37
|
+
property,
|
|
38
|
+
rowIndex
|
|
39
|
+
} = _ref;
|
|
40
40
|
setEditingRows({});
|
|
41
41
|
onColumnRowEdited({
|
|
42
42
|
value,
|
|
@@ -79,10 +79,11 @@ const EditablePlugin = createInstancePlugin('editable', {
|
|
|
79
79
|
registerHotKeys(grid) {
|
|
80
80
|
return {
|
|
81
81
|
key: 'enter',
|
|
82
|
-
handler:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
handler: _ref2 => {
|
|
83
|
+
let {
|
|
84
|
+
rowIndex,
|
|
85
|
+
cellIndex
|
|
86
|
+
} = _ref2;
|
|
86
87
|
const {
|
|
87
88
|
composedRows,
|
|
88
89
|
decoratedColumns,
|
|
@@ -1,11 +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';
|
|
4
9
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
10
|
import 'react';
|
|
6
11
|
import * as edit from 'react-edit';
|
|
7
|
-
import EditPencil from '@elliemae/ds-icons
|
|
8
|
-
import { cx } from '@elliemae/ds-utilities
|
|
12
|
+
import { EditPencil } from '@elliemae/ds-icons';
|
|
13
|
+
import { cx } from '@elliemae/ds-utilities';
|
|
9
14
|
import { appendCellFormatter } from '@elliemae/ds-shared/useDataGrid/initColumnDefinition';
|
|
10
15
|
import getEditorComponent from './getEditorComponent.js';
|
|
11
16
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -48,14 +53,17 @@ const makeEditableConfig = grid => edit.edit({
|
|
|
48
53
|
return editingRows[rowData[rowKey]] === columnIndex || column.alwaysEditing || isCustomEditing;
|
|
49
54
|
},
|
|
50
55
|
onActivate: () => null,
|
|
51
|
-
onValue: (
|
|
56
|
+
onValue: function () {
|
|
57
|
+
return grid.getInstance().actions.editValue(...arguments);
|
|
58
|
+
}
|
|
52
59
|
});
|
|
53
60
|
|
|
54
|
-
const addEditableToCell = ({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
const addEditableToCell = (_ref2, grid) => {
|
|
62
|
+
let {
|
|
63
|
+
column,
|
|
64
|
+
config,
|
|
65
|
+
handlers
|
|
66
|
+
} = _ref2;
|
|
59
67
|
column.cell.transforms.push(config(getEditorComponent(column.customEditor, handlers)));
|
|
60
68
|
column.cell.props.className = cx(column.cell.props.className, "editable".concat(column.customEditor ? ' customEditor' : ''));
|
|
61
69
|
return appendCellFormatter([(value, extraParams) => /*#__PURE__*/jsx(Fragment, {
|