@elliemae/ds-data-table 2.3.2 → 2.4.0-rc.1
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/Filters/Components/SelectFilter/BaseSelectFilter.js +4 -22
- package/cjs/exported-related/FilterPopover.js +13 -0
- package/cjs/exported-related/RowRenderer/DefaultRowContentRenderer.js +3 -4
- package/cjs/parts/Headers/HeaderCellGroup.js +29 -7
- package/cjs/parts/Headers/HeaderResizer.js +6 -3
- package/cjs/parts/HoC/withConditionalDnDColumnContext.js +7 -1
- package/cjs/styled.js +3 -9
- package/esm/addons/Filters/Components/SelectFilter/BaseSelectFilter.js +4 -22
- package/esm/exported-related/FilterPopover.js +14 -1
- package/esm/exported-related/RowRenderer/DefaultRowContentRenderer.js +3 -4
- package/esm/parts/Headers/HeaderCellGroup.js +29 -7
- package/esm/parts/Headers/HeaderResizer.js +6 -3
- package/esm/parts/HoC/withConditionalDnDColumnContext.js +7 -1
- package/esm/styled.js +3 -9
- package/package.json +19 -19
- package/types/DataTable.d.ts +1 -1
- package/types/helpers/getIdFromUniqueRowAccessor.d.ts +1 -1
- package/types/parts/FilterBar/styled.d.ts +1 -1
- package/types/parts/Headers/HeaderCellGroup.d.ts +2 -0
- package/types/styled.d.ts +6 -6
- package/types/types/props.d.ts +2 -2
|
@@ -22,10 +22,8 @@ require('core-js/modules/esnext.set.reduce.js');
|
|
|
22
22
|
require('core-js/modules/esnext.set.some.js');
|
|
23
23
|
require('core-js/modules/esnext.set.symmetric-difference.js');
|
|
24
24
|
require('core-js/modules/esnext.set.union.js');
|
|
25
|
-
require('core-js/modules/esnext.async-iterator.find.js');
|
|
26
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
27
|
-
require('core-js/modules/esnext.iterator.find.js');
|
|
28
25
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
26
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
29
27
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
30
28
|
var React = require('react');
|
|
31
29
|
var Grid = require('@elliemae/ds-grid');
|
|
@@ -65,11 +63,9 @@ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
|
65
63
|
|
|
66
64
|
var _SearchXsmall;
|
|
67
65
|
const BaseSelectFilter = props => {
|
|
68
|
-
var _column$ref$current$o, _column$ref, _column$ref$current;
|
|
69
|
-
|
|
70
66
|
const {
|
|
71
67
|
isMulti = false,
|
|
72
|
-
selectedItems,
|
|
68
|
+
selectedItems = null,
|
|
73
69
|
column,
|
|
74
70
|
type,
|
|
75
71
|
column: {
|
|
@@ -104,19 +100,7 @@ const BaseSelectFilter = props => {
|
|
|
104
100
|
}, [data, id, userFilterOptions]);
|
|
105
101
|
|
|
106
102
|
const handleOnChange = value => {
|
|
107
|
-
|
|
108
|
-
const multiSelectedItem = selectedItems;
|
|
109
|
-
const isFound = multiSelectedItem.find(item => item.dsId === value.dsId);
|
|
110
|
-
|
|
111
|
-
if (isFound) {
|
|
112
|
-
onValueChange(type, multiSelectedItem.filter(item => item.dsId !== value.dsId));
|
|
113
|
-
} else {
|
|
114
|
-
onValueChange(type, [...multiSelectedItem, value]);
|
|
115
|
-
}
|
|
116
|
-
} else {
|
|
117
|
-
const singleSelectedItem = selectedItems;
|
|
118
|
-
onValueChange(type, (singleSelectedItem === null || singleSelectedItem === void 0 ? void 0 : singleSelectedItem.dsId) !== value.dsId ? value : null);
|
|
119
|
-
}
|
|
103
|
+
onValueChange(type, value);
|
|
120
104
|
};
|
|
121
105
|
|
|
122
106
|
const [filters, setFilteredOptions] = React.useState(filterOptions);
|
|
@@ -157,9 +141,7 @@ const BaseSelectFilter = props => {
|
|
|
157
141
|
innerRef: innerRef,
|
|
158
142
|
ariaLabel: "Open Selection Filter",
|
|
159
143
|
onClickOutsideMenu: handleOnClickOutside,
|
|
160
|
-
customStyles: {
|
|
161
|
-
width: (_column$ref$current$o = (_column$ref = column.ref) === null || _column$ref === void 0 ? void 0 : (_column$ref$current = _column$ref.current) === null || _column$ref$current === void 0 ? void 0 : _column$ref$current.offsetWidth) !== null && _column$ref$current$o !== void 0 ? _column$ref$current$o : '0px'
|
|
162
|
-
}
|
|
144
|
+
customStyles: {}
|
|
163
145
|
});
|
|
164
146
|
};
|
|
165
147
|
|
|
@@ -90,6 +90,19 @@ const FilterPopover = _ref2 => {
|
|
|
90
90
|
if (isMenuOpen) patchHeaderFilterButtonAndMenu(columnId, true);
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
React.useEffect(() => {
|
|
94
|
+
const closeMenu = () => {
|
|
95
|
+
patchHeaderFilterButtonAndMenu(columnId, true);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
window.addEventListener('blur', closeMenu);
|
|
99
|
+
window.addEventListener('resize', closeMenu);
|
|
100
|
+
return () => {
|
|
101
|
+
window.removeEventListener('blur', closeMenu);
|
|
102
|
+
window.removeEventListener('resize', closeMenu);
|
|
103
|
+
};
|
|
104
|
+
}, [columnId, patchHeaderFilterButtonAndMenu]);
|
|
105
|
+
|
|
93
106
|
const handleTriggerClick = e => {
|
|
94
107
|
onTriggerClick(columnId, e);
|
|
95
108
|
patchHeaderFilterButtonAndMenu(columnId, false);
|
|
@@ -36,7 +36,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
36
36
|
const DetailsWrapper = props =>
|
|
37
37
|
/*#__PURE__*/
|
|
38
38
|
// This can be further customized
|
|
39
|
-
// eslint-disable-next-line react/prop-types
|
|
40
39
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
41
40
|
_jsx__default["default"]("div", {
|
|
42
41
|
"data-role": "detail-view",
|
|
@@ -80,9 +79,9 @@ const DefaultRowContentRenderer = props => {
|
|
|
80
79
|
const isDragging = draggableProps && draggableProps.isDragging;
|
|
81
80
|
React.useLayoutEffect(() => {
|
|
82
81
|
if (row.uid === focusedRowId) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
var _rowRef$current;
|
|
83
|
+
|
|
84
|
+
(_rowRef$current = rowRef.current) === null || _rowRef$current === void 0 ? void 0 : _rowRef$current.focus();
|
|
86
85
|
}
|
|
87
86
|
}, [focusedRowId, row.uid]);
|
|
88
87
|
const gridTemplateColProps = React.useMemo(() => ({
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.some.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.some.js');
|
|
6
9
|
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
10
|
require('core-js/modules/esnext.iterator.map.js');
|
|
8
11
|
var React = require('react');
|
|
@@ -16,7 +19,6 @@ var SortableHeaderCell = require('../SortableHeaderCell.js');
|
|
|
16
19
|
var EmptyChildrenGroup = require('./EmptyChildrenGroup.js');
|
|
17
20
|
var constants = require('../../configs/constants.js');
|
|
18
21
|
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
19
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
20
22
|
require('core-js/modules/esnext.iterator.filter.js');
|
|
21
23
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
22
24
|
require('core-js/modules/esnext.async-iterator.reduce.js');
|
|
@@ -34,7 +36,7 @@ require('../TableContent.js');
|
|
|
34
36
|
require('@elliemae/ds-circular-progress-indicator');
|
|
35
37
|
require('@elliemae/ds-system');
|
|
36
38
|
require('@elliemae/ds-button');
|
|
37
|
-
require('../../DataTableContext.js');
|
|
39
|
+
var DataTableContext = require('../../DataTableContext.js');
|
|
38
40
|
require('../Row.js');
|
|
39
41
|
require('../Footer.js');
|
|
40
42
|
|
|
@@ -46,20 +48,36 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
46
48
|
var _EmptyChildrenGroup;
|
|
47
49
|
const StyledWrapper = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
|
|
48
50
|
componentId: "sc-1dqaj8a-0"
|
|
49
|
-
})(["position:relative;width:", ";grid-column:", ";background:", ";opacity:", ";box-shadow:0 2px 4px 0 ", ";
|
|
51
|
+
})(["position:relative;", " width:", ";grid-column:", ";background:", ";opacity:", ";box-shadow:0 2px 4px 0 ", ";border-left:", " solid ", ";"], _ref => {
|
|
52
|
+
let {
|
|
53
|
+
shouldDropOneLevel
|
|
54
|
+
} = _ref;
|
|
55
|
+
return shouldDropOneLevel ? "top: 50%; height: 50%;" : '';
|
|
56
|
+
}, props => props.isDragOverlay ? 'fit-content' : '100%', props => props.gridColumn, props => props.isDragging ? props.theme.colors.neutral['080'] : 'white', props => props.isDragging ? 0.8 : 1, props => props.isDragOverlay ? 'rgba(0,0,0,0.5)' : 'transparent', _ref2 => {
|
|
57
|
+
let {
|
|
58
|
+
isFirst
|
|
59
|
+
} = _ref2;
|
|
60
|
+
return isFirst ? '0px' : '1px';
|
|
61
|
+
}, props => props.theme.colors.neutral['080']);
|
|
50
62
|
|
|
51
|
-
const HeaderCellGroupComp =
|
|
63
|
+
const HeaderCellGroupComp = _ref3 => {
|
|
52
64
|
var _children$length;
|
|
53
65
|
|
|
54
66
|
let {
|
|
55
67
|
header,
|
|
56
68
|
isDragOverlay,
|
|
57
69
|
isDraggingParent,
|
|
58
|
-
isLast
|
|
59
|
-
|
|
70
|
+
isLast,
|
|
71
|
+
isFirst,
|
|
72
|
+
level = 0
|
|
73
|
+
} = _ref3;
|
|
74
|
+
const {
|
|
75
|
+
visibleColumns
|
|
76
|
+
} = React.useContext(DataTableContext["default"]);
|
|
60
77
|
const {
|
|
61
78
|
draggableProps
|
|
62
79
|
} = React.useContext(SortableItemContext.SortableItemContext);
|
|
80
|
+
const isMultiLevel = visibleColumns.some(col => !!col.columns);
|
|
63
81
|
const children = header.columns;
|
|
64
82
|
const isDragging = draggableProps && draggableProps.isDragging || isDraggingParent;
|
|
65
83
|
const dropIndicatorPosition = draggableProps && draggableProps.shouldShowDropIndicatorPosition && draggableProps.dropIndicatorPosition;
|
|
@@ -72,6 +90,8 @@ const HeaderCellGroupComp = _ref => {
|
|
|
72
90
|
isDragging: isDragging,
|
|
73
91
|
cols: ['auto'],
|
|
74
92
|
"data-testid": isDragOverlay ? constants.DATA_TESTID.DATA_TABLE_COLUMN_DRAG_OVERLAY : undefined,
|
|
93
|
+
isFirst: isFirst,
|
|
94
|
+
shouldDropOneLevel: isMultiLevel && level === 0 && !children,
|
|
75
95
|
children: [/*#__PURE__*/_jsx__default["default"](HeaderCell.HeaderCell, {
|
|
76
96
|
column: header,
|
|
77
97
|
isDragOverlay: isDragOverlay,
|
|
@@ -83,7 +103,9 @@ const HeaderCellGroupComp = _ref => {
|
|
|
83
103
|
header: h,
|
|
84
104
|
isDragOverlay: isDragOverlay,
|
|
85
105
|
isDraggingParent: isDragging,
|
|
86
|
-
isLast: index === children.length - 1
|
|
106
|
+
isLast: index === children.length - 1,
|
|
107
|
+
isFirst: index === 0,
|
|
108
|
+
level: level + 1
|
|
87
109
|
}, h.id))), (children === null || children === void 0 ? void 0 : children.length) && isDragOverlay && (_EmptyChildrenGroup || (_EmptyChildrenGroup = /*#__PURE__*/_jsx__default["default"](EmptyChildrenGroup.EmptyChildrenGroup, {}))), /*#__PURE__*/_jsx__default["default"](DropIndicator, {
|
|
88
110
|
vertical: true,
|
|
89
111
|
dropIndicatorPosition: dropIndicatorPosition,
|
|
@@ -72,7 +72,9 @@ const HeaderResizer = _ref => {
|
|
|
72
72
|
setIsResizing(true);
|
|
73
73
|
}, []);
|
|
74
74
|
const onResizeHandler = React.useCallback(e => {
|
|
75
|
-
|
|
75
|
+
var _ref$current$getBound, _ref$current;
|
|
76
|
+
|
|
77
|
+
const delta = ('clientX' in e ? e.clientX : e.touches[0].clientX) - ((_ref$current$getBound = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect().x) !== null && _ref$current$getBound !== void 0 ? _ref$current$getBound : 0); // delta in pixels
|
|
76
78
|
|
|
77
79
|
const realColumnIndex = visibleColumnsCopy.findIndex(visibleColumn => visibleColumn.id === column.id);
|
|
78
80
|
const widthWithDelta = narrow(nextWidth + delta, visibleColumnsCopy[realColumnIndex].minWidth, visibleColumnsCopy[realColumnIndex].maxWidth);
|
|
@@ -82,9 +84,9 @@ const HeaderResizer = _ref => {
|
|
|
82
84
|
e.stopPropagation();
|
|
83
85
|
}, [column.id, nextWidth, visibleColumnsCopy]);
|
|
84
86
|
const onResizeEnd = React.useCallback(() => {
|
|
85
|
-
setIsResizing(false);
|
|
86
87
|
onColumnResize(column.id, nextWidth);
|
|
87
88
|
setGridLayout(columnsToGrid.columnsToGrid(visibleColumns, constants.ColsLayoutStyle.Fixed));
|
|
89
|
+
setIsResizing(false);
|
|
88
90
|
}, [onColumnResize, column.id, nextWidth, setGridLayout, visibleColumns]);
|
|
89
91
|
React.useEffect(() => {
|
|
90
92
|
const debouncedResizeHandler = onResizeHandler;
|
|
@@ -116,7 +118,8 @@ const HeaderResizer = _ref => {
|
|
|
116
118
|
onMouseDown: onResizeStart,
|
|
117
119
|
onTouchStart: onResizeStart,
|
|
118
120
|
onMouseUp: onResizeEnd,
|
|
119
|
-
onTouchEnd: onResizeEnd
|
|
121
|
+
onTouchEnd: onResizeEnd,
|
|
122
|
+
onClick: e => e.stopPropagation()
|
|
120
123
|
});
|
|
121
124
|
};
|
|
122
125
|
|
|
@@ -19,6 +19,7 @@ var sortable = require('@dnd-kit/sortable');
|
|
|
19
19
|
var DataTableContext = require('../../DataTableContext.js');
|
|
20
20
|
var HeaderCellGroup = require('../Headers/HeaderCellGroup.js');
|
|
21
21
|
var constants = require('../../configs/constants.js');
|
|
22
|
+
var index = require('../../addons/Columns/index.js');
|
|
22
23
|
var jsxRuntime = require('react/jsx-runtime');
|
|
23
24
|
|
|
24
25
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -78,8 +79,13 @@ const withConditionalDnDColumnContext = Component => props => {
|
|
|
78
79
|
newFlattenedData.forEach(_ref2 => {
|
|
79
80
|
let [dndData, colData] = _ref2;
|
|
80
81
|
|
|
81
|
-
//
|
|
82
|
+
// Don't send internal columns to the user
|
|
83
|
+
if (index.INTERNAL_COLUMNS.includes(dndData.id)) {
|
|
84
|
+
return;
|
|
85
|
+
} // If row has parent, insert it to it's subrows
|
|
82
86
|
// otherwise append it to the new user data
|
|
87
|
+
|
|
88
|
+
|
|
83
89
|
if (dndData.parentId) {
|
|
84
90
|
const parentNode = nodes[dndData.parentId];
|
|
85
91
|
if (parentNode.columns) parentNode.columns.push(colData);else parentNode.columns = [colData];
|
package/cjs/styled.js
CHANGED
|
@@ -116,21 +116,15 @@ const StyledHeadWrapper = /*#__PURE__*/styled__default["default"].div.withConfig
|
|
|
116
116
|
})(["position:relative;position:sticky;top:0;z-index:4;background:white;width:", ";"], props => props.colsLayoutStyle === constants.ColsLayoutStyle.Fixed ? sizeToCss.sizeToCss(props.totalColumnsWidth) : '100%');
|
|
117
117
|
const StyledHeadTr = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
118
118
|
componentId: "sc-38sgfo-6"
|
|
119
|
-
})(["", ";", ";"], props => props.colsLayoutStyle === constants.ColsLayoutStyle.Auto ? 'width:100%' : '', props => getGridTemplateColumnsStyle({
|
|
119
|
+
})(["", ";", ";border-right:1px solid ", ";border-bottom:1px solid ", ";"], props => props.colsLayoutStyle === constants.ColsLayoutStyle.Auto ? 'width:100%' : '', props => getGridTemplateColumnsStyle({
|
|
120
120
|
cols: props.cols,
|
|
121
121
|
isExpandable: props.isExpandable,
|
|
122
122
|
colsLayoutStyle: props.colsLayoutStyle
|
|
123
|
-
}));
|
|
124
|
-
|
|
125
|
-
const getStyledHeadTHBorderColor = props => {
|
|
126
|
-
if (props.dragOverlay) return 'transparent';
|
|
127
|
-
if (props.isFirstRowGroup) return 'transparent';
|
|
128
|
-
return props.theme.colors.neutral['080'];
|
|
129
|
-
};
|
|
123
|
+
}), props => props.theme.colors.neutral['080'], props => props.theme.colors.neutral['080']);
|
|
130
124
|
|
|
131
125
|
const StyledHeadTh = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
132
126
|
componentId: "sc-38sgfo-7"
|
|
133
|
-
})(["min-height:24px;line-height:normal;font-weight:600;text-transform:uppercase;font-size:0.923rem;text-align:left;", " color:#353c46;min-height:1.84615rem;position:
|
|
127
|
+
})(["min-height:24px;line-height:normal;font-weight:600;text-transform:uppercase;font-size:0.923rem;text-align:left;", " color:#353c46;min-height:1.84615rem;position:sticky;z-index:", ";display:flex;justify-content:space-between;box-sizing:border-box;outline:none;", ":focus{&:after{display:block;content:' ';position:absolute;top:0;left:0;right:0;bottom:0;border:2px solid ", ";pointer-events:none;z-index:", ";}}"], cellPadding.columnPadding, zIndexInternalConfig.ZIndexDataTable.HEADER_ROW, props => props.isDraggingActive ? '' : ":hover {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-bottom: 1px solid ".concat(props.theme.colors.brand[700], ";\n pointer-events: none;\n z-index: ").concat(zIndexInternalConfig.ZIndexDataTable.FOCUS_BORDER, ";\n }\n cursor: pointer;\n }"), props => props.theme.colors.brand[700], zIndexInternalConfig.ZIndexDataTable.FOCUS_BORDER);
|
|
134
128
|
const StyledHeaderRightIconsWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
135
129
|
componentId: "sc-38sgfo-8"
|
|
136
130
|
})(["height:100%;display:flex;align-items:center;max-height:24px;"]);
|
|
@@ -18,10 +18,8 @@ import 'core-js/modules/esnext.set.reduce.js';
|
|
|
18
18
|
import 'core-js/modules/esnext.set.some.js';
|
|
19
19
|
import 'core-js/modules/esnext.set.symmetric-difference.js';
|
|
20
20
|
import 'core-js/modules/esnext.set.union.js';
|
|
21
|
-
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
22
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
23
|
-
import 'core-js/modules/esnext.iterator.find.js';
|
|
24
21
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
22
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
25
23
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
26
24
|
import { useMemo, useState, useEffect, useCallback } from 'react';
|
|
27
25
|
import { Grid } from '@elliemae/ds-grid';
|
|
@@ -57,11 +55,9 @@ import 'core-js/modules/esnext.iterator.some.js';
|
|
|
57
55
|
|
|
58
56
|
var _SearchXsmall;
|
|
59
57
|
const BaseSelectFilter = props => {
|
|
60
|
-
var _column$ref$current$o, _column$ref, _column$ref$current;
|
|
61
|
-
|
|
62
58
|
const {
|
|
63
59
|
isMulti = false,
|
|
64
|
-
selectedItems,
|
|
60
|
+
selectedItems = null,
|
|
65
61
|
column,
|
|
66
62
|
type,
|
|
67
63
|
column: {
|
|
@@ -96,19 +92,7 @@ const BaseSelectFilter = props => {
|
|
|
96
92
|
}, [data, id, userFilterOptions]);
|
|
97
93
|
|
|
98
94
|
const handleOnChange = value => {
|
|
99
|
-
|
|
100
|
-
const multiSelectedItem = selectedItems;
|
|
101
|
-
const isFound = multiSelectedItem.find(item => item.dsId === value.dsId);
|
|
102
|
-
|
|
103
|
-
if (isFound) {
|
|
104
|
-
onValueChange(type, multiSelectedItem.filter(item => item.dsId !== value.dsId));
|
|
105
|
-
} else {
|
|
106
|
-
onValueChange(type, [...multiSelectedItem, value]);
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
const singleSelectedItem = selectedItems;
|
|
110
|
-
onValueChange(type, (singleSelectedItem === null || singleSelectedItem === void 0 ? void 0 : singleSelectedItem.dsId) !== value.dsId ? value : null);
|
|
111
|
-
}
|
|
95
|
+
onValueChange(type, value);
|
|
112
96
|
};
|
|
113
97
|
|
|
114
98
|
const [filters, setFilteredOptions] = useState(filterOptions);
|
|
@@ -149,9 +133,7 @@ const BaseSelectFilter = props => {
|
|
|
149
133
|
innerRef: innerRef,
|
|
150
134
|
ariaLabel: "Open Selection Filter",
|
|
151
135
|
onClickOutsideMenu: handleOnClickOutside,
|
|
152
|
-
customStyles: {
|
|
153
|
-
width: (_column$ref$current$o = (_column$ref = column.ref) === null || _column$ref === void 0 ? void 0 : (_column$ref$current = _column$ref.current) === null || _column$ref$current === void 0 ? void 0 : _column$ref$current.offsetWidth) !== null && _column$ref$current$o !== void 0 ? _column$ref$current$o : '0px'
|
|
154
|
-
}
|
|
136
|
+
customStyles: {}
|
|
155
137
|
});
|
|
156
138
|
};
|
|
157
139
|
|
|
@@ -6,7 +6,7 @@ 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
8
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
|
-
import { useRef, useState } from 'react';
|
|
9
|
+
import { useRef, useEffect, useState } from 'react';
|
|
10
10
|
import DSButton from '@elliemae/ds-button';
|
|
11
11
|
import { DSPopperJS } from '@elliemae/ds-popperjs';
|
|
12
12
|
import styled from 'styled-components';
|
|
@@ -79,6 +79,19 @@ const FilterPopover = _ref2 => {
|
|
|
79
79
|
if (isMenuOpen) patchHeaderFilterButtonAndMenu(columnId, true);
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
const closeMenu = () => {
|
|
84
|
+
patchHeaderFilterButtonAndMenu(columnId, true);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
window.addEventListener('blur', closeMenu);
|
|
88
|
+
window.addEventListener('resize', closeMenu);
|
|
89
|
+
return () => {
|
|
90
|
+
window.removeEventListener('blur', closeMenu);
|
|
91
|
+
window.removeEventListener('resize', closeMenu);
|
|
92
|
+
};
|
|
93
|
+
}, [columnId, patchHeaderFilterButtonAndMenu]);
|
|
94
|
+
|
|
82
95
|
const handleTriggerClick = e => {
|
|
83
96
|
onTriggerClick(columnId, e);
|
|
84
97
|
patchHeaderFilterButtonAndMenu(columnId, false);
|
|
@@ -27,7 +27,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
27
27
|
const DetailsWrapper = props =>
|
|
28
28
|
/*#__PURE__*/
|
|
29
29
|
// This can be further customized
|
|
30
|
-
// eslint-disable-next-line react/prop-types
|
|
31
30
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
32
31
|
_jsx("div", {
|
|
33
32
|
"data-role": "detail-view",
|
|
@@ -71,9 +70,9 @@ const DefaultRowContentRenderer = props => {
|
|
|
71
70
|
const isDragging = draggableProps && draggableProps.isDragging;
|
|
72
71
|
useLayoutEffect(() => {
|
|
73
72
|
if (row.uid === focusedRowId) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
var _rowRef$current;
|
|
74
|
+
|
|
75
|
+
(_rowRef$current = rowRef.current) === null || _rowRef$current === void 0 ? void 0 : _rowRef$current.focus();
|
|
77
76
|
}
|
|
78
77
|
}, [focusedRowId, row.uid]);
|
|
79
78
|
const gridTemplateColProps = useMemo(() => ({
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.some.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.some.js';
|
|
2
5
|
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
6
|
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
7
|
import { useContext } from 'react';
|
|
@@ -12,7 +15,6 @@ import { SortableHeaderCell } from '../SortableHeaderCell.js';
|
|
|
12
15
|
import { EmptyChildrenGroup } from './EmptyChildrenGroup.js';
|
|
13
16
|
import { DATA_TESTID } from '../../configs/constants.js';
|
|
14
17
|
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
15
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
16
18
|
import 'core-js/modules/esnext.iterator.filter.js';
|
|
17
19
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
18
20
|
import 'core-js/modules/esnext.async-iterator.reduce.js';
|
|
@@ -30,27 +32,43 @@ import '../TableContent.js';
|
|
|
30
32
|
import '@elliemae/ds-circular-progress-indicator';
|
|
31
33
|
import '@elliemae/ds-system';
|
|
32
34
|
import '@elliemae/ds-button';
|
|
33
|
-
import '../../DataTableContext.js';
|
|
35
|
+
import DataTableContext from '../../DataTableContext.js';
|
|
34
36
|
import '../Row.js';
|
|
35
37
|
import '../Footer.js';
|
|
36
38
|
|
|
37
39
|
var _EmptyChildrenGroup;
|
|
38
40
|
const StyledWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
39
41
|
componentId: "sc-1dqaj8a-0"
|
|
40
|
-
})(["position:relative;width:", ";grid-column:", ";background:", ";opacity:", ";box-shadow:0 2px 4px 0 ", ";
|
|
42
|
+
})(["position:relative;", " width:", ";grid-column:", ";background:", ";opacity:", ";box-shadow:0 2px 4px 0 ", ";border-left:", " solid ", ";"], _ref => {
|
|
43
|
+
let {
|
|
44
|
+
shouldDropOneLevel
|
|
45
|
+
} = _ref;
|
|
46
|
+
return shouldDropOneLevel ? "top: 50%; height: 50%;" : '';
|
|
47
|
+
}, props => props.isDragOverlay ? 'fit-content' : '100%', props => props.gridColumn, props => props.isDragging ? props.theme.colors.neutral['080'] : 'white', props => props.isDragging ? 0.8 : 1, props => props.isDragOverlay ? 'rgba(0,0,0,0.5)' : 'transparent', _ref2 => {
|
|
48
|
+
let {
|
|
49
|
+
isFirst
|
|
50
|
+
} = _ref2;
|
|
51
|
+
return isFirst ? '0px' : '1px';
|
|
52
|
+
}, props => props.theme.colors.neutral['080']);
|
|
41
53
|
|
|
42
|
-
const HeaderCellGroupComp =
|
|
54
|
+
const HeaderCellGroupComp = _ref3 => {
|
|
43
55
|
var _children$length;
|
|
44
56
|
|
|
45
57
|
let {
|
|
46
58
|
header,
|
|
47
59
|
isDragOverlay,
|
|
48
60
|
isDraggingParent,
|
|
49
|
-
isLast
|
|
50
|
-
|
|
61
|
+
isLast,
|
|
62
|
+
isFirst,
|
|
63
|
+
level = 0
|
|
64
|
+
} = _ref3;
|
|
65
|
+
const {
|
|
66
|
+
visibleColumns
|
|
67
|
+
} = useContext(DataTableContext);
|
|
51
68
|
const {
|
|
52
69
|
draggableProps
|
|
53
70
|
} = useContext(SortableItemContext);
|
|
71
|
+
const isMultiLevel = visibleColumns.some(col => !!col.columns);
|
|
54
72
|
const children = header.columns;
|
|
55
73
|
const isDragging = draggableProps && draggableProps.isDragging || isDraggingParent;
|
|
56
74
|
const dropIndicatorPosition = draggableProps && draggableProps.shouldShowDropIndicatorPosition && draggableProps.dropIndicatorPosition;
|
|
@@ -63,6 +81,8 @@ const HeaderCellGroupComp = _ref => {
|
|
|
63
81
|
isDragging: isDragging,
|
|
64
82
|
cols: ['auto'],
|
|
65
83
|
"data-testid": isDragOverlay ? DATA_TESTID.DATA_TABLE_COLUMN_DRAG_OVERLAY : undefined,
|
|
84
|
+
isFirst: isFirst,
|
|
85
|
+
shouldDropOneLevel: isMultiLevel && level === 0 && !children,
|
|
66
86
|
children: [/*#__PURE__*/_jsx(HeaderCell, {
|
|
67
87
|
column: header,
|
|
68
88
|
isDragOverlay: isDragOverlay,
|
|
@@ -74,7 +94,9 @@ const HeaderCellGroupComp = _ref => {
|
|
|
74
94
|
header: h,
|
|
75
95
|
isDragOverlay: isDragOverlay,
|
|
76
96
|
isDraggingParent: isDragging,
|
|
77
|
-
isLast: index === children.length - 1
|
|
97
|
+
isLast: index === children.length - 1,
|
|
98
|
+
isFirst: index === 0,
|
|
99
|
+
level: level + 1
|
|
78
100
|
}, h.id))), (children === null || children === void 0 ? void 0 : children.length) && isDragOverlay && (_EmptyChildrenGroup || (_EmptyChildrenGroup = /*#__PURE__*/_jsx(EmptyChildrenGroup, {}))), /*#__PURE__*/_jsx(DropIndicator, {
|
|
79
101
|
vertical: true,
|
|
80
102
|
dropIndicatorPosition: dropIndicatorPosition,
|
|
@@ -64,7 +64,9 @@ const HeaderResizer = _ref => {
|
|
|
64
64
|
setIsResizing(true);
|
|
65
65
|
}, []);
|
|
66
66
|
const onResizeHandler = useCallback(e => {
|
|
67
|
-
|
|
67
|
+
var _ref$current$getBound, _ref$current;
|
|
68
|
+
|
|
69
|
+
const delta = ('clientX' in e ? e.clientX : e.touches[0].clientX) - ((_ref$current$getBound = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect().x) !== null && _ref$current$getBound !== void 0 ? _ref$current$getBound : 0); // delta in pixels
|
|
68
70
|
|
|
69
71
|
const realColumnIndex = visibleColumnsCopy.findIndex(visibleColumn => visibleColumn.id === column.id);
|
|
70
72
|
const widthWithDelta = narrow(nextWidth + delta, visibleColumnsCopy[realColumnIndex].minWidth, visibleColumnsCopy[realColumnIndex].maxWidth);
|
|
@@ -74,9 +76,9 @@ const HeaderResizer = _ref => {
|
|
|
74
76
|
e.stopPropagation();
|
|
75
77
|
}, [column.id, nextWidth, visibleColumnsCopy]);
|
|
76
78
|
const onResizeEnd = useCallback(() => {
|
|
77
|
-
setIsResizing(false);
|
|
78
79
|
onColumnResize(column.id, nextWidth);
|
|
79
80
|
setGridLayout(columnsToGrid(visibleColumns, ColsLayoutStyle.Fixed));
|
|
81
|
+
setIsResizing(false);
|
|
80
82
|
}, [onColumnResize, column.id, nextWidth, setGridLayout, visibleColumns]);
|
|
81
83
|
useEffect(() => {
|
|
82
84
|
const debouncedResizeHandler = onResizeHandler;
|
|
@@ -108,7 +110,8 @@ const HeaderResizer = _ref => {
|
|
|
108
110
|
onMouseDown: onResizeStart,
|
|
109
111
|
onTouchStart: onResizeStart,
|
|
110
112
|
onMouseUp: onResizeEnd,
|
|
111
|
-
onTouchEnd: onResizeEnd
|
|
113
|
+
onTouchEnd: onResizeEnd,
|
|
114
|
+
onClick: e => e.stopPropagation()
|
|
112
115
|
});
|
|
113
116
|
};
|
|
114
117
|
|
|
@@ -15,6 +15,7 @@ import { arrayMove } from '@dnd-kit/sortable';
|
|
|
15
15
|
import DataTableContext from '../../DataTableContext.js';
|
|
16
16
|
import { HeaderCellGroup } from '../Headers/HeaderCellGroup.js';
|
|
17
17
|
import { DATA_TESTID } from '../../configs/constants.js';
|
|
18
|
+
import { INTERNAL_COLUMNS } from '../../addons/Columns/index.js';
|
|
18
19
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
19
20
|
|
|
20
21
|
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; }
|
|
@@ -68,8 +69,13 @@ const withConditionalDnDColumnContext = Component => props => {
|
|
|
68
69
|
newFlattenedData.forEach(_ref2 => {
|
|
69
70
|
let [dndData, colData] = _ref2;
|
|
70
71
|
|
|
71
|
-
//
|
|
72
|
+
// Don't send internal columns to the user
|
|
73
|
+
if (INTERNAL_COLUMNS.includes(dndData.id)) {
|
|
74
|
+
return;
|
|
75
|
+
} // If row has parent, insert it to it's subrows
|
|
72
76
|
// otherwise append it to the new user data
|
|
77
|
+
|
|
78
|
+
|
|
73
79
|
if (dndData.parentId) {
|
|
74
80
|
const parentNode = nodes[dndData.parentId];
|
|
75
81
|
if (parentNode.columns) parentNode.columns.push(colData);else parentNode.columns = [colData];
|
package/esm/styled.js
CHANGED
|
@@ -107,21 +107,15 @@ const StyledHeadWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
107
107
|
})(["position:relative;position:sticky;top:0;z-index:4;background:white;width:", ";"], props => props.colsLayoutStyle === ColsLayoutStyle.Fixed ? sizeToCss(props.totalColumnsWidth) : '100%');
|
|
108
108
|
const StyledHeadTr = /*#__PURE__*/styled(Grid).withConfig({
|
|
109
109
|
componentId: "sc-38sgfo-6"
|
|
110
|
-
})(["", ";", ";"], props => props.colsLayoutStyle === ColsLayoutStyle.Auto ? 'width:100%' : '', props => getGridTemplateColumnsStyle({
|
|
110
|
+
})(["", ";", ";border-right:1px solid ", ";border-bottom:1px solid ", ";"], props => props.colsLayoutStyle === ColsLayoutStyle.Auto ? 'width:100%' : '', props => getGridTemplateColumnsStyle({
|
|
111
111
|
cols: props.cols,
|
|
112
112
|
isExpandable: props.isExpandable,
|
|
113
113
|
colsLayoutStyle: props.colsLayoutStyle
|
|
114
|
-
}));
|
|
115
|
-
|
|
116
|
-
const getStyledHeadTHBorderColor = props => {
|
|
117
|
-
if (props.dragOverlay) return 'transparent';
|
|
118
|
-
if (props.isFirstRowGroup) return 'transparent';
|
|
119
|
-
return props.theme.colors.neutral['080'];
|
|
120
|
-
};
|
|
114
|
+
}), props => props.theme.colors.neutral['080'], props => props.theme.colors.neutral['080']);
|
|
121
115
|
|
|
122
116
|
const StyledHeadTh = /*#__PURE__*/styled.div.withConfig({
|
|
123
117
|
componentId: "sc-38sgfo-7"
|
|
124
|
-
})(["min-height:24px;line-height:normal;font-weight:600;text-transform:uppercase;font-size:0.923rem;text-align:left;", " color:#353c46;min-height:1.84615rem;position:
|
|
118
|
+
})(["min-height:24px;line-height:normal;font-weight:600;text-transform:uppercase;font-size:0.923rem;text-align:left;", " color:#353c46;min-height:1.84615rem;position:sticky;z-index:", ";display:flex;justify-content:space-between;box-sizing:border-box;outline:none;", ":focus{&:after{display:block;content:' ';position:absolute;top:0;left:0;right:0;bottom:0;border:2px solid ", ";pointer-events:none;z-index:", ";}}"], columnPadding, ZIndexDataTable.HEADER_ROW, props => props.isDraggingActive ? '' : ":hover {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-bottom: 1px solid ".concat(props.theme.colors.brand[700], ";\n pointer-events: none;\n z-index: ").concat(ZIndexDataTable.FOCUS_BORDER, ";\n }\n cursor: pointer;\n }"), props => props.theme.colors.brand[700], ZIndexDataTable.FOCUS_BORDER);
|
|
125
119
|
const StyledHeaderRightIconsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
126
120
|
componentId: "sc-38sgfo-8"
|
|
127
121
|
})(["height:100%;display:flex;align-items:center;max-height:24px;"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-data-table",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Data Table",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -570,24 +570,24 @@
|
|
|
570
570
|
"dependencies": {
|
|
571
571
|
"@dnd-kit/core": "~4.0.1",
|
|
572
572
|
"@dnd-kit/sortable": "~5.0.0",
|
|
573
|
-
"@elliemae/ds-button": "2.
|
|
574
|
-
"@elliemae/ds-circular-progress-indicator": "2.
|
|
575
|
-
"@elliemae/ds-controlled-form": "2.
|
|
576
|
-
"@elliemae/ds-drag-and-drop": "2.
|
|
577
|
-
"@elliemae/ds-dropdownmenu": "2.
|
|
578
|
-
"@elliemae/ds-form": "2.
|
|
579
|
-
"@elliemae/ds-form-layout-blocks": "2.
|
|
580
|
-
"@elliemae/ds-grid": "2.
|
|
581
|
-
"@elliemae/ds-icons": "2.
|
|
582
|
-
"@elliemae/ds-indeterminate-progress-indicator": "2.
|
|
583
|
-
"@elliemae/ds-pagination": "2.
|
|
584
|
-
"@elliemae/ds-pills": "2.
|
|
585
|
-
"@elliemae/ds-popperjs": "2.
|
|
586
|
-
"@elliemae/ds-props-helpers": "2.
|
|
587
|
-
"@elliemae/ds-system": "2.
|
|
588
|
-
"@elliemae/ds-toolbar": "2.
|
|
589
|
-
"@elliemae/ds-truncated-tooltip-text": "2.
|
|
590
|
-
"@elliemae/ds-utilities": "2.
|
|
573
|
+
"@elliemae/ds-button": "2.4.0-rc.1",
|
|
574
|
+
"@elliemae/ds-circular-progress-indicator": "2.4.0-rc.1",
|
|
575
|
+
"@elliemae/ds-controlled-form": "2.4.0-rc.1",
|
|
576
|
+
"@elliemae/ds-drag-and-drop": "2.4.0-rc.1",
|
|
577
|
+
"@elliemae/ds-dropdownmenu": "2.4.0-rc.1",
|
|
578
|
+
"@elliemae/ds-form": "2.4.0-rc.1",
|
|
579
|
+
"@elliemae/ds-form-layout-blocks": "2.4.0-rc.1",
|
|
580
|
+
"@elliemae/ds-grid": "2.4.0-rc.1",
|
|
581
|
+
"@elliemae/ds-icons": "2.4.0-rc.1",
|
|
582
|
+
"@elliemae/ds-indeterminate-progress-indicator": "2.4.0-rc.1",
|
|
583
|
+
"@elliemae/ds-pagination": "2.4.0-rc.1",
|
|
584
|
+
"@elliemae/ds-pills": "2.4.0-rc.1",
|
|
585
|
+
"@elliemae/ds-popperjs": "2.4.0-rc.1",
|
|
586
|
+
"@elliemae/ds-props-helpers": "2.4.0-rc.1",
|
|
587
|
+
"@elliemae/ds-system": "2.4.0-rc.1",
|
|
588
|
+
"@elliemae/ds-toolbar": "2.4.0-rc.1",
|
|
589
|
+
"@elliemae/ds-truncated-tooltip-text": "2.4.0-rc.1",
|
|
590
|
+
"@elliemae/ds-utilities": "2.4.0-rc.1",
|
|
591
591
|
"@reduxjs/toolkit": "~1.6.2",
|
|
592
592
|
"csstype": "~3.0.9",
|
|
593
593
|
"moment": "~2.29.1",
|
package/types/DataTable.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare const DataTable: {
|
|
|
55
55
|
renderRowActions?: import("./types/props").TypescriptRenderRowActions | undefined;
|
|
56
56
|
getRowVariant?: ((row: import("./types/props").TypescriptRow, defaultCellsRenderer: React.ComponentType<any>) => React.ComponentType<any> | import("./types/props").RowVariant) | undefined;
|
|
57
57
|
isExpandable?: boolean | undefined;
|
|
58
|
-
uniqueRowAccessor?: import("./types/props").
|
|
58
|
+
uniqueRowAccessor?: import("./types/props").UniqueRowAccessorType | undefined;
|
|
59
59
|
disabledRows?: Record<string, boolean> | undefined;
|
|
60
60
|
expandedRows?: Record<string, boolean> | undefined;
|
|
61
61
|
cellRendererProps?: Record<string, any> | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TypescriptRow
|
|
1
|
+
import { TypescriptRow } from '../types/props';
|
|
2
2
|
export declare const getIdFromUniqueRowAccessor: (uniqueRowAccessor: uniqueRowAccessorType, row: Partial<TypescriptRow>) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="../../../../../../shared/typings/react-desc.d.ts" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
-
export declare const StyledWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
3
|
+
export declare const StyledWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
4
4
|
export declare const StyledDropdownMenu: import("styled-components").StyledComponent<{
|
|
5
5
|
({ containerProps, className, contentStyle, options, onSelectMenuItem, onOpenMenu, onClickOutsideMenu, preventOverflow, placement, interactionType, triggerComponent, customMenu, isOpen, selection, menuProps, referenceNode, focusOnOpen, onClose, itemsRenderer, responsiveHeight, singleGroupSelection, onSelectChange, minWidth, maxWidth, zIndex, type, loading, hideIfNotVisible, }: {
|
|
6
6
|
containerProps?: {} | undefined;
|
|
@@ -5,6 +5,8 @@ interface HeaderCellGroupCompProps {
|
|
|
5
5
|
isDragOverlay?: boolean;
|
|
6
6
|
isDraggingParent?: boolean;
|
|
7
7
|
isLast?: boolean;
|
|
8
|
+
isFirst?: boolean;
|
|
9
|
+
level?: number;
|
|
8
10
|
}
|
|
9
11
|
export declare const HeaderCellGroup: React.FunctionComponent<HeaderCellGroupCompProps>;
|
|
10
12
|
declare const HeaderCellGroupSortable: (props: HeaderCellGroupCompProps) => JSX.Element;
|
package/types/styled.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ interface WidthAndHeight {
|
|
|
3
3
|
width?: string | number;
|
|
4
4
|
height?: string | number;
|
|
5
5
|
}
|
|
6
|
-
export declare const StyledFocusWithin: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
6
|
+
export declare const StyledFocusWithin: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
7
7
|
export declare const StyledDataTableWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, WidthAndHeight & {
|
|
8
8
|
noSelectionAllowed: boolean;
|
|
9
9
|
}, never>;
|
|
@@ -14,7 +14,7 @@ export declare const StyledHeadWrapper: import("styled-components").StyledCompon
|
|
|
14
14
|
colsLayoutStyle: string;
|
|
15
15
|
totalColumnsWidth: number | string;
|
|
16
16
|
}, never>;
|
|
17
|
-
export declare const StyledHeadTr: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
17
|
+
export declare const StyledHeadTr: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
18
18
|
export declare const StyledHeadTh: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, any, never>;
|
|
19
19
|
export declare const StyledHeaderRightIconsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
20
|
export declare const StyledResizer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
@@ -27,13 +27,13 @@ export declare const StyledCell: import("styled-components").StyledComponent<"di
|
|
|
27
27
|
}, never>;
|
|
28
28
|
export declare const StyledCellContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
29
29
|
export declare const StyledPencilIcon: import("styled-components").StyledComponent<(rest: any) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
30
|
-
export declare const StyledEditableContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
30
|
+
export declare const StyledEditableContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
31
31
|
shouldDisplayEditIcon: string;
|
|
32
32
|
}, never>;
|
|
33
|
-
export declare const StyledFullsizeGrid: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
34
|
-
export declare const GroupHeaderContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
33
|
+
export declare const StyledFullsizeGrid: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
34
|
+
export declare const GroupHeaderContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
35
35
|
padding: string;
|
|
36
36
|
}, never>;
|
|
37
37
|
export declare const GroupHeaderTitle: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
38
|
-
export declare const StyledCellContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").
|
|
38
|
+
export declare const StyledCellContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
39
39
|
export {};
|
package/types/types/props.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare type TypescriptSortBy = {
|
|
|
74
74
|
};
|
|
75
75
|
export declare type TypescriptSelectionItem = true | 'mixed' | false;
|
|
76
76
|
export declare type TypescriptSelection = Record<string | number, TypescriptSelectionItem>;
|
|
77
|
-
export declare type
|
|
77
|
+
export declare type UniqueRowAccessorType = string | string[] | ((row: TypescriptRow) => string);
|
|
78
78
|
export declare type TypescriptProps = {
|
|
79
79
|
columns: TypescriptColumn[];
|
|
80
80
|
data: TypescriptRow[];
|
|
@@ -83,7 +83,7 @@ export declare type TypescriptProps = {
|
|
|
83
83
|
renderRowActions?: TypescriptRenderRowActions;
|
|
84
84
|
getRowVariant?: (row: TypescriptRow, defaultCellsRenderer: React.ComponentType<any>) => RowVariant | React.ComponentType<any>;
|
|
85
85
|
isExpandable?: boolean;
|
|
86
|
-
uniqueRowAccessor?:
|
|
86
|
+
uniqueRowAccessor?: UniqueRowAccessorType;
|
|
87
87
|
disabledRows?: Record<string, boolean>;
|
|
88
88
|
expandedRows?: Record<string, boolean>;
|
|
89
89
|
cellRendererProps?: Record<string, any>;
|