@synerise/ds-table 0.60.2 → 0.60.3
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/CHANGELOG.md +8 -0
- package/dist/Cell/Action/ActionCell.js +5 -11
- package/dist/Cell/Action/ActionCell.styles.js +2 -1
- package/dist/Cell/AvatarLabel/AvatarLabel.js +10 -18
- package/dist/Cell/Copyable/Copyable.styles.js +2 -1
- package/dist/Cell/Copyable/CopyableCell.js +6 -12
- package/dist/Cell/Editable/EditableCell.js +7 -14
- package/dist/Cell/FlagLabel/FlagLabelCell.js +2 -7
- package/dist/Cell/FlagLabel/FlagLabelCell.styles.js +2 -1
- package/dist/Cell/IconLabel/IconLabel.js +2 -7
- package/dist/Cell/IconLabel/IconLabel.styles.js +2 -1
- package/dist/Cell/IconTooltipCell/IconTooltipCell.js +7 -13
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.js +8 -14
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.js +8 -12
- package/dist/Cell/Star/StarCell.d.ts +4 -3
- package/dist/Cell/Star/StarCell.js +5 -10
- package/dist/Cell/StatusLabel/StatusLabel.js +3 -8
- package/dist/Cell/TagIcon/TagIcon.js +1 -6
- package/dist/Cell/TagIcon/TagIcon.styles.js +2 -1
- package/dist/ColumnSortMenu/SortIcons.js +3 -15
- package/dist/ColumnSortMenu/SortRenderer.js +8 -14
- package/dist/ColumnSortMenu/TitleWithSort.js +3 -7
- package/dist/ColumnSortMenu/columnWithSortButtons.js +0 -10
- package/dist/ColumnSortMenu/groupedColumnsSort.js +2 -15
- package/dist/ColumnSortMenu/replaceSortButtons.js +0 -7
- package/dist/ColumnSortMenu/useSortState.js +4 -40
- package/dist/DefaultTable/DefaultTable.js +26 -50
- package/dist/FilterTrigger/FilterTrigger.js +16 -20
- package/dist/GroupTable/GroupTable.js +24 -40
- package/dist/GroupTable/GroupTable.styles.js +2 -2
- package/dist/GroupTable/GroupTableBody/GroupTableBody.js +12 -17
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.js +6 -7
- package/dist/InfiniteScroll/BackToTopButton.js +0 -1
- package/dist/InfiniteScroll/InfiniteLoaderItem.js +9 -12
- package/dist/InfiniteScroll/OuterListElement.js +7 -25
- package/dist/InfiniteScroll/utils.js +2 -2
- package/dist/ItemsMenu/ItemsMenu.js +0 -2
- package/dist/ItemsMenu/ItemsMenu.styles.js +2 -1
- package/dist/RowSelection/RowSelectionColumn.js +12 -22
- package/dist/Table.js +26 -40
- package/dist/TableHeader/TableHeader.js +21 -28
- package/dist/TableHeader/TableLimit/TableLimit.js +4 -7
- package/dist/TableHeader/TableSelection.js +13 -34
- package/dist/TreeTable/TreeTable.js +9 -11
- package/dist/TreeTable/TreeTable.styles.js +0 -2
- package/dist/VirtualTable/VirtualTable.js +101 -178
- package/dist/VirtualTable/VirtualTable.styles.js +0 -3
- package/dist/VirtualTable/VirtualTableRow.js +10 -26
- package/dist/constants/TableSkeleton.constants.js +0 -1
- package/dist/hooks/useRowKey/useRowKey.js +3 -1
- package/dist/hooks/useRowStar/useRowStar.js +6 -12
- package/dist/utils/calculateColumnWidths.js +0 -5
- package/dist/utils/calculatePixels.js +4 -10
- package/dist/utils/getRecordSelectionStatus.js +2 -3
- package/dist/utils/getSkeletonProps.js +7 -15
- package/dist/utils/getValueFromPath.js +2 -1
- package/dist/utils/isRecordSelectable.js +2 -4
- package/dist/utils/locale.js +0 -5
- package/package.json +3 -3
|
@@ -4,37 +4,32 @@ import * as S from '../Table.styles';
|
|
|
4
4
|
import FilterTrigger from '../FilterTrigger/FilterTrigger';
|
|
5
5
|
import TableSelection from './TableSelection';
|
|
6
6
|
import { TableLimit } from './TableLimit';
|
|
7
|
-
|
|
8
7
|
var TableHeader = function TableHeader(_ref) {
|
|
9
8
|
var title = _ref.title,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
filters = _ref.filters,
|
|
10
|
+
searchComponent = _ref.searchComponent,
|
|
11
|
+
filterComponent = _ref.filterComponent,
|
|
12
|
+
selectedRows = _ref.selectedRows,
|
|
13
|
+
itemsMenu = _ref.itemsMenu,
|
|
14
|
+
selection = _ref.selection,
|
|
15
|
+
dataSource = _ref.dataSource,
|
|
16
|
+
dataSourceFull = _ref.dataSourceFull,
|
|
17
|
+
dataSourceTotalCount = _ref.dataSourceTotalCount,
|
|
18
|
+
rowKey = _ref.rowKey,
|
|
19
|
+
withBorderTop = _ref.withBorderTop,
|
|
20
|
+
headerButton = _ref.headerButton,
|
|
21
|
+
locale = _ref.locale,
|
|
22
|
+
renderSelectionTitle = _ref.renderSelectionTitle,
|
|
23
|
+
hideTitlePart = _ref.hideTitlePart,
|
|
24
|
+
childrenColumnName = _ref.childrenColumnName,
|
|
25
|
+
isLoading = _ref.isLoading;
|
|
28
26
|
var _useDataFormat = useDataFormat(),
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
formatValue = _useDataFormat.formatValue;
|
|
31
28
|
var renderLeftSide = useMemo(function () {
|
|
32
29
|
var _locale$pagination;
|
|
33
|
-
|
|
34
30
|
var _ref2 = selection || {},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
limit = _ref2.limit,
|
|
32
|
+
hideSelectAll = _ref2.hideSelectAll;
|
|
38
33
|
if (limit) return /*#__PURE__*/React.createElement(TableLimit, {
|
|
39
34
|
total: dataSourceTotalCount || dataSource.length,
|
|
40
35
|
selection: selection,
|
|
@@ -86,8 +81,7 @@ var TableHeader = function TableHeader(_ref) {
|
|
|
86
81
|
iconComponent: filter.icon,
|
|
87
82
|
tooltips: filter.tooltips,
|
|
88
83
|
openedLabel: filter.openedLabel
|
|
89
|
-
/* eslint-disable-next-line react/jsx-handler-names
|
|
90
|
-
,
|
|
84
|
+
/* eslint-disable-next-line react/jsx-handler-names */,
|
|
91
85
|
handleClear: filter.handleClear,
|
|
92
86
|
show: filter.show,
|
|
93
87
|
showList: filter.showList,
|
|
@@ -96,5 +90,4 @@ var TableHeader = function TableHeader(_ref) {
|
|
|
96
90
|
});
|
|
97
91
|
}), filterComponent, searchComponent));
|
|
98
92
|
};
|
|
99
|
-
|
|
100
93
|
export default TableHeader;
|
|
@@ -4,13 +4,11 @@ import { useDataFormat } from '@synerise/ds-data-format';
|
|
|
4
4
|
import * as S from './TableLimit.styles';
|
|
5
5
|
export function TableLimit(_ref) {
|
|
6
6
|
var total = _ref.total,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
locale = _ref.locale,
|
|
8
|
+
itemsMenu = _ref.itemsMenu,
|
|
9
|
+
selection = _ref.selection;
|
|
11
10
|
var _useDataFormat = useDataFormat(),
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
formatValue = _useDataFormat.formatValue;
|
|
14
12
|
var selectedRows = useMemo(function () {
|
|
15
13
|
return (selection == null ? void 0 : selection.selectedRowKeys.length) || 0;
|
|
16
14
|
}, [selection]);
|
|
@@ -22,7 +20,6 @@ export function TableLimit(_ref) {
|
|
|
22
20
|
}, [locale, selectedRows, selection]);
|
|
23
21
|
var selected = useMemo(function () {
|
|
24
22
|
var _locale$pagination, _locale$pagination2;
|
|
25
|
-
|
|
26
23
|
return selectedRows > 0 ? /*#__PURE__*/React.createElement(S.Title, null, /*#__PURE__*/React.createElement("strong", null, formatValue(selectedRows)), " ", locale.selected, " /", ' ', formatValue(total) + " " + ((_locale$pagination = locale.pagination) == null ? void 0 : _locale$pagination.items)) : /*#__PURE__*/React.createElement(S.Title, null, /*#__PURE__*/React.createElement("strong", null, formatValue(total)), " ", (_locale$pagination2 = locale.pagination) == null ? void 0 : _locale$pagination2.items);
|
|
27
24
|
}, [formatValue, locale.pagination, locale.selected, selectedRows, total]);
|
|
28
25
|
return /*#__PURE__*/React.createElement(S.TableLimit, null, selected, limitReachedInfo, selectedRows > 0 && /*#__PURE__*/React.createElement(S.ItemsMenu, null, itemsMenu));
|
|
@@ -7,19 +7,18 @@ import Icon, { OptionVerticalM } from '@synerise/ds-icon';
|
|
|
7
7
|
import * as S from '../Table.styles';
|
|
8
8
|
import { SELECTION_ALL, SELECTION_INVERT } from '../Table';
|
|
9
9
|
import { useRowKey } from '../hooks/useRowKey';
|
|
10
|
-
import { isRecordSelectable } from '../utils';
|
|
10
|
+
import { isRecordSelectable } from '../utils';
|
|
11
11
|
|
|
12
|
+
// @ts-ignore
|
|
12
13
|
function TableSelection(_ref) {
|
|
13
14
|
var dataSource = _ref.dataSource,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
dataSourceFull = _ref.dataSourceFull,
|
|
16
|
+
selection = _ref.selection,
|
|
17
|
+
rowKey = _ref.rowKey,
|
|
18
|
+
locale = _ref.locale,
|
|
19
|
+
childrenColumnName = _ref.childrenColumnName;
|
|
20
20
|
var _useRowKey = useRowKey(rowKey),
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
getRowKey = _useRowKey.getRowKey;
|
|
23
22
|
var allData = dataSourceFull || dataSource;
|
|
24
23
|
var isShowingSubset = dataSourceFull && dataSourceFull.length !== dataSource.length;
|
|
25
24
|
var getRowsForKeys = useCallback(function (keys) {
|
|
@@ -27,20 +26,16 @@ function TableSelection(_ref) {
|
|
|
27
26
|
var rows = [];
|
|
28
27
|
allData.forEach(function (record) {
|
|
29
28
|
var rowChildren = record[childrenColumnName];
|
|
30
|
-
|
|
31
29
|
if (Array.isArray(rowChildren)) {
|
|
32
30
|
rowChildren.forEach(function (child) {
|
|
33
31
|
var key = getRowKey(child);
|
|
34
|
-
|
|
35
32
|
if (rowChildren && key && keys.includes(key)) {
|
|
36
33
|
rows = [].concat(rows, [record]);
|
|
37
34
|
}
|
|
38
35
|
});
|
|
39
36
|
}
|
|
40
|
-
|
|
41
37
|
if (!Array.isArray(rowChildren) || selection.independentSelectionExpandedRows) {
|
|
42
38
|
var key = getRowKey(record);
|
|
43
|
-
|
|
44
39
|
if (key && keys.includes(key)) {
|
|
45
40
|
rows = [].concat(rows, [record]);
|
|
46
41
|
}
|
|
@@ -48,24 +43,21 @@ function TableSelection(_ref) {
|
|
|
48
43
|
});
|
|
49
44
|
return rows;
|
|
50
45
|
}
|
|
51
|
-
|
|
52
46
|
return [];
|
|
53
47
|
}, [allData, getRowKey, selection, childrenColumnName]);
|
|
54
48
|
var selectAll = useCallback(function () {
|
|
55
49
|
if (dataSource && selection) {
|
|
56
50
|
var selectedRowKeys = selection.selectedRowKeys,
|
|
57
|
-
|
|
51
|
+
checkRowSelectionStatus = selection.checkRowSelectionStatus;
|
|
58
52
|
var keys = isShowingSubset ? [].concat(selectedRowKeys) : [];
|
|
59
53
|
dataSource.forEach(function (record) {
|
|
60
54
|
var rowChildren = record[childrenColumnName];
|
|
61
|
-
|
|
62
55
|
if (Array.isArray(rowChildren)) {
|
|
63
56
|
keys = [].concat(keys, rowChildren.reduce(function (acc, child) {
|
|
64
57
|
var key = getRowKey(child);
|
|
65
58
|
return key && isRecordSelectable(child, checkRowSelectionStatus) ? [].concat(acc, [key]) : acc;
|
|
66
59
|
}, []));
|
|
67
60
|
}
|
|
68
|
-
|
|
69
61
|
if (!Array.isArray(rowChildren) || selection.independentSelectionExpandedRows) {
|
|
70
62
|
var key = getRowKey(record);
|
|
71
63
|
keys = key !== undefined && isRecordSelectable(record, checkRowSelectionStatus) ? [].concat(keys, [key]) : [].concat(keys);
|
|
@@ -83,14 +75,12 @@ function TableSelection(_ref) {
|
|
|
83
75
|
var keysToUnselect = [];
|
|
84
76
|
dataSource.forEach(function (record) {
|
|
85
77
|
var rowChildren = record[childrenColumnName];
|
|
86
|
-
|
|
87
78
|
if (Array.isArray(rowChildren)) {
|
|
88
79
|
keysToUnselect = [].concat(keysToUnselect, rowChildren.reduce(function (acc, child) {
|
|
89
80
|
var key = getRowKey(child);
|
|
90
81
|
return key ? [].concat(acc, [key]) : acc;
|
|
91
82
|
}, []));
|
|
92
83
|
}
|
|
93
|
-
|
|
94
84
|
if (!Array.isArray(rowChildren) || selection.independentSelectionExpandedRows) {
|
|
95
85
|
var key = getRowKey(record);
|
|
96
86
|
keysToUnselect = key !== undefined ? [].concat(keysToUnselect, [key]) : [].concat(keysToUnselect);
|
|
@@ -111,22 +101,21 @@ function TableSelection(_ref) {
|
|
|
111
101
|
return children ? children.filter(function (child) {
|
|
112
102
|
return isRecordSelectable(child, selectionStatusValidator) && getRowKey(child) !== undefined;
|
|
113
103
|
}) : [];
|
|
114
|
-
},
|
|
104
|
+
},
|
|
105
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
115
106
|
[getRowKey, selection == null ? void 0 : selection.checkRowSelectionStatus]);
|
|
116
107
|
var selectInvert = useCallback(function () {
|
|
117
108
|
if (dataSource && selection) {
|
|
118
109
|
var selectedRowKeys = selection.selectedRowKeys,
|
|
119
|
-
|
|
110
|
+
checkRowSelectionStatus = selection.checkRowSelectionStatus;
|
|
120
111
|
var keys = isShowingSubset ? [].concat(selectedRowKeys) : [];
|
|
121
112
|
dataSource.forEach(function (record) {
|
|
122
113
|
var rowChildren = record[childrenColumnName];
|
|
123
114
|
var hasChildren = Array.isArray(rowChildren);
|
|
124
115
|
var selectableChildren = hasChildren ? getSelectableChildren(rowChildren) : false;
|
|
125
|
-
|
|
126
116
|
if (selectableChildren) {
|
|
127
117
|
selectableChildren.forEach(function (child) {
|
|
128
118
|
var key = getRowKey(child);
|
|
129
|
-
|
|
130
119
|
if (selectedRowKeys.includes(key)) {
|
|
131
120
|
if (isShowingSubset) keys.splice(keys.indexOf(key), 1);
|
|
132
121
|
} else {
|
|
@@ -134,10 +123,8 @@ function TableSelection(_ref) {
|
|
|
134
123
|
}
|
|
135
124
|
});
|
|
136
125
|
}
|
|
137
|
-
|
|
138
126
|
if (!selectableChildren || selection.independentSelectionExpandedRows) {
|
|
139
127
|
var key = getRowKey(record);
|
|
140
|
-
|
|
141
128
|
if (selectedRowKeys.includes(key)) {
|
|
142
129
|
if (isShowingSubset) keys.splice(keys.indexOf(key), 1);
|
|
143
130
|
} else if (isRecordSelectable(record, checkRowSelectionStatus)) {
|
|
@@ -155,15 +142,13 @@ function TableSelection(_ref) {
|
|
|
155
142
|
var allSelectableRecordsCount = useMemo(function () {
|
|
156
143
|
if (isEmpty || !selection) return 0;
|
|
157
144
|
var independentSelectionExpandedRows = selection.independentSelectionExpandedRows,
|
|
158
|
-
|
|
145
|
+
checkRowSelectionStatus = selection.checkRowSelectionStatus;
|
|
159
146
|
return dataSource.reduce(function (count, record) {
|
|
160
147
|
var isSelectable = +isRecordSelectable(record, checkRowSelectionStatus);
|
|
161
148
|
var rowChildren = record[childrenColumnName];
|
|
162
|
-
|
|
163
149
|
if (independentSelectionExpandedRows) {
|
|
164
150
|
return Array.isArray(rowChildren) ? count + getSelectableChildren(rowChildren).length + isSelectable : count + isSelectable;
|
|
165
151
|
}
|
|
166
|
-
|
|
167
152
|
return Array.isArray(rowChildren) ? count + getSelectableChildren(rowChildren).length : count + isSelectable;
|
|
168
153
|
}, 0);
|
|
169
154
|
}, [childrenColumnName, dataSource, getSelectableChildren, isEmpty, selection]);
|
|
@@ -172,19 +157,16 @@ function TableSelection(_ref) {
|
|
|
172
157
|
var selectedRowKeys = selection.selectedRowKeys;
|
|
173
158
|
var selectedKeysInDataSourceCount = isShowingSubset ? dataSource.reduce(function (count, record) {
|
|
174
159
|
var rowChildren = record[childrenColumnName];
|
|
175
|
-
|
|
176
160
|
if (Array.isArray(rowChildren)) {
|
|
177
161
|
return rowChildren.reduce(function (childCount, child) {
|
|
178
162
|
var key = getRowKey(child);
|
|
179
163
|
return selectedRowKeys.includes(key) ? childCount + 1 : childCount;
|
|
180
164
|
}, 0);
|
|
181
165
|
}
|
|
182
|
-
|
|
183
166
|
if (!Array.isArray(rowChildren) || selection.independentSelectionExpandedRows) {
|
|
184
167
|
var key = getRowKey(record);
|
|
185
168
|
return selectedRowKeys.includes(key) ? count + 1 : count;
|
|
186
169
|
}
|
|
187
|
-
|
|
188
170
|
return count;
|
|
189
171
|
}, 0) : selectedRowKeys.length;
|
|
190
172
|
return allSelectableRecordsCount === selectedKeysInDataSourceCount;
|
|
@@ -219,14 +201,12 @@ function TableSelection(_ref) {
|
|
|
219
201
|
onClick: unselectAll
|
|
220
202
|
}, locale == null ? void 0 : locale.unselectAll);
|
|
221
203
|
}
|
|
222
|
-
|
|
223
204
|
case SELECTION_INVERT:
|
|
224
205
|
{
|
|
225
206
|
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
226
207
|
onClick: selectInvert
|
|
227
208
|
}, locale == null ? void 0 : locale.selectInvert);
|
|
228
209
|
}
|
|
229
|
-
|
|
230
210
|
default:
|
|
231
211
|
{
|
|
232
212
|
var sel = selectionMenuElement;
|
|
@@ -250,5 +230,4 @@ function TableSelection(_ref) {
|
|
|
250
230
|
component: /*#__PURE__*/React.createElement(OptionVerticalM, null)
|
|
251
231
|
}))))) : null;
|
|
252
232
|
}
|
|
253
|
-
|
|
254
233
|
export default TableSelection;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import '@synerise/ds-core/dist/js/style';
|
|
5
4
|
import classNames from 'classnames';
|
|
@@ -9,31 +8,31 @@ import { theme } from '@synerise/ds-core';
|
|
|
9
8
|
import { v4 as uuid } from 'uuid';
|
|
10
9
|
import DSTable from '../Table';
|
|
11
10
|
import * as S from './TreeTable.styles';
|
|
12
|
-
var INDENT_SIZE = 42;
|
|
11
|
+
var INDENT_SIZE = 42;
|
|
13
12
|
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
14
|
function TreeTable(props) {
|
|
15
15
|
var className = props.className,
|
|
16
|
-
|
|
16
|
+
selection = props.selection;
|
|
17
17
|
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
19
|
var RenderRow = React.useCallback(function (row) {
|
|
19
20
|
return /*#__PURE__*/React.createElement(S.TreeTableRow, {
|
|
20
21
|
className: row.className + " ds-table-row"
|
|
21
22
|
}, row.children);
|
|
22
23
|
}, []);
|
|
23
|
-
var RenderCell = React.useCallback(
|
|
24
|
+
var RenderCell = React.useCallback(
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
26
|
function (cell) {
|
|
25
27
|
var _cell$children$;
|
|
26
|
-
|
|
27
28
|
var indentLevel = (_cell$children$ = cell.children[0]) == null || (_cell$children$ = _cell$children$.props) == null || (_cell$children$ = _cell$children$.children[0]) == null || (_cell$children$ = _cell$children$.props) == null || (_cell$children$ = _cell$children$.className.split(' ').find(function (value) {
|
|
28
29
|
return value.includes('indent-level-');
|
|
29
30
|
})) == null ? void 0 : _cell$children$.split('-').pop();
|
|
30
|
-
|
|
31
31
|
if (indentLevel === undefined) {
|
|
32
32
|
return /*#__PURE__*/React.createElement("td", {
|
|
33
33
|
className: cell.className
|
|
34
34
|
}, cell.children);
|
|
35
35
|
}
|
|
36
|
-
|
|
37
36
|
var maxIndent = parseInt(indentLevel, 10);
|
|
38
37
|
var indents = [].concat(new Array(maxIndent)).map(function (indentElement, index) {
|
|
39
38
|
return /*#__PURE__*/React.createElement(S.Indent, {
|
|
@@ -63,9 +62,9 @@ function TreeTable(props) {
|
|
|
63
62
|
},
|
|
64
63
|
expandIcon: function expandIcon(expandIconProps) {
|
|
65
64
|
var expandable = expandIconProps.expandable,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
expanded = expandIconProps.expanded,
|
|
66
|
+
onExpand = expandIconProps.onExpand,
|
|
67
|
+
record = expandIconProps.record;
|
|
69
68
|
return expandable ? /*#__PURE__*/React.createElement(S.RowExpander, null, /*#__PURE__*/React.createElement(Button.Expander, {
|
|
70
69
|
expanded: expanded,
|
|
71
70
|
onClick: function onClick(e) {
|
|
@@ -81,5 +80,4 @@ function TreeTable(props) {
|
|
|
81
80
|
})
|
|
82
81
|
}));
|
|
83
82
|
}
|
|
84
|
-
|
|
85
83
|
export default TreeTable;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
var LEVELS = ['yellow', 'green', 'cyan', 'violet', 'orange', 'purple', 'blue', 'grey'];
|
|
3
|
-
|
|
4
3
|
var getColor = function getColor(active, level) {
|
|
5
4
|
if (level === LEVELS.indexOf('cyan') && active) return '500';
|
|
6
5
|
return active ? '600' : '200';
|
|
7
6
|
};
|
|
8
|
-
|
|
9
7
|
export var Indents = styled.div.withConfig({
|
|
10
8
|
displayName: "TreeTablestyles__Indents",
|
|
11
9
|
componentId: "sc-14bdrex-0"
|