@byteluck-fe/model-driven-core 2.4.1-beta.0 → 2.4.1-beta.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/api-doc-index.js +4 -4
- package/dist/esm/common/BaseControl/designer.js +121 -240
- package/dist/esm/common/BaseControl/index.js +7 -7
- package/dist/esm/common/BaseControl/property.js +60 -77
- package/dist/esm/common/BaseControl/runtime.js +24 -45
- package/dist/esm/common/ColumnControl/designer.js +27 -41
- package/dist/esm/common/ColumnControl/index.js +6 -6
- package/dist/esm/common/ColumnControl/property.js +74 -122
- package/dist/esm/common/ColumnControl/runtime.js +27 -41
- package/dist/esm/common/ControlArray.js +20 -20
- package/dist/esm/common/FormControl/designer.js +32 -47
- package/dist/esm/common/FormControl/index.js +6 -6
- package/dist/esm/common/FormControl/property.js +116 -181
- package/dist/esm/common/FormControl/runtime.js +27 -42
- package/dist/esm/common/LayoutControl/designer.js +77 -205
- package/dist/esm/common/LayoutControl/index.js +6 -6
- package/dist/esm/common/LayoutControl/property.js +25 -25
- package/dist/esm/common/LayoutControl/runtime.js +29 -44
- package/dist/esm/common/ListControl/designer.js +74 -199
- package/dist/esm/common/ListControl/index.js +6 -6
- package/dist/esm/common/ListControl/property.js +27 -41
- package/dist/esm/common/ListControl/runtime.js +32 -47
- package/dist/esm/common/SearchViewControl/designer.js +27 -41
- package/dist/esm/common/SearchViewControl/index.js +6 -6
- package/dist/esm/common/SearchViewControl/property.js +26 -40
- package/dist/esm/common/SearchViewControl/runtime.js +27 -41
- package/dist/esm/common/Validator.js +5 -5
- package/dist/esm/common/WrapControl/designer.js +27 -41
- package/dist/esm/common/WrapControl/index.js +6 -6
- package/dist/esm/common/WrapControl/property.js +25 -25
- package/dist/esm/common/WrapControl/runtime.js +27 -41
- package/dist/esm/common/controlHooksEmitter.js +1 -1
- package/dist/esm/common/index.js +11 -11
- package/dist/esm/common/initOptionAndDataSourceRules.js +82 -82
- package/dist/esm/framework/RegisterControls.js +19 -31
- package/dist/esm/framework/index.js +360 -735
- package/dist/esm/index.js +3 -3
- package/dist/index.umd.js +1 -1
- package/dist/types/common/Validator.d.ts +1 -1
- package/dist/types/common/controlHooksEmitter.d.ts +1 -1
- package/dist/types/framework/index.d.ts +1 -1
- package/dist/types/type.d.ts +23 -23
- package/package.json +2 -2
|
@@ -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,7 +41,7 @@ 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
|
}
|
|
@@ -55,12 +55,12 @@ function _defineProperties(target, props) {
|
|
|
55
55
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
59
59
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
60
60
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
61
61
|
return Constructor;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function _defineProperty(obj, key, value) {
|
|
64
64
|
if (key in obj) {
|
|
65
65
|
Object.defineProperty(obj, key, {
|
|
66
66
|
value: value,
|
|
@@ -77,23 +77,23 @@ function _get(target, property, receiver) {
|
|
|
77
77
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
78
78
|
_get = Reflect.get;
|
|
79
79
|
} else {
|
|
80
|
-
_get = function
|
|
81
|
-
var base =
|
|
80
|
+
_get = function _get(target, property, receiver) {
|
|
81
|
+
var base = _superPropBase(target, property);
|
|
82
82
|
if (!base) return;
|
|
83
83
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
84
84
|
if (desc.get) {
|
|
85
|
-
return desc.get.call(receiver
|
|
85
|
+
return desc.get.call(receiver);
|
|
86
86
|
}
|
|
87
87
|
return desc.value;
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
return _get(target, property, receiver || target);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
92
|
+
function _getPrototypeOf(o) {
|
|
93
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
94
94
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
95
95
|
};
|
|
96
|
-
return
|
|
96
|
+
return _getPrototypeOf(o);
|
|
97
97
|
}
|
|
98
98
|
function _inherits(subClass, superClass) {
|
|
99
99
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -106,22 +106,22 @@ function _inherits(subClass, superClass) {
|
|
|
106
106
|
configurable: true
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
|
-
if (superClass)
|
|
109
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
110
110
|
}
|
|
111
111
|
function _instanceof(left, right) {
|
|
112
112
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
113
|
-
return
|
|
113
|
+
return right[Symbol.hasInstance](left);
|
|
114
114
|
} else {
|
|
115
115
|
return left instanceof right;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function _iterableToArray(iter) {
|
|
119
119
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function _nonIterableSpread() {
|
|
122
122
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function _objectSpread(target) {
|
|
125
125
|
for(var i = 1; i < arguments.length; i++){
|
|
126
126
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
127
127
|
var ownKeys = Object.keys(source);
|
|
@@ -131,71 +131,47 @@ function _object_spread(target) {
|
|
|
131
131
|
}));
|
|
132
132
|
}
|
|
133
133
|
ownKeys.forEach(function(key) {
|
|
134
|
-
|
|
134
|
+
_defineProperty(target, key, source[key]);
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
return target;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
|
|
141
|
-
if (Object.getOwnPropertySymbols) {
|
|
142
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
143
|
-
if (enumerableOnly) {
|
|
144
|
-
symbols = symbols.filter(function(sym) {
|
|
145
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
keys.push.apply(keys, symbols);
|
|
149
|
-
}
|
|
150
|
-
return keys;
|
|
151
|
-
}
|
|
152
|
-
function _object_spread_props(target, source) {
|
|
153
|
-
source = source != null ? source : {};
|
|
154
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
155
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
156
|
-
} else {
|
|
157
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
158
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
return target;
|
|
162
|
-
}
|
|
163
|
-
function _possible_constructor_return(self, call) {
|
|
164
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
139
|
+
function _possibleConstructorReturn(self, call) {
|
|
140
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
165
141
|
return call;
|
|
166
142
|
}
|
|
167
|
-
return
|
|
143
|
+
return _assertThisInitialized(self);
|
|
168
144
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
145
|
+
function _setPrototypeOf(o, p) {
|
|
146
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
171
147
|
o.__proto__ = p;
|
|
172
148
|
return o;
|
|
173
149
|
};
|
|
174
|
-
return
|
|
150
|
+
return _setPrototypeOf(o, p);
|
|
175
151
|
}
|
|
176
|
-
function
|
|
152
|
+
function _superPropBase(object, property) {
|
|
177
153
|
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
178
|
-
object =
|
|
154
|
+
object = _getPrototypeOf(object);
|
|
179
155
|
if (object === null) break;
|
|
180
156
|
}
|
|
181
157
|
return object;
|
|
182
158
|
}
|
|
183
|
-
function
|
|
184
|
-
return
|
|
159
|
+
function _toConsumableArray(arr) {
|
|
160
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
185
161
|
}
|
|
186
|
-
function
|
|
162
|
+
var _typeof = function(obj) {
|
|
187
163
|
"@swc/helpers - typeof";
|
|
188
164
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
189
|
-
}
|
|
190
|
-
function
|
|
165
|
+
};
|
|
166
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
191
167
|
if (!o) return;
|
|
192
|
-
if (typeof o === "string") return
|
|
168
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
193
169
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
194
170
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
195
171
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
196
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
172
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
197
173
|
}
|
|
198
|
-
function
|
|
174
|
+
function _isNativeReflectConstruct() {
|
|
199
175
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
200
176
|
if (Reflect.construct.sham) return false;
|
|
201
177
|
if (typeof Proxy === "function") return true;
|
|
@@ -206,141 +182,43 @@ function _is_native_reflect_construct() {
|
|
|
206
182
|
return false;
|
|
207
183
|
}
|
|
208
184
|
}
|
|
209
|
-
function
|
|
210
|
-
var hasNativeReflectConstruct =
|
|
185
|
+
function _createSuper(Derived) {
|
|
186
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
211
187
|
return function _createSuperInternal() {
|
|
212
|
-
var Super =
|
|
188
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
213
189
|
if (hasNativeReflectConstruct) {
|
|
214
|
-
var NewTarget =
|
|
190
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
215
191
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
216
192
|
} else {
|
|
217
193
|
result = Super.apply(this, arguments);
|
|
218
194
|
}
|
|
219
|
-
return
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
function _ts_generator(thisArg, body) {
|
|
223
|
-
var f, y, t, g, _ = {
|
|
224
|
-
label: 0,
|
|
225
|
-
sent: function() {
|
|
226
|
-
if (t[0] & 1) throw t[1];
|
|
227
|
-
return t[1];
|
|
228
|
-
},
|
|
229
|
-
trys: [],
|
|
230
|
-
ops: []
|
|
195
|
+
return _possibleConstructorReturn(this, result);
|
|
231
196
|
};
|
|
232
|
-
return g = {
|
|
233
|
-
next: verb(0),
|
|
234
|
-
"throw": verb(1),
|
|
235
|
-
"return": verb(2)
|
|
236
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
237
|
-
return this;
|
|
238
|
-
}), g;
|
|
239
|
-
function verb(n) {
|
|
240
|
-
return function(v) {
|
|
241
|
-
return step([
|
|
242
|
-
n,
|
|
243
|
-
v
|
|
244
|
-
]);
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
function step(op) {
|
|
248
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
249
|
-
while(_)try {
|
|
250
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
251
|
-
if (y = 0, t) op = [
|
|
252
|
-
op[0] & 2,
|
|
253
|
-
t.value
|
|
254
|
-
];
|
|
255
|
-
switch(op[0]){
|
|
256
|
-
case 0:
|
|
257
|
-
case 1:
|
|
258
|
-
t = op;
|
|
259
|
-
break;
|
|
260
|
-
case 4:
|
|
261
|
-
_.label++;
|
|
262
|
-
return {
|
|
263
|
-
value: op[1],
|
|
264
|
-
done: false
|
|
265
|
-
};
|
|
266
|
-
case 5:
|
|
267
|
-
_.label++;
|
|
268
|
-
y = op[1];
|
|
269
|
-
op = [
|
|
270
|
-
0
|
|
271
|
-
];
|
|
272
|
-
continue;
|
|
273
|
-
case 7:
|
|
274
|
-
op = _.ops.pop();
|
|
275
|
-
_.trys.pop();
|
|
276
|
-
continue;
|
|
277
|
-
default:
|
|
278
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
279
|
-
_ = 0;
|
|
280
|
-
continue;
|
|
281
|
-
}
|
|
282
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
283
|
-
_.label = op[1];
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
287
|
-
_.label = t[1];
|
|
288
|
-
t = op;
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
291
|
-
if (t && _.label < t[2]) {
|
|
292
|
-
_.label = t[2];
|
|
293
|
-
_.ops.push(op);
|
|
294
|
-
break;
|
|
295
|
-
}
|
|
296
|
-
if (t[2]) _.ops.pop();
|
|
297
|
-
_.trys.pop();
|
|
298
|
-
continue;
|
|
299
|
-
}
|
|
300
|
-
op = body.call(thisArg, _);
|
|
301
|
-
} catch (e) {
|
|
302
|
-
op = [
|
|
303
|
-
6,
|
|
304
|
-
e
|
|
305
|
-
];
|
|
306
|
-
y = 0;
|
|
307
|
-
} finally{
|
|
308
|
-
f = t = 0;
|
|
309
|
-
}
|
|
310
|
-
if (op[0] & 5) throw op[1];
|
|
311
|
-
return {
|
|
312
|
-
value: op[0] ? op[1] : void 0,
|
|
313
|
-
done: true
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
197
|
}
|
|
317
|
-
import
|
|
318
|
-
import {
|
|
319
|
-
import
|
|
320
|
-
import
|
|
198
|
+
import regeneratorRuntime from "regenerator-runtime";
|
|
199
|
+
import { JSONCopy } from '@byteluck-fe/model-driven-shared';
|
|
200
|
+
import { DesignerControl } from '../BaseControl';
|
|
201
|
+
import LayoutControlProperty from './property';
|
|
202
|
+
import { defineControlArrayToProperty } from '../ControlArray';
|
|
321
203
|
// 最大可拖入数量
|
|
322
204
|
var CHILDREN_MAX_LENGTH = 10000;
|
|
323
|
-
var LayoutControl = /*#__PURE__*/ function _target(
|
|
205
|
+
var LayoutControl = /*#__PURE__*/ function _target(DesignerControl1) {
|
|
324
206
|
"use strict";
|
|
325
|
-
_inherits(LayoutControl,
|
|
326
|
-
var _super =
|
|
207
|
+
_inherits(LayoutControl, DesignerControl1);
|
|
208
|
+
var _super = _createSuper(LayoutControl);
|
|
327
209
|
function LayoutControl(props) {
|
|
328
|
-
|
|
210
|
+
_classCallCheck(this, LayoutControl);
|
|
329
211
|
var _this;
|
|
330
212
|
_this = _super.call(this, props);
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
_define_property(_assert_this_initialized(_this), "excludes", void 0);
|
|
334
|
-
_define_property(_assert_this_initialized(_this), "childrenMaxLength", void 0);
|
|
335
|
-
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
336
|
-
var _ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = _ref.excludes, childrenMaxLength = _ref.childrenMaxLength;
|
|
213
|
+
_this.controlType = 'layout';
|
|
214
|
+
var ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = ref.excludes, childrenMaxLength = ref.childrenMaxLength;
|
|
337
215
|
_this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
338
|
-
defineControlArrayToProperty(
|
|
216
|
+
defineControlArrayToProperty(_assertThisInitialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children);
|
|
339
217
|
_this.excludes = JSONCopy(excludes);
|
|
340
218
|
_this.childrenMaxLength = childrenMaxLength;
|
|
341
219
|
return _this;
|
|
342
220
|
}
|
|
343
|
-
|
|
221
|
+
_createClass(LayoutControl, [
|
|
344
222
|
{
|
|
345
223
|
key: "judgeExcludesChildren",
|
|
346
224
|
value: function judgeExcludesChildren(type) {
|
|
@@ -362,40 +240,34 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
362
240
|
value: function validate(messages, ignore) {
|
|
363
241
|
var _this = this;
|
|
364
242
|
var _this1 = this, _superprop_get_validate = function() {
|
|
365
|
-
return _get(
|
|
243
|
+
return _get(_getPrototypeOf(LayoutControl.prototype), "validate", _this);
|
|
366
244
|
};
|
|
367
|
-
return
|
|
368
|
-
return
|
|
369
|
-
switch(
|
|
245
|
+
return _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
|
|
246
|
+
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
|
247
|
+
while(1)switch(_ctx.prev = _ctx.next){
|
|
370
248
|
case 0:
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
_superprop_get_validate().call(_this1, messages, ignore)
|
|
374
|
-
];
|
|
375
|
-
case 1:
|
|
376
|
-
_state.sent();
|
|
377
|
-
return [
|
|
378
|
-
4,
|
|
379
|
-
Promise.all(_this1.children.map(function(child) {
|
|
380
|
-
return child.validate(messages, ignore);
|
|
381
|
-
}))
|
|
382
|
-
];
|
|
249
|
+
_ctx.next = 2;
|
|
250
|
+
return _superprop_get_validate().call(_this1, messages, ignore);
|
|
383
251
|
case 2:
|
|
384
|
-
|
|
385
|
-
return
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
252
|
+
_ctx.next = 4;
|
|
253
|
+
return Promise.all(_this1.children.map(function(child) {
|
|
254
|
+
return child.validate(messages, ignore);
|
|
255
|
+
}));
|
|
256
|
+
case 4:
|
|
257
|
+
return _ctx.abrupt("return", true);
|
|
258
|
+
case 5:
|
|
259
|
+
case "end":
|
|
260
|
+
return _ctx.stop();
|
|
389
261
|
}
|
|
390
|
-
});
|
|
391
|
-
})();
|
|
262
|
+
}, _callee);
|
|
263
|
+
}))();
|
|
392
264
|
}
|
|
393
265
|
},
|
|
394
266
|
{
|
|
395
267
|
key: "toDataBindModel",
|
|
396
268
|
value: function toDataBindModel() {
|
|
397
269
|
var parentId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
398
|
-
var dataBindModel = _get(
|
|
270
|
+
var dataBindModel = _get(_getPrototypeOf(LayoutControl.prototype), "toDataBindModel", this).call(this);
|
|
399
271
|
var result = dataBindModel ? [
|
|
400
272
|
dataBindModel
|
|
401
273
|
] : [];
|
|
@@ -405,7 +277,7 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
405
277
|
var filteredModel = model.filter(function(item) {
|
|
406
278
|
return !!item;
|
|
407
279
|
});
|
|
408
|
-
return
|
|
280
|
+
return _toConsumableArray(arr).concat(_toConsumableArray(filteredModel));
|
|
409
281
|
}
|
|
410
282
|
model && arr.push(model);
|
|
411
283
|
return arr;
|
|
@@ -415,12 +287,12 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
415
287
|
{
|
|
416
288
|
key: "toSchema",
|
|
417
289
|
value: function toSchema() {
|
|
418
|
-
var superSchema = _get(
|
|
290
|
+
var superSchema = _get(_getPrototypeOf(LayoutControl.prototype), "toSchema", this).call(this);
|
|
419
291
|
var children = this.children.map(function(item) {
|
|
420
292
|
var schema = item.toSchema();
|
|
421
293
|
return schema;
|
|
422
294
|
});
|
|
423
|
-
return
|
|
295
|
+
return _objectSpread({}, superSchema, {
|
|
424
296
|
children: children
|
|
425
297
|
});
|
|
426
298
|
}
|
|
@@ -428,7 +300,7 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
428
300
|
]);
|
|
429
301
|
return LayoutControl;
|
|
430
302
|
}(DesignerControl);
|
|
431
|
-
|
|
432
|
-
|
|
303
|
+
LayoutControl.excludes = false;
|
|
304
|
+
LayoutControl.childrenMaxLength = CHILDREN_MAX_LENGTH;
|
|
433
305
|
export default LayoutControl;
|
|
434
306
|
export { LayoutControl as DesignerLayoutControl };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Designer from
|
|
2
|
-
import Runtime from
|
|
3
|
-
import Property from
|
|
1
|
+
import Designer from './designer';
|
|
2
|
+
import Runtime from './runtime';
|
|
3
|
+
import Property from './property';
|
|
4
4
|
export default {
|
|
5
5
|
Designer: Designer,
|
|
6
6
|
Runtime: Runtime,
|
|
7
7
|
Property: Property
|
|
8
8
|
};
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
9
|
+
export * from './designer';
|
|
10
|
+
export * from './runtime';
|
|
11
|
+
export * from './property';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assertThisInitialized(self) {
|
|
2
2
|
if (self === void 0) {
|
|
3
3
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function _classCallCheck(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
9
9
|
throw new TypeError("Cannot call a class as a function");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function _getPrototypeOf(o) {
|
|
13
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
14
14
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
15
15
|
};
|
|
16
|
-
return
|
|
16
|
+
return _getPrototypeOf(o);
|
|
17
17
|
}
|
|
18
18
|
function _inherits(subClass, superClass) {
|
|
19
19
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -26,26 +26,26 @@ function _inherits(subClass, superClass) {
|
|
|
26
26
|
configurable: true
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
if (superClass)
|
|
29
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
if (call && (
|
|
31
|
+
function _possibleConstructorReturn(self, call) {
|
|
32
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
33
33
|
return call;
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return _assertThisInitialized(self);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
function _setPrototypeOf(o, p) {
|
|
38
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
39
39
|
o.__proto__ = p;
|
|
40
40
|
return o;
|
|
41
41
|
};
|
|
42
|
-
return
|
|
42
|
+
return _setPrototypeOf(o, p);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
var _typeof = function(obj) {
|
|
45
45
|
"@swc/helpers - typeof";
|
|
46
46
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
47
|
-
}
|
|
48
|
-
function
|
|
47
|
+
};
|
|
48
|
+
function _isNativeReflectConstruct() {
|
|
49
49
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
50
50
|
if (Reflect.construct.sham) return false;
|
|
51
51
|
if (typeof Proxy === "function") return true;
|
|
@@ -56,26 +56,26 @@ function _is_native_reflect_construct() {
|
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
var hasNativeReflectConstruct =
|
|
59
|
+
function _createSuper(Derived) {
|
|
60
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
61
61
|
return function _createSuperInternal() {
|
|
62
|
-
var Super =
|
|
62
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
63
63
|
if (hasNativeReflectConstruct) {
|
|
64
|
-
var NewTarget =
|
|
64
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
65
65
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
66
66
|
} else {
|
|
67
67
|
result = Super.apply(this, arguments);
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import { Property } from
|
|
73
|
-
var LayoutControlProperty = /*#__PURE__*/ function(
|
|
72
|
+
import { Property } from '../BaseControl';
|
|
73
|
+
var LayoutControlProperty = /*#__PURE__*/ function(Property1) {
|
|
74
74
|
"use strict";
|
|
75
|
-
_inherits(LayoutControlProperty,
|
|
76
|
-
var _super =
|
|
75
|
+
_inherits(LayoutControlProperty, Property1);
|
|
76
|
+
var _super = _createSuper(LayoutControlProperty);
|
|
77
77
|
function LayoutControlProperty(props) {
|
|
78
|
-
|
|
78
|
+
_classCallCheck(this, LayoutControlProperty);
|
|
79
79
|
return _super.call(this, props);
|
|
80
80
|
}
|
|
81
81
|
return LayoutControlProperty;
|