@byteluck-fe/model-driven-shared 2.3.16 → 2.3.20

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,
@@ -151,9 +151,9 @@ var eventMap = [
151
151
  export var EventLogic = /*#__PURE__*/ function() {
152
152
  "use strict";
153
153
  function EventLogic() {
154
- _classCallCheck(this, EventLogic);
154
+ _class_call_check(this, EventLogic);
155
155
  }
156
- _createClass(EventLogic, [
156
+ _create_class(EventLogic, [
157
157
  {
158
158
  key: "getEventsFromKeys",
159
159
  value: function getEventsFromKeys(keys) {
@@ -168,4 +168,4 @@ export var EventLogic = /*#__PURE__*/ function() {
168
168
  ]);
169
169
  return EventLogic;
170
170
  }();
171
- _defineProperty(EventLogic, "events", eventMap);
171
+ _define_property(EventLogic, "events", eventMap);
@@ -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,
@@ -36,9 +36,9 @@ import { DEFAULT_LOCALE } from "./constant";
36
36
  export var RulesMessage = /*#__PURE__*/ function() {
37
37
  "use strict";
38
38
  function RulesMessage() {
39
- _classCallCheck(this, RulesMessage);
39
+ _class_call_check(this, RulesMessage);
40
40
  }
41
- _createClass(RulesMessage, null, [
41
+ _create_class(RulesMessage, null, [
42
42
  {
43
43
  key: "getMessage",
44
44
  value: function getMessage(messageKey) {
@@ -65,4 +65,4 @@ export var RulesMessage = /*#__PURE__*/ function() {
65
65
  ]);
66
66
  return RulesMessage;
67
67
  }();
68
- _defineProperty(RulesMessage, "$i18n", RulesMessage.resetI18n());
68
+ _define_property(RulesMessage, "$i18n", RulesMessage.resetI18n());
package/dist/esm/calc.js CHANGED
@@ -1,9 +1,9 @@
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
- function _defineProperty(obj, key, value) {
6
+ function _define_property(obj, key, value) {
7
7
  if (key in obj) {
8
8
  Object.defineProperty(obj, key, {
9
9
  value: value,
@@ -57,25 +57,25 @@ export var CALC_AGGREGATE_TYPE;
57
57
  })(CALC_AGGREGATE_TYPE || (CALC_AGGREGATE_TYPE = {}));
58
58
  export var CalcScriptEchoItem = function CalcScriptEchoItem(props) {
59
59
  "use strict";
60
- _classCallCheck(this, CalcScriptEchoItem);
60
+ _class_call_check(this, CalcScriptEchoItem);
61
61
  /**
62
62
  * 变量名称或者公式符号或者数值
63
- * */ _defineProperty(this, "name", void 0);
63
+ * */ _define_property(this, "name", void 0);
64
64
  /**
65
65
  * 如果是变量的话,id为控件id
66
- * */ _defineProperty(this, "id", void 0);
66
+ * */ _define_property(this, "id", void 0);
67
67
  /**
68
68
  * 当前值的类型
69
- * */ _defineProperty(this, "type", void 0);
69
+ * */ _define_property(this, "type", void 0);
70
70
  /**
71
71
  * 绑定的是明细子表变量时,必须有subTableId
72
- * */ _defineProperty(this, "subTableId", void 0);
72
+ * */ _define_property(this, "subTableId", void 0);
73
73
  /**
74
74
  * 绑定的是明细子表内变量时,必须有subTableName
75
- * */ _defineProperty(this, "subTableName", void 0);
75
+ * */ _define_property(this, "subTableName", void 0);
76
76
  /**
77
77
  * 绑定的是其它明细子表内变量时,必须有aggregateType
78
- * */ _defineProperty(this, "aggregateType", void 0);
78
+ * */ _define_property(this, "aggregateType", void 0);
79
79
  var _props_name;
80
80
  this.name = (_props_name = props === null || props === void 0 ? void 0 : props.name) !== null && _props_name !== void 0 ? _props_name : "";
81
81
  var _props_id;
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * @author qiyu
3
3
  * @description 属性只是简单从接口拿过来,还未仔细考虑
4
- */ function _classCallCheck(instance, Constructor) {
4
+ */ function _class_call_check(instance, Constructor) {
5
5
  if (!(instance instanceof Constructor)) {
6
6
  throw new TypeError("Cannot call a class as a function");
7
7
  }
8
8
  }
9
- function _defineProperty(obj, key, value) {
9
+ function _define_property(obj, key, value) {
10
10
  if (key in obj) {
11
11
  Object.defineProperty(obj, key, {
12
12
  value: value,
@@ -21,12 +21,12 @@ function _defineProperty(obj, key, value) {
21
21
  }
22
22
  export var DepartmentEntity = function DepartmentEntity() {
23
23
  "use strict";
24
- _classCallCheck(this, DepartmentEntity);
25
- _defineProperty(this, "department_en_name", void 0);
24
+ _class_call_check(this, DepartmentEntity);
25
+ _define_property(this, "department_en_name", void 0);
26
26
  /**
27
27
  * 部门编号
28
- */ _defineProperty(this, "department_id", void 0);
28
+ */ _define_property(this, "department_id", void 0);
29
29
  /**
30
30
  * 部门名称
31
- */ _defineProperty(this, "department_name", void 0);
31
+ */ _define_property(this, "department_name", void 0);
32
32
  };
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * @author qiyu
3
3
  * @description 属性只是简单从接口拿过来,还未仔细考虑
4
- */ function _classCallCheck(instance, Constructor) {
4
+ */ function _class_call_check(instance, Constructor) {
5
5
  if (!(instance instanceof Constructor)) {
6
6
  throw new TypeError("Cannot call a class as a function");
7
7
  }
8
8
  }
9
- function _defineProperty(obj, key, value) {
9
+ function _define_property(obj, key, value) {
10
10
  if (key in obj) {
11
11
  Object.defineProperty(obj, key, {
12
12
  value: value,
@@ -21,66 +21,66 @@ function _defineProperty(obj, key, value) {
21
21
  }
22
22
  export var UserEntity = function UserEntity() {
23
23
  "use strict";
24
- _classCallCheck(this, UserEntity);
25
- _defineProperty(this, "avatar_big", void 0);
26
- _defineProperty(this, "avatar_small", void 0);
24
+ _class_call_check(this, UserEntity);
25
+ _define_property(this, "avatar_big", void 0);
26
+ _define_property(this, "avatar_small", void 0);
27
27
  /**
28
28
  * 员工头像地址
29
- */ _defineProperty(this, "avatar_url", void 0);
29
+ */ _define_property(this, "avatar_url", void 0);
30
30
  /**
31
31
  * 归属部门英文名称
32
- */ _defineProperty(this, "belong_dept_en_name", void 0);
33
- _defineProperty(this, "belong_dept_id_list", void 0);
32
+ */ _define_property(this, "belong_dept_en_name", void 0);
33
+ _define_property(this, "belong_dept_id_list", void 0);
34
34
  /**
35
35
  * 归属部门ID
36
- */ _defineProperty(this, "belong_dept_ids", void 0);
36
+ */ _define_property(this, "belong_dept_ids", void 0);
37
37
  /**
38
38
  * 归属部门名称
39
- */ _defineProperty(this, "belong_dept_name", void 0);
39
+ */ _define_property(this, "belong_dept_name", void 0);
40
40
  /**
41
41
  * 当前语言版本
42
- */ _defineProperty(this, "cookie_language_enum", void 0);
42
+ */ _define_property(this, "cookie_language_enum", void 0);
43
43
  /**
44
44
  * 部门id
45
- */ _defineProperty(this, "department_id", void 0);
45
+ */ _define_property(this, "department_id", void 0);
46
46
  /**
47
47
  * 部门名称
48
- */ _defineProperty(this, "department_name", void 0);
48
+ */ _define_property(this, "department_name", void 0);
49
49
  /**
50
50
  * 员工邮箱
51
- */ _defineProperty(this, "email", void 0);
51
+ */ _define_property(this, "email", void 0);
52
52
  /**
53
53
  * 工号
54
- */ _defineProperty(this, "employee_card", void 0);
54
+ */ _define_property(this, "employee_card", void 0);
55
55
  /**
56
56
  * 英文名
57
- */ _defineProperty(this, "employee_en_name", void 0);
57
+ */ _define_property(this, "employee_en_name", void 0);
58
58
  /**
59
59
  * 员工编号
60
- */ _defineProperty(this, "employee_id", void 0);
60
+ */ _define_property(this, "employee_id", void 0);
61
61
  /**
62
62
  * 员工姓名
63
- */ _defineProperty(this, "employee_name", void 0);
64
- _defineProperty(this, "external_user", void 0);
63
+ */ _define_property(this, "employee_name", void 0);
64
+ _define_property(this, "external_user", void 0);
65
65
  /**
66
66
  * 性别
67
- */ _defineProperty(this, "gender", void 0);
68
- _defineProperty(this, "is_show_chat_group", void 0);
67
+ */ _define_property(this, "gender", void 0);
68
+ _define_property(this, "is_show_chat_group", void 0);
69
69
  /**
70
70
  * 负责部门英文名称
71
- */ _defineProperty(this, "manage_dept_en_name", void 0);
71
+ */ _define_property(this, "manage_dept_en_name", void 0);
72
72
  /**
73
73
  * 负责部门ID
74
- */ _defineProperty(this, "manage_dept_ids", void 0);
74
+ */ _define_property(this, "manage_dept_ids", void 0);
75
75
  /**
76
76
  * 负责部门名称
77
- */ _defineProperty(this, "manage_dept_name", void 0);
78
- _defineProperty(this, "msg_relation_type", void 0);
77
+ */ _define_property(this, "manage_dept_name", void 0);
78
+ _define_property(this, "msg_relation_type", void 0);
79
79
  /**
80
80
  * 职级
81
- */ _defineProperty(this, "sequence", void 0);
81
+ */ _define_property(this, "sequence", void 0);
82
82
  /**
83
83
  * 固定电话
84
- */ _defineProperty(this, "telephone", void 0);
85
- _defineProperty(this, "tenant_id", void 0);
84
+ */ _define_property(this, "telephone", void 0);
85
+ _define_property(this, "tenant_id", void 0);
86
86
  };
package/dist/esm/enum.js CHANGED
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) {
1
+ function _define_property(obj, key, value) {
2
2
  if (key in obj) {
3
3
  Object.defineProperty(obj, key, {
4
4
  value: value,
@@ -196,7 +196,7 @@ export var FieldTypes;
196
196
  * */ "ENCRYPTED_FIELD"] = "encrypted_field";
197
197
  })(FieldTypes || (FieldTypes = {}));
198
198
  var _obj;
199
- export var FieldTypeToColumnType = (_obj = {}, _defineProperty(_obj, FieldTypes.ARRAY, CONTROL_TYPE.ARRAY_COLUMN), _defineProperty(_obj, FieldTypes.AUTO_NUMBER, CONTROL_TYPE.AUTO_NUMBER_COLUMN), _defineProperty(_obj, FieldTypes.DECIMAL, CONTROL_TYPE.DECIMAL_COLUMN), _defineProperty(_obj, FieldTypes.DEPARTMENTS, CONTROL_TYPE.DEPARTMENT_COLUMN), _defineProperty(_obj, FieldTypes.FILE, CONTROL_TYPE.FILE_COLUMN), _defineProperty(_obj, FieldTypes.IMAGE, CONTROL_TYPE.IMAGE_COLUMN), _defineProperty(_obj, FieldTypes.ADDRESS, CONTROL_TYPE.LOCATION_COLUMN), _defineProperty(_obj, FieldTypes.EMPLOYEES, CONTROL_TYPE.EMPLOYEE_COLUMN), _defineProperty(_obj, FieldTypes.TEXT, CONTROL_TYPE.TEXT_COLUMN), _defineProperty(_obj, FieldTypes.TIMESCOPE, CONTROL_TYPE.TIMESCOPE_COLUMN), _defineProperty(_obj, FieldTypes.TIMESTAMP, CONTROL_TYPE.TIMESTAMP_COLUMN), _defineProperty(_obj, FieldTypes.VARCHAR, CONTROL_TYPE.VARCHAR_COLUMN), _defineProperty(_obj, FieldTypes.RELATION, CONTROL_TYPE.VARCHAR_COLUMN), _obj);
199
+ export var FieldTypeToColumnType = (_obj = {}, _define_property(_obj, FieldTypes.ARRAY, CONTROL_TYPE.ARRAY_COLUMN), _define_property(_obj, FieldTypes.AUTO_NUMBER, CONTROL_TYPE.AUTO_NUMBER_COLUMN), _define_property(_obj, FieldTypes.DECIMAL, CONTROL_TYPE.DECIMAL_COLUMN), _define_property(_obj, FieldTypes.DEPARTMENTS, CONTROL_TYPE.DEPARTMENT_COLUMN), _define_property(_obj, FieldTypes.FILE, CONTROL_TYPE.FILE_COLUMN), _define_property(_obj, FieldTypes.IMAGE, CONTROL_TYPE.IMAGE_COLUMN), _define_property(_obj, FieldTypes.ADDRESS, CONTROL_TYPE.LOCATION_COLUMN), _define_property(_obj, FieldTypes.EMPLOYEES, CONTROL_TYPE.EMPLOYEE_COLUMN), _define_property(_obj, FieldTypes.TEXT, CONTROL_TYPE.TEXT_COLUMN), _define_property(_obj, FieldTypes.TIMESCOPE, CONTROL_TYPE.TIMESCOPE_COLUMN), _define_property(_obj, FieldTypes.TIMESTAMP, CONTROL_TYPE.TIMESTAMP_COLUMN), _define_property(_obj, FieldTypes.VARCHAR, CONTROL_TYPE.VARCHAR_COLUMN), _define_property(_obj, FieldTypes.RELATION, CONTROL_TYPE.VARCHAR_COLUMN), _obj);
200
200
  export var DateType;
201
201
  (function(DateType) {
202
202
  DateType[/**
@@ -4,7 +4,7 @@ export function genNonDuplicateId() {
4
4
  var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 15;
5
5
  var result = "";
6
6
  for(var i = 0; i < n; i++){
7
- // 第一位不能是数字
7
+ //第一位不能是数字
8
8
  var randomStr = i === 0 ? firstStr : str;
9
9
  var random = Math.random() * randomStr.length;
10
10
  result += randomStr[parseInt(String(random), 10)];
package/dist/esm/log.js CHANGED
@@ -1,55 +1,44 @@
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
  }
13
13
  return self;
14
14
  }
15
- function _classCallCheck(instance, Constructor) {
15
+ function _class_call_check(instance, Constructor) {
16
16
  if (!(instance instanceof Constructor)) {
17
17
  throw new TypeError("Cannot call a class as a function");
18
18
  }
19
19
  }
20
- function isNativeReflectConstruct() {
21
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
22
- if (Reflect.construct.sham) return false;
23
- if (typeof Proxy === "function") return true;
24
- try {
25
- Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
26
- return true;
27
- } catch (e) {
28
- return false;
29
- }
30
- }
31
20
  function _construct(Parent, args, Class) {
32
- if (isNativeReflectConstruct()) {
21
+ if (_is_native_reflect_construct()) {
33
22
  _construct = Reflect.construct;
34
23
  } else {
35
- _construct = function _construct(Parent, args, Class) {
24
+ _construct = function construct(Parent, args, Class) {
36
25
  var a = [
37
26
  null
38
27
  ];
39
28
  a.push.apply(a, args);
40
29
  var Constructor = Function.bind.apply(Parent, a);
41
30
  var instance = new Constructor();
42
- if (Class) _setPrototypeOf(instance, Class.prototype);
31
+ if (Class) _set_prototype_of(instance, Class.prototype);
43
32
  return instance;
44
33
  };
45
34
  }
46
35
  return _construct.apply(null, arguments);
47
36
  }
48
- function _getPrototypeOf(o) {
49
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
37
+ function _get_prototype_of(o) {
38
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
50
39
  return o.__proto__ || Object.getPrototypeOf(o);
51
40
  };
52
- return _getPrototypeOf(o);
41
+ return _get_prototype_of(o);
53
42
  }
54
43
  function _inherits(subClass, superClass) {
55
44
  if (typeof superClass !== "function" && superClass !== null) {
@@ -62,49 +51,49 @@ function _inherits(subClass, superClass) {
62
51
  configurable: true
63
52
  }
64
53
  });
65
- if (superClass) _setPrototypeOf(subClass, superClass);
54
+ if (superClass) _set_prototype_of(subClass, superClass);
66
55
  }
67
- function _isNativeFunction(fn) {
56
+ function _is_native_function(fn) {
68
57
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
69
58
  }
70
- function _iterableToArray(iter) {
59
+ function _iterable_to_array(iter) {
71
60
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
72
61
  }
73
- function _nonIterableSpread() {
62
+ function _non_iterable_spread() {
74
63
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
75
64
  }
76
- function _possibleConstructorReturn(self, call) {
77
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
65
+ function _possible_constructor_return(self, call) {
66
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
78
67
  return call;
79
68
  }
80
- return _assertThisInitialized(self);
69
+ return _assert_this_initialized(self);
81
70
  }
82
- function _setPrototypeOf(o, p) {
83
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
71
+ function _set_prototype_of(o, p) {
72
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
84
73
  o.__proto__ = p;
85
74
  return o;
86
75
  };
87
- return _setPrototypeOf(o, p);
76
+ return _set_prototype_of(o, p);
88
77
  }
89
- function _toConsumableArray(arr) {
90
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
78
+ function _to_consumable_array(arr) {
79
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
91
80
  }
92
- var _typeof = function(obj) {
81
+ function _type_of(obj) {
93
82
  "@swc/helpers - typeof";
94
83
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
95
- };
96
- function _unsupportedIterableToArray(o, minLen) {
84
+ }
85
+ function _unsupported_iterable_to_array(o, minLen) {
97
86
  if (!o) return;
98
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
87
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
99
88
  var n = Object.prototype.toString.call(o).slice(8, -1);
100
89
  if (n === "Object" && o.constructor) n = o.constructor.name;
101
90
  if (n === "Map" || n === "Set") return Array.from(n);
102
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
91
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
103
92
  }
104
- function _wrapNativeSuper(Class) {
93
+ function _wrap_native_super(Class) {
105
94
  var _cache = typeof Map === "function" ? new Map() : undefined;
106
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
107
- if (Class === null || !_isNativeFunction(Class)) return Class;
95
+ _wrap_native_super = function wrapNativeSuper(Class) {
96
+ if (Class === null || !_is_native_function(Class)) return Class;
108
97
  if (typeof Class !== "function") {
109
98
  throw new TypeError("Super expression must either be null or a function");
110
99
  }
@@ -113,7 +102,7 @@ function _wrapNativeSuper(Class) {
113
102
  _cache.set(Class, Wrapper);
114
103
  }
115
104
  function Wrapper() {
116
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
105
+ return _construct(Class, arguments, _get_prototype_of(this).constructor);
117
106
  }
118
107
  Wrapper.prototype = Object.create(Class.prototype, {
119
108
  constructor: {
@@ -123,11 +112,11 @@ function _wrapNativeSuper(Class) {
123
112
  configurable: true
124
113
  }
125
114
  });
126
- return _setPrototypeOf(Wrapper, Class);
115
+ return _set_prototype_of(Wrapper, Class);
127
116
  };
128
- return _wrapNativeSuper(Class);
117
+ return _wrap_native_super(Class);
129
118
  }
130
- function _isNativeReflectConstruct() {
119
+ function _is_native_reflect_construct() {
131
120
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
132
121
  if (Reflect.construct.sham) return false;
133
122
  if (typeof Proxy === "function") return true;
@@ -138,17 +127,17 @@ function _isNativeReflectConstruct() {
138
127
  return false;
139
128
  }
140
129
  }
141
- function _createSuper(Derived) {
142
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
130
+ function _create_super(Derived) {
131
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
143
132
  return function _createSuperInternal() {
144
- var Super = _getPrototypeOf(Derived), result;
133
+ var Super = _get_prototype_of(Derived), result;
145
134
  if (hasNativeReflectConstruct) {
146
- var NewTarget = _getPrototypeOf(this).constructor;
135
+ var NewTarget = _get_prototype_of(this).constructor;
147
136
  result = Reflect.construct(Super, arguments, NewTarget);
148
137
  } else {
149
138
  result = Super.apply(this, arguments);
150
139
  }
151
- return _possibleConstructorReturn(this, result);
140
+ return _possible_constructor_return(this, result);
152
141
  };
153
142
  }
154
143
  var logger = console;
@@ -160,7 +149,7 @@ export function warn() {
160
149
  var other = data.slice(1);
161
150
  (_logger = logger).warn.apply(_logger, [
162
151
  "\uD83E\uDDD0 Driven Warning:" + data[0]
163
- ].concat(_toConsumableArray(other)));
152
+ ].concat(_to_consumable_array(other)));
164
153
  }
165
154
  export function log() {
166
155
  for(var _len = arguments.length, data = new Array(_len), _key = 0; _key < _len; _key++){
@@ -170,7 +159,7 @@ export function log() {
170
159
  var other = data.slice(1);
171
160
  (_logger = logger).log.apply(_logger, [
172
161
  "\uD83D\uDE80 Driven Log:" + data[0]
173
- ].concat(_toConsumableArray(other)));
162
+ ].concat(_to_consumable_array(other)));
174
163
  }
175
164
  function joinMessage(message) {
176
165
  return message + " \uD83D\uDC1B\uD83D\uDC1B\uD83D\uDC1B";
@@ -179,9 +168,9 @@ function joinMessage(message) {
179
168
  var DrivenError = /*#__PURE__*/ function(Error1) {
180
169
  "use strict";
181
170
  _inherits(DrivenError, Error1);
182
- var _super = _createSuper(DrivenError);
171
+ var _super = _create_super(DrivenError);
183
172
  function DrivenError(message) {
184
- _classCallCheck(this, DrivenError);
173
+ _class_call_check(this, DrivenError);
185
174
  var _this;
186
175
  _this = _super.call(this, message);
187
176
  _this.name = "\uD83D\uDCA5 Driven Error";
@@ -189,14 +178,14 @@ var DrivenError = /*#__PURE__*/ function(Error1) {
189
178
  return _this;
190
179
  }
191
180
  return DrivenError;
192
- }(_wrapNativeSuper(Error));
181
+ }(_wrap_native_super(Error));
193
182
  // 驱动语法错误
194
183
  var DrivenReferenceError = /*#__PURE__*/ function(DrivenError) {
195
184
  "use strict";
196
185
  _inherits(DrivenReferenceError, DrivenError);
197
- var _super = _createSuper(DrivenReferenceError);
186
+ var _super = _create_super(DrivenReferenceError);
198
187
  function DrivenReferenceError(message) {
199
- _classCallCheck(this, DrivenReferenceError);
188
+ _class_call_check(this, DrivenReferenceError);
200
189
  var _this;
201
190
  _this = _super.call(this, message);
202
191
  _this.name = "\uD83D\uDEA8 Driven Reference Error";
package/dist/esm/utils.js CHANGED
@@ -4,7 +4,7 @@ import cloneJSON from "fast-json-clone";
4
4
  export function JSONCopy(value) {
5
5
  if (value !== undefined) {
6
6
  if (typeof value === "object") {
7
- // result = JSON.parse(JSON.stringify(value))
7
+ // result = JSON.parse(JSON.stringify(value))
8
8
  return cloneJSON(value);
9
9
  } else {
10
10
  return value;
@@ -1,10 +1,10 @@
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
9
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
10
10
  try {
@@ -20,7 +20,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
20
20
  Promise.resolve(value).then(_next, _throw);
21
21
  }
22
22
  }
23
- function _asyncToGenerator(fn) {
23
+ function _async_to_generator(fn) {
24
24
  return function() {
25
25
  var self = this, args = arguments;
26
26
  return new Promise(function(resolve, reject) {
@@ -35,7 +35,7 @@ function _asyncToGenerator(fn) {
35
35
  });
36
36
  };
37
37
  }
38
- function _classCallCheck(instance, Constructor) {
38
+ function _class_call_check(instance, Constructor) {
39
39
  if (!(instance instanceof Constructor)) {
40
40
  throw new TypeError("Cannot call a class as a function");
41
41
  }
@@ -49,12 +49,12 @@ function _defineProperties(target, props) {
49
49
  Object.defineProperty(target, descriptor.key, descriptor);
50
50
  }
51
51
  }
52
- function _createClass(Constructor, protoProps, staticProps) {
52
+ function _create_class(Constructor, protoProps, staticProps) {
53
53
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
54
54
  if (staticProps) _defineProperties(Constructor, staticProps);
55
55
  return Constructor;
56
56
  }
57
- function _defineProperty(obj, key, value) {
57
+ function _define_property(obj, key, value) {
58
58
  if (key in obj) {
59
59
  Object.defineProperty(obj, key, {
60
60
  value: value,
@@ -67,24 +67,24 @@ function _defineProperty(obj, key, value) {
67
67
  }
68
68
  return obj;
69
69
  }
70
- function _iterableToArray(iter) {
70
+ function _iterable_to_array(iter) {
71
71
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
72
72
  }
73
- function _nonIterableSpread() {
73
+ function _non_iterable_spread() {
74
74
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
75
75
  }
76
- function _toConsumableArray(arr) {
77
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
76
+ function _to_consumable_array(arr) {
77
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
78
78
  }
79
- function _unsupportedIterableToArray(o, minLen) {
79
+ function _unsupported_iterable_to_array(o, minLen) {
80
80
  if (!o) return;
81
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
81
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
82
82
  var n = Object.prototype.toString.call(o).slice(8, -1);
83
83
  if (n === "Object" && o.constructor) n = o.constructor.name;
84
84
  if (n === "Map" || n === "Set") return Array.from(n);
85
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
85
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
86
86
  }
87
- var __generator = this && this.__generator || function(thisArg, body) {
87
+ function _ts_generator(thisArg, body) {
88
88
  var f, y, t, g, _ = {
89
89
  label: 0,
90
90
  sent: function() {
@@ -178,18 +178,18 @@ var __generator = this && this.__generator || function(thisArg, body) {
178
178
  done: true
179
179
  };
180
180
  }
181
- };
181
+ }
182
182
  import { log, logerror } from "./log";
183
183
  // 通信总线
184
184
  var Watcher = /*#__PURE__*/ function() {
185
185
  "use strict";
186
186
  function Watcher() {
187
- _classCallCheck(this, Watcher);
187
+ _class_call_check(this, Watcher);
188
188
  // 全局事件维护
189
- _defineProperty(this, "_events", new Map());
190
- _defineProperty(this, "debug", false);
189
+ _define_property(this, "_events", new Map());
190
+ _define_property(this, "debug", false);
191
191
  }
192
- _createClass(Watcher, [
192
+ _create_class(Watcher, [
193
193
  {
194
194
  key: "emit",
195
195
  value: // 发布,触发事件
@@ -198,9 +198,9 @@ var Watcher = /*#__PURE__*/ function() {
198
198
  payload[_key - 1] = arguments[_key];
199
199
  }
200
200
  var _this = this;
201
- return _asyncToGenerator(function() {
201
+ return _async_to_generator(function() {
202
202
  var callbacksOrigin, results, _callbacks, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, callback, result, e, err;
203
- return __generator(this, function(_state) {
203
+ return _ts_generator(this, function(_state) {
204
204
  switch(_state.label){
205
205
  case 0:
206
206
  callbacksOrigin = _this._events.get(key);
@@ -209,6 +209,7 @@ var Watcher = /*#__PURE__*/ function() {
209
209
  3,
210
210
  10
211
211
  ];
212
+ // 由于执行回调是异步队列的形式,所以需要复制一份原来的callbacks,确保不会因为循环过程中卸载了一些事件导致的事件执行错误问题
212
213
  _callbacks = callbacksOrigin.slice();
213
214
  _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
214
215
  _state.label = 1;
@@ -246,10 +247,10 @@ var Watcher = /*#__PURE__*/ function() {
246
247
  "正在执行 ".concat(key, " 事件: ").concat(callback.applyingPluginName ? "当前执行的插件为:" + callback.applyingPluginName : "", ", 当前执行函数的参数为").concat(payload.map(function() {
247
248
  return "%o";
248
249
  }).join(","), "。")
249
- ].concat(_toConsumableArray(payload)));
250
+ ].concat(_to_consumable_array(payload)));
250
251
  return [
251
252
  4,
252
- callback.apply(null, _toConsumableArray(payload))
253
+ callback.apply(null, _to_consumable_array(payload))
253
254
  ];
254
255
  case 4:
255
256
  result = _state.sent();
@@ -257,7 +258,7 @@ var Watcher = /*#__PURE__*/ function() {
257
258
  "正在执行 ".concat(key, " 事件: ").concat(callback.applyingPluginName ? "当前执行的插件为:" + callback.applyingPluginName : "", ", 当前执行函数的参数为").concat(payload.map(function() {
258
259
  return "%o";
259
260
  }).join(","), "; 函数的返回结果为%o")
260
- ].concat(_toConsumableArray(payload), [
261
+ ].concat(_to_consumable_array(payload), [
261
262
  result
262
263
  ]));
263
264
  results.push(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-shared",
3
- "version": "2.3.16",
3
+ "version": "2.3.20",
4
4
  "description": "> TODO: description",
5
5
  "author": "郝晨光 <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -30,5 +30,5 @@
30
30
  "humps": "^2.0.1",
31
31
  "ok-i18n": "^3.0.0"
32
32
  },
33
- "gitHead": "d8999b1e2013657a1938e2a483df1b3c77a83e64"
33
+ "gitHead": "a92596468b85e1c494d2f533d7139da7399bd2b9"
34
34
  }