@kne/table-page 0.1.7 → 0.1.9
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/README.md +979 -103
- package/dist/index.css +197 -15
- package/dist/index.css.map +1 -1
- package/dist/index.js +298 -82
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +296 -87
- package/dist/index.modern.js.map +1 -1
- package/dist/locale/en-US.js +3 -1
- package/dist/locale/en-US.js.map +1 -1
- package/dist/locale/en-US.modern.js +3 -1
- package/dist/locale/en-US.modern.js.map +1 -1
- package/dist/locale/zh-CN.js +3 -1
- package/dist/locale/zh-CN.js.map +1 -1
- package/dist/locale/zh-CN.modern.js +3 -1
- package/dist/locale/zh-CN.modern.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var classnames = require('classnames');
|
|
|
7
7
|
var get = require('lodash/get');
|
|
8
8
|
var tableView = require('@kne/table-view');
|
|
9
9
|
var isEmpty = require('@kne/is-empty');
|
|
10
|
-
var
|
|
10
|
+
var responsiveUtils = require('@kne/responsive-utils');
|
|
11
11
|
var useRefCallback = require('@kne/use-ref-callback');
|
|
12
12
|
var transform = require('lodash/transform');
|
|
13
13
|
var pick = require('lodash/pick');
|
|
@@ -29,7 +29,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
29
29
|
|
|
30
30
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
31
31
|
var get__default = /*#__PURE__*/_interopDefaultLegacy(get);
|
|
32
|
-
var viewStyle__default = /*#__PURE__*/_interopDefaultLegacy(viewStyle);
|
|
33
32
|
var useRefCallback__default = /*#__PURE__*/_interopDefaultLegacy(useRefCallback);
|
|
34
33
|
var transform__default = /*#__PURE__*/_interopDefaultLegacy(transform);
|
|
35
34
|
var pick__default = /*#__PURE__*/_interopDefaultLegacy(pick);
|
|
@@ -59,7 +58,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
59
58
|
return t;
|
|
60
59
|
}
|
|
61
60
|
|
|
62
|
-
var style$2 = {"table":"kne-table-page_awa1L","is-selected-all":"kne-table-page_692q3","is-selected":"kne-table-page_IWgjl","is-disabled":"kne-table-page_YUG4k","has-summary":"kne-table-page_Cb-du","has-group-header":"kne-table-page_7qTC5","is-sticky":"kne-table-page_jGzIR","is-sticky-scroll-y":"kne-table-page_P6lxG","is-sticky-viewport":"kne-table-page_Kr-p6","table-cell":"kne-table-page_HPmr3","selection-col":"kne-table-page_D7YhS","radio-col":"kne-table-page_df9z3","is-computed":"kne-table-page_ZA1Je","is-resize":"kne-table-page_CA0uL","column-resize-guide":"kne-table-page_JARA2"};
|
|
61
|
+
var style$2 = {"table":"kne-table-page_awa1L","is-size-small":"kne-table-page_C1bom","is-size-large":"kne-table-page_xEu6c","is-selected-all":"kne-table-page_692q3","is-selected":"kne-table-page_IWgjl","is-disabled":"kne-table-page_YUG4k","has-summary":"kne-table-page_Cb-du","has-group-header":"kne-table-page_7qTC5","is-sticky":"kne-table-page_jGzIR","is-sticky-scroll-y":"kne-table-page_P6lxG","is-sticky-viewport":"kne-table-page_Kr-p6","col-content":"kne-table-page_CWr3V","empty":"kne-table-page_BoatL","table-cell":"kne-table-page_HPmr3","selection-col":"kne-table-page_D7YhS","radio-col":"kne-table-page_df9z3","is-computed":"kne-table-page_ZA1Je","is-resize":"kne-table-page_CA0uL","is-mobile-render":"kne-table-page_Jy4md","column-resize-guide":"kne-table-page_JARA2"};
|
|
63
62
|
|
|
64
63
|
const getColumnConfig = (config, columnName, field, defaultValue) => {
|
|
65
64
|
const columnConfig = config?.[columnName];
|
|
@@ -88,8 +87,10 @@ const locale$1 = {
|
|
|
88
87
|
Search: '搜索',
|
|
89
88
|
BatchOperations: '批量操作',
|
|
90
89
|
BatchOperationsWithCount: '批量操作(已选:{count}条)',
|
|
90
|
+
BatchOperationsMobileSelected: '已选:{count}条',
|
|
91
91
|
Cancel: '取消',
|
|
92
|
-
Confirm: '确定'
|
|
92
|
+
Confirm: '确定',
|
|
93
|
+
All: '全部'
|
|
93
94
|
};
|
|
94
95
|
|
|
95
96
|
const locale = {
|
|
@@ -103,8 +104,10 @@ const locale = {
|
|
|
103
104
|
Search: 'Search',
|
|
104
105
|
BatchOperations: 'Batch Actions',
|
|
105
106
|
BatchOperationsWithCount: 'Batch Actions (Selected: {count})',
|
|
107
|
+
BatchOperationsMobileSelected: 'Selected: {count}',
|
|
106
108
|
Cancel: 'Cancel',
|
|
107
|
-
Confirm: 'Confirm'
|
|
109
|
+
Confirm: 'Confirm',
|
|
110
|
+
All: 'All'
|
|
108
111
|
};
|
|
109
112
|
|
|
110
113
|
const withLocale = reactIntl.createWithIntlProvider({
|
|
@@ -1035,7 +1038,7 @@ const observeViewportIntersection = (element, onChange) => {
|
|
|
1035
1038
|
};
|
|
1036
1039
|
};
|
|
1037
1040
|
|
|
1038
|
-
const _excluded$1 = ["className", "dataSource", "columns", "rowKey", "rowSelection", "valueIsEmpty", "emptyIsPlaceholder", "placeholder", "empty", "onRowSelect", "render", "context", "sticky", "scrollTopInset", "stickyOffset", "getStickyContainer", "headerStyle", "pagination", "sortRender", "name", "controllerOpen", "tableServerApis", "scroll", "summary"],
|
|
1041
|
+
const _excluded$1 = ["className", "dataSource", "columns", "rowKey", "rowSelection", "valueIsEmpty", "emptyIsPlaceholder", "placeholder", "empty", "onRowSelect", "render", "renderMobile", "context", "sticky", "scrollTopInset", "stickyOffset", "getStickyContainer", "headerStyle", "pagination", "sortRender", "mobileSortToolbar", "name", "controllerOpen", "tableServerApis", "scroll", "summary", "size"],
|
|
1039
1042
|
_excluded2$1 = ["getContainer"];
|
|
1040
1043
|
const mapJustifyToAlign = justify => {
|
|
1041
1044
|
if (justify === 'center') {
|
|
@@ -1074,7 +1077,7 @@ const getAntCellClassName = function () {
|
|
|
1074
1077
|
return classnames__default["default"](style$2['table-cell'], 'info-page-table-col', ...[].slice.call(arguments));
|
|
1075
1078
|
};
|
|
1076
1079
|
const wrapColContent = node => /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1077
|
-
className:
|
|
1080
|
+
className: style$2['col-content'],
|
|
1078
1081
|
children: node
|
|
1079
1082
|
});
|
|
1080
1083
|
const Table = p => {
|
|
@@ -1083,6 +1086,7 @@ const Table = p => {
|
|
|
1083
1086
|
const _useState = react.useState(true),
|
|
1084
1087
|
isLayout = _useState[0],
|
|
1085
1088
|
setIsLayout = _useState[1];
|
|
1089
|
+
const isMobile = responsiveUtils.useIsMobile();
|
|
1086
1090
|
const props = Object.assign({}, {
|
|
1087
1091
|
rowKey: 'id',
|
|
1088
1092
|
valueIsEmpty: isEmpty.isEmpty,
|
|
@@ -1102,6 +1106,7 @@ const Table = p => {
|
|
|
1102
1106
|
empty = props.empty,
|
|
1103
1107
|
onRowSelect = props.onRowSelect,
|
|
1104
1108
|
render = props.render,
|
|
1109
|
+
renderMobile = props.renderMobile,
|
|
1105
1110
|
context = props.context,
|
|
1106
1111
|
sticky = props.sticky,
|
|
1107
1112
|
scrollTopInset = props.scrollTopInset,
|
|
@@ -1111,12 +1116,16 @@ const Table = p => {
|
|
|
1111
1116
|
_props$pagination = props.pagination,
|
|
1112
1117
|
pagination = _props$pagination === void 0 ? false : _props$pagination,
|
|
1113
1118
|
sortRender = props.sortRender,
|
|
1119
|
+
mobileSortToolbar = props.mobileSortToolbar,
|
|
1114
1120
|
name = props.name,
|
|
1115
1121
|
controllerOpen = props.controllerOpen,
|
|
1116
1122
|
tableServerApis = props.tableServerApis,
|
|
1117
1123
|
scroll = props.scroll,
|
|
1118
1124
|
summary = props.summary,
|
|
1125
|
+
size = props.size,
|
|
1119
1126
|
others = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
1127
|
+
const sizeClassName = size === 'small' ? style$2['is-size-small'] : size === 'large' ? style$2['is-size-large'] : null;
|
|
1128
|
+
const useMobileRender = tableView.isRenderMobileActive(renderMobile, isMobile);
|
|
1120
1129
|
const columns = react.useMemo(() => tableView.resolveColumns(columnsProp), [columnsProp]);
|
|
1121
1130
|
react.useEffect(() => {
|
|
1122
1131
|
if (tableWidth) {
|
|
@@ -1202,7 +1211,7 @@ const Table = p => {
|
|
|
1202
1211
|
key: colName,
|
|
1203
1212
|
dataIndex: colName,
|
|
1204
1213
|
title: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1205
|
-
className:
|
|
1214
|
+
className: style$2['col-content'],
|
|
1206
1215
|
children: tableView.renderColumnTitle(title, column, sortRender)
|
|
1207
1216
|
}),
|
|
1208
1217
|
width: toAntdWidth(width),
|
|
@@ -1236,7 +1245,7 @@ const Table = p => {
|
|
|
1236
1245
|
placeholder,
|
|
1237
1246
|
dataSource: record,
|
|
1238
1247
|
context
|
|
1239
|
-
}), computedColumn,
|
|
1248
|
+
}), computedColumn, style$2['col-content']);
|
|
1240
1249
|
}
|
|
1241
1250
|
};
|
|
1242
1251
|
if (!controllerOpen) {
|
|
@@ -1244,7 +1253,7 @@ const Table = p => {
|
|
|
1244
1253
|
}
|
|
1245
1254
|
const configProps = computedColumnProps(column, index, {
|
|
1246
1255
|
title: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1247
|
-
className:
|
|
1256
|
+
className: style$2['col-content'],
|
|
1248
1257
|
children: tableView.renderColumnTitle(title, column, sortRender)
|
|
1249
1258
|
})
|
|
1250
1259
|
});
|
|
@@ -1267,7 +1276,7 @@ const Table = p => {
|
|
|
1267
1276
|
return {
|
|
1268
1277
|
key: column.name,
|
|
1269
1278
|
title: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1270
|
-
className:
|
|
1279
|
+
className: style$2['col-content'],
|
|
1271
1280
|
children: tableView.wrapColumnHeaderTitle(column.title)
|
|
1272
1281
|
}),
|
|
1273
1282
|
onHeaderCell: () => ({
|
|
@@ -1290,7 +1299,8 @@ const Table = p => {
|
|
|
1290
1299
|
}
|
|
1291
1300
|
const getRowKey = record => resolveRowKey(rowKey, record);
|
|
1292
1301
|
return _extends({
|
|
1293
|
-
type: rowSelection.type === 'radio' ? 'radio' : 'checkbox'
|
|
1302
|
+
type: rowSelection.type === 'radio' ? 'radio' : 'checkbox',
|
|
1303
|
+
preserveSelectedRowKeys: true
|
|
1294
1304
|
}, hasFixedColumn ? {
|
|
1295
1305
|
fixed: 'left'
|
|
1296
1306
|
} : {}, {
|
|
@@ -1302,14 +1312,22 @@ const Table = p => {
|
|
|
1302
1312
|
rowSelection.onIsSelectAllChange(checked);
|
|
1303
1313
|
return;
|
|
1304
1314
|
}
|
|
1315
|
+
const pageKeys = (dataSource || []).filter(item => !item.disabled).map(getRowKey);
|
|
1316
|
+
const existing = rowSelection.selectedRowKeys || [];
|
|
1305
1317
|
if (!checked) {
|
|
1306
|
-
rowSelection.onChange(
|
|
1318
|
+
rowSelection.onChange(existing.filter(key => pageKeys.indexOf(key) === -1), undefined, {
|
|
1307
1319
|
context,
|
|
1308
1320
|
checked: false
|
|
1309
1321
|
});
|
|
1310
1322
|
return;
|
|
1311
1323
|
}
|
|
1312
|
-
|
|
1324
|
+
const merged = existing.slice();
|
|
1325
|
+
pageKeys.forEach(key => {
|
|
1326
|
+
if (merged.indexOf(key) === -1) {
|
|
1327
|
+
merged.push(key);
|
|
1328
|
+
}
|
|
1329
|
+
});
|
|
1330
|
+
rowSelection.onChange(merged, undefined, {
|
|
1313
1331
|
context,
|
|
1314
1332
|
checked: true
|
|
1315
1333
|
});
|
|
@@ -1395,6 +1413,25 @@ const Table = p => {
|
|
|
1395
1413
|
'--scroll-top-inset': cssValue
|
|
1396
1414
|
};
|
|
1397
1415
|
}, [resolvedScrollTopInset]);
|
|
1416
|
+
if (useMobileRender) {
|
|
1417
|
+
return /*#__PURE__*/jsxRuntime.jsx(tableView.TableView, _extends({}, others, {
|
|
1418
|
+
className: classnames__default["default"](className, style$2['is-mobile-render']),
|
|
1419
|
+
dataSource: dataSource,
|
|
1420
|
+
columns: visibleColumns,
|
|
1421
|
+
rowKey: rowKey,
|
|
1422
|
+
rowSelection: rowSelection,
|
|
1423
|
+
valueIsEmpty: valueIsEmpty,
|
|
1424
|
+
emptyIsPlaceholder: emptyIsPlaceholder,
|
|
1425
|
+
placeholder: placeholder,
|
|
1426
|
+
empty: empty,
|
|
1427
|
+
onRowSelect: onRowSelect,
|
|
1428
|
+
renderMobile: renderMobile,
|
|
1429
|
+
context: context,
|
|
1430
|
+
sortRender: sortRender,
|
|
1431
|
+
mobileSortToolbar: mobileSortToolbar,
|
|
1432
|
+
size: size
|
|
1433
|
+
}));
|
|
1434
|
+
}
|
|
1398
1435
|
const tableElement = /*#__PURE__*/jsxRuntime.jsx(antd.Table, _extends({}, others, {
|
|
1399
1436
|
showHeader: true,
|
|
1400
1437
|
dataSource: dataSource,
|
|
@@ -1409,22 +1446,22 @@ const Table = p => {
|
|
|
1409
1446
|
tableLayout: controllerOpen || hasFixedColumn ? 'fixed' : undefined,
|
|
1410
1447
|
scroll: tableScroll,
|
|
1411
1448
|
onHeaderRow: () => ({
|
|
1412
|
-
className:
|
|
1449
|
+
className: 'info-page-table-header',
|
|
1413
1450
|
style: headerStyle
|
|
1414
1451
|
}),
|
|
1415
1452
|
locale: {
|
|
1416
1453
|
emptyText: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1417
|
-
className:
|
|
1454
|
+
className: style$2['empty'],
|
|
1418
1455
|
children: empty
|
|
1419
1456
|
})
|
|
1420
1457
|
},
|
|
1421
1458
|
rowClassName: record => {
|
|
1422
1459
|
const id = resolveRowKey(rowKey, record);
|
|
1423
1460
|
const isChecked = (rowSelection == null ? void 0 : rowSelection.selectedRowKeys) && rowSelection.selectedRowKeys.indexOf(id) > -1;
|
|
1424
|
-
return classnames__default["default"](
|
|
1425
|
-
[
|
|
1426
|
-
[
|
|
1427
|
-
[
|
|
1461
|
+
return classnames__default["default"]('info-page-table-row', {
|
|
1462
|
+
[style$2['is-selected-all']]: rowSelection == null ? void 0 : rowSelection.isSelectedAll,
|
|
1463
|
+
[style$2['is-selected']]: isChecked,
|
|
1464
|
+
[style$2['is-disabled']]: record.disabled
|
|
1428
1465
|
});
|
|
1429
1466
|
},
|
|
1430
1467
|
onRow: onRowSelect ? record => ({
|
|
@@ -1441,7 +1478,7 @@ const Table = p => {
|
|
|
1441
1478
|
}));
|
|
1442
1479
|
const wrappedTable = /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1443
1480
|
ref: tableRef,
|
|
1444
|
-
className: classnames__default["default"](style$2['table'], 'info-page-table', className, {
|
|
1481
|
+
className: classnames__default["default"](style$2['table'], 'info-page-table', sizeClassName, className, {
|
|
1445
1482
|
[style$2['is-resize']]: currentMoveColumnIndex !== null,
|
|
1446
1483
|
[style$2['is-computed']]: isLayout,
|
|
1447
1484
|
[style$2['has-group-header']]: hasGroupHeader,
|
|
@@ -1472,7 +1509,7 @@ Table.useSelectedRow = tableView.useSelectedRow;
|
|
|
1472
1509
|
Table.useSort = tableView.useSort;
|
|
1473
1510
|
Table.sortDataSource = tableView.useSort.sortDataSource;
|
|
1474
1511
|
|
|
1475
|
-
var style$1 = {"table-page":"kne-table-page_ut9rJ","table-content":"kne-table-page_dxN6N","table-with-toolbar":"kne-table-page_sf06r","has-summary":"kne-table-page_IRdzb","table-in-toolbar":"kne-table-page_sawIT","pagination":"kne-table-page_DSTEf","total_text":"kne-table-page_pJhKr","floating-scrollbar":"kne-table-page_iu8E1","floating-scrollbar-embedded":"kne-table-page_PIv-C","floating-scrollbar-thumb":"kne-table-page_RjZsu","is-moving":"kne-table-page_y-4Ou"};
|
|
1512
|
+
var style$1 = {"table-page":"kne-table-page_ut9rJ","table-page-tabs-outer":"kne-table-page_IowJl","table-content":"kne-table-page_dxN6N","table-with-toolbar":"kne-table-page_sf06r","is-mobile-render":"kne-table-page_D6KGb","has-summary":"kne-table-page_IRdzb","table-in-toolbar":"kne-table-page_sawIT","pagination":"kne-table-page_DSTEf","total_text":"kne-table-page_pJhKr","floating-scrollbar":"kne-table-page_iu8E1","floating-scrollbar-embedded":"kne-table-page_PIv-C","floating-scrollbar-thumb":"kne-table-page_RjZsu","is-moving":"kne-table-page_y-4Ou"};
|
|
1476
1513
|
|
|
1477
1514
|
const BAR_HEIGHT = 15;
|
|
1478
1515
|
const THUMB_MARGIN = 2;
|
|
@@ -1732,21 +1769,94 @@ const HorizontalScroller = /*#__PURE__*/react.forwardRef(({
|
|
|
1732
1769
|
});
|
|
1733
1770
|
});
|
|
1734
1771
|
|
|
1735
|
-
var style = {"table-toolbar-section":"kne-table-page_I21Xn","has-value-display":"kne-table-page_COnMY","table-toolbar":"kne-table-page_x6mv7","table-toolbar-value-display":"kne-table-page_vbwMg","table-toolbar-batch":"kne-table-page_k8-Ku","table-toolbar-
|
|
1772
|
+
var style = {"kne-responsive-boundary":"kne-table-page_u90lj","kne-responsive-scroll":"kne-table-page_bSj1H","table-toolbar-section":"kne-table-page_I21Xn","has-value-display":"kne-table-page_COnMY","table-toolbar":"kne-table-page_x6mv7","table-toolbar-value-display":"kne-table-page_vbwMg","table-toolbar-batch":"kne-table-page_k8-Ku","table-toolbar-batch-btn":"kne-table-page_gZtbT","table-toolbar-batch-clear-btn":"kne-table-page_o6Oml","table-toolbar-search":"kne-table-page_pB5en","table-page-tabs":"kne-table-page_UTy3R","is-mobile-render":"kne-table-page_J-AEV","has-mobile-search":"kne-table-page_14SJt","table-toolbar-search-row":"kne-table-page_zuGJv","is-mobile":"kne-table-page_n9eAS","has-mobile-search-only":"kne-table-page_Y5IR1","has-tabs":"kne-table-page_EImBh","table-toolbar-search-input":"kne-table-page_t60hK","table-toolbar-filter":"kne-table-page_Jyfm7","table-toolbar-divider":"kne-table-page_z--2N","table-toolbar-filter-outer":"kne-table-page_PiWGM","table-toolbar-filter-inner":"kne-table-page_AX3aK"};
|
|
1736
1773
|
|
|
1774
|
+
const TAB_ALL_KEY = '__all__';
|
|
1775
|
+
const getTabActiveKey = (filterValue, tabName) => {
|
|
1776
|
+
if (!tabName || !Array.isArray(filterValue)) {
|
|
1777
|
+
return TAB_ALL_KEY;
|
|
1778
|
+
}
|
|
1779
|
+
const entry = filterValue.find(item => item?.name === tabName);
|
|
1780
|
+
const value = entry?.value?.value;
|
|
1781
|
+
return value == null || value === '' ? TAB_ALL_KEY : String(value);
|
|
1782
|
+
};
|
|
1783
|
+
const TablePageTabs = ({
|
|
1784
|
+
filterValue,
|
|
1785
|
+
onFilterChange,
|
|
1786
|
+
tab,
|
|
1787
|
+
tabProps,
|
|
1788
|
+
className,
|
|
1789
|
+
isMobileRender
|
|
1790
|
+
}) => {
|
|
1791
|
+
const {
|
|
1792
|
+
formatMessage
|
|
1793
|
+
} = reactIntl.useIntl();
|
|
1794
|
+
const showTab = !!(tab?.name && Array.isArray(tab.list) && tab.list.length > 0);
|
|
1795
|
+
const tabItems = react.useMemo(() => {
|
|
1796
|
+
if (!showTab) {
|
|
1797
|
+
return [];
|
|
1798
|
+
}
|
|
1799
|
+
return [{
|
|
1800
|
+
key: TAB_ALL_KEY,
|
|
1801
|
+
label: formatMessage({
|
|
1802
|
+
id: 'All'
|
|
1803
|
+
})
|
|
1804
|
+
}, ...tab.list.map(item => ({
|
|
1805
|
+
key: String(item.value),
|
|
1806
|
+
label: item.label
|
|
1807
|
+
}))];
|
|
1808
|
+
}, [showTab, tab?.list, formatMessage]);
|
|
1809
|
+
if (!showTab) {
|
|
1810
|
+
return null;
|
|
1811
|
+
}
|
|
1812
|
+
const handleTabChange = key => {
|
|
1813
|
+
const next = (Array.isArray(filterValue) ? filterValue : []).filter(item => item?.name !== tab.name);
|
|
1814
|
+
if (key !== TAB_ALL_KEY) {
|
|
1815
|
+
const option = tab.list.find(item => String(item.value) === key);
|
|
1816
|
+
if (option) {
|
|
1817
|
+
next.push({
|
|
1818
|
+
name: tab.name,
|
|
1819
|
+
label: tab.label,
|
|
1820
|
+
value: {
|
|
1821
|
+
value: option.value,
|
|
1822
|
+
label: option.label
|
|
1823
|
+
}
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
onFilterChange(next);
|
|
1828
|
+
};
|
|
1829
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1830
|
+
className: classnames__default["default"](style['table-page-tabs'], className, {
|
|
1831
|
+
[style['is-mobile-render']]: isMobileRender
|
|
1832
|
+
}),
|
|
1833
|
+
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, {
|
|
1834
|
+
size: "small",
|
|
1835
|
+
...tabProps,
|
|
1836
|
+
activeKey: getTabActiveKey(filterValue, tab.name),
|
|
1837
|
+
onChange: handleTabChange,
|
|
1838
|
+
items: tabItems
|
|
1839
|
+
})
|
|
1840
|
+
});
|
|
1841
|
+
};
|
|
1737
1842
|
const TableToolbar = ({
|
|
1738
1843
|
filterValue,
|
|
1739
1844
|
onFilterChange,
|
|
1740
1845
|
filter,
|
|
1741
1846
|
search,
|
|
1847
|
+
tab,
|
|
1848
|
+
tabProps,
|
|
1849
|
+
renderTab = true,
|
|
1742
1850
|
batchActions,
|
|
1743
1851
|
rowSelection,
|
|
1744
1852
|
selectedRows,
|
|
1745
|
-
batchContext
|
|
1853
|
+
batchContext,
|
|
1854
|
+
isMobileRender
|
|
1746
1855
|
}) => {
|
|
1747
1856
|
const {
|
|
1748
1857
|
formatMessage
|
|
1749
1858
|
} = reactIntl.useIntl();
|
|
1859
|
+
const isMobile = responsiveUtils.useIsMobile();
|
|
1750
1860
|
const selectedRowKeys = rowSelection?.selectedRowKeys || [];
|
|
1751
1861
|
const hasSelection = selectedRowKeys.length > 0;
|
|
1752
1862
|
const batchMenuItems = react.useMemo(() => {
|
|
@@ -1784,7 +1894,20 @@ const TableToolbar = ({
|
|
|
1784
1894
|
const showBatch = batchMenuItems.length > 0;
|
|
1785
1895
|
const showFilter = filter?.list?.length > 0;
|
|
1786
1896
|
const showSearch = search && search.name;
|
|
1787
|
-
|
|
1897
|
+
const hasTab = !!(tab?.name && Array.isArray(tab.list) && tab.list.length > 0);
|
|
1898
|
+
const showTab = hasTab && renderTab;
|
|
1899
|
+
const batchButtonLabel = hasSelection ? isMobile ? formatMessage({
|
|
1900
|
+
id: 'BatchOperationsMobileSelected'
|
|
1901
|
+
}, {
|
|
1902
|
+
count: selectedRowKeys.length
|
|
1903
|
+
}) : formatMessage({
|
|
1904
|
+
id: 'BatchOperationsWithCount'
|
|
1905
|
+
}, {
|
|
1906
|
+
count: selectedRowKeys.length
|
|
1907
|
+
}) : formatMessage({
|
|
1908
|
+
id: 'BatchOperations'
|
|
1909
|
+
});
|
|
1910
|
+
if (!showBatch && !showFilter && !showSearch && !showTab) {
|
|
1788
1911
|
return null;
|
|
1789
1912
|
}
|
|
1790
1913
|
const {
|
|
@@ -1800,20 +1923,51 @@ const TableToolbar = ({
|
|
|
1800
1923
|
...searchRest
|
|
1801
1924
|
} = search || {};
|
|
1802
1925
|
const hasValueDisplay = filterValue?.length > 0;
|
|
1803
|
-
|
|
1926
|
+
const showMobileSearchRow = isMobile && showSearch;
|
|
1927
|
+
const showMainToolbar = showBatch || showFilter || !isMobile && showSearch;
|
|
1928
|
+
const searchInputNode = showSearch ? /*#__PURE__*/jsxRuntime.jsx(reactFilter.SearchInput, {
|
|
1929
|
+
allowClear: true,
|
|
1930
|
+
bordered: false,
|
|
1931
|
+
variant: "filled",
|
|
1932
|
+
size: isMobile ? 'middle' : 'small',
|
|
1933
|
+
className: classnames__default["default"](style['table-toolbar-search-input'], searchClassName),
|
|
1934
|
+
style: isMobile ? {
|
|
1935
|
+
...searchStyle,
|
|
1936
|
+
width: '100%',
|
|
1937
|
+
maxWidth: '100%'
|
|
1938
|
+
} : searchStyle,
|
|
1939
|
+
...searchRest
|
|
1940
|
+
}) : null;
|
|
1941
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactFilter.FilterOuter, {
|
|
1804
1942
|
value: filterValue,
|
|
1805
1943
|
onChange: onFilterChange,
|
|
1806
|
-
|
|
1944
|
+
className: style['table-toolbar-filter-outer'],
|
|
1945
|
+
children: () => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1807
1946
|
className: classnames__default["default"](style['table-toolbar-section'], 'table-page-toolbar-section', {
|
|
1808
1947
|
[style['has-value-display']]: hasValueDisplay,
|
|
1948
|
+
[style['has-mobile-search']]: showMobileSearchRow,
|
|
1949
|
+
[style['has-mobile-search-only']]: showMobileSearchRow && !showMainToolbar && !showTab,
|
|
1950
|
+
[style['has-tabs']]: showTab,
|
|
1951
|
+
[style['is-mobile-render']]: isMobileRender,
|
|
1809
1952
|
'table-page-toolbar-section--has-value': hasValueDisplay
|
|
1810
1953
|
}),
|
|
1811
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
1812
|
-
className: classnames__default["default"](style['table-toolbar'], 'table-
|
|
1954
|
+
children: [showMobileSearchRow ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1955
|
+
className: classnames__default["default"](style['table-toolbar-search-row'], style['table-toolbar-search']),
|
|
1956
|
+
children: searchInputNode
|
|
1957
|
+
}) : null, showTab ? /*#__PURE__*/jsxRuntime.jsx(TablePageTabs, {
|
|
1958
|
+
filterValue: filterValue,
|
|
1959
|
+
onFilterChange: onFilterChange,
|
|
1960
|
+
tab: tab,
|
|
1961
|
+
tabProps: tabProps,
|
|
1962
|
+
isMobileRender: isMobileRender
|
|
1963
|
+
}) : null, showMainToolbar ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1964
|
+
className: classnames__default["default"](style['table-toolbar'], 'table-page-toolbar', {
|
|
1965
|
+
[style['is-mobile']]: isMobile
|
|
1966
|
+
}),
|
|
1813
1967
|
children: [showBatch ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1814
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
1968
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1815
1969
|
className: style['table-toolbar-batch'],
|
|
1816
|
-
children: /*#__PURE__*/jsxRuntime.jsx(antd.Dropdown, {
|
|
1970
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(antd.Dropdown, {
|
|
1817
1971
|
disabled: !hasSelection,
|
|
1818
1972
|
menu: {
|
|
1819
1973
|
items: batchMenuItems
|
|
@@ -1823,16 +1977,25 @@ const TableToolbar = ({
|
|
|
1823
1977
|
size: "small",
|
|
1824
1978
|
disabled: !hasSelection,
|
|
1825
1979
|
className: style['table-toolbar-batch-btn'],
|
|
1826
|
-
children: [
|
|
1827
|
-
id: 'BatchOperationsWithCount'
|
|
1828
|
-
}, {
|
|
1829
|
-
count: selectedRowKeys.length
|
|
1830
|
-
}) : formatMessage({
|
|
1831
|
-
id: 'BatchOperations'
|
|
1832
|
-
}), /*#__PURE__*/jsxRuntime.jsx(icons.DownOutlined, {})]
|
|
1980
|
+
children: [batchButtonLabel, /*#__PURE__*/jsxRuntime.jsx(icons.DownOutlined, {})]
|
|
1833
1981
|
})
|
|
1834
|
-
})
|
|
1835
|
-
|
|
1982
|
+
}), hasSelection ? /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
|
|
1983
|
+
danger: true,
|
|
1984
|
+
size: "small",
|
|
1985
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(icons.DeleteOutlined, {}),
|
|
1986
|
+
title: formatMessage({
|
|
1987
|
+
id: 'Cancel'
|
|
1988
|
+
}),
|
|
1989
|
+
"aria-label": formatMessage({
|
|
1990
|
+
id: 'Cancel'
|
|
1991
|
+
}),
|
|
1992
|
+
className: style['table-toolbar-batch-clear-btn'],
|
|
1993
|
+
onClick: () => {
|
|
1994
|
+
rowSelection?.onChange?.([]);
|
|
1995
|
+
rowSelection?.onIsSelectAllChange?.(false);
|
|
1996
|
+
}
|
|
1997
|
+
}) : null]
|
|
1998
|
+
}), showFilter && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1836
1999
|
className: style['table-toolbar-divider'],
|
|
1837
2000
|
"aria-hidden": true
|
|
1838
2001
|
})]
|
|
@@ -1847,36 +2010,31 @@ const TableToolbar = ({
|
|
|
1847
2010
|
...filterRest
|
|
1848
2011
|
})
|
|
1849
2012
|
})
|
|
1850
|
-
}) : null, showSearch ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2013
|
+
}) : null, !showMobileSearchRow && showSearch ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1851
2014
|
children: [showFilter && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1852
2015
|
className: style['table-toolbar-divider'],
|
|
1853
2016
|
"aria-hidden": true
|
|
1854
2017
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1855
2018
|
className: style['table-toolbar-search'],
|
|
1856
|
-
children:
|
|
1857
|
-
allowClear: true,
|
|
1858
|
-
bordered: false,
|
|
1859
|
-
variant: "filled",
|
|
1860
|
-
size: "small",
|
|
1861
|
-
className: classnames__default["default"](style['table-toolbar-search-input'], searchClassName),
|
|
1862
|
-
style: searchStyle,
|
|
1863
|
-
...searchRest
|
|
1864
|
-
})
|
|
2019
|
+
children: searchInputNode
|
|
1865
2020
|
})]
|
|
1866
2021
|
}) : null]
|
|
1867
|
-
}), hasValueDisplay ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1868
|
-
className: style['table-toolbar-value-display'],
|
|
2022
|
+
}) : null, hasValueDisplay ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2023
|
+
className: classnames__default["default"](style['table-toolbar-value-display'], {
|
|
2024
|
+
[style['is-mobile-render']]: isMobileRender
|
|
2025
|
+
}),
|
|
1869
2026
|
children: /*#__PURE__*/jsxRuntime.jsx(reactFilter.FilterValueDisplay, {
|
|
1870
2027
|
value: filterValue,
|
|
1871
2028
|
onChange: onFilterChange,
|
|
1872
|
-
extraExpand: extraExpand
|
|
2029
|
+
extraExpand: extraExpand,
|
|
2030
|
+
flush: isMobileRender
|
|
1873
2031
|
})
|
|
1874
2032
|
}) : null]
|
|
1875
2033
|
})
|
|
1876
2034
|
});
|
|
1877
2035
|
};
|
|
1878
2036
|
|
|
1879
|
-
const _excluded = ["data", "refresh", "reload", "requestParams", "fetchProps", "isComplete", "loadMore", "send", "dataFormat", "className", "columns", "getColumns", "pagination", "columnRenderProps", "summary", "sticky", "scrollTopInset", "stickyOffset", "renderType", "horizontalScroller", "getScrollContainer", "filter", "search", "batchActions", "selectedRows", "rowSelection"],
|
|
2037
|
+
const _excluded = ["data", "refresh", "reload", "requestParams", "fetchProps", "isComplete", "loadMore", "send", "dataFormat", "className", "columns", "getColumns", "pagination", "columnRenderProps", "summary", "sticky", "scrollTopInset", "stickyOffset", "renderType", "horizontalScroller", "getScrollContainer", "filter", "search", "tab", "tabProps", "batchActions", "selectedRows", "rowSelection", "renderMobile"],
|
|
1880
2038
|
_excluded2 = ["pagination", "horizontalScroller", "getScrollContainer"];
|
|
1881
2039
|
const readPageSize = key => {
|
|
1882
2040
|
try {
|
|
@@ -1901,11 +2059,14 @@ const TABLE_COMPONENTS = {
|
|
|
1901
2059
|
Table,
|
|
1902
2060
|
TableView: tableView.TableView
|
|
1903
2061
|
};
|
|
1904
|
-
const collectFilterFieldNames = (filter, search) => {
|
|
2062
|
+
const collectFilterFieldNames = (filter, search, tab) => {
|
|
1905
2063
|
const names = new Set();
|
|
1906
2064
|
if (search != null && search.name) {
|
|
1907
2065
|
names.add(search.name);
|
|
1908
2066
|
}
|
|
2067
|
+
if (tab != null && tab.name) {
|
|
2068
|
+
names.add(tab.name);
|
|
2069
|
+
}
|
|
1909
2070
|
if (Array.isArray(filter == null ? void 0 : filter.list)) {
|
|
1910
2071
|
filter.list.forEach(row => {
|
|
1911
2072
|
if (!Array.isArray(row)) {
|
|
@@ -1965,12 +2126,17 @@ const TablePageInnerContent = withLocale(_ref => {
|
|
|
1965
2126
|
getScrollContainer = _ref.getScrollContainer,
|
|
1966
2127
|
filter = _ref.filter,
|
|
1967
2128
|
search = _ref.search,
|
|
2129
|
+
tab = _ref.tab,
|
|
2130
|
+
tabProps = _ref.tabProps,
|
|
1968
2131
|
batchActions = _ref.batchActions,
|
|
1969
2132
|
selectedRows = _ref.selectedRows,
|
|
1970
2133
|
rowSelection = _ref.rowSelection,
|
|
2134
|
+
renderMobile = _ref.renderMobile,
|
|
1971
2135
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1972
2136
|
const _useIntl = reactIntl.useIntl(),
|
|
1973
2137
|
formatMessage = _useIntl.formatMessage;
|
|
2138
|
+
const isMobile = responsiveUtils.useIsMobile();
|
|
2139
|
+
const isMobileRenderActive = tableView.isRenderMobileActive(renderMobile, isMobile);
|
|
1974
2140
|
const tableContentRef = react.useRef(null);
|
|
1975
2141
|
const pendingScrollRef = react.useRef(false);
|
|
1976
2142
|
const handlerDataFormat = useRefCallback__default["default"](dataFormat);
|
|
@@ -1983,7 +2149,7 @@ const TablePageInnerContent = withLocale(_ref => {
|
|
|
1983
2149
|
const getFilterParams = useRefCallback__default["default"](value => {
|
|
1984
2150
|
return mapFilterValue(value || []);
|
|
1985
2151
|
});
|
|
1986
|
-
const filterFieldNames = react.useMemo(() => collectFilterFieldNames(filter, search), [filter, search]);
|
|
2152
|
+
const filterFieldNames = react.useMemo(() => collectFilterFieldNames(filter, search, tab), [filter, search, tab]);
|
|
1987
2153
|
const buildRequestParamsWithFilter = useRefCallback__default["default"](function (value, extra) {
|
|
1988
2154
|
if (extra === void 0) {
|
|
1989
2155
|
extra = {};
|
|
@@ -2005,7 +2171,12 @@ const TablePageInnerContent = withLocale(_ref => {
|
|
|
2005
2171
|
dataFormat,
|
|
2006
2172
|
pagination
|
|
2007
2173
|
}), [data, fetchProps, requestParams, refresh, reload, loadMore, send, dataFormat, pagination]);
|
|
2008
|
-
const
|
|
2174
|
+
const hasTab = !!(tab != null && tab.name && Array.isArray(tab.list) && tab.list.length > 0);
|
|
2175
|
+
const hasInnerToolbar = !!(filter != null && (_filter$list = filter.list) != null && _filter$list.length || search && search.name || batchActions && batchActions.length);
|
|
2176
|
+
const showOuterTab = hasTab && !isMobile;
|
|
2177
|
+
const showInnerTab = hasTab && isMobile;
|
|
2178
|
+
const wrapWithToolbar = hasInnerToolbar || showInnerTab;
|
|
2179
|
+
const hasToolbar = wrapWithToolbar || showOuterTab;
|
|
2009
2180
|
const resolvedScrollTopInset = resolveScrollTopInset(scrollTopInset, stickyOffset);
|
|
2010
2181
|
const scrollTopInsetStyle = react.useMemo(() => {
|
|
2011
2182
|
const cssValue = normalizeScrollTopInsetCSSValue(resolvedScrollTopInset);
|
|
@@ -2046,33 +2217,41 @@ const TablePageInnerContent = withLocale(_ref => {
|
|
|
2046
2217
|
pagination.onChange(page, size);
|
|
2047
2218
|
return;
|
|
2048
2219
|
}
|
|
2049
|
-
|
|
2220
|
+
const nextSize = Number(size);
|
|
2221
|
+
const currentPage = get__default["default"](requestParams, [pagination.paramsType, pagination.currentName], 1);
|
|
2222
|
+
const currentSize = Number(get__default["default"](requestParams, [pagination.paramsType, pagination.pageSizeName], pagination.pageSize)) || pagination.pageSize || 50;
|
|
2223
|
+
if (nextSize !== currentSize) {
|
|
2224
|
+
pagination.onShowSizeChange && pagination.onShowSizeChange(page, nextSize);
|
|
2225
|
+
}
|
|
2226
|
+
if (page !== currentPage || nextSize !== currentSize) {
|
|
2050
2227
|
(pagination.requestType === 'refresh' ? refresh : reload)({
|
|
2051
2228
|
[pagination.paramsType]: buildRequestParamsWithFilter(filterValue, {
|
|
2052
2229
|
[pagination.currentName]: page,
|
|
2053
|
-
[pagination.pageSizeName]:
|
|
2230
|
+
[pagination.pageSizeName]: nextSize
|
|
2054
2231
|
})
|
|
2055
2232
|
});
|
|
2056
|
-
} else {
|
|
2057
|
-
pagination.onShowSizeChange && pagination.onShowSizeChange(page, Number(size));
|
|
2058
2233
|
}
|
|
2059
2234
|
});
|
|
2060
2235
|
const paginationConfig = react.useMemo(() => {
|
|
2236
|
+
var _mobilePagination$sho;
|
|
2061
2237
|
if (!pagination.open) {
|
|
2062
2238
|
return null;
|
|
2063
2239
|
}
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2240
|
+
const defaultShowTotal = total => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2241
|
+
children: [formatMessage({
|
|
2242
|
+
id: 'TotalText'
|
|
2243
|
+
}), "\xA0", /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2244
|
+
className: style$1['total_text'],
|
|
2245
|
+
children: total
|
|
2246
|
+
}), "\xA0", formatMessage({
|
|
2247
|
+
id: 'ItemText'
|
|
2248
|
+
})]
|
|
2249
|
+
});
|
|
2250
|
+
const baseConfig = _extends({
|
|
2251
|
+
total: formatData.total
|
|
2252
|
+
}, pagination.showTotal !== false ? {
|
|
2253
|
+
showTotal: typeof pagination.showTotal === 'function' ? pagination.showTotal : defaultShowTotal
|
|
2254
|
+
} : {}, {
|
|
2076
2255
|
current: get__default["default"](requestParams, [pagination.paramsType, pagination.currentName], 1),
|
|
2077
2256
|
pageSize: Number(get__default["default"](requestParams, [pagination.paramsType, pagination.pageSizeName], pagination.pageSize)) || pagination.pageSize || 50,
|
|
2078
2257
|
onChange: handlePaginationChange,
|
|
@@ -2081,8 +2260,20 @@ const TablePageInnerContent = withLocale(_ref => {
|
|
|
2081
2260
|
showSizeChanger: pagination.showSizeChanger,
|
|
2082
2261
|
showQuickJumper: pagination.showQuickJumper,
|
|
2083
2262
|
pageSizeOptions: pagination.pageSizeOptions
|
|
2084
|
-
};
|
|
2085
|
-
|
|
2263
|
+
});
|
|
2264
|
+
if (!isMobileRenderActive) {
|
|
2265
|
+
return baseConfig;
|
|
2266
|
+
}
|
|
2267
|
+
const mobilePagination = pagination.mobile || {};
|
|
2268
|
+
return _extends({}, baseConfig, {
|
|
2269
|
+
onShowSizeChange: handlePaginationChange,
|
|
2270
|
+
size: mobilePagination.size,
|
|
2271
|
+
showSizeChanger: mobilePagination.showSizeChanger !== false && pagination.showSizeChanger !== false,
|
|
2272
|
+
showQuickJumper: mobilePagination.showQuickJumper === true,
|
|
2273
|
+
showLessItems: (_mobilePagination$sho = mobilePagination.showLessItems) != null ? _mobilePagination$sho : true,
|
|
2274
|
+
pageSizeOptions: pagination.pageSizeOptions || ['10', '20', '50', '100']
|
|
2275
|
+
});
|
|
2276
|
+
}, [pagination, formatData.total, requestParams, formatMessage, handlePaginationChange, isMobileRenderActive]);
|
|
2086
2277
|
const batchContext = react.useMemo(() => ({
|
|
2087
2278
|
data,
|
|
2088
2279
|
fetchProps,
|
|
@@ -2100,6 +2291,7 @@ const TablePageInnerContent = withLocale(_ref => {
|
|
|
2100
2291
|
data
|
|
2101
2292
|
});
|
|
2102
2293
|
const tableProps = _extends({}, props, {
|
|
2294
|
+
renderMobile,
|
|
2103
2295
|
rowSelection,
|
|
2104
2296
|
dataSource: formatData.list,
|
|
2105
2297
|
pagination: false,
|
|
@@ -2107,7 +2299,8 @@ const TablePageInnerContent = withLocale(_ref => {
|
|
|
2107
2299
|
scrollTopInset: resolvedScrollTopInset,
|
|
2108
2300
|
getStickyContainer: getScrollContainer,
|
|
2109
2301
|
className: classnames__default["default"](className, {
|
|
2110
|
-
[style$1['table-in-toolbar']]:
|
|
2302
|
+
[style$1['table-in-toolbar']]: wrapWithToolbar,
|
|
2303
|
+
[style$1['is-mobile-render']]: isMobileRenderActive
|
|
2111
2304
|
}),
|
|
2112
2305
|
columns: resolvedColumns,
|
|
2113
2306
|
context: tableContext,
|
|
@@ -2123,28 +2316,43 @@ const TablePageInnerContent = withLocale(_ref => {
|
|
|
2123
2316
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2124
2317
|
className: style$1['table-page'],
|
|
2125
2318
|
style: scrollTopInsetStyle,
|
|
2126
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
2319
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(HorizontalScroller, {
|
|
2127
2320
|
ref: tableContentRef,
|
|
2128
2321
|
enabled: horizontalScroller && renderType === 'Table',
|
|
2129
2322
|
getPortalContainer: getScrollContainer,
|
|
2130
2323
|
className: classnames__default["default"](style$1['table-content'], 'loading-container', {
|
|
2131
2324
|
'is-loading': !isComplete && !data
|
|
2132
2325
|
}),
|
|
2133
|
-
children:
|
|
2134
|
-
|
|
2326
|
+
children: [showOuterTab ? /*#__PURE__*/jsxRuntime.jsx(TablePageTabs, {
|
|
2327
|
+
filterValue: filterValue,
|
|
2328
|
+
onFilterChange: handleFilterChange,
|
|
2329
|
+
tab: tab,
|
|
2330
|
+
tabProps: tabProps,
|
|
2331
|
+
className: style$1['table-page-tabs-outer'],
|
|
2332
|
+
isMobileRender: isMobileRenderActive
|
|
2333
|
+
}) : null, wrapWithToolbar ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2334
|
+
className: classnames__default["default"](style$1['table-with-toolbar'], {
|
|
2335
|
+
[style$1['is-mobile-render']]: isMobileRenderActive
|
|
2336
|
+
}),
|
|
2135
2337
|
children: [/*#__PURE__*/jsxRuntime.jsx(TableToolbar, {
|
|
2136
2338
|
filterValue: filterValue,
|
|
2137
2339
|
onFilterChange: handleFilterChange,
|
|
2138
2340
|
filter: filter,
|
|
2139
2341
|
search: search,
|
|
2342
|
+
tab: tab,
|
|
2343
|
+
tabProps: tabProps,
|
|
2344
|
+
renderTab: showInnerTab,
|
|
2140
2345
|
batchActions: batchActions,
|
|
2141
2346
|
rowSelection: rowSelection,
|
|
2142
2347
|
selectedRows: selectedRows,
|
|
2143
|
-
batchContext: batchContext
|
|
2348
|
+
batchContext: batchContext,
|
|
2349
|
+
isMobileRender: isMobileRenderActive
|
|
2144
2350
|
}), tableElement]
|
|
2145
|
-
}) : tableElement
|
|
2351
|
+
}) : tableElement]
|
|
2146
2352
|
}), paginationConfig ? /*#__PURE__*/jsxRuntime.jsx(antd.Pagination, _extends({
|
|
2147
|
-
className: style$1['pagination']
|
|
2353
|
+
className: classnames__default["default"](style$1['pagination'], {
|
|
2354
|
+
[style$1['is-mobile-render']]: isMobileRenderActive
|
|
2355
|
+
})
|
|
2148
2356
|
}, paginationConfig)) : null]
|
|
2149
2357
|
});
|
|
2150
2358
|
});
|
|
@@ -2291,6 +2499,10 @@ Object.defineProperty(exports, 'isOptionsColumn', {
|
|
|
2291
2499
|
enumerable: true,
|
|
2292
2500
|
get: function () { return tableView.isOptionsColumn; }
|
|
2293
2501
|
});
|
|
2502
|
+
Object.defineProperty(exports, 'isRenderMobileActive', {
|
|
2503
|
+
enumerable: true,
|
|
2504
|
+
get: function () { return tableView.isRenderMobileActive; }
|
|
2505
|
+
});
|
|
2294
2506
|
Object.defineProperty(exports, 'parseColumnWidth', {
|
|
2295
2507
|
enumerable: true,
|
|
2296
2508
|
get: function () { return tableView.parseColumnWidth; }
|
|
@@ -2331,6 +2543,10 @@ Object.defineProperty(exports, 'resolveColumns', {
|
|
|
2331
2543
|
enumerable: true,
|
|
2332
2544
|
get: function () { return tableView.resolveColumns; }
|
|
2333
2545
|
});
|
|
2546
|
+
Object.defineProperty(exports, 'resolveRenderMobile', {
|
|
2547
|
+
enumerable: true,
|
|
2548
|
+
get: function () { return tableView.resolveRenderMobile; }
|
|
2549
|
+
});
|
|
2334
2550
|
Object.defineProperty(exports, 'resolveRenderType', {
|
|
2335
2551
|
enumerable: true,
|
|
2336
2552
|
get: function () { return tableView.resolveRenderType; }
|