@byteluck-fe/model-driven-upgrade 1.8.0-beta.0 → 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.
@@ -9,7 +9,6 @@ declare const _default: {
9
9
  'v2.6': import("..").DataCleaner;
10
10
  'v2.7': import("..").DataCleaner;
11
11
  'v2.8': import("..").DataCleaner;
12
- 'v2.9': import("..").DataCleaner;
13
- 'v2.10': () => void;
12
+ 'v2.9': () => void;
14
13
  };
15
14
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-upgrade",
3
- "version": "1.8.0-beta.0",
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.0",
26
- "@byteluck-fe/model-driven-core": "^1.8.0-beta.0",
27
- "@byteluck-fe/model-driven-shared": "^1.8.0-beta.0",
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": "f709000371a428ee181b1560cc99539d6424b7e5"
30
+ "gitHead": "0a1dbd5b8ee79797ec36659f25d19cd629639c03"
31
31
  }
@@ -1,115 +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, ref9;
21
- item.props.buttons.push({
22
- id: (ref3 = item.props) === null || ref3 === void 0 ? void 0 : ref3.check.id,
23
- type: "check",
24
- content: (ref4 = item.props) === null || ref4 === void 0 ? void 0 : ref4.check.content,
25
- is_show: (ref5 = item.props) === null || ref5 === void 0 ? void 0 : ref5.check.is_show,
26
- priority_process: (ref6 = item.props) === null || ref6 === void 0 ? void 0 : ref6.check.priority_process,
27
- open_type: (ref7 = item.props) === null || ref7 === void 0 ? void 0 : ref7.check.open_type,
28
- form_key: (ref8 = item.props) === null || ref8 === void 0 ? void 0 : ref8.check.form_key
29
- });
30
- (ref9 = item.props) === null || ref9 === void 0 ? void 0 : delete ref9.check;
31
- }
32
- if (((ref1 = item.props) === null || ref1 === void 0 ? void 0 : ref1.edit) !== undefined) {
33
- var ref10, ref11, ref12, ref13, ref14, ref15, ref16;
34
- item.props.buttons.push({
35
- id: (ref10 = item.props) === null || ref10 === void 0 ? void 0 : ref10.edit.id,
36
- type: "edit",
37
- content: (ref11 = item.props) === null || ref11 === void 0 ? void 0 : ref11.edit.content,
38
- is_show: (ref12 = item.props) === null || ref12 === void 0 ? void 0 : ref12.edit.is_show,
39
- priority_process: (ref13 = item.props) === null || ref13 === void 0 ? void 0 : ref13.edit.priority_process,
40
- open_type: (ref14 = item.props) === null || ref14 === void 0 ? void 0 : ref14.edit.open_type,
41
- form_key: (ref15 = item.props) === null || ref15 === void 0 ? void 0 : ref15.edit.form_key
42
- });
43
- (ref16 = item.props) === null || ref16 === void 0 ? void 0 : delete ref16.edit;
44
- }
45
- if (((ref2 = item.props) === null || ref2 === void 0 ? void 0 : ref2.delete) !== undefined) {
46
- var ref17, ref18, ref19, ref20, ref21, ref22;
47
- item.props.buttons.push({
48
- id: (ref17 = item.props) === null || ref17 === void 0 ? void 0 : ref17.delete.id,
49
- type: "delete",
50
- content: (ref18 = item.props) === null || ref18 === void 0 ? void 0 : ref18.delete.content,
51
- is_show: (ref19 = item.props) === null || ref19 === void 0 ? void 0 : ref19.delete.is_show,
52
- open_type: (ref20 = item.props) === null || ref20 === void 0 ? void 0 : ref20.delete.open_type,
53
- form_key: (ref21 = item.props) === null || ref21 === void 0 ? void 0 : ref21.delete.form_key
54
- });
55
- (ref22 = item.props) === null || ref22 === void 0 ? void 0 : delete ref22.delete;
56
- }
57
- }
58
- });
59
- }
60
- if (schema.type === CONTROL_TYPE.DATA_VIEW) {
61
- var ref;
62
- schema.props.buttons = [];
63
- delete schema.props.custom;
64
- if (((ref = schema.props) === null || ref === void 0 ? void 0 : ref.save) !== undefined) {
65
- var ref1, ref2, ref3, ref4, ref5, ref6;
66
- schema.props.buttons.push({
67
- id: (ref1 = schema.props) === null || ref1 === void 0 ? void 0 : ref1.save.id,
68
- type: "save",
69
- content: (ref2 = schema.props) === null || ref2 === void 0 ? void 0 : ref2.save.content,
70
- is_show: (ref3 = schema.props) === null || ref3 === void 0 ? void 0 : ref3.save.is_show,
71
- open_type: (ref4 = schema.props) === null || ref4 === void 0 ? void 0 : ref4.save.open_type,
72
- form_key: (ref5 = schema.props) === null || ref5 === void 0 ? void 0 : ref5.save.form_key
73
- });
74
- (ref6 = schema.props) === null || ref6 === void 0 ? void 0 : delete ref6.save;
75
- }
76
- if (schema.props.cancel !== undefined) {
77
- var ref7, ref8, ref9, ref10, ref11, ref12;
78
- schema.props.buttons.push({
79
- id: (ref7 = schema.props) === null || ref7 === void 0 ? void 0 : ref7.cancel.id,
80
- type: "cancel",
81
- content: (ref8 = schema.props) === null || ref8 === void 0 ? void 0 : ref8.cancel.content,
82
- is_show: (ref9 = schema.props) === null || ref9 === void 0 ? void 0 : ref9.cancel.is_show,
83
- open_type: (ref10 = schema.props) === null || ref10 === void 0 ? void 0 : ref10.cancel.open_type,
84
- form_key: (ref11 = schema.props) === null || ref11 === void 0 ? void 0 : ref11.cancel.form_key
85
- });
86
- (ref12 = schema.props) === null || ref12 === void 0 ? void 0 : delete ref12.cancel;
87
- }
88
- if (schema.props.save_as !== undefined) {
89
- var ref13, ref14, ref15, ref16, ref17, ref18;
90
- schema.props.buttons.push({
91
- id: (ref13 = schema.props) === null || ref13 === void 0 ? void 0 : ref13.save_as.id,
92
- type: "save_as",
93
- content: (ref14 = schema.props) === null || ref14 === void 0 ? void 0 : ref14.save_as.content,
94
- is_show: (ref15 = schema.props) === null || ref15 === void 0 ? void 0 : ref15.save_as.is_show,
95
- open_type: (ref16 = schema.props) === null || ref16 === void 0 ? void 0 : ref16.save_as.open_type,
96
- form_key: (ref17 = schema.props) === null || ref17 === void 0 ? void 0 : ref17.save_as.form_key
97
- });
98
- (ref18 = schema.props) === null || ref18 === void 0 ? void 0 : delete ref18.save_as;
99
- }
100
- if (schema.props.print !== undefined) {
101
- var ref19, ref20, ref21, ref22, ref23, ref24;
102
- schema.props.buttons.push({
103
- id: (ref19 = schema.props) === null || ref19 === void 0 ? void 0 : ref19.print.id,
104
- type: "print",
105
- content: (ref20 = schema.props) === null || ref20 === void 0 ? void 0 : ref20.print.content,
106
- is_show: (ref21 = schema.props) === null || ref21 === void 0 ? void 0 : ref21.print.is_show,
107
- open_type: (ref22 = schema.props) === null || ref22 === void 0 ? void 0 : ref22.print.open_type,
108
- form_key: (ref23 = schema.props) === null || ref23 === void 0 ? void 0 : ref23.print.form_key
109
- });
110
- (ref24 = schema.props) === null || ref24 === void 0 ? void 0 : delete ref24.print;
111
- }
112
- }
113
- return schema;
114
- }
115
- export { dataCleaner };
@@ -1,3 +0,0 @@
1
- import { DataCleaner } from '../types';
2
- declare const dataCleaner: DataCleaner;
3
- export { dataCleaner };