@pisell/materials 2.2.27 → 2.2.28
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +14 -4
- package/es/components/table/index.js +8 -1
- package/es/components/table/index.less +6 -0
- package/es/components/table/serve.js +7 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -2
- package/lib/components/table/index.js +41 -23
- package/lib/components/table/index.less +6 -0
- package/lib/components/table/serve.js +5 -0
- package/package.json +3 -3
package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js
CHANGED
|
@@ -70,10 +70,13 @@ export var batchExport = function batchExport(exportParams, exportImport) {
|
|
|
70
70
|
// 所有记录
|
|
71
71
|
if (type === "all-records") {
|
|
72
72
|
_name = "".concat(getText("table-action-export-import-all-records")).concat(_name);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
// 表单则直接导出
|
|
74
|
+
if (otherParams !== null && otherParams !== void 0 && otherParams.form_id || otherParams !== null && otherParams !== void 0 && otherParams.code) {
|
|
75
|
+
var _lists = (exportParams === null || exportParams === void 0 ? void 0 : exportParams.originDataSource) || [];
|
|
76
|
+
params.ids = _lists.map(function (item) {
|
|
77
|
+
return (item === null || item === void 0 ? void 0 : item.id) || (item === null || item === void 0 ? void 0 : item.form_record_id);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
77
80
|
params.file_name = _name;
|
|
78
81
|
}
|
|
79
82
|
|
|
@@ -83,5 +86,12 @@ export var batchExport = function batchExport(exportParams, exportImport) {
|
|
|
83
86
|
params.ids = selectLists || [];
|
|
84
87
|
params.file_name = _name;
|
|
85
88
|
}
|
|
89
|
+
|
|
90
|
+
// 不是所有记录则删除对应的参数
|
|
91
|
+
if (type !== 'all-records') {
|
|
92
|
+
params === null || params === void 0 ? true : delete params.shipping_status;
|
|
93
|
+
params === null || params === void 0 ? true : delete params.payment_status;
|
|
94
|
+
params === null || params === void 0 ? true : delete params.status;
|
|
95
|
+
}
|
|
86
96
|
return _batchExport(params);
|
|
87
97
|
};
|
|
@@ -17,6 +17,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
17
17
|
import { useDebounce, useSize } from 'ahooks';
|
|
18
18
|
import { Form } from 'antd';
|
|
19
19
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
20
|
+
import classNames from 'classNames';
|
|
20
21
|
import { useSharedState } from "../../hooks";
|
|
21
22
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
22
23
|
import Actions from "./Actions";
|
|
@@ -79,6 +80,10 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
79
80
|
wait: 100
|
|
80
81
|
});
|
|
81
82
|
var utils = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils;
|
|
83
|
+
var isTerminal = useMemo(function () {
|
|
84
|
+
var _utils$isTerminal;
|
|
85
|
+
return utils === null || utils === void 0 ? void 0 : (_utils$isTerminal = utils.isTerminal) === null || _utils$isTerminal === void 0 ? void 0 : _utils$isTerminal.call(utils);
|
|
86
|
+
}, [utils]);
|
|
82
87
|
var tableId = useMemo(function () {
|
|
83
88
|
if (props.__designMode === 'design') {
|
|
84
89
|
return 'designMode-mock-table-id';
|
|
@@ -285,7 +290,9 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
285
290
|
},
|
|
286
291
|
className: "materials-grid-form-wrap"
|
|
287
292
|
}, /*#__PURE__*/React.createElement("div", {
|
|
288
|
-
className: 'materials-grid',
|
|
293
|
+
className: classNames('materials-grid', {
|
|
294
|
+
'materials-grid-terminal': isTerminal
|
|
295
|
+
}),
|
|
289
296
|
style: style,
|
|
290
297
|
ref: wrapRef
|
|
291
298
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
@@ -29,6 +29,13 @@ var formatApiParams = function formatApiParams(params, type) {
|
|
|
29
29
|
var _url = (params === null || params === void 0 ? void 0 : params.url) || (defaultUrl === null || defaultUrl === void 0 ? void 0 : defaultUrl[type]);
|
|
30
30
|
var _params = _objectSpread({}, params);
|
|
31
31
|
delete _params.url;
|
|
32
|
+
|
|
33
|
+
// 删除无用数据
|
|
34
|
+
if (type !== 'export') {
|
|
35
|
+
_params === null || _params === void 0 ? true : delete _params.shipping_status;
|
|
36
|
+
_params === null || _params === void 0 ? true : delete _params.payment_status;
|
|
37
|
+
_params === null || _params === void 0 ? true : delete _params.status;
|
|
38
|
+
}
|
|
32
39
|
return {
|
|
33
40
|
url: _url,
|
|
34
41
|
params: _objectSpread({}, _params)
|
package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js
CHANGED
|
@@ -54,8 +54,10 @@ var batchExport = (exportParams, exportImport) => {
|
|
|
54
54
|
}
|
|
55
55
|
if (type === "all-records") {
|
|
56
56
|
_name = `${(0, import_locales.getText)("table-action-export-import-all-records")}${_name}`;
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
if ((otherParams == null ? void 0 : otherParams.form_id) || (otherParams == null ? void 0 : otherParams.code)) {
|
|
58
|
+
const lists = (exportParams == null ? void 0 : exportParams.originDataSource) || [];
|
|
59
|
+
params.ids = lists.map((item) => (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id));
|
|
60
|
+
}
|
|
59
61
|
params.file_name = _name;
|
|
60
62
|
}
|
|
61
63
|
if (type === "selected-records") {
|
|
@@ -65,6 +67,11 @@ var batchExport = (exportParams, exportImport) => {
|
|
|
65
67
|
params.ids = selectLists || [];
|
|
66
68
|
params.file_name = _name;
|
|
67
69
|
}
|
|
70
|
+
if (type !== "all-records") {
|
|
71
|
+
params == null ? true : delete params.shipping_status;
|
|
72
|
+
params == null ? true : delete params.payment_status;
|
|
73
|
+
params == null ? true : delete params.status;
|
|
74
|
+
}
|
|
68
75
|
return _batchExport(params);
|
|
69
76
|
};
|
|
70
77
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(table_exports);
|
|
|
35
35
|
var import_ahooks = require("ahooks");
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_classNames = __toESM(require("classNames"));
|
|
38
39
|
var import_hooks = require("../../hooks");
|
|
39
40
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
40
41
|
var import_Actions = __toESM(require("./Actions"));
|
|
@@ -91,6 +92,10 @@ var GridView = (0, import_model.Provider)(
|
|
|
91
92
|
const { width } = (0, import_ahooks.useSize)(wrapRef) || {};
|
|
92
93
|
const debouncedWidth = (0, import_ahooks.useDebounce)(width, { wait: 100 });
|
|
93
94
|
const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
|
|
95
|
+
const isTerminal = (0, import_react.useMemo)(() => {
|
|
96
|
+
var _a2;
|
|
97
|
+
return (_a2 = utils == null ? void 0 : utils.isTerminal) == null ? void 0 : _a2.call(utils);
|
|
98
|
+
}, [utils]);
|
|
94
99
|
const tableId = (0, import_react.useMemo)(() => {
|
|
95
100
|
if (props.__designMode === "design") {
|
|
96
101
|
return "designMode-mock-table-id";
|
|
@@ -299,30 +304,43 @@ var GridView = (0, import_model.Provider)(
|
|
|
299
304
|
},
|
|
300
305
|
className: "materials-grid-form-wrap"
|
|
301
306
|
},
|
|
302
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
303
|
-
|
|
304
|
-
{
|
|
305
|
-
view,
|
|
306
|
-
buttons: actionButtons,
|
|
307
|
-
columnSetting,
|
|
308
|
-
dataSourceGroup,
|
|
309
|
-
filter,
|
|
310
|
-
sort,
|
|
311
|
-
tableId,
|
|
312
|
-
localPagination: (_e = other == null ? void 0 : other.pagination) == null ? void 0 : _e.localPagination,
|
|
313
|
-
gallery,
|
|
314
|
-
exportImport
|
|
315
|
-
}
|
|
316
|
-
), /* @__PURE__ */ import_react.default.createElement(import_Summary.default, { summary }), /* @__PURE__ */ import_react.default.createElement(
|
|
317
|
-
import_View.default,
|
|
307
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
308
|
+
"div",
|
|
318
309
|
{
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
|
|
310
|
+
className: (0, import_classNames.default)("materials-grid", {
|
|
311
|
+
"materials-grid-terminal": isTerminal
|
|
312
|
+
}),
|
|
313
|
+
style,
|
|
314
|
+
ref: wrapRef
|
|
315
|
+
},
|
|
316
|
+
/* @__PURE__ */ import_react.default.createElement(import_Header.default, { title, buttons }),
|
|
317
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
318
|
+
import_Actions.default,
|
|
319
|
+
{
|
|
320
|
+
view,
|
|
321
|
+
buttons: actionButtons,
|
|
322
|
+
columnSetting,
|
|
323
|
+
dataSourceGroup,
|
|
324
|
+
filter,
|
|
325
|
+
sort,
|
|
326
|
+
tableId,
|
|
327
|
+
localPagination: (_e = other == null ? void 0 : other.pagination) == null ? void 0 : _e.localPagination,
|
|
328
|
+
gallery,
|
|
329
|
+
exportImport
|
|
330
|
+
}
|
|
331
|
+
),
|
|
332
|
+
/* @__PURE__ */ import_react.default.createElement(import_Summary.default, { summary }),
|
|
333
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
334
|
+
import_View.default,
|
|
335
|
+
{
|
|
336
|
+
...props,
|
|
337
|
+
filter,
|
|
338
|
+
sort,
|
|
339
|
+
setTableSetting,
|
|
340
|
+
dataSourceGroup
|
|
341
|
+
}
|
|
342
|
+
)
|
|
343
|
+
)
|
|
326
344
|
);
|
|
327
345
|
})
|
|
328
346
|
);
|
|
@@ -38,6 +38,11 @@ var formatApiParams = (params, type) => {
|
|
|
38
38
|
const _url = (params == null ? void 0 : params.url) || (defaultUrl == null ? void 0 : defaultUrl[type]);
|
|
39
39
|
let _params = { ...params };
|
|
40
40
|
delete _params.url;
|
|
41
|
+
if (type !== "export") {
|
|
42
|
+
_params == null ? true : delete _params.shipping_status;
|
|
43
|
+
_params == null ? true : delete _params.payment_status;
|
|
44
|
+
_params == null ? true : delete _params.status;
|
|
45
|
+
}
|
|
41
46
|
return {
|
|
42
47
|
url: _url,
|
|
43
48
|
params: { ..._params }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.28",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
64
64
|
"crypto-js": "^4.2.0",
|
|
65
65
|
"@zxing/library": "0.21.2",
|
|
66
|
-
"@pisell/utils": "2.0.1",
|
|
67
66
|
"@pisell/icon": "0.0.11",
|
|
68
|
-
"@pisell/date-picker": "1.0.
|
|
67
|
+
"@pisell/date-picker": "1.0.100",
|
|
68
|
+
"@pisell/utils": "2.0.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"react": "^18.0.0",
|