es-grid-template 1.9.33 → 1.9.37
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/InternalTable.js +18 -3
- package/es/ali-table/base-table/html-table.js +1 -1
- package/es/ali-table/interfaces.d.ts +1 -0
- package/es/ali-table/utils/convertColumnsChoose.d.ts +2 -2
- package/lib/ali-table/InternalTable.js +17 -2
- package/lib/ali-table/base-table/html-table.js +1 -1
- package/lib/ali-table/interfaces.d.ts +1 -0
- package/lib/ali-table/utils/convertColumnsChoose.d.ts +2 -2
- package/package.json +5 -4
|
@@ -5,7 +5,7 @@ import { useLocale } from "rc-master-ui/es/locale";
|
|
|
5
5
|
import { faker } from "@faker-js/faker";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import "./base-table/styles.scss";
|
|
8
|
-
import { addRowIdArray, filterDataByColumns,
|
|
8
|
+
import { addRowIdArray, filterDataByColumns, flatColumns2,
|
|
9
9
|
// getInvisibleColumns,
|
|
10
10
|
getVisibleFields, groupArrayByColumns, isTreeArray, revertConvertFilters, sortByType, sumFields } from "../table-component/hook/utils";
|
|
11
11
|
import { CustomProvider, ConfigProvider } from 'rc-master-ui';
|
|
@@ -106,7 +106,8 @@ const InternalTable = props => {
|
|
|
106
106
|
if (footerDataSource) {
|
|
107
107
|
return footerDataSource;
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const flatColumns = flatColumns2(columns);
|
|
110
|
+
const a = sumFields(flatColumns, dataSource, childrenKey);
|
|
110
111
|
return [a];
|
|
111
112
|
}, [columns, dataSource, footerDataSource, summary]);
|
|
112
113
|
const expandAllKeys = React.useMemo(() => {
|
|
@@ -228,7 +229,21 @@ const InternalTable = props => {
|
|
|
228
229
|
// }
|
|
229
230
|
|
|
230
231
|
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
231
|
-
locale: language
|
|
232
|
+
locale: language,
|
|
233
|
+
theme: {
|
|
234
|
+
token: {
|
|
235
|
+
// colorPrimary: '#eb4619',
|
|
236
|
+
// colorLink: '#eb4619',
|
|
237
|
+
},
|
|
238
|
+
components: {
|
|
239
|
+
Dropdown: {
|
|
240
|
+
zIndexPopup: 1158
|
|
241
|
+
},
|
|
242
|
+
Popover: {
|
|
243
|
+
zIndexPopup: 1158
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
232
247
|
}, /*#__PURE__*/React.createElement(CustomProvider, {
|
|
233
248
|
locale: languages
|
|
234
249
|
}, /*#__PURE__*/React.createElement(TableContext.Provider, {
|
|
@@ -196,7 +196,7 @@ export function HtmlTable({
|
|
|
196
196
|
// },
|
|
197
197
|
};
|
|
198
198
|
if (tbodyHtmlTag === 'tfoot') {
|
|
199
|
-
if (!nonActionColumn.includes(column.field)) {
|
|
199
|
+
if (!nonActionColumn.includes(column.field) && column.isSummary !== false) {
|
|
200
200
|
return /*#__PURE__*/React.createElement("td", _extends({
|
|
201
201
|
key: colIndex
|
|
202
202
|
}, tdProps));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TreeDataNode } from "antd";
|
|
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[];
|
|
@@ -113,7 +113,8 @@ const InternalTable = props => {
|
|
|
113
113
|
if (footerDataSource) {
|
|
114
114
|
return footerDataSource;
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
const flatColumns = (0, _utils.flatColumns2)(columns);
|
|
117
|
+
const a = (0, _utils.sumFields)(flatColumns, dataSource, childrenKey);
|
|
117
118
|
return [a];
|
|
118
119
|
}, [columns, dataSource, footerDataSource, summary]);
|
|
119
120
|
const expandAllKeys = _react.default.useMemo(() => {
|
|
@@ -235,7 +236,21 @@ const InternalTable = props => {
|
|
|
235
236
|
// }
|
|
236
237
|
|
|
237
238
|
return /*#__PURE__*/_react.default.createElement(_rcMasterUi.ConfigProvider, {
|
|
238
|
-
locale: language
|
|
239
|
+
locale: language,
|
|
240
|
+
theme: {
|
|
241
|
+
token: {
|
|
242
|
+
// colorPrimary: '#eb4619',
|
|
243
|
+
// colorLink: '#eb4619',
|
|
244
|
+
},
|
|
245
|
+
components: {
|
|
246
|
+
Dropdown: {
|
|
247
|
+
zIndexPopup: 1158
|
|
248
|
+
},
|
|
249
|
+
Popover: {
|
|
250
|
+
zIndexPopup: 1158
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
239
254
|
}, /*#__PURE__*/_react.default.createElement(_rcMasterUi.CustomProvider, {
|
|
240
255
|
locale: languages
|
|
241
256
|
}, /*#__PURE__*/_react.default.createElement(_useContext.TableContext.Provider, {
|
|
@@ -203,7 +203,7 @@ function HtmlTable({
|
|
|
203
203
|
// },
|
|
204
204
|
};
|
|
205
205
|
if (tbodyHtmlTag === 'tfoot') {
|
|
206
|
-
if (!_hooks.nonActionColumn.includes(column.field)) {
|
|
206
|
+
if (!_hooks.nonActionColumn.includes(column.field) && column.isSummary !== false) {
|
|
207
207
|
return /*#__PURE__*/_react.default.createElement("td", (0, _extends2.default)({
|
|
208
208
|
key: colIndex
|
|
209
209
|
}, tdProps));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TreeDataNode } from "antd";
|
|
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[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-grid-template",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.37",
|
|
4
4
|
"description": "es-grid-template",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
"rc-checkbox": "3.5.0",
|
|
68
68
|
"rc-dropdown": "4.2.1",
|
|
69
69
|
"rc-field-form": "2.6.0",
|
|
70
|
-
"rc-master-ui": "1.1.59",
|
|
71
70
|
"rc-select": "14.16.3",
|
|
72
71
|
"rc-tooltip": "6.3.0",
|
|
73
72
|
"rc-tree": "5.10.1",
|
|
@@ -109,14 +108,16 @@
|
|
|
109
108
|
"gh-pages": "3.1.0",
|
|
110
109
|
"less": "4.1.1",
|
|
111
110
|
"np": "7.1.0",
|
|
111
|
+
"rc-master-ui": "1.1.59",
|
|
112
112
|
"rc-test": "7.0.9",
|
|
113
113
|
"react": "18.2.0",
|
|
114
114
|
"react-dom": "18.2.0",
|
|
115
115
|
"typescript": "4.0.5"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
|
-
"
|
|
119
|
-
"react
|
|
118
|
+
"rc-master-ui": "1.1.59",
|
|
119
|
+
"react": ">=18",
|
|
120
|
+
"react-dom": ">=18"
|
|
120
121
|
},
|
|
121
122
|
"umi": {
|
|
122
123
|
"configFile": "config.ts"
|