@byteluck-fe/model-driven-driven 2.5.0-alpha.7 → 2.6.0-alpha.1
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/Builder.js +87 -127
- package/dist/esm/Designer.js +103 -158
- package/dist/esm/Driven.js +445 -604
- package/dist/esm/Plugin.js +2 -2
- package/dist/esm/Store.js +110 -167
- package/dist/esm/utils.js +21 -21
- package/dist/index.umd.js +3 -3
- package/dist/types/Builder.d.ts +8 -8
- package/dist/types/Designer.d.ts +36 -36
- package/dist/types/Driven.d.ts +112 -112
- package/dist/types/EventLogic.d.ts +2 -2
- package/dist/types/Plugin.d.ts +6 -6
- package/dist/types/Store.d.ts +82 -82
- package/dist/types/constants.d.ts +6 -6
- package/dist/types/designerUtils.d.ts +4 -4
- package/dist/types/index.d.ts +8 -8
- package/dist/types/utils.d.ts +55 -55
- package/package.json +6 -6
package/dist/esm/Builder.js
CHANGED
|
@@ -1,139 +1,99 @@
|
|
|
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
|
}
|
|
5
5
|
}
|
|
6
|
-
function _defineProperties(target, props) {
|
|
7
|
-
for(var i = 0; i < props.length; i++){
|
|
8
|
-
var descriptor = props[i];
|
|
9
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
10
|
-
descriptor.configurable = true;
|
|
11
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
12
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
16
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
17
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
18
|
-
return Constructor;
|
|
19
|
-
}
|
|
20
|
-
function _define_property(obj, key, value) {
|
|
21
|
-
if (key in obj) {
|
|
22
|
-
Object.defineProperty(obj, key, {
|
|
23
|
-
value: value,
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true
|
|
27
|
-
});
|
|
28
|
-
} else {
|
|
29
|
-
obj[key] = value;
|
|
30
|
-
}
|
|
31
|
-
return obj;
|
|
32
|
-
}
|
|
33
6
|
import Designer from "./Designer";
|
|
34
7
|
import { CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
|
|
35
8
|
export var Builder = /*#__PURE__*/ function() {
|
|
36
9
|
"use strict";
|
|
37
10
|
function Builder() {
|
|
38
|
-
|
|
39
|
-
|
|
11
|
+
_classCallCheck(this, Builder);
|
|
12
|
+
this.designer = new Designer();
|
|
40
13
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
CONTROL_TYPE.GRID);
|
|
126
|
-
var vueFormItem = this.designer.createControlInstance(// @ts-ignore
|
|
127
|
-
CONTROL_TYPE.VUE_FORM_ITEM);
|
|
128
|
-
// @ts-ignore
|
|
129
|
-
vueFormItem.props.isHideCaption = true;
|
|
130
|
-
// @ts-ignore
|
|
131
|
-
vueFormItem.props.controlExportName = "VuePage";
|
|
132
|
-
// @ts-ignore
|
|
133
|
-
grid.children.push(vueFormItem);
|
|
134
|
-
return grid;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
]);
|
|
14
|
+
var _proto = Builder.prototype;
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
_proto.ListPageBuilder = function ListPageBuilder() {
|
|
17
|
+
var listview = this.designer.createControlInstance(// @ts-ignore
|
|
18
|
+
CONTROL_TYPE.LIST_VIEW);
|
|
19
|
+
var simpleSearch = this.designer.createControlInstance(// @ts-ignore
|
|
20
|
+
CONTROL_TYPE.SIMPLE_SEARCH);
|
|
21
|
+
var gridTable = this.designer.createControlInstance(// @ts-ignore
|
|
22
|
+
CONTROL_TYPE.GRID_TABLE);
|
|
23
|
+
var createBtn = this.designer.createControlInstance(// @ts-ignore
|
|
24
|
+
CONTROL_TYPE.CREATE_FORM_LIST_BUTTON);
|
|
25
|
+
var importBtn = this.designer.createControlInstance(// @ts-ignore
|
|
26
|
+
CONTROL_TYPE.IMPORT_RECORD_LIST_BUTTON);
|
|
27
|
+
var exportBtn = this.designer.createControlInstance(// @ts-ignore
|
|
28
|
+
CONTROL_TYPE.EXPORT_LIST_BUTTON);
|
|
29
|
+
var exportRecordBtn = this.designer.createControlInstance(// @ts-ignore
|
|
30
|
+
CONTROL_TYPE.EXPORT_RECORD_LIST_BUTTON);
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
gridTable.children.push(createBtn);
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
gridTable.children.push(importBtn);
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
gridTable.children.push(exportBtn);
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
gridTable.children.push(exportRecordBtn);
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
listview.children.push(simpleSearch);
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
listview.children.push(gridTable);
|
|
43
|
+
return listview;
|
|
44
|
+
};
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
_proto.ProListPageBuilder = function ProListPageBuilder() {
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
var listview = this.designer.createControlInstance(// @ts-ignore
|
|
49
|
+
CONTROL_TYPE.LIST_VIEW);
|
|
50
|
+
listview.props.countType = "async";
|
|
51
|
+
var simpleSearch = this.designer.createControlInstance(// @ts-ignore
|
|
52
|
+
CONTROL_TYPE.SIMPLE_SEARCH);
|
|
53
|
+
var gridTable = this.designer.createControlInstance(// @ts-ignore
|
|
54
|
+
CONTROL_TYPE.GRID_TABLE);
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
var exportBtn = this.designer.createControlInstance(// @ts-ignore
|
|
57
|
+
CONTROL_TYPE.EXPORT_LIST_BUTTON);
|
|
58
|
+
var exportRecordBtn = this.designer.createControlInstance(// @ts-ignore
|
|
59
|
+
CONTROL_TYPE.EXPORT_RECORD_LIST_BUTTON);
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
gridTable.children.push(exportBtn);
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
gridTable.children.push(exportRecordBtn);
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
listview.children.push(simpleSearch);
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
listview.children.push(gridTable);
|
|
68
|
+
return listview;
|
|
69
|
+
};
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
_proto.FormPageBuilder = function FormPageBuilder() {
|
|
72
|
+
var dataView = this.designer.createControlInstance(// @ts-ignore
|
|
73
|
+
CONTROL_TYPE.DATA_VIEW);
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
var title = this.designer.createControlInstance(CONTROL_TYPE.TITLE);
|
|
76
|
+
// @ts-ignore
|
|
77
|
+
var grid = this.designer.createControlInstance(CONTROL_TYPE.GRID);
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
dataView.children.push(title);
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
dataView.children.push(grid);
|
|
82
|
+
return dataView;
|
|
83
|
+
};
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
_proto.VuePageBuilder = function VuePageBuilder() {
|
|
86
|
+
var grid = this.designer.createControlInstance(// @ts-ignore
|
|
87
|
+
CONTROL_TYPE.GRID);
|
|
88
|
+
var vueFormItem = this.designer.createControlInstance(// @ts-ignore
|
|
89
|
+
CONTROL_TYPE.VUE_FORM_ITEM);
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
vueFormItem.props.isHideCaption = true;
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
vueFormItem.props.controlExportName = "VuePage";
|
|
94
|
+
// @ts-ignore
|
|
95
|
+
grid.children.push(vueFormItem);
|
|
96
|
+
return grid;
|
|
97
|
+
};
|
|
138
98
|
return Builder;
|
|
139
99
|
}();
|
package/dist/esm/Designer.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
|
7
|
-
if (Array.isArray(arr)) return
|
|
6
|
+
function _arrayWithoutHoles(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function _assertThisInitialized(self) {
|
|
10
10
|
if (self === void 0) {
|
|
11
11
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
12
12
|
}
|
|
@@ -26,7 +26,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
26
26
|
Promise.resolve(value).then(_next, _throw);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function _asyncToGenerator(fn) {
|
|
30
30
|
return function() {
|
|
31
31
|
var self = this, args = arguments;
|
|
32
32
|
return new Promise(function(resolve, reject) {
|
|
@@ -41,43 +41,16 @@ function _async_to_generator(fn) {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function _classCallCheck(instance, Constructor) {
|
|
45
45
|
if (!(instance instanceof Constructor)) {
|
|
46
46
|
throw new TypeError("Cannot call a class as a function");
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
var descriptor = props[i];
|
|
52
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
53
|
-
descriptor.configurable = true;
|
|
54
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
55
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
59
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
60
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
61
|
-
return Constructor;
|
|
62
|
-
}
|
|
63
|
-
function _define_property(obj, key, value) {
|
|
64
|
-
if (key in obj) {
|
|
65
|
-
Object.defineProperty(obj, key, {
|
|
66
|
-
value: value,
|
|
67
|
-
enumerable: true,
|
|
68
|
-
configurable: true,
|
|
69
|
-
writable: true
|
|
70
|
-
});
|
|
71
|
-
} else {
|
|
72
|
-
obj[key] = value;
|
|
73
|
-
}
|
|
74
|
-
return obj;
|
|
75
|
-
}
|
|
76
|
-
function _get_prototype_of(o) {
|
|
77
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
49
|
+
function _getPrototypeOf(o) {
|
|
50
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
78
51
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
79
52
|
};
|
|
80
|
-
return
|
|
53
|
+
return _getPrototypeOf(o);
|
|
81
54
|
}
|
|
82
55
|
function _inherits(subClass, superClass) {
|
|
83
56
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -90,7 +63,7 @@ function _inherits(subClass, superClass) {
|
|
|
90
63
|
configurable: true
|
|
91
64
|
}
|
|
92
65
|
});
|
|
93
|
-
if (superClass)
|
|
66
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
94
67
|
}
|
|
95
68
|
function _instanceof(left, right) {
|
|
96
69
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -99,41 +72,41 @@ function _instanceof(left, right) {
|
|
|
99
72
|
return left instanceof right;
|
|
100
73
|
}
|
|
101
74
|
}
|
|
102
|
-
function
|
|
75
|
+
function _iterableToArray(iter) {
|
|
103
76
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
104
77
|
}
|
|
105
|
-
function
|
|
78
|
+
function _nonIterableSpread() {
|
|
106
79
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
107
80
|
}
|
|
108
|
-
function
|
|
109
|
-
if (call && (
|
|
81
|
+
function _possibleConstructorReturn(self, call) {
|
|
82
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
110
83
|
return call;
|
|
111
84
|
}
|
|
112
|
-
return
|
|
85
|
+
return _assertThisInitialized(self);
|
|
113
86
|
}
|
|
114
|
-
function
|
|
115
|
-
|
|
87
|
+
function _setPrototypeOf(o, p) {
|
|
88
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
116
89
|
o.__proto__ = p;
|
|
117
90
|
return o;
|
|
118
91
|
};
|
|
119
|
-
return
|
|
92
|
+
return _setPrototypeOf(o, p);
|
|
120
93
|
}
|
|
121
|
-
function
|
|
122
|
-
return
|
|
94
|
+
function _toConsumableArray(arr) {
|
|
95
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
123
96
|
}
|
|
124
|
-
function
|
|
97
|
+
var _typeof = function(obj) {
|
|
125
98
|
"@swc/helpers - typeof";
|
|
126
99
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
127
|
-
}
|
|
128
|
-
function
|
|
100
|
+
};
|
|
101
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
129
102
|
if (!o) return;
|
|
130
|
-
if (typeof o === "string") return
|
|
103
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
131
104
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
132
105
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
133
106
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
134
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
107
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
135
108
|
}
|
|
136
|
-
function
|
|
109
|
+
function _isNativeReflectConstruct() {
|
|
137
110
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
138
111
|
if (Reflect.construct.sham) return false;
|
|
139
112
|
if (typeof Proxy === "function") return true;
|
|
@@ -144,17 +117,17 @@ function _is_native_reflect_construct() {
|
|
|
144
117
|
return false;
|
|
145
118
|
}
|
|
146
119
|
}
|
|
147
|
-
function
|
|
148
|
-
var hasNativeReflectConstruct =
|
|
120
|
+
function _createSuper(Derived) {
|
|
121
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
149
122
|
return function _createSuperInternal() {
|
|
150
|
-
var Super =
|
|
123
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
151
124
|
if (hasNativeReflectConstruct) {
|
|
152
|
-
var NewTarget =
|
|
125
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
153
126
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
154
127
|
} else {
|
|
155
128
|
result = Super.apply(this, arguments);
|
|
156
129
|
}
|
|
157
|
-
return
|
|
130
|
+
return _possibleConstructorReturn(this, result);
|
|
158
131
|
};
|
|
159
132
|
}
|
|
160
133
|
var __generator = this && this.__generator || function(thisArg, body) {
|
|
@@ -259,120 +232,92 @@ import { toSchema, getModelBindInfoList, checkSchema } from "./utils";
|
|
|
259
232
|
var Designer = /*#__PURE__*/ function _target(RegisterControls) {
|
|
260
233
|
"use strict";
|
|
261
234
|
_inherits(Designer, RegisterControls);
|
|
262
|
-
var _super =
|
|
235
|
+
var _super = _createSuper(Designer);
|
|
263
236
|
function Designer() {
|
|
264
|
-
|
|
237
|
+
_classCallCheck(this, Designer);
|
|
265
238
|
var _this;
|
|
266
239
|
_this = _super.call(this, "Designer");
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
240
|
+
_this.toolbox = [];
|
|
241
|
+
_this.services = {};
|
|
242
|
+
_this.eventLogic = new EventLogic();
|
|
243
|
+
_this.fieldTypes = FieldTypes;
|
|
244
|
+
_this.controlSettingMap = new Map();
|
|
272
245
|
(_instanceof(this, Designer) ? this.constructor : void 0).staticControls.forEach(function(control) {
|
|
273
246
|
var _$Designer = control.Designer, Setting = control.Setting;
|
|
274
247
|
_this.controlSettingMap.set(_$Designer.controlType, Setting);
|
|
275
248
|
});
|
|
276
249
|
return _this;
|
|
277
250
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
return
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
key: "setInstance",
|
|
301
|
-
value: function setInstance(instance, props, value) {
|
|
302
|
-
try {
|
|
303
|
-
if (!instance) {
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
// @ts-ignore
|
|
307
|
-
instance.updateProps(props, value);
|
|
308
|
-
} catch (e) {
|
|
309
|
-
throw e;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
key: "eachControls",
|
|
315
|
-
value: function eachControls(callback) {
|
|
316
|
-
this.getControls().forEach(callback);
|
|
251
|
+
var _proto = Designer.prototype;
|
|
252
|
+
_proto.registerControl = function registerControl(control) {
|
|
253
|
+
this.constructor.register(control);
|
|
254
|
+
var DesignerClass = control.Designer, Setting = control.Setting;
|
|
255
|
+
this.register(DesignerClass);
|
|
256
|
+
this.registeredControlTypes.add(DesignerClass.controlType);
|
|
257
|
+
this.controlSettingMap.set(DesignerClass.controlType, Setting);
|
|
258
|
+
};
|
|
259
|
+
_proto.getControlSetting = function getControlSetting(type) {
|
|
260
|
+
var setting = this.controlSettingMap.get(type);
|
|
261
|
+
if (!setting) {
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
return setting;
|
|
265
|
+
};
|
|
266
|
+
_proto.setInstance = function setInstance(instance, props, value) {
|
|
267
|
+
try {
|
|
268
|
+
if (!instance) {
|
|
269
|
+
return;
|
|
317
270
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
271
|
+
// @ts-ignore
|
|
272
|
+
instance.updateProps(props, value);
|
|
273
|
+
} catch (e) {
|
|
274
|
+
throw e;
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
_proto.eachControls = function eachControls(callback) {
|
|
278
|
+
this.getControls().forEach(callback);
|
|
279
|
+
};
|
|
280
|
+
// 获取初始化的数据模型
|
|
281
|
+
_proto.getInitControl = function getInitControl() {
|
|
282
|
+
// @ts-ignore
|
|
283
|
+
return [
|
|
284
|
+
this.createControlInstance("grid")
|
|
285
|
+
];
|
|
286
|
+
};
|
|
287
|
+
_proto.checkSchema = function checkSchema1() {
|
|
288
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
289
|
+
args[_key] = arguments[_key];
|
|
290
|
+
}
|
|
291
|
+
return _asyncToGenerator(function() {
|
|
292
|
+
return __generator(this, function(_state) {
|
|
324
293
|
return [
|
|
325
|
-
|
|
294
|
+
2,
|
|
295
|
+
checkSchema.apply(void 0, _toConsumableArray(args))
|
|
326
296
|
];
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
args[_key] = arguments[_key];
|
|
334
|
-
}
|
|
335
|
-
return _async_to_generator(function() {
|
|
336
|
-
return __generator(this, function(_state) {
|
|
337
|
-
return [
|
|
338
|
-
2,
|
|
339
|
-
checkSchema.apply(void 0, _to_consumable_array(args))
|
|
340
|
-
];
|
|
341
|
-
});
|
|
342
|
-
})();
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
key: "getModelBindInfoList",
|
|
347
|
-
value: function getModelBindInfoList1() {
|
|
348
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
349
|
-
args[_key] = arguments[_key];
|
|
350
|
-
}
|
|
351
|
-
return getModelBindInfoList.apply(void 0, _to_consumable_array(args));
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
key: "getSchema",
|
|
356
|
-
value: function getSchema() {
|
|
357
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
358
|
-
args[_key] = arguments[_key];
|
|
359
|
-
}
|
|
360
|
-
return toSchema.apply(void 0, _to_consumable_array(args));
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
key: "listenControlHook",
|
|
365
|
-
value: function listenControlHook() {
|
|
366
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
367
|
-
args[_key] = arguments[_key];
|
|
368
|
-
}
|
|
369
|
-
var _controlHooksEmitter;
|
|
370
|
-
return (_controlHooksEmitter = controlHooksEmitter).on.apply(_controlHooksEmitter, _to_consumable_array(args));
|
|
371
|
-
}
|
|
297
|
+
});
|
|
298
|
+
})();
|
|
299
|
+
};
|
|
300
|
+
_proto.getModelBindInfoList = function getModelBindInfoList1() {
|
|
301
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
302
|
+
args[_key] = arguments[_key];
|
|
372
303
|
}
|
|
373
|
-
|
|
304
|
+
return getModelBindInfoList.apply(void 0, _toConsumableArray(args));
|
|
305
|
+
};
|
|
306
|
+
_proto.getSchema = function getSchema() {
|
|
307
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
308
|
+
args[_key] = arguments[_key];
|
|
309
|
+
}
|
|
310
|
+
return toSchema.apply(void 0, _toConsumableArray(args));
|
|
311
|
+
};
|
|
312
|
+
_proto.listenControlHook = function listenControlHook() {
|
|
313
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
314
|
+
args[_key] = arguments[_key];
|
|
315
|
+
}
|
|
316
|
+
var _controlHooksEmitter;
|
|
317
|
+
return (_controlHooksEmitter = controlHooksEmitter).on.apply(_controlHooksEmitter, _toConsumableArray(args));
|
|
318
|
+
};
|
|
374
319
|
return Designer;
|
|
375
320
|
}(RegisterControls);
|
|
376
|
-
|
|
321
|
+
Designer.EventLogic = EventLogic;
|
|
377
322
|
export { Designer as default };
|
|
378
323
|
export { Designer };
|