@byteluck-fe/model-driven-core 2.7.0-alpha.2 → 2.7.0-alpha.21
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/common/BaseControl/designer.js +259 -220
- package/dist/esm/common/BaseControl/property.js +68 -53
- package/dist/esm/common/BaseControl/runtime.js +37 -15
- package/dist/esm/common/ColumnControl/designer.js +39 -24
- package/dist/esm/common/ColumnControl/property.js +97 -48
- package/dist/esm/common/ColumnControl/runtime.js +39 -24
- package/dist/esm/common/ControlArray.js +12 -12
- package/dist/esm/common/FormControl/designer.js +42 -26
- package/dist/esm/common/FormControl/property.js +130 -69
- package/dist/esm/common/FormControl/runtime.js +40 -24
- package/dist/esm/common/LayoutControl/designer.js +151 -116
- package/dist/esm/common/LayoutControl/property.js +22 -22
- package/dist/esm/common/LayoutControl/runtime.js +41 -25
- package/dist/esm/common/ListControl/designer.js +141 -106
- package/dist/esm/common/ListControl/property.js +40 -23
- package/dist/esm/common/ListControl/runtime.js +43 -27
- package/dist/esm/common/SearchViewControl/designer.js +39 -24
- package/dist/esm/common/SearchViewControl/property.js +38 -23
- package/dist/esm/common/SearchViewControl/runtime.js +39 -24
- package/dist/esm/common/WrapControl/designer.js +39 -24
- package/dist/esm/common/WrapControl/property.js +22 -22
- package/dist/esm/common/WrapControl/runtime.js +39 -24
- package/dist/esm/framework/RegisterControls.js +215 -130
- package/dist/esm/framework/index.js +714 -248
- package/dist/esm/framework/isDataBind.js +8 -0
- package/dist/esm/index.js +1 -0
- package/dist/index.umd.js +1 -1
- package/dist/types/common/ColumnControl/property.d.ts +1 -1
- package/dist/types/common/ListControl/property.d.ts +2 -0
- package/dist/types/framework/index.d.ts +3 -2
- package/dist/types/framework/isDataBind.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _array_like_to_array(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 _array_without_holes(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function _assert_this_initialized(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 _async_to_generator(fn) {
|
|
30
30
|
return function() {
|
|
31
31
|
var self = this, args = arguments;
|
|
32
32
|
return new Promise(function(resolve, reject) {
|
|
@@ -41,12 +41,26 @@ function _asyncToGenerator(fn) {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function _class_call_check(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
|
|
49
|
+
function _defineProperties(target, props) {
|
|
50
|
+
for(var i = 0; i < props.length; i++){
|
|
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) {
|
|
50
64
|
if (key in obj) {
|
|
51
65
|
Object.defineProperty(obj, key, {
|
|
52
66
|
value: value,
|
|
@@ -63,23 +77,23 @@ function _get(target, property, receiver) {
|
|
|
63
77
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
64
78
|
_get = Reflect.get;
|
|
65
79
|
} else {
|
|
66
|
-
_get = function
|
|
67
|
-
var base =
|
|
80
|
+
_get = function get(target, property, receiver) {
|
|
81
|
+
var base = _super_prop_base(target, property);
|
|
68
82
|
if (!base) return;
|
|
69
83
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
70
84
|
if (desc.get) {
|
|
71
|
-
return desc.get.call(receiver);
|
|
85
|
+
return desc.get.call(receiver || target);
|
|
72
86
|
}
|
|
73
87
|
return desc.value;
|
|
74
88
|
};
|
|
75
89
|
}
|
|
76
90
|
return _get(target, property, receiver || target);
|
|
77
91
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
92
|
+
function _get_prototype_of(o) {
|
|
93
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
80
94
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
81
95
|
};
|
|
82
|
-
return
|
|
96
|
+
return _get_prototype_of(o);
|
|
83
97
|
}
|
|
84
98
|
function _inherits(subClass, superClass) {
|
|
85
99
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -92,7 +106,7 @@ function _inherits(subClass, superClass) {
|
|
|
92
106
|
configurable: true
|
|
93
107
|
}
|
|
94
108
|
});
|
|
95
|
-
if (superClass)
|
|
109
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
96
110
|
}
|
|
97
111
|
function _instanceof(left, right) {
|
|
98
112
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -101,13 +115,13 @@ function _instanceof(left, right) {
|
|
|
101
115
|
return left instanceof right;
|
|
102
116
|
}
|
|
103
117
|
}
|
|
104
|
-
function
|
|
118
|
+
function _iterable_to_array(iter) {
|
|
105
119
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
106
120
|
}
|
|
107
|
-
function
|
|
121
|
+
function _non_iterable_spread() {
|
|
108
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.");
|
|
109
123
|
}
|
|
110
|
-
function
|
|
124
|
+
function _object_spread(target) {
|
|
111
125
|
for(var i = 1; i < arguments.length; i++){
|
|
112
126
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
113
127
|
var ownKeys = Object.keys(source);
|
|
@@ -117,7 +131,7 @@ function _objectSpread(target) {
|
|
|
117
131
|
}));
|
|
118
132
|
}
|
|
119
133
|
ownKeys.forEach(function(key) {
|
|
120
|
-
|
|
134
|
+
_define_property(target, key, source[key]);
|
|
121
135
|
});
|
|
122
136
|
}
|
|
123
137
|
return target;
|
|
@@ -135,7 +149,7 @@ function ownKeys(object, enumerableOnly) {
|
|
|
135
149
|
}
|
|
136
150
|
return keys;
|
|
137
151
|
}
|
|
138
|
-
function
|
|
152
|
+
function _object_spread_props(target, source) {
|
|
139
153
|
source = source != null ? source : {};
|
|
140
154
|
if (Object.getOwnPropertyDescriptors) {
|
|
141
155
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
@@ -146,42 +160,42 @@ function _objectSpreadProps(target, source) {
|
|
|
146
160
|
}
|
|
147
161
|
return target;
|
|
148
162
|
}
|
|
149
|
-
function
|
|
150
|
-
if (call && (
|
|
163
|
+
function _possible_constructor_return(self, call) {
|
|
164
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
151
165
|
return call;
|
|
152
166
|
}
|
|
153
|
-
return
|
|
167
|
+
return _assert_this_initialized(self);
|
|
154
168
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
169
|
+
function _set_prototype_of(o, p) {
|
|
170
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
157
171
|
o.__proto__ = p;
|
|
158
172
|
return o;
|
|
159
173
|
};
|
|
160
|
-
return
|
|
174
|
+
return _set_prototype_of(o, p);
|
|
161
175
|
}
|
|
162
|
-
function
|
|
176
|
+
function _super_prop_base(object, property) {
|
|
163
177
|
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
164
|
-
object =
|
|
178
|
+
object = _get_prototype_of(object);
|
|
165
179
|
if (object === null) break;
|
|
166
180
|
}
|
|
167
181
|
return object;
|
|
168
182
|
}
|
|
169
|
-
function
|
|
170
|
-
return
|
|
183
|
+
function _to_consumable_array(arr) {
|
|
184
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
171
185
|
}
|
|
172
|
-
|
|
186
|
+
function _type_of(obj) {
|
|
173
187
|
"@swc/helpers - typeof";
|
|
174
188
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
175
|
-
}
|
|
176
|
-
function
|
|
189
|
+
}
|
|
190
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
177
191
|
if (!o) return;
|
|
178
|
-
if (typeof o === "string") return
|
|
192
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
179
193
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
180
194
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
181
195
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
182
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
196
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
183
197
|
}
|
|
184
|
-
function
|
|
198
|
+
function _is_native_reflect_construct() {
|
|
185
199
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
186
200
|
if (Reflect.construct.sham) return false;
|
|
187
201
|
if (typeof Proxy === "function") return true;
|
|
@@ -192,20 +206,20 @@ function _isNativeReflectConstruct() {
|
|
|
192
206
|
return false;
|
|
193
207
|
}
|
|
194
208
|
}
|
|
195
|
-
function
|
|
196
|
-
var hasNativeReflectConstruct =
|
|
209
|
+
function _create_super(Derived) {
|
|
210
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
197
211
|
return function _createSuperInternal() {
|
|
198
|
-
var Super =
|
|
212
|
+
var Super = _get_prototype_of(Derived), result;
|
|
199
213
|
if (hasNativeReflectConstruct) {
|
|
200
|
-
var NewTarget =
|
|
214
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
201
215
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
202
216
|
} else {
|
|
203
217
|
result = Super.apply(this, arguments);
|
|
204
218
|
}
|
|
205
|
-
return
|
|
219
|
+
return _possible_constructor_return(this, result);
|
|
206
220
|
};
|
|
207
221
|
}
|
|
208
|
-
|
|
222
|
+
function _ts_generator(thisArg, body) {
|
|
209
223
|
var f, y, t, g, _ = {
|
|
210
224
|
label: 0,
|
|
211
225
|
sent: function() {
|
|
@@ -299,7 +313,7 @@ var __generator = this && this.__generator || function(thisArg, body) {
|
|
|
299
313
|
done: true
|
|
300
314
|
};
|
|
301
315
|
}
|
|
302
|
-
}
|
|
316
|
+
}
|
|
303
317
|
import { JSONCopy } from "@byteluck-fe/model-driven-shared";
|
|
304
318
|
import { DesignerControl } from "../BaseControl";
|
|
305
319
|
import LayoutControlProperty from "./property";
|
|
@@ -309,92 +323,113 @@ var CHILDREN_MAX_LENGTH = 10000;
|
|
|
309
323
|
var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
310
324
|
"use strict";
|
|
311
325
|
_inherits(LayoutControl, DesignerControl);
|
|
312
|
-
var _super =
|
|
326
|
+
var _super = _create_super(LayoutControl);
|
|
313
327
|
function LayoutControl(props) {
|
|
314
|
-
|
|
328
|
+
_class_call_check(this, LayoutControl);
|
|
315
329
|
var _this;
|
|
330
|
+
var _props, _props1;
|
|
316
331
|
_this = _super.call(this, props);
|
|
317
|
-
_this
|
|
332
|
+
_define_property(_assert_this_initialized(_this), "controlType", "layout");
|
|
333
|
+
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
334
|
+
_define_property(_assert_this_initialized(_this), "excludes", void 0);
|
|
335
|
+
_define_property(_assert_this_initialized(_this), "childrenMaxLength", void 0);
|
|
336
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
318
337
|
var _ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = _ref.excludes, childrenMaxLength = _ref.childrenMaxLength;
|
|
319
|
-
_this.props = new LayoutControlProperty(props === null ||
|
|
320
|
-
defineControlArrayToProperty(
|
|
338
|
+
_this.props = new LayoutControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
|
|
339
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), "children", (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.children);
|
|
321
340
|
_this.excludes = JSONCopy(excludes);
|
|
322
341
|
_this.childrenMaxLength = childrenMaxLength;
|
|
323
342
|
return _this;
|
|
324
343
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
var _this1 = this, _superprop_get_validate = function() {
|
|
339
|
-
return _get(_getPrototypeOf(LayoutControl.prototype), "validate", _this);
|
|
340
|
-
};
|
|
341
|
-
return _asyncToGenerator(function() {
|
|
342
|
-
return __generator(this, function(_state) {
|
|
343
|
-
switch(_state.label){
|
|
344
|
-
case 0:
|
|
345
|
-
return [
|
|
346
|
-
4,
|
|
347
|
-
_superprop_get_validate().call(_this1, messages, ignore)
|
|
348
|
-
];
|
|
349
|
-
case 1:
|
|
350
|
-
_state.sent();
|
|
351
|
-
return [
|
|
352
|
-
4,
|
|
353
|
-
Promise.all(_this1.children.map(function(child) {
|
|
354
|
-
return child.validate(messages, ignore);
|
|
355
|
-
}))
|
|
356
|
-
];
|
|
357
|
-
case 2:
|
|
358
|
-
_state.sent();
|
|
359
|
-
return [
|
|
360
|
-
2,
|
|
361
|
-
true
|
|
362
|
-
];
|
|
344
|
+
_create_class(LayoutControl, [
|
|
345
|
+
{
|
|
346
|
+
key: "judgeExcludesChildren",
|
|
347
|
+
value: function judgeExcludesChildren(type) {
|
|
348
|
+
return this.excludes === false || Array.isArray(this.excludes) && !this.excludes.includes(type);
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
key: "judgeJoinChildren",
|
|
353
|
+
value: function judgeJoinChildren(type) {
|
|
354
|
+
var canJoin = this.judgeExcludesChildren(type);
|
|
355
|
+
if (canJoin) {
|
|
356
|
+
return this.childrenMaxLength > this.children.length;
|
|
363
357
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
358
|
+
return canJoin;
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
key: "validate",
|
|
363
|
+
value: function validate(messages, ignore) {
|
|
364
|
+
var _this = this;
|
|
365
|
+
var _this1 = this, _superprop_get_validate = function() {
|
|
366
|
+
return _get(_get_prototype_of(LayoutControl.prototype), "validate", _this);
|
|
367
|
+
};
|
|
368
|
+
return _async_to_generator(function() {
|
|
369
|
+
return _ts_generator(this, function(_state) {
|
|
370
|
+
switch(_state.label){
|
|
371
|
+
case 0:
|
|
372
|
+
return [
|
|
373
|
+
4,
|
|
374
|
+
_superprop_get_validate().call(_this1, messages, ignore)
|
|
375
|
+
];
|
|
376
|
+
case 1:
|
|
377
|
+
_state.sent();
|
|
378
|
+
return [
|
|
379
|
+
4,
|
|
380
|
+
Promise.all(_this1.children.map(function(child) {
|
|
381
|
+
return child.validate(messages, ignore);
|
|
382
|
+
}))
|
|
383
|
+
];
|
|
384
|
+
case 2:
|
|
385
|
+
_state.sent();
|
|
386
|
+
return [
|
|
387
|
+
2,
|
|
388
|
+
true
|
|
389
|
+
];
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
})();
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
key: "toDataBindModel",
|
|
397
|
+
value: function toDataBindModel() {
|
|
398
|
+
var parentId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
399
|
+
var dataBindModel = _get(_get_prototype_of(LayoutControl.prototype), "toDataBindModel", this).call(this);
|
|
400
|
+
var result = dataBindModel ? [
|
|
401
|
+
dataBindModel
|
|
402
|
+
] : [];
|
|
403
|
+
return this.children.reduce(function(arr, current) {
|
|
404
|
+
var model = current.toDataBindModel(parentId);
|
|
405
|
+
if (Array.isArray(model)) {
|
|
406
|
+
var filteredModel = model.filter(function(item) {
|
|
407
|
+
return !!item;
|
|
408
|
+
});
|
|
409
|
+
return _to_consumable_array(arr).concat(_to_consumable_array(filteredModel));
|
|
410
|
+
}
|
|
411
|
+
model && arr.push(model);
|
|
412
|
+
return arr;
|
|
413
|
+
}, result);
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
key: "toSchema",
|
|
418
|
+
value: function toSchema() {
|
|
419
|
+
var superSchema = _get(_get_prototype_of(LayoutControl.prototype), "toSchema", this).call(this);
|
|
420
|
+
var children = this.children.map(function(item) {
|
|
421
|
+
var schema = item.toSchema();
|
|
422
|
+
return schema;
|
|
423
|
+
});
|
|
424
|
+
return _object_spread_props(_object_spread({}, superSchema), {
|
|
425
|
+
children: children
|
|
378
426
|
});
|
|
379
|
-
return _toConsumableArray(arr).concat(_toConsumableArray(filteredModel));
|
|
380
427
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}, result);
|
|
384
|
-
};
|
|
385
|
-
_proto.toSchema = function toSchema() {
|
|
386
|
-
var superSchema = _get(_getPrototypeOf(LayoutControl.prototype), "toSchema", this).call(this);
|
|
387
|
-
var children = this.children.map(function(item) {
|
|
388
|
-
var schema = item.toSchema();
|
|
389
|
-
return schema;
|
|
390
|
-
});
|
|
391
|
-
return _objectSpreadProps(_objectSpread({}, superSchema), {
|
|
392
|
-
children: children
|
|
393
|
-
});
|
|
394
|
-
};
|
|
428
|
+
}
|
|
429
|
+
]);
|
|
395
430
|
return LayoutControl;
|
|
396
431
|
}(DesignerControl);
|
|
397
|
-
LayoutControl
|
|
398
|
-
LayoutControl
|
|
432
|
+
_define_property(LayoutControl, "excludes", false);
|
|
433
|
+
_define_property(LayoutControl, "childrenMaxLength", CHILDREN_MAX_LENGTH);
|
|
399
434
|
export default LayoutControl;
|
|
400
435
|
export { LayoutControl as DesignerLayoutControl };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assert_this_initialized(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 _class_call_check(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 _get_prototype_of(o) {
|
|
13
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14
14
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
15
15
|
};
|
|
16
|
-
return
|
|
16
|
+
return _get_prototype_of(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) _set_prototype_of(subClass, superClass);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
if (call && (
|
|
31
|
+
function _possible_constructor_return(self, call) {
|
|
32
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
33
33
|
return call;
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return _assert_this_initialized(self);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
function _set_prototype_of(o, p) {
|
|
38
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
39
39
|
o.__proto__ = p;
|
|
40
40
|
return o;
|
|
41
41
|
};
|
|
42
|
-
return
|
|
42
|
+
return _set_prototype_of(o, p);
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
function _type_of(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 _is_native_reflect_construct() {
|
|
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 _isNativeReflectConstruct() {
|
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
var hasNativeReflectConstruct =
|
|
59
|
+
function _create_super(Derived) {
|
|
60
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
61
61
|
return function _createSuperInternal() {
|
|
62
|
-
var Super =
|
|
62
|
+
var Super = _get_prototype_of(Derived), result;
|
|
63
63
|
if (hasNativeReflectConstruct) {
|
|
64
|
-
var NewTarget =
|
|
64
|
+
var NewTarget = _get_prototype_of(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 _possible_constructor_return(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
import { Property } from "../BaseControl";
|
|
73
73
|
var LayoutControlProperty = /*#__PURE__*/ function(Property) {
|
|
74
74
|
"use strict";
|
|
75
75
|
_inherits(LayoutControlProperty, Property);
|
|
76
|
-
var _super =
|
|
76
|
+
var _super = _create_super(LayoutControlProperty);
|
|
77
77
|
function LayoutControlProperty(props) {
|
|
78
|
-
|
|
78
|
+
_class_call_check(this, LayoutControlProperty);
|
|
79
79
|
return _super.call(this, props);
|
|
80
80
|
}
|
|
81
81
|
return LayoutControlProperty;
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assert_this_initialized(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 _class_call_check(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 _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
function _get_prototype_of(o) {
|
|
26
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
15
28
|
};
|
|
16
|
-
return
|
|
29
|
+
return _get_prototype_of(o);
|
|
17
30
|
}
|
|
18
31
|
function _inherits(subClass, superClass) {
|
|
19
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
26
39
|
configurable: true
|
|
27
40
|
}
|
|
28
41
|
});
|
|
29
|
-
if (superClass)
|
|
42
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
30
43
|
}
|
|
31
|
-
function
|
|
32
|
-
if (call && (
|
|
44
|
+
function _possible_constructor_return(self, call) {
|
|
45
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
33
46
|
return call;
|
|
34
47
|
}
|
|
35
|
-
return
|
|
48
|
+
return _assert_this_initialized(self);
|
|
36
49
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
50
|
+
function _set_prototype_of(o, p) {
|
|
51
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
39
52
|
o.__proto__ = p;
|
|
40
53
|
return o;
|
|
41
54
|
};
|
|
42
|
-
return
|
|
55
|
+
return _set_prototype_of(o, p);
|
|
43
56
|
}
|
|
44
|
-
|
|
57
|
+
function _type_of(obj) {
|
|
45
58
|
"@swc/helpers - typeof";
|
|
46
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
47
|
-
}
|
|
48
|
-
function
|
|
60
|
+
}
|
|
61
|
+
function _is_native_reflect_construct() {
|
|
49
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
50
63
|
if (Reflect.construct.sham) return false;
|
|
51
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -56,17 +69,17 @@ function _isNativeReflectConstruct() {
|
|
|
56
69
|
return false;
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
|
-
function
|
|
60
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
61
74
|
return function _createSuperInternal() {
|
|
62
|
-
var Super =
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
63
76
|
if (hasNativeReflectConstruct) {
|
|
64
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
65
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
66
79
|
} else {
|
|
67
80
|
result = Super.apply(this, arguments);
|
|
68
81
|
}
|
|
69
|
-
return
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
70
83
|
};
|
|
71
84
|
}
|
|
72
85
|
import { RuntimeControl } from "../BaseControl";
|
|
@@ -75,14 +88,17 @@ import { defineControlArrayToProperty } from "../ControlArray";
|
|
|
75
88
|
var LayoutControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
76
89
|
"use strict";
|
|
77
90
|
_inherits(LayoutControl, RuntimeControl);
|
|
78
|
-
var _super =
|
|
91
|
+
var _super = _create_super(LayoutControl);
|
|
79
92
|
function LayoutControl(props) {
|
|
80
|
-
|
|
93
|
+
_class_call_check(this, LayoutControl);
|
|
81
94
|
var _this;
|
|
95
|
+
var _props, _props1;
|
|
82
96
|
_this = _super.call(this, props);
|
|
83
|
-
_this
|
|
84
|
-
_this
|
|
85
|
-
|
|
97
|
+
_define_property(_assert_this_initialized(_this), "controlType", "layout");
|
|
98
|
+
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
99
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
100
|
+
_this.props = new LayoutControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
|
|
101
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), "children", (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.children);
|
|
86
102
|
return _this;
|
|
87
103
|
}
|
|
88
104
|
return LayoutControl;
|