@byteluck-fe/model-driven-driven 2.5.0-alpha.6 → 2.5.0-alpha.7

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 _classCallCheck(instance, Constructor) {
1
+ function _class_call_check(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 _createClass(Constructor, protoProps, staticProps) {
15
+ function _create_class(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 _defineProperty(obj, key, value) {
20
+ function _define_property(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
- _classCallCheck(this, Builder);
39
- _defineProperty(this, "designer", new Designer());
38
+ _class_call_check(this, Builder);
39
+ _define_property(this, "designer", new Designer());
40
40
  }
41
- _createClass(Builder, [
41
+ _create_class(Builder, [
42
42
  {
43
43
  key: "ListPageBuilder",
44
44
  value: // @ts-ignore
@@ -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,7 +41,7 @@ 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
  }
@@ -55,12 +55,12 @@ function _defineProperties(target, props) {
55
55
  Object.defineProperty(target, descriptor.key, descriptor);
56
56
  }
57
57
  }
58
- function _createClass(Constructor, protoProps, staticProps) {
58
+ function _create_class(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 _defineProperty(obj, key, value) {
63
+ function _define_property(obj, key, value) {
64
64
  if (key in obj) {
65
65
  Object.defineProperty(obj, key, {
66
66
  value: value,
@@ -73,11 +73,11 @@ function _defineProperty(obj, key, value) {
73
73
  }
74
74
  return obj;
75
75
  }
76
- function _getPrototypeOf(o) {
77
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
76
+ function _get_prototype_of(o) {
77
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
78
78
  return o.__proto__ || Object.getPrototypeOf(o);
79
79
  };
80
- return _getPrototypeOf(o);
80
+ return _get_prototype_of(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) _setPrototypeOf(subClass, superClass);
93
+ if (superClass) _set_prototype_of(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 _iterableToArray(iter) {
102
+ function _iterable_to_array(iter) {
103
103
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
104
104
  }
105
- function _nonIterableSpread() {
105
+ function _non_iterable_spread() {
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 _possibleConstructorReturn(self, call) {
109
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
108
+ function _possible_constructor_return(self, call) {
109
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
110
110
  return call;
111
111
  }
112
- return _assertThisInitialized(self);
112
+ return _assert_this_initialized(self);
113
113
  }
114
- function _setPrototypeOf(o, p) {
115
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
114
+ function _set_prototype_of(o, p) {
115
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
116
116
  o.__proto__ = p;
117
117
  return o;
118
118
  };
119
- return _setPrototypeOf(o, p);
119
+ return _set_prototype_of(o, p);
120
120
  }
121
- function _toConsumableArray(arr) {
122
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
121
+ function _to_consumable_array(arr) {
122
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
123
123
  }
124
- var _typeof = function(obj) {
124
+ function _type_of(obj) {
125
125
  "@swc/helpers - typeof";
126
126
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
127
- };
128
- function _unsupportedIterableToArray(o, minLen) {
127
+ }
128
+ function _unsupported_iterable_to_array(o, minLen) {
129
129
  if (!o) return;
130
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
130
+ if (typeof o === "string") return _array_like_to_array(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 _arrayLikeToArray(o, minLen);
134
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
135
135
  }
136
- function _isNativeReflectConstruct() {
136
+ function _is_native_reflect_construct() {
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,17 +144,17 @@ function _isNativeReflectConstruct() {
144
144
  return false;
145
145
  }
146
146
  }
147
- function _createSuper(Derived) {
148
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
147
+ function _create_super(Derived) {
148
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
149
149
  return function _createSuperInternal() {
150
- var Super = _getPrototypeOf(Derived), result;
150
+ var Super = _get_prototype_of(Derived), result;
151
151
  if (hasNativeReflectConstruct) {
152
- var NewTarget = _getPrototypeOf(this).constructor;
152
+ var NewTarget = _get_prototype_of(this).constructor;
153
153
  result = Reflect.construct(Super, arguments, NewTarget);
154
154
  } else {
155
155
  result = Super.apply(this, arguments);
156
156
  }
157
- return _possibleConstructorReturn(this, result);
157
+ return _possible_constructor_return(this, result);
158
158
  };
159
159
  }
160
160
  var __generator = this && this.__generator || function(thisArg, body) {
@@ -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 = _createSuper(Designer);
262
+ var _super = _create_super(Designer);
263
263
  function Designer() {
264
- _classCallCheck(this, Designer);
264
+ _class_call_check(this, Designer);
265
265
  var _this;
266
266
  _this = _super.call(this, "Designer");
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());
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());
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
- _createClass(Designer, [
278
+ _create_class(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 _asyncToGenerator(function() {
335
+ return _async_to_generator(function() {
336
336
  return __generator(this, function(_state) {
337
337
  return [
338
338
  2,
339
- checkSchema.apply(void 0, _toConsumableArray(args))
339
+ checkSchema.apply(void 0, _to_consumable_array(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, _toConsumableArray(args));
351
+ return getModelBindInfoList.apply(void 0, _to_consumable_array(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, _toConsumableArray(args));
360
+ return toSchema.apply(void 0, _to_consumable_array(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, _toConsumableArray(args));
370
+ return (_controlHooksEmitter = controlHooksEmitter).on.apply(_controlHooksEmitter, _to_consumable_array(args));
371
371
  }
372
372
  }
373
373
  ]);
374
374
  return Designer;
375
375
  }(RegisterControls);
376
- _defineProperty(Designer, "EventLogic", EventLogic);
376
+ _define_property(Designer, "EventLogic", EventLogic);
377
377
  export { Designer as default };
378
378
  export { Designer };
@@ -1,21 +1,21 @@
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 _arrayWithHoles(arr) {
6
+ function _array_with_holes(arr) {
7
7
  if (Array.isArray(arr)) return arr;
8
8
  }
9
- function _arrayWithoutHoles(arr) {
10
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
9
+ function _array_without_holes(arr) {
10
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
11
11
  }
12
- function _assertThisInitialized(self) {
12
+ function _assert_this_initialized(self) {
13
13
  if (self === void 0) {
14
14
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15
15
  }
16
16
  return self;
17
17
  }
18
- function _classCallCheck(instance, Constructor) {
18
+ function _class_call_check(instance, Constructor) {
19
19
  if (!(instance instanceof Constructor)) {
20
20
  throw new TypeError("Cannot call a class as a function");
21
21
  }
@@ -29,12 +29,12 @@ function _defineProperties(target, props) {
29
29
  Object.defineProperty(target, descriptor.key, descriptor);
30
30
  }
31
31
  }
32
- function _createClass(Constructor, protoProps, staticProps) {
32
+ function _create_class(Constructor, protoProps, staticProps) {
33
33
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
34
34
  if (staticProps) _defineProperties(Constructor, staticProps);
35
35
  return Constructor;
36
36
  }
37
- function _defineProperty(obj, key, value) {
37
+ function _define_property(obj, key, value) {
38
38
  if (key in obj) {
39
39
  Object.defineProperty(obj, key, {
40
40
  value: value,
@@ -51,23 +51,23 @@ function _get(target, property, receiver) {
51
51
  if (typeof Reflect !== "undefined" && Reflect.get) {
52
52
  _get = Reflect.get;
53
53
  } else {
54
- _get = function _get(target, property, receiver) {
55
- var base = _superPropBase(target, property);
54
+ _get = function get(target, property, receiver) {
55
+ var base = _super_prop_base(target, property);
56
56
  if (!base) return;
57
57
  var desc = Object.getOwnPropertyDescriptor(base, property);
58
58
  if (desc.get) {
59
- return desc.get.call(receiver);
59
+ return desc.get.call(receiver || target);
60
60
  }
61
61
  return desc.value;
62
62
  };
63
63
  }
64
64
  return _get(target, property, receiver || target);
65
65
  }
66
- function _getPrototypeOf(o) {
67
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
66
+ function _get_prototype_of(o) {
67
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
68
68
  return o.__proto__ || Object.getPrototypeOf(o);
69
69
  };
70
- return _getPrototypeOf(o);
70
+ return _get_prototype_of(o);
71
71
  }
72
72
  function _inherits(subClass, superClass) {
73
73
  if (typeof superClass !== "function" && superClass !== null) {
@@ -80,12 +80,12 @@ function _inherits(subClass, superClass) {
80
80
  configurable: true
81
81
  }
82
82
  });
83
- if (superClass) _setPrototypeOf(subClass, superClass);
83
+ if (superClass) _set_prototype_of(subClass, superClass);
84
84
  }
85
- function _iterableToArray(iter) {
85
+ function _iterable_to_array(iter) {
86
86
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
87
87
  }
88
- function _iterableToArrayLimit(arr, i) {
88
+ function _iterable_to_array_limit(arr, i) {
89
89
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
90
90
  if (_i == null) return;
91
91
  var _arr = [];
@@ -109,13 +109,13 @@ function _iterableToArrayLimit(arr, i) {
109
109
  }
110
110
  return _arr;
111
111
  }
112
- function _nonIterableRest() {
112
+ function _non_iterable_rest() {
113
113
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
114
114
  }
115
- function _nonIterableSpread() {
115
+ function _non_iterable_spread() {
116
116
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
117
117
  }
118
- function _objectSpread(target) {
118
+ function _object_spread(target) {
119
119
  for(var i = 1; i < arguments.length; i++){
120
120
  var source = arguments[i] != null ? arguments[i] : {};
121
121
  var ownKeys = Object.keys(source);
@@ -125,50 +125,50 @@ function _objectSpread(target) {
125
125
  }));
126
126
  }
127
127
  ownKeys.forEach(function(key) {
128
- _defineProperty(target, key, source[key]);
128
+ _define_property(target, key, source[key]);
129
129
  });
130
130
  }
131
131
  return target;
132
132
  }
133
- function _possibleConstructorReturn(self, call) {
134
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
133
+ function _possible_constructor_return(self, call) {
134
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
135
135
  return call;
136
136
  }
137
- return _assertThisInitialized(self);
137
+ return _assert_this_initialized(self);
138
138
  }
139
- function _setPrototypeOf(o, p) {
140
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
139
+ function _set_prototype_of(o, p) {
140
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
141
141
  o.__proto__ = p;
142
142
  return o;
143
143
  };
144
- return _setPrototypeOf(o, p);
144
+ return _set_prototype_of(o, p);
145
145
  }
146
- function _slicedToArray(arr, i) {
147
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
146
+ function _sliced_to_array(arr, i) {
147
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
148
148
  }
149
- function _superPropBase(object, property) {
149
+ function _super_prop_base(object, property) {
150
150
  while(!Object.prototype.hasOwnProperty.call(object, property)){
151
- object = _getPrototypeOf(object);
151
+ object = _get_prototype_of(object);
152
152
  if (object === null) break;
153
153
  }
154
154
  return object;
155
155
  }
156
- function _toConsumableArray(arr) {
157
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
156
+ function _to_consumable_array(arr) {
157
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
158
158
  }
159
- var _typeof = function(obj) {
159
+ function _type_of(obj) {
160
160
  "@swc/helpers - typeof";
161
161
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
162
- };
163
- function _unsupportedIterableToArray(o, minLen) {
162
+ }
163
+ function _unsupported_iterable_to_array(o, minLen) {
164
164
  if (!o) return;
165
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
165
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
166
166
  var n = Object.prototype.toString.call(o).slice(8, -1);
167
167
  if (n === "Object" && o.constructor) n = o.constructor.name;
168
168
  if (n === "Map" || n === "Set") return Array.from(n);
169
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
169
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
170
170
  }
171
- function _isNativeReflectConstruct() {
171
+ function _is_native_reflect_construct() {
172
172
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
173
173
  if (Reflect.construct.sham) return false;
174
174
  if (typeof Proxy === "function") return true;
@@ -179,17 +179,17 @@ function _isNativeReflectConstruct() {
179
179
  return false;
180
180
  }
181
181
  }
182
- function _createSuper(Derived) {
183
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
182
+ function _create_super(Derived) {
183
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
184
184
  return function _createSuperInternal() {
185
- var Super = _getPrototypeOf(Derived), result;
185
+ var Super = _get_prototype_of(Derived), result;
186
186
  if (hasNativeReflectConstruct) {
187
- var NewTarget = _getPrototypeOf(this).constructor;
187
+ var NewTarget = _get_prototype_of(this).constructor;
188
188
  result = Reflect.construct(Super, arguments, NewTarget);
189
189
  } else {
190
190
  result = Super.apply(this, arguments);
191
191
  }
192
- return _possibleConstructorReturn(this, result);
192
+ return _possible_constructor_return(this, result);
193
193
  };
194
194
  }
195
195
  import { CONTROL_BASE_TYPE, error, genNonDuplicateId, isArray, isBuiltInControls, isObject, isString, updateValueFromKeys, warn, Watcher } from "@byteluck-fe/model-driven-shared";
@@ -205,42 +205,42 @@ var applyingPluginName = "";
205
205
  * */ var Driven = /*#__PURE__*/ function(Watcher) {
206
206
  "use strict";
207
207
  _inherits(Driven, Watcher);
208
- var _super = _createSuper(Driven);
208
+ var _super = _create_super(Driven);
209
209
  function Driven(options) {
210
- _classCallCheck(this, Driven);
210
+ _class_call_check(this, Driven);
211
211
  var _this;
212
212
  _this = _super.call(this);
213
- _defineProperty(_assertThisInitialized(_this), "mode", void 0);
214
- _defineProperty(_assertThisInitialized(_this), "isMounted", false);
215
- _defineProperty(_assertThisInitialized(_this), "id", genNonDuplicateId(8));
213
+ _define_property(_assert_this_initialized(_this), "mode", void 0);
214
+ _define_property(_assert_this_initialized(_this), "isMounted", false);
215
+ _define_property(_assert_this_initialized(_this), "id", genNonDuplicateId(8));
216
216
  /**
217
217
  * 控件可选的事件
218
- * */ _defineProperty(_assertThisInitialized(_this), "eventLogic", void 0);
218
+ * */ _define_property(_assert_this_initialized(_this), "eventLogic", void 0);
219
219
  /**
220
220
  * 处理数据存储,存放模型等
221
- * */ _defineProperty(_assertThisInitialized(_this), "store", void 0);
221
+ * */ _define_property(_assert_this_initialized(_this), "store", void 0);
222
222
  /**
223
223
  * 额外参数存储
224
- */ _defineProperty(_assertThisInitialized(_this), "externalParams", void 0);
224
+ */ _define_property(_assert_this_initialized(_this), "externalParams", void 0);
225
225
  /**
226
226
  * 处理instance,和schema存储
227
- * */ _defineProperty(_assertThisInitialized(_this), "designer", void 0);
227
+ * */ _define_property(_assert_this_initialized(_this), "designer", void 0);
228
228
  /**
229
229
  * 插件数组
230
- * */ _defineProperty(_assertThisInitialized(_this), "__plugins", void 0);
231
- _defineProperty(_assertThisInitialized(_this), "__pluginsApplied", false);
232
- _defineProperty(_assertThisInitialized(_this), "$options", void 0);
230
+ * */ _define_property(_assert_this_initialized(_this), "__plugins", void 0);
231
+ _define_property(_assert_this_initialized(_this), "__pluginsApplied", false);
232
+ _define_property(_assert_this_initialized(_this), "$options", void 0);
233
233
  // TODO 拿到schema
234
- _defineProperty(_assertThisInitialized(_this), "getSchema", toSchema);
234
+ _define_property(_assert_this_initialized(_this), "getSchema", toSchema);
235
235
  // TODO 拿到model_bind_info_list
236
- _defineProperty(_assertThisInitialized(_this), "getModelBindInfoList", getModelBindInfoList);
236
+ _define_property(_assert_this_initialized(_this), "getModelBindInfoList", getModelBindInfoList);
237
237
  // TODO 拿到permission_controls
238
- _defineProperty(_assertThisInitialized(_this), "generatePermissions", generatePermissions);
238
+ _define_property(_assert_this_initialized(_this), "generatePermissions", generatePermissions);
239
239
  _this.$options = Object.freeze(options);
240
240
  var _this_$options = _this.$options, _this_$options_autoMount = _this_$options.autoMount, autoMount = _this_$options_autoMount === void 0 ? false : _this_$options_autoMount, tmp = _this_$options.Designer, DesignerClass = tmp === void 0 ? Designer : tmp, schema = _this_$options.schema, _this_$options_mode = _this_$options.mode, mode = _this_$options_mode === void 0 ? "form" : _this_$options_mode, tmp1 = _this_$options.store, storeOptions = tmp1 === void 0 ? {} : tmp1;
241
241
  _this.eventLogic = new EventLogic();
242
242
  _this.designer = new DesignerClass();
243
- _this.store = new Store(_objectSpread({
243
+ _this.store = new Store(_object_spread({
244
244
  instance: _this.designer.createControl(Array.isArray(schema) ? schema : [
245
245
  schema
246
246
  ])
@@ -249,7 +249,7 @@ var applyingPluginName = "";
249
249
  autoMount && _this.mount();
250
250
  return _this;
251
251
  }
252
- _createClass(Driven, [
252
+ _create_class(Driven, [
253
253
  {
254
254
  key: "mount",
255
255
  value: // 挂载
@@ -293,13 +293,13 @@ var applyingPluginName = "";
293
293
  for(var _len = arguments.length, payload = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
294
294
  payload[_key - 1] = arguments[_key];
295
295
  }
296
- return _get(_getPrototypeOf(Driven.prototype), "emit", this).call(this, key, payload);
296
+ return _get(_get_prototype_of(Driven.prototype), "emit", this).call(this, key, payload);
297
297
  }
298
298
  },
299
299
  {
300
300
  key: "on",
301
301
  value: function on(key, callback) {
302
- return _get(_getPrototypeOf(Driven.prototype), "on", this).call(this, key, callback);
302
+ return _get(_get_prototype_of(Driven.prototype), "on", this).call(this, key, callback);
303
303
  }
304
304
  },
305
305
  {
@@ -379,12 +379,12 @@ var applyingPluginName = "";
379
379
  }
380
380
  var otherTab = otherTabSettings.splice(otherTabIndex, 1)[0];
381
381
  if (otherTab) {
382
- result.items = _toConsumableArray(_this.formatGroupSetting(otherTab.items, settingFromId)).concat(_toConsumableArray(result.items));
382
+ result.items = _to_consumable_array(_this.formatGroupSetting(otherTab.items, settingFromId)).concat(_to_consumable_array(result.items));
383
383
  }
384
384
  return result;
385
385
  });
386
386
  if (otherTabSettings.length) {
387
- result = _toConsumableArray(result).concat(_toConsumableArray(otherTabSettings.map(function(item) {
387
+ result = _to_consumable_array(result).concat(_to_consumable_array(otherTabSettings.map(function(item) {
388
388
  return _this.formatGroupSetting(item, settingFromId);
389
389
  })));
390
390
  }
@@ -392,7 +392,7 @@ var applyingPluginName = "";
392
392
  } else if (((_settings_1 = settings[0]) === null || _settings_1 === void 0 ? void 0 : _settings_1.type) === "group" && ((_otherSettings_1 = otherSettings[0]) === null || _otherSettings_1 === void 0 ? void 0 : _otherSettings_1.type) === "group") {
393
393
  var groupSettings = settings;
394
394
  var otherGroupSettings = otherSettings;
395
- result = _toConsumableArray(this.formatGroupSetting(otherGroupSettings, settingFromId)).concat(_toConsumableArray(groupSettings));
395
+ result = _to_consumable_array(this.formatGroupSetting(otherGroupSettings, settingFromId)).concat(_to_consumable_array(groupSettings));
396
396
  } else {
397
397
  // 一个是tab,一个是group,暂时不支持
398
398
  }
@@ -422,7 +422,7 @@ var applyingPluginName = "";
422
422
  args[_key] = arguments[_key];
423
423
  }
424
424
  var _this_designer;
425
- return (_this_designer = this.designer).registerControlConfig.apply(_this_designer, _toConsumableArray(args));
425
+ return (_this_designer = this.designer).registerControlConfig.apply(_this_designer, _to_consumable_array(args));
426
426
  }
427
427
  },
428
428
  {
@@ -504,9 +504,9 @@ var applyingPluginName = "";
504
504
  };
505
505
  this.callSelectedScopeEffect(payload);
506
506
  if (oldParent) {
507
- this.emit("moved", _objectSpread({}, payload));
507
+ this.emit("moved", _object_spread({}, payload));
508
508
  } else {
509
- this.emit("joined", _objectSpread({}, payload));
509
+ this.emit("joined", _object_spread({}, payload));
510
510
  }
511
511
  }
512
512
  },
@@ -585,7 +585,7 @@ var applyingPluginName = "";
585
585
  var prevKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "";
586
586
  var _this = this;
587
587
  Object.entries(props).forEach(function(param) {
588
- var _param = _slicedToArray(param, 2), key = _param[0], value = _param[1];
588
+ var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
589
589
  var propName = "".concat(prevKey ? prevKey + "." : "").concat(key);
590
590
  if (isObject(value)) {
591
591
  _this.updateInstanceProps(instance, value, payload, propName);
@@ -701,7 +701,7 @@ var applyingPluginName = "";
701
701
  arg[_key] = arguments[_key];
702
702
  }
703
703
  var _this_designer;
704
- (_this_designer = this.designer).registerControl.apply(_this_designer, _toConsumableArray(arg));
704
+ (_this_designer = this.designer).registerControl.apply(_this_designer, _to_consumable_array(arg));
705
705
  return this;
706
706
  }
707
707
  },
@@ -747,7 +747,7 @@ var applyingPluginName = "";
747
747
  var payload = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
748
748
  var _this = this;
749
749
  this.store.selectedInstanceSettingItems.forEach(function(setting) {
750
- setting.callEffect(effectKey, _this, _objectSpread({
750
+ setting.callEffect(effectKey, _this, _object_spread({
751
751
  control: _this.store.selected
752
752
  }, payload));
753
753
  });
@@ -759,7 +759,7 @@ var applyingPluginName = "";
759
759
  var payload = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
760
760
  var _this = this;
761
761
  this.store.selectedInstanceSettingItems.forEach(function(setting) {
762
- setting.callScopeEffect(_this, _objectSpread({
762
+ setting.callScopeEffect(_this, _object_spread({
763
763
  control: _this.store.selected
764
764
  }, payload));
765
765
  });
@@ -774,7 +774,7 @@ var applyingPluginName = "";
774
774
  arg[_key] = arguments[_key];
775
775
  }
776
776
  var _Designer;
777
- (_Designer = Designer).register.apply(_Designer, _toConsumableArray(arg));
777
+ (_Designer = Designer).register.apply(_Designer, _to_consumable_array(arg));
778
778
  return this;
779
779
  }
780
780
  },
@@ -789,5 +789,5 @@ var applyingPluginName = "";
789
789
  }(Watcher);
790
790
  /**
791
791
  * 控件事件定义
792
- * */ _defineProperty(Driven, "EventLogic", EventLogic);
792
+ * */ _define_property(Driven, "EventLogic", EventLogic);
793
793
  export { Driven };
@@ -1,10 +1,10 @@
1
- function _classCallCheck(instance, Constructor) {
1
+ function _class_call_check(instance, Constructor) {
2
2
  if (!(instance instanceof Constructor)) {
3
3
  throw new TypeError("Cannot call a class as a function");
4
4
  }
5
5
  }
6
6
  var Plugin = function Plugin() {
7
7
  "use strict";
8
- _classCallCheck(this, Plugin);
8
+ _class_call_check(this, Plugin);
9
9
  };
10
10
  export { Plugin };