es-grid-template 1.9.0 → 1.9.11
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/es/ali-table/Grid.d.ts +1 -1
- package/es/ali-table/Grid.js +9 -5
- package/es/ali-table/InternalTable.d.ts +1 -1
- package/es/ali-table/InternalTable.js +28 -8
- package/es/ali-table/base-table/styles.js +1 -1
- package/es/ali-table/common-views.js +1 -1
- package/es/ali-table/pipeline/features/ColumnsChoose.js +0 -3
- package/es/ali-table/pipeline/features/columnCustom.d.ts +11 -2
- package/es/ali-table/pipeline/features/columnCustom.js +27 -8
- package/es/ali-table/pipeline/features/treeMode.d.ts +1 -0
- package/es/ali-table/pipeline/features/treeMode.js +8 -1
- package/es/ali-table/pipeline/features/treeSelect.js +1 -1
- package/es/ali-table/utils/convertColumnsChoose.d.ts +1 -1
- package/es/ali-table/utils/convertColumnsChoose.js +2 -0
- package/es/grid-component/TempTable.d.ts +1 -1
- package/es/grid-component/type.d.ts +4 -0
- package/es/group-component/hook/utils.d.ts +1 -0
- package/es/table-component/TableContainer.js +5 -2
- package/es/table-component/TableContainerEdit.js +55 -10
- package/es/table-component/body/TableBodyCellEdit.js +1 -1
- package/es/table-component/index.d.ts +0 -2
- package/es/table-component/index.js +4 -0
- package/es/table-component/table/Grid.js +3 -1
- package/es/table-virtuoso/table/TableContainer.js +2 -1
- package/lib/ali-table/Grid.d.ts +1 -1
- package/lib/ali-table/Grid.js +10 -5
- package/lib/ali-table/InternalTable.d.ts +1 -1
- package/lib/ali-table/InternalTable.js +27 -7
- package/lib/ali-table/base-table/styles.js +1 -1
- package/lib/ali-table/common-views.js +1 -1
- package/lib/ali-table/pipeline/features/ColumnsChoose.js +0 -3
- package/lib/ali-table/pipeline/features/columnCustom.d.ts +11 -2
- package/lib/ali-table/pipeline/features/columnCustom.js +27 -8
- package/lib/ali-table/pipeline/features/treeMode.d.ts +1 -0
- package/lib/ali-table/pipeline/features/treeMode.js +8 -1
- package/lib/ali-table/utils/convertColumnsChoose.d.ts +1 -1
- package/lib/ali-table/utils/convertColumnsChoose.js +2 -0
- package/lib/grid-component/TempTable.d.ts +1 -1
- package/lib/grid-component/type.d.ts +4 -0
- package/lib/group-component/hook/utils.d.ts +1 -0
- package/lib/table-component/TableContainer.js +5 -2
- package/lib/table-component/TableContainerEdit.js +55 -10
- package/lib/table-component/body/TableBodyCellEdit.js +1 -1
- package/lib/table-component/index.d.ts +0 -2
- package/lib/table-component/index.js +2 -0
- package/lib/table-component/table/Grid.js +3 -1
- package/lib/table-virtuoso/table/TableContainer.js +2 -1
- package/package.json +2 -2
package/lib/ali-table/Grid.js
CHANGED
|
@@ -22,6 +22,8 @@ var _useContext = require("./useContext");
|
|
|
22
22
|
var _ColumnsChoose = require("./pipeline/features/ColumnsChoose");
|
|
23
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
24
24
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
|
+
// import type { TableProps } from "../table-component"
|
|
26
|
+
|
|
25
27
|
// const Grid = (props: GridProps) => {
|
|
26
28
|
const Grid = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
27
29
|
const {
|
|
@@ -33,6 +35,7 @@ const Grid = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
33
35
|
title,
|
|
34
36
|
showToolbar,
|
|
35
37
|
toolbarItems,
|
|
38
|
+
toolbarMode,
|
|
36
39
|
pagination,
|
|
37
40
|
infiniteScroll,
|
|
38
41
|
dataSource,
|
|
@@ -59,7 +62,8 @@ const Grid = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
59
62
|
setVisibleKeys,
|
|
60
63
|
footerDataSource,
|
|
61
64
|
loading,
|
|
62
|
-
useVirtual
|
|
65
|
+
useVirtual,
|
|
66
|
+
useOuterBorder = true
|
|
63
67
|
|
|
64
68
|
// onRowFooterStyles,
|
|
65
69
|
// onRowHeaderStyles
|
|
@@ -152,12 +156,13 @@ const Grid = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
152
156
|
setVisibleKeys(nextVisibleKeys);
|
|
153
157
|
};
|
|
154
158
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
155
|
-
className: (0, _classnames.default)(`${prefix}-grid
|
|
159
|
+
className: (0, _classnames.default)(`${prefix}-grid`, {
|
|
160
|
+
[tableClassNames]: !!tableClassNames,
|
|
156
161
|
[`${prefix}-grid-light`]: !theme || theme.theme === 'light',
|
|
157
162
|
[`${prefix}-grid-dark`]: theme?.theme === 'dark'
|
|
158
163
|
}),
|
|
159
164
|
style: {
|
|
160
|
-
|
|
165
|
+
maxHeight: height ?? 700,
|
|
161
166
|
minHeight,
|
|
162
167
|
display: 'flex',
|
|
163
168
|
flexDirection: 'column'
|
|
@@ -177,7 +182,7 @@ const Grid = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
177
182
|
}
|
|
178
183
|
}, /*#__PURE__*/_react.default.createElement(_rcMasterUi.Toolbar, {
|
|
179
184
|
items: (toolbarItems ?? []).filter(it => it.position !== 'Bottom'),
|
|
180
|
-
mode:
|
|
185
|
+
mode: toolbarMode
|
|
181
186
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
182
187
|
style: {
|
|
183
188
|
display: 'flex',
|
|
@@ -237,7 +242,7 @@ const Grid = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
|
237
242
|
|
|
238
243
|
// estimatedRowHeight={50}
|
|
239
244
|
,
|
|
240
|
-
useOuterBorder:
|
|
245
|
+
useOuterBorder: useOuterBorder
|
|
241
246
|
// style={{ height: 700, overflow: 'auto' }}
|
|
242
247
|
,
|
|
243
248
|
style: minHeight ? {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import './base-table/styles.scss';
|
|
3
|
-
import type { TableProps } from "../
|
|
3
|
+
import type { TableProps } from "../grid-component/type";
|
|
4
4
|
declare const InternalTable: <RecordType extends object>(props: TableProps<RecordType>) => React.JSX.Element;
|
|
5
5
|
export default InternalTable;
|
|
@@ -42,7 +42,9 @@ const InternalTable = props => {
|
|
|
42
42
|
expandable,
|
|
43
43
|
sortMultiple,
|
|
44
44
|
onFilter,
|
|
45
|
+
defaultFilter,
|
|
45
46
|
onSorter,
|
|
47
|
+
defaultSorter,
|
|
46
48
|
footerDataSource,
|
|
47
49
|
summary,
|
|
48
50
|
useVirtual,
|
|
@@ -97,11 +99,12 @@ const InternalTable = props => {
|
|
|
97
99
|
return (0, _utils.isTreeArray)(convertData);
|
|
98
100
|
}, [convertData]);
|
|
99
101
|
const mergedData = _react.default.useMemo(() => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
const shouldSkip = onFilter && onSorter;
|
|
103
|
+
if (shouldSkip) {
|
|
104
|
+
return convertData;
|
|
102
105
|
}
|
|
103
|
-
return convertData;
|
|
104
|
-
}, [convertData, filterState, ignoreAccents, sortState]);
|
|
106
|
+
return (0, _utils.filterDataByColumns)(convertData, onFilter ? undefined : filterState ?? defaultFilter, onSorter ? undefined : sortState ?? defaultSorter, [], ignoreAccents);
|
|
107
|
+
}, [convertData, filterState, ignoreAccents, sortState, onFilter, onSorter, defaultFilter, defaultSorter]);
|
|
105
108
|
const footerData = _react.default.useMemo(() => {
|
|
106
109
|
if (!summary) {
|
|
107
110
|
return undefined;
|
|
@@ -119,6 +122,12 @@ const InternalTable = props => {
|
|
|
119
122
|
return undefined;
|
|
120
123
|
}, [expandable?.defaultExpandAllRows, convertData, isDataTree]);
|
|
121
124
|
const [isFullScreen, setIsFullScreen] = _react.default.useState(false);
|
|
125
|
+
const defaultFilterConvert = _react.default.useMemo(() => {
|
|
126
|
+
if (defaultFilter) {
|
|
127
|
+
return (0, _utils.revertConvertFilters)(defaultFilter);
|
|
128
|
+
}
|
|
129
|
+
return undefined;
|
|
130
|
+
}, [defaultFilter]);
|
|
122
131
|
const pipeline = (0, _pipeline.useTablePipeline)({
|
|
123
132
|
components: fusion
|
|
124
133
|
}).input({
|
|
@@ -167,7 +176,8 @@ const InternalTable = props => {
|
|
|
167
176
|
clickArea: 'icon',
|
|
168
177
|
stopClickEventPropagation: true,
|
|
169
178
|
expandIconColumnIndex: expandable?.expandIconColumnIndex,
|
|
170
|
-
defaultOpenKeys: expandAllKeys ?? expandable?.defaultExpandedRowKeys
|
|
179
|
+
defaultOpenKeys: expandAllKeys ?? expandable?.defaultExpandedRowKeys,
|
|
180
|
+
isTreeArray: !!isDataTree
|
|
171
181
|
})).use(_pipeline.features.columnCustom({
|
|
172
182
|
id,
|
|
173
183
|
t,
|
|
@@ -186,6 +196,8 @@ const InternalTable = props => {
|
|
|
186
196
|
currentPage: pagination ? pagination?.currentPage : undefined,
|
|
187
197
|
pageSize: pagination ? pagination?.pageSize : undefined,
|
|
188
198
|
isDataTree,
|
|
199
|
+
defaultFilter: defaultFilterConvert,
|
|
200
|
+
defaultSorter,
|
|
189
201
|
onFilter(val) {
|
|
190
202
|
// const rs =
|
|
191
203
|
|
|
@@ -241,7 +253,11 @@ const InternalTable = props => {
|
|
|
241
253
|
originColumns: columns,
|
|
242
254
|
groupColumns: groupColumns,
|
|
243
255
|
setVisibleKeys: setVisibleKeys,
|
|
244
|
-
footerDataSource: footerData
|
|
256
|
+
footerDataSource: footerData,
|
|
257
|
+
onFilter: onFilter,
|
|
258
|
+
onSorter: onSorter,
|
|
259
|
+
defaultFilter: defaultFilter,
|
|
260
|
+
defaultSorter: defaultSorter
|
|
245
261
|
})), /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
246
262
|
open: isFullScreen,
|
|
247
263
|
footer: null,
|
|
@@ -287,7 +303,11 @@ const InternalTable = props => {
|
|
|
287
303
|
originColumns: columns,
|
|
288
304
|
groupColumns: groupColumns,
|
|
289
305
|
setVisibleKeys: setVisibleKeys,
|
|
290
|
-
footerDataSource: footerData
|
|
306
|
+
footerDataSource: footerData,
|
|
307
|
+
onFilter: onFilter,
|
|
308
|
+
onSorter: onSorter,
|
|
309
|
+
defaultFilter: defaultFilter,
|
|
310
|
+
defaultSorter: defaultSorter
|
|
291
311
|
})))))));
|
|
292
312
|
};
|
|
293
313
|
var _default = exports.default = InternalTable;
|
|
@@ -56,4 +56,4 @@ const outerBorderStyleMixin = (0, _styledComponents.css)(["border-top:var(--cell
|
|
|
56
56
|
const StyledArtTableWrapper = exports.StyledArtTableWrapper = _styledComponents.default.div.withConfig({
|
|
57
57
|
displayName: "StyledArtTableWrapper",
|
|
58
58
|
componentId: "es-grid-template__sc-ipj1ht-0"
|
|
59
|
-
})(["--row-height:38px;--color:#333;--bgcolor:white;--hover-bgcolor:var(--hover-color,#f5f5f5);--highlight-bgcolor:#eee;--header-row-height:36px;--header-color:#000000de;--header-bgcolor:#ffffff;--header-hover-bgcolor:#ddd;--header-highlight-bgcolor:#e4e8ed;--cell-padding:7px 8px;--font-size:13px;--line-height:1.28571;--lock-shadow:rgba(152,152,152,0.5) 0 0 6px 2px;--border-color:#dfe3e8;--cell-border:1px solid var(--border-color);--cell-border-horizontal:var(--cell-border);--cell-border-vertical:var(--cell-border);--header-cell-border:1px solid var(--border-color);--header-cell-border-horizontal:var(--header-cell-border);--header-cell-border-vertical:var(--header-cell-border);--footer-bgColor:#fafafa;box-sizing:border-box;*{box-sizing:border-box;}cursor:default;color:var(--color);font-size:var(--font-size);line-height:var(--line-height);position:relative;overflow-anchor:none;&.use-outer-border{", ";}.no-scrollbar{scrollbar-width:none;::-webkit-scrollbar{display:none;}}.", "{overflow-x:auto;overflow-y:hidden;background:var(--header-bgcolor);.ui-rc-table-column-title{flex:1;min-width:0;text-align:start;}.", "{font-weight:500;.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}.", "{width:100%;white-space:normal;word-break:break-word;}.", "{text-align:center;}.", "{text-align:right;}}}.", "{.", "{&.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}&.", "{width:100%;white-space:normal;word-break:break-word;}&.", "{text-align:center;}&.", "{text-align:right;}}}.", ",.", "{overflow-x:auto;overflow-y:hidden;background:var(--bgcolor);}&.sticky-header .", "{position:sticky;top:0;z-index:", ";}&.sticky-footer .", "{position:sticky;bottom:0;z-index:", ";}.", "{tr{td{&.lock-left,&.lock-right{border-bottom-width:0;box-shadow:0 -1px 0 0 var(--border-color),0 1px 0 0 var(--border-color),-1px 0 0 0 var(--border-color);}}}}table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;display:table;margin:0;padding:0;}tr:not(.no-hover):hover > td{background:var(--hover-bgcolor);}tr:not(.no-highlight).highlight > td{background:var(--highlight-bgcolor);}th{font-weight:normal;text-align:left;padding:var(--cell-padding);height:var(--header-row-height);color:var(--header-color);background:var(--header-bgcolor);border:none;border-right:var(--header-cell-border-vertical);border-bottom:var(--header-cell-border-horizontal);}tr.first th{border-top:var(--header-cell-border-horizontal);}th.first{border-left:var(--header-cell-border-vertical);}td{padding:var(--cell-padding);background:var(--bgcolor);height:var(--row-height);border:none;border-right:var(--cell-border-vertical);border-bottom:var(--cell-border-horizontal);}td.first{border-left:var(--cell-border-vertical);}tr.first td{border-top:var(--cell-border-horizontal);}&.has-header tbody tr.first td{border-top:none;}&.has-footer tbody tr.last td{border-bottom:none;}.lock-left,.lock-right{z-index:", ";}.resize-handle{width:6px;height:100%;position:absolute;top:0;right:0;cursor:col-resize;background-color:transparent;border-right:2px solid transparent}.", "{position:absolute;top:0;bottom:0;z-index:", ";pointer-events:none;overflow:hidden;.", "{height:100%;}.", "{margin-right:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-right:var(--cell-border-vertical);}}.", "{margin-left:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-left:var(--cell-border-vertical);}}}.", "{pointer-events:none;color:#99a3b3;font-size:12px;text-align:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);.empty-image{width:50px;height:50px;}.empty-tips{margin-top:16px;line-height:1.5;}}.", "{overflow:auto;position:sticky;bottom:0;z-index:", ";margin-top:-17px;}.ui-rc-grid-loading-wrapper{}.ui-rc-grid-table{}.art-loading-content-wrapper{}.", "{height:1px;visibility:hidden;}.", "{position:relative;.", "{position:absolute;left:0;right:0;top:0;bottom:0;pointer-events:none;}.", "{position:sticky;z-index:", ";transform:translateY(-50%);}}"], outerBorderStyleMixin, Classes.tableHeader, Classes.tableHeaderCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableBody, Classes.tableCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableBody, Classes.tableFooter, Classes.tableHeader, Z.header, Classes.tableFooter, Z.footer, Classes.tableBody, Z.lock, Classes.lockShadowMask, Z.lockShadow, Classes.lockShadow, Classes.leftLockShadow, LOCK_SHADOW_PADDING, Classes.rightLockShadow, LOCK_SHADOW_PADDING, Classes.emptyWrapper, Classes.stickyScroll, Z.scrollItem, Classes.stickyScrollItem, Classes.loadingWrapper, Classes.loadingIndicatorWrapper, Classes.loadingIndicator, Z.loadingIndicator);
|
|
59
|
+
})(["--row-height:38px;--color:#333;--bgcolor:white;--hover-bgcolor:var(--hover-color,#f5f5f5);--highlight-bgcolor:#eee;--header-row-height:36px;--header-color:#000000de;--header-bgcolor:#ffffff;--header-hover-bgcolor:#ddd;--header-highlight-bgcolor:#e4e8ed;--cell-padding:7px 8px;--font-size:13px;--line-height:1.28571;--lock-shadow:rgba(152,152,152,0.5) 0 0 6px 2px;--border-color:#dfe3e8;--cell-border:1px solid var(--border-color);--cell-border-horizontal:var(--cell-border);--cell-border-vertical:var(--cell-border);--header-cell-border:1px solid var(--border-color);--header-cell-border-horizontal:var(--header-cell-border);--header-cell-border-vertical:var(--header-cell-border);--footer-bgColor:#fafafa;box-sizing:border-box;*{box-sizing:border-box;}cursor:default;color:var(--color);font-size:var(--font-size);line-height:var(--line-height);position:relative;overflow-anchor:none;&.use-outer-border{", ";}.no-scrollbar{scrollbar-width:none;::-webkit-scrollbar{display:none;}}.", "{overflow-x:auto;overflow-y:hidden;background:var(--header-bgcolor);.ui-rc-table-column-title{flex:1;min-width:0;text-align:start;}.", "{font-weight:500;.ui-rc-header-trigger{padding-left:6px;display:flex;align-items:center;.ui-rc-table-column-sorter-cancel{opacity:0;}}&:hover{.ui-rc-header-trigger{.ui-rc-table-column-sorter-cancel{opacity:1;}}}.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}.", "{width:100%;white-space:normal;word-break:break-word;}.", "{text-align:center;}.", "{text-align:right;}}}.", "{.", "{&.", "{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;.expansion-cell{.expansion-content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all;}}}&.", "{width:100%;white-space:normal;word-break:break-word;}&.", "{text-align:center;}&.", "{text-align:right;}}}.", ",.", "{overflow-x:auto;overflow-y:hidden;background:var(--bgcolor);}&.sticky-header .", "{position:sticky;top:0;z-index:", ";}&.sticky-footer .", "{position:sticky;bottom:0;z-index:", ";}.", "{tr{td{&.lock-left,&.lock-right{border-bottom-width:0;box-shadow:0 -1px 0 0 var(--border-color),0 1px 0 0 var(--border-color),-1px 0 0 0 var(--border-color);}}}}table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;display:table;margin:0;padding:0;}tr:not(.no-hover):hover > td{background:var(--hover-bgcolor);}tr:not(.no-highlight).highlight > td{background:var(--highlight-bgcolor);}th{font-weight:normal;text-align:left;padding:var(--cell-padding);height:var(--header-row-height);color:var(--header-color);background:var(--header-bgcolor);border:none;border-right:var(--header-cell-border-vertical);border-bottom:var(--header-cell-border-horizontal);}tr.first th{border-top:var(--header-cell-border-horizontal);}th.first{border-left:var(--header-cell-border-vertical);}td{padding:var(--cell-padding);background:var(--bgcolor);height:var(--row-height);border:none;border-right:var(--cell-border-vertical);border-bottom:var(--cell-border-horizontal);}td.first{border-left:var(--cell-border-vertical);}tr.first td{border-top:var(--cell-border-horizontal);}&.has-header tbody tr.first td{border-top:none;}&.has-footer tbody tr.last td{border-bottom:none;}.lock-left,.lock-right{z-index:", ";}.resize-handle{width:6px;height:100%;position:absolute;top:0;right:0;cursor:col-resize;background-color:transparent;border-right:2px solid transparent}.", "{position:absolute;top:0;bottom:0;z-index:", ";pointer-events:none;overflow:hidden;.", "{height:100%;}.", "{margin-right:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-right:var(--cell-border-vertical);}}.", "{margin-left:", "px;box-shadow:none;&.show-shadow{box-shadow:var(--lock-shadow);border-left:var(--cell-border-vertical);}}}.", "{pointer-events:none;color:#99a3b3;font-size:12px;text-align:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);.empty-image{width:50px;height:50px;}.empty-tips{margin-top:16px;line-height:1.5;}}.", "{overflow:auto;position:sticky;bottom:0;z-index:", ";margin-top:-17px;}.ui-rc-grid-loading-wrapper{}.ui-rc-grid-table{}.art-loading-content-wrapper{}.", "{height:1px;visibility:hidden;}.", "{position:relative;.", "{position:absolute;left:0;right:0;top:0;bottom:0;pointer-events:none;}.", "{position:sticky;z-index:", ";transform:translateY(-50%);}}"], outerBorderStyleMixin, Classes.tableHeader, Classes.tableHeaderCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableBody, Classes.tableCell, Classes.cellEllipsis, Classes.cellWrap, Classes.cellTextCenter, Classes.cellTextRight, Classes.tableBody, Classes.tableFooter, Classes.tableHeader, Z.header, Classes.tableFooter, Z.footer, Classes.tableBody, Z.lock, Classes.lockShadowMask, Z.lockShadow, Classes.lockShadow, Classes.leftLockShadow, LOCK_SHADOW_PADDING, Classes.rightLockShadow, LOCK_SHADOW_PADDING, Classes.emptyWrapper, Classes.stickyScroll, Z.scrollItem, Classes.stickyScrollItem, Classes.loadingWrapper, Classes.loadingIndicatorWrapper, Classes.loadingIndicator, Z.loadingIndicator);
|
|
@@ -11,7 +11,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
11
11
|
const InlineFlexCell = exports.InlineFlexCell = _styledComponents.default.div.withConfig({
|
|
12
12
|
displayName: "InlineFlexCell",
|
|
13
13
|
componentId: "es-grid-template__sc-1o0on5d-0"
|
|
14
|
-
})(["display:
|
|
14
|
+
})(["display:flex;align-items:center;"]);
|
|
15
15
|
const ExpansionCell = exports.ExpansionCell = (0, _styledComponents.default)(InlineFlexCell).withConfig({
|
|
16
16
|
displayName: "ExpansionCell",
|
|
17
17
|
componentId: "es-grid-template__sc-1o0on5d-1"
|
|
@@ -42,9 +42,6 @@ const ColumnsChoose = props => {
|
|
|
42
42
|
const defaultSelectedKeys = _react.default.useMemo(() => {
|
|
43
43
|
const colsVisiables = originColumns.filter(it => it.showInColumnChoose !== false && it.visible !== false);
|
|
44
44
|
const colsKeys = colsVisiables.map(it => it.field);
|
|
45
|
-
|
|
46
|
-
// const aa = Object.keys(columnHidden)
|
|
47
|
-
|
|
48
45
|
return colsKeys.filter(it => !columnsGroup?.includes(it));
|
|
49
46
|
}, [columnsGroup, originColumns]);
|
|
50
47
|
const [mergedSelectedKeys, setMergedSelectedKeys] = (0, _useMergedState.default)(defaultSelectedKeys && defaultSelectedKeys.length ? defaultSelectedKeys : undefined, {
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { TablePipeline } from '../pipeline';
|
|
2
2
|
import type { ColumnResizeMode } from '../../base-table/table';
|
|
3
|
-
import type { SortOrder } from '../../interfaces';
|
|
3
|
+
import type { ArtColumn, SortOrder } from '../../interfaces';
|
|
4
4
|
import type { FilterItem, IFormat, IWrapSettings, Sorter, SourceFilter } from '../../../grid-component/type';
|
|
5
|
+
type FilterState = {
|
|
6
|
+
field: any;
|
|
7
|
+
key: any;
|
|
8
|
+
column: ArtColumn;
|
|
9
|
+
filteredKeys: any[];
|
|
10
|
+
operator: string | undefined;
|
|
11
|
+
};
|
|
5
12
|
export interface ColumnFeatureOptions {
|
|
6
13
|
id: any;
|
|
7
14
|
columns: any[];
|
|
@@ -39,7 +46,8 @@ export interface ColumnFeatureOptions {
|
|
|
39
46
|
dataSourceFilter?: SourceFilter[];
|
|
40
47
|
ignoreAccents?: boolean;
|
|
41
48
|
onFilter?: (filterState: FilterItem[]) => void;
|
|
42
|
-
|
|
49
|
+
defaultFilter?: FilterState[];
|
|
50
|
+
defaultSorter?: Sorter[];
|
|
43
51
|
mode?: 'single' | 'multiple';
|
|
44
52
|
keepDataSource?: boolean;
|
|
45
53
|
orders?: SortOrder[];
|
|
@@ -49,3 +57,4 @@ export interface ColumnFeatureOptions {
|
|
|
49
57
|
pageSize?: number;
|
|
50
58
|
}
|
|
51
59
|
export declare function columnCustom(opts: ColumnFeatureOptions): (pipeline: TablePipeline) => TablePipeline;
|
|
60
|
+
export {};
|
|
@@ -48,7 +48,10 @@ function columnCustom(opts) {
|
|
|
48
48
|
wrapSettings,
|
|
49
49
|
// ignoreAccents,
|
|
50
50
|
dataSource,
|
|
51
|
-
isDataTree
|
|
51
|
+
isDataTree,
|
|
52
|
+
defaultSorter,
|
|
53
|
+
defaultFilter
|
|
54
|
+
|
|
52
55
|
// currentPage = 1,
|
|
53
56
|
// pageSize
|
|
54
57
|
} = opts;
|
|
@@ -59,7 +62,7 @@ function columnCustom(opts) {
|
|
|
59
62
|
} = opts;
|
|
60
63
|
return function columnResizeFeature(pipeline) {
|
|
61
64
|
const sizes = opts.sizes ?? pipeline.getStateAtKey(stateKeyResize) ?? opts.defaultSizes ?? [];
|
|
62
|
-
const filterState = pipeline.getStateAtKey(stateKeyFilter) ?? [];
|
|
65
|
+
const filterState = pipeline.getStateAtKey(stateKeyFilter) ?? defaultFilter ?? [];
|
|
63
66
|
const visible = pipeline.getStateAtKey(stateKeyVisible) ?? '';
|
|
64
67
|
const isOpenTooltip = pipeline.getStateAtKey(stateKeyTooltip) ?? false;
|
|
65
68
|
const pageSize = opts?.pageSize ?? pipeline.getStateAtKey(stateKey)?.pageSize ?? _hooks.pageSizeOptions[0];
|
|
@@ -74,7 +77,7 @@ function columnCustom(opts) {
|
|
|
74
77
|
// const fieldOriginal = fieldOriginalKey ? columns.find((it) => it.field === fieldOriginalKey) : undefined
|
|
75
78
|
|
|
76
79
|
// const sorterStates = pipeline.getStateAtKey(stateKeySorter) ?? []
|
|
77
|
-
const sorterStates = pipeline.getStateAtKey(stateKeySorter) ??
|
|
80
|
+
const sorterStates = pipeline.getStateAtKey(stateKeySorter) ?? defaultSorter ?? [];
|
|
78
81
|
const activeSorts = sorterStates.filter(s => s.order !== 'none');
|
|
79
82
|
const sorts = mode === 'multiple' ? activeSorts : activeSorts.slice(0, 1);
|
|
80
83
|
const leafColumns = (0, _utils.collectNodes)(pipeline.getColumns(), 'leaf-only');
|
|
@@ -126,9 +129,10 @@ function columnCustom(opts) {
|
|
|
126
129
|
const onVisibleChange = (newVisible, info, column) => {
|
|
127
130
|
if (info.source === 'trigger') {
|
|
128
131
|
if (newVisible) {
|
|
129
|
-
const
|
|
132
|
+
const defaultFilterOption = defaultFilter?.find(it => it.field === column.field);
|
|
133
|
+
const filterValue = filterColumnState.filteredKeys === null ? [] : filterColumnState.filteredKeys ?? defaultFilterOption?.filteredKeys ?? [];
|
|
130
134
|
const operator = filterColumnState.operator;
|
|
131
|
-
const operatorValue = operator ?? (0, _utils2.getDefaultOperator)(column);
|
|
135
|
+
const operatorValue = operator ?? defaultFilterOption?.operator ?? (0, _utils2.getDefaultOperator)(column);
|
|
132
136
|
pipeline.setStateAtKey(stateKeyColumnFilter, {
|
|
133
137
|
operator: operatorValue,
|
|
134
138
|
filteredKeys: filterValue,
|
|
@@ -200,8 +204,20 @@ function columnCustom(opts) {
|
|
|
200
204
|
// xóa column đang filter trong filterState
|
|
201
205
|
|
|
202
206
|
const newFilterState = filterState.filter(it => it.field !== filterColumnState.field);
|
|
203
|
-
|
|
204
|
-
|
|
207
|
+
const currentFilter = {
|
|
208
|
+
field: filterColumnState.field,
|
|
209
|
+
key: filterColumnState.field,
|
|
210
|
+
column: filterColumnState.column,
|
|
211
|
+
filteredKeys: null,
|
|
212
|
+
operator: filterColumnState.operator ?? undefined
|
|
213
|
+
};
|
|
214
|
+
const rs = (0, _hooks.updateArrayByKey)(filterState, currentFilter, 'field');
|
|
215
|
+
pipeline.setStateAtKey(stateKeyColumnFilter, {
|
|
216
|
+
...currentFilter
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// pipeline.setStateAtKey(stateKeyFilter, [...newFilterState])
|
|
220
|
+
pipeline.setStateAtKey(stateKeyFilter, rs);
|
|
205
221
|
if (onFilter) {
|
|
206
222
|
onFilter((0, _utils2.convertFilters)([...newFilterState]));
|
|
207
223
|
} else {
|
|
@@ -249,7 +265,10 @@ function columnCustom(opts) {
|
|
|
249
265
|
const {
|
|
250
266
|
order
|
|
251
267
|
} = isSorted && sortMap.get(col.field);
|
|
252
|
-
const
|
|
268
|
+
const find = filterState.find(it => it.field === col.field);
|
|
269
|
+
|
|
270
|
+
// const filtered = !!filterState.find((it) => it.field === col.field)
|
|
271
|
+
const filtered = !!find && find.filteredKeys !== null;
|
|
253
272
|
const getDropdownTrigger = () => {
|
|
254
273
|
let iconFilter;
|
|
255
274
|
if (typeof filterIcon === 'function') {
|
|
@@ -16,5 +16,6 @@ export interface TreeModeFeatureOptions {
|
|
|
16
16
|
clickArea?: 'cell' | 'content' | 'icon';
|
|
17
17
|
stopClickEventPropagation?: boolean;
|
|
18
18
|
treeMetaKey?: string | symbol;
|
|
19
|
+
isTreeArray?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export declare function treeMode(opts?: TreeModeFeatureOptions): (pipeline: TablePipeline) => TablePipeline;
|
|
@@ -18,6 +18,7 @@ function treeMode(opts = {}) {
|
|
|
18
18
|
const stateKey = 'treeMode';
|
|
19
19
|
const ctx = pipeline.ctx;
|
|
20
20
|
const expandIconColumnIndex = opts.expandIconColumnIndex ?? 0;
|
|
21
|
+
const isTreeArray = opts.isTreeArray;
|
|
21
22
|
const primaryKey = pipeline.ensurePrimaryKey('treeMode');
|
|
22
23
|
if (typeof primaryKey !== 'string') {
|
|
23
24
|
throw new Error('treeMode Only strings are supported primaryKey');
|
|
@@ -102,6 +103,9 @@ function treeMode(opts = {}) {
|
|
|
102
103
|
if (record[treeMetaKey] == null) {
|
|
103
104
|
return content;
|
|
104
105
|
}
|
|
106
|
+
if (!isTreeArray) {
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, content);
|
|
108
|
+
}
|
|
105
109
|
const {
|
|
106
110
|
rowKey,
|
|
107
111
|
depth,
|
|
@@ -113,6 +117,7 @@ function treeMode(opts = {}) {
|
|
|
113
117
|
return /*#__PURE__*/_react.default.createElement(_commonViews.InlineFlexCell, {
|
|
114
118
|
className: "expansion-cell leaf"
|
|
115
119
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
120
|
+
className: "expansion-content",
|
|
116
121
|
style: {
|
|
117
122
|
marginLeft: indent + iconWidth + iconGap
|
|
118
123
|
}
|
|
@@ -139,7 +144,9 @@ function treeMode(opts = {}) {
|
|
|
139
144
|
marginRight: iconGap
|
|
140
145
|
},
|
|
141
146
|
onClick: clickArea === 'icon' ? onClick : undefined
|
|
142
|
-
}),
|
|
147
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
148
|
+
className: "expansion-content"
|
|
149
|
+
}, content));
|
|
143
150
|
};
|
|
144
151
|
const getCellProps = (value, record, rowIndex) => {
|
|
145
152
|
const prevProps = _internals.internals.safeGetCellProps(firstCol, record, rowIndex);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TreeDataNode } from "antd";
|
|
2
|
-
import
|
|
2
|
+
import { ColumnTable } from "../../grid-component";
|
|
3
3
|
export declare function convertColumnsToTreeData(columns: ColumnTable[], groupColumns?: string[], t?: any): TreeDataNode[];
|
|
4
4
|
export declare function filterColumnsByField(columns: ColumnTable[], fieldList: string[]): ColumnTable[];
|
|
5
5
|
export declare function filterVisibleColumns(columns: ColumnTable[]): ColumnTable[];
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.convertColumnsToTreeData = convertColumnsToTreeData;
|
|
7
7
|
exports.filterColumnsByField = filterColumnsByField;
|
|
8
8
|
exports.filterVisibleColumns = filterVisibleColumns;
|
|
9
|
+
// import type { ColumnTable } from "../../table-component"
|
|
10
|
+
|
|
9
11
|
function convertColumnsToTreeData(columns, groupColumns, t) {
|
|
10
12
|
if (!columns) {
|
|
11
13
|
return [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TableProps } from "../
|
|
2
|
+
import type { TableProps } from "../grid-component";
|
|
3
3
|
declare const TempTable: <RecordType extends object>(props: TableProps<RecordType>) => React.JSX.Element;
|
|
4
4
|
export default TempTable;
|
|
@@ -219,6 +219,8 @@ export type ColumnTable<RecordType = AnyObject> = {
|
|
|
219
219
|
/** Custom render method */
|
|
220
220
|
/** Custom method to get cell props */
|
|
221
221
|
getCellProps?: (value: any, row: any, rowIndex: number) => CellProps;
|
|
222
|
+
/** Props for the header cell */
|
|
223
|
+
headerCellProps?: CellProps;
|
|
222
224
|
/** Custom method to get cell SpanRect */
|
|
223
225
|
getSpanRect?: (value: any, row: any, rowIndex: number) => SpanRect;
|
|
224
226
|
};
|
|
@@ -230,6 +232,7 @@ export type TableProps<RecordType = AnyObject> = {
|
|
|
230
232
|
backgroundColor?: string;
|
|
231
233
|
color?: string;
|
|
232
234
|
};
|
|
235
|
+
useOuterBorder?: boolean;
|
|
233
236
|
className?: string;
|
|
234
237
|
title?: ReactNode | ((data: RecordType) => ReactNode);
|
|
235
238
|
fullScreenTitle?: ReactNode | (() => ReactNode);
|
|
@@ -256,6 +259,7 @@ export type TableProps<RecordType = AnyObject> = {
|
|
|
256
259
|
/** Toolbar */
|
|
257
260
|
showToolbar?: boolean;
|
|
258
261
|
toolbarItems?: ToolbarItem[];
|
|
262
|
+
toolbarMode?: 'scroll';
|
|
259
263
|
showColumnChoose?: boolean;
|
|
260
264
|
onChooseColumns?: (props: IOnChooseColumns) => void;
|
|
261
265
|
fullScreen?: boolean;
|
|
@@ -214,6 +214,7 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
|
|
|
214
214
|
sumGroup?: boolean;
|
|
215
215
|
getValue?: (row: any, rowIndex: number) => any;
|
|
216
216
|
getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
|
|
217
|
+
headerCellProps?: import("./../../grid-component/type").CellProps;
|
|
217
218
|
getSpanRect?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").SpanRect;
|
|
218
219
|
}[];
|
|
219
220
|
export declare function sortColumnsByField<T extends ColumnTable>(columns: T[], priorityFields: string[]): T[];
|
|
@@ -46,6 +46,7 @@ const TableContainer = props => {
|
|
|
46
46
|
minHeight,
|
|
47
47
|
showToolbar,
|
|
48
48
|
toolbarItems,
|
|
49
|
+
toolbarMode,
|
|
49
50
|
actionTemplate,
|
|
50
51
|
pagination,
|
|
51
52
|
fullScreen,
|
|
@@ -228,8 +229,10 @@ const TableContainer = props => {
|
|
|
228
229
|
overflow: 'hidden'
|
|
229
230
|
}
|
|
230
231
|
}, /*#__PURE__*/_react.default.createElement(_rcMasterUi.Toolbar, {
|
|
231
|
-
items: (toolbarItems ?? []).filter(it => it.position !== 'Bottom')
|
|
232
|
-
mode
|
|
232
|
+
items: (toolbarItems ?? []).filter(it => it.position !== 'Bottom')
|
|
233
|
+
// mode={'scroll'}
|
|
234
|
+
,
|
|
235
|
+
mode: toolbarMode
|
|
233
236
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
234
237
|
style: {
|
|
235
238
|
display: 'flex',
|
|
@@ -97,7 +97,9 @@ const TableContainerEdit = props => {
|
|
|
97
97
|
onCellChange,
|
|
98
98
|
onDataChange,
|
|
99
99
|
defaultValue,
|
|
100
|
+
showToolbar,
|
|
100
101
|
toolbarItems,
|
|
102
|
+
toolbarMode,
|
|
101
103
|
mergedFilterKeys,
|
|
102
104
|
setMergedFilterKeys,
|
|
103
105
|
expanded,
|
|
@@ -105,7 +107,6 @@ const TableContainerEdit = props => {
|
|
|
105
107
|
onBlur,
|
|
106
108
|
fullScreen,
|
|
107
109
|
pagination,
|
|
108
|
-
showToolbar,
|
|
109
110
|
actionTemplate,
|
|
110
111
|
showColumnChoose,
|
|
111
112
|
height,
|
|
@@ -248,6 +249,8 @@ const TableContainerEdit = props => {
|
|
|
248
249
|
const [isPasting, setIsPasting] = _react.default.useState(false);
|
|
249
250
|
// const [isFullScreen] = React.useState(false);
|
|
250
251
|
const [tableHeight, settableHeight] = _react.default.useState(0);
|
|
252
|
+
const [topToolbarHeight, setTopToolbarHeight] = _react.default.useState(0);
|
|
253
|
+
const [bottomToolbarHeight, setBottomToolbarHeight] = _react.default.useState(0);
|
|
251
254
|
|
|
252
255
|
// const [isAddNewRow, setIsAddNewRow] = React.useState(false)
|
|
253
256
|
|
|
@@ -648,14 +651,48 @@ const TableContainerEdit = props => {
|
|
|
648
651
|
}
|
|
649
652
|
}, [columnSizingInfo]);
|
|
650
653
|
_react.default.useEffect(() => {
|
|
651
|
-
// const totalHeight = minHeight ?? height
|
|
652
654
|
const totalHeight = (0, _utils.getTableHeight)(height, minHeight);
|
|
653
655
|
if (totalHeight) {
|
|
654
|
-
const topHeight = topToolbarRef.current ? topToolbarRef.current.offsetHeight : 0
|
|
655
|
-
const bottomHeight = bottomToolbarRef.current ? bottomToolbarRef.current.offsetHeight : 0
|
|
656
|
-
|
|
656
|
+
// const topHeight = topToolbarRef.current ? topToolbarRef.current.offsetHeight : 0
|
|
657
|
+
// const bottomHeight = bottomToolbarRef.current ? bottomToolbarRef.current.offsetHeight : 0
|
|
658
|
+
|
|
659
|
+
// settableHeight(totalHeight - topHeight - bottomHeight)
|
|
660
|
+
settableHeight(totalHeight - topToolbarHeight - bottomToolbarHeight);
|
|
657
661
|
}
|
|
658
|
-
}, [
|
|
662
|
+
}, [height, minHeight, topToolbarHeight, bottomToolbarHeight]);
|
|
663
|
+
// }, [height, minHeight])
|
|
664
|
+
|
|
665
|
+
_react.default.useEffect(() => {
|
|
666
|
+
if (!topToolbarRef.current) return;
|
|
667
|
+
const observer = new ResizeObserver(entries => {
|
|
668
|
+
const entry = entries[0];
|
|
669
|
+
// const { top, bottom } = entry.contentRect;
|
|
670
|
+
const {
|
|
671
|
+
clientHeight
|
|
672
|
+
} = entry.target;
|
|
673
|
+
setTopToolbarHeight(clientHeight);
|
|
674
|
+
});
|
|
675
|
+
observer.observe(topToolbarRef.current);
|
|
676
|
+
return () => {
|
|
677
|
+
observer.disconnect();
|
|
678
|
+
};
|
|
679
|
+
}, []);
|
|
680
|
+
_react.default.useEffect(() => {
|
|
681
|
+
if (!bottomToolbarRef.current) return;
|
|
682
|
+
const observer = new ResizeObserver(entries => {
|
|
683
|
+
const entry = entries[0];
|
|
684
|
+
// const { top, bottom } = entry.contentRect;
|
|
685
|
+
const {
|
|
686
|
+
clientHeight
|
|
687
|
+
} = entry.target;
|
|
688
|
+
// setBottomToolbarHeight(top + bottom)
|
|
689
|
+
setBottomToolbarHeight(clientHeight);
|
|
690
|
+
});
|
|
691
|
+
observer.observe(bottomToolbarRef.current);
|
|
692
|
+
return () => {
|
|
693
|
+
observer.disconnect();
|
|
694
|
+
};
|
|
695
|
+
}, []);
|
|
659
696
|
const {
|
|
660
697
|
control,
|
|
661
698
|
handleSubmit,
|
|
@@ -1926,7 +1963,10 @@ const TableContainerEdit = props => {
|
|
|
1926
1963
|
id: id
|
|
1927
1964
|
}, (showToolbar !== false || fullScreen !== false || showColumnChoose || title) && /*#__PURE__*/_react.default.createElement("div", {
|
|
1928
1965
|
ref: topToolbarRef,
|
|
1929
|
-
className: (0, _classnames.default)(`${prefix}-grid-top-toolbar`, {})
|
|
1966
|
+
className: (0, _classnames.default)(`${prefix}-grid-top-toolbar`, {}),
|
|
1967
|
+
style: {
|
|
1968
|
+
transition: 'max-height 0.3s ease'
|
|
1969
|
+
}
|
|
1930
1970
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1931
1971
|
style: {
|
|
1932
1972
|
display: 'flex',
|
|
@@ -1947,7 +1987,7 @@ const TableContainerEdit = props => {
|
|
|
1947
1987
|
width: '100%'
|
|
1948
1988
|
},
|
|
1949
1989
|
items: toolbarItemsTop ?? [],
|
|
1950
|
-
mode:
|
|
1990
|
+
mode: toolbarMode,
|
|
1951
1991
|
onClick: ({}) => {
|
|
1952
1992
|
setEditingKey('');
|
|
1953
1993
|
}
|
|
@@ -2088,7 +2128,10 @@ const TableContainerEdit = props => {
|
|
|
2088
2128
|
fixedLeftColumns: fixedLeftColumns,
|
|
2089
2129
|
fixedRightColumns: fixedRightColumns
|
|
2090
2130
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
2091
|
-
ref: bottomToolbarRef
|
|
2131
|
+
ref: bottomToolbarRef,
|
|
2132
|
+
style: {
|
|
2133
|
+
transition: 'max-height 0.3s ease'
|
|
2134
|
+
}
|
|
2092
2135
|
}, toolbarItemsBottom && toolbarItemsBottom.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
2093
2136
|
className: (0, _classnames.default)('ui-rc-toolbar-bottom', {
|
|
2094
2137
|
'ui-rc-toolbar-bottom_border-bottom': !pagination || infiniteScroll
|
|
@@ -2098,7 +2141,9 @@ const TableContainerEdit = props => {
|
|
|
2098
2141
|
width: '100%'
|
|
2099
2142
|
},
|
|
2100
2143
|
items: toolbarItemsBottom ?? [],
|
|
2101
|
-
mode:
|
|
2144
|
+
mode: toolbarMode
|
|
2145
|
+
// mode={'scroll'}
|
|
2146
|
+
,
|
|
2102
2147
|
onClick: ({}) => {
|
|
2103
2148
|
setEditingKey('');
|
|
2104
2149
|
}
|
|
@@ -1103,7 +1103,7 @@ const TableBodyCellEdit = props => {
|
|
|
1103
1103
|
};
|
|
1104
1104
|
const cellValue = cell.getValue();
|
|
1105
1105
|
const rowIndex = cell.row.index;
|
|
1106
|
-
const fomatedValue = (0, _useColumns.renderValueCell)(columnMeta, cellValue, record, rowIndex, colIndex, format,
|
|
1106
|
+
const fomatedValue = (0, _useColumns.renderValueCell)(columnMeta, cellValue, record, rowIndex, colIndex, format, true);
|
|
1107
1107
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1108
1108
|
key: cell.id,
|
|
1109
1109
|
ref: el => {
|
|
@@ -6,4 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _InternalTable = _interopRequireDefault(require("./InternalTable"));
|
|
9
|
+
// import type { ColumnsTable, TableProps, ColumnTable, ContextMenuItem} from './../grid-component/type'
|
|
10
|
+
// export type {ColumnsTable, TableProps, ColumnTable, ContextMenuItem}
|
|
9
11
|
var _default = exports.default = _InternalTable.default;
|
|
@@ -298,7 +298,9 @@ const Grid = props => {
|
|
|
298
298
|
style: {
|
|
299
299
|
minHeight: minHeight ?? undefined,
|
|
300
300
|
maxHeight: height ?? undefined,
|
|
301
|
-
backgroundColor: theme?.backgroundColor ?? undefined
|
|
301
|
+
backgroundColor: theme?.backgroundColor ?? undefined,
|
|
302
|
+
transition: 'max-height 0.3s ease',
|
|
303
|
+
overflow: 'hidden'
|
|
302
304
|
}
|
|
303
305
|
}, /*#__PURE__*/_react.default.createElement(_core.DndContext, {
|
|
304
306
|
collisionDetection: _core.closestCenter,
|
|
@@ -46,6 +46,7 @@ const TableContainer = props => {
|
|
|
46
46
|
setFilterChange,
|
|
47
47
|
height,
|
|
48
48
|
minHeight,
|
|
49
|
+
toolbarMode,
|
|
49
50
|
showToolbar,
|
|
50
51
|
toolbarItems,
|
|
51
52
|
actionTemplate,
|
|
@@ -189,7 +190,7 @@ const TableContainer = props => {
|
|
|
189
190
|
}
|
|
190
191
|
}, /*#__PURE__*/_react.default.createElement(_rcMasterUi.Toolbar, {
|
|
191
192
|
items: (toolbarItems ?? []).filter(it => it.position !== 'Bottom'),
|
|
192
|
-
mode:
|
|
193
|
+
mode: toolbarMode
|
|
193
194
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
194
195
|
style: {
|
|
195
196
|
display: 'flex',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-grid-template",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.11",
|
|
4
4
|
"description": "es-grid-template",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"rc-checkbox": "^3.5.0",
|
|
67
67
|
"rc-dropdown": "^4.2.1",
|
|
68
68
|
"rc-field-form": "^2.6.0",
|
|
69
|
-
"rc-master-ui": "1.1.
|
|
69
|
+
"rc-master-ui": "1.1.53",
|
|
70
70
|
"rc-select": "^14.16.3",
|
|
71
71
|
"rc-tooltip": "^6.3.0",
|
|
72
72
|
"rc-tree": "^5.10.1",
|