assui 2.0.19 → 2.0.23
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/es/button-modal/index.d.ts +2 -2
- package/es/keep-tab/index.js +1 -0
- package/es/number-input/index.d.ts +2 -0
- package/es/number-input/index.js +4 -3
- package/lib/button-modal/index.d.ts +2 -2
- package/lib/keep-tab/index.js +1 -0
- package/lib/number-input/index.d.ts +2 -0
- package/lib/number-input/index.js +4 -3
- package/package.json +3 -3
|
@@ -7,8 +7,8 @@ export interface refProps {
|
|
|
7
7
|
export interface ButtonModalProps extends ModalProps {
|
|
8
8
|
content: React.ReactElement;
|
|
9
9
|
children: React.ReactElement;
|
|
10
|
-
onClose
|
|
11
|
-
onOpen
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
onOpen?: () => void;
|
|
12
12
|
}
|
|
13
13
|
declare const ForwardRefButtonModal: React.ForwardRefExoticComponent<ButtonModalProps & React.RefAttributes<unknown>>;
|
|
14
14
|
export default ForwardRefButtonModal;
|
package/es/keep-tab/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import * as numberTypeEnum from './const/numberType';
|
|
2
3
|
export interface NumberInputProps {
|
|
3
4
|
/** 输入框的内容 */
|
|
4
5
|
value?: string | number;
|
|
@@ -37,5 +38,6 @@ declare const NumberInput: {
|
|
|
37
38
|
numberType: string;
|
|
38
39
|
enableMinus: boolean;
|
|
39
40
|
};
|
|
41
|
+
numberType: typeof numberTypeEnum;
|
|
40
42
|
};
|
|
41
43
|
export default NumberInput;
|
package/es/number-input/index.js
CHANGED
|
@@ -57,7 +57,7 @@ var __read = this && this.__read || function (o, n) {
|
|
|
57
57
|
import * as React from 'react';
|
|
58
58
|
import Input from 'antd/es/input';
|
|
59
59
|
import isUndefined from 'lodash/isUndefined';
|
|
60
|
-
import
|
|
60
|
+
import * as numberTypeEnum from './const/numberType';
|
|
61
61
|
import { filterInt, filterFloat } from './utils';
|
|
62
62
|
|
|
63
63
|
var NumberInput = function NumberInput(props) {
|
|
@@ -82,7 +82,7 @@ var NumberInput = function NumberInput(props) {
|
|
|
82
82
|
var newNumber;
|
|
83
83
|
var newValue = e.target.value;
|
|
84
84
|
|
|
85
|
-
if (numberType === INT) {
|
|
85
|
+
if (numberType === numberTypeEnum.INT) {
|
|
86
86
|
newNumber = filterInt({
|
|
87
87
|
value: newValue,
|
|
88
88
|
preValue: "" + resultValue,
|
|
@@ -139,7 +139,8 @@ var NumberInput = function NumberInput(props) {
|
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
NumberInput.defaultProps = {
|
|
142
|
-
numberType: INT,
|
|
142
|
+
numberType: numberTypeEnum.INT,
|
|
143
143
|
enableMinus: false
|
|
144
144
|
};
|
|
145
|
+
NumberInput.numberType = numberTypeEnum;
|
|
145
146
|
export default NumberInput;
|
|
@@ -7,8 +7,8 @@ export interface refProps {
|
|
|
7
7
|
export interface ButtonModalProps extends ModalProps {
|
|
8
8
|
content: React.ReactElement;
|
|
9
9
|
children: React.ReactElement;
|
|
10
|
-
onClose
|
|
11
|
-
onOpen
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
onOpen?: () => void;
|
|
12
12
|
}
|
|
13
13
|
declare const ForwardRefButtonModal: React.ForwardRefExoticComponent<ButtonModalProps & React.RefAttributes<unknown>>;
|
|
14
14
|
export default ForwardRefButtonModal;
|
package/lib/keep-tab/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import * as numberTypeEnum from './const/numberType';
|
|
2
3
|
export interface NumberInputProps {
|
|
3
4
|
/** 输入框的内容 */
|
|
4
5
|
value?: string | number;
|
|
@@ -37,5 +38,6 @@ declare const NumberInput: {
|
|
|
37
38
|
numberType: string;
|
|
38
39
|
enableMinus: boolean;
|
|
39
40
|
};
|
|
41
|
+
numberType: typeof numberTypeEnum;
|
|
40
42
|
};
|
|
41
43
|
export default NumberInput;
|
|
@@ -106,7 +106,7 @@ var input_1 = __importDefault(require("antd/es/input"));
|
|
|
106
106
|
|
|
107
107
|
var isUndefined_1 = __importDefault(require("lodash/isUndefined"));
|
|
108
108
|
|
|
109
|
-
var
|
|
109
|
+
var numberTypeEnum = __importStar(require("./const/numberType"));
|
|
110
110
|
|
|
111
111
|
var utils_1 = require("./utils");
|
|
112
112
|
|
|
@@ -132,7 +132,7 @@ var NumberInput = function NumberInput(props) {
|
|
|
132
132
|
var newNumber;
|
|
133
133
|
var newValue = e.target.value;
|
|
134
134
|
|
|
135
|
-
if (numberType ===
|
|
135
|
+
if (numberType === numberTypeEnum.INT) {
|
|
136
136
|
newNumber = utils_1.filterInt({
|
|
137
137
|
value: newValue,
|
|
138
138
|
preValue: "" + resultValue,
|
|
@@ -189,7 +189,8 @@ var NumberInput = function NumberInput(props) {
|
|
|
189
189
|
};
|
|
190
190
|
|
|
191
191
|
NumberInput.defaultProps = {
|
|
192
|
-
numberType:
|
|
192
|
+
numberType: numberTypeEnum.INT,
|
|
193
193
|
enableMinus: false
|
|
194
194
|
};
|
|
195
|
+
NumberInput.numberType = numberTypeEnum;
|
|
195
196
|
exports["default"] = NumberInput;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.23",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@ahooksjs/use-url-state": "^2.5.8",
|
|
34
34
|
"@tinymce/tinymce-react": "^3.13.0",
|
|
35
35
|
"@types/react-beautiful-dnd": "^13.1.2",
|
|
36
|
-
"a-icons": "^1.0.
|
|
36
|
+
"a-icons": "^1.0.14",
|
|
37
37
|
"ahooks": "^2.10.9",
|
|
38
38
|
"bignumber.js": "^9.0.1",
|
|
39
39
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"node": ">=10.0.0"
|
|
70
70
|
},
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "cb84b4eeb983cae3affa115ffaf13b1e5e6731e9"
|
|
73
73
|
}
|