@elliemae/ds-data-table 2.0.0-alpha.3 → 2.0.0-alpha.7
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/DataTable.js +4 -4
- package/cjs/DataTableContext.js +1 -1
- package/cjs/addons/Columns/ColumnDragHandle/ColumnDragHandle.js +3 -3
- package/cjs/addons/Columns/ColumnExpand/ColumnExpand.js +37 -24
- package/cjs/addons/Columns/ColumnSelectMultiple/ColumnSelectMultiple.js +8 -9
- package/cjs/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.js +4 -5
- package/cjs/addons/Editables/ComboboxEditableCell/ComboboxEditableCell.js +8 -8
- package/cjs/addons/Editables/DateEditableCell/DateEditableCell.js +8 -8
- package/cjs/addons/Editables/TextEditableCell/TextEditableCell.js +8 -8
- package/cjs/addons/Filters/Components/DateRangeFilter/index.js +10 -10
- package/cjs/addons/Filters/Components/NumberRangeFilter/index.js +7 -8
- package/cjs/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +7 -8
- package/cjs/addons/Filters/Components/SelectFilter/MultiSelectFilter.js +8 -8
- package/cjs/addons/Filters/Components/SelectFilter/SingleSelectFilter.js +8 -8
- package/cjs/addons/Filters/Components/SelectFilter/components.js +6 -6
- package/cjs/addons/Filters/Components/SelectFilter/utils.js +1 -2
- package/cjs/addons/Filters/Components/SingleDateFilter/index.js +9 -9
- package/cjs/addons/Filters/Components/TextInputFilter/index.js +3 -4
- package/cjs/addons/Pagination/ActiveZoneButtons.js +5 -5
- package/cjs/addons/Pagination/PagesButtons.js +4 -5
- package/cjs/addons/Pagination/Pagination.js +5 -6
- package/cjs/addons/Pagination/PerPageSelector.js +6 -6
- package/cjs/configs/constants.js +2 -1
- package/cjs/configs/index.js +1 -3
- package/cjs/configs/useTableColsWithAddons.js +1 -1
- package/cjs/exported-related/EditableCell.js +9 -2
- package/cjs/exported-related/FilterPopover.js +24 -72
- package/cjs/exported-related/Filters/dateRangeFilterFn.js +2 -3
- package/cjs/exported-related/Filters/singleDateFilterFn.js +2 -3
- package/cjs/exported-related/RowRenderer/DefaultRowContentRenderer.js +7 -5
- package/cjs/exported-related/RowRenderer/index.js +9 -8
- package/cjs/exported-related/RowRenderer/useRowRendererHandlers.js +6 -2
- package/cjs/exported-related/RowRenderer/useRowRendererProperties.js +2 -2
- package/cjs/exported-related/RowRenderer/useRowStyle.js +1 -1
- package/cjs/exported-related/Toolbar/Toolbar.js +6 -7
- package/cjs/helpers/addCellData.js +3 -2
- package/cjs/helpers/dndkit/hierarchy/customCollisionDetection.js +1 -2
- package/cjs/helpers/dndkit/hierarchy/getHierarchyKeyboardCoordinates.js +2 -3
- package/cjs/helpers/dndkit/hierarchy/useHierarchyDndkitConfig.js +1 -1
- package/cjs/helpers/dndkit/hierarchy/useHierarchyPreviewHandlers.js +1 -2
- package/cjs/helpers/dndkit/tree/getTreeKeyboardCoordinates.js +1 -1
- package/cjs/helpers/dndkit/tree/useTreeDndkitConfig.js +1 -1
- package/cjs/parts/Cells/Cell.js +5 -5
- package/cjs/parts/Cells/index.js +5 -5
- package/cjs/parts/Cells/useCellStyle.js +1 -1
- package/cjs/parts/DnDHandle.js +3 -4
- package/cjs/parts/DropIndicator.js +4 -4
- package/cjs/parts/EmptyContent.js +12 -12
- package/cjs/parts/FilterBar/FiltersBar.js +12 -12
- package/cjs/parts/FilterBar/components/DateRangePill.js +2 -2
- package/cjs/parts/FilterBar/components/MultiSelectPill.js +4 -3
- package/cjs/parts/FilterBar/components/NumberRangePill.js +2 -2
- package/cjs/parts/FilterBar/components/SelectPill.js +2 -2
- package/cjs/parts/FilterBar/components/SingleDatePill.js +2 -2
- package/cjs/parts/FilterBar/components/TextPill.js +2 -2
- package/cjs/parts/FilterBar/styled.js +2 -2
- package/cjs/parts/Filters/index.js +8 -9
- package/cjs/parts/Footer.js +1 -1
- package/cjs/parts/Headers/EmptyChildrenGroup.js +2 -2
- package/cjs/parts/Headers/HeaderCell.js +11 -12
- package/cjs/parts/Headers/HeaderCellGroup.js +5 -6
- package/cjs/parts/Headers/HeaderCellTitle.js +27 -6
- package/cjs/parts/Headers/HeaderResizer.js +3 -4
- package/cjs/parts/Headers/RequiredDot.js +2 -2
- package/cjs/parts/Headers/index.js +4 -4
- package/cjs/parts/Headers/useHeaderCellHandlers.js +1 -1
- package/cjs/parts/HoC/withConditionalDnDColumnContext.js +6 -6
- package/cjs/parts/HoC/withConditionalDnDRowContext.js +7 -7
- package/cjs/parts/HoC/withConditionalDnDSortableContext.js +3 -3
- package/cjs/parts/HoC/withDnDSortableColumnContext.js +3 -3
- package/cjs/parts/HoC/withDnDSortableRowContext.js +3 -3
- package/cjs/parts/Loader.js +3 -3
- package/cjs/parts/Row.js +2 -2
- package/cjs/parts/RowLoading.js +3 -4
- package/cjs/parts/RowVariants/RowVariantHeader.js +5 -5
- package/cjs/parts/RowVariants/RowVariantPrimary.js +1 -1
- package/cjs/parts/RowVariants/RowVariantSecondary.js +1 -1
- package/cjs/parts/RowVariants/index.js +8 -8
- package/cjs/parts/Rows.js +2 -2
- package/cjs/parts/SortByCaret.js +3 -3
- package/cjs/parts/SortableHeaderCell.js +2 -2
- package/cjs/parts/TableContent.js +11 -8
- package/cjs/parts/VirtualRowsList.js +6 -7
- package/cjs/prop-types.js +25 -25
- package/cjs/redux/reducers/headersReducers/logic.js +1 -1
- package/cjs/redux/reducers/index.js +1 -1
- package/cjs/redux/storeConfig.js +1 -1
- package/cjs/styled.js +24 -29
- package/esm/addons/Columns/ColumnExpand/ColumnExpand.js +27 -13
- package/esm/addons/Columns/ColumnSelectMultiple/ColumnSelectMultiple.js +5 -6
- package/esm/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.js +0 -1
- package/esm/addons/Editables/ComboboxEditableCell/ComboboxEditableCell.js +5 -5
- package/esm/addons/Editables/DateEditableCell/DateEditableCell.js +5 -5
- package/esm/addons/Editables/TextEditableCell/TextEditableCell.js +4 -4
- package/esm/addons/Filters/Components/DateRangeFilter/index.js +3 -3
- package/esm/addons/Filters/Components/NumberRangeFilter/index.js +0 -1
- package/esm/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +0 -1
- package/esm/addons/Filters/Components/SelectFilter/MultiSelectFilter.js +7 -7
- package/esm/addons/Filters/Components/SelectFilter/SingleSelectFilter.js +7 -7
- package/esm/addons/Filters/Components/SelectFilter/utils.js +1 -2
- package/esm/addons/Filters/Components/SingleDateFilter/index.js +2 -2
- package/esm/addons/Filters/Components/TextInputFilter/index.js +0 -1
- package/esm/addons/Pagination/PagesButtons.js +0 -1
- package/esm/addons/Pagination/Pagination.js +1 -2
- package/esm/configs/constants.js +2 -1
- package/esm/exported-related/EditableCell.js +8 -1
- package/esm/exported-related/FilterPopover.js +20 -67
- package/esm/exported-related/Filters/dateRangeFilterFn.js +1 -2
- package/esm/exported-related/Filters/singleDateFilterFn.js +1 -2
- package/esm/exported-related/RowRenderer/DefaultRowContentRenderer.js +3 -1
- package/esm/exported-related/RowRenderer/index.js +4 -3
- package/esm/exported-related/RowRenderer/useRowRendererHandlers.js +5 -1
- package/esm/exported-related/Toolbar/Toolbar.js +0 -1
- package/esm/helpers/addCellData.js +2 -1
- package/esm/helpers/dndkit/hierarchy/customCollisionDetection.js +1 -2
- package/esm/helpers/dndkit/hierarchy/getHierarchyKeyboardCoordinates.js +1 -2
- package/esm/helpers/dndkit/hierarchy/useHierarchyPreviewHandlers.js +1 -2
- package/esm/parts/Cells/index.js +2 -2
- package/esm/parts/DnDHandle.js +0 -1
- package/esm/parts/FilterBar/FiltersBar.js +5 -5
- package/esm/parts/FilterBar/components/MultiSelectPill.js +3 -2
- package/esm/parts/Filters/index.js +7 -8
- package/esm/parts/Headers/HeaderCell.js +0 -1
- package/esm/parts/Headers/HeaderCellGroup.js +0 -1
- package/esm/parts/Headers/HeaderCellTitle.js +22 -1
- package/esm/parts/Headers/HeaderResizer.js +1 -2
- package/esm/parts/RowLoading.js +0 -1
- package/esm/parts/RowVariants/index.js +7 -7
- package/esm/parts/TableContent.js +7 -4
- package/esm/parts/VirtualRowsList.js +1 -2
- package/esm/styled.js +3 -8
- package/package.json +4 -4
- package/types/configs/constants.d.ts +1 -0
- package/types/exported-related/FilterPopover.d.ts +0 -3
- package/types/exported-related/RowRenderer/useRowRendererHandlers.d.ts +1 -0
- package/types/styled.d.ts +3 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
3
|
import { useMemo, useCallback } from 'react';
|
|
4
|
-
import ArrowShortReturn from '@elliemae/ds-icons
|
|
4
|
+
import { ArrowheadDown, ArrowheadRight, ArrowShortReturn } from '@elliemae/ds-icons';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
|
-
import { CollapseAll, ExpandAll, ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
7
6
|
import { StyledFocusWithin } from '../../../styled.js';
|
|
8
7
|
import { DATA_TESTID } from '../../../configs/constants.js';
|
|
9
8
|
import 'react-virtual';
|
|
@@ -28,7 +27,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
28
27
|
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; }
|
|
29
28
|
const StyledSpan = /*#__PURE__*/styled.span.withConfig({
|
|
30
29
|
componentId: "sc-1xp824d-0"
|
|
31
|
-
})(["cursor:pointer;box-sizing:border-box;outline:none;"]);
|
|
30
|
+
})(["cursor:pointer;box-sizing:border-box;outline:none;display:flex;justify-content:center;align-items:center;"]);
|
|
32
31
|
const expandRowColumn = {
|
|
33
32
|
// Build our expander column
|
|
34
33
|
id: 'expander',
|
|
@@ -53,20 +52,32 @@ const expandRowColumn = {
|
|
|
53
52
|
}, [allDataFlattened]);
|
|
54
53
|
const isAllRowsExpanded = useMemo(() => Object.keys(allExpandable).length === Object.keys(expandedRows).length, [allExpandable, expandedRows]);
|
|
55
54
|
const onExpandedAllHandler = useCallback(() => {
|
|
56
|
-
if (isAllRowsExpanded) onRowExpand({}, 'All');else onRowExpand(allExpandable, 'All');
|
|
55
|
+
if (isAllRowsExpanded) onRowExpand({}, 'All');else onRowExpand(_objectSpread({}, allExpandable), 'All');
|
|
57
56
|
}, [allExpandable, isAllRowsExpanded, onRowExpand]);
|
|
58
57
|
const GlobalExpandIcon = useMemo(() => {
|
|
59
|
-
if (isAllRowsExpanded) return /*#__PURE__*/_jsx(
|
|
60
|
-
size: "
|
|
58
|
+
if (isAllRowsExpanded) return /*#__PURE__*/_jsx(ArrowheadDown, {
|
|
59
|
+
size: "s",
|
|
61
60
|
color: ['brand-primary', '600'],
|
|
62
61
|
"data-testid": DATA_TESTID.DATA_TABLE_ICON_ARROW_DOWN
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
}); // Mixed
|
|
63
|
+
|
|
64
|
+
if (Object.keys(expandedRows).length) {
|
|
65
|
+
return /*#__PURE__*/_jsx(ArrowheadRight, {
|
|
66
|
+
size: "s",
|
|
67
|
+
color: ['brand-primary', '600'],
|
|
68
|
+
"data-testid": DATA_TESTID.DATA_TABLE_ICON_ARROW_MIXED,
|
|
69
|
+
style: {
|
|
70
|
+
transform: 'rotate(45deg)'
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return /*#__PURE__*/_jsx(ArrowheadRight, {
|
|
76
|
+
size: "s",
|
|
66
77
|
color: ['brand-primary', '600'],
|
|
67
78
|
"data-testid": DATA_TESTID.DATA_TABLE_ICON_ARROW_RIGHT
|
|
68
79
|
});
|
|
69
|
-
}, [isAllRowsExpanded]);
|
|
80
|
+
}, [expandedRows, isAllRowsExpanded]);
|
|
70
81
|
return /*#__PURE__*/_jsx(StyledFocusWithin, {}, void 0, /*#__PURE__*/_jsx(StyledSpan, {
|
|
71
82
|
role: "button",
|
|
72
83
|
tabIndex: 0,
|
|
@@ -80,7 +91,10 @@ const expandRowColumn = {
|
|
|
80
91
|
},
|
|
81
92
|
"data-testid": DATA_TESTID.DATA_TABLE_GLOBAL_EXPAND_CELL,
|
|
82
93
|
"aria-expanded": isAllRowsExpanded,
|
|
83
|
-
|
|
94
|
+
style: {
|
|
95
|
+
width: '24px',
|
|
96
|
+
height: '24px'
|
|
97
|
+
}
|
|
84
98
|
}, void 0, GlobalExpandIcon));
|
|
85
99
|
},
|
|
86
100
|
Cell: ({
|
|
@@ -119,7 +133,7 @@ const expandRowColumn = {
|
|
|
119
133
|
const indentStyle = useMemo(() => ({
|
|
120
134
|
marginLeft: `${row.depth * 32}px`,
|
|
121
135
|
marginRight: '18px',
|
|
122
|
-
paddingLeft: '
|
|
136
|
+
paddingLeft: '2px',
|
|
123
137
|
paddingRight: '2px',
|
|
124
138
|
position: 'relative',
|
|
125
139
|
height: '100%',
|
|
@@ -5,9 +5,8 @@ import DSCheckbox from '@elliemae/ds-form/Checkbox';
|
|
|
5
5
|
import { DATA_TESTID } from '../../../configs/constants.js';
|
|
6
6
|
import 'react-virtual';
|
|
7
7
|
import '../../../configs/useRowFlattenization.js';
|
|
8
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
9
|
-
import 'styled-components';
|
|
10
8
|
import '@elliemae/ds-icons';
|
|
9
|
+
import 'styled-components';
|
|
11
10
|
import '../../../styled.js';
|
|
12
11
|
import 'react/jsx-runtime';
|
|
13
12
|
import '@elliemae/ds-form/Radio';
|
|
@@ -63,8 +62,8 @@ const multiSelectColumn = {
|
|
|
63
62
|
|
|
64
63
|
return {};
|
|
65
64
|
}, [newGlobalStateAfterToggle, allDataFlattened, disabledRows]);
|
|
66
|
-
const onChangeHandler = useCallback(
|
|
67
|
-
onSelectionChange(newSelection);
|
|
65
|
+
const onChangeHandler = useCallback(e => {
|
|
66
|
+
onSelectionChange(newSelection, 'All', e);
|
|
68
67
|
}, [newSelection, onSelectionChange]);
|
|
69
68
|
const PureHeaderCheckbox = useMemo(() => /*#__PURE__*/_jsx(DSCheckbox, {
|
|
70
69
|
"data-testid": DATA_TESTID.DATA_TABLE_GLOBAL_CHECKBOX,
|
|
@@ -101,7 +100,7 @@ const multiSelectColumn = {
|
|
|
101
100
|
"aria-checked": selectedState,
|
|
102
101
|
"aria-disabled": false,
|
|
103
102
|
checked: selectedState,
|
|
104
|
-
onChange:
|
|
103
|
+
onChange: e => {
|
|
105
104
|
const newState = !selectedState;
|
|
106
105
|
|
|
107
106
|
const newSelection = _objectSpread(_objectSpread({}, selection), {}, {
|
|
@@ -111,7 +110,7 @@ const multiSelectColumn = {
|
|
|
111
110
|
|
|
112
111
|
if (!newState) delete newSelection[uid]; // if newState is false, remove from the new selection
|
|
113
112
|
|
|
114
|
-
onSelectionChange(newSelection);
|
|
113
|
+
onSelectionChange(newSelection, uid, e);
|
|
115
114
|
},
|
|
116
115
|
disabled: disabledRows[row.uid],
|
|
117
116
|
innerRef: cell.ref,
|
|
@@ -6,7 +6,6 @@ import { DATA_TESTID } from '../../../configs/constants.js';
|
|
|
6
6
|
import 'react-virtual';
|
|
7
7
|
import '../../../configs/useRowFlattenization.js';
|
|
8
8
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
9
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
10
9
|
import '@elliemae/ds-icons';
|
|
11
10
|
import '../../../styled.js';
|
|
12
11
|
import 'react/jsx-runtime';
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import { useContext, useMemo, useState, useCallback } from 'react';
|
|
3
3
|
import ComboBoxFreeSolo from '@elliemae/ds-form/ComboBoxFreeSolo';
|
|
4
|
-
import '../../../exported-related/FilterPopover.js';
|
|
5
|
-
import { EditableCell } from '../../../exported-related/EditableCell.js';
|
|
6
|
-
import 'styled-components';
|
|
7
4
|
import '@elliemae/ds-button';
|
|
8
|
-
import '@elliemae/ds-
|
|
5
|
+
import '@elliemae/ds-popperjs';
|
|
6
|
+
import 'styled-components';
|
|
7
|
+
import '../../../redux/reducers/index.js';
|
|
9
8
|
import '../../../configs/constants.js';
|
|
10
9
|
import 'react-virtual';
|
|
11
10
|
import '../../../configs/useRowFlattenization.js';
|
|
12
11
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
13
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
14
12
|
import '@elliemae/ds-icons';
|
|
15
13
|
import '../../../styled.js';
|
|
16
14
|
import 'react/jsx-runtime';
|
|
@@ -26,6 +24,8 @@ import '../../../parts/Row.js';
|
|
|
26
24
|
import '../../../parts/Footer.js';
|
|
27
25
|
import '@elliemae/ds-icons/GripperVertical';
|
|
28
26
|
import '../../../parts/HoC/SortableItemContext.js';
|
|
27
|
+
import { EditableCell } from '../../../exported-related/EditableCell.js';
|
|
28
|
+
import '@elliemae/ds-icons/MoreOptionsVert';
|
|
29
29
|
import 'uid';
|
|
30
30
|
import '../../../exported-related/Filters/applyOutOfTheBoxFilters.js';
|
|
31
31
|
import 'moment';
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import { useContext, useState, useCallback } from 'react';
|
|
3
|
-
import '../../../exported-related/FilterPopover.js';
|
|
4
|
-
import { EditableCell } from '../../../exported-related/EditableCell.js';
|
|
5
|
-
import 'styled-components';
|
|
6
3
|
import '@elliemae/ds-button';
|
|
7
|
-
import '@elliemae/ds-
|
|
4
|
+
import '@elliemae/ds-popperjs';
|
|
5
|
+
import 'styled-components';
|
|
6
|
+
import '../../../redux/reducers/index.js';
|
|
8
7
|
import '../../../configs/constants.js';
|
|
9
8
|
import 'react-virtual';
|
|
10
9
|
import '../../../configs/useRowFlattenization.js';
|
|
11
10
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
12
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
13
11
|
import '@elliemae/ds-icons';
|
|
14
12
|
import '../../../styled.js';
|
|
15
13
|
import 'react/jsx-runtime';
|
|
@@ -25,6 +23,8 @@ import '../../../parts/Row.js';
|
|
|
25
23
|
import '../../../parts/Footer.js';
|
|
26
24
|
import '@elliemae/ds-icons/GripperVertical';
|
|
27
25
|
import '../../../parts/HoC/SortableItemContext.js';
|
|
26
|
+
import { EditableCell } from '../../../exported-related/EditableCell.js';
|
|
27
|
+
import '@elliemae/ds-icons/MoreOptionsVert';
|
|
28
28
|
import 'uid';
|
|
29
29
|
import '../../../exported-related/Filters/applyOutOfTheBoxFilters.js';
|
|
30
30
|
import 'moment';
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import { useContext, useState, useCallback } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import '../../../exported-related/FilterPopover.js';
|
|
5
|
-
import { EditableCell } from '../../../exported-related/EditableCell.js';
|
|
6
4
|
import '@elliemae/ds-button';
|
|
7
|
-
import '@elliemae/ds-
|
|
5
|
+
import '@elliemae/ds-popperjs';
|
|
6
|
+
import '../../../redux/reducers/index.js';
|
|
8
7
|
import '../../../configs/constants.js';
|
|
9
8
|
import 'react-virtual';
|
|
10
9
|
import '../../../configs/useRowFlattenization.js';
|
|
11
10
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
12
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
13
11
|
import '@elliemae/ds-icons';
|
|
14
12
|
import '../../../styled.js';
|
|
15
13
|
import 'react/jsx-runtime';
|
|
@@ -25,6 +23,8 @@ import '../../../parts/Row.js';
|
|
|
25
23
|
import '../../../parts/Footer.js';
|
|
26
24
|
import '@elliemae/ds-icons/GripperVertical';
|
|
27
25
|
import '../../../parts/HoC/SortableItemContext.js';
|
|
26
|
+
import { EditableCell } from '../../../exported-related/EditableCell.js';
|
|
27
|
+
import '@elliemae/ds-icons/MoreOptionsVert';
|
|
28
28
|
import 'uid';
|
|
29
29
|
import '../../../exported-related/Filters/applyOutOfTheBoxFilters.js';
|
|
30
30
|
import 'moment';
|
|
@@ -14,7 +14,6 @@ import { DATA_TESTID } from '../../../../configs/constants.js';
|
|
|
14
14
|
import 'react-virtual';
|
|
15
15
|
import '../../../../configs/useRowFlattenization.js';
|
|
16
16
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
17
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
18
17
|
import '@elliemae/ds-icons';
|
|
19
18
|
import '@elliemae/ds-form/Checkbox';
|
|
20
19
|
import '@elliemae/ds-form/Radio';
|
|
@@ -56,7 +55,7 @@ const DateRangeFilter = props => {
|
|
|
56
55
|
setEndDate(dateRange.endDate || '');
|
|
57
56
|
}, [dateRange]);
|
|
58
57
|
useEffect(() => {
|
|
59
|
-
if (!startDate.includes('_') && !endDate.includes('_')) {
|
|
58
|
+
if (startDate && endDate && !startDate.includes('_') && !endDate.includes('_')) {
|
|
60
59
|
onValueChange(FILTER_TYPES.DATE_RANGE, {
|
|
61
60
|
startDate,
|
|
62
61
|
endDate
|
|
@@ -79,7 +78,8 @@ const DateRangeFilter = props => {
|
|
|
79
78
|
onFromDateChange: setStartDate,
|
|
80
79
|
toDate: endDate,
|
|
81
80
|
onToDateChange: setEndDate,
|
|
82
|
-
type: "date-range-inputs"
|
|
81
|
+
type: "date-range-inputs",
|
|
82
|
+
autoFocus: true
|
|
83
83
|
})), /*#__PURE__*/_jsx(Grid, {
|
|
84
84
|
onKeyDown: e => e.code === 'Enter' && setTimeout(() => patchHeaderFilterButtonAndMenu(id, !!(dateRange.startDate || dateRange.endDate)), 0)
|
|
85
85
|
}, void 0, /*#__PURE__*/_jsx(DSControlledDateRangePicker, {
|
|
@@ -14,7 +14,6 @@ import '@elliemae/ds-icons/MoreOptionsVert';
|
|
|
14
14
|
import { DATA_TESTID } from '../../../../configs/constants.js';
|
|
15
15
|
import 'react-virtual';
|
|
16
16
|
import '../../../../configs/useRowFlattenization.js';
|
|
17
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
18
17
|
import '@elliemae/ds-icons';
|
|
19
18
|
import '@elliemae/ds-form/Checkbox';
|
|
20
19
|
import '@elliemae/ds-form/Radio';
|
|
@@ -31,7 +31,6 @@ import '@elliemae/ds-icons/MoreOptionsVert';
|
|
|
31
31
|
import { DATA_TESTID } from '../../../../configs/constants.js';
|
|
32
32
|
import '../../../../configs/useRowFlattenization.js';
|
|
33
33
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
34
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
35
34
|
import '@elliemae/ds-icons';
|
|
36
35
|
import '@elliemae/ds-form/Radio';
|
|
37
36
|
import '../../../../parts/TableContent.js';
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
3
|
import { BaseSelectFilter } from './BaseSelectFilter.js';
|
|
4
|
-
import '../../../../exported-related/FilterPopover.js';
|
|
5
|
-
import '../../../../styled.js';
|
|
6
|
-
import '../../../../DataTableContext.js';
|
|
7
|
-
import 'react/jsx-runtime';
|
|
8
|
-
import 'styled-components';
|
|
9
4
|
import '@elliemae/ds-button';
|
|
10
|
-
import '@elliemae/ds-
|
|
5
|
+
import '@elliemae/ds-popperjs';
|
|
6
|
+
import 'styled-components';
|
|
7
|
+
import '../../../../redux/reducers/index.js';
|
|
11
8
|
import { DATA_TESTID } from '../../../../configs/constants.js';
|
|
12
9
|
import 'react-virtual';
|
|
13
10
|
import '../../../../configs/useRowFlattenization.js';
|
|
14
11
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
15
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
16
12
|
import '@elliemae/ds-icons';
|
|
13
|
+
import '../../../../styled.js';
|
|
14
|
+
import 'react/jsx-runtime';
|
|
17
15
|
import '@elliemae/ds-form/Checkbox';
|
|
18
16
|
import '@elliemae/ds-form/Radio';
|
|
19
17
|
import '../../../../parts/TableContent.js';
|
|
@@ -21,10 +19,12 @@ import '@elliemae/ds-grid';
|
|
|
21
19
|
import '@elliemae/ds-circular-progress-indicator';
|
|
22
20
|
import '@elliemae/ds-icons/WarningTriangle';
|
|
23
21
|
import '@elliemae/ds-system';
|
|
22
|
+
import '../../../../DataTableContext.js';
|
|
24
23
|
import '../../../../parts/Row.js';
|
|
25
24
|
import '../../../../parts/Footer.js';
|
|
26
25
|
import '@elliemae/ds-icons/GripperVertical';
|
|
27
26
|
import '../../../../parts/HoC/SortableItemContext.js';
|
|
27
|
+
import '@elliemae/ds-icons/MoreOptionsVert';
|
|
28
28
|
import 'uid';
|
|
29
29
|
import { FILTER_TYPES } from '../../../../exported-related/FilterTypes.js';
|
|
30
30
|
import '../../../../exported-related/Filters/applyOutOfTheBoxFilters.js';
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import 'react';
|
|
3
3
|
import { BaseSelectFilter } from './BaseSelectFilter.js';
|
|
4
|
-
import '../../../../exported-related/FilterPopover.js';
|
|
5
|
-
import '../../../../styled.js';
|
|
6
|
-
import '../../../../DataTableContext.js';
|
|
7
|
-
import 'react/jsx-runtime';
|
|
8
|
-
import 'styled-components';
|
|
9
4
|
import '@elliemae/ds-button';
|
|
10
|
-
import '@elliemae/ds-
|
|
5
|
+
import '@elliemae/ds-popperjs';
|
|
6
|
+
import 'styled-components';
|
|
7
|
+
import '../../../../redux/reducers/index.js';
|
|
11
8
|
import { DATA_TESTID } from '../../../../configs/constants.js';
|
|
12
9
|
import 'react-virtual';
|
|
13
10
|
import '../../../../configs/useRowFlattenization.js';
|
|
14
11
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
15
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
16
12
|
import '@elliemae/ds-icons';
|
|
13
|
+
import '../../../../styled.js';
|
|
14
|
+
import 'react/jsx-runtime';
|
|
17
15
|
import '@elliemae/ds-form/Checkbox';
|
|
18
16
|
import '@elliemae/ds-form/Radio';
|
|
19
17
|
import '../../../../parts/TableContent.js';
|
|
@@ -21,10 +19,12 @@ import '@elliemae/ds-grid';
|
|
|
21
19
|
import '@elliemae/ds-circular-progress-indicator';
|
|
22
20
|
import '@elliemae/ds-icons/WarningTriangle';
|
|
23
21
|
import '@elliemae/ds-system';
|
|
22
|
+
import '../../../../DataTableContext.js';
|
|
24
23
|
import '../../../../parts/Row.js';
|
|
25
24
|
import '../../../../parts/Footer.js';
|
|
26
25
|
import '@elliemae/ds-icons/GripperVertical';
|
|
27
26
|
import '../../../../parts/HoC/SortableItemContext.js';
|
|
27
|
+
import '@elliemae/ds-icons/MoreOptionsVert';
|
|
28
28
|
import 'uid';
|
|
29
29
|
import { FILTER_TYPES } from '../../../../exported-related/FilterTypes.js';
|
|
30
30
|
import '../../../../exported-related/Filters/applyOutOfTheBoxFilters.js';
|
|
@@ -4,9 +4,8 @@ import 'react-virtual';
|
|
|
4
4
|
import '../../../../configs/useRowFlattenization.js';
|
|
5
5
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
6
6
|
import '@babel/runtime/helpers/esm/jsx';
|
|
7
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
8
|
-
import 'styled-components';
|
|
9
7
|
import '@elliemae/ds-icons';
|
|
8
|
+
import 'styled-components';
|
|
10
9
|
import '../../../../styled.js';
|
|
11
10
|
import 'react/jsx-runtime';
|
|
12
11
|
import '@elliemae/ds-form/Checkbox';
|
|
@@ -14,7 +14,6 @@ import { DATA_TESTID } from '../../../../configs/constants.js';
|
|
|
14
14
|
import 'react-virtual';
|
|
15
15
|
import '../../../../configs/useRowFlattenization.js';
|
|
16
16
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
17
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
18
17
|
import '@elliemae/ds-icons';
|
|
19
18
|
import '@elliemae/ds-form/Checkbox';
|
|
20
19
|
import '@elliemae/ds-form/Radio';
|
|
@@ -68,7 +67,8 @@ const SingleDateFilter = props => {
|
|
|
68
67
|
date: date,
|
|
69
68
|
onDateChange: setDate,
|
|
70
69
|
type: "date-inputs",
|
|
71
|
-
isClearable: true
|
|
70
|
+
isClearable: true,
|
|
71
|
+
autoFocus: true
|
|
72
72
|
})), /*#__PURE__*/_jsx(Grid, {
|
|
73
73
|
onKeyDown: e => e.code === 'Enter' && setTimeout(commitDateChange, 0)
|
|
74
74
|
}, void 0, /*#__PURE__*/_jsx(DSControlledDateTimePicker, {
|
|
@@ -12,7 +12,6 @@ import '../../../../configs/constants.js';
|
|
|
12
12
|
import 'react-virtual';
|
|
13
13
|
import '../../../../configs/useRowFlattenization.js';
|
|
14
14
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
15
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
16
15
|
import '@elliemae/ds-icons';
|
|
17
16
|
import '@elliemae/ds-form/Checkbox';
|
|
18
17
|
import '@elliemae/ds-form/Radio';
|
|
@@ -7,7 +7,6 @@ import { DATA_TESTID } from '../../configs/constants.js';
|
|
|
7
7
|
import 'react-virtual';
|
|
8
8
|
import '../../configs/useRowFlattenization.js';
|
|
9
9
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
10
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
11
10
|
import '@elliemae/ds-icons';
|
|
12
11
|
import '../../styled.js';
|
|
13
12
|
import { jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -8,9 +8,8 @@ import { DATA_TESTID } from '../../configs/constants.js';
|
|
|
8
8
|
import 'react-virtual';
|
|
9
9
|
import '../../configs/useRowFlattenization.js';
|
|
10
10
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
11
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
12
|
-
import 'styled-components';
|
|
13
11
|
import '@elliemae/ds-icons';
|
|
12
|
+
import 'styled-components';
|
|
14
13
|
import 'react/jsx-runtime';
|
|
15
14
|
import '@elliemae/ds-form/Checkbox';
|
|
16
15
|
import '@elliemae/ds-form/Radio';
|
package/esm/configs/constants.js
CHANGED
|
@@ -38,7 +38,8 @@ const DATA_TESTID = {
|
|
|
38
38
|
DATA_TABLE_HEADER: 'data-table-header',
|
|
39
39
|
DATA_TABLE_ROW_HEADER_CONTENT: 'data-table-row-header-content',
|
|
40
40
|
DATA_TABLE_ROW_GROUP_HEADER: 'data-table-row-group-header',
|
|
41
|
-
DATA_TABLE_COLUMN_DRAG_OVERLAY: 'data-table-drag-column-drag-overlay'
|
|
41
|
+
DATA_TABLE_COLUMN_DRAG_OVERLAY: 'data-table-drag-column-drag-overlay',
|
|
42
|
+
DATA_TABLE_HEADER_CELL_TITLE: 'header-cell-title'
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
export { ColsLayoutStyle, DATA_TESTID, momentFormat };
|
|
@@ -52,7 +52,14 @@ const EditableCell = props => {
|
|
|
52
52
|
onKeyDown: handleOnKeyDown,
|
|
53
53
|
onBlur: handleOnBlur,
|
|
54
54
|
shouldDisplayEditIcon: cell.column.alwaysDisplayEditIcon,
|
|
55
|
-
|
|
55
|
+
"aria-describedby": isEditing ? undefined : cell.id,
|
|
56
|
+
children: [!isEditing ? StandardRender : EditableRenderer, !isEditing && (_StyledPencilIcon || (_StyledPencilIcon = /*#__PURE__*/_jsx(StyledPencilIcon, {}))), /*#__PURE__*/_jsx("span", {
|
|
57
|
+
id: cell.id,
|
|
58
|
+
style: {
|
|
59
|
+
display: 'none'
|
|
60
|
+
},
|
|
61
|
+
"aria-hidden": "false"
|
|
62
|
+
}, void 0, "Editable cell. To edit the content's of this cell, press the Enter key")]
|
|
56
63
|
});
|
|
57
64
|
};
|
|
58
65
|
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
-
import {
|
|
4
|
-
import { usePopper } from 'react-popper';
|
|
2
|
+
import { useState } from 'react';
|
|
5
3
|
import DSButton from '@elliemae/ds-button';
|
|
4
|
+
import { DSPopperJS } from '@elliemae/ds-popperjs';
|
|
6
5
|
import styled from 'styled-components';
|
|
7
|
-
import { useOnClickOutside } from '@elliemae/ds-utilities/hooks';
|
|
8
6
|
import '../redux/reducers/index.js';
|
|
9
7
|
import { DATA_TESTID } from '../configs/constants.js';
|
|
10
8
|
import 'react-virtual';
|
|
11
9
|
import '../configs/useRowFlattenization.js';
|
|
12
|
-
import '@
|
|
10
|
+
import '@babel/runtime/helpers/esm/defineProperty';
|
|
13
11
|
import '@elliemae/ds-icons';
|
|
14
12
|
import '../styled.js';
|
|
15
|
-
import
|
|
13
|
+
import 'react/jsx-runtime';
|
|
16
14
|
import '@elliemae/ds-form/Checkbox';
|
|
17
15
|
import '@elliemae/ds-form/Radio';
|
|
18
16
|
import '../parts/TableContent.js';
|
|
@@ -27,9 +25,6 @@ import '@elliemae/ds-icons/GripperVertical';
|
|
|
27
25
|
import '../parts/HoC/SortableItemContext.js';
|
|
28
26
|
import { useDispatchHeadersActions } from '../redux/reducers/headersReducers/useDispatchHeadersActions.js';
|
|
29
27
|
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
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; }
|
|
33
28
|
const FilterButton = /*#__PURE__*/styled.span.withConfig({
|
|
34
29
|
componentId: "sc-16i88ut-0"
|
|
35
30
|
})(["display:inline-grid;", ""], props => props.hide ? 'opacity: 0; display: none; width: 0;' : '');
|
|
@@ -37,13 +32,11 @@ const Button = /*#__PURE__*/styled(DSButton).withConfig({
|
|
|
37
32
|
componentId: "sc-16i88ut-1"
|
|
38
33
|
})(["position:relative;justify-self:flex-end;"]);
|
|
39
34
|
const FilterPopover = ({
|
|
40
|
-
column,
|
|
41
35
|
columnId,
|
|
42
36
|
triggerIcon,
|
|
43
37
|
menuContent,
|
|
44
|
-
onTriggerClick,
|
|
45
|
-
onClickOutsideMenu,
|
|
46
|
-
removeWrapperStyles,
|
|
38
|
+
onTriggerClick = () => null,
|
|
39
|
+
onClickOutsideMenu = () => null,
|
|
47
40
|
reduxHeader,
|
|
48
41
|
innerRef,
|
|
49
42
|
ariaLabel
|
|
@@ -73,50 +66,7 @@ const FilterPopover = ({
|
|
|
73
66
|
e.stopPropagation();
|
|
74
67
|
};
|
|
75
68
|
|
|
76
|
-
const wrapperStyles = useMemo(() => {
|
|
77
|
-
if (removeWrapperStyles) return {};
|
|
78
|
-
return {
|
|
79
|
-
backgroundColor: '#fff',
|
|
80
|
-
boxShadow: '0 6px 20px 0 rgba(0, 0, 0, 0.24)',
|
|
81
|
-
minWidth: '100%'
|
|
82
|
-
};
|
|
83
|
-
}, [removeWrapperStyles]);
|
|
84
69
|
const [referenceElement, setReferenceElement] = useState(null);
|
|
85
|
-
const [popperElement, setPopperElement] = useState(null); // We need this ref to correctly call useOnClickOutside
|
|
86
|
-
|
|
87
|
-
const ref = useRef(null);
|
|
88
|
-
const updatedReferenceElement = useCallback(newRef => {
|
|
89
|
-
setPopperElement(newRef);
|
|
90
|
-
ref.current = newRef;
|
|
91
|
-
}, [setPopperElement]); // const hasSortingCaret = column && column.canSort && typeof column.isSortedDesc === 'boolean';
|
|
92
|
-
|
|
93
|
-
const {
|
|
94
|
-
styles,
|
|
95
|
-
attributes
|
|
96
|
-
} = usePopper(referenceElement, popperElement, {
|
|
97
|
-
placement: 'bottom-end',
|
|
98
|
-
modifiers: [{
|
|
99
|
-
name: 'offset',
|
|
100
|
-
enabled: true,
|
|
101
|
-
options: {
|
|
102
|
-
offset: [3, 4]
|
|
103
|
-
}
|
|
104
|
-
}, {
|
|
105
|
-
name: 'preventOverflow',
|
|
106
|
-
options: {
|
|
107
|
-
mainAxis: true,
|
|
108
|
-
altAxis: true
|
|
109
|
-
}
|
|
110
|
-
}]
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
const handleClose = e => {
|
|
114
|
-
if (referenceElement && !referenceElement.contains(e.target)) {
|
|
115
|
-
handleClickOutsideMenu(e);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
useOnClickOutside(ref, handleClose);
|
|
120
70
|
return /*#__PURE__*/_jsx("div", {
|
|
121
71
|
// This is here to prevent propagation, and not trigger the sort functionality
|
|
122
72
|
onClick: e => e.stopPropagation(),
|
|
@@ -156,18 +106,21 @@ const FilterPopover = ({
|
|
|
156
106
|
innerRef.current = _ref;
|
|
157
107
|
},
|
|
158
108
|
tabIndex: reduxHeader !== null && reduxHeader !== void 0 && reduxHeader.withTabStops ? 0 : -1
|
|
159
|
-
})), /*#__PURE__*/
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
109
|
+
})), /*#__PURE__*/_jsx(DSPopperJS, {
|
|
110
|
+
referenceElement: referenceElement,
|
|
111
|
+
showPopover: isMenuOpen,
|
|
112
|
+
closeContextMenu: handleClickOutsideMenu,
|
|
163
113
|
"data-testid": DATA_TESTID.DATA_TABLE_FILTER_MENU_CONTENT,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
114
|
+
startPlacementPreference: "bottom-end",
|
|
115
|
+
customOffset: [4, 4],
|
|
116
|
+
withoutArrow: true,
|
|
117
|
+
withoutPortal: true,
|
|
118
|
+
zIndex: 10
|
|
119
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
120
|
+
style: {
|
|
121
|
+
backgroundColor: '#fff'
|
|
122
|
+
}
|
|
123
|
+
}, void 0, menuContent)));
|
|
171
124
|
};
|
|
172
125
|
|
|
173
126
|
export { FilterPopover };
|
|
@@ -5,9 +5,8 @@ import 'react-virtual';
|
|
|
5
5
|
import '../../configs/useRowFlattenization.js';
|
|
6
6
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
7
7
|
import '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
9
|
-
import 'styled-components';
|
|
10
8
|
import '@elliemae/ds-icons';
|
|
9
|
+
import 'styled-components';
|
|
11
10
|
import '../../styled.js';
|
|
12
11
|
import 'react/jsx-runtime';
|
|
13
12
|
import '@elliemae/ds-form/Checkbox';
|
|
@@ -5,9 +5,8 @@ import 'react-virtual';
|
|
|
5
5
|
import '../../configs/useRowFlattenization.js';
|
|
6
6
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
7
7
|
import '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
9
|
-
import 'styled-components';
|
|
10
8
|
import '@elliemae/ds-icons';
|
|
9
|
+
import 'styled-components';
|
|
11
10
|
import '../../styled.js';
|
|
12
11
|
import 'react/jsx-runtime';
|
|
13
12
|
import '@elliemae/ds-form/Checkbox';
|
|
@@ -61,7 +61,9 @@ const DefaultRowContentRenderer = props => {
|
|
|
61
61
|
const isDragging = draggableProps && draggableProps.isDragging;
|
|
62
62
|
useLayoutEffect(() => {
|
|
63
63
|
if (row.uid === focusedRowId) {
|
|
64
|
-
rowRef.current.focus(
|
|
64
|
+
rowRef.current.focus({
|
|
65
|
+
preventScroll: true
|
|
66
|
+
});
|
|
65
67
|
}
|
|
66
68
|
}, [focusedRowId, row.uid]);
|
|
67
69
|
const gridTemplateColProps = useMemo(() => ({
|
|
@@ -11,9 +11,8 @@ import { SortableItemContext } from '../../parts/HoC/SortableItemContext.js';
|
|
|
11
11
|
import { DATA_TESTID } from '../../configs/constants.js';
|
|
12
12
|
import 'react-virtual';
|
|
13
13
|
import '../../configs/useRowFlattenization.js';
|
|
14
|
-
import '@elliemae/ds-icons/ArrowShortReturn';
|
|
15
|
-
import 'styled-components';
|
|
16
14
|
import '@elliemae/ds-icons';
|
|
15
|
+
import 'styled-components';
|
|
17
16
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
18
17
|
import '@elliemae/ds-form/Checkbox';
|
|
19
18
|
import '@elliemae/ds-form/Radio';
|
|
@@ -85,7 +84,8 @@ const RowRenderer = props => {
|
|
|
85
84
|
const {
|
|
86
85
|
handleItemClick,
|
|
87
86
|
handleKeyDown,
|
|
88
|
-
handleOnBlur
|
|
87
|
+
handleOnBlur,
|
|
88
|
+
handleOnFocus
|
|
89
89
|
} = useRowRendererHandlers({
|
|
90
90
|
row,
|
|
91
91
|
itemIndex,
|
|
@@ -112,6 +112,7 @@ const RowRenderer = props => {
|
|
|
112
112
|
onClick: handleItemClick,
|
|
113
113
|
onKeyDown: handleKeyDown,
|
|
114
114
|
onBlur: handleOnBlur,
|
|
115
|
+
onFocus: handleOnFocus,
|
|
115
116
|
"data-expandable": Boolean(row.original.tableRowDetails),
|
|
116
117
|
"data-is-row-expanded": row.isExpanded,
|
|
117
118
|
rows: rowsLayout,
|
|
@@ -79,10 +79,14 @@ const useRowRendererHandlers = ({
|
|
|
79
79
|
setSelectedRowId(null);
|
|
80
80
|
}
|
|
81
81
|
}, [setSelectedRowId]);
|
|
82
|
+
const handleOnFocus = useCallback(() => {
|
|
83
|
+
setFocusedRowId(row.uid);
|
|
84
|
+
}, [row.uid, setFocusedRowId]);
|
|
82
85
|
return {
|
|
83
86
|
handleItemClick,
|
|
84
87
|
handleKeyDown,
|
|
85
|
-
handleOnBlur
|
|
88
|
+
handleOnBlur,
|
|
89
|
+
handleOnFocus
|
|
86
90
|
};
|
|
87
91
|
};
|
|
88
92
|
|