@elliemae/ds-data-table 2.4.2-rc.9 → 2.4.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/addons/Columns/ColumnExpand/ColumnExpand.js +3 -6
- package/cjs/addons/Columns/ColumnSelectMultiple/ColumnSelectMultiple.js +1 -2
- package/cjs/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.js +1 -2
- package/cjs/addons/Editables/ComboboxEditableCell/ComboboxEditableCell.js +7 -8
- package/cjs/addons/Editables/DateEditableCell/DateEditableCell.js +5 -6
- package/cjs/addons/Editables/TextEditableCell/TextEditableCell.js +5 -6
- package/cjs/addons/Filters/Components/CurrencyRangeFilter/index.js +7 -10
- package/cjs/addons/Filters/Components/DateRangeFilter/index.js +0 -1
- package/cjs/addons/Filters/Components/DateSwitcherFilter/index.js +0 -1
- package/cjs/addons/Filters/Components/NumberRangeFilter/index.js +7 -10
- package/cjs/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +0 -1
- package/cjs/addons/Filters/Components/SelectFilter/MultiSelectFilter.js +7 -8
- package/cjs/addons/Filters/Components/SelectFilter/SingleSelectFilter.js +6 -7
- package/cjs/addons/Filters/Components/SelectFilter/useSelectFilterHandlers.js +0 -1
- package/cjs/addons/Filters/Components/SelectFilter/utils.js +4 -9
- package/cjs/addons/Filters/Components/SingleDateFilter/index.js +0 -1
- package/cjs/configs/useDatatableConfig.js +1 -4
- package/cjs/configs/useRowFlattenization.js +6 -8
- package/cjs/configs/useTableColsWithAddons.js +1 -2
- package/cjs/exported-related/EditableCell.js +1 -4
- package/cjs/exported-related/FilterPopover.js +10 -33
- package/cjs/exported-related/Filters/dateRangeFilterFn.js +1 -2
- package/cjs/exported-related/Filters/numberRangeFilterFn.js +1 -1
- package/cjs/exported-related/Filters/singleDateFilterFn.js +0 -1
- package/cjs/exported-related/RowRenderer/DefaultRowContentRenderer.js +5 -8
- package/cjs/exported-related/RowRenderer/index.js +0 -1
- package/cjs/exported-related/RowRenderer/useRowRendererHandlers.js +1 -4
- package/cjs/exported-related/RowRenderer/useRowStyle.js +0 -1
- package/cjs/exported-related/Toolbar/Toolbar.js +0 -1
- package/cjs/exported-related/groupBy.js +0 -1
- package/cjs/helpers/addCellData.js +2 -6
- package/cjs/helpers/cellPadding.js +3 -5
- package/cjs/helpers/columnsToGrid.js +1 -3
- package/cjs/helpers/sizeToCss.js +1 -1
- package/cjs/hooks/useRecoverFocusCol.js +1 -8
- package/cjs/parts/Cells/Cell.js +3 -4
- package/cjs/parts/Cells/useCellStyle.js +2 -2
- package/cjs/parts/DnDHandle.js +2 -3
- package/cjs/parts/DropIndicator.js +8 -2
- package/cjs/parts/FilterBar/FiltersBar.js +9 -12
- package/cjs/parts/FilterBar/components/DateRangePill.js +4 -7
- package/cjs/parts/FilterBar/components/DateSwitcherPill.js +4 -7
- package/cjs/parts/FilterBar/components/MultiSelectPill.js +2 -5
- package/cjs/parts/FilterBar/components/NumberRangePill.js +3 -7
- package/cjs/parts/FilterBar/components/SelectPill.js +1 -3
- package/cjs/parts/FilterBar/components/SingleDatePill.js +1 -4
- package/cjs/parts/Filters/index.js +9 -9
- package/cjs/parts/Headers/HeaderCell.js +10 -13
- package/cjs/parts/Headers/HeaderCellGroup.js +5 -8
- package/cjs/parts/Headers/HeaderCellTitle.js +0 -1
- package/cjs/parts/Headers/HeaderResizer.js +3 -8
- package/cjs/parts/Headers/useHeaderCellConfig.js +1 -1
- package/cjs/parts/Headers/useHeaderCellHandlers.js +2 -4
- package/cjs/parts/HoC/withConditionalDnDColumnContext.js +2 -3
- package/cjs/parts/HoC/withConditionalDnDRowContext.js +1 -2
- package/cjs/parts/Row.js +0 -1
- package/cjs/parts/RowLoading.js +0 -1
- package/cjs/parts/RowVariants/RowVariantHeader.js +0 -1
- package/cjs/parts/RowVariants/index.js +8 -8
- package/cjs/parts/Rows.js +2 -2
- package/cjs/parts/TableContent.js +2 -3
- package/cjs/parts/VirtualRowsList.js +0 -1
- package/cjs/redux/reducers/headersReducers/logic.js +2 -2
- package/cjs/styled.js +50 -20
- package/esm/addons/Columns/ColumnExpand/ColumnExpand.js +3 -6
- package/esm/addons/Columns/ColumnSelectMultiple/ColumnSelectMultiple.js +1 -2
- package/esm/addons/Columns/ColumnSelectSingle/ColumnSelectSingle.js +1 -2
- package/esm/addons/Editables/ComboboxEditableCell/ComboboxEditableCell.js +6 -7
- package/esm/addons/Editables/DateEditableCell/DateEditableCell.js +4 -5
- package/esm/addons/Editables/TextEditableCell/TextEditableCell.js +4 -5
- package/esm/addons/Filters/Components/CurrencyRangeFilter/index.js +7 -10
- package/esm/addons/Filters/Components/DateRangeFilter/index.js +0 -1
- package/esm/addons/Filters/Components/DateSwitcherFilter/index.js +0 -1
- package/esm/addons/Filters/Components/NumberRangeFilter/index.js +7 -10
- package/esm/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +0 -1
- package/esm/addons/Filters/Components/SelectFilter/MultiSelectFilter.js +6 -7
- package/esm/addons/Filters/Components/SelectFilter/SingleSelectFilter.js +5 -6
- package/esm/addons/Filters/Components/SelectFilter/useSelectFilterHandlers.js +0 -1
- package/esm/addons/Filters/Components/SelectFilter/utils.js +4 -9
- package/esm/addons/Filters/Components/SingleDateFilter/index.js +0 -1
- package/esm/configs/useDatatableConfig.js +1 -4
- package/esm/configs/useRowFlattenization.js +6 -8
- package/esm/configs/useTableColsWithAddons.js +4 -5
- package/esm/exported-related/EditableCell.js +1 -4
- package/esm/exported-related/FilterPopover.js +8 -30
- package/esm/exported-related/Filters/dateRangeFilterFn.js +1 -2
- package/esm/exported-related/Filters/numberRangeFilterFn.js +1 -1
- package/esm/exported-related/Filters/singleDateFilterFn.js +0 -1
- package/esm/exported-related/RowRenderer/DefaultRowContentRenderer.js +5 -8
- package/esm/exported-related/RowRenderer/index.js +0 -1
- package/esm/exported-related/RowRenderer/useRowRendererHandlers.js +1 -4
- package/esm/exported-related/RowRenderer/useRowStyle.js +0 -1
- package/esm/exported-related/Toolbar/Toolbar.js +0 -1
- package/esm/exported-related/groupBy.js +0 -1
- package/esm/helpers/addCellData.js +2 -6
- package/esm/helpers/cellPadding.js +3 -5
- package/esm/helpers/columnsToGrid.js +1 -3
- package/esm/helpers/sizeToCss.js +1 -1
- package/esm/hooks/useRecoverFocusCol.js +1 -8
- package/esm/parts/Cells/Cell.js +3 -4
- package/esm/parts/Cells/useCellStyle.js +2 -2
- package/esm/parts/DnDHandle.js +2 -3
- package/esm/parts/DropIndicator.js +8 -2
- package/esm/parts/FilterBar/FiltersBar.js +8 -11
- package/esm/parts/FilterBar/components/DateRangePill.js +4 -7
- package/esm/parts/FilterBar/components/DateSwitcherPill.js +4 -7
- package/esm/parts/FilterBar/components/MultiSelectPill.js +2 -5
- package/esm/parts/FilterBar/components/NumberRangePill.js +3 -7
- package/esm/parts/FilterBar/components/SelectPill.js +1 -3
- package/esm/parts/FilterBar/components/SingleDatePill.js +1 -4
- package/esm/parts/Filters/index.js +11 -11
- package/esm/parts/Headers/HeaderCell.js +10 -13
- package/esm/parts/Headers/HeaderCellGroup.js +5 -8
- package/esm/parts/Headers/HeaderCellTitle.js +0 -1
- package/esm/parts/Headers/HeaderResizer.js +3 -8
- package/esm/parts/Headers/useHeaderCellConfig.js +1 -1
- package/esm/parts/Headers/useHeaderCellHandlers.js +2 -4
- package/esm/parts/HoC/withConditionalDnDColumnContext.js +2 -3
- package/esm/parts/HoC/withConditionalDnDRowContext.js +1 -2
- package/esm/parts/Row.js +0 -1
- package/esm/parts/RowLoading.js +0 -1
- package/esm/parts/RowVariants/RowVariantHeader.js +0 -1
- package/esm/parts/RowVariants/index.js +7 -7
- package/esm/parts/Rows.js +2 -2
- package/esm/parts/TableContent.js +0 -1
- package/esm/parts/VirtualRowsList.js +0 -1
- package/esm/redux/reducers/headersReducers/logic.js +2 -2
- package/esm/styled.js +50 -20
- package/package.json +19 -19
|
@@ -14,16 +14,14 @@ const flatten = function (data, expandedRows, uniqueRowAccessor) {
|
|
|
14
14
|
const result = [];
|
|
15
15
|
|
|
16
16
|
const doit = function (row) {
|
|
17
|
-
var _row$subRows, _row$subRows$length, _row$subRows2;
|
|
18
|
-
|
|
19
17
|
let index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
20
18
|
let parentId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
21
19
|
let parentIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
22
20
|
let depth = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
23
|
-
const id = (parentId ?
|
|
21
|
+
const id = (parentId ? `${parentId}.` : '') + index.toString();
|
|
24
22
|
const uid = getIdFromUniqueRowAccessor(uniqueRowAccessor, {
|
|
25
23
|
id,
|
|
26
|
-
original: row
|
|
24
|
+
original: row ?? {}
|
|
27
25
|
});
|
|
28
26
|
const isExpanded = expandedRows[uid];
|
|
29
27
|
const rowToPush = {
|
|
@@ -35,13 +33,13 @@ const flatten = function (data, expandedRows, uniqueRowAccessor) {
|
|
|
35
33
|
parentIndex,
|
|
36
34
|
depth,
|
|
37
35
|
isExpanded,
|
|
38
|
-
subRows:
|
|
39
|
-
childrenCount:
|
|
40
|
-
original: row
|
|
36
|
+
subRows: row?.subRows ?? [],
|
|
37
|
+
childrenCount: row?.subRows?.length ?? 0,
|
|
38
|
+
original: row ?? {}
|
|
41
39
|
};
|
|
42
40
|
result.push(rowToPush); // If we have subrows and we are expanded
|
|
43
41
|
|
|
44
|
-
if (row
|
|
42
|
+
if (row?.subRows && expandedRows[uid] && depth <= maxDepth) {
|
|
45
43
|
row.subRows.forEach((subRow, i) => doit(subRow, i, uid, rowToPush.realIndex, depth + 1));
|
|
46
44
|
}
|
|
47
45
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
1
4
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
5
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
6
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
7
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
8
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
8
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
9
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
10
9
|
import { useMemo, createRef } from 'react';
|
|
11
10
|
import { actionColumn } from '../addons/Columns/ColumnAction/ColumnAction.js';
|
|
12
11
|
import { expandRowColumn } from '../addons/Columns/ColumnExpand/ColumnExpand.js';
|
|
@@ -22,7 +21,7 @@ const augmentColumns = columns => {
|
|
|
22
21
|
const augmentColumn = function (column, index) {
|
|
23
22
|
let parentId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
24
23
|
let depth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
25
|
-
let id =
|
|
24
|
+
let id = `column${index}`;
|
|
26
25
|
if (typeof column.Header === 'string') id = column.Header;
|
|
27
26
|
if (typeof column.accessor === 'string') id = column.accessor;
|
|
28
27
|
if (column.columns) column.columns = column.columns.map((col, i) => augmentColumn(col, i, id, depth + 1));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import { useContext, useState, useLayoutEffect, useCallback } from 'react';
|
|
4
3
|
import { StyledEditableContainer, StyledPencilIcon } from '../styled.js';
|
|
5
4
|
import DataTableContext from '../DataTableContext.js';
|
|
@@ -45,9 +44,7 @@ const EditableCell = props => {
|
|
|
45
44
|
}
|
|
46
45
|
}, [isEditing, handleCellClick, setIsEditing]);
|
|
47
46
|
const handleOnBlur = useCallback(event => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (isEditing && !((_event$currentTarget = event.currentTarget) !== null && _event$currentTarget !== void 0 && _event$currentTarget.contains(event.relatedTarget))) {
|
|
47
|
+
if (isEditing && !event.currentTarget?.contains(event.relatedTarget)) {
|
|
51
48
|
// Not triggered when swapping focus between children
|
|
52
49
|
setIsEditing(false);
|
|
53
50
|
}
|
|
@@ -5,31 +5,13 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
|
5
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
8
|
import { useRef, useEffect, useState } from 'react';
|
|
10
|
-
import DSButton from '@elliemae/ds-button';
|
|
9
|
+
import { DSButton } from '@elliemae/ds-button';
|
|
11
10
|
import { DSPopperJS } from '@elliemae/ds-popperjs';
|
|
12
11
|
import styled from 'styled-components';
|
|
13
12
|
import '../redux/reducers/index.js';
|
|
14
13
|
import { DATA_TESTID } from '../configs/constants.js';
|
|
15
|
-
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
16
|
-
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
17
|
-
import 'react-virtual';
|
|
18
|
-
import '../configs/useRowFlattenization.js';
|
|
19
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
20
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
21
|
-
import '@elliemae/ds-icons';
|
|
22
|
-
import '../styled.js';
|
|
23
14
|
import { jsx } from 'react/jsx-runtime';
|
|
24
|
-
import '@elliemae/ds-form';
|
|
25
|
-
import '../parts/TableContent.js';
|
|
26
|
-
import '@elliemae/ds-grid';
|
|
27
|
-
import '@elliemae/ds-circular-progress-indicator';
|
|
28
|
-
import '@elliemae/ds-system';
|
|
29
|
-
import '../DataTableContext.js';
|
|
30
|
-
import '../parts/Row.js';
|
|
31
|
-
import '../parts/Footer.js';
|
|
32
|
-
import '../parts/HoC/SortableItemContext.js';
|
|
33
15
|
import { useDispatchHeadersActions } from '../redux/reducers/headersReducers/useDispatchHeadersActions.js';
|
|
34
16
|
|
|
35
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -45,8 +27,6 @@ const PopperContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
45
27
|
componentId: "sc-16i88ut-2"
|
|
46
28
|
})(["background-color:#fff;"]);
|
|
47
29
|
const FilterPopover = _ref2 => {
|
|
48
|
-
var _column$ref$current$o, _column$ref, _column$ref$current;
|
|
49
|
-
|
|
50
30
|
let {
|
|
51
31
|
column,
|
|
52
32
|
columnId,
|
|
@@ -121,10 +101,8 @@ const FilterPopover = _ref2 => {
|
|
|
121
101
|
display: 'flex'
|
|
122
102
|
},
|
|
123
103
|
onBlur: e => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
if (e.target !== referenceElement && !((_popperRef$current = popperRef.current) !== null && _popperRef$current !== void 0 && _popperRef$current.contains(e.relatedTarget))) {
|
|
127
|
-
referenceElement === null || referenceElement === void 0 ? void 0 : referenceElement.focus();
|
|
104
|
+
if (e.target !== referenceElement && !popperRef.current?.contains(e.relatedTarget)) {
|
|
105
|
+
referenceElement?.focus();
|
|
128
106
|
}
|
|
129
107
|
}
|
|
130
108
|
}, void 0, /*#__PURE__*/_jsx(FilterButton, {
|
|
@@ -142,7 +120,7 @@ const FilterPopover = _ref2 => {
|
|
|
142
120
|
if (isIconVisible) setReferenceElement(_ref);
|
|
143
121
|
innerRef.current = _ref;
|
|
144
122
|
},
|
|
145
|
-
tabIndex: reduxHeader
|
|
123
|
+
tabIndex: reduxHeader?.withTabStops ? 0 : -1
|
|
146
124
|
})), referenceElement && /*#__PURE__*/_jsx(DSPopperJS, {
|
|
147
125
|
referenceElement: referenceElement,
|
|
148
126
|
showPopover: isMenuOpen,
|
|
@@ -154,20 +132,20 @@ const FilterPopover = _ref2 => {
|
|
|
154
132
|
zIndex: 10,
|
|
155
133
|
withoutAnimation: true,
|
|
156
134
|
extraPopperStyles: _objectSpread(_objectSpread({}, customStyles), {}, {
|
|
157
|
-
minWidth:
|
|
135
|
+
minWidth: column.ref?.current?.offsetWidth ?? '0px'
|
|
158
136
|
}),
|
|
159
137
|
placementOrderPreference: ['bottom-end']
|
|
160
138
|
}, void 0, /*#__PURE__*/jsx(PopperContent, {
|
|
161
139
|
onKeyDown: e => {
|
|
162
140
|
if (e.code === 'Tab') {
|
|
163
141
|
setTimeout(() => {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (!(popperRef !== null && popperRef !== void 0 && (_popperRef$current2 = popperRef.current) !== null && _popperRef$current2 !== void 0 && _popperRef$current2.contains(document.activeElement))) {
|
|
142
|
+
if (!popperRef?.current?.contains(document.activeElement)) {
|
|
167
143
|
patchHeader(columnId, {
|
|
168
144
|
hideFilterMenu: true,
|
|
169
145
|
hideFilterButton: false
|
|
170
146
|
});
|
|
147
|
+
e.preventDefault();
|
|
148
|
+
referenceElement.focus();
|
|
171
149
|
}
|
|
172
150
|
});
|
|
173
151
|
}
|
|
@@ -3,7 +3,6 @@ import 'core-js/modules/esnext.iterator.constructor.js';
|
|
|
3
3
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import { momentFormat } from '../../configs/constants.js';
|
|
6
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
6
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
8
7
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
9
8
|
import 'react';
|
|
@@ -32,6 +31,6 @@ import '../../parts/HoC/SortableItemContext.js';
|
|
|
32
31
|
|
|
33
32
|
// use file instead of index to avoid circular imports!
|
|
34
33
|
|
|
35
|
-
const dateRangeFilterFn = (unfilteredData, filterKey, filterValue) => unfilteredData.filter(datum => !(filterValue
|
|
34
|
+
const dateRangeFilterFn = (unfilteredData, filterKey, filterValue) => unfilteredData.filter(datum => !(filterValue?.startDate && filterValue?.endDate) || moment(filterValue?.startDate, momentFormat).isSameOrBefore(datum[filterKey], 'day') && moment(filterValue?.endDate, momentFormat).isSameOrAfter(datum[filterKey], 'day'));
|
|
36
35
|
|
|
37
36
|
export { dateRangeFilterFn };
|
|
@@ -4,6 +4,6 @@ import 'core-js/modules/esnext.iterator.filter.js';
|
|
|
4
4
|
|
|
5
5
|
const isEmpty = number => number === null || number === undefined;
|
|
6
6
|
|
|
7
|
-
const numberRangeFilterFn = (unfilteredData, filterKey, filterValue) => unfilteredData.filter(datum => isEmpty(filterValue
|
|
7
|
+
const numberRangeFilterFn = (unfilteredData, filterKey, filterValue) => unfilteredData.filter(datum => isEmpty(filterValue?.from) || isEmpty(filterValue?.to) || datum[filterKey] >= filterValue.from && datum[filterKey] <= filterValue.to);
|
|
8
8
|
|
|
9
9
|
export { numberRangeFilterFn };
|
|
@@ -3,7 +3,6 @@ import 'core-js/modules/esnext.iterator.constructor.js';
|
|
|
3
3
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import { momentFormat } from '../../configs/constants.js';
|
|
6
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
6
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
8
7
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
9
8
|
import 'react';
|
|
@@ -8,7 +8,6 @@ import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
|
8
8
|
import { useRef, useLayoutEffect, useMemo } from 'react';
|
|
9
9
|
import { INTERNAL_COLUMNS } from '../../addons/Columns/index.js';
|
|
10
10
|
import { DATA_TESTID } from '../../configs/constants.js';
|
|
11
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
12
11
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
13
12
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
14
13
|
import 'react-virtual';
|
|
@@ -38,7 +37,7 @@ _jsx("div", {
|
|
|
38
37
|
onKeyDown: e => e.stopPropagation()
|
|
39
38
|
}, void 0, props.children);
|
|
40
39
|
|
|
41
|
-
const ariaLabelMessage = (row, selected) =>
|
|
40
|
+
const ariaLabelMessage = (row, selected) => `Row number ${row.realIndex + 1}${row.parentIndex !== null ? `, child of row number ${row.parentIndex + 1}` : ''}. ${selected ? 'Selected. ' : ''}To interact with the cells press enter`;
|
|
42
41
|
|
|
43
42
|
const DefaultRowContentRenderer = props => {
|
|
44
43
|
const {
|
|
@@ -70,9 +69,7 @@ const DefaultRowContentRenderer = props => {
|
|
|
70
69
|
const isDragging = draggableProps && draggableProps.isDragging;
|
|
71
70
|
useLayoutEffect(() => {
|
|
72
71
|
if (row.uid === focusedRowId) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
(_rowRef$current = rowRef.current) === null || _rowRef$current === void 0 ? void 0 : _rowRef$current.focus();
|
|
72
|
+
rowRef.current?.focus();
|
|
76
73
|
}
|
|
77
74
|
}, [focusedRowId, row.uid]);
|
|
78
75
|
const gridTemplateColProps = useMemo(() => ({
|
|
@@ -102,9 +99,9 @@ const DefaultRowContentRenderer = props => {
|
|
|
102
99
|
tabIndex: 0,
|
|
103
100
|
role: "row",
|
|
104
101
|
"aria-rowindex": row.realIndex + 1,
|
|
105
|
-
"aria-label": ariaLabelMessage(row,
|
|
102
|
+
"aria-label": ariaLabelMessage(row, selection?.[row.uid] === true),
|
|
106
103
|
"aria-level": row.depth + 1,
|
|
107
|
-
"aria-selected":
|
|
104
|
+
"aria-selected": selection?.[row.uid] === true,
|
|
108
105
|
"aria-expanded": isExpandable ? expandedRows[row.uid] === true : undefined,
|
|
109
106
|
"aria-disabled": disabledRows[row.uid]
|
|
110
107
|
}, gridTemplateColProps), {}, {
|
|
@@ -115,7 +112,7 @@ const DefaultRowContentRenderer = props => {
|
|
|
115
112
|
shouldDisplayHover: !isDndActive && !isDragging && !isDragOverlay,
|
|
116
113
|
isDragOverlay: isDragOverlay,
|
|
117
114
|
isDragging: isDragging,
|
|
118
|
-
selected: noSelectionColumn &&
|
|
115
|
+
selected: noSelectionColumn && selection?.[row.uid] === true,
|
|
119
116
|
disabled: disabledRows[row.uid],
|
|
120
117
|
"data-testid": DATA_TESTID.DATA_TABLE_ROW_CONTENT,
|
|
121
118
|
children: /*#__PURE__*/_jsx(Cells, {
|
|
@@ -14,7 +14,6 @@ import { useRowRendererProperties } from './useRowRendererProperties.js';
|
|
|
14
14
|
import DropIndicator from '../../parts/DropIndicator.js';
|
|
15
15
|
import { SortableItemContext } from '../../parts/HoC/SortableItemContext.js';
|
|
16
16
|
import { DATA_TESTID } from '../../configs/constants.js';
|
|
17
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
18
17
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
19
18
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
20
19
|
import 'react-virtual';
|
|
@@ -5,7 +5,6 @@ import { useContext, useCallback } from 'react';
|
|
|
5
5
|
import { DATA_TESTID } from '../../configs/constants.js';
|
|
6
6
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
7
7
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
8
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
10
9
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
11
10
|
import 'react-virtual';
|
|
@@ -108,9 +107,7 @@ const useRowRendererHandlers = _ref => {
|
|
|
108
107
|
}
|
|
109
108
|
}, [isDragOverlay, isActive, selectedRowId, row, setSelectedRowId, handleItemClick, itemIndex, items, setFocusedRowId]);
|
|
110
109
|
const handleOnBlur = useCallback(e => {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if (((_e$relatedTarget = e.relatedTarget) === null || _e$relatedTarget === void 0 ? void 0 : _e$relatedTarget.getAttribute('data-testid')) === 'data-table-row-content') {
|
|
110
|
+
if (e.relatedTarget?.getAttribute('data-testid') === 'data-table-row-content') {
|
|
114
111
|
setSelectedRowId(null);
|
|
115
112
|
}
|
|
116
113
|
}, [setSelectedRowId]);
|
|
@@ -3,7 +3,6 @@ import 'core-js/modules/esnext.iterator.constructor.js';
|
|
|
3
3
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
4
4
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
5
5
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
6
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
6
|
import { uid } from 'uid';
|
|
8
7
|
|
|
9
8
|
const groupBy = (data, headerKey) => {
|
|
@@ -10,11 +10,7 @@ const BasicCell = /*#__PURE__*/React.memo(_ref => {
|
|
|
10
10
|
return cell.value;
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
const getCellValue = (row, accessor) =>
|
|
14
|
-
var _row$original$accesso;
|
|
15
|
-
|
|
16
|
-
return (_row$original$accesso = row.original[accessor]) !== null && _row$original$accesso !== void 0 ? _row$original$accesso : null;
|
|
17
|
-
};
|
|
13
|
+
const getCellValue = (row, accessor) => row.original[accessor] ?? null;
|
|
18
14
|
|
|
19
15
|
const addColumnData = (datum, column) => {
|
|
20
16
|
datum.cells.push({
|
|
@@ -23,7 +19,7 @@ const addColumnData = (datum, column) => {
|
|
|
23
19
|
render: column.Cell || BasicCell,
|
|
24
20
|
row: datum,
|
|
25
21
|
ref: /*#__PURE__*/React.createRef(),
|
|
26
|
-
id:
|
|
22
|
+
id: `${datum.uid}__${column.id}`
|
|
27
23
|
});
|
|
28
24
|
};
|
|
29
25
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { sizeToCss } from './sizeToCss.js';
|
|
2
2
|
|
|
3
3
|
const cellPadding = _ref => {
|
|
4
|
-
var _sizeToCss;
|
|
5
|
-
|
|
6
4
|
let {
|
|
7
5
|
theme,
|
|
8
6
|
column
|
|
9
7
|
} = _ref;
|
|
10
|
-
return
|
|
8
|
+
return `padding: 0 ${sizeToCss(column.padding) ?? theme.space.xxs};`;
|
|
11
9
|
};
|
|
12
10
|
const columnPadding = _ref2 => {
|
|
13
11
|
let {
|
|
@@ -16,9 +14,9 @@ const columnPadding = _ref2 => {
|
|
|
16
14
|
shouldShowDnD
|
|
17
15
|
} = _ref2;
|
|
18
16
|
// Internal columns
|
|
19
|
-
if (column.padding !== undefined) return
|
|
17
|
+
if (column.padding !== undefined) return `padding: 0 ${sizeToCss(column.padding)};`; // Default user columns
|
|
20
18
|
|
|
21
|
-
return
|
|
19
|
+
return `padding: 0 ${theme.space.xxxs} 0 ${shouldShowDnD ? '2px' : theme.space.xxs};`;
|
|
22
20
|
};
|
|
23
21
|
|
|
24
22
|
export { cellPadding, columnPadding };
|
|
@@ -5,9 +5,7 @@ import { ColsLayoutStyle } from '../configs/constants.js';
|
|
|
5
5
|
import { sizeToCss } from './sizeToCss.js';
|
|
6
6
|
|
|
7
7
|
const columnsToGridImpl = (c, grid, colsLayoutStyle) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if ('columns' in c) c.columns.forEach(col => columnsToGridImpl(col, grid, colsLayoutStyle));else grid.push(sizeToCss((_c$width = c.width) !== null && _c$width !== void 0 ? _c$width : colsLayoutStyle === ColsLayoutStyle.Auto ? '1fr' : 150));
|
|
8
|
+
if ('columns' in c) c.columns.forEach(col => columnsToGridImpl(col, grid, colsLayoutStyle));else grid.push(sizeToCss(c.width ?? (colsLayoutStyle === ColsLayoutStyle.Auto ? '1fr' : 150)));
|
|
11
9
|
};
|
|
12
10
|
|
|
13
11
|
const columnsToGrid = (columns, colsLayoutStyle) => {
|
package/esm/helpers/sizeToCss.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
1
|
import { useState, useEffect } from 'react';
|
|
3
2
|
|
|
4
3
|
// so we just keep track of it and focus it if necessary
|
|
@@ -7,13 +6,7 @@ const useRecoverFocusCol = (condition, ref) => {
|
|
|
7
6
|
const [prevCondition, setPrevCondition] = useState(condition);
|
|
8
7
|
useEffect(() => {
|
|
9
8
|
if (prevCondition && !condition) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (ref.current) (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focus();else setTimeout(() => {
|
|
13
|
-
var _ref$current2;
|
|
14
|
-
|
|
15
|
-
return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.focus();
|
|
16
|
-
});
|
|
9
|
+
if (ref.current) ref.current?.focus();else setTimeout(() => ref.current?.focus());
|
|
17
10
|
}
|
|
18
11
|
|
|
19
12
|
setPrevCondition(condition);
|
package/esm/parts/Cells/Cell.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
1
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
5
2
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
3
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
7
4
|
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
8
5
|
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
7
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
9
8
|
import { useContext, useMemo, memo } from 'react';
|
|
10
9
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
11
10
|
import Grid from '@elliemae/ds-grid';
|
|
@@ -101,7 +100,7 @@ const Cell = _ref2 => {
|
|
|
101
100
|
if (typeof column.editable === 'string') {
|
|
102
101
|
const {
|
|
103
102
|
EditableComponent
|
|
104
|
-
} = outOfTheBoxEditables
|
|
103
|
+
} = outOfTheBoxEditables?.[column.editable];
|
|
105
104
|
if (EditableComponent) return /*#__PURE__*/jsx(EditableComponent, _objectSpread(_objectSpread({}, cellProps), {}, {
|
|
106
105
|
DefaultCellRender: DefaultCellContentJSX
|
|
107
106
|
}));
|
|
@@ -27,8 +27,8 @@ const useCellStyle = (column, shouldAddExpandCell) => {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
if (shouldAddExpandCell) {
|
|
30
|
-
newStyle.gridColumn =
|
|
31
|
-
newStyle.padding =
|
|
30
|
+
newStyle.gridColumn = `span 2`;
|
|
31
|
+
newStyle.padding = `0 16px 0 2px`;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
return newStyle;
|
package/esm/parts/DnDHandle.js
CHANGED
|
@@ -10,7 +10,6 @@ import { GripperVertical } from '@elliemae/ds-icons';
|
|
|
10
10
|
import styled from 'styled-components';
|
|
11
11
|
import { SortableItemContext } from './HoC/SortableItemContext.js';
|
|
12
12
|
import { DATA_TESTID } from '../configs/constants.js';
|
|
13
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
14
13
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
15
14
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
16
15
|
import 'react-virtual';
|
|
@@ -62,8 +61,8 @@ const DragHandle = _ref2 => {
|
|
|
62
61
|
ref: innerRef,
|
|
63
62
|
tabIndex: isReachable ? 0 : -1,
|
|
64
63
|
"data-testid": DATA_TESTID.DATA_TABLE_DRAG_HANDLE,
|
|
65
|
-
id:
|
|
66
|
-
key:
|
|
64
|
+
id: `${id}-drag-handle`,
|
|
65
|
+
key: `${id}-drag-handle`
|
|
67
66
|
}), /*#__PURE__*/_jsx(GripperVertical, {
|
|
68
67
|
size: "s",
|
|
69
68
|
color: isDragging ? ['neutral', '500'] : ['brand-primary', '800']
|
|
@@ -14,10 +14,16 @@ const getPositionStyles = _ref => {
|
|
|
14
14
|
} = _ref;
|
|
15
15
|
|
|
16
16
|
if (vertical) {
|
|
17
|
-
return
|
|
17
|
+
return `
|
|
18
|
+
left: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};
|
|
19
|
+
right: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};
|
|
20
|
+
`;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
|
-
return
|
|
23
|
+
return `
|
|
24
|
+
top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};
|
|
25
|
+
bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};
|
|
26
|
+
`;
|
|
21
27
|
};
|
|
22
28
|
|
|
23
29
|
const getCircleStyles = _ref2 => {
|
|
@@ -4,7 +4,6 @@ import 'core-js/modules/esnext.iterator.map.js';
|
|
|
4
4
|
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
5
5
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
6
|
import 'core-js/modules/esnext.iterator.find.js';
|
|
7
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
7
|
import React, { useContext, useMemo, useRef, useCallback } from 'react';
|
|
9
8
|
import DSButton from '@elliemae/ds-button';
|
|
10
9
|
import { MoreOptionsVert } from '@elliemae/ds-icons';
|
|
@@ -17,22 +16,22 @@ import '@elliemae/ds-popperjs';
|
|
|
17
16
|
import 'styled-components';
|
|
18
17
|
import '../../redux/reducers/index.js';
|
|
19
18
|
import { DATA_TESTID } from '../../configs/constants.js';
|
|
19
|
+
import 'react/jsx-runtime';
|
|
20
|
+
import '../../styled.js';
|
|
21
|
+
import DataTableContext from '../../DataTableContext.js';
|
|
22
|
+
import '@elliemae/ds-utilities';
|
|
20
23
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
21
24
|
import 'core-js/modules/esnext.iterator.reduce.js';
|
|
22
25
|
import 'react-virtual';
|
|
23
26
|
import '../../configs/useRowFlattenization.js';
|
|
24
|
-
import '../../styled.js';
|
|
25
|
-
import 'react/jsx-runtime';
|
|
26
27
|
import '@elliemae/ds-form';
|
|
27
28
|
import '../TableContent.js';
|
|
28
29
|
import '@elliemae/ds-grid';
|
|
29
30
|
import '@elliemae/ds-circular-progress-indicator';
|
|
30
31
|
import '@elliemae/ds-system';
|
|
31
|
-
import DataTableContext from '../../DataTableContext.js';
|
|
32
32
|
import '../Row.js';
|
|
33
33
|
import '../Footer.js';
|
|
34
34
|
import '../HoC/SortableItemContext.js';
|
|
35
|
-
import '@elliemae/ds-utilities';
|
|
36
35
|
import 'uid';
|
|
37
36
|
import { FILTER_TYPES } from '../../exported-related/FilterTypes.js';
|
|
38
37
|
import '../../exported-related/Filters/applyOutOfTheBoxFilters.js';
|
|
@@ -84,14 +83,12 @@ const FiltersBar = () => {
|
|
|
84
83
|
"aria-relevant": "additions removals",
|
|
85
84
|
gutter: "xs"
|
|
86
85
|
}, void 0, filters.map((_ref, index) => {
|
|
87
|
-
var _visibleColumns$find, _pillGroupRefs;
|
|
88
|
-
|
|
89
86
|
let {
|
|
90
87
|
id: column,
|
|
91
88
|
type,
|
|
92
89
|
value
|
|
93
90
|
} = _ref;
|
|
94
|
-
const columnHeader =
|
|
91
|
+
const columnHeader = visibleColumns.find(col => col.accessor === column)?.Header;
|
|
95
92
|
|
|
96
93
|
let Component = () => null;
|
|
97
94
|
|
|
@@ -99,7 +96,7 @@ const FiltersBar = () => {
|
|
|
99
96
|
|
|
100
97
|
if (filterType in pillRenderMapper) {
|
|
101
98
|
Component = pillRenderMapper[filterType];
|
|
102
|
-
} else if (filterBarProps
|
|
99
|
+
} else if (filterBarProps?.customPillRenderer) {
|
|
103
100
|
Component = filterBarProps.customPillRenderer;
|
|
104
101
|
}
|
|
105
102
|
|
|
@@ -111,7 +108,7 @@ const FiltersBar = () => {
|
|
|
111
108
|
onFiltersChange: onFiltersChange,
|
|
112
109
|
prevRef: pillGroupRefs[index - 1],
|
|
113
110
|
innerRef: pillGroupRefs[index],
|
|
114
|
-
nextRef:
|
|
111
|
+
nextRef: pillGroupRefs[index + 1] ?? dropdownMenuRef
|
|
115
112
|
}, column);
|
|
116
113
|
}), /*#__PURE__*/_jsx(StyledDropdownMenu, {
|
|
117
114
|
preventOverflow: "scrollParent",
|
|
@@ -119,7 +116,7 @@ const FiltersBar = () => {
|
|
|
119
116
|
id: '__internal__option__clear__filters',
|
|
120
117
|
label: 'Clear Filters',
|
|
121
118
|
onClick: removeAllFilters
|
|
122
|
-
}, ...(
|
|
119
|
+
}, ...(filterBarProps?.extraOptions || [])],
|
|
123
120
|
triggerComponent: /*#__PURE__*/_jsx(DSButton, {
|
|
124
121
|
containerProps: {
|
|
125
122
|
'data-testid': DATA_TESTID.DATA_TABLE_FILTER_BAR_DD_MENU_BUTTON
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/es.string.replace.js';
|
|
3
2
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
4
3
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
4
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
6
5
|
import { useCallback } from 'react';
|
|
7
6
|
import { DSPillGroupV2, DSPillV2 } from '@elliemae/ds-pills';
|
|
8
7
|
|
|
9
|
-
const format = value => value
|
|
8
|
+
const format = value => value?.replace(/-/g, '/');
|
|
10
9
|
|
|
11
10
|
const DateRangePill = _ref => {
|
|
12
11
|
let {
|
|
@@ -20,17 +19,15 @@ const DateRangePill = _ref => {
|
|
|
20
19
|
nextRef
|
|
21
20
|
} = _ref;
|
|
22
21
|
const handleOnRemove = useCallback(() => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (prevRef !== null && prevRef !== void 0 && prevRef.current) prevRef.current.focus();else (_nextRef$current = nextRef.current) === null || _nextRef$current === void 0 ? void 0 : _nextRef$current.focus();
|
|
22
|
+
if (prevRef?.current) prevRef.current.focus();else nextRef.current?.focus();
|
|
26
23
|
onFiltersChange(filters.filter(filter => filter.id !== column));
|
|
27
24
|
}, [onFiltersChange, filters, prevRef, nextRef, column]);
|
|
28
|
-
return value
|
|
25
|
+
return value?.startDate && value?.endDate ? /*#__PURE__*/_jsx(DSPillGroupV2, {}, void 0, /*#__PURE__*/_jsx(DSPillV2, {
|
|
29
26
|
type: "label",
|
|
30
27
|
label: columnHeader
|
|
31
28
|
}), /*#__PURE__*/_jsx(DSPillV2, {
|
|
32
29
|
type: "removable",
|
|
33
|
-
label:
|
|
30
|
+
label: `${format(value.startDate)} - ${format(value.endDate)}`,
|
|
34
31
|
onRemove: handleOnRemove,
|
|
35
32
|
innerRef: innerRef
|
|
36
33
|
})) : null;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/es.string.replace.js';
|
|
3
2
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
4
3
|
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
4
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
6
5
|
import { useCallback } from 'react';
|
|
7
6
|
import { DSPillGroupV2, DSPillV2 } from '@elliemae/ds-pills';
|
|
8
7
|
|
|
9
|
-
const format = value => value
|
|
8
|
+
const format = value => value?.replace(/-/g, '/');
|
|
10
9
|
|
|
11
10
|
const DateSwitcherPill = _ref => {
|
|
12
11
|
let {
|
|
@@ -20,17 +19,15 @@ const DateSwitcherPill = _ref => {
|
|
|
20
19
|
nextRef
|
|
21
20
|
} = _ref;
|
|
22
21
|
const handleOnRemove = useCallback(() => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (prevRef !== null && prevRef !== void 0 && prevRef.current) prevRef.current.focus();else (_nextRef$current = nextRef.current) === null || _nextRef$current === void 0 ? void 0 : _nextRef$current.focus();
|
|
22
|
+
if (prevRef?.current) prevRef.current.focus();else nextRef.current?.focus();
|
|
26
23
|
onFiltersChange(filters.filter(filter => filter.id !== column));
|
|
27
24
|
}, [onFiltersChange, filters, prevRef, nextRef, column]);
|
|
28
|
-
return value
|
|
25
|
+
return value?.startDate && value?.endDate ? /*#__PURE__*/_jsx(DSPillGroupV2, {}, void 0, /*#__PURE__*/_jsx(DSPillV2, {
|
|
29
26
|
type: "label",
|
|
30
27
|
label: columnHeader
|
|
31
28
|
}), /*#__PURE__*/_jsx(DSPillV2, {
|
|
32
29
|
type: "removable",
|
|
33
|
-
label: value.isDateRange ?
|
|
30
|
+
label: value.isDateRange ? `${format(value.startDate)} - ${format(value.endDate)}` : format(value.startDate),
|
|
34
31
|
onRemove: handleOnRemove,
|
|
35
32
|
innerRef: innerRef
|
|
36
33
|
})) : null;
|