@byteluck-fe/model-driven-driven 6.2.0-beta.8 → 6.2.0-cyj.0

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,7 +1,5 @@
1
1
  function _class_call_check(instance, Constructor) {
2
- if (!(instance instanceof Constructor)) {
3
- throw new TypeError("Cannot call a class as a function");
4
- }
2
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
5
3
  }
6
4
  function _defineProperties(target, props) {
7
5
  for(var i = 0; i < props.length; i++){
@@ -25,9 +23,7 @@ function _define_property(obj, key, value) {
25
23
  configurable: true,
26
24
  writable: true
27
25
  });
28
- } else {
29
- obj[key] = value;
30
- }
26
+ } else obj[key] = value;
31
27
  return obj;
32
28
  }
33
29
  import { getLocaleText } from '@byteluck-fe/locale-message';
@@ -7,9 +7,7 @@ function _array_without_holes(arr) {
7
7
  if (Array.isArray(arr)) return _array_like_to_array(arr);
8
8
  }
9
9
  function _assert_this_initialized(self) {
10
- if (self === void 0) {
11
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
12
- }
10
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13
11
  return self;
14
12
  }
15
13
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -20,11 +18,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
20
18
  reject(error);
21
19
  return;
22
20
  }
23
- if (info.done) {
24
- resolve(value);
25
- } else {
26
- Promise.resolve(value).then(_next, _throw);
27
- }
21
+ if (info.done) resolve(value);
22
+ else Promise.resolve(value).then(_next, _throw);
28
23
  }
29
24
  function _async_to_generator(fn) {
30
25
  return function() {
@@ -46,9 +41,7 @@ function _call_super(_this, derived, args) {
46
41
  return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
47
42
  }
48
43
  function _class_call_check(instance, Constructor) {
49
- if (!(instance instanceof Constructor)) {
50
- throw new TypeError("Cannot call a class as a function");
51
- }
44
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
52
45
  }
53
46
  function _defineProperties(target, props) {
54
47
  for(var i = 0; i < props.length; i++){
@@ -72,9 +65,7 @@ function _define_property(obj, key, value) {
72
65
  configurable: true,
73
66
  writable: true
74
67
  });
75
- } else {
76
- obj[key] = value;
77
- }
68
+ } else obj[key] = value;
78
69
  return obj;
79
70
  }
80
71
  function _get_prototype_of(o) {
@@ -97,22 +88,29 @@ function _inherits(subClass, superClass) {
97
88
  if (superClass) _set_prototype_of(subClass, superClass);
98
89
  }
99
90
  function _instanceof(left, right) {
91
+ "@swc/helpers - instanceof";
100
92
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
101
93
  return !!right[Symbol.hasInstance](left);
102
- } else {
103
- return left instanceof right;
104
- }
94
+ } else return left instanceof right;
95
+ }
96
+ function _is_native_reflect_construct() {
97
+ try {
98
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
99
+ } catch (_) {}
100
+ return (_is_native_reflect_construct = function() {
101
+ return !!result;
102
+ })();
105
103
  }
106
104
  function _iterable_to_array(iter) {
107
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
105
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
106
+ return Array.from(iter);
107
+ }
108
108
  }
109
109
  function _non_iterable_spread() {
110
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
110
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
111
111
  }
112
112
  function _possible_constructor_return(self, call) {
113
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
114
- return call;
115
- }
113
+ if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
116
114
  return _assert_this_initialized(self);
117
115
  }
118
116
  function _set_prototype_of(o, p) {
@@ -125,26 +123,6 @@ function _set_prototype_of(o, p) {
125
123
  function _to_consumable_array(arr) {
126
124
  return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
127
125
  }
128
- function _type_of(obj) {
129
- "@swc/helpers - typeof";
130
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
131
- }
132
- function _unsupported_iterable_to_array(o, minLen) {
133
- if (!o) return;
134
- if (typeof o === "string") return _array_like_to_array(o, minLen);
135
- var n = Object.prototype.toString.call(o).slice(8, -1);
136
- if (n === "Object" && o.constructor) n = o.constructor.name;
137
- if (n === "Map" || n === "Set") return Array.from(n);
138
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
139
- }
140
- function _is_native_reflect_construct() {
141
- try {
142
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
143
- } catch (_) {}
144
- return (_is_native_reflect_construct = function() {
145
- return !!result;
146
- })();
147
- }
148
126
  function _ts_generator(thisArg, body) {
149
127
  var f, y, t, _ = {
150
128
  label: 0,
@@ -244,6 +222,18 @@ function _ts_generator(thisArg, body) {
244
222
  };
245
223
  }
246
224
  }
225
+ function _type_of(obj) {
226
+ "@swc/helpers - typeof";
227
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
228
+ }
229
+ function _unsupported_iterable_to_array(o, minLen) {
230
+ if (!o) return;
231
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
232
+ var n = Object.prototype.toString.call(o).slice(8, -1);
233
+ if (n === "Object" && o.constructor) n = o.constructor.name;
234
+ if (n === "Map" || n === "Set") return Array.from(n);
235
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
236
+ }
247
237
  import { RegisterControls, controlHooksEmitter } from '@byteluck-fe/model-driven-core';
248
238
  import EventLogic from './EventLogic';
249
239
  import { FieldTypes } from '@byteluck-fe/model-driven-shared';
@@ -10,9 +10,7 @@ function _array_without_holes(arr) {
10
10
  if (Array.isArray(arr)) return _array_like_to_array(arr);
11
11
  }
12
12
  function _assert_this_initialized(self) {
13
- if (self === void 0) {
14
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15
- }
13
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
16
14
  return self;
17
15
  }
18
16
  function _call_super(_this, derived, args) {
@@ -20,9 +18,7 @@ function _call_super(_this, derived, args) {
20
18
  return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
19
  }
22
20
  function _class_call_check(instance, Constructor) {
23
- if (!(instance instanceof Constructor)) {
24
- throw new TypeError("Cannot call a class as a function");
25
- }
21
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
26
22
  }
27
23
  function _defineProperties(target, props) {
28
24
  for(var i = 0; i < props.length; i++){
@@ -46,22 +42,17 @@ function _define_property(obj, key, value) {
46
42
  configurable: true,
47
43
  writable: true
48
44
  });
49
- } else {
50
- obj[key] = value;
51
- }
45
+ } else obj[key] = value;
52
46
  return obj;
53
47
  }
54
48
  function _get(target, property, receiver) {
55
- if (typeof Reflect !== "undefined" && Reflect.get) {
56
- _get = Reflect.get;
57
- } else {
49
+ if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get;
50
+ else {
58
51
  _get = function get(target, property, receiver) {
59
52
  var base = _super_prop_base(target, property);
60
53
  if (!base) return;
61
54
  var desc = Object.getOwnPropertyDescriptor(base, property);
62
- if (desc.get) {
63
- return desc.get.call(receiver || target);
64
- }
55
+ if (desc.get) return desc.get.call(receiver || target);
65
56
  return desc.value;
66
57
  };
67
58
  }
@@ -86,8 +77,18 @@ function _inherits(subClass, superClass) {
86
77
  });
87
78
  if (superClass) _set_prototype_of(subClass, superClass);
88
79
  }
80
+ function _is_native_reflect_construct() {
81
+ try {
82
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
83
+ } catch (_) {}
84
+ return (_is_native_reflect_construct = function() {
85
+ return !!result;
86
+ })();
87
+ }
89
88
  function _iterable_to_array(iter) {
90
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
89
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
90
+ return Array.from(iter);
91
+ }
91
92
  }
92
93
  function _iterable_to_array_limit(arr, i) {
93
94
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
@@ -114,10 +115,10 @@ function _iterable_to_array_limit(arr, i) {
114
115
  return _arr;
115
116
  }
116
117
  function _non_iterable_rest() {
117
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
118
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
118
119
  }
119
120
  function _non_iterable_spread() {
120
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
121
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
121
122
  }
122
123
  function _object_spread(target) {
123
124
  for(var i = 1; i < arguments.length; i++){
@@ -135,9 +136,7 @@ function _object_spread(target) {
135
136
  return target;
136
137
  }
137
138
  function _possible_constructor_return(self, call) {
138
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
139
- return call;
140
- }
139
+ if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
141
140
  return _assert_this_initialized(self);
142
141
  }
143
142
  function _set_prototype_of(o, p) {
@@ -172,14 +171,6 @@ function _unsupported_iterable_to_array(o, minLen) {
172
171
  if (n === "Map" || n === "Set") return Array.from(n);
173
172
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
174
173
  }
175
- function _is_native_reflect_construct() {
176
- try {
177
- var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
178
- } catch (_) {}
179
- return (_is_native_reflect_construct = function() {
180
- return !!result;
181
- })();
182
- }
183
174
  import { CONTROL_BASE_TYPE, error, genNonDuplicateId, isArray, isBuiltInControls, isObject, isString, updateValueFromKeys, warn, Watcher } from '@byteluck-fe/model-driven-shared';
184
175
  import { findInstanceDataScopeParent, Store } from './Store';
185
176
  import { Designer } from './Designer';
@@ -1,7 +1,5 @@
1
1
  function _class_call_check(instance, Constructor) {
2
- if (!(instance instanceof Constructor)) {
3
- throw new TypeError("Cannot call a class as a function");
4
- }
2
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
5
3
  }
6
4
  var Plugin = function Plugin() {
7
5
  "use strict";
package/dist/esm/Store.js CHANGED
@@ -10,9 +10,7 @@ function _array_without_holes(arr) {
10
10
  if (Array.isArray(arr)) return _array_like_to_array(arr);
11
11
  }
12
12
  function _class_call_check(instance, Constructor) {
13
- if (!(instance instanceof Constructor)) {
14
- throw new TypeError("Cannot call a class as a function");
15
- }
13
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
16
14
  }
17
15
  function _defineProperties(target, props) {
18
16
  for(var i = 0; i < props.length; i++){
@@ -36,13 +34,13 @@ function _define_property(obj, key, value) {
36
34
  configurable: true,
37
35
  writable: true
38
36
  });
39
- } else {
40
- obj[key] = value;
41
- }
37
+ } else obj[key] = value;
42
38
  return obj;
43
39
  }
44
40
  function _iterable_to_array(iter) {
45
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
41
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
42
+ return Array.from(iter);
43
+ }
46
44
  }
47
45
  function _iterable_to_array_limit(arr, i) {
48
46
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
@@ -69,10 +67,10 @@ function _iterable_to_array_limit(arr, i) {
69
67
  return _arr;
70
68
  }
71
69
  function _non_iterable_rest() {
72
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
70
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
73
71
  }
74
72
  function _non_iterable_spread() {
75
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
73
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
76
74
  }
77
75
  function _sliced_to_array(arr, i) {
78
76
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
package/dist/esm/utils.js CHANGED
@@ -17,11 +17,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
17
17
  reject(error);
18
18
  return;
19
19
  }
20
- if (info.done) {
21
- resolve(value);
22
- } else {
23
- Promise.resolve(value).then(_next, _throw);
24
- }
20
+ if (info.done) resolve(value);
21
+ else Promise.resolve(value).then(_next, _throw);
25
22
  }
26
23
  function _async_to_generator(fn) {
27
24
  return function() {
@@ -39,7 +36,9 @@ function _async_to_generator(fn) {
39
36
  };
40
37
  }
41
38
  function _iterable_to_array(iter) {
42
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
39
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
40
+ return Array.from(iter);
41
+ }
43
42
  }
44
43
  function _iterable_to_array_limit(arr, i) {
45
44
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
@@ -66,10 +65,10 @@ function _iterable_to_array_limit(arr, i) {
66
65
  return _arr;
67
66
  }
68
67
  function _non_iterable_rest() {
69
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
68
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
70
69
  }
71
70
  function _non_iterable_spread() {
72
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
71
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
73
72
  }
74
73
  function _sliced_to_array(arr, i) {
75
74
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
@@ -77,14 +76,6 @@ function _sliced_to_array(arr, i) {
77
76
  function _to_consumable_array(arr) {
78
77
  return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
79
78
  }
80
- function _unsupported_iterable_to_array(o, minLen) {
81
- if (!o) return;
82
- if (typeof o === "string") return _array_like_to_array(o, minLen);
83
- var n = Object.prototype.toString.call(o).slice(8, -1);
84
- if (n === "Object" && o.constructor) n = o.constructor.name;
85
- if (n === "Map" || n === "Set") return Array.from(n);
86
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
87
- }
88
79
  function _ts_generator(thisArg, body) {
89
80
  var f, y, t, _ = {
90
81
  label: 0,
@@ -184,6 +175,14 @@ function _ts_generator(thisArg, body) {
184
175
  };
185
176
  }
186
177
  }
178
+ function _unsupported_iterable_to_array(o, minLen) {
179
+ if (!o) return;
180
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
181
+ var n = Object.prototype.toString.call(o).slice(8, -1);
182
+ if (n === "Object" && o.constructor) n = o.constructor.name;
183
+ if (n === "Map" || n === "Set") return Array.from(n);
184
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
185
+ }
187
186
  import { loopFormControl } from './designerUtils';
188
187
  import { CONTROL_BASE_TYPE, CONTROL_TYPE, // FieldTypes,
189
188
  // FieldTypeToColumnType,