@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.
- package/cjs/DSDataGrid.js +247 -244
- package/cjs/DataGridImpl.js +22 -13
- package/cjs/PaginatedDataGrid.js +11 -6
- package/cjs/blockNames.js +2 -2
- package/cjs/columns/IconColumn.js +23 -21
- package/cjs/columns/NumberColumn.js +2 -4
- package/cjs/components/BodyCell.js +23 -15
- package/cjs/components/BodyList.js +11 -4
- package/cjs/components/ColumnVisibilityMenuOption.js +12 -6
- package/cjs/components/ColumnsOptionsMenuSection.js +35 -28
- package/cjs/components/EmptyState.js +23 -21
- package/cjs/components/HeaderCell.js +17 -11
- package/cjs/components/List.js +6 -1
- package/cjs/components/ListItem.js +8 -1
- package/cjs/components/NoResults.js +8 -3
- package/cjs/components/RowsLoader.js +6 -5
- package/cjs/components/Table.js +9 -4
- package/cjs/components/TableBody.js +8 -3
- package/cjs/components/TableHeader.js +6 -1
- package/cjs/components/footer/addOptionalFooterComponents.js +6 -5
- package/cjs/components/header/PrimaryControls.js +20 -15
- package/cjs/components/header/addOptionalHeaderComponents.js +5 -4
- package/cjs/components/renderers/defaultClassedRenderers.js +35 -23
- package/cjs/components/renderers/renderRowsLoader.js +1 -1
- package/cjs/components/tableContext.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +54 -43
- package/cjs/plugins/column-dnd/DndColumnsPlugin.js +13 -9
- package/cjs/plugins/column-dnd/decorateGridWithDndColumns.js +3 -4
- package/cjs/plugins/column-sizing/ColumnSizingPlugin.js +12 -10
- package/cjs/plugins/column-sizing/columnMeasurerTransformer.js +14 -7
- package/cjs/plugins/column-sizing/ext-points/decorateColumn.js +3 -3
- package/cjs/plugins/column-sizing/ext-points/getTableProps.js +24 -18
- package/cjs/plugins/column-sizing/useColumnSizeService.js +14 -4
- package/cjs/plugins/column-sizing/useStylesheetHelpers.js +70 -56
- package/cjs/plugins/column-sizing/utils.js +10 -6
- package/cjs/plugins/custom-cell-renderer/CustomRendererPlugin.js +2 -2
- package/cjs/plugins/custom-cell-renderer/addCustomRendererToCell.js +11 -6
- package/cjs/plugins/custom-cell-renderer/getRendererComponent.js +24 -25
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +10 -7
- package/cjs/plugins/editable/EditableComponents/TextBox.js +24 -19
- package/cjs/plugins/editable/EditablePlugin.js +17 -16
- package/cjs/plugins/editable/decorateEditable.js +25 -19
- package/cjs/plugins/editable/getEditorComponent.js +46 -35
- package/cjs/plugins/expandable-grid/ExpandableColumn.js +66 -59
- package/cjs/plugins/expandable-grid/ExpandablePlugin.js +42 -30
- package/cjs/plugins/expandable-grid/ExpandedRow.js +41 -31
- package/cjs/plugins/expandable-grid/ExpandedRowExtra.js +22 -16
- package/cjs/plugins/expandable-grid/useExpandGridState.js +4 -8
- package/cjs/plugins/export-data/ExportDataPlugin.js +34 -19
- package/cjs/plugins/filterable/FilterablePlugin.js +9 -8
- package/cjs/plugins/filterable/addFilterToColumn.js +6 -1
- package/cjs/plugins/filterable/components/FilterableHeader.js +39 -30
- package/cjs/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +52 -45
- package/cjs/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +38 -33
- package/cjs/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +127 -161
- package/cjs/plugins/filterable/components/filterable-menus/TextFilterMenu.js +38 -29
- package/cjs/plugins/filterable/filterableFormatter.js +16 -11
- package/cjs/plugins/filterable/filtering-helper/filterRowsByQuery.js +18 -6
- package/cjs/plugins/filterable/filtering-helper/strategiesOperators.js +11 -8
- package/cjs/plugins/filterable/helper.js +18 -8
- package/cjs/plugins/filterable/useFilterableState.js +13 -6
- package/cjs/plugins/grouping-by/GroupingByPlugin.js +4 -2
- package/cjs/plugins/grouping-grid/GroupingPlugin.js +14 -5
- package/cjs/plugins/grouping-grid/walkStrategy.js +13 -9
- package/cjs/plugins/infinite-scrolling/InfiniteScrollPlugin.js +11 -4
- package/cjs/plugins/pagination/PaginationPlugin.js +17 -10
- package/cjs/plugins/pagination/components/Pagination.js +12 -11
- package/cjs/plugins/pagination/components/Paginator.js +23 -22
- package/cjs/plugins/pagination/components/PerPageDropdown.js +24 -17
- package/cjs/plugins/pagination/helper.js +11 -8
- package/cjs/plugins/pagination/usePaginationState.js +9 -4
- package/cjs/plugins/resizable/ResizablePlugin.js +6 -5
- package/cjs/plugins/resizable/decorateResizable.js +16 -10
- package/cjs/plugins/resizable/useResizeHandle.js +21 -16
- package/cjs/plugins/resizable/utils.js +9 -6
- package/cjs/plugins/row-dnd/DndRowsPlugin.js +27 -19
- package/cjs/plugins/selectable/SelectablePlugin.js +13 -12
- package/cjs/plugins/selectable/addSelectableColumn.js +25 -17
- package/cjs/plugins/selectable/helper.js +13 -4
- package/cjs/plugins/selectable/selectableFormatter.js +83 -74
- package/cjs/plugins/selectable/useSelectableState.js +26 -12
- package/cjs/plugins/sortable/SortablePlugin.js +11 -12
- package/cjs/plugins/sortable/checkIfSortable.js +1 -1
- package/cjs/plugins/sortable/sortHeaderFormatter.js +17 -18
- package/cjs/plugins/sortable/sortTree.js +16 -8
- package/cjs/plugins/sortable/sorter.js +153 -135
- package/cjs/plugins/sortable/useSortableState.js +12 -6
- package/cjs/plugins/toolbar/RowRenderer.js +13 -7
- package/cjs/plugins/toolbar/ToolbarPlugin.js +3 -2
- package/cjs/plugins/toolbar/ToolbarTrigger.js +26 -21
- package/cjs/plugins/virtualization/AutoHeightList.js +12 -10
- package/cjs/plugins/virtualization/VirtualizationPlugin.js +35 -28
- package/cjs/plugins/virtualization/VirtualizedBody.js +23 -13
- package/cjs/plugins/virtualization/VirtualizedBodyRow.js +8 -7
- package/cjs/renders/CellWithAddons.js +23 -21
- package/cjs/renders/styled.js +7 -18
- package/cjs/utilities/getPluginsFromProps.js +5 -1
- package/cjs/utilities/getScrollbarSize.js +2 -1
- package/cjs/utilities/normalizeData.js +8 -2
- package/esm/DSDataGrid.js +246 -243
- package/esm/DataGridImpl.js +18 -9
- package/esm/PaginatedDataGrid.js +5 -0
- package/esm/blockNames.js +2 -2
- package/esm/columns/IconColumn.js +19 -17
- package/esm/columns/NumberColumn.js +2 -4
- package/esm/components/BodyCell.js +20 -12
- package/esm/components/BodyList.js +7 -0
- package/esm/components/ColumnVisibilityMenuOption.js +12 -6
- package/esm/components/ColumnsOptionsMenuSection.js +35 -28
- package/esm/components/EmptyState.js +18 -15
- package/esm/components/HeaderCell.js +15 -9
- 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 +35 -23
- package/esm/plugins/body-header-scroll-sync/BodyHeaderScrollSyncPlugin.js +50 -39
- package/esm/plugins/column-dnd/DndColumnsPlugin.js +8 -4
- package/esm/plugins/column-dnd/decorateGridWithDndColumns.js +1 -1
- package/esm/plugins/column-sizing/ColumnSizingPlugin.js +10 -8
- 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 +22 -15
- package/esm/plugins/column-sizing/useColumnSizeService.js +13 -3
- package/esm/plugins/column-sizing/useStylesheetHelpers.js +67 -51
- 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 +8 -4
- package/esm/plugins/editable/EditableComponents/TextBox.js +21 -15
- package/esm/plugins/editable/EditablePlugin.js +14 -12
- package/esm/plugins/editable/decorateEditable.js +18 -9
- package/esm/plugins/editable/getEditorComponent.js +49 -38
- package/esm/plugins/expandable-grid/ExpandableColumn.js +59 -50
- package/esm/plugins/expandable-grid/ExpandablePlugin.js +34 -20
- package/esm/plugins/expandable-grid/ExpandedRow.js +27 -17
- package/esm/plugins/expandable-grid/ExpandedRowExtra.js +17 -11
- package/esm/plugins/expandable-grid/useExpandGridState.js +2 -2
- package/esm/plugins/export-data/ExportDataPlugin.js +31 -16
- package/esm/plugins/filterable/FilterablePlugin.js +5 -4
- package/esm/plugins/filterable/addFilterToColumn.js +5 -0
- package/esm/plugins/filterable/components/FilterableHeader.js +32 -22
- package/esm/plugins/filterable/components/filterable-menus/DateRangeFilterMenu.js +41 -33
- package/esm/plugins/filterable/components/filterable-menus/SingleDateFilterMenu.js +28 -22
- package/esm/plugins/filterable/components/filterable-menus/SingleRangeSwitcherMenu.js +121 -154
- package/esm/plugins/filterable/components/filterable-menus/TextFilterMenu.js +28 -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 +11 -1
- package/esm/plugins/filterable/useFilterableState.js +12 -5
- package/esm/plugins/grouping-by/GroupingByPlugin.js +3 -1
- package/esm/plugins/grouping-grid/GroupingPlugin.js +10 -1
- package/esm/plugins/grouping-grid/walkStrategy.js +13 -9
- package/esm/plugins/infinite-scrolling/InfiniteScrollPlugin.js +8 -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 +20 -19
- package/esm/plugins/pagination/components/PerPageDropdown.js +17 -9
- package/esm/plugins/pagination/helper.js +10 -7
- package/esm/plugins/pagination/usePaginationState.js +7 -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 +7 -4
- package/esm/plugins/row-dnd/DndRowsPlugin.js +22 -13
- package/esm/plugins/selectable/SelectablePlugin.js +10 -9
- 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 +20 -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 +152 -134
- package/esm/plugins/sortable/useSortableState.js +8 -0
- package/esm/plugins/toolbar/RowRenderer.js +8 -2
- package/esm/plugins/toolbar/ToolbarPlugin.js +1 -0
- package/esm/plugins/toolbar/ToolbarTrigger.js +17 -11
- package/esm/plugins/virtualization/AutoHeightList.js +6 -3
- package/esm/plugins/virtualization/VirtualizationPlugin.js +31 -24
- package/esm/plugins/virtualization/VirtualizedBody.js +16 -6
- package/esm/plugins/virtualization/VirtualizedBodyRow.js +8 -7
- package/esm/renders/CellWithAddons.js +15 -14
- package/esm/renders/styled.js +3 -15
- package/esm/utilities/getPluginsFromProps.js +5 -1
- package/esm/utilities/getScrollbarSize.js +2 -1
- package/esm/utilities/normalizeData.js +7 -1
- package/package.json +27 -18
- package/types/DSDataGrid.d.ts +744 -105
- 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/Paginator.d.ts +1 -1
- package/types/plugins/pagination/components/PerPageDropdown.d.ts +1 -1
- package/types/plugins/sortable/sorter.d.ts +1 -1
- package/types/renders/styled.d.ts +3 -3
- package/cjs/package.json +0 -7
- 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
|
|
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:
|
|
52
|
+
transform: "translate3d(".concat(columnTranslate, "px, 0, 0)")
|
|
49
53
|
});
|
|
50
54
|
oldColumn.updateStyle({
|
|
51
55
|
transitionDuration: '300ms',
|
|
52
|
-
transform:
|
|
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
|
|
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
|
-
|
|
14
|
-
|
|
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
|
-
|
|
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,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
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
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(
|
|
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 =
|
|
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(
|
|
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
|
|
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
|
-
|
|
11
|
-
|
|
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 :
|
|
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 =
|
|
33
|
-
stylesheet.updateProperties(window, styleSheet,
|
|
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
|
-
|
|
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
|
-
if (typeof width === 'number') widths =
|
|
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 =
|
|
80
|
+
if (typeof minWidth === 'number') minWidths = "".concat(minWidth, "px");
|
|
74
81
|
stylesheet.updateProperties(window, styleSheet, className, {
|
|
75
|
-
width:
|
|
76
|
-
minWidth:
|
|
82
|
+
width: "".concat(widths || minWidths),
|
|
83
|
+
minWidth: "".concat(widths || minWidths),
|
|
77
84
|
// minWidth: `${minWidths || widths}`,
|
|
78
|
-
maxWidth:
|
|
85
|
+
maxWidth: "".concat(widths || minWidths)
|
|
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,
|
|
@@ -132,7 +145,7 @@ function columnSizesHelperImpl({
|
|
|
132
145
|
getId,
|
|
133
146
|
column
|
|
134
147
|
});
|
|
135
|
-
const headerClassName =
|
|
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
|
|
203
|
+
return "".concat(getColumnClassName({
|
|
191
204
|
globalId,
|
|
192
205
|
getId,
|
|
193
206
|
column
|
|
194
|
-
})
|
|
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
|
-
|
|
215
|
-
|
|
226
|
+
getId: _ref8 => {
|
|
227
|
+
let {
|
|
228
|
+
uuid
|
|
229
|
+
} = _ref8;
|
|
230
|
+
return getColumnFromProperty(uuid);
|
|
231
|
+
}
|
|
216
232
|
}));
|
|
217
|
-
const rowClassName =
|
|
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
|
|
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; }
|
|
@@ -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-
|
|
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
|
});
|
|
@@ -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
|
|
2
|
-
import { toggleInObject } from '@elliemae/ds-utilities
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
83
|
-
|
|
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
|
|
7
|
-
import { cx } from '@elliemae/ds-utilities
|
|
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: (
|
|
56
|
+
onValue: function () {
|
|
57
|
+
return grid.getInstance().actions.editValue(...arguments);
|
|
58
|
+
}
|
|
51
59
|
});
|
|
52
60
|
|
|
53
|
-
const addEditableToCell = ({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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,
|
|
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 => {
|