@byteluck-fe/model-driven-shared 2.22.2-beta.8 → 2.22.3-beta.11
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/README.md +29 -29
- package/dist/esm/EventLogic.js +24 -70
- package/dist/esm/RulesMessage.js +18 -17
- package/dist/esm/calc.js +41 -41
- package/dist/esm/entity/Department.js +7 -7
- package/dist/esm/entity/User.js +39 -39
- package/dist/esm/enum.js +112 -92
- package/dist/esm/locales/en-US.json +158 -154
- package/dist/esm/locales/ja-JP.json +158 -154
- package/dist/esm/locales/zh-CN.json +241 -223
- package/dist/esm/log.js +15 -25
- package/dist/esm/updateValueFromKeys.js +6 -6
- package/dist/esm/utils.js +10 -10
- package/dist/esm/watcher.js +8 -13
- package/dist/index.umd.js +1 -45
- package/dist/types/EventLogic.d.ts +305 -305
- package/dist/types/RulesMessage.d.ts +13 -13
- package/dist/types/calc.d.ts +74 -74
- package/dist/types/constant.d.ts +2 -2
- package/dist/types/entity/Department.d.ts +15 -15
- package/dist/types/entity/User.d.ts +85 -85
- package/dist/types/entity/index.d.ts +2 -2
- package/dist/types/enum.d.ts +269 -268
- package/dist/types/genNonDuplicateId.d.ts +1 -1
- package/dist/types/index.d.ts +13 -13
- package/dist/types/locales/index.d.ts +560 -534
- package/dist/types/log.d.ts +5 -5
- package/dist/types/loopControls.d.ts +1 -1
- package/dist/types/updateValueFromKeys.d.ts +8 -8
- package/dist/types/utils.d.ts +53 -53
- package/dist/types/watcher.d.ts +14 -14
- package/package.json +3 -2
package/dist/esm/watcher.js
CHANGED
|
@@ -85,7 +85,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
85
85
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
86
86
|
}
|
|
87
87
|
function _ts_generator(thisArg, body) {
|
|
88
|
-
var f, y, t,
|
|
88
|
+
var f, y, t, _ = {
|
|
89
89
|
label: 0,
|
|
90
90
|
sent: function() {
|
|
91
91
|
if (t[0] & 1) throw t[1];
|
|
@@ -93,12 +93,8 @@ function _ts_generator(thisArg, body) {
|
|
|
93
93
|
},
|
|
94
94
|
trys: [],
|
|
95
95
|
ops: []
|
|
96
|
-
};
|
|
97
|
-
return g = {
|
|
98
|
-
next: verb(0),
|
|
99
|
-
"throw": verb(1),
|
|
100
|
-
"return": verb(2)
|
|
101
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
96
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
97
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
102
98
|
return this;
|
|
103
99
|
}), g;
|
|
104
100
|
function verb(n) {
|
|
@@ -111,7 +107,7 @@ function _ts_generator(thisArg, body) {
|
|
|
111
107
|
}
|
|
112
108
|
function step(op) {
|
|
113
109
|
if (f) throw new TypeError("Generator is already executing.");
|
|
114
|
-
while(_)try {
|
|
110
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
115
111
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
116
112
|
if (y = 0, t) op = [
|
|
117
113
|
op[0] & 2,
|
|
@@ -197,13 +193,12 @@ var Watcher = /*#__PURE__*/ function() {
|
|
|
197
193
|
for(var _len = arguments.length, payload = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
198
194
|
payload[_key - 1] = arguments[_key];
|
|
199
195
|
}
|
|
200
|
-
var _this = this;
|
|
201
196
|
return _async_to_generator(function() {
|
|
202
197
|
var callbacksOrigin, results, _callbacks, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, callback, result, e, err;
|
|
203
198
|
return _ts_generator(this, function(_state) {
|
|
204
199
|
switch(_state.label){
|
|
205
200
|
case 0:
|
|
206
|
-
callbacksOrigin =
|
|
201
|
+
callbacksOrigin = this._events.get(key);
|
|
207
202
|
results = [];
|
|
208
203
|
if (!callbacksOrigin) return [
|
|
209
204
|
3,
|
|
@@ -243,7 +238,7 @@ var Watcher = /*#__PURE__*/ function() {
|
|
|
243
238
|
,
|
|
244
239
|
6
|
|
245
240
|
]);
|
|
246
|
-
|
|
241
|
+
this.debug && log.apply(void 0, [
|
|
247
242
|
"正在执行 ".concat(key, " 事件: ").concat(callback.applyingPluginName ? '当前执行的插件为:' + callback.applyingPluginName : '', ", 当前执行函数的参数为").concat(payload.map(function() {
|
|
248
243
|
return '%o';
|
|
249
244
|
}).join(','), "。")
|
|
@@ -254,7 +249,7 @@ var Watcher = /*#__PURE__*/ function() {
|
|
|
254
249
|
];
|
|
255
250
|
case 4:
|
|
256
251
|
result = _state.sent();
|
|
257
|
-
|
|
252
|
+
this.debug && log.apply(void 0, [
|
|
258
253
|
"正在执行 ".concat(key, " 事件: ").concat(callback.applyingPluginName ? '当前执行的插件为:' + callback.applyingPluginName : '', ", 当前执行函数的参数为").concat(payload.map(function() {
|
|
259
254
|
return '%o';
|
|
260
255
|
}).join(','), "; 函数的返回结果为%o")
|
|
@@ -318,7 +313,7 @@ var Watcher = /*#__PURE__*/ function() {
|
|
|
318
313
|
];
|
|
319
314
|
}
|
|
320
315
|
});
|
|
321
|
-
})();
|
|
316
|
+
}).call(this);
|
|
322
317
|
}
|
|
323
318
|
},
|
|
324
319
|
{
|