@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.
Files changed (33) hide show
  1. package/dist/esm/common/BaseControl/designer.js +259 -220
  2. package/dist/esm/common/BaseControl/property.js +68 -53
  3. package/dist/esm/common/BaseControl/runtime.js +37 -15
  4. package/dist/esm/common/ColumnControl/designer.js +39 -24
  5. package/dist/esm/common/ColumnControl/property.js +97 -48
  6. package/dist/esm/common/ColumnControl/runtime.js +39 -24
  7. package/dist/esm/common/ControlArray.js +12 -12
  8. package/dist/esm/common/FormControl/designer.js +42 -26
  9. package/dist/esm/common/FormControl/property.js +130 -69
  10. package/dist/esm/common/FormControl/runtime.js +40 -24
  11. package/dist/esm/common/LayoutControl/designer.js +151 -116
  12. package/dist/esm/common/LayoutControl/property.js +22 -22
  13. package/dist/esm/common/LayoutControl/runtime.js +41 -25
  14. package/dist/esm/common/ListControl/designer.js +141 -106
  15. package/dist/esm/common/ListControl/property.js +40 -23
  16. package/dist/esm/common/ListControl/runtime.js +43 -27
  17. package/dist/esm/common/SearchViewControl/designer.js +39 -24
  18. package/dist/esm/common/SearchViewControl/property.js +38 -23
  19. package/dist/esm/common/SearchViewControl/runtime.js +39 -24
  20. package/dist/esm/common/WrapControl/designer.js +39 -24
  21. package/dist/esm/common/WrapControl/property.js +22 -22
  22. package/dist/esm/common/WrapControl/runtime.js +39 -24
  23. package/dist/esm/framework/RegisterControls.js +215 -130
  24. package/dist/esm/framework/index.js +714 -248
  25. package/dist/esm/framework/isDataBind.js +8 -0
  26. package/dist/esm/index.js +1 -0
  27. package/dist/index.umd.js +1 -1
  28. package/dist/types/common/ColumnControl/property.d.ts +1 -1
  29. package/dist/types/common/ListControl/property.d.ts +2 -0
  30. package/dist/types/framework/index.d.ts +3 -2
  31. package/dist/types/framework/isDataBind.d.ts +2 -0
  32. package/dist/types/index.d.ts +1 -0
  33. package/package.json +3 -3
@@ -1,12 +1,12 @@
1
- function _arrayLikeToArray(arr, len) {
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 _arrayWithoutHoles(arr) {
7
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
6
+ function _array_without_holes(arr) {
7
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
8
8
  }
9
- function _assertThisInitialized(self) {
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 _asyncToGenerator(fn) {
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 _classCallCheck(instance, Constructor) {
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 _defineProperty(obj, key, value) {
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 _get(target, property, receiver) {
67
- var base = _superPropBase(target, property);
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 _getPrototypeOf(o) {
79
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
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 _getPrototypeOf(o);
96
+ return _get_prototype_of(o);
83
97
  }
84
98
  function _inherits(subClass, superClass) {
85
99
  if (typeof superClass !== "function" && superClass !== null) {
@@ -92,15 +106,15 @@ function _inherits(subClass, superClass) {
92
106
  configurable: true
93
107
  }
94
108
  });
95
- if (superClass) _setPrototypeOf(subClass, superClass);
109
+ if (superClass) _set_prototype_of(subClass, superClass);
96
110
  }
97
- function _iterableToArray(iter) {
111
+ function _iterable_to_array(iter) {
98
112
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
99
113
  }
100
- function _nonIterableSpread() {
114
+ function _non_iterable_spread() {
101
115
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
102
116
  }
103
- function _objectSpread(target) {
117
+ function _object_spread(target) {
104
118
  for(var i = 1; i < arguments.length; i++){
105
119
  var source = arguments[i] != null ? arguments[i] : {};
106
120
  var ownKeys = Object.keys(source);
@@ -110,7 +124,7 @@ function _objectSpread(target) {
110
124
  }));
111
125
  }
112
126
  ownKeys.forEach(function(key) {
113
- _defineProperty(target, key, source[key]);
127
+ _define_property(target, key, source[key]);
114
128
  });
115
129
  }
116
130
  return target;
@@ -128,7 +142,7 @@ function ownKeys(object, enumerableOnly) {
128
142
  }
129
143
  return keys;
130
144
  }
131
- function _objectSpreadProps(target, source) {
145
+ function _object_spread_props(target, source) {
132
146
  source = source != null ? source : {};
133
147
  if (Object.getOwnPropertyDescriptors) {
134
148
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
@@ -139,42 +153,42 @@ function _objectSpreadProps(target, source) {
139
153
  }
140
154
  return target;
141
155
  }
142
- function _possibleConstructorReturn(self, call) {
143
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
156
+ function _possible_constructor_return(self, call) {
157
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
144
158
  return call;
145
159
  }
146
- return _assertThisInitialized(self);
160
+ return _assert_this_initialized(self);
147
161
  }
148
- function _setPrototypeOf(o, p) {
149
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
162
+ function _set_prototype_of(o, p) {
163
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
150
164
  o.__proto__ = p;
151
165
  return o;
152
166
  };
153
- return _setPrototypeOf(o, p);
167
+ return _set_prototype_of(o, p);
154
168
  }
155
- function _superPropBase(object, property) {
169
+ function _super_prop_base(object, property) {
156
170
  while(!Object.prototype.hasOwnProperty.call(object, property)){
157
- object = _getPrototypeOf(object);
171
+ object = _get_prototype_of(object);
158
172
  if (object === null) break;
159
173
  }
160
174
  return object;
161
175
  }
162
- function _toConsumableArray(arr) {
163
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
176
+ function _to_consumable_array(arr) {
177
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
164
178
  }
165
- var _typeof = function(obj) {
179
+ function _type_of(obj) {
166
180
  "@swc/helpers - typeof";
167
181
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
168
- };
169
- function _unsupportedIterableToArray(o, minLen) {
182
+ }
183
+ function _unsupported_iterable_to_array(o, minLen) {
170
184
  if (!o) return;
171
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
185
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
172
186
  var n = Object.prototype.toString.call(o).slice(8, -1);
173
187
  if (n === "Object" && o.constructor) n = o.constructor.name;
174
188
  if (n === "Map" || n === "Set") return Array.from(n);
175
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
189
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
176
190
  }
177
- function _isNativeReflectConstruct() {
191
+ function _is_native_reflect_construct() {
178
192
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
179
193
  if (Reflect.construct.sham) return false;
180
194
  if (typeof Proxy === "function") return true;
@@ -185,20 +199,20 @@ function _isNativeReflectConstruct() {
185
199
  return false;
186
200
  }
187
201
  }
188
- function _createSuper(Derived) {
189
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
202
+ function _create_super(Derived) {
203
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
190
204
  return function _createSuperInternal() {
191
- var Super = _getPrototypeOf(Derived), result;
205
+ var Super = _get_prototype_of(Derived), result;
192
206
  if (hasNativeReflectConstruct) {
193
- var NewTarget = _getPrototypeOf(this).constructor;
207
+ var NewTarget = _get_prototype_of(this).constructor;
194
208
  result = Reflect.construct(Super, arguments, NewTarget);
195
209
  } else {
196
210
  result = Super.apply(this, arguments);
197
211
  }
198
- return _possibleConstructorReturn(this, result);
212
+ return _possible_constructor_return(this, result);
199
213
  };
200
214
  }
201
- var __generator = this && this.__generator || function(thisArg, body) {
215
+ function _ts_generator(thisArg, body) {
202
216
  var f, y, t, g, _ = {
203
217
  label: 0,
204
218
  sent: function() {
@@ -292,85 +306,106 @@ var __generator = this && this.__generator || function(thisArg, body) {
292
306
  done: true
293
307
  };
294
308
  }
295
- };
309
+ }
296
310
  import { DesignerControl } from "../BaseControl";
297
311
  import ListControlProperty from "./property";
298
312
  import { FieldTypes } from "@byteluck-fe/model-driven-shared";
299
313
  var ListControl = /*#__PURE__*/ function(DesignerControl) {
300
314
  "use strict";
301
315
  _inherits(ListControl, DesignerControl);
302
- var _super = _createSuper(ListControl);
316
+ var _super = _create_super(ListControl);
303
317
  function ListControl(props) {
304
- _classCallCheck(this, ListControl);
318
+ _class_call_check(this, ListControl);
305
319
  var _this;
320
+ var _props;
306
321
  _this = _super.call(this, props);
307
- _this.controlType = "list";
308
- _this.props = new ListControlProperty(_assertThisInitialized(_this), props === null || props === void 0 ? void 0 : props.props);
322
+ _define_property(_assert_this_initialized(_this), "controlType", "list");
323
+ _define_property(_assert_this_initialized(_this), "props", void 0);
324
+ _this.props = new ListControlProperty(_assert_this_initialized(_this), (_props = props) === null || _props === void 0 ? void 0 : _props.props);
309
325
  return _this;
310
326
  }
311
- var _proto = ListControl.prototype;
312
- _proto.validate = function validate(messages, ignore) {
313
- var _this = this;
314
- var _this1 = this, _superprop_get_validate = function() {
315
- return _get(_getPrototypeOf(ListControl.prototype), "validate", _this);
316
- };
317
- return _asyncToGenerator(function() {
318
- return __generator(this, function(_state) {
319
- switch(_state.label){
320
- case 0:
321
- return [
322
- 4,
323
- _superprop_get_validate().call(_this1, messages)
324
- ];
325
- case 1:
326
- _state.sent();
327
- return [
328
- 4,
329
- Promise.all(_this1.props.headers.map(function(child) {
330
- return child.validate(messages, ignore);
331
- }))
332
- ];
333
- case 2:
334
- _state.sent();
335
- return [
336
- 2,
337
- true
338
- ];
339
- }
340
- });
341
- })();
342
- };
343
- _proto.toDataBindModel = function toDataBindModel() {
344
- var listModel = _get(_getPrototypeOf(ListControl.prototype), "toDataBindModel", this).call(this);
345
- var result = listModel ? [
346
- listModel
347
- ] : [];
348
- var parentId = this.id;
349
- return this.props.headers.reduce(function(arr, current) {
350
- var model = current.toDataBindModel(parentId);
351
- if (Array.isArray(model)) {
352
- var filteredModel = model.filter(function(item) {
353
- return !!item;
327
+ _create_class(ListControl, [
328
+ {
329
+ key: "validate",
330
+ value: function validate(messages, ignore) {
331
+ var _this = this;
332
+ var _this1 = this, _superprop_get_validate = function() {
333
+ return _get(_get_prototype_of(ListControl.prototype), "validate", _this);
334
+ };
335
+ return _async_to_generator(function() {
336
+ return _ts_generator(this, function(_state) {
337
+ switch(_state.label){
338
+ case 0:
339
+ return [
340
+ 4,
341
+ _superprop_get_validate().call(_this1, messages)
342
+ ];
343
+ case 1:
344
+ _state.sent();
345
+ return [
346
+ 4,
347
+ Promise.all(_this1.props.headers.map(function(child) {
348
+ return child.validate(messages, ignore);
349
+ }))
350
+ ];
351
+ case 2:
352
+ _state.sent();
353
+ return [
354
+ 2,
355
+ true
356
+ ];
357
+ }
358
+ });
359
+ })();
360
+ }
361
+ },
362
+ {
363
+ key: "toDataBindModel",
364
+ value: function toDataBindModel() {
365
+ var listModel = _get(_get_prototype_of(ListControl.prototype), "toDataBindModel", this).call(this);
366
+ var result = listModel ? [
367
+ listModel
368
+ ] : [];
369
+ var parentId = this.id;
370
+ return this.props.headers.reduce(function(arr, current) {
371
+ var model = current.toDataBindModel(parentId);
372
+ if (Array.isArray(model)) {
373
+ var filteredModel = model.filter(function(item) {
374
+ return !!item;
375
+ });
376
+ return _to_consumable_array(arr).concat(_to_consumable_array(filteredModel));
377
+ }
378
+ model && arr.push(model);
379
+ return arr;
380
+ }, result);
381
+ }
382
+ },
383
+ {
384
+ key: "toSchema",
385
+ value: function toSchema() {
386
+ var _this_props_footers, _this_props;
387
+ var superSchema = _get(_get_prototype_of(ListControl.prototype), "toSchema", this).call(this);
388
+ var headers = this.props.headers.map(function(item) {
389
+ return item.toSchema();
390
+ });
391
+ var footers = (_this_props = this.props) === null || _this_props === void 0 ? void 0 : (_this_props_footers = _this_props.footers) === null || _this_props_footers === void 0 ? void 0 : _this_props_footers.map(function(item) {
392
+ if (item) {
393
+ return item.toSchema();
394
+ } else {
395
+ return undefined;
396
+ }
397
+ });
398
+ return _object_spread_props(_object_spread({}, superSchema), {
399
+ props: _object_spread_props(_object_spread({}, this.props), {
400
+ headers: headers,
401
+ footers: footers
402
+ })
354
403
  });
355
- return _toConsumableArray(arr).concat(_toConsumableArray(filteredModel));
356
404
  }
357
- model && arr.push(model);
358
- return arr;
359
- }, result);
360
- };
361
- _proto.toSchema = function toSchema() {
362
- var superSchema = _get(_getPrototypeOf(ListControl.prototype), "toSchema", this).call(this);
363
- var headers = this.props.headers.map(function(item) {
364
- return item.toSchema();
365
- });
366
- return _objectSpreadProps(_objectSpread({}, superSchema), {
367
- props: _objectSpreadProps(_objectSpread({}, this.props), {
368
- headers: headers
369
- })
370
- });
371
- };
405
+ }
406
+ ]);
372
407
  return ListControl;
373
408
  }(DesignerControl);
374
- ListControl.controlFieldType = FieldTypes.LIST;
409
+ _define_property(ListControl, "controlFieldType", FieldTypes.LIST);
375
410
  export default ListControl;
376
411
  export { ListControl as DesignerListControl };
@@ -1,19 +1,32 @@
1
- function _assertThisInitialized(self) {
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 _classCallCheck(instance, Constructor) {
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 _getPrototypeOf(o) {
13
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
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 _getPrototypeOf(o);
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) _setPrototypeOf(subClass, superClass);
42
+ if (superClass) _set_prototype_of(subClass, superClass);
30
43
  }
31
- function _possibleConstructorReturn(self, call) {
32
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
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 _assertThisInitialized(self);
48
+ return _assert_this_initialized(self);
36
49
  }
37
- function _setPrototypeOf(o, p) {
38
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
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 _setPrototypeOf(o, p);
55
+ return _set_prototype_of(o, p);
43
56
  }
44
- var _typeof = function(obj) {
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 _isNativeReflectConstruct() {
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 _createSuper(Derived) {
60
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
72
+ function _create_super(Derived) {
73
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
61
74
  return function _createSuperInternal() {
62
- var Super = _getPrototypeOf(Derived), result;
75
+ var Super = _get_prototype_of(Derived), result;
63
76
  if (hasNativeReflectConstruct) {
64
- var NewTarget = _getPrototypeOf(this).constructor;
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 _possibleConstructorReturn(this, result);
82
+ return _possible_constructor_return(this, result);
70
83
  };
71
84
  }
72
85
  import { Property } from "../BaseControl";
@@ -74,12 +87,16 @@ import { defineControlArrayToProperty } from "../ControlArray";
74
87
  var ListControlProperty = /*#__PURE__*/ function(Property) {
75
88
  "use strict";
76
89
  _inherits(ListControlProperty, Property);
77
- var _super = _createSuper(ListControlProperty);
90
+ var _super = _create_super(ListControlProperty);
78
91
  function ListControlProperty(parent, props) {
79
- _classCallCheck(this, ListControlProperty);
92
+ _class_call_check(this, ListControlProperty);
80
93
  var _this;
94
+ var _props, _props1;
81
95
  _this = _super.call(this, props);
82
- defineControlArrayToProperty(_assertThisInitialized(_this), "headers", props === null || props === void 0 ? void 0 : props.headers, parent);
96
+ _define_property(_assert_this_initialized(_this), "headers", void 0);
97
+ _define_property(_assert_this_initialized(_this), "footers", void 0);
98
+ defineControlArrayToProperty(_assert_this_initialized(_this), "headers", (_props = props) === null || _props === void 0 ? void 0 : _props.headers, parent);
99
+ defineControlArrayToProperty(_assert_this_initialized(_this), "footers", (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.footers, parent);
83
100
  return _this;
84
101
  }
85
102
  return ListControlProperty;
@@ -1,10 +1,10 @@
1
- function _assertThisInitialized(self) {
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 _classCallCheck(instance, Constructor) {
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
  }
@@ -18,16 +18,29 @@ function _defineProperties(target, props) {
18
18
  Object.defineProperty(target, descriptor.key, descriptor);
19
19
  }
20
20
  }
21
- function _createClass(Constructor, protoProps, staticProps) {
21
+ function _create_class(Constructor, protoProps, staticProps) {
22
22
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
23
23
  if (staticProps) _defineProperties(Constructor, staticProps);
24
24
  return Constructor;
25
25
  }
26
- function _getPrototypeOf(o) {
27
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
26
+ function _define_property(obj, key, value) {
27
+ if (key in obj) {
28
+ Object.defineProperty(obj, key, {
29
+ value: value,
30
+ enumerable: true,
31
+ configurable: true,
32
+ writable: true
33
+ });
34
+ } else {
35
+ obj[key] = value;
36
+ }
37
+ return obj;
38
+ }
39
+ function _get_prototype_of(o) {
40
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
28
41
  return o.__proto__ || Object.getPrototypeOf(o);
29
42
  };
30
- return _getPrototypeOf(o);
43
+ return _get_prototype_of(o);
31
44
  }
32
45
  function _inherits(subClass, superClass) {
33
46
  if (typeof superClass !== "function" && superClass !== null) {
@@ -40,26 +53,26 @@ function _inherits(subClass, superClass) {
40
53
  configurable: true
41
54
  }
42
55
  });
43
- if (superClass) _setPrototypeOf(subClass, superClass);
56
+ if (superClass) _set_prototype_of(subClass, superClass);
44
57
  }
45
- function _possibleConstructorReturn(self, call) {
46
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
58
+ function _possible_constructor_return(self, call) {
59
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
47
60
  return call;
48
61
  }
49
- return _assertThisInitialized(self);
62
+ return _assert_this_initialized(self);
50
63
  }
51
- function _setPrototypeOf(o, p) {
52
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
64
+ function _set_prototype_of(o, p) {
65
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
53
66
  o.__proto__ = p;
54
67
  return o;
55
68
  };
56
- return _setPrototypeOf(o, p);
69
+ return _set_prototype_of(o, p);
57
70
  }
58
- var _typeof = function(obj) {
71
+ function _type_of(obj) {
59
72
  "@swc/helpers - typeof";
60
73
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
61
- };
62
- function _isNativeReflectConstruct() {
74
+ }
75
+ function _is_native_reflect_construct() {
63
76
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
64
77
  if (Reflect.construct.sham) return false;
65
78
  if (typeof Proxy === "function") return true;
@@ -70,17 +83,17 @@ function _isNativeReflectConstruct() {
70
83
  return false;
71
84
  }
72
85
  }
73
- function _createSuper(Derived) {
74
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
86
+ function _create_super(Derived) {
87
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
75
88
  return function _createSuperInternal() {
76
- var Super = _getPrototypeOf(Derived), result;
89
+ var Super = _get_prototype_of(Derived), result;
77
90
  if (hasNativeReflectConstruct) {
78
- var NewTarget = _getPrototypeOf(this).constructor;
91
+ var NewTarget = _get_prototype_of(this).constructor;
79
92
  result = Reflect.construct(Super, arguments, NewTarget);
80
93
  } else {
81
94
  result = Super.apply(this, arguments);
82
95
  }
83
- return _possibleConstructorReturn(this, result);
96
+ return _possible_constructor_return(this, result);
84
97
  };
85
98
  }
86
99
  import { RuntimeControl } from "../BaseControl";
@@ -89,17 +102,20 @@ import { defineControlArrayToProperty } from "../ControlArray";
89
102
  var ListControl = /*#__PURE__*/ function(RuntimeControl) {
90
103
  "use strict";
91
104
  _inherits(ListControl, RuntimeControl);
92
- var _super = _createSuper(ListControl);
105
+ var _super = _create_super(ListControl);
93
106
  function ListControl(props) {
94
- _classCallCheck(this, ListControl);
107
+ _class_call_check(this, ListControl);
95
108
  var _this;
109
+ var _props, _props1;
96
110
  _this = _super.call(this, props);
97
- _this.controlType = "list";
98
- _this.props = new ListControlProperty(_assertThisInitialized(_this), props === null || props === void 0 ? void 0 : props.props);
99
- defineControlArrayToProperty(_assertThisInitialized(_this), "children", props === null || props === void 0 ? void 0 : props.children);
111
+ _define_property(_assert_this_initialized(_this), "controlType", "list");
112
+ _define_property(_assert_this_initialized(_this), "children", void 0);
113
+ _define_property(_assert_this_initialized(_this), "props", void 0);
114
+ _this.props = new ListControlProperty(_assert_this_initialized(_this), (_props = props) === null || _props === void 0 ? void 0 : _props.props);
115
+ defineControlArrayToProperty(_assert_this_initialized(_this), "children", (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.children);
100
116
  return _this;
101
117
  }
102
- _createClass(ListControl, [
118
+ _create_class(ListControl, [
103
119
  {
104
120
  key: "length",
105
121
  get: function get() {