@byteluck-fe/model-driven-upgrade 2.7.0-alpha.24 → 2.7.0-alpha.25
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _classCallCheck(instance, Constructor) {
|
|
2
2
|
if (!(instance instanceof Constructor)) {
|
|
3
3
|
throw new TypeError("Cannot call a class as a function");
|
|
4
4
|
}
|
|
@@ -12,12 +12,12 @@ function _defineProperties(target, props) {
|
|
|
12
12
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
16
16
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
17
17
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
18
18
|
return Constructor;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function _defineProperty(obj, key, value) {
|
|
21
21
|
if (key in obj) {
|
|
22
22
|
Object.defineProperty(obj, key, {
|
|
23
23
|
value: value,
|
|
@@ -50,9 +50,9 @@ export var VersionBuilder = /*#__PURE__*/ function() {
|
|
|
50
50
|
"use strict";
|
|
51
51
|
function VersionBuilder(schemaVersion) {
|
|
52
52
|
var version = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : nowVersion;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
_classCallCheck(this, VersionBuilder);
|
|
54
|
+
_defineProperty(this, "toVersion", void 0);
|
|
55
|
+
_defineProperty(this, "schemaVersion", void 0);
|
|
56
56
|
this.schemaVersion = schemaVersion;
|
|
57
57
|
this.toVersion = version;
|
|
58
58
|
// if (versionToNumber(version) > versionToNumber(nowVersion)) {
|
|
@@ -62,7 +62,7 @@ export var VersionBuilder = /*#__PURE__*/ function() {
|
|
|
62
62
|
error("Version Builder: Please give me a valid version number, The valid version is: ".concat(versionKeys.join(","), ", But give me a ").concat(schemaVersion));
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
_createClass(VersionBuilder, [
|
|
66
66
|
{
|
|
67
67
|
key: "dataCleaner",
|
|
68
68
|
value: function dataCleaner1(schema, payload) {
|
package/dist/esm/upgrade/v1_0.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _arrayLikeToArray(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function _arrayWithHoles(arr) {
|
|
7
7
|
if (Array.isArray(arr)) return arr;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
if (Array.isArray(arr)) return
|
|
9
|
+
function _arrayWithoutHoles(arr) {
|
|
10
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function _iterableToArray(iter) {
|
|
13
13
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function _iterableToArrayLimit(arr, i) {
|
|
16
16
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
17
17
|
if (_i == null) return;
|
|
18
18
|
var _arr = [];
|
|
@@ -36,36 +36,35 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
36
36
|
}
|
|
37
37
|
return _arr;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function _nonIterableRest() {
|
|
40
40
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function _nonIterableSpread() {
|
|
43
43
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
45
|
+
function _slicedToArray(arr, i) {
|
|
46
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
48
|
+
function _toConsumableArray(arr) {
|
|
49
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
52
52
|
if (!o) return;
|
|
53
|
-
if (typeof o === "string") return
|
|
53
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
54
54
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
55
55
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
56
56
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
57
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
57
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
58
58
|
}
|
|
59
59
|
import { loop, toNumberOrEmpty, isLanguageObject, camelizeKeys, decamelizeKeys, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
|
|
60
60
|
import { DataSourceBind } from "@byteluck-fe/model-driven-core";
|
|
61
61
|
import { Col, SubTableColumn, ListView, DataView } from "@byteluck-fe/model-driven-controls";
|
|
62
62
|
var dataCleaner = function(schemaItems, payload) {
|
|
63
|
-
var _payload;
|
|
64
63
|
var isArray = Array.isArray(schemaItems);
|
|
65
64
|
var schemaArray = isArray ? schemaItems : [
|
|
66
65
|
schemaItems
|
|
67
66
|
];
|
|
68
|
-
conversionPageEvents(
|
|
67
|
+
conversionPageEvents(payload === null || payload === void 0 ? void 0 : payload.events);
|
|
69
68
|
conversionGroupPanel(schemaArray);
|
|
70
69
|
conversionLayoutControl(schemaArray);
|
|
71
70
|
var dataView = conversionDataViewPage(schemaArray);
|
|
@@ -92,7 +91,7 @@ var searchViewControlKeys = [
|
|
|
92
91
|
"simple-search"
|
|
93
92
|
];
|
|
94
93
|
function conversion(item, payload) {
|
|
95
|
-
var _item_props,
|
|
94
|
+
var _item_props, _item_props1, _item_props2;
|
|
96
95
|
var new_item = item;
|
|
97
96
|
if (!new_item.controlType) {
|
|
98
97
|
if (new_item.is_layout_control === true) {
|
|
@@ -123,13 +122,13 @@ function conversion(item, payload) {
|
|
|
123
122
|
item.props.defaultValue = item.props.value;
|
|
124
123
|
}
|
|
125
124
|
//caption/placeholder/placeholder_end 的 zh 属性将被保留,国际化资源都丢弃,放到外部
|
|
126
|
-
if (isLanguageObject(
|
|
125
|
+
if (isLanguageObject(item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.caption)) {
|
|
127
126
|
new_item.props.caption = item.props.caption.zh;
|
|
128
127
|
}
|
|
129
|
-
if (isLanguageObject(
|
|
128
|
+
if (isLanguageObject(item === null || item === void 0 ? void 0 : (_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.placeholder)) {
|
|
130
129
|
new_item.props.placeholder = item.props.placeholder.zh;
|
|
131
130
|
}
|
|
132
|
-
if (isLanguageObject(
|
|
131
|
+
if (isLanguageObject(item === null || item === void 0 ? void 0 : (_item_props2 = item.props) === null || _item_props2 === void 0 ? void 0 : _item_props2.placeholder_end)) {
|
|
133
132
|
new_item.props.placeholder_end = item.props.placeholder_end.zh;
|
|
134
133
|
}
|
|
135
134
|
// 部门组件
|
|
@@ -261,9 +260,8 @@ function conversion(item, payload) {
|
|
|
261
260
|
new_item.type = "tab-pane";
|
|
262
261
|
}
|
|
263
262
|
if (item.type === "calc") {
|
|
264
|
-
var
|
|
265
|
-
var
|
|
266
|
-
var calcUnit = (_new_item1 = new_item) === null || _new_item1 === void 0 ? void 0 : _new_item1.children[1];
|
|
263
|
+
var calcValue = new_item === null || new_item === void 0 ? void 0 : new_item.children[0];
|
|
264
|
+
var calcUnit = new_item === null || new_item === void 0 ? void 0 : new_item.children[1];
|
|
267
265
|
var newDataBind = {};
|
|
268
266
|
if (calcValue) {
|
|
269
267
|
conversionDisplayBoListAndBehaviors(new_item, payload);
|
|
@@ -286,11 +284,10 @@ function conversion(item, payload) {
|
|
|
286
284
|
delete new_item.children;
|
|
287
285
|
}
|
|
288
286
|
if (item.type === "amount-currency") {
|
|
289
|
-
var _new_item2, _new_item3;
|
|
290
287
|
new_item.type = "amount";
|
|
291
288
|
new_item.controlType = "form";
|
|
292
|
-
var amount =
|
|
293
|
-
var currency =
|
|
289
|
+
var amount = new_item === null || new_item === void 0 ? void 0 : new_item.children[0];
|
|
290
|
+
var currency = new_item === null || new_item === void 0 ? void 0 : new_item.children[1];
|
|
294
291
|
var newDataBind1 = {};
|
|
295
292
|
var defaultValue = {};
|
|
296
293
|
// new_item.
|
|
@@ -324,10 +321,9 @@ function conversion(item, payload) {
|
|
|
324
321
|
delete new_item.children;
|
|
325
322
|
}
|
|
326
323
|
if (item.type === "date-range") {
|
|
327
|
-
var _new_item4, _new_item5;
|
|
328
324
|
new_item.controlType = "form";
|
|
329
|
-
var min =
|
|
330
|
-
var max =
|
|
325
|
+
var min = new_item === null || new_item === void 0 ? void 0 : new_item.children[0];
|
|
326
|
+
var max = new_item === null || new_item === void 0 ? void 0 : new_item.children[1];
|
|
331
327
|
new_item.props.placeholderStart = isLanguageObject(item.props.placeholder) ? item.props.placeholder.zh : item.props.placeholder;
|
|
332
328
|
new_item.props.caption = isLanguageObject(item.props.caption) ? item.props.caption.zh : item.props.caption;
|
|
333
329
|
var newDataBind2 = {};
|
|
@@ -362,7 +358,7 @@ function conversion(item, payload) {
|
|
|
362
358
|
new_item.props.buttonType = "default";
|
|
363
359
|
}
|
|
364
360
|
}
|
|
365
|
-
conversionControlEvents(new_item,
|
|
361
|
+
conversionControlEvents(new_item, payload === null || payload === void 0 ? void 0 : payload.control_events);
|
|
366
362
|
return new_item;
|
|
367
363
|
}
|
|
368
364
|
function conversionDisplayBoListAndBehaviors(control, payload) {
|
|
@@ -423,7 +419,7 @@ function conversionLayoutControl(schemArray) {
|
|
|
423
419
|
if (!(item && item.children)) return;
|
|
424
420
|
var controlArray = item.children;
|
|
425
421
|
for(var i = 0; i < controlArray.length; i++){
|
|
426
|
-
var
|
|
422
|
+
var _controlArray_i, _controlArray_i_children;
|
|
427
423
|
var control = controlArray[i];
|
|
428
424
|
var child = (_controlArray_i = controlArray[i]) === null || _controlArray_i === void 0 ? void 0 : (_controlArray_i_children = _controlArray_i.children) === null || _controlArray_i_children === void 0 ? void 0 : _controlArray_i_children[0];
|
|
429
425
|
if (control.type === "grid-row" && child && [
|
|
@@ -437,7 +433,7 @@ function conversionLayoutControl(schemArray) {
|
|
|
437
433
|
});
|
|
438
434
|
}
|
|
439
435
|
function conversionListPage(controlArray, payload) {
|
|
440
|
-
var _listPageProps_source_config,
|
|
436
|
+
var _listPageProps_source_config, _listPageProps_source_config1, _listPageProps_source_config2, _listPageProps_source_config3, _listPageProps_sublist_page;
|
|
441
437
|
if (!(Array.isArray(controlArray) && controlArray.length === 1)) {
|
|
442
438
|
return controlArray;
|
|
443
439
|
}
|
|
@@ -447,9 +443,9 @@ function conversionListPage(controlArray, payload) {
|
|
|
447
443
|
}
|
|
448
444
|
// children = search + toolbox + table
|
|
449
445
|
var listPageProps = listPage.props, children = listPage.children;
|
|
450
|
-
var _children =
|
|
446
|
+
var _children = _slicedToArray(children, 3), search = _children[0], toolbox = _children[1], table = _children[2];
|
|
451
447
|
conversionSearch(search);
|
|
452
|
-
table.props.is_fixed_header =
|
|
448
|
+
table.props.is_fixed_header = listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_source_config = listPageProps.source_config) === null || _listPageProps_source_config === void 0 ? void 0 : _listPageProps_source_config.is_fixed_header;
|
|
453
449
|
// table.props.datasource_bind = new DataSourceBind({
|
|
454
450
|
// dataCode: listPageProps?.source_config?data_code,
|
|
455
451
|
// svcCode: listPageProps?.source_config?svc_code,
|
|
@@ -457,11 +453,11 @@ function conversionListPage(controlArray, payload) {
|
|
|
457
453
|
// })
|
|
458
454
|
conversionGridTable(table, toolbox);
|
|
459
455
|
var _listPageProps_source_config_data_code;
|
|
460
|
-
var dataCode = (_listPageProps_source_config_data_code =
|
|
456
|
+
var dataCode = (_listPageProps_source_config_data_code = listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_source_config1 = listPageProps.source_config) === null || _listPageProps_source_config1 === void 0 ? void 0 : _listPageProps_source_config1.data_code) !== null && _listPageProps_source_config_data_code !== void 0 ? _listPageProps_source_config_data_code : payload === null || payload === void 0 ? void 0 : payload.dataCode;
|
|
461
457
|
var _listPageProps_source_config_svc_code;
|
|
462
|
-
var svcCode = ((_listPageProps_source_config_svc_code =
|
|
458
|
+
var svcCode = ((_listPageProps_source_config_svc_code = listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_source_config2 = listPageProps.source_config) === null || _listPageProps_source_config2 === void 0 ? void 0 : _listPageProps_source_config2.svc_code) !== null && _listPageProps_source_config_svc_code !== void 0 ? _listPageProps_source_config_svc_code : dataCode) ? "".concat(dataCode, "_selectMore") : undefined;
|
|
463
459
|
var _listPageProps_source_config_orders;
|
|
464
|
-
var orders = (_listPageProps_source_config_orders =
|
|
460
|
+
var orders = (_listPageProps_source_config_orders = listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_source_config3 = listPageProps.source_config) === null || _listPageProps_source_config3 === void 0 ? void 0 : _listPageProps_source_config3.orders) !== null && _listPageProps_source_config_orders !== void 0 ? _listPageProps_source_config_orders : [];
|
|
465
461
|
var listView = new ListView.Designer();
|
|
466
462
|
listView.props.datasourceBind = new DataSourceBind({
|
|
467
463
|
dataCode: dataCode,
|
|
@@ -471,7 +467,7 @@ function conversionListPage(controlArray, payload) {
|
|
|
471
467
|
listView.props.isShowSubList = listPageProps.is_show_sublist;
|
|
472
468
|
listView.props.triggerType = listPageProps.timing_type;
|
|
473
469
|
listView.props.triggerFieldCode = listPageProps.ctrl_field_code;
|
|
474
|
-
|
|
470
|
+
listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_sublist_page = listPageProps.sublist_page) === null || _listPageProps_sublist_page === void 0 ? void 0 : _listPageProps_sublist_page.sublists.forEach(function(item) {
|
|
475
471
|
item.title = isLanguageObject(item.title) ? item.title.zh : item.title;
|
|
476
472
|
});
|
|
477
473
|
listView.props.sublistPage = listPageProps.sublist_page;
|
|
@@ -492,7 +488,7 @@ function conversionSearch(searchControl) {
|
|
|
492
488
|
item.placeholderEnd = placeholder;
|
|
493
489
|
}
|
|
494
490
|
if (item.type === "date-pick") {
|
|
495
|
-
var
|
|
491
|
+
var _item_dateType, _item_dateType_replace;
|
|
496
492
|
item.type = "search-date-range";
|
|
497
493
|
item.placeholderStart = placeholder;
|
|
498
494
|
item.placeholderEnd = placeholder;
|
|
@@ -635,7 +631,7 @@ function conversionControlEvents(control, controlEvents) {
|
|
|
635
631
|
if (!controlEvents[control.id][eventKey]) {
|
|
636
632
|
controlEvents[control.id][eventKey] = [];
|
|
637
633
|
}
|
|
638
|
-
(_controlEvents_control_id_eventKey = controlEvents[control.id][eventKey]).push.apply(_controlEvents_control_id_eventKey,
|
|
634
|
+
(_controlEvents_control_id_eventKey = controlEvents[control.id][eventKey]).push.apply(_controlEvents_control_id_eventKey, _toConsumableArray(control.props.events[eventKey].map(function(item) {
|
|
639
635
|
return item.name;
|
|
640
636
|
})));
|
|
641
637
|
});
|
|
@@ -645,7 +641,7 @@ function conversionControlEvents(control, controlEvents) {
|
|
|
645
641
|
if (!controlEvents[control.id].on_change) {
|
|
646
642
|
controlEvents[control.id].on_change = [];
|
|
647
643
|
}
|
|
648
|
-
(_controlEvents_control_id_on_change = controlEvents[control.id].on_change).push.apply(_controlEvents_control_id_on_change,
|
|
644
|
+
(_controlEvents_control_id_on_change = controlEvents[control.id].on_change).push.apply(_controlEvents_control_id_on_change, _toConsumableArray(controlEvents[control.id].on_blur));
|
|
649
645
|
}
|
|
650
646
|
}
|
|
651
647
|
export { dataCleaner };
|
package/dist/esm/upgrade/v2_6.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _defineProperty(obj, key, value) {
|
|
2
2
|
if (key in obj) {
|
|
3
3
|
Object.defineProperty(obj, key, {
|
|
4
4
|
value: value,
|
|
@@ -29,7 +29,7 @@ function setFieldTypeToDataBind(DataBind, fieldType) {
|
|
|
29
29
|
}
|
|
30
30
|
function conversion(schema, payload) {
|
|
31
31
|
var _obj;
|
|
32
|
-
var fieldTypeMap = (_obj = {},
|
|
32
|
+
var fieldTypeMap = (_obj = {}, _defineProperty(_obj, CONTROL_TYPE.TITLE, FieldTypes.AUTO_NUMBER), _defineProperty(_obj, CONTROL_TYPE.ADDRESS, FieldTypes.ADDRESS), _defineProperty(_obj, CONTROL_TYPE.ATTACHMENT, FieldTypes.FILE), _defineProperty(_obj, CONTROL_TYPE.AUTO_NUMBER, FieldTypes.AUTO_NUMBER), _defineProperty(_obj, CONTROL_TYPE.CHECKBOX, FieldTypes.ARRAY), _defineProperty(_obj, CONTROL_TYPE.DATE_PICKER, FieldTypes.TIMESTAMP), _defineProperty(_obj, CONTROL_TYPE.DEPARTMENT, FieldTypes.DEPARTMENTS), _defineProperty(_obj, CONTROL_TYPE.EMPLOYEE, FieldTypes.EMPLOYEES), _defineProperty(_obj, CONTROL_TYPE.EMPLOYEE2, FieldTypes.EMPLOYEES), _defineProperty(_obj, CONTROL_TYPE.IMAGE, FieldTypes.IMAGE), _defineProperty(_obj, CONTROL_TYPE.INPUT, FieldTypes.VARCHAR), _defineProperty(_obj, CONTROL_TYPE.NUMBER, FieldTypes.DECIMAL), _defineProperty(_obj, CONTROL_TYPE.RADIO, FieldTypes.VARCHAR), _defineProperty(_obj, CONTROL_TYPE.RICH_TEXT, FieldTypes.TEXT), _defineProperty(_obj, CONTROL_TYPE.SCORE, FieldTypes.DECIMAL), _defineProperty(_obj, CONTROL_TYPE.SELECT, FieldTypes.VARCHAR), _defineProperty(_obj, CONTROL_TYPE.SELECT_MULTIPLE, FieldTypes.ARRAY), _defineProperty(_obj, CONTROL_TYPE.SELECT_RELATION, FieldTypes.VARCHAR), _defineProperty(_obj, CONTROL_TYPE.TEXTAREA, FieldTypes.TEXT), _defineProperty(_obj, CONTROL_TYPE.TREE, FieldTypes.ARRAY), _defineProperty(_obj, CONTROL_TYPE.SEARCH_DATE_RANGE, FieldTypes.ARRAY), _defineProperty(_obj, CONTROL_TYPE.SEARCH_INPUT, FieldTypes.VARCHAR), _defineProperty(_obj, CONTROL_TYPE.SEARCH_NUMBER_RANGE, FieldTypes.ARRAY), _obj);
|
|
33
33
|
if (fieldTypeMap.hasOwnProperty(schema.type)) {
|
|
34
34
|
// @ts-ignore
|
|
35
35
|
setFieldTypeToDataBind(schema.props.data_bind, fieldTypeMap[schema.type]);
|
package/dist/esm/upgrade/v2_8.js
CHANGED
|
@@ -14,7 +14,7 @@ function conversion(schema, payload) {
|
|
|
14
14
|
if (schema.type === CONTROL_TYPE.SIMPLE_SEARCH && schema.children.length) {
|
|
15
15
|
if (!schema.props.query_type_map) schema.props.query_type_map = [];
|
|
16
16
|
schema.children.forEach(function(item) {
|
|
17
|
-
var
|
|
17
|
+
var _item_props, _item_props_data_bind;
|
|
18
18
|
if ([
|
|
19
19
|
FieldTypes.VARCHAR,
|
|
20
20
|
FieldTypes.TEXT,
|
package/dist/esm/upgrade/v3_0.js
CHANGED
|
@@ -26,7 +26,7 @@ function conversion(schema, payload) {
|
|
|
26
26
|
if (schema.type === CONTROL_TYPE.GRID_TABLE) {
|
|
27
27
|
schema.props.headers.map(function(item) {
|
|
28
28
|
if (item.type === CONTROL_TYPE.OPERATION_COLUMN) {
|
|
29
|
-
var
|
|
29
|
+
var _item_props, _item_props1, _item_props2;
|
|
30
30
|
if (item.props.width_type === "auto") {
|
|
31
31
|
item.props.auto_width = {
|
|
32
32
|
min_width: 120,
|
|
@@ -42,7 +42,7 @@ function conversion(schema, payload) {
|
|
|
42
42
|
}
|
|
43
43
|
item.props.width_type = "auto";
|
|
44
44
|
var _item_children;
|
|
45
|
-
item.children = (_item_children =
|
|
45
|
+
item.children = (_item_children = item === null || item === void 0 ? void 0 : item.children) !== null && _item_children !== void 0 ? _item_children : [];
|
|
46
46
|
delete item.props.custom;
|
|
47
47
|
if (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.check) !== undefined) {
|
|
48
48
|
var _item_props3, _item_props4, _item_props5, _item_props6, _item_props7, _item_props8;
|
|
@@ -60,7 +60,7 @@ function conversion(schema, payload) {
|
|
|
60
60
|
if ((_item_props7 = item.props) === null || _item_props7 === void 0 ? void 0 : _item_props7.check.is_show) {
|
|
61
61
|
item.children.push(optbtn.toSchema());
|
|
62
62
|
}
|
|
63
|
-
(_item_props8 = item.props) === null || _item_props8 === void 0 ?
|
|
63
|
+
(_item_props8 = item.props) === null || _item_props8 === void 0 ? void 0 : delete _item_props8.check;
|
|
64
64
|
}
|
|
65
65
|
if (((_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.edit) !== undefined) {
|
|
66
66
|
var _item_props9, _item_props10, _item_props11, _item_props12, _item_props13, _item_props14;
|
|
@@ -78,7 +78,7 @@ function conversion(schema, payload) {
|
|
|
78
78
|
if ((_item_props13 = item.props) === null || _item_props13 === void 0 ? void 0 : _item_props13.edit.is_show) {
|
|
79
79
|
item.children.push(optbtn1.toSchema());
|
|
80
80
|
}
|
|
81
|
-
(_item_props14 = item.props) === null || _item_props14 === void 0 ?
|
|
81
|
+
(_item_props14 = item.props) === null || _item_props14 === void 0 ? void 0 : delete _item_props14.edit;
|
|
82
82
|
}
|
|
83
83
|
if (((_item_props2 = item.props) === null || _item_props2 === void 0 ? void 0 : _item_props2.delete) !== undefined) {
|
|
84
84
|
var _item_props15, _item_props16, _item_props17, _item_props18, _item_props19, _item_props20;
|
|
@@ -98,7 +98,7 @@ function conversion(schema, payload) {
|
|
|
98
98
|
if ((_item_props19 = item.props) === null || _item_props19 === void 0 ? void 0 : _item_props19.delete.is_show) {
|
|
99
99
|
item.children.push(optbtn2.toSchema());
|
|
100
100
|
}
|
|
101
|
-
(_item_props20 = item.props) === null || _item_props20 === void 0 ?
|
|
101
|
+
(_item_props20 = item.props) === null || _item_props20 === void 0 ? void 0 : delete _item_props20.delete;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
});
|