@byteluck-fe/model-driven-settings 2.3.1-beta.8 → 2.4.1-beta.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,19 +1,32 @@
1
- function _assertThisInitialized(self) {
1
+ function _assert_this_initialized(self) {
2
2
  if (self === void 0) {
3
3
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
4
  }
5
5
  return self;
6
6
  }
7
- function _classCallCheck(instance, Constructor) {
7
+ function _class_call_check(instance, Constructor) {
8
8
  if (!(instance instanceof Constructor)) {
9
9
  throw new TypeError("Cannot call a class as a function");
10
10
  }
11
11
  }
12
- function _getPrototypeOf(o) {
13
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
12
+ function _define_property(obj, key, value) {
13
+ if (key in obj) {
14
+ Object.defineProperty(obj, key, {
15
+ value: value,
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true
19
+ });
20
+ } else {
21
+ obj[key] = value;
22
+ }
23
+ return obj;
24
+ }
25
+ function _get_prototype_of(o) {
26
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
14
27
  return o.__proto__ || Object.getPrototypeOf(o);
15
28
  };
16
- return _getPrototypeOf(o);
29
+ return _get_prototype_of(o);
17
30
  }
18
31
  function _inherits(subClass, superClass) {
19
32
  if (typeof superClass !== "function" && superClass !== null) {
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
26
39
  configurable: true
27
40
  }
28
41
  });
29
- if (superClass) _setPrototypeOf(subClass, superClass);
42
+ if (superClass) _set_prototype_of(subClass, superClass);
30
43
  }
31
- function _possibleConstructorReturn(self, call) {
32
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
44
+ function _possible_constructor_return(self, call) {
45
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
33
46
  return call;
34
47
  }
35
- return _assertThisInitialized(self);
48
+ return _assert_this_initialized(self);
36
49
  }
37
- function _setPrototypeOf(o, p) {
38
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
50
+ function _set_prototype_of(o, p) {
51
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
39
52
  o.__proto__ = p;
40
53
  return o;
41
54
  };
42
- return _setPrototypeOf(o, p);
55
+ return _set_prototype_of(o, p);
43
56
  }
44
- var _typeof = function(obj) {
57
+ function _type_of(obj) {
45
58
  "@swc/helpers - typeof";
46
59
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
47
- };
48
- function _isNativeReflectConstruct() {
60
+ }
61
+ function _is_native_reflect_construct() {
49
62
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
50
63
  if (Reflect.construct.sham) return false;
51
64
  if (typeof Proxy === "function") return true;
@@ -56,28 +69,30 @@ function _isNativeReflectConstruct() {
56
69
  return false;
57
70
  }
58
71
  }
59
- function _createSuper(Derived) {
60
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
72
+ function _create_super(Derived) {
73
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
61
74
  return function _createSuperInternal() {
62
- var Super = _getPrototypeOf(Derived), result;
75
+ var Super = _get_prototype_of(Derived), result;
63
76
  if (hasNativeReflectConstruct) {
64
- var NewTarget = _getPrototypeOf(this).constructor;
77
+ var NewTarget = _get_prototype_of(this).constructor;
65
78
  result = Reflect.construct(Super, arguments, NewTarget);
66
79
  } else {
67
80
  result = Super.apply(this, arguments);
68
81
  }
69
- return _possibleConstructorReturn(this, result);
82
+ return _possible_constructor_return(this, result);
70
83
  };
71
84
  }
72
85
  import { BaseProps } from "./base";
73
86
  export var RadioProps = /*#__PURE__*/ function(BaseProps) {
74
87
  "use strict";
75
88
  _inherits(RadioProps, BaseProps);
76
- var _super = _createSuper(RadioProps);
89
+ var _super = _create_super(RadioProps);
77
90
  function RadioProps(props) {
78
- _classCallCheck(this, RadioProps);
91
+ _class_call_check(this, RadioProps);
79
92
  var _this;
80
93
  _this = _super.call(this, props);
94
+ _define_property(_assert_this_initialized(_this), "options", void 0);
95
+ _define_property(_assert_this_initialized(_this), "showType", void 0);
81
96
  var _props_options;
82
97
  _this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
83
98
  var _props_showType;
@@ -1,19 +1,32 @@
1
- function _assertThisInitialized(self) {
1
+ function _assert_this_initialized(self) {
2
2
  if (self === void 0) {
3
3
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
4
  }
5
5
  return self;
6
6
  }
7
- function _classCallCheck(instance, Constructor) {
7
+ function _class_call_check(instance, Constructor) {
8
8
  if (!(instance instanceof Constructor)) {
9
9
  throw new TypeError("Cannot call a class as a function");
10
10
  }
11
11
  }
12
- function _getPrototypeOf(o) {
13
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
12
+ function _define_property(obj, key, value) {
13
+ if (key in obj) {
14
+ Object.defineProperty(obj, key, {
15
+ value: value,
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true
19
+ });
20
+ } else {
21
+ obj[key] = value;
22
+ }
23
+ return obj;
24
+ }
25
+ function _get_prototype_of(o) {
26
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
14
27
  return o.__proto__ || Object.getPrototypeOf(o);
15
28
  };
16
- return _getPrototypeOf(o);
29
+ return _get_prototype_of(o);
17
30
  }
18
31
  function _inherits(subClass, superClass) {
19
32
  if (typeof superClass !== "function" && superClass !== null) {
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
26
39
  configurable: true
27
40
  }
28
41
  });
29
- if (superClass) _setPrototypeOf(subClass, superClass);
42
+ if (superClass) _set_prototype_of(subClass, superClass);
30
43
  }
31
- function _possibleConstructorReturn(self, call) {
32
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
44
+ function _possible_constructor_return(self, call) {
45
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
33
46
  return call;
34
47
  }
35
- return _assertThisInitialized(self);
48
+ return _assert_this_initialized(self);
36
49
  }
37
- function _setPrototypeOf(o, p) {
38
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
50
+ function _set_prototype_of(o, p) {
51
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
39
52
  o.__proto__ = p;
40
53
  return o;
41
54
  };
42
- return _setPrototypeOf(o, p);
55
+ return _set_prototype_of(o, p);
43
56
  }
44
- var _typeof = function(obj) {
57
+ function _type_of(obj) {
45
58
  "@swc/helpers - typeof";
46
59
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
47
- };
48
- function _isNativeReflectConstruct() {
60
+ }
61
+ function _is_native_reflect_construct() {
49
62
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
50
63
  if (Reflect.construct.sham) return false;
51
64
  if (typeof Proxy === "function") return true;
@@ -56,28 +69,30 @@ function _isNativeReflectConstruct() {
56
69
  return false;
57
70
  }
58
71
  }
59
- function _createSuper(Derived) {
60
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
72
+ function _create_super(Derived) {
73
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
61
74
  return function _createSuperInternal() {
62
- var Super = _getPrototypeOf(Derived), result;
75
+ var Super = _get_prototype_of(Derived), result;
63
76
  if (hasNativeReflectConstruct) {
64
- var NewTarget = _getPrototypeOf(this).constructor;
77
+ var NewTarget = _get_prototype_of(this).constructor;
65
78
  result = Reflect.construct(Super, arguments, NewTarget);
66
79
  } else {
67
80
  result = Super.apply(this, arguments);
68
81
  }
69
- return _possibleConstructorReturn(this, result);
82
+ return _possible_constructor_return(this, result);
70
83
  };
71
84
  }
72
85
  import { BaseProps } from "./base";
73
86
  export var SelectProps = /*#__PURE__*/ function(BaseProps) {
74
87
  "use strict";
75
88
  _inherits(SelectProps, BaseProps);
76
- var _super = _createSuper(SelectProps);
89
+ var _super = _create_super(SelectProps);
77
90
  function SelectProps(props) {
78
- _classCallCheck(this, SelectProps);
91
+ _class_call_check(this, SelectProps);
79
92
  var _this;
80
93
  _this = _super.call(this, props);
94
+ _define_property(_assert_this_initialized(_this), "placeholder", void 0);
95
+ _define_property(_assert_this_initialized(_this), "options", void 0);
81
96
  var _props_placeholder;
82
97
  _this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
83
98
  var _props_options;
@@ -1,19 +1,32 @@
1
- function _assertThisInitialized(self) {
1
+ function _assert_this_initialized(self) {
2
2
  if (self === void 0) {
3
3
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
4
  }
5
5
  return self;
6
6
  }
7
- function _classCallCheck(instance, Constructor) {
7
+ function _class_call_check(instance, Constructor) {
8
8
  if (!(instance instanceof Constructor)) {
9
9
  throw new TypeError("Cannot call a class as a function");
10
10
  }
11
11
  }
12
- function _getPrototypeOf(o) {
13
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
12
+ function _define_property(obj, key, value) {
13
+ if (key in obj) {
14
+ Object.defineProperty(obj, key, {
15
+ value: value,
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true
19
+ });
20
+ } else {
21
+ obj[key] = value;
22
+ }
23
+ return obj;
24
+ }
25
+ function _get_prototype_of(o) {
26
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
14
27
  return o.__proto__ || Object.getPrototypeOf(o);
15
28
  };
16
- return _getPrototypeOf(o);
29
+ return _get_prototype_of(o);
17
30
  }
18
31
  function _inherits(subClass, superClass) {
19
32
  if (typeof superClass !== "function" && superClass !== null) {
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
26
39
  configurable: true
27
40
  }
28
41
  });
29
- if (superClass) _setPrototypeOf(subClass, superClass);
42
+ if (superClass) _set_prototype_of(subClass, superClass);
30
43
  }
31
- function _possibleConstructorReturn(self, call) {
32
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
44
+ function _possible_constructor_return(self, call) {
45
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
33
46
  return call;
34
47
  }
35
- return _assertThisInitialized(self);
48
+ return _assert_this_initialized(self);
36
49
  }
37
- function _setPrototypeOf(o, p) {
38
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
50
+ function _set_prototype_of(o, p) {
51
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
39
52
  o.__proto__ = p;
40
53
  return o;
41
54
  };
42
- return _setPrototypeOf(o, p);
55
+ return _set_prototype_of(o, p);
43
56
  }
44
- var _typeof = function(obj) {
57
+ function _type_of(obj) {
45
58
  "@swc/helpers - typeof";
46
59
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
47
- };
48
- function _isNativeReflectConstruct() {
60
+ }
61
+ function _is_native_reflect_construct() {
49
62
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
50
63
  if (Reflect.construct.sham) return false;
51
64
  if (typeof Proxy === "function") return true;
@@ -56,28 +69,31 @@ function _isNativeReflectConstruct() {
56
69
  return false;
57
70
  }
58
71
  }
59
- function _createSuper(Derived) {
60
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
72
+ function _create_super(Derived) {
73
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
61
74
  return function _createSuperInternal() {
62
- var Super = _getPrototypeOf(Derived), result;
75
+ var Super = _get_prototype_of(Derived), result;
63
76
  if (hasNativeReflectConstruct) {
64
- var NewTarget = _getPrototypeOf(this).constructor;
77
+ var NewTarget = _get_prototype_of(this).constructor;
65
78
  result = Reflect.construct(Super, arguments, NewTarget);
66
79
  } else {
67
80
  result = Super.apply(this, arguments);
68
81
  }
69
- return _possibleConstructorReturn(this, result);
82
+ return _possible_constructor_return(this, result);
70
83
  };
71
84
  }
72
85
  import { BaseProps } from "./base";
73
86
  export var SwitchProps = /*#__PURE__*/ function(BaseProps) {
74
87
  "use strict";
75
88
  _inherits(SwitchProps, BaseProps);
76
- var _super = _createSuper(SwitchProps);
89
+ var _super = _create_super(SwitchProps);
77
90
  function SwitchProps(props) {
78
- _classCallCheck(this, SwitchProps);
91
+ _class_call_check(this, SwitchProps);
79
92
  var _this;
80
93
  _this = _super.call(this, props);
94
+ _define_property(_assert_this_initialized(_this), "showType", void 0);
95
+ _define_property(_assert_this_initialized(_this), "tips", void 0);
96
+ _define_property(_assert_this_initialized(_this), "disabled", void 0);
81
97
  var _props_showType;
82
98
  _this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : "switch";
83
99
  var _props_tips;
@@ -1,19 +1,32 @@
1
- function _assertThisInitialized(self) {
1
+ function _assert_this_initialized(self) {
2
2
  if (self === void 0) {
3
3
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
4
  }
5
5
  return self;
6
6
  }
7
- function _classCallCheck(instance, Constructor) {
7
+ function _class_call_check(instance, Constructor) {
8
8
  if (!(instance instanceof Constructor)) {
9
9
  throw new TypeError("Cannot call a class as a function");
10
10
  }
11
11
  }
12
- function _getPrototypeOf(o) {
13
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
12
+ function _define_property(obj, key, value) {
13
+ if (key in obj) {
14
+ Object.defineProperty(obj, key, {
15
+ value: value,
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true
19
+ });
20
+ } else {
21
+ obj[key] = value;
22
+ }
23
+ return obj;
24
+ }
25
+ function _get_prototype_of(o) {
26
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
14
27
  return o.__proto__ || Object.getPrototypeOf(o);
15
28
  };
16
- return _getPrototypeOf(o);
29
+ return _get_prototype_of(o);
17
30
  }
18
31
  function _inherits(subClass, superClass) {
19
32
  if (typeof superClass !== "function" && superClass !== null) {
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
26
39
  configurable: true
27
40
  }
28
41
  });
29
- if (superClass) _setPrototypeOf(subClass, superClass);
42
+ if (superClass) _set_prototype_of(subClass, superClass);
30
43
  }
31
- function _possibleConstructorReturn(self, call) {
32
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
44
+ function _possible_constructor_return(self, call) {
45
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
33
46
  return call;
34
47
  }
35
- return _assertThisInitialized(self);
48
+ return _assert_this_initialized(self);
36
49
  }
37
- function _setPrototypeOf(o, p) {
38
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
50
+ function _set_prototype_of(o, p) {
51
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
39
52
  o.__proto__ = p;
40
53
  return o;
41
54
  };
42
- return _setPrototypeOf(o, p);
55
+ return _set_prototype_of(o, p);
43
56
  }
44
- var _typeof = function(obj) {
57
+ function _type_of(obj) {
45
58
  "@swc/helpers - typeof";
46
59
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
47
- };
48
- function _isNativeReflectConstruct() {
60
+ }
61
+ function _is_native_reflect_construct() {
49
62
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
50
63
  if (Reflect.construct.sham) return false;
51
64
  if (typeof Proxy === "function") return true;
@@ -56,28 +69,34 @@ function _isNativeReflectConstruct() {
56
69
  return false;
57
70
  }
58
71
  }
59
- function _createSuper(Derived) {
60
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
72
+ function _create_super(Derived) {
73
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
61
74
  return function _createSuperInternal() {
62
- var Super = _getPrototypeOf(Derived), result;
75
+ var Super = _get_prototype_of(Derived), result;
63
76
  if (hasNativeReflectConstruct) {
64
- var NewTarget = _getPrototypeOf(this).constructor;
77
+ var NewTarget = _get_prototype_of(this).constructor;
65
78
  result = Reflect.construct(Super, arguments, NewTarget);
66
79
  } else {
67
80
  result = Super.apply(this, arguments);
68
81
  }
69
- return _possibleConstructorReturn(this, result);
82
+ return _possible_constructor_return(this, result);
70
83
  };
71
84
  }
72
85
  import { BaseProps } from "./base";
73
86
  export var TextareaProps = /*#__PURE__*/ function(BaseProps) {
74
87
  "use strict";
75
88
  _inherits(TextareaProps, BaseProps);
76
- var _super = _createSuper(TextareaProps);
89
+ var _super = _create_super(TextareaProps);
77
90
  function TextareaProps(props) {
78
- _classCallCheck(this, TextareaProps);
91
+ _class_call_check(this, TextareaProps);
79
92
  var _this;
80
93
  _this = _super.call(this, props);
94
+ _define_property(_assert_this_initialized(_this), "maxLength", void 0);
95
+ _define_property(_assert_this_initialized(_this), "minLength", void 0);
96
+ _define_property(_assert_this_initialized(_this), "placeholder", void 0);
97
+ _define_property(_assert_this_initialized(_this), "i18n", void 0);
98
+ _define_property(_assert_this_initialized(_this), "maxRows", void 0);
99
+ _define_property(_assert_this_initialized(_this), "minRows", void 0);
81
100
  var _props_maxLength;
82
101
  _this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength : "";
83
102
  var _props_minLength;
@@ -1,12 +1,30 @@
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 _define_property(obj, key, value) {
7
+ if (key in obj) {
8
+ Object.defineProperty(obj, key, {
9
+ value: value,
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true
13
+ });
14
+ } else {
15
+ obj[key] = value;
16
+ }
17
+ return obj;
18
+ }
6
19
  export var Group = function Group(schema) {
7
20
  "use strict";
8
- _classCallCheck(this, Group);
9
- this.type = "group";
21
+ _class_call_check(this, Group);
22
+ _define_property(this, "type", "group");
23
+ _define_property(this, "title", void 0);
24
+ _define_property(this, "required", void 0);
25
+ _define_property(this, "items", void 0);
26
+ _define_property(this, "tips", void 0);
27
+ _define_property(this, "fromId", void 0);
10
28
  var _schema_title;
11
29
  this.title = (_schema_title = schema.title) !== null && _schema_title !== void 0 ? _schema_title : "";
12
30
  var _schema_required;
@@ -1,14 +1,51 @@
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 _defineProperties(target, props) {
7
+ for(var i = 0; i < props.length; i++){
8
+ var descriptor = props[i];
9
+ descriptor.enumerable = descriptor.enumerable || false;
10
+ descriptor.configurable = true;
11
+ if ("value" in descriptor) descriptor.writable = true;
12
+ Object.defineProperty(target, descriptor.key, descriptor);
13
+ }
14
+ }
15
+ function _create_class(Constructor, protoProps, staticProps) {
16
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17
+ if (staticProps) _defineProperties(Constructor, staticProps);
18
+ return Constructor;
19
+ }
20
+ function _define_property(obj, key, value) {
21
+ if (key in obj) {
22
+ Object.defineProperty(obj, key, {
23
+ value: value,
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true
27
+ });
28
+ } else {
29
+ obj[key] = value;
30
+ }
31
+ return obj;
32
+ }
6
33
  import { BaseProps } from "../props/base";
7
34
  import { error, isPlainObject, noop } from "@byteluck-fe/model-driven-shared";
8
35
  export var Setting = /*#__PURE__*/ function() {
9
36
  "use strict";
10
37
  function Setting(schema) {
11
- _classCallCheck(this, Setting);
38
+ _class_call_check(this, Setting);
39
+ _define_property(this, "type", void 0);
40
+ _define_property(this, "label", void 0);
41
+ _define_property(this, "key", void 0);
42
+ _define_property(this, "component", void 0);
43
+ _define_property(this, "effect", void 0);
44
+ _define_property(this, "scopeEffect", void 0);
45
+ _define_property(this, "defaultValue", void 0);
46
+ _define_property(this, "validator", void 0);
47
+ _define_property(this, "props", void 0);
48
+ _define_property(this, "effectKeys", void 0);
12
49
  this.type = schema.type;
13
50
  this.label = schema.label;
14
51
  this.key = schema.key;
@@ -24,46 +61,59 @@ export var Setting = /*#__PURE__*/ function() {
24
61
  // private init
25
62
  this.effectKeys = Object.keys(this.effect);
26
63
  }
27
- var _proto = Setting.prototype;
28
- _proto.filterEffects = function filterEffects(effectKey) {
29
- var _this = this;
30
- if (effectKey === "") {
31
- return Object.values(this.effect);
32
- }
33
- return this.effectKeys.filter(function(key) {
34
- // 触发规则:effectKeys => effectFns
35
- // dataBind => dataBind
36
- // dataBind.fieldCode => dataBind、dataBind.fieldCode
37
- var regexp = new RegExp("^".concat(key, "(\\.\\w+)*$"));
38
- return regexp.test(effectKey);
39
- }).map(function(key) {
40
- return _this.effect[key];
41
- });
42
- };
43
- _proto.callEffectFn = function callEffectFn(effectFn, args) {
44
- try {
45
- var result = effectFn.apply(null, args);
46
- if (isPlainObject(result)) {
47
- Object.assign(this.props, result);
64
+ _create_class(Setting, [
65
+ {
66
+ key: "filterEffects",
67
+ value: function filterEffects(effectKey) {
68
+ var _this = this;
69
+ if (effectKey === "") {
70
+ return Object.values(this.effect);
71
+ }
72
+ return this.effectKeys.filter(function(key) {
73
+ // 触发规则:effectKeys => effectFns
74
+ // dataBind => dataBind
75
+ // dataBind.fieldCode => dataBind、dataBind.fieldCode
76
+ var regexp = new RegExp("^".concat(key, "(\\.\\w+)*$"));
77
+ return regexp.test(effectKey);
78
+ }).map(function(key) {
79
+ return _this.effect[key];
80
+ });
81
+ }
82
+ },
83
+ {
84
+ key: "callEffectFn",
85
+ value: function callEffectFn(effectFn, args) {
86
+ try {
87
+ var result = effectFn.apply(null, args);
88
+ if (isPlainObject(result)) {
89
+ Object.assign(this.props, result);
90
+ }
91
+ } catch (e) {
92
+ error("effect error \n ".concat(e));
93
+ }
94
+ }
95
+ },
96
+ {
97
+ key: "callEffect",
98
+ value: function callEffect(effectKey) {
99
+ for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
100
+ args[_key - 1] = arguments[_key];
101
+ }
102
+ var _this = this;
103
+ this.filterEffects(effectKey).forEach(function(fn) {
104
+ return _this.callEffectFn(fn, args);
105
+ });
106
+ }
107
+ },
108
+ {
109
+ key: "callScopeEffect",
110
+ value: function callScopeEffect() {
111
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
112
+ args[_key] = arguments[_key];
113
+ }
114
+ this.callEffectFn(this.scopeEffect, args);
48
115
  }
49
- } catch (e) {
50
- error("effect error \n ".concat(e));
51
- }
52
- };
53
- _proto.callEffect = function callEffect(effectKey) {
54
- for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
55
- args[_key - 1] = arguments[_key];
56
- }
57
- var _this = this;
58
- this.filterEffects(effectKey).forEach(function(fn) {
59
- return _this.callEffectFn(fn, args);
60
- });
61
- };
62
- _proto.callScopeEffect = function callScopeEffect() {
63
- for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
64
- args[_key] = arguments[_key];
65
116
  }
66
- this.callEffectFn(this.scopeEffect, args);
67
- };
117
+ ]);
68
118
  return Setting;
69
119
  }();