@byteluck-fe/model-driven-settings 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 CHANGED
@@ -1,30 +1,30 @@
1
- # Settings
2
- 自定义控件设置
3
-
4
- ```
5
- │ defineInstance.ts // 定义控件函数
6
- │ index.ts
7
- │ initSettings.ts // 初始化setting,被外部引用
8
-
9
- ├─default // 内部默认值
10
- │ createBaseFields.ts // 基础控件的默认setting
11
- │ createFormBaseFields.ts // 表单控件的默认setting
12
- │ index.ts
13
-
14
- ├─props // 内置的setting控件
15
- │ base.ts
16
- │ checkbox.ts
17
- │ custom.ts
18
- │ input-number.ts
19
- │ input.ts
20
- │ radio.ts
21
- │ select.ts
22
- │ switch.ts
23
- │ textarea.ts
24
-
25
- └─schema // setting的容器和schema定义
26
- group.ts
27
- index.ts
28
- setting.ts
29
- tab.ts
30
- ```
1
+ # Settings
2
+ 自定义控件设置
3
+
4
+ ```
5
+ │ defineInstance.ts // 定义控件函数
6
+ │ index.ts
7
+ │ initSettings.ts // 初始化setting,被外部引用
8
+
9
+ ├─default // 内部默认值
10
+ │ createBaseFields.ts // 基础控件的默认setting
11
+ │ createFormBaseFields.ts // 表单控件的默认setting
12
+ │ index.ts
13
+
14
+ ├─props // 内置的setting控件
15
+ │ base.ts
16
+ │ checkbox.ts
17
+ │ custom.ts
18
+ │ input-number.ts
19
+ │ input.ts
20
+ │ radio.ts
21
+ │ select.ts
22
+ │ switch.ts
23
+ │ textarea.ts
24
+
25
+ └─schema // setting的容器和schema定义
26
+ group.ts
27
+ index.ts
28
+ setting.ts
29
+ tab.ts
30
+ ```
@@ -1,8 +1,8 @@
1
- import { RulesMessage } from '@byteluck-fe/model-driven-shared';
1
+ import { getLocaleText } from '@byteluck-fe/locale-message';
2
2
  export function createBaseFields() {
3
3
  return [
4
4
  {
5
- label: RulesMessage.getMessage('hide'),
5
+ label: getLocaleText('CMD.hide', null, '隐藏'),
6
6
  key: 'isHide',
7
7
  type: 'boolean',
8
8
  component: 'switch'
@@ -24,7 +24,7 @@ function _unsupported_iterable_to_array(o, minLen) {
24
24
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
25
25
  }
26
26
  import { createBaseFields } from './createBaseFields';
27
- import { RulesMessage } from '@byteluck-fe/model-driven-shared';
27
+ import { getLocaleText } from '@byteluck-fe/locale-message';
28
28
  export function createFormBaseFields(defaultValues) {
29
29
  return _to_consumable_array(createBaseFields()).concat([
30
30
  {
@@ -44,12 +44,12 @@ export function createFormBaseFields(defaultValues) {
44
44
  defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.caption,
45
45
  validator: function validator(value) {
46
46
  if (!value) {
47
- return RulesMessage.getMessage('titleRequired');
47
+ return getLocaleText('CMD.titleRequired', null, '标题必填');
48
48
  }
49
49
  }
50
50
  },
51
51
  {
52
- label: RulesMessage.getMessage('hideCaption'),
52
+ label: getLocaleText('CMD.hideCaption', null, '隐藏标题'),
53
53
  key: 'isHideCaption',
54
54
  type: 'boolean',
55
55
  component: 'switch',
@@ -80,11 +80,11 @@ export function createFormBaseFields(defaultValues) {
80
80
  showType: 'solid',
81
81
  options: [
82
82
  {
83
- label: RulesMessage.getMessage('top'),
83
+ label: getLocaleText('CMD.top', null, '上下布局'),
84
84
  value: 'top'
85
85
  },
86
86
  {
87
- label: RulesMessage.getMessage('left'),
87
+ label: getLocaleText('CMD.left', null, '左右布局'),
88
88
  value: 'left'
89
89
  }
90
90
  ]
@@ -99,25 +99,25 @@ export function createFormBaseFields(defaultValues) {
99
99
  showType: 'solid',
100
100
  options: [
101
101
  {
102
- label: RulesMessage.getMessage('default'),
102
+ label: getLocaleText('CMD.default', null, '普通'),
103
103
  value: 'default'
104
104
  },
105
105
  {
106
- label: RulesMessage.getMessage('readonly'),
106
+ label: getLocaleText('CMD.readonly', null, '只读'),
107
107
  value: 'readonly'
108
108
  }
109
109
  ]
110
110
  }
111
111
  },
112
112
  {
113
- label: RulesMessage.getMessage('required'),
113
+ label: getLocaleText('CMD.required', null, '必填'),
114
114
  key: 'required',
115
115
  type: 'boolean',
116
116
  component: 'switch',
117
117
  defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.required
118
118
  },
119
119
  {
120
- label: RulesMessage.getMessage('textTip'),
120
+ label: getLocaleText('CMD.textTip', null, '提示文字'),
121
121
  key: 'placeholder',
122
122
  type: 'string',
123
123
  component: 'input',
@@ -34,15 +34,15 @@ export var BaseProps = /*#__PURE__*/ function() {
34
34
  "use strict";
35
35
  function BaseProps(props) {
36
36
  _class_call_check(this, BaseProps);
37
- /**
38
- * 显示隐藏
37
+ /**
38
+ * 显示隐藏
39
39
  * */ _define_property(this, "visible", void 0);
40
- /**
41
- * 开启表达式
40
+ /**
41
+ * 开启表达式
42
42
  * */ _define_property(this, "expression", void 0);
43
- /**
44
- *
45
- * 是否改变父属性
43
+ /**
44
+ *
45
+ * 是否改变父属性
46
46
  */ _define_property(this, "updateParent", void 0);
47
47
  var _props_visible;
48
48
  this.visible = (_props_visible = props === null || props === void 0 ? void 0 : props.visible) !== null && _props_visible !== void 0 ? _props_visible : true;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,39 +63,23 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { BaseProps } from './base';
86
74
  export var CheckboxProps = /*#__PURE__*/ function(BaseProps) {
87
75
  "use strict";
88
76
  _inherits(CheckboxProps, BaseProps);
89
- var _super = _create_super(CheckboxProps);
90
77
  function CheckboxProps(props) {
91
78
  _class_call_check(this, CheckboxProps);
92
79
  var _this;
93
- _this = _super.call(this, props);
94
- _define_property(_assert_this_initialized(_this), "options", void 0);
80
+ _this = _call_super(this, CheckboxProps, [
81
+ props
82
+ ]), _define_property(_this, "options", void 0);
95
83
  var _props_options;
96
84
  _this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
97
85
  return _this;
@@ -12,6 +12,10 @@ function _assert_this_initialized(self) {
12
12
  }
13
13
  return self;
14
14
  }
15
+ function _call_super(_this, derived, args) {
16
+ derived = _get_prototype_of(derived);
17
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
18
+ }
15
19
  function _class_call_check(instance, Constructor) {
16
20
  if (!(instance instanceof Constructor)) {
17
21
  throw new TypeError("Cannot call a class as a function");
@@ -92,39 +96,24 @@ function _unsupported_iterable_to_array(o, minLen) {
92
96
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
93
97
  }
94
98
  function _is_native_reflect_construct() {
95
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
96
- if (Reflect.construct.sham) return false;
97
- if (typeof Proxy === "function") return true;
98
99
  try {
99
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
100
- return true;
101
- } catch (e) {
102
- return false;
103
- }
104
- }
105
- function _create_super(Derived) {
106
- var hasNativeReflectConstruct = _is_native_reflect_construct();
107
- return function _createSuperInternal() {
108
- var Super = _get_prototype_of(Derived), result;
109
- if (hasNativeReflectConstruct) {
110
- var NewTarget = _get_prototype_of(this).constructor;
111
- result = Reflect.construct(Super, arguments, NewTarget);
112
- } else {
113
- result = Super.apply(this, arguments);
114
- }
115
- return _possible_constructor_return(this, result);
116
- };
100
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
101
+ } catch (_) {}
102
+ return (_is_native_reflect_construct = function() {
103
+ return !!result;
104
+ })();
117
105
  }
118
106
  import { isPlainObject } from '@byteluck-fe/model-driven-shared';
119
107
  import { BaseProps } from './base';
120
108
  export var CustomProps = /*#__PURE__*/ function(BaseProps) {
121
109
  "use strict";
122
110
  _inherits(CustomProps, BaseProps);
123
- var _super = _create_super(CustomProps);
124
111
  function CustomProps(props) {
125
112
  _class_call_check(this, CustomProps);
126
113
  var _this;
127
- _this = _super.call(this, props);
114
+ _this = _call_super(this, CustomProps, [
115
+ props
116
+ ]);
128
117
  if (isPlainObject(props)) {
129
118
  Object.entries(props).forEach(function(param) {
130
119
  var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,41 +63,23 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { BaseProps } from './base';
86
74
  export var InputNumberProps = /*#__PURE__*/ function(BaseProps) {
87
75
  "use strict";
88
76
  _inherits(InputNumberProps, BaseProps);
89
- var _super = _create_super(InputNumberProps);
90
77
  function InputNumberProps(props) {
91
78
  _class_call_check(this, InputNumberProps);
92
79
  var _this;
93
- _this = _super.call(this, props);
94
- _define_property(_assert_this_initialized(_this), "max", void 0);
95
- _define_property(_assert_this_initialized(_this), "min", void 0);
96
- _define_property(_assert_this_initialized(_this), "placeholder", void 0);
80
+ _this = _call_super(this, InputNumberProps, [
81
+ props
82
+ ]), _define_property(_this, "max", void 0), _define_property(_this, "min", void 0), _define_property(_this, "placeholder", void 0);
97
83
  var _props_max;
98
84
  _this.max = (_props_max = props === null || props === void 0 ? void 0 : props.max) !== null && _props_max !== void 0 ? _props_max : '';
99
85
  var _props_min;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,42 +63,23 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { BaseProps } from './base';
86
74
  export var InputProps = /*#__PURE__*/ function(BaseProps) {
87
75
  "use strict";
88
76
  _inherits(InputProps, BaseProps);
89
- var _super = _create_super(InputProps);
90
77
  function InputProps(props) {
91
78
  _class_call_check(this, InputProps);
92
79
  var _this;
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);
80
+ _this = _call_super(this, InputProps, [
81
+ props
82
+ ]), _define_property(_this, "maxLength", void 0), _define_property(_this, "minLength", void 0), _define_property(_this, "placeholder", void 0), _define_property(_this, "i18n", void 0);
98
83
  var _props_maxLength;
99
84
  _this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength : '';
100
85
  var _props_minLength;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,40 +63,23 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { BaseProps } from './base';
86
74
  export var RadioProps = /*#__PURE__*/ function(BaseProps) {
87
75
  "use strict";
88
76
  _inherits(RadioProps, BaseProps);
89
- var _super = _create_super(RadioProps);
90
77
  function RadioProps(props) {
91
78
  _class_call_check(this, RadioProps);
92
79
  var _this;
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);
80
+ _this = _call_super(this, RadioProps, [
81
+ props
82
+ ]), _define_property(_this, "options", void 0), _define_property(_this, "showType", void 0);
96
83
  var _props_options;
97
84
  _this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
98
85
  var _props_showType;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,40 +63,23 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { BaseProps } from './base';
86
74
  export var SelectProps = /*#__PURE__*/ function(BaseProps) {
87
75
  "use strict";
88
76
  _inherits(SelectProps, BaseProps);
89
- var _super = _create_super(SelectProps);
90
77
  function SelectProps(props) {
91
78
  _class_call_check(this, SelectProps);
92
79
  var _this;
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);
80
+ _this = _call_super(this, SelectProps, [
81
+ props
82
+ ]), _define_property(_this, "placeholder", void 0), _define_property(_this, "options", void 0);
96
83
  var _props_placeholder;
97
84
  _this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : '';
98
85
  var _props_options;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,41 +63,23 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { BaseProps } from './base';
86
74
  export var SwitchProps = /*#__PURE__*/ function(BaseProps) {
87
75
  "use strict";
88
76
  _inherits(SwitchProps, BaseProps);
89
- var _super = _create_super(SwitchProps);
90
77
  function SwitchProps(props) {
91
78
  _class_call_check(this, SwitchProps);
92
79
  var _this;
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);
80
+ _this = _call_super(this, SwitchProps, [
81
+ props
82
+ ]), _define_property(_this, "showType", void 0), _define_property(_this, "tips", void 0), _define_property(_this, "disabled", void 0);
97
83
  var _props_showType;
98
84
  _this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : 'switch';
99
85
  var _props_tips;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,44 +63,23 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { BaseProps } from './base';
86
74
  export var TextareaProps = /*#__PURE__*/ function(BaseProps) {
87
75
  "use strict";
88
76
  _inherits(TextareaProps, BaseProps);
89
- var _super = _create_super(TextareaProps);
90
77
  function TextareaProps(props) {
91
78
  _class_call_check(this, TextareaProps);
92
79
  var _this;
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);
80
+ _this = _call_super(this, TextareaProps, [
81
+ props
82
+ ]), _define_property(_this, "maxLength", void 0), _define_property(_this, "minLength", void 0), _define_property(_this, "placeholder", void 0), _define_property(_this, "i18n", void 0), _define_property(_this, "maxRows", void 0), _define_property(_this, "minRows", void 0);
100
83
  var _props_maxLength;
101
84
  _this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength : '';
102
85
  var _props_minLength;