@byteluck-fe/model-driven-engine 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.
- package/dist/esm/common/ActionManager.js +16 -21
- package/dist/esm/common/DataManager.js +4 -11
- package/dist/esm/common/Engine.js +135 -115
- package/dist/esm/common/OkWorker.js +2 -6
- package/dist/esm/common/Plugin.js +1 -3
- package/dist/esm/common/Runtime.js +12 -20
- package/dist/esm/common/Store.js +2 -6
- package/dist/esm/common/checkerValue.js +13 -21
- package/dist/esm/common/proxyState.js +4 -2
- package/dist/esm/plugins/CalcPlugin.js +6 -8
- package/dist/esm/plugins/ControlsEventPlugin.js +4 -11
- package/dist/esm/plugins/ES6ModulePlugin.js +3 -7
- package/dist/esm/plugins/LifecycleEventPlugin.js +13 -20
- package/dist/esm/plugins/StylePlugin.js +2 -6
- package/dist/index.umd.js +31 -24
- package/dist/types/common/Engine.d.ts +2 -2
- package/package.json +4 -4
|
@@ -7,9 +7,7 @@ function _array_with_holes(arr) {
|
|
|
7
7
|
if (Array.isArray(arr)) return 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 _call_super(_this, derived, args) {
|
|
@@ -17,9 +15,7 @@ function _call_super(_this, derived, args) {
|
|
|
17
15
|
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
18
16
|
}
|
|
19
17
|
function _class_call_check(instance, Constructor) {
|
|
20
|
-
if (!(instance instanceof Constructor))
|
|
21
|
-
throw new TypeError("Cannot call a class as a function");
|
|
22
|
-
}
|
|
18
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
23
19
|
}
|
|
24
20
|
function _defineProperties(target, props) {
|
|
25
21
|
for(var i = 0; i < props.length; i++){
|
|
@@ -43,9 +39,7 @@ function _define_property(obj, key, value) {
|
|
|
43
39
|
configurable: true,
|
|
44
40
|
writable: true
|
|
45
41
|
});
|
|
46
|
-
} else
|
|
47
|
-
obj[key] = value;
|
|
48
|
-
}
|
|
42
|
+
} else obj[key] = value;
|
|
49
43
|
return obj;
|
|
50
44
|
}
|
|
51
45
|
function _get_prototype_of(o) {
|
|
@@ -67,6 +61,14 @@ function _inherits(subClass, superClass) {
|
|
|
67
61
|
});
|
|
68
62
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
69
63
|
}
|
|
64
|
+
function _is_native_reflect_construct() {
|
|
65
|
+
try {
|
|
66
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
67
|
+
} catch (_) {}
|
|
68
|
+
return (_is_native_reflect_construct = function() {
|
|
69
|
+
return !!result;
|
|
70
|
+
})();
|
|
71
|
+
}
|
|
70
72
|
function _iterable_to_array_limit(arr, i) {
|
|
71
73
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
72
74
|
if (_i == null) return;
|
|
@@ -92,7 +94,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
92
94
|
return _arr;
|
|
93
95
|
}
|
|
94
96
|
function _non_iterable_rest() {
|
|
95
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
97
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
96
98
|
}
|
|
97
99
|
function _object_spread(target) {
|
|
98
100
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -110,9 +112,7 @@ function _object_spread(target) {
|
|
|
110
112
|
return target;
|
|
111
113
|
}
|
|
112
114
|
function _possible_constructor_return(self, call) {
|
|
113
|
-
if (call && (_type_of(call) === "object" || typeof call === "function"))
|
|
114
|
-
return call;
|
|
115
|
-
}
|
|
115
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
116
116
|
return _assert_this_initialized(self);
|
|
117
117
|
}
|
|
118
118
|
function _set_prototype_of(o, p) {
|
|
@@ -137,14 +137,6 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
137
137
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
138
138
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
139
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
140
|
import { isArray, isFunction, isString, isJSONArray, isJSONObject, isNumber, isNumberAndEmptyStringArray, isPlainObject, isStringArray, FieldTypes, isObject } from '@byteluck-fe/model-driven-shared';
|
|
149
141
|
import { AddressValue, AmountValue, CalcValue, RangeDateValue } from '@byteluck-fe/model-driven-core';
|
|
150
142
|
import { camelizeKeys } from 'humps';
|
|
@@ -7,10 +7,12 @@ function _array_without_holes(arr) {
|
|
|
7
7
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
8
8
|
}
|
|
9
9
|
function _iterable_to_array(iter) {
|
|
10
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
10
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
11
|
+
return Array.from(iter);
|
|
12
|
+
}
|
|
11
13
|
}
|
|
12
14
|
function _non_iterable_spread() {
|
|
13
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
15
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
16
|
}
|
|
15
17
|
function _to_consumable_array(arr) {
|
|
16
18
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
@@ -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 _class_call_check(instance, Constructor) {
|
|
10
|
-
if (!(instance instanceof Constructor))
|
|
11
|
-
throw new TypeError("Cannot call a class as a function");
|
|
12
|
-
}
|
|
10
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
13
11
|
}
|
|
14
12
|
function _defineProperties(target, props) {
|
|
15
13
|
for(var i = 0; i < props.length; i++){
|
|
@@ -33,16 +31,16 @@ function _define_property(obj, key, value) {
|
|
|
33
31
|
configurable: true,
|
|
34
32
|
writable: true
|
|
35
33
|
});
|
|
36
|
-
} else
|
|
37
|
-
obj[key] = value;
|
|
38
|
-
}
|
|
34
|
+
} else obj[key] = value;
|
|
39
35
|
return obj;
|
|
40
36
|
}
|
|
41
37
|
function _iterable_to_array(iter) {
|
|
42
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
38
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
39
|
+
return Array.from(iter);
|
|
40
|
+
}
|
|
43
41
|
}
|
|
44
42
|
function _non_iterable_spread() {
|
|
45
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
43
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
46
44
|
}
|
|
47
45
|
function _to_consumable_array(arr) {
|
|
48
46
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
@@ -6,11 +6,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
6
6
|
reject(error);
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
|
-
if (info.done)
|
|
10
|
-
|
|
11
|
-
} else {
|
|
12
|
-
Promise.resolve(value).then(_next, _throw);
|
|
13
|
-
}
|
|
9
|
+
if (info.done) resolve(value);
|
|
10
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
14
11
|
}
|
|
15
12
|
function _async_to_generator(fn) {
|
|
16
13
|
return function() {
|
|
@@ -28,9 +25,7 @@ function _async_to_generator(fn) {
|
|
|
28
25
|
};
|
|
29
26
|
}
|
|
30
27
|
function _class_call_check(instance, Constructor) {
|
|
31
|
-
if (!(instance instanceof Constructor))
|
|
32
|
-
throw new TypeError("Cannot call a class as a function");
|
|
33
|
-
}
|
|
28
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
34
29
|
}
|
|
35
30
|
function _defineProperties(target, props) {
|
|
36
31
|
for(var i = 0; i < props.length; i++){
|
|
@@ -54,9 +49,7 @@ function _define_property(obj, key, value) {
|
|
|
54
49
|
configurable: true,
|
|
55
50
|
writable: true
|
|
56
51
|
});
|
|
57
|
-
} else
|
|
58
|
-
obj[key] = value;
|
|
59
|
-
}
|
|
52
|
+
} else obj[key] = value;
|
|
60
53
|
return obj;
|
|
61
54
|
}
|
|
62
55
|
function _ts_generator(thisArg, body) {
|
|
@@ -7,9 +7,7 @@ function _array_with_holes(arr) {
|
|
|
7
7
|
if (Array.isArray(arr)) return arr;
|
|
8
8
|
}
|
|
9
9
|
function _class_call_check(instance, Constructor) {
|
|
10
|
-
if (!(instance instanceof Constructor))
|
|
11
|
-
throw new TypeError("Cannot call a class as a function");
|
|
12
|
-
}
|
|
10
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
13
11
|
}
|
|
14
12
|
function _defineProperties(target, props) {
|
|
15
13
|
for(var i = 0; i < props.length; i++){
|
|
@@ -33,9 +31,7 @@ function _define_property(obj, key, value) {
|
|
|
33
31
|
configurable: true,
|
|
34
32
|
writable: true
|
|
35
33
|
});
|
|
36
|
-
} else
|
|
37
|
-
obj[key] = value;
|
|
38
|
-
}
|
|
34
|
+
} else obj[key] = value;
|
|
39
35
|
return obj;
|
|
40
36
|
}
|
|
41
37
|
function _iterable_to_array_limit(arr, i) {
|
|
@@ -63,7 +59,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
63
59
|
return _arr;
|
|
64
60
|
}
|
|
65
61
|
function _non_iterable_rest() {
|
|
66
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
62
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
67
63
|
}
|
|
68
64
|
function _sliced_to_array(arr, i) {
|
|
69
65
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
@@ -14,11 +14,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
14
14
|
reject(error);
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
if (info.done)
|
|
18
|
-
|
|
19
|
-
} else {
|
|
20
|
-
Promise.resolve(value).then(_next, _throw);
|
|
21
|
-
}
|
|
17
|
+
if (info.done) resolve(value);
|
|
18
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
22
19
|
}
|
|
23
20
|
function _async_to_generator(fn) {
|
|
24
21
|
return function() {
|
|
@@ -36,9 +33,7 @@ function _async_to_generator(fn) {
|
|
|
36
33
|
};
|
|
37
34
|
}
|
|
38
35
|
function _class_call_check(instance, Constructor) {
|
|
39
|
-
if (!(instance instanceof Constructor))
|
|
40
|
-
throw new TypeError("Cannot call a class as a function");
|
|
41
|
-
}
|
|
36
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
42
37
|
}
|
|
43
38
|
function _defineProperties(target, props) {
|
|
44
39
|
for(var i = 0; i < props.length; i++){
|
|
@@ -62,9 +57,7 @@ function _define_property(obj, key, value) {
|
|
|
62
57
|
configurable: true,
|
|
63
58
|
writable: true
|
|
64
59
|
});
|
|
65
|
-
} else
|
|
66
|
-
obj[key] = value;
|
|
67
|
-
}
|
|
60
|
+
} else obj[key] = value;
|
|
68
61
|
return obj;
|
|
69
62
|
}
|
|
70
63
|
function _iterable_to_array_limit(arr, i) {
|
|
@@ -92,19 +85,11 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
92
85
|
return _arr;
|
|
93
86
|
}
|
|
94
87
|
function _non_iterable_rest() {
|
|
95
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
88
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
96
89
|
}
|
|
97
90
|
function _sliced_to_array(arr, i) {
|
|
98
91
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
99
92
|
}
|
|
100
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
101
|
-
if (!o) return;
|
|
102
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
103
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
104
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
105
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
106
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
107
|
-
}
|
|
108
93
|
function _ts_generator(thisArg, body) {
|
|
109
94
|
var f, y, t, _ = {
|
|
110
95
|
label: 0,
|
|
@@ -204,6 +189,14 @@ function _ts_generator(thisArg, body) {
|
|
|
204
189
|
};
|
|
205
190
|
}
|
|
206
191
|
}
|
|
192
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
193
|
+
if (!o) return;
|
|
194
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
195
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
196
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
197
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
198
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
199
|
+
}
|
|
207
200
|
var LifecycleEventKeyMap = {
|
|
208
201
|
'engine-initialized': 'did_init',
|
|
209
202
|
'engine-mounted': 'did_mount',
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
* @LastEditTime: 2024-11-08 11:17:53
|
|
6
6
|
* @FilePath: /model-driven/packages/engine/src/plugins/StylePlugin.ts
|
|
7
7
|
*/ function _class_call_check(instance, Constructor) {
|
|
8
|
-
if (!(instance instanceof Constructor))
|
|
9
|
-
throw new TypeError("Cannot call a class as a function");
|
|
10
|
-
}
|
|
8
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
11
9
|
}
|
|
12
10
|
function _defineProperties(target, props) {
|
|
13
11
|
for(var i = 0; i < props.length; i++){
|
|
@@ -31,9 +29,7 @@ function _define_property(obj, key, value) {
|
|
|
31
29
|
configurable: true,
|
|
32
30
|
writable: true
|
|
33
31
|
});
|
|
34
|
-
} else
|
|
35
|
-
obj[key] = value;
|
|
36
|
-
}
|
|
32
|
+
} else obj[key] = value;
|
|
37
33
|
return obj;
|
|
38
34
|
}
|
|
39
35
|
import postcss from 'postcss';
|