@byteluck-fe/model-driven-upgrade 1.8.0-beta.1 → 1.8.0-beta.2
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/dist/esm/VersionBuilder.js +2 -2
- package/dist/esm/upgrade/index.js +1 -3
- package/dist/esm/upgrade/v1_0.js +38 -38
- package/dist/esm/upgrade/v2_6.js +2 -2
- package/dist/esm/upgrade/v2_8.js +2 -2
- package/dist/index.umd.js +1 -1
- package/dist/types/upgrade/index.d.ts +1 -2
- package/package.json +5 -5
- package/dist/esm/upgrade/v2_9.js +0 -110
- package/dist/types/upgrade/v2_9.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-upgrade",
|
|
3
|
-
"version": "1.8.0-beta.
|
|
3
|
+
"version": "1.8.0-beta.2",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"postpublish": "node ../../scripts/postpublish.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@byteluck-fe/model-driven-controls": "^1.8.0-beta.
|
|
26
|
-
"@byteluck-fe/model-driven-core": "^1.8.0-beta.
|
|
27
|
-
"@byteluck-fe/model-driven-shared": "^1.8.0-beta.
|
|
25
|
+
"@byteluck-fe/model-driven-controls": "^1.8.0-beta.2",
|
|
26
|
+
"@byteluck-fe/model-driven-core": "^1.8.0-beta.2",
|
|
27
|
+
"@byteluck-fe/model-driven-shared": "^1.8.0-beta.2",
|
|
28
28
|
"tslib": "^2.1.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "0a1dbd5b8ee79797ec36659f25d19cd629639c03"
|
|
31
31
|
}
|
package/dist/esm/upgrade/v2_9.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
|
|
2
|
-
var dataCleaner = function(schemaItems, payload) {
|
|
3
|
-
var isArray = Array.isArray(schemaItems);
|
|
4
|
-
var schemaArray = isArray ? schemaItems : [
|
|
5
|
-
schemaItems
|
|
6
|
-
];
|
|
7
|
-
var new_schema = loop(schemaArray, function(item) {
|
|
8
|
-
return conversion(item, payload);
|
|
9
|
-
});
|
|
10
|
-
return isArray ? new_schema : new_schema[0];
|
|
11
|
-
};
|
|
12
|
-
function conversion(schema, payload) {
|
|
13
|
-
if (schema.type === CONTROL_TYPE.GRID_TABLE) {
|
|
14
|
-
schema.props.headers.map(function(item) {
|
|
15
|
-
if (item.type === CONTROL_TYPE.OPERATION_COLUMN) {
|
|
16
|
-
var ref, ref1, ref2;
|
|
17
|
-
item.props.buttons = [];
|
|
18
|
-
delete item.props.custom;
|
|
19
|
-
if (((ref = item.props) === null || ref === void 0 ? void 0 : ref.check) !== undefined) {
|
|
20
|
-
var ref3, ref4, ref5, ref6, ref7, ref8;
|
|
21
|
-
item.props.buttons.push({
|
|
22
|
-
code: "check",
|
|
23
|
-
type: "check",
|
|
24
|
-
content: (ref3 = item.props) === null || ref3 === void 0 ? void 0 : ref3.check.content,
|
|
25
|
-
is_show: (ref4 = item.props) === null || ref4 === void 0 ? void 0 : ref4.check.is_show,
|
|
26
|
-
priority_process: (ref5 = item.props) === null || ref5 === void 0 ? void 0 : ref5.check.priority_process,
|
|
27
|
-
open_type: (ref6 = item.props) === null || ref6 === void 0 ? void 0 : ref6.check.open_type,
|
|
28
|
-
form_key: (ref7 = item.props) === null || ref7 === void 0 ? void 0 : ref7.check.form_key
|
|
29
|
-
});
|
|
30
|
-
(ref8 = item.props) === null || ref8 === void 0 ? void 0 : delete ref8.check;
|
|
31
|
-
}
|
|
32
|
-
if (((ref1 = item.props) === null || ref1 === void 0 ? void 0 : ref1.edit) !== undefined) {
|
|
33
|
-
var ref9, ref10, ref11, ref12, ref13, ref14;
|
|
34
|
-
item.props.buttons.push({
|
|
35
|
-
code: "edit",
|
|
36
|
-
type: "edit",
|
|
37
|
-
content: (ref9 = item.props) === null || ref9 === void 0 ? void 0 : ref9.edit.content,
|
|
38
|
-
is_show: (ref10 = item.props) === null || ref10 === void 0 ? void 0 : ref10.edit.is_show,
|
|
39
|
-
priority_process: (ref11 = item.props) === null || ref11 === void 0 ? void 0 : ref11.edit.priority_process,
|
|
40
|
-
open_type: (ref12 = item.props) === null || ref12 === void 0 ? void 0 : ref12.edit.open_type,
|
|
41
|
-
form_key: (ref13 = item.props) === null || ref13 === void 0 ? void 0 : ref13.edit.form_key
|
|
42
|
-
});
|
|
43
|
-
(ref14 = item.props) === null || ref14 === void 0 ? void 0 : delete ref14.edit;
|
|
44
|
-
}
|
|
45
|
-
if (((ref2 = item.props) === null || ref2 === void 0 ? void 0 : ref2.delete) !== undefined) {
|
|
46
|
-
var ref15, ref16, ref17, ref18, ref19;
|
|
47
|
-
item.props.buttons.push({
|
|
48
|
-
code: "delete",
|
|
49
|
-
type: "delete",
|
|
50
|
-
content: (ref15 = item.props) === null || ref15 === void 0 ? void 0 : ref15.delete.content,
|
|
51
|
-
is_show: (ref16 = item.props) === null || ref16 === void 0 ? void 0 : ref16.delete.is_show,
|
|
52
|
-
open_type: (ref17 = item.props) === null || ref17 === void 0 ? void 0 : ref17.delete.open_type,
|
|
53
|
-
form_key: (ref18 = item.props) === null || ref18 === void 0 ? void 0 : ref18.delete.form_key
|
|
54
|
-
});
|
|
55
|
-
(ref19 = item.props) === null || ref19 === void 0 ? void 0 : delete ref19.delete;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
// if (schema.type === CONTROL_TYPE.DATA_VIEW) {
|
|
61
|
-
// schema.props.buttons = []
|
|
62
|
-
// delete schema.props.custom
|
|
63
|
-
// if (schema.props?.save !== undefined) {
|
|
64
|
-
// schema.props.buttons.push({
|
|
65
|
-
// id: schema.props?.save.id,
|
|
66
|
-
// type: 'save',
|
|
67
|
-
// content: schema.props?.save.content,
|
|
68
|
-
// is_show: schema.props?.save.is_show,
|
|
69
|
-
// open_type: schema.props?.save.open_type,
|
|
70
|
-
// form_key: schema.props?.save.form_key
|
|
71
|
-
// })
|
|
72
|
-
// delete schema.props?.save
|
|
73
|
-
// }
|
|
74
|
-
// if (schema.props.cancel !== undefined) {
|
|
75
|
-
// schema.props.buttons.push({
|
|
76
|
-
// id: schema.props?.cancel.id,
|
|
77
|
-
// type: 'cancel',
|
|
78
|
-
// content: schema.props?.cancel.content,
|
|
79
|
-
// is_show: schema.props?.cancel.is_show,
|
|
80
|
-
// open_type: schema.props?.cancel.open_type,
|
|
81
|
-
// form_key: schema.props?.cancel.form_key
|
|
82
|
-
// })
|
|
83
|
-
// delete schema.props?.cancel
|
|
84
|
-
// }
|
|
85
|
-
// if (schema.props.save_as !== undefined) {
|
|
86
|
-
// schema.props.buttons.push({
|
|
87
|
-
// id: schema.props?.save_as.id,
|
|
88
|
-
// type: 'save_as',
|
|
89
|
-
// content: schema.props?.save_as.content,
|
|
90
|
-
// is_show: schema.props?.save_as.is_show,
|
|
91
|
-
// open_type: schema.props?.save_as.open_type,
|
|
92
|
-
// form_key: schema.props?.save_as.form_key
|
|
93
|
-
// })
|
|
94
|
-
// delete schema.props?.save_as
|
|
95
|
-
// }
|
|
96
|
-
// if (schema.props.print !== undefined) {
|
|
97
|
-
// schema.props.buttons.push({
|
|
98
|
-
// id: schema.props?.print.id,
|
|
99
|
-
// type: 'print',
|
|
100
|
-
// content: schema.props?.print.content,
|
|
101
|
-
// is_show: schema.props?.print.is_show,
|
|
102
|
-
// open_type: schema.props?.print.open_type,
|
|
103
|
-
// form_key: schema.props?.print.form_key
|
|
104
|
-
// })
|
|
105
|
-
// delete schema.props?.print
|
|
106
|
-
// }
|
|
107
|
-
// }
|
|
108
|
-
return schema;
|
|
109
|
-
}
|
|
110
|
-
export { dataCleaner };
|