@ztocwst/rc-pro-materials 0.2.19 → 0.2.20
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.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/dist/SCM_Comps.js +2 -2
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +3 -1
- package/es/utils/props/editTable.js +18 -11
- package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +3 -1
- package/lib/utils/props/editTable.js +18 -11
- package/package.json +3 -3
package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js
CHANGED
|
@@ -231,12 +231,14 @@ export var handleColumns = function handleColumns(option, expressions, linkPage,
|
|
|
231
231
|
};
|
|
232
232
|
});
|
|
233
233
|
if (option !== null && option !== void 0 && (_option$actionJson = option.actionJson) !== null && _option$actionJson !== void 0 && _option$actionJson.custom) {
|
|
234
|
+
var _columns$fn;
|
|
234
235
|
var _ref5 = (option === null || option === void 0 ? void 0 : option.actionJson) || {},
|
|
235
236
|
isFixed = _ref5.isFixed,
|
|
236
237
|
fixed = _ref5.fixed,
|
|
237
238
|
_render = _ref5.render,
|
|
238
239
|
values = _objectWithoutPropertiesLoose(_ref5, _excluded);
|
|
239
|
-
|
|
240
|
+
var fn = fixed === 'left' ? 'unshift' : 'push';
|
|
241
|
+
(_columns$fn = columns[fn]) === null || _columns$fn === void 0 ? void 0 : _columns$fn.call(columns, _extends({}, values, {
|
|
240
242
|
dataIndex: 'action',
|
|
241
243
|
fixed: isFixed ? fixed || isFixed : false,
|
|
242
244
|
render: function render(_, record) {
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["scroll", "value", "onChange", "restEditableProps", "restRecordCreatorProps", "
|
|
4
|
-
_excluded2 = ["
|
|
3
|
+
var _excluded = ["scroll", "value", "onChange", "restEditableProps", "restRecordCreatorProps", "FormItemProps", "fieldProps", "columns", "editable", "render", "recordCreatorProps", "locale"],
|
|
4
|
+
_excluded2 = ["restFormProps"],
|
|
5
|
+
_excluded3 = ["restFieldProps"],
|
|
6
|
+
_excluded4 = ["editable"];
|
|
5
7
|
import { processJsonOrFunctionProps } from "../../../lib";
|
|
6
8
|
var processTableProps = function processTableProps(props) {
|
|
7
|
-
console.log(props, 2);
|
|
8
9
|
var processObjectValue = function processObjectValue(obj) {
|
|
9
10
|
var scroll = obj.scroll,
|
|
10
11
|
value = obj.value,
|
|
11
12
|
onChange = obj.onChange,
|
|
12
13
|
restEditableProps = obj.restEditableProps,
|
|
13
14
|
restRecordCreatorProps = obj.restRecordCreatorProps,
|
|
14
|
-
restFieldProps = obj.restFieldProps,
|
|
15
|
-
restFormProps = obj.restFormProps,
|
|
16
15
|
FormItemProps = obj.FormItemProps,
|
|
17
16
|
fieldProps = obj.fieldProps,
|
|
18
17
|
columns = obj.columns,
|
|
@@ -21,6 +20,12 @@ var processTableProps = function processTableProps(props) {
|
|
|
21
20
|
recordCreatorProps = obj.recordCreatorProps,
|
|
22
21
|
locale = obj.locale,
|
|
23
22
|
rest = _objectWithoutPropertiesLoose(obj, _excluded);
|
|
23
|
+
var _ref = FormItemProps !== null && FormItemProps !== void 0 ? FormItemProps : {},
|
|
24
|
+
restFormProps = _ref.restFormProps,
|
|
25
|
+
restFormItemProps = _objectWithoutPropertiesLoose(_ref, _excluded2);
|
|
26
|
+
var _ref2 = fieldProps !== null && fieldProps !== void 0 ? fieldProps : {},
|
|
27
|
+
restFieldProps = _ref2.restFieldProps,
|
|
28
|
+
restFieldItemProps = _objectWithoutPropertiesLoose(_ref2, _excluded3);
|
|
24
29
|
return _extends({}, locale ? {
|
|
25
30
|
locale: processJsonOrFunctionProps(locale)
|
|
26
31
|
} : {}, scroll ? {
|
|
@@ -36,13 +41,13 @@ var processTableProps = function processTableProps(props) {
|
|
|
36
41
|
} : {}, render ? {
|
|
37
42
|
render: render
|
|
38
43
|
} : {}, FormItemProps ? {
|
|
39
|
-
formItemProps: _extends({},
|
|
44
|
+
formItemProps: _extends({}, restFormItemProps, typeof restFormProps === 'function' ? restFormProps === null || restFormProps === void 0 ? void 0 : restFormProps() : restFormProps)
|
|
40
45
|
} : {}, fieldProps ? {
|
|
41
|
-
fieldProps: _extends({},
|
|
46
|
+
fieldProps: _extends({}, restFieldItemProps, typeof restFieldProps === 'function' ? restFieldProps === null || restFieldProps === void 0 ? void 0 : restFieldProps() : restFieldProps)
|
|
42
47
|
} : {}, columns !== null && columns !== void 0 && columns.length ? {
|
|
43
48
|
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
44
49
|
var columnsEditable = v.editable,
|
|
45
|
-
restColumns = _objectWithoutPropertiesLoose(v,
|
|
50
|
+
restColumns = _objectWithoutPropertiesLoose(v, _excluded4);
|
|
46
51
|
return _extends({}, editable ? {
|
|
47
52
|
editable: columnsEditable
|
|
48
53
|
} : {}, processObjectValue(restColumns));
|
|
@@ -54,11 +59,13 @@ var processTableProps = function processTableProps(props) {
|
|
|
54
59
|
return processObjectValue(e);
|
|
55
60
|
});
|
|
56
61
|
}
|
|
57
|
-
|
|
62
|
+
var data = processObjectValue(props);
|
|
63
|
+
console.log(data, 'editTable Props');
|
|
64
|
+
return data;
|
|
58
65
|
};
|
|
59
66
|
export var processEditTableProps = function processEditTableProps(props, extra) {
|
|
60
|
-
var
|
|
61
|
-
proEditableFormRef =
|
|
67
|
+
var _ref3 = extra !== null && extra !== void 0 ? extra : {},
|
|
68
|
+
proEditableFormRef = _ref3.proEditableFormRef;
|
|
62
69
|
return _extends({}, processTableProps(props), {
|
|
63
70
|
proEditableFormRef: proEditableFormRef
|
|
64
71
|
});
|
package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js
CHANGED
|
@@ -239,12 +239,14 @@ var handleColumns = function handleColumns(option, expressions, linkPage, onLink
|
|
|
239
239
|
};
|
|
240
240
|
});
|
|
241
241
|
if (option !== null && option !== void 0 && (_option$actionJson = option.actionJson) !== null && _option$actionJson !== void 0 && _option$actionJson.custom) {
|
|
242
|
+
var _columns$fn;
|
|
242
243
|
var _ref5 = (option === null || option === void 0 ? void 0 : option.actionJson) || {},
|
|
243
244
|
isFixed = _ref5.isFixed,
|
|
244
245
|
fixed = _ref5.fixed,
|
|
245
246
|
_render = _ref5.render,
|
|
246
247
|
values = (0, _objectWithoutPropertiesLoose2["default"])(_ref5, _excluded);
|
|
247
|
-
|
|
248
|
+
var fn = fixed === 'left' ? 'unshift' : 'push';
|
|
249
|
+
(_columns$fn = columns[fn]) === null || _columns$fn === void 0 ? void 0 : _columns$fn.call(columns, (0, _extends2["default"])({}, values, {
|
|
248
250
|
dataIndex: 'action',
|
|
249
251
|
fixed: isFixed ? fixed || isFixed : false,
|
|
250
252
|
render: function render(_, record) {
|
|
@@ -6,18 +6,17 @@ exports.processEditTableProps = void 0;
|
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
8
|
var _lib = require("../../../lib");
|
|
9
|
-
var _excluded = ["scroll", "value", "onChange", "restEditableProps", "restRecordCreatorProps", "
|
|
10
|
-
_excluded2 = ["
|
|
9
|
+
var _excluded = ["scroll", "value", "onChange", "restEditableProps", "restRecordCreatorProps", "FormItemProps", "fieldProps", "columns", "editable", "render", "recordCreatorProps", "locale"],
|
|
10
|
+
_excluded2 = ["restFormProps"],
|
|
11
|
+
_excluded3 = ["restFieldProps"],
|
|
12
|
+
_excluded4 = ["editable"];
|
|
11
13
|
var processTableProps = function processTableProps(props) {
|
|
12
|
-
console.log(props, 2);
|
|
13
14
|
var processObjectValue = function processObjectValue(obj) {
|
|
14
15
|
var scroll = obj.scroll,
|
|
15
16
|
value = obj.value,
|
|
16
17
|
onChange = obj.onChange,
|
|
17
18
|
restEditableProps = obj.restEditableProps,
|
|
18
19
|
restRecordCreatorProps = obj.restRecordCreatorProps,
|
|
19
|
-
restFieldProps = obj.restFieldProps,
|
|
20
|
-
restFormProps = obj.restFormProps,
|
|
21
20
|
FormItemProps = obj.FormItemProps,
|
|
22
21
|
fieldProps = obj.fieldProps,
|
|
23
22
|
columns = obj.columns,
|
|
@@ -26,6 +25,12 @@ var processTableProps = function processTableProps(props) {
|
|
|
26
25
|
recordCreatorProps = obj.recordCreatorProps,
|
|
27
26
|
locale = obj.locale,
|
|
28
27
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(obj, _excluded);
|
|
28
|
+
var _ref = FormItemProps !== null && FormItemProps !== void 0 ? FormItemProps : {},
|
|
29
|
+
restFormProps = _ref.restFormProps,
|
|
30
|
+
restFormItemProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded2);
|
|
31
|
+
var _ref2 = fieldProps !== null && fieldProps !== void 0 ? fieldProps : {},
|
|
32
|
+
restFieldProps = _ref2.restFieldProps,
|
|
33
|
+
restFieldItemProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref2, _excluded3);
|
|
29
34
|
return (0, _extends2["default"])({}, locale ? {
|
|
30
35
|
locale: (0, _lib.processJsonOrFunctionProps)(locale)
|
|
31
36
|
} : {}, scroll ? {
|
|
@@ -41,13 +46,13 @@ var processTableProps = function processTableProps(props) {
|
|
|
41
46
|
} : {}, render ? {
|
|
42
47
|
render: render
|
|
43
48
|
} : {}, FormItemProps ? {
|
|
44
|
-
formItemProps: (0, _extends2["default"])({},
|
|
49
|
+
formItemProps: (0, _extends2["default"])({}, restFormItemProps, typeof restFormProps === 'function' ? restFormProps === null || restFormProps === void 0 ? void 0 : restFormProps() : restFormProps)
|
|
45
50
|
} : {}, fieldProps ? {
|
|
46
|
-
fieldProps: (0, _extends2["default"])({},
|
|
51
|
+
fieldProps: (0, _extends2["default"])({}, restFieldItemProps, typeof restFieldProps === 'function' ? restFieldProps === null || restFieldProps === void 0 ? void 0 : restFieldProps() : restFieldProps)
|
|
47
52
|
} : {}, columns !== null && columns !== void 0 && columns.length ? {
|
|
48
53
|
columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
|
|
49
54
|
var columnsEditable = v.editable,
|
|
50
|
-
restColumns = (0, _objectWithoutPropertiesLoose2["default"])(v,
|
|
55
|
+
restColumns = (0, _objectWithoutPropertiesLoose2["default"])(v, _excluded4);
|
|
51
56
|
return (0, _extends2["default"])({}, editable ? {
|
|
52
57
|
editable: columnsEditable
|
|
53
58
|
} : {}, processObjectValue(restColumns));
|
|
@@ -59,11 +64,13 @@ var processTableProps = function processTableProps(props) {
|
|
|
59
64
|
return processObjectValue(e);
|
|
60
65
|
});
|
|
61
66
|
}
|
|
62
|
-
|
|
67
|
+
var data = processObjectValue(props);
|
|
68
|
+
console.log(data, 'editTable Props');
|
|
69
|
+
return data;
|
|
63
70
|
};
|
|
64
71
|
var processEditTableProps = function processEditTableProps(props, extra) {
|
|
65
|
-
var
|
|
66
|
-
proEditableFormRef =
|
|
72
|
+
var _ref3 = extra !== null && extra !== void 0 ? extra : {},
|
|
73
|
+
proEditableFormRef = _ref3.proEditableFormRef;
|
|
67
74
|
return (0, _extends2["default"])({}, processTableProps(props), {
|
|
68
75
|
proEditableFormRef: proEditableFormRef
|
|
69
76
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztocwst/rc-pro-materials",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"description": "@ztocwst/rc-pro-materials",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
},
|
|
87
87
|
"componentConfig": {
|
|
88
88
|
"isComponentLibrary": true,
|
|
89
|
-
"materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.
|
|
89
|
+
"materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.20/build/lowcode/assets-prod.json"
|
|
90
90
|
},
|
|
91
|
-
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.
|
|
91
|
+
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.20/build/index.html",
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"registry": "https://registry.npmjs.org/",
|
|
94
94
|
"access": "public"
|