@byteluck-fe/model-driven-settings 2.5.0-alpha.4 → 2.5.0-alpha.6
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/default/createFormBaseFields.js +11 -11
- package/dist/esm/initSettings.js +7 -7
- package/dist/esm/props/base.js +7 -7
- package/dist/esm/props/checkbox.js +24 -24
- package/dist/esm/props/custom.js +32 -32
- package/dist/esm/props/input-number.js +26 -26
- package/dist/esm/props/input.js +27 -27
- package/dist/esm/props/radio.js +25 -25
- package/dist/esm/props/select.js +25 -25
- package/dist/esm/props/switch.js +26 -26
- package/dist/esm/props/textarea.js +29 -29
- package/dist/esm/schema/group.js +9 -9
- package/dist/esm/schema/setting.js +15 -15
- package/dist/esm/schema/tab.js +6 -6
- package/dist/index.umd.js +2 -2
- package/package.json +3 -3
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _arrayLikeToArray(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
|
|
7
|
-
if (Array.isArray(arr)) return
|
|
6
|
+
function _arrayWithoutHoles(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function _iterableToArray(iter) {
|
|
10
10
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function _nonIterableSpread() {
|
|
13
13
|
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
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
15
|
+
function _toConsumableArray(arr) {
|
|
16
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
19
19
|
if (!o) return;
|
|
20
|
-
if (typeof o === "string") return
|
|
20
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
21
21
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
22
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
23
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
24
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
25
25
|
}
|
|
26
26
|
import { createBaseFields } from "./createBaseFields";
|
|
27
27
|
export function createFormBaseFields(defaultValues) {
|
|
28
|
-
return
|
|
28
|
+
return _toConsumableArray(createBaseFields()).concat([
|
|
29
29
|
{
|
|
30
30
|
type: "DataBind",
|
|
31
31
|
key: "dataBind",
|
package/dist/esm/initSettings.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _defineProperty(obj, key, value) {
|
|
2
2
|
if (key in obj) {
|
|
3
3
|
Object.defineProperty(obj, key, {
|
|
4
4
|
value: value,
|
|
@@ -11,7 +11,7 @@ function _define_property(obj, key, value) {
|
|
|
11
11
|
}
|
|
12
12
|
return obj;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function _objectSpread(target) {
|
|
15
15
|
for(var i = 1; i < arguments.length; i++){
|
|
16
16
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
17
|
var ownKeys = Object.keys(source);
|
|
@@ -21,7 +21,7 @@ function _object_spread(target) {
|
|
|
21
21
|
}));
|
|
22
22
|
}
|
|
23
23
|
ownKeys.forEach(function(key) {
|
|
24
|
-
|
|
24
|
+
_defineProperty(target, key, source[key]);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
return target;
|
|
@@ -39,7 +39,7 @@ function ownKeys(object, enumerableOnly) {
|
|
|
39
39
|
}
|
|
40
40
|
return keys;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function _objectSpreadProps(target, source) {
|
|
43
43
|
source = source != null ? source : {};
|
|
44
44
|
if (Object.getOwnPropertyDescriptors) {
|
|
45
45
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
@@ -86,14 +86,14 @@ function buildSettingItem(settingMap) {
|
|
|
86
86
|
if (!schema) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
return new Setting(
|
|
89
|
+
return new Setting(_objectSpreadProps(_objectSpread({}, schema), {
|
|
90
90
|
props: propsFactory(schema.component, "props" in schema ? schema.props : undefined)
|
|
91
91
|
}));
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
export function initSettings(params) {
|
|
95
95
|
var generatorGroup = function generatorGroup(group) {
|
|
96
|
-
return new Group(
|
|
96
|
+
return new Group(_objectSpreadProps(_objectSpread({}, group), {
|
|
97
97
|
items: group.items.map(buildSettingItem(settingMap)).filter(Boolean)
|
|
98
98
|
}));
|
|
99
99
|
};
|
|
@@ -106,7 +106,7 @@ export function initSettings(params) {
|
|
|
106
106
|
}, new Map());
|
|
107
107
|
return params.groups.map(function(item) {
|
|
108
108
|
if (isTabSchema(item)) {
|
|
109
|
-
return new Tab(
|
|
109
|
+
return new Tab(_objectSpreadProps(_objectSpread({}, item), {
|
|
110
110
|
items: generatorGroups(item.items)
|
|
111
111
|
}));
|
|
112
112
|
} else {
|
package/dist/esm/props/base.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _classCallCheck(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
|
|
15
|
+
function _createClass(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
|
|
20
|
+
function _defineProperty(obj, key, value) {
|
|
21
21
|
if (key in obj) {
|
|
22
22
|
Object.defineProperty(obj, key, {
|
|
23
23
|
value: value,
|
|
@@ -33,19 +33,19 @@ function _define_property(obj, key, value) {
|
|
|
33
33
|
export var BaseProps = /*#__PURE__*/ function() {
|
|
34
34
|
"use strict";
|
|
35
35
|
function BaseProps(props) {
|
|
36
|
-
|
|
36
|
+
_classCallCheck(this, BaseProps);
|
|
37
37
|
/**
|
|
38
38
|
* 显示隐藏
|
|
39
|
-
* */
|
|
39
|
+
* */ _defineProperty(this, "visible", void 0);
|
|
40
40
|
/**
|
|
41
41
|
* 开启表达式
|
|
42
|
-
* */
|
|
42
|
+
* */ _defineProperty(this, "expression", void 0);
|
|
43
43
|
var _props_visible;
|
|
44
44
|
this.visible = (_props_visible = props === null || props === void 0 ? void 0 : props.visible) !== null && _props_visible !== void 0 ? _props_visible : true;
|
|
45
45
|
var _props_expression;
|
|
46
46
|
this.expression = (_props_expression = props === null || props === void 0 ? void 0 : props.expression) !== null && _props_expression !== void 0 ? _props_expression : false;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
_createClass(BaseProps, [
|
|
49
49
|
{
|
|
50
50
|
key: "isAtomicComponent",
|
|
51
51
|
get: function get() {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assertThisInitialized(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
|
|
7
|
+
function _classCallCheck(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
|
|
12
|
+
function _defineProperty(obj, key, value) {
|
|
13
13
|
if (key in obj) {
|
|
14
14
|
Object.defineProperty(obj, key, {
|
|
15
15
|
value: value,
|
|
@@ -22,11 +22,11 @@ function _define_property(obj, key, value) {
|
|
|
22
22
|
}
|
|
23
23
|
return obj;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function _getPrototypeOf(o) {
|
|
26
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
27
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return _getPrototypeOf(o);
|
|
30
30
|
}
|
|
31
31
|
function _inherits(subClass, superClass) {
|
|
32
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -39,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
39
39
|
configurable: true
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
if (superClass)
|
|
42
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
if (call && (
|
|
44
|
+
function _possibleConstructorReturn(self, call) {
|
|
45
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
46
46
|
return call;
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return _assertThisInitialized(self);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
50
|
+
function _setPrototypeOf(o, p) {
|
|
51
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
52
52
|
o.__proto__ = p;
|
|
53
53
|
return o;
|
|
54
54
|
};
|
|
55
|
-
return
|
|
55
|
+
return _setPrototypeOf(o, p);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
var _typeof = function(obj) {
|
|
58
58
|
"@swc/helpers - typeof";
|
|
59
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
60
|
-
}
|
|
61
|
-
function
|
|
60
|
+
};
|
|
61
|
+
function _isNativeReflectConstruct() {
|
|
62
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
63
63
|
if (Reflect.construct.sham) return false;
|
|
64
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -69,29 +69,29 @@ function _is_native_reflect_construct() {
|
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _createSuper(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
74
74
|
return function _createSuperInternal() {
|
|
75
|
-
var Super =
|
|
75
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
76
76
|
if (hasNativeReflectConstruct) {
|
|
77
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
78
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
79
79
|
} else {
|
|
80
80
|
result = Super.apply(this, arguments);
|
|
81
81
|
}
|
|
82
|
-
return
|
|
82
|
+
return _possibleConstructorReturn(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
import { BaseProps } from "./base";
|
|
86
86
|
export var CheckboxProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(CheckboxProps, BaseProps);
|
|
89
|
-
var _super =
|
|
89
|
+
var _super = _createSuper(CheckboxProps);
|
|
90
90
|
function CheckboxProps(props) {
|
|
91
|
-
|
|
91
|
+
_classCallCheck(this, CheckboxProps);
|
|
92
92
|
var _this;
|
|
93
93
|
_this = _super.call(this, props);
|
|
94
|
-
|
|
94
|
+
_defineProperty(_assertThisInitialized(_this), "options", void 0);
|
|
95
95
|
var _props_options;
|
|
96
96
|
_this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
|
|
97
97
|
return _this;
|
package/dist/esm/props/custom.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _arrayLikeToArray(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
|
|
6
|
+
function _arrayWithHoles(arr) {
|
|
7
7
|
if (Array.isArray(arr)) return arr;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function _assertThisInitialized(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
|
|
15
|
+
function _classCallCheck(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
|
|
21
|
-
|
|
20
|
+
function _getPrototypeOf(o) {
|
|
21
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
22
22
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
23
23
|
};
|
|
24
|
-
return
|
|
24
|
+
return _getPrototypeOf(o);
|
|
25
25
|
}
|
|
26
26
|
function _inherits(subClass, superClass) {
|
|
27
27
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -34,9 +34,9 @@ function _inherits(subClass, superClass) {
|
|
|
34
34
|
configurable: true
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
if (superClass)
|
|
37
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function _iterableToArrayLimit(arr, i) {
|
|
40
40
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
41
41
|
if (_i == null) return;
|
|
42
42
|
var _arr = [];
|
|
@@ -60,38 +60,38 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
60
60
|
}
|
|
61
61
|
return _arr;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function _nonIterableRest() {
|
|
64
64
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
if (call && (
|
|
66
|
+
function _possibleConstructorReturn(self, call) {
|
|
67
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
68
68
|
return call;
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return _assertThisInitialized(self);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
|
|
72
|
+
function _setPrototypeOf(o, p) {
|
|
73
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
74
74
|
o.__proto__ = p;
|
|
75
75
|
return o;
|
|
76
76
|
};
|
|
77
|
-
return
|
|
77
|
+
return _setPrototypeOf(o, p);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
79
|
+
function _slicedToArray(arr, i) {
|
|
80
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
var _typeof = function(obj) {
|
|
83
83
|
"@swc/helpers - typeof";
|
|
84
84
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
85
|
-
}
|
|
86
|
-
function
|
|
85
|
+
};
|
|
86
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
87
87
|
if (!o) return;
|
|
88
|
-
if (typeof o === "string") return
|
|
88
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
89
89
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
90
90
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
91
91
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
92
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
92
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function _isNativeReflectConstruct() {
|
|
95
95
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
96
96
|
if (Reflect.construct.sham) return false;
|
|
97
97
|
if (typeof Proxy === "function") return true;
|
|
@@ -102,17 +102,17 @@ function _is_native_reflect_construct() {
|
|
|
102
102
|
return false;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
var hasNativeReflectConstruct =
|
|
105
|
+
function _createSuper(Derived) {
|
|
106
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
107
107
|
return function _createSuperInternal() {
|
|
108
|
-
var Super =
|
|
108
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
109
109
|
if (hasNativeReflectConstruct) {
|
|
110
|
-
var NewTarget =
|
|
110
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
111
111
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
112
112
|
} else {
|
|
113
113
|
result = Super.apply(this, arguments);
|
|
114
114
|
}
|
|
115
|
-
return
|
|
115
|
+
return _possibleConstructorReturn(this, result);
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
import { isPlainObject } from "@byteluck-fe/model-driven-shared";
|
|
@@ -120,14 +120,14 @@ import { BaseProps } from "./base";
|
|
|
120
120
|
export var CustomProps = /*#__PURE__*/ function(BaseProps) {
|
|
121
121
|
"use strict";
|
|
122
122
|
_inherits(CustomProps, BaseProps);
|
|
123
|
-
var _super =
|
|
123
|
+
var _super = _createSuper(CustomProps);
|
|
124
124
|
function CustomProps(props) {
|
|
125
|
-
|
|
125
|
+
_classCallCheck(this, CustomProps);
|
|
126
126
|
var _this;
|
|
127
127
|
_this = _super.call(this, props);
|
|
128
128
|
if (isPlainObject(props)) {
|
|
129
129
|
Object.entries(props).forEach(function(param) {
|
|
130
|
-
var _param =
|
|
130
|
+
var _param = _slicedToArray(param, 2), key = _param[0], value = _param[1];
|
|
131
131
|
_this[key] = value;
|
|
132
132
|
});
|
|
133
133
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assertThisInitialized(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
|
|
7
|
+
function _classCallCheck(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
|
|
12
|
+
function _defineProperty(obj, key, value) {
|
|
13
13
|
if (key in obj) {
|
|
14
14
|
Object.defineProperty(obj, key, {
|
|
15
15
|
value: value,
|
|
@@ -22,11 +22,11 @@ function _define_property(obj, key, value) {
|
|
|
22
22
|
}
|
|
23
23
|
return obj;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function _getPrototypeOf(o) {
|
|
26
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
27
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return _getPrototypeOf(o);
|
|
30
30
|
}
|
|
31
31
|
function _inherits(subClass, superClass) {
|
|
32
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -39,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
39
39
|
configurable: true
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
if (superClass)
|
|
42
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
if (call && (
|
|
44
|
+
function _possibleConstructorReturn(self, call) {
|
|
45
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
46
46
|
return call;
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return _assertThisInitialized(self);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
50
|
+
function _setPrototypeOf(o, p) {
|
|
51
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
52
52
|
o.__proto__ = p;
|
|
53
53
|
return o;
|
|
54
54
|
};
|
|
55
|
-
return
|
|
55
|
+
return _setPrototypeOf(o, p);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
var _typeof = function(obj) {
|
|
58
58
|
"@swc/helpers - typeof";
|
|
59
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
60
|
-
}
|
|
61
|
-
function
|
|
60
|
+
};
|
|
61
|
+
function _isNativeReflectConstruct() {
|
|
62
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
63
63
|
if (Reflect.construct.sham) return false;
|
|
64
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -69,31 +69,31 @@ function _is_native_reflect_construct() {
|
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _createSuper(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
74
74
|
return function _createSuperInternal() {
|
|
75
|
-
var Super =
|
|
75
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
76
76
|
if (hasNativeReflectConstruct) {
|
|
77
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
78
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
79
79
|
} else {
|
|
80
80
|
result = Super.apply(this, arguments);
|
|
81
81
|
}
|
|
82
|
-
return
|
|
82
|
+
return _possibleConstructorReturn(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
import { BaseProps } from "./base";
|
|
86
86
|
export var InputNumberProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(InputNumberProps, BaseProps);
|
|
89
|
-
var _super =
|
|
89
|
+
var _super = _createSuper(InputNumberProps);
|
|
90
90
|
function InputNumberProps(props) {
|
|
91
|
-
|
|
91
|
+
_classCallCheck(this, InputNumberProps);
|
|
92
92
|
var _this;
|
|
93
93
|
_this = _super.call(this, props);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
_defineProperty(_assertThisInitialized(_this), "max", void 0);
|
|
95
|
+
_defineProperty(_assertThisInitialized(_this), "min", void 0);
|
|
96
|
+
_defineProperty(_assertThisInitialized(_this), "placeholder", void 0);
|
|
97
97
|
var _props_max;
|
|
98
98
|
_this.max = (_props_max = props === null || props === void 0 ? void 0 : props.max) !== null && _props_max !== void 0 ? _props_max : "";
|
|
99
99
|
var _props_min;
|
package/dist/esm/props/input.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assertThisInitialized(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
|
|
7
|
+
function _classCallCheck(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
|
|
12
|
+
function _defineProperty(obj, key, value) {
|
|
13
13
|
if (key in obj) {
|
|
14
14
|
Object.defineProperty(obj, key, {
|
|
15
15
|
value: value,
|
|
@@ -22,11 +22,11 @@ function _define_property(obj, key, value) {
|
|
|
22
22
|
}
|
|
23
23
|
return obj;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function _getPrototypeOf(o) {
|
|
26
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
27
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return _getPrototypeOf(o);
|
|
30
30
|
}
|
|
31
31
|
function _inherits(subClass, superClass) {
|
|
32
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -39,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
39
39
|
configurable: true
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
if (superClass)
|
|
42
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
if (call && (
|
|
44
|
+
function _possibleConstructorReturn(self, call) {
|
|
45
|
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
46
46
|
return call;
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return _assertThisInitialized(self);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
50
|
+
function _setPrototypeOf(o, p) {
|
|
51
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
52
52
|
o.__proto__ = p;
|
|
53
53
|
return o;
|
|
54
54
|
};
|
|
55
|
-
return
|
|
55
|
+
return _setPrototypeOf(o, p);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
var _typeof = function(obj) {
|
|
58
58
|
"@swc/helpers - typeof";
|
|
59
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
60
|
-
}
|
|
61
|
-
function
|
|
60
|
+
};
|
|
61
|
+
function _isNativeReflectConstruct() {
|
|
62
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
63
63
|
if (Reflect.construct.sham) return false;
|
|
64
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -69,32 +69,32 @@ function _is_native_reflect_construct() {
|
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _createSuper(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
74
74
|
return function _createSuperInternal() {
|
|
75
|
-
var Super =
|
|
75
|
+
var Super = _getPrototypeOf(Derived), result;
|
|
76
76
|
if (hasNativeReflectConstruct) {
|
|
77
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _getPrototypeOf(this).constructor;
|
|
78
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
79
79
|
} else {
|
|
80
80
|
result = Super.apply(this, arguments);
|
|
81
81
|
}
|
|
82
|
-
return
|
|
82
|
+
return _possibleConstructorReturn(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
import { BaseProps } from "./base";
|
|
86
86
|
export var InputProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(InputProps, BaseProps);
|
|
89
|
-
var _super =
|
|
89
|
+
var _super = _createSuper(InputProps);
|
|
90
90
|
function InputProps(props) {
|
|
91
|
-
|
|
91
|
+
_classCallCheck(this, InputProps);
|
|
92
92
|
var _this;
|
|
93
93
|
_this = _super.call(this, props);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
_defineProperty(_assertThisInitialized(_this), "maxLength", void 0);
|
|
95
|
+
_defineProperty(_assertThisInitialized(_this), "minLength", void 0);
|
|
96
|
+
_defineProperty(_assertThisInitialized(_this), "placeholder", void 0);
|
|
97
|
+
_defineProperty(_assertThisInitialized(_this), "i18n", void 0);
|
|
98
98
|
var _props_maxLength;
|
|
99
99
|
_this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength : "";
|
|
100
100
|
var _props_minLength;
|