@byteluck-fe/model-driven-driven 2.7.0-alpha.24 → 2.7.0-alpha.25

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.
@@ -1,4 +1,4 @@
1
- function _class_call_check(instance, Constructor) {
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
  }
@@ -12,12 +12,12 @@ function _defineProperties(target, props) {
12
12
  Object.defineProperty(target, descriptor.key, descriptor);
13
13
  }
14
14
  }
15
- function _create_class(Constructor, protoProps, staticProps) {
15
+ function _createClass(Constructor, protoProps, staticProps) {
16
16
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- function _define_property(obj, key, value) {
20
+ function _defineProperty(obj, key, value) {
21
21
  if (key in obj) {
22
22
  Object.defineProperty(obj, key, {
23
23
  value: value,
@@ -35,10 +35,10 @@ import { CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
35
35
  export var Builder = /*#__PURE__*/ function() {
36
36
  "use strict";
37
37
  function Builder() {
38
- _class_call_check(this, Builder);
39
- _define_property(this, "designer", new Designer());
38
+ _classCallCheck(this, Builder);
39
+ _defineProperty(this, "designer", new Designer());
40
40
  }
41
- _create_class(Builder, [
41
+ _createClass(Builder, [
42
42
  {
43
43
  key: "ListPageBuilder",
44
44
  value: // @ts-ignore
@@ -1,12 +1,12 @@
1
- function _array_like_to_array(arr, len) {
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 _array_without_holes(arr) {
7
- if (Array.isArray(arr)) return _array_like_to_array(arr);
6
+ function _arrayWithoutHoles(arr) {
7
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
8
8
  }
9
- function _assert_this_initialized(self) {
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 _async_to_generator(fn) {
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 _class_call_check(instance, Constructor) {
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 _create_class(Constructor, protoProps, staticProps) {
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 _define_property(obj, key, value) {
63
+ function _defineProperty(obj, key, value) {
64
64
  if (key in obj) {
65
65
  Object.defineProperty(obj, key, {
66
66
  value: value,
@@ -73,11 +73,11 @@ function _define_property(obj, key, value) {
73
73
  }
74
74
  return obj;
75
75
  }
76
- function _get_prototype_of(o) {
77
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
76
+ function _getPrototypeOf(o) {
77
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
78
78
  return o.__proto__ || Object.getPrototypeOf(o);
79
79
  };
80
- return _get_prototype_of(o);
80
+ return _getPrototypeOf(o);
81
81
  }
82
82
  function _inherits(subClass, superClass) {
83
83
  if (typeof superClass !== "function" && superClass !== null) {
@@ -90,7 +90,7 @@ function _inherits(subClass, superClass) {
90
90
  configurable: true
91
91
  }
92
92
  });
93
- if (superClass) _set_prototype_of(subClass, superClass);
93
+ if (superClass) _setPrototypeOf(subClass, superClass);
94
94
  }
95
95
  function _instanceof(left, right) {
96
96
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
@@ -99,41 +99,41 @@ function _instanceof(left, right) {
99
99
  return left instanceof right;
100
100
  }
101
101
  }
102
- function _iterable_to_array(iter) {
102
+ function _iterableToArray(iter) {
103
103
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
104
104
  }
105
- function _non_iterable_spread() {
105
+ function _nonIterableSpread() {
106
106
  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
107
  }
108
- function _possible_constructor_return(self, call) {
109
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
108
+ function _possibleConstructorReturn(self, call) {
109
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
110
110
  return call;
111
111
  }
112
- return _assert_this_initialized(self);
112
+ return _assertThisInitialized(self);
113
113
  }
114
- function _set_prototype_of(o, p) {
115
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
114
+ function _setPrototypeOf(o, p) {
115
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
116
116
  o.__proto__ = p;
117
117
  return o;
118
118
  };
119
- return _set_prototype_of(o, p);
119
+ return _setPrototypeOf(o, p);
120
120
  }
121
- function _to_consumable_array(arr) {
122
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
121
+ function _toConsumableArray(arr) {
122
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
123
123
  }
124
- function _type_of(obj) {
124
+ var _typeof = function(obj) {
125
125
  "@swc/helpers - typeof";
126
126
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
127
- }
128
- function _unsupported_iterable_to_array(o, minLen) {
127
+ };
128
+ function _unsupportedIterableToArray(o, minLen) {
129
129
  if (!o) return;
130
- if (typeof o === "string") return _array_like_to_array(o, minLen);
130
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
131
131
  var n = Object.prototype.toString.call(o).slice(8, -1);
132
132
  if (n === "Object" && o.constructor) n = o.constructor.name;
133
133
  if (n === "Map" || n === "Set") return Array.from(n);
134
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
134
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
135
135
  }
136
- function _is_native_reflect_construct() {
136
+ function _isNativeReflectConstruct() {
137
137
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
138
138
  if (Reflect.construct.sham) return false;
139
139
  if (typeof Proxy === "function") return true;
@@ -144,20 +144,20 @@ function _is_native_reflect_construct() {
144
144
  return false;
145
145
  }
146
146
  }
147
- function _create_super(Derived) {
148
- var hasNativeReflectConstruct = _is_native_reflect_construct();
147
+ function _createSuper(Derived) {
148
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
149
149
  return function _createSuperInternal() {
150
- var Super = _get_prototype_of(Derived), result;
150
+ var Super = _getPrototypeOf(Derived), result;
151
151
  if (hasNativeReflectConstruct) {
152
- var NewTarget = _get_prototype_of(this).constructor;
152
+ var NewTarget = _getPrototypeOf(this).constructor;
153
153
  result = Reflect.construct(Super, arguments, NewTarget);
154
154
  } else {
155
155
  result = Super.apply(this, arguments);
156
156
  }
157
- return _possible_constructor_return(this, result);
157
+ return _possibleConstructorReturn(this, result);
158
158
  };
159
159
  }
160
- function _ts_generator(thisArg, body) {
160
+ var __generator = this && this.__generator || function(thisArg, body) {
161
161
  var f, y, t, g, _ = {
162
162
  label: 0,
163
163
  sent: function() {
@@ -251,7 +251,7 @@ function _ts_generator(thisArg, body) {
251
251
  done: true
252
252
  };
253
253
  }
254
- }
254
+ };
255
255
  import { RegisterControls, controlHooksEmitter } from "@byteluck-fe/model-driven-core";
256
256
  import EventLogic from "./EventLogic";
257
257
  import { FieldTypes } from "@byteluck-fe/model-driven-shared";
@@ -259,23 +259,23 @@ import { toSchema, getModelBindInfoList, checkSchema } from "./utils";
259
259
  var Designer = /*#__PURE__*/ function _target(RegisterControls) {
260
260
  "use strict";
261
261
  _inherits(Designer, RegisterControls);
262
- var _super = _create_super(Designer);
262
+ var _super = _createSuper(Designer);
263
263
  function Designer() {
264
- _class_call_check(this, Designer);
264
+ _classCallCheck(this, Designer);
265
265
  var _this;
266
266
  _this = _super.call(this, "Designer");
267
- _define_property(_assert_this_initialized(_this), "toolbox", []);
268
- _define_property(_assert_this_initialized(_this), "services", {});
269
- _define_property(_assert_this_initialized(_this), "eventLogic", new EventLogic());
270
- _define_property(_assert_this_initialized(_this), "fieldTypes", FieldTypes);
271
- _define_property(_assert_this_initialized(_this), "controlSettingMap", new Map());
267
+ _defineProperty(_assertThisInitialized(_this), "toolbox", []);
268
+ _defineProperty(_assertThisInitialized(_this), "services", {});
269
+ _defineProperty(_assertThisInitialized(_this), "eventLogic", new EventLogic());
270
+ _defineProperty(_assertThisInitialized(_this), "fieldTypes", FieldTypes);
271
+ _defineProperty(_assertThisInitialized(_this), "controlSettingMap", new Map());
272
272
  (_instanceof(this, Designer) ? this.constructor : void 0).staticControls.forEach(function(control) {
273
273
  var _$Designer = control.Designer, Setting = control.Setting;
274
274
  _this.controlSettingMap.set(_$Designer.controlType, Setting);
275
275
  });
276
276
  return _this;
277
277
  }
278
- _create_class(Designer, [
278
+ _createClass(Designer, [
279
279
  {
280
280
  key: "registerControl",
281
281
  value: function registerControl(control) {
@@ -332,11 +332,11 @@ var Designer = /*#__PURE__*/ function _target(RegisterControls) {
332
332
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
333
333
  args[_key] = arguments[_key];
334
334
  }
335
- return _async_to_generator(function() {
336
- return _ts_generator(this, function(_state) {
335
+ return _asyncToGenerator(function() {
336
+ return __generator(this, function(_state) {
337
337
  return [
338
338
  2,
339
- checkSchema.apply(void 0, _to_consumable_array(args))
339
+ checkSchema.apply(void 0, _toConsumableArray(args))
340
340
  ];
341
341
  });
342
342
  })();
@@ -348,7 +348,7 @@ var Designer = /*#__PURE__*/ function _target(RegisterControls) {
348
348
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
349
349
  args[_key] = arguments[_key];
350
350
  }
351
- return getModelBindInfoList.apply(void 0, _to_consumable_array(args));
351
+ return getModelBindInfoList.apply(void 0, _toConsumableArray(args));
352
352
  }
353
353
  },
354
354
  {
@@ -357,7 +357,7 @@ var Designer = /*#__PURE__*/ function _target(RegisterControls) {
357
357
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
358
358
  args[_key] = arguments[_key];
359
359
  }
360
- return toSchema.apply(void 0, _to_consumable_array(args));
360
+ return toSchema.apply(void 0, _toConsumableArray(args));
361
361
  }
362
362
  },
363
363
  {
@@ -367,12 +367,12 @@ var Designer = /*#__PURE__*/ function _target(RegisterControls) {
367
367
  args[_key] = arguments[_key];
368
368
  }
369
369
  var _controlHooksEmitter;
370
- return (_controlHooksEmitter = controlHooksEmitter).on.apply(_controlHooksEmitter, _to_consumable_array(args));
370
+ return (_controlHooksEmitter = controlHooksEmitter).on.apply(_controlHooksEmitter, _toConsumableArray(args));
371
371
  }
372
372
  }
373
373
  ]);
374
374
  return Designer;
375
375
  }(RegisterControls);
376
- _define_property(Designer, "EventLogic", EventLogic);
376
+ _defineProperty(Designer, "EventLogic", EventLogic);
377
377
  export { Designer as default };
378
378
  export { Designer };