@synerise/ds-table 0.60.11 → 0.61.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/CHANGELOG.md +19 -0
- package/dist/Cell/Star/StarCell.d.ts +9 -5
- package/dist/ColumnSortMenu/SortRenderer.js +36 -26
- package/dist/ColumnSortMenu/columnWithSortButtons.js +2 -6
- package/dist/ColumnSortMenu/groupedColumnsSort.d.ts +1 -1
- package/dist/ColumnSortMenu/groupedColumnsSort.js +2 -6
- package/dist/ColumnSortMenu/replaceSortButtons.d.ts +2 -2
- package/dist/ColumnSortMenu/replaceSortButtons.js +2 -2
- package/dist/ColumnSortMenu/useSortState.js +17 -21
- package/dist/DefaultTable/DefaultTable.js +11 -14
- package/dist/FilterTrigger/FilterTrigger.styles.d.ts +1 -1
- package/dist/GroupTable/GroupTable.js +5 -10
- package/dist/InfiniteScroll/OuterListElement.js +2 -6
- package/dist/ItemsMenu/ItemsMenu.d.ts +1 -1
- package/dist/ItemsMenu/ItemsMenu.types.d.ts +4 -4
- package/dist/RowSelection/RowSelectionColumn.types.d.ts +2 -2
- package/dist/Table.js +4 -9
- package/dist/Table.styles.d.ts +1 -0
- package/dist/Table.styles.js +15 -11
- package/dist/Table.types.d.ts +13 -13
- package/dist/TableHeader/TableHeader.js +6 -2
- package/dist/TableHeader/TableSelection.js +5 -10
- package/dist/VirtualTable/VirtualTable.d.ts +7 -60
- package/dist/VirtualTable/VirtualTable.js +37 -24
- package/dist/VirtualTable/VirtualTable.styles.js +1 -1
- package/dist/VirtualTable/VirtualTableRow.d.ts +1 -1
- package/dist/VirtualTable/VirtualTableRow.js +5 -9
- package/dist/hooks/useBulkSelection/useBulkSelection.js +2 -6
- package/dist/hooks/useRowStar/useRowStar.js +3 -2
- package/dist/modules.d.js +1 -0
- package/dist/style/index.css +1 -1
- package/dist/utils/getSkeletonProps.js +2 -6
- package/dist/utils/getValueFromPath.d.ts +1 -1
- package/dist/utils/locale.js +3 -7
- package/package.json +32 -32
package/dist/Table.styles.js
CHANGED
|
@@ -44,18 +44,22 @@ export var Left = styled.div.withConfig({
|
|
|
44
44
|
export var Right = styled.div.withConfig({
|
|
45
45
|
displayName: "Tablestyles__Right",
|
|
46
46
|
componentId: "dacfhr-7"
|
|
47
|
-
})(["display:flex;align-items:center;justify-content:flex-start;> *{
|
|
47
|
+
})(["display:flex;align-items:center;justify-content:flex-start;gap:8px;> *{min-width:32px;}&&& .ds-button.btn-search{min-width:unset;}"]);
|
|
48
|
+
export var RightSideWrapper = styled.div.withConfig({
|
|
49
|
+
displayName: "Tablestyles__RightSideWrapper",
|
|
50
|
+
componentId: "dacfhr-8"
|
|
51
|
+
})([""]);
|
|
48
52
|
export var Icon = styled.div.withConfig({
|
|
49
53
|
displayName: "Tablestyles__Icon",
|
|
50
|
-
componentId: "dacfhr-
|
|
54
|
+
componentId: "dacfhr-9"
|
|
51
55
|
})(["transition:all 0.5s ease;position:absolute;left:4px;z-index:1;"]);
|
|
52
56
|
export var Input = styled.div.withConfig({
|
|
53
57
|
displayName: "Tablestyles__Input",
|
|
54
|
-
componentId: "dacfhr-
|
|
58
|
+
componentId: "dacfhr-10"
|
|
55
59
|
})(["transition:all 0.2s ease;overflow:hidden;position:relative;right:0;> div{margin:0;}"]);
|
|
56
60
|
export var InputWrapper = styled.div.withConfig({
|
|
57
61
|
displayName: "Tablestyles__InputWrapper",
|
|
58
|
-
componentId: "dacfhr-
|
|
62
|
+
componentId: "dacfhr-11"
|
|
59
63
|
})(["", ";transition:all 0.5s ease;position:relative;display:flex;align-items:center;direction:ltr;", "{opacity:", ";width:", ";}&{input{padding-left:32px;", ";}}.search-input{width:0;}"], function (props) {
|
|
60
64
|
return props.searchValue !== '' || props.isOpen ? "width: 100%" : 'width: 30px';
|
|
61
65
|
}, Input, function (props) {
|
|
@@ -67,19 +71,19 @@ export var InputWrapper = styled.div.withConfig({
|
|
|
67
71
|
});
|
|
68
72
|
export var Selection = styled.div.withConfig({
|
|
69
73
|
displayName: "Tablestyles__Selection",
|
|
70
|
-
componentId: "dacfhr-
|
|
74
|
+
componentId: "dacfhr-12"
|
|
71
75
|
})(["display:flex;align-items:center;justify-content:flex-start;max-width:64px;margin-right:24px;border-radius:3px;&:hover{background-color:", ";}.ant-btn.ds-button:first-of-type{border-top-right-radius:0;border-bottom-right-radius:0;}.ant-btn.ds-button:last-of-type{border-top-left-radius:0;border-bottom-left-radius:0;}", "{padding:0;}"], function (_ref2) {
|
|
72
76
|
var theme = _ref2.theme;
|
|
73
77
|
return theme.palette['grey-100'];
|
|
74
78
|
}, CheckboxWrapper);
|
|
75
79
|
export var SelectionMenu = styled(Menu).withConfig({
|
|
76
80
|
displayName: "Tablestyles__SelectionMenu",
|
|
77
|
-
componentId: "dacfhr-
|
|
81
|
+
componentId: "dacfhr-13"
|
|
78
82
|
})(["padding:8px;"]);
|
|
79
83
|
var spinnerAnimation = keyframes(["from{transform:rotateZ(0deg);}to{transform:rotateZ(360deg);}"]);
|
|
80
84
|
export var Spinner = styled.div.withConfig({
|
|
81
85
|
displayName: "Tablestyles__Spinner",
|
|
82
|
-
componentId: "dacfhr-
|
|
86
|
+
componentId: "dacfhr-14"
|
|
83
87
|
})(["position:absolute !important;top:0;left:0;width:100%;height:100%;margin:0;border-radius:inherit;display:flex;align-items:center;justify-content:center;background-color:rgba(255,255,255,0.6);z-index:10;", "{animation:", " 1s forwards linear infinite;svg{color:", ";fill:", ";}}"], IconContainer, spinnerAnimation, function (props) {
|
|
84
88
|
return props.theme.palette['blue-600'];
|
|
85
89
|
}, function (props) {
|
|
@@ -87,8 +91,8 @@ export var Spinner = styled.div.withConfig({
|
|
|
87
91
|
});
|
|
88
92
|
export var TableWrapper = styled.div.withConfig({
|
|
89
93
|
displayName: "Tablestyles__TableWrapper",
|
|
90
|
-
componentId: "dacfhr-
|
|
91
|
-
})(["table{.ant-table-thead{", ";}}.ant-table-wrapper .ant-table{z-index:1;}.ant-table .ant-table-cell.ant-table-selection-column,.ant-table .ant-table-cell.ds-table-star-column{padding:0 8px 0 24px;& > button{display:inline-block;}}.ant-table .ant-table-cell.ant-table-selection-column + .ant-table-cell.ds-table-star-column{padding-left:0;}.ant-table .ant-table-thead th{transition:background 0.3s,border-color 0.3s;background-color:", ";border-bottom-color:", ";&.ant-table-column-has-sorters{cursor:default;}&.ant-table-column-has-sorters:hover{background-color:", ";border-bottom:2px solid ", ";> *{margin-bottom:-1px;}}> *{display:flex;width:100%;}[class^='ant-table-column-sorters']{width:100%;}&.ant-table-column-sort{background-color:", ";border-bottom:2px solid ", ";&:hover{background-color:", ";border-bottom:2px solid ", ";}& > [class^='ant-table-column-sorters']{overflow:hidden;}> *{margin-bottom:-1px;}}&.ant-table-cell-ellipsis.ant-table-column-has-sorters{overflow:visible;}&:not(.ds-table-column-sort){.ds-table-column-sorter{margin-left:8px;}}&.ds-table-active-column{background-color:", ";border-bottom:2px solid ", ";cursor:default;&:hover{background-color:", ";border-bottom:2px solid ", ";}.ant-table-column-sorter{display:none;}> *{margin-bottom:-1px;}}}.ant-table tr.ant-table-row:not(:hover) td.ant-table-column-sort{background-color:", ";}.ant-table .ant-table-column-sorter{margin-left:8px;max-width:32px;min-width:32px;}.ant-table-cell .ds-sort-dropdown-button{opacity:0;}.ant-table-cell:hover .ds-sort-dropdown-button,.ant-table-cell.ant-table-column-sort .ds-sort-dropdown-button{opacity:1;}.ant-table-wrapper.virtual-table.virtual-table-infinite-scroll .ant-table .ant-table-header{box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);}.virtual-table:not(.with-sticky-header) .ant-table-container{overflow:auto hidden;}.virtual-table .virtual-table-row:not(:hover) .virtual-table-cell.ant-table-column-sort{background-color:", ";}& .ant-table .ant-table-cell-scrollbar{box-shadow:none;}& .ant-table th.ant-table-cell{white-space:", ";}"], function (props) {
|
|
94
|
+
componentId: "dacfhr-15"
|
|
95
|
+
})(["table{.ant-table-thead{", ";}}.ant-table-wrapper .ant-table{z-index:1;}.ant-table .ant-table-cell.ant-table-selection-column,.ant-table .ant-table-cell.ds-table-star-column{padding:0 8px 0 24px;& > button{display:inline-block;}}.ant-table .ant-table-cell.ant-table-selection-column + .ant-table-cell.ds-table-star-column{padding-left:0;}.ant-table .ant-table-thead th{transition:background 0.3s,border-color 0.3s;background-color:", ";border-bottom-color:", ";&.ant-table-column-has-sorters{cursor:default;}&.ant-table-column-has-sorters:hover{background-color:", ";border-bottom:2px solid ", ";> *{margin-bottom:-1px;}}> *{display:flex;width:100%;}[class^='ant-table-column-sorters']{width:100%;}&.ant-table-column-sort{background-color:", ";border-bottom:2px solid ", ";&:hover{background-color:", ";border-bottom:2px solid ", ";}& > [class^='ant-table-column-sorters']{overflow:hidden;}> *{margin-bottom:-1px;}}&.ant-table-cell-ellipsis.ant-table-column-has-sorters{overflow:visible;}&:not(.ds-table-column-sort){.ds-table-column-sorter{margin-left:8px;}}&.ds-table-active-column{background-color:", ";border-bottom:2px solid ", ";cursor:default;&:hover{background-color:", ";border-bottom:2px solid ", ";}.ant-table-column-sorter{display:none;}> *{margin-bottom:-1px;}}}.ant-table tr.ant-table-row:not(:hover) td.ant-table-column-sort{background-color:", ";}.ant-table .ant-table-column-sorter{margin-left:8px;max-width:32px;min-width:32px;}.ant-table-cell .ds-sort-dropdown-button{opacity:0;}.ant-table-cell:hover .ds-sort-dropdown-button,.ant-table-cell.ant-table-column-sort .ds-sort-dropdown-button{opacity:1;}.ant-table-wrapper.virtual-table.virtual-table-infinite-scroll .ant-table .ant-table-header{box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);}.virtual-table:not(.with-sticky-header) .ant-table-container{overflow:auto hidden;}.virtual-table .virtual-table-row:not(:hover) .virtual-table-cell.ant-table-column-sort{background-color:", ";}& .ant-table .ant-table-cell-scrollbar{box-shadow:none;}& .ant-table th.ant-table-cell{white-space:", ";}&&& .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before{position:relative;}"], function (props) {
|
|
92
96
|
return props.hideColumnNames ? 'display: none' : '';
|
|
93
97
|
}, function (_ref3) {
|
|
94
98
|
var theme = _ref3.theme;
|
|
@@ -137,11 +141,11 @@ export var TableWrapper = styled.div.withConfig({
|
|
|
137
141
|
});
|
|
138
142
|
export var Skeleton = styled(DSSkeleton).withConfig({
|
|
139
143
|
displayName: "Tablestyles__Skeleton",
|
|
140
|
-
componentId: "dacfhr-
|
|
144
|
+
componentId: "dacfhr-16"
|
|
141
145
|
})(["padding:0;"]);
|
|
142
146
|
export var TableSkeletonCell = styled.div.withConfig({
|
|
143
147
|
displayName: "Tablestyles__TableSkeletonCell",
|
|
144
|
-
componentId: "dacfhr-
|
|
148
|
+
componentId: "dacfhr-17"
|
|
145
149
|
})(["display:flex;height:", ";width:", ";align-items:center;justify-content:flex-start;"], function (props) {
|
|
146
150
|
return props.height + "px" || 'auto';
|
|
147
151
|
}, function (props) {
|
package/dist/Table.types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ColumnType, TableProps } from 'antd/lib/table';
|
|
3
|
-
import { TableLocale, TableRowSelection } from 'antd/lib/table/interface';
|
|
4
|
-
import { LiteralStringUnion } from '@synerise/ds-utils';
|
|
5
|
-
import DSTable from './Table';
|
|
6
|
-
import { GroupType } from './GroupTable/GroupTable.types';
|
|
7
|
-
import { RowStar } from './hooks/useRowStar';
|
|
8
|
-
import { SortRender } from './ColumnSortMenu/TitleWithSort';
|
|
9
|
-
import { ColumnSortOrder, ColumnsSortState } from './ColumnSortMenu/useSortState';
|
|
1
|
+
import type { Key, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { ColumnType, TableProps } from 'antd/lib/table';
|
|
3
|
+
import type { TableLocale, TableRowSelection } from 'antd/lib/table/interface';
|
|
4
|
+
import type { LiteralStringUnion } from '@synerise/ds-utils';
|
|
5
|
+
import type DSTable from './Table';
|
|
6
|
+
import type { GroupType } from './GroupTable/GroupTable.types';
|
|
7
|
+
import type { RowStar } from './hooks/useRowStar';
|
|
8
|
+
import type { SortRender } from './ColumnSortMenu/TitleWithSort';
|
|
9
|
+
import type { ColumnSortOrder, ColumnsSortState } from './ColumnSortMenu/useSortState';
|
|
10
10
|
export type AntTableProps<T> = Omit<TableProps<T>, 'title' | 'subTitle' | 'onSearch' | 'itemsMenu' | 'search' | 'locale' | 'columns'>;
|
|
11
11
|
export type Selection = {
|
|
12
12
|
key: string;
|
|
@@ -16,9 +16,9 @@ export type Selection = {
|
|
|
16
16
|
export type SelectionItem = typeof DSTable.SELECTION_ALL | typeof DSTable.SELECTION_INVERT | Selection | null | undefined;
|
|
17
17
|
export type RowSelection<T> = Omit<TableRowSelection<T>, 'selections'> & {
|
|
18
18
|
fixed?: boolean;
|
|
19
|
-
selectedRowKeys:
|
|
19
|
+
selectedRowKeys: Key[];
|
|
20
20
|
selections?: SelectionItem[];
|
|
21
|
-
onChange: (selectedRowKeys:
|
|
21
|
+
onChange: (selectedRowKeys: Key[], selectedRows: T[]) => void;
|
|
22
22
|
limit?: number;
|
|
23
23
|
independentSelectionExpandedRows?: boolean;
|
|
24
24
|
checkRowSelectionStatus?: (record: T) => {
|
|
@@ -45,7 +45,7 @@ export type Filter = {
|
|
|
45
45
|
disabled?: boolean;
|
|
46
46
|
};
|
|
47
47
|
export type RowType<T> = {
|
|
48
|
-
key?:
|
|
48
|
+
key?: Key;
|
|
49
49
|
children?: T[];
|
|
50
50
|
};
|
|
51
51
|
export type Locale = TableLocale & {
|
|
@@ -99,7 +99,7 @@ export type SingleColumnSort = {
|
|
|
99
99
|
};
|
|
100
100
|
export type OnSortFn = (singleColumnSort: SingleColumnSort, sortState: ColumnsSortState) => void;
|
|
101
101
|
export type DSTableProps<T extends any & GroupType<T>> = AntTableProps<T> & {
|
|
102
|
-
title?:
|
|
102
|
+
title?: ReactNode | (() => ReactNode);
|
|
103
103
|
hideTitleBar?: boolean;
|
|
104
104
|
headerWithBorderTop?: boolean;
|
|
105
105
|
itemsMenu?: string | ReactNode;
|
|
@@ -70,7 +70,7 @@ var TableHeader = function TableHeader(_ref) {
|
|
|
70
70
|
autoAdjustOverflow: true
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
}, title), !hideTitlePart && /*#__PURE__*/React.createElement(S.TitleSeparator, null)), !isLoading && !hideTitlePart && /*#__PURE__*/React.createElement(S.TitlePart, null, /*#__PURE__*/React.createElement("strong", null, formatValue(dataSourceTotalCount || dataSource.length)),
|
|
73
|
+
}, title), !hideTitlePart && /*#__PURE__*/React.createElement(S.TitleSeparator, null)), !isLoading && !hideTitlePart && /*#__PURE__*/React.createElement(S.TitlePart, null, /*#__PURE__*/React.createElement("strong", null, formatValue(dataSourceTotalCount || dataSource.length)), ' ', /*#__PURE__*/React.createElement("span", null, locale == null || (_locale$pagination = locale.pagination) == null ? void 0 : _locale$pagination.items))));
|
|
74
74
|
}, [selection, dataSourceTotalCount, dataSource, itemsMenu, locale, selectedRows, rowKey, dataSourceFull, childrenColumnName, renderSelectionTitle, filters, formatValue, title, hideTitlePart, isLoading]);
|
|
75
75
|
return /*#__PURE__*/React.createElement(S.Header, {
|
|
76
76
|
withBorderTop: withBorderTop
|
|
@@ -88,6 +88,10 @@ var TableHeader = function TableHeader(_ref) {
|
|
|
88
88
|
selected: filter.selected,
|
|
89
89
|
disabled: filter.disabled
|
|
90
90
|
});
|
|
91
|
-
}), filterComponent,
|
|
91
|
+
}), filterComponent && /*#__PURE__*/React.createElement(S.RightSideWrapper, {
|
|
92
|
+
"data-testid": "ds-table-filter-wrapper"
|
|
93
|
+
}, filterComponent), searchComponent && /*#__PURE__*/React.createElement(S.RightSideWrapper, {
|
|
94
|
+
"data-testid": "ds-table-search-wrapper"
|
|
95
|
+
}, searchComponent)));
|
|
92
96
|
};
|
|
93
97
|
export default TableHeader;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
function
|
|
2
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
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); }
|
|
6
2
|
import React, { useCallback, useMemo } from 'react';
|
|
7
3
|
import Dropdown from '@synerise/ds-dropdown';
|
|
8
4
|
import Button from '@synerise/ds-button';
|
|
@@ -146,10 +142,9 @@ var TableSelection = function TableSelection(_ref) {
|
|
|
146
142
|
selectableRecordsCount = _useBulkSelectionCoun.selectableRecordsCount,
|
|
147
143
|
selectableAndSelectedRecordsCount = _useBulkSelectionCoun.selectableAndSelectedRecordsCount,
|
|
148
144
|
selectedRecordsCount = _useBulkSelectionCoun.selectedRecordsCount;
|
|
149
|
-
var isIndeterminate = selectedRecordsCount > 0 &&
|
|
145
|
+
var isIndeterminate = selectedRecordsCount > 0 && selectableRecordsCount !== selectableAndSelectedRecordsCount;
|
|
150
146
|
var disabledBulkSelection = allRecordsCount === 0 || selectableRecordsCount === 0;
|
|
151
|
-
var
|
|
152
|
-
var isAllSelected = selectableRecordsCount === selectableAndSelectedRecordsCount;
|
|
147
|
+
var isAllSelected = !disabledBulkSelection && selectableRecordsCount === selectableAndSelectedRecordsCount;
|
|
153
148
|
var selectionTooltipTitle = !isAllSelected ? locale == null ? void 0 : locale.selectAllTooltip : locale == null ? void 0 : locale.unselectAll;
|
|
154
149
|
var menuDataSource = useMemo(function () {
|
|
155
150
|
var _selection$selections;
|
|
@@ -175,7 +170,7 @@ var TableSelection = function TableSelection(_ref) {
|
|
|
175
170
|
default:
|
|
176
171
|
{
|
|
177
172
|
var sel = selectionMenuElement;
|
|
178
|
-
return
|
|
173
|
+
return _extends({}, sel, {
|
|
179
174
|
text: sel.label
|
|
180
175
|
});
|
|
181
176
|
}
|
|
@@ -189,7 +184,7 @@ var TableSelection = function TableSelection(_ref) {
|
|
|
189
184
|
}, /*#__PURE__*/React.createElement(Button.Checkbox, {
|
|
190
185
|
disabled: disabledBulkSelection,
|
|
191
186
|
"data-testid": "ds-table-batch-selection-button",
|
|
192
|
-
checked:
|
|
187
|
+
checked: isAllSelected,
|
|
193
188
|
onChange: function onChange() {
|
|
194
189
|
if (!isAllSelected) {
|
|
195
190
|
selectAll();
|
|
@@ -1,64 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { Ref, ReactElement } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import type { RowType, DSTableProps, RowSelection, CustomizeScrollBodyInfo, DSColumnType } from '../Table.types';
|
|
2
|
+
import type { RowType } from '../Table.types';
|
|
5
3
|
import type { VirtualTableRef, VirtualTableProps } from './VirtualTable.types';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
headerWithBorderTop?: boolean | undefined;
|
|
12
|
-
itemsMenu?: React.ReactNode;
|
|
13
|
-
search?: string | undefined;
|
|
14
|
-
cellSize?: import("@synerise/ds-utils").LiteralStringUnion<"small" | "medium"> | undefined;
|
|
15
|
-
roundedHeader?: boolean | undefined;
|
|
16
|
-
selection?: RowSelection<T> | undefined;
|
|
17
|
-
rowStar?: import("../hooks/useRowStar").RowStar<T> | undefined;
|
|
18
|
-
filters?: import("../Table.types").Filter[] | undefined;
|
|
19
|
-
searchComponent?: React.ReactNode;
|
|
20
|
-
filterComponent?: React.ReactNode;
|
|
21
|
-
emptyDataComponent?: React.ReactNode;
|
|
22
|
-
headerButton?: React.ReactNode;
|
|
23
|
-
grouped?: boolean | undefined;
|
|
24
|
-
hideGroupExpander?: boolean | undefined;
|
|
25
|
-
initialGroupsCollapsed?: boolean | undefined;
|
|
26
|
-
hideColumnNames?: boolean | undefined;
|
|
27
|
-
columns?: DSColumnType<T>[] | undefined;
|
|
28
|
-
locale?: import("../Table.types").Locale | undefined;
|
|
29
|
-
components?: import("rc-table/lib/interface").TableComponents<T> | (import("rc-table/lib/interface").TableComponents<T> & {
|
|
30
|
-
body?: ((data: T[], info: CustomizeScrollBodyInfo, defaultTableProps?: DSTableProps<T> | undefined) => React.ReactNode) | undefined;
|
|
31
|
-
}) | undefined;
|
|
32
|
-
renderSelectionTitle?: ((selection?: RowSelection<T> | undefined, filters?: import("../Table.types").Filter[] | undefined) => React.ReactNode) | undefined;
|
|
33
|
-
hideTitlePart?: boolean | undefined;
|
|
34
|
-
disableColumnNamesLineBreak?: boolean | undefined;
|
|
35
|
-
onSort?: import("../Table.types").OnSortFn | undefined;
|
|
36
|
-
dataSourceFull?: T[] | undefined;
|
|
37
|
-
dataSourceTotalCount?: number | undefined;
|
|
38
|
-
skeletonProps?: {
|
|
39
|
-
maxHeight?: number | undefined;
|
|
40
|
-
headerHeight?: number | undefined;
|
|
41
|
-
subheaderHeight?: number | undefined;
|
|
42
|
-
cellHeight?: number | undefined;
|
|
43
|
-
} | undefined;
|
|
44
|
-
} & {
|
|
45
|
-
cellHeight: number;
|
|
46
|
-
infiniteScroll?: import("../InfiniteScroll/InfiniteLoaderItem.types").InfiniteScrollProps | undefined;
|
|
47
|
-
initialWidth: number;
|
|
48
|
-
scroll: {
|
|
49
|
-
x?: number | undefined;
|
|
50
|
-
y: number;
|
|
51
|
-
};
|
|
52
|
-
sticky?: ((boolean | import("rc-table/lib/interface").TableSticky | undefined) & {
|
|
53
|
-
scrollThreshold?: number | undefined;
|
|
54
|
-
offsetHeader?: number | undefined;
|
|
55
|
-
getContainer: () => HTMLDivElement;
|
|
56
|
-
}) | undefined;
|
|
57
|
-
onListRefChange?: ((ref: React.RefObject<List<any>>) => void) | undefined;
|
|
58
|
-
onRowClick?: ((row: T) => void) | undefined;
|
|
59
|
-
onItemsRendered?: ((props: import("react-window").ListOnItemsRenderedProps) => void) | undefined;
|
|
60
|
-
onScrollToRecordIndex?: ((recordIndex: number, callback?: (() => void) | undefined) => void) | undefined;
|
|
61
|
-
} & {
|
|
62
|
-
ref?: React.Ref<VirtualTableRef> | undefined;
|
|
4
|
+
import { EXPANDED_ROW_PROPERTY } from './constants';
|
|
5
|
+
type VirtualTableType = <T extends object & RowType<T> & {
|
|
6
|
+
[EXPANDED_ROW_PROPERTY]?: boolean;
|
|
7
|
+
}>(p: VirtualTableProps<T> & {
|
|
8
|
+
ref?: Ref<VirtualTableRef>;
|
|
63
9
|
}) => ReactElement;
|
|
10
|
+
declare const _default: VirtualTableType;
|
|
64
11
|
export default _default;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
var _excluded = ["style"];
|
|
2
|
-
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); }
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
function
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
8
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
|
+
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); }
|
|
9
4
|
import React, { useCallback, useState, useRef, forwardRef, useEffect, useMemo, useImperativeHandle } from 'react';
|
|
10
5
|
import { FixedSizeList as List } from 'react-window';
|
|
11
6
|
import ResizeObserver from 'rc-resize-observer';
|
|
12
7
|
import { compact } from 'lodash';
|
|
13
8
|
import { useIntl } from 'react-intl';
|
|
9
|
+
import classnames from 'classnames';
|
|
14
10
|
import { useElementInView } from '@synerise/ds-utils';
|
|
15
11
|
import { infiniteLoaderItemHeight } from '../InfiniteScroll/constants';
|
|
16
12
|
import BackToTopButton from '../InfiniteScroll/BackToTopButton';
|
|
@@ -162,8 +158,8 @@ var VirtualTable = function VirtualTable(props, forwardedRef) {
|
|
|
162
158
|
var _useRowKey = useRowKey(rowKey),
|
|
163
159
|
getRowKey = _useRowKey.getRowKey;
|
|
164
160
|
var allData = dataSourceFull || dataSource;
|
|
165
|
-
var propsForRowStar =
|
|
166
|
-
rowStar:
|
|
161
|
+
var propsForRowStar = _extends({}, props, {
|
|
162
|
+
rowStar: _extends({}, rowStar, {
|
|
167
163
|
onClick: function onClick(e) {
|
|
168
164
|
e.stopPropagation();
|
|
169
165
|
if (typeof (rowStar == null ? void 0 : rowStar.onClick) === 'function') {
|
|
@@ -248,8 +244,8 @@ var VirtualTable = function VirtualTable(props, forwardedRef) {
|
|
|
248
244
|
if (!firstFixedRightFound) {
|
|
249
245
|
firstFixedRightFound = true;
|
|
250
246
|
}
|
|
251
|
-
return
|
|
252
|
-
fixedRight: [].concat(prev.fixedRight, [
|
|
247
|
+
return _extends({}, prev, {
|
|
248
|
+
fixedRight: [].concat(prev.fixedRight, [_extends({}, column, {
|
|
253
249
|
fixedFirst: fixedFirst,
|
|
254
250
|
right: right,
|
|
255
251
|
width: width
|
|
@@ -259,23 +255,23 @@ var VirtualTable = function VirtualTable(props, forwardedRef) {
|
|
|
259
255
|
if (column.fixed === 'left') {
|
|
260
256
|
cumulativeLeftOffset += width;
|
|
261
257
|
var prevFixedLeft = prev.fixedLeft;
|
|
262
|
-
var newFixedLeft = prevFixedLeft.length ? [].concat(prevFixedLeft, [
|
|
258
|
+
var newFixedLeft = prevFixedLeft.length ? [].concat(prevFixedLeft, [_extends({}, prevFixedLeft.pop(), {
|
|
263
259
|
fixedFirst: false
|
|
264
|
-
}),
|
|
260
|
+
}), _extends({}, column, {
|
|
265
261
|
fixedFirst: true,
|
|
266
262
|
left: left,
|
|
267
263
|
width: width
|
|
268
|
-
})]) : [].concat(prevFixedLeft, [
|
|
264
|
+
})]) : [].concat(prevFixedLeft, [_extends({}, column, {
|
|
269
265
|
fixedFirst: true,
|
|
270
266
|
left: left,
|
|
271
267
|
width: width
|
|
272
268
|
})]);
|
|
273
|
-
return
|
|
269
|
+
return _extends({}, prev, {
|
|
274
270
|
fixedLeft: newFixedLeft
|
|
275
271
|
});
|
|
276
272
|
}
|
|
277
|
-
return
|
|
278
|
-
remaining: [].concat(prev.remaining, [
|
|
273
|
+
return _extends({}, prev, {
|
|
274
|
+
remaining: [].concat(prev.remaining, [_extends({}, column, {
|
|
279
275
|
width: width
|
|
280
276
|
})])
|
|
281
277
|
});
|
|
@@ -302,7 +298,7 @@ var VirtualTable = function VirtualTable(props, forwardedRef) {
|
|
|
302
298
|
rest = _objectWithoutPropertiesLoose(_ref3, _excluded);
|
|
303
299
|
return /*#__PURE__*/React.createElement(S.InnerListElement, _extends({
|
|
304
300
|
ref: innerElementRef,
|
|
305
|
-
style:
|
|
301
|
+
style: _extends({}, style, {
|
|
306
302
|
height: Number(style == null ? void 0 : style.height) + infiniteLoaderOffset + "px"
|
|
307
303
|
})
|
|
308
304
|
}, rest));
|
|
@@ -423,6 +419,8 @@ var VirtualTable = function VirtualTable(props, forwardedRef) {
|
|
|
423
419
|
horizontalScrollRef.current.scrollTo({
|
|
424
420
|
left: scrollLeft
|
|
425
421
|
});
|
|
422
|
+
setPingRight(Math.ceil(scrollLeft) < horizontalScrollRef.current.scrollWidth - horizontalScrollRef.current.clientWidth);
|
|
423
|
+
setPingLeft(Math.floor(scrollLeft) > 0);
|
|
426
424
|
}
|
|
427
425
|
};
|
|
428
426
|
return /*#__PURE__*/React.createElement(S.VirtualListWrapper, {
|
|
@@ -464,8 +462,8 @@ var VirtualTable = function VirtualTable(props, forwardedRef) {
|
|
|
464
462
|
var rowChildren = currentRow[childrenColumnName];
|
|
465
463
|
if (key !== undefined && expandable != null && (_expandable$expandedR2 = expandable.expandedRowKeys) != null && _expandable$expandedR2.includes(key) && Array.isArray(rowChildren) && rowChildren.length) {
|
|
466
464
|
return [].concat(result, [currentRow], rowChildren.map(function (child, index) {
|
|
467
|
-
var
|
|
468
|
-
return
|
|
465
|
+
var _extends2;
|
|
466
|
+
return _extends({}, child, (_extends2 = {}, _extends2[EXPANDED_ROW_PROPERTY] = true, _extends2.index = index, _extends2));
|
|
469
467
|
}));
|
|
470
468
|
}
|
|
471
469
|
return [].concat(result, [currentRow]);
|
|
@@ -476,17 +474,32 @@ var VirtualTable = function VirtualTable(props, forwardedRef) {
|
|
|
476
474
|
}, [connectObject, expandable == null ? void 0 : expandable.expandedRowKeys, cellHeight, scroll.y, isSticky, stickyScrollThreshold, infiniteScroll, createItemData, tableWidth, scrollWidth, onItemsRendered, outerElement, listInnerElementType, loading, offsetScroll, getRowKey, infiniteLoaderOffset, childrenColumnName]);
|
|
477
475
|
var columnsSliceStartIndex = Number(!!selection) + Number(!!rowStar);
|
|
478
476
|
var scrollValue = !dataSource || (dataSource == null ? void 0 : dataSource.length) === 0 ? undefined : scroll;
|
|
477
|
+
var _useState6 = useState(false),
|
|
478
|
+
pingRight = _useState6[0],
|
|
479
|
+
setPingRight = _useState6[1];
|
|
480
|
+
var _useState7 = useState(false),
|
|
481
|
+
pingLeft = _useState7[0],
|
|
482
|
+
setPingLeft = _useState7[1];
|
|
479
483
|
var classNames = React.useMemo(function () {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
+
return classnames('virtual-table', className, {
|
|
485
|
+
'virtual-table-infinite-scroll': hasInfiniteScroll,
|
|
486
|
+
'with-sticky-header': isSticky,
|
|
487
|
+
'ds-table-ping-left': pingLeft,
|
|
488
|
+
'ds-table-ping-right': pingRight
|
|
489
|
+
});
|
|
490
|
+
}, [className, hasInfiniteScroll, isSticky, pingLeft, pingRight]);
|
|
484
491
|
var finalColumns = mergedColumns.slice(columnsSliceStartIndex);
|
|
485
492
|
useEffect(function () {
|
|
486
493
|
// trigger body component onScroll to toggle .ant-table-ping-left / .ant-table-ping-right classes that indicate where columns overflow
|
|
487
494
|
if (customBodyOnScrollRef.current && outerListRef.current && outerListRef.current.parentElement) {
|
|
495
|
+
var scrollableElement = outerListRef.current.parentElement;
|
|
496
|
+
var scrollLeft = scrollableElement.scrollLeft,
|
|
497
|
+
fullWidth = scrollableElement.scrollWidth,
|
|
498
|
+
clientWidth = scrollableElement.clientWidth;
|
|
499
|
+
setPingLeft(fullWidth > clientWidth && Math.floor(scrollLeft) > 0);
|
|
500
|
+
setPingRight(fullWidth > clientWidth && Math.ceil(scrollLeft) < fullWidth - clientWidth);
|
|
488
501
|
customBodyOnScrollRef.current({
|
|
489
|
-
currentTarget:
|
|
502
|
+
currentTarget: scrollableElement
|
|
490
503
|
});
|
|
491
504
|
}
|
|
492
505
|
}, [tableWidth, scrollWidth]);
|
|
@@ -57,5 +57,5 @@ export var VirtualTableWrapper = styled.div.withConfig({
|
|
|
57
57
|
displayName: "VirtualTablestyles__VirtualTableWrapper",
|
|
58
58
|
componentId: "aehkhc-7"
|
|
59
59
|
})(["", ""], function (props) {
|
|
60
|
-
return props.isSticky ? css([".ant-table-title{position:sticky;top:", "px;z-index:99;}.ant-table-title,.ant-table-sticky-
|
|
60
|
+
return props.isSticky ? css([".ant-table-title{position:sticky;top:", "px;z-index:99;}.ant-table-title,.ant-table-sticky-holder{transition:top 0.3s ease-in-out;}", ";"], props.titleBarTop - props.titleBarHeight, props.isHeaderVisible && css([".ant-table-title{top:", "px;}.ant-table-sticky-holder{top:", "px !important;}"], props.titleBarTop, props.titleBarTop + props.titleBarHeight)) : css(["position:relative;"]);
|
|
61
61
|
});
|
|
@@ -6,7 +6,7 @@ import { RowStar } from '../hooks/useRowStar';
|
|
|
6
6
|
export declare const INFINITE_LOADED_ITEM_HEIGHT = 64;
|
|
7
7
|
export interface VirtualTableRowProps<T> {
|
|
8
8
|
data: {
|
|
9
|
-
dataSource: T[];
|
|
9
|
+
dataSource: readonly T[];
|
|
10
10
|
cellHeight: number;
|
|
11
11
|
infiniteScroll: InfiniteScrollProps | undefined;
|
|
12
12
|
mergedColumns: any[];
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
function
|
|
2
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
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); }
|
|
6
2
|
import React, { memo, useCallback, useMemo } from 'react';
|
|
7
3
|
import classNames from 'classnames';
|
|
8
4
|
import { areEqual } from 'react-window';
|
|
@@ -59,13 +55,13 @@ function VirtualTableRow(_ref) {
|
|
|
59
55
|
top = Number(style.top) + cellHeight + prevDataInfiniteLoaderHeight + "px";
|
|
60
56
|
}
|
|
61
57
|
return infiniteLoaderItemProps && isVisible && /*#__PURE__*/React.createElement(S.RowWrapper, {
|
|
62
|
-
style:
|
|
58
|
+
style: _extends({}, style, {
|
|
63
59
|
top: top,
|
|
64
60
|
height: INFINITE_LOADED_ITEM_HEIGHT + "px",
|
|
65
61
|
padding: '16px 24px'
|
|
66
62
|
})
|
|
67
63
|
}, /*#__PURE__*/React.createElement(InfiniteLoaderItem, {
|
|
68
|
-
infiniteScroll:
|
|
64
|
+
infiniteScroll: _extends({}, infiniteScroll, infiniteLoaderItemProps),
|
|
69
65
|
position: position
|
|
70
66
|
}));
|
|
71
67
|
}, [cellHeight, dataSource.length, index, infiniteScroll, style]);
|
|
@@ -74,7 +70,7 @@ function VirtualTableRow(_ref) {
|
|
|
74
70
|
className: classNames('virtual-table-row', {
|
|
75
71
|
'ds-expanded-row': rowData[EXPANDED_ROW_PROPERTY]
|
|
76
72
|
}),
|
|
77
|
-
style:
|
|
73
|
+
style: _extends({}, style, {
|
|
78
74
|
top: top
|
|
79
75
|
}),
|
|
80
76
|
onClick: function onClick(event) {
|
|
@@ -103,7 +99,7 @@ function VirtualTableRow(_ref) {
|
|
|
103
99
|
minWidth: calculateToPixelsIfDefined(column == null ? void 0 : column.minWidth),
|
|
104
100
|
width: column.width,
|
|
105
101
|
maxWidth: calculateToPixelsIfDefined(column == null ? void 0 : column.maxWidth)
|
|
106
|
-
}, renderColumn(column, rowData, columnIndex));
|
|
102
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, renderColumn(column, rowData, columnIndex)));
|
|
107
103
|
})), infiniteLoader('BOTTOM'));
|
|
108
104
|
}
|
|
109
105
|
export default memo(VirtualTableRow, areEqual);
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
function
|
|
2
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
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); }
|
|
6
2
|
import { useCallback, useMemo } from 'react';
|
|
7
3
|
import { useRowKey } from '../useRowKey';
|
|
8
4
|
import { isRecordSelectable } from '../../utils';
|
|
@@ -63,7 +59,7 @@ export var useBulkSelectionCount = function useBulkSelectionCount(_ref) {
|
|
|
63
59
|
};
|
|
64
60
|
}, initialValue);
|
|
65
61
|
}, [childrenColumnName, dataSource, getRowKey, getSelectableChildren, selection]);
|
|
66
|
-
return
|
|
62
|
+
return _extends({}, result, {
|
|
67
63
|
allRecordsCount: dataSource.length
|
|
68
64
|
});
|
|
69
65
|
};
|
|
@@ -10,7 +10,8 @@ var createRowStarColumn = function createRowStarColumn(_ref) {
|
|
|
10
10
|
var locale = _ref2.locale,
|
|
11
11
|
rowStar = _ref2.rowStar,
|
|
12
12
|
selection = _ref2.selection,
|
|
13
|
-
getRowKey = _ref2.getRowKey
|
|
13
|
+
getRowKey = _ref2.getRowKey,
|
|
14
|
+
loading = _ref2.loading;
|
|
14
15
|
return {
|
|
15
16
|
key: '_row-star',
|
|
16
17
|
className: ((rowStar == null ? void 0 : rowStar.className) || '') + " ds-table-star-column",
|
|
@@ -18,7 +19,7 @@ var createRowStarColumn = function createRowStarColumn(_ref) {
|
|
|
18
19
|
render: (rowStar == null ? void 0 : rowStar.renderCell) || function (value, record) {
|
|
19
20
|
var expandedChild = record.expandedChild;
|
|
20
21
|
var keyString = String(getRowKey(record));
|
|
21
|
-
if (expandedChild && rowStar != null && rowStar.disableForExpandedRows) return null;
|
|
22
|
+
if (loading || expandedChild && rowStar != null && rowStar.disableForExpandedRows) return null;
|
|
22
23
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
23
24
|
title: locale == null ? void 0 : locale.starRowTooltip
|
|
24
25
|
}, /*#__PURE__*/React.createElement(Button.Star, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|