assui 3.1.71 → 3.1.73
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/complex-val-select/index.d.ts +2 -0
- package/es/complex-val-select/index.js +16 -11
- package/es/highlight-textarea/HighlighedContents.d.ts +1 -1
- package/es/highlight-textarea/HighlighedContents.js +2 -1
- package/es/highlight-textarea/index.d.ts +1 -1
- package/es/highlight-textarea/index.js +7 -9
- package/es/img-crop/index.d.ts +6 -18
- package/es/img-crop/index.js +29 -31
- package/es/keep-tab/index.d.ts +1 -4
- package/es/keep-tab/index.js +10 -12
- package/es/number-input/index.js +2 -4
- package/es/rc-echart/core.d.ts +1 -10
- package/es/rc-echart/core.js +10 -13
- package/es/rc-qrcode/index.d.ts +1 -5
- package/es/rc-qrcode/index.js +4 -6
- package/es/single-img-upload/index.d.ts +1 -6
- package/es/single-img-upload/index.js +16 -18
- package/es/step-number-input/index.d.ts +3 -11
- package/es/step-number-input/index.js +11 -11
- package/lib/complex-val-select/index.d.ts +2 -0
- package/lib/complex-val-select/index.js +18 -12
- package/lib/highlight-textarea/HighlighedContents.d.ts +1 -1
- package/lib/highlight-textarea/HighlighedContents.js +2 -1
- package/lib/highlight-textarea/index.d.ts +1 -1
- package/lib/highlight-textarea/index.js +7 -9
- package/lib/img-crop/index.d.ts +6 -18
- package/lib/img-crop/index.js +29 -31
- package/lib/keep-tab/index.d.ts +1 -4
- package/lib/keep-tab/index.js +10 -12
- package/lib/number-input/index.js +2 -4
- package/lib/rc-echart/core.d.ts +1 -10
- package/lib/rc-echart/core.js +10 -13
- package/lib/rc-qrcode/index.d.ts +1 -5
- package/lib/rc-qrcode/index.js +4 -6
- package/lib/single-img-upload/index.d.ts +1 -6
- package/lib/single-img-upload/index.js +16 -18
- package/lib/step-number-input/index.d.ts +3 -11
- package/lib/step-number-input/index.js +11 -11
- package/package.json +2 -2
|
@@ -8,6 +8,8 @@ export interface ComplexValSelectOptionType extends Omit<BaseOptionType, 'value'
|
|
|
8
8
|
children?: ComplexValSelectOptionType[];
|
|
9
9
|
options?: Omit<ComplexValSelectOptionType, 'children' | 'options'>[];
|
|
10
10
|
}
|
|
11
|
+
/** 判断optionsValue是否是引用类型 */
|
|
12
|
+
export declare const isReferenceTypeOption: (options?: ComplexValSelectOptionType[] | undefined) => boolean;
|
|
11
13
|
export interface ComplexValSelectProps<T> extends Omit<SelectProps, 'value' | 'onChange' | 'options'> {
|
|
12
14
|
value?: T;
|
|
13
15
|
onChange?: (val: T, opt?: ComplexValSelectOptionType[]) => void;
|
|
@@ -59,6 +59,21 @@ var formatOptions = function formatOptions(dateSource) {
|
|
|
59
59
|
}
|
|
60
60
|
return dateSource;
|
|
61
61
|
};
|
|
62
|
+
/** 判断optionsValue是否是引用类型 */
|
|
63
|
+
export var isReferenceTypeOption = function isReferenceTypeOption(options) {
|
|
64
|
+
var resultBoolean = some(options, function (item) {
|
|
65
|
+
if (item.value) {
|
|
66
|
+
return isArray(item.value) || isObject(item.value);
|
|
67
|
+
}
|
|
68
|
+
if (item.options) {
|
|
69
|
+
return some(item.options, function (i) {
|
|
70
|
+
return isArray(i.value) || isObject(i.value);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
});
|
|
75
|
+
return resultBoolean;
|
|
76
|
+
};
|
|
62
77
|
var ComplexValSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
63
78
|
var _a = __read(useControllableValue(props), 2),
|
|
64
79
|
value = _a[0],
|
|
@@ -71,17 +86,7 @@ var ComplexValSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
71
86
|
return selectRef.current;
|
|
72
87
|
});
|
|
73
88
|
// 判断是否需要将optionValue转为JSON字符串
|
|
74
|
-
var isReferenceTypeVal =
|
|
75
|
-
if (item.value) {
|
|
76
|
-
return isArray(item.value) || isObject(item.value);
|
|
77
|
-
}
|
|
78
|
-
if (item.options) {
|
|
79
|
-
return some(item.options, function (i) {
|
|
80
|
-
return isArray(i.value) || isObject(i.value);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
return false;
|
|
84
|
-
});
|
|
89
|
+
var isReferenceTypeVal = isReferenceTypeOption(options);
|
|
85
90
|
var finalOptions = isReferenceTypeVal ? formatOptions(options) : options;
|
|
86
91
|
var handleChange = function handleChange(val) {
|
|
87
92
|
var nextVal = val && isReferenceTypeVal ? JSON.parse(val) : val;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HighlightType } from './types';
|
|
2
2
|
export interface HighlighedContentsProps {
|
|
3
3
|
value: string;
|
|
4
|
-
highlight
|
|
4
|
+
highlight?: HighlightType;
|
|
5
5
|
}
|
|
6
6
|
declare const HighlighedContents: ({ value, highlight }: HighlighedContentsProps) => JSX.Element;
|
|
7
7
|
export default HighlighedContents;
|
|
@@ -3,7 +3,8 @@ import getRanges from './getRanges';
|
|
|
3
3
|
import extractSpansOfClasses from './extractSpansOfClasses';
|
|
4
4
|
var HighlighedContents = function HighlighedContents(_a) {
|
|
5
5
|
var value = _a.value,
|
|
6
|
-
|
|
6
|
+
_b = _a.highlight,
|
|
7
|
+
highlight = _b === void 0 ? '' : _b;
|
|
7
8
|
var ranges = getRanges(value, highlight);
|
|
8
9
|
var parts = extractSpansOfClasses(value, ranges);
|
|
9
10
|
return /*#__PURE__*/React.createElement(React.Fragment, null, parts.map(function (part) {
|
|
@@ -6,7 +6,7 @@ export interface HighlightTextareaProps extends HighlighedContentsProps, Omit<Re
|
|
|
6
6
|
className?: string;
|
|
7
7
|
textAreaClassName?: string;
|
|
8
8
|
onChange?: (value: string, e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
|
-
highlight
|
|
9
|
+
highlight?: HighlightType;
|
|
10
10
|
}
|
|
11
11
|
declare const HighlightWithinTextarea: React.ForwardRefExoticComponent<HighlightTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
12
12
|
export default HighlightWithinTextarea;
|
|
@@ -50,16 +50,18 @@ import trimStart from 'lodash/trimStart';
|
|
|
50
50
|
import useMount from "ahooks/es/useMount";
|
|
51
51
|
import HighlighedContents from './HighlighedContents';
|
|
52
52
|
var HighlightWithinTextarea = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
53
|
-
var
|
|
53
|
+
var _a = props.prefixCls,
|
|
54
|
+
prefixCls = _a === void 0 ? 'ant' : _a,
|
|
54
55
|
value = props.value,
|
|
55
56
|
onChange = props.onChange,
|
|
56
|
-
|
|
57
|
+
_b = props.highlight,
|
|
58
|
+
highlight = _b === void 0 ? '' : _b,
|
|
57
59
|
className = props.className,
|
|
58
60
|
textAreaClassName = props.textAreaClassName,
|
|
59
61
|
textareaProps = __rest(props, ["prefixCls", "value", "onChange", "highlight", "className", "textAreaClassName"]);
|
|
60
|
-
var
|
|
61
|
-
textAreaValue =
|
|
62
|
-
setTextAreaValue =
|
|
62
|
+
var _c = __read(React.useState(''), 2),
|
|
63
|
+
textAreaValue = _c[0],
|
|
64
|
+
setTextAreaValue = _c[1];
|
|
63
65
|
var resultValue = value || textAreaValue;
|
|
64
66
|
var containerRef = React.useRef();
|
|
65
67
|
var backdropRef = React.useRef();
|
|
@@ -106,8 +108,4 @@ var HighlightWithinTextarea = /*#__PURE__*/React.forwardRef(function (props, ref
|
|
|
106
108
|
ref: ref
|
|
107
109
|
})));
|
|
108
110
|
});
|
|
109
|
-
HighlightWithinTextarea.defaultProps = {
|
|
110
|
-
highlight: '',
|
|
111
|
-
prefixCls: 'ant'
|
|
112
|
-
};
|
|
113
111
|
export default HighlightWithinTextarea;
|
package/es/img-crop/index.d.ts
CHANGED
|
@@ -6,16 +6,16 @@ export interface RcFile extends File {
|
|
|
6
6
|
uid: string;
|
|
7
7
|
}
|
|
8
8
|
export interface ImgCropProps {
|
|
9
|
-
prefix
|
|
10
|
-
aspect
|
|
11
|
-
shape
|
|
9
|
+
prefix?: string;
|
|
10
|
+
aspect?: number;
|
|
11
|
+
shape?: 'rect' | 'round';
|
|
12
12
|
grid?: boolean;
|
|
13
13
|
quality?: number;
|
|
14
14
|
zoom?: boolean;
|
|
15
15
|
rotate?: boolean;
|
|
16
|
-
minZoom
|
|
17
|
-
maxZoom
|
|
18
|
-
fillColor
|
|
16
|
+
minZoom?: number;
|
|
17
|
+
maxZoom?: number;
|
|
18
|
+
fillColor?: string;
|
|
19
19
|
modalTitle: string;
|
|
20
20
|
modalWidth?: string | number;
|
|
21
21
|
modalCancel?: string;
|
|
@@ -36,18 +36,6 @@ export declare type Area = {
|
|
|
36
36
|
};
|
|
37
37
|
declare const ImgCrop: {
|
|
38
38
|
(props: ImgCropProps): JSX.Element;
|
|
39
|
-
defaultProps: {
|
|
40
|
-
prefix: string;
|
|
41
|
-
aspect: number;
|
|
42
|
-
shape: string;
|
|
43
|
-
grid: boolean;
|
|
44
|
-
quality: number;
|
|
45
|
-
zoom: boolean;
|
|
46
|
-
rotate: boolean;
|
|
47
|
-
minZoom: number;
|
|
48
|
-
maxZoom: number;
|
|
49
|
-
fillColor: string;
|
|
50
|
-
};
|
|
51
39
|
getCroppedImg: typeof getCroppedImg;
|
|
52
40
|
};
|
|
53
41
|
export default ImgCrop;
|
package/es/img-crop/index.js
CHANGED
|
@@ -173,16 +173,26 @@ var MIN_ROTATE = 0;
|
|
|
173
173
|
var MAX_ROTATE = 360;
|
|
174
174
|
var ROTATE_STEP = 1;
|
|
175
175
|
var ImgCrop = function ImgCrop(props) {
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
176
|
+
var _a = props.aspect,
|
|
177
|
+
aspect = _a === void 0 ? 1 : _a,
|
|
178
|
+
_b = props.shape,
|
|
179
|
+
shape = _b === void 0 ? 'rect' : _b,
|
|
180
|
+
_c = props.grid,
|
|
181
|
+
grid = _c === void 0 ? false : _c,
|
|
182
|
+
_d = props.quality,
|
|
183
|
+
quality = _d === void 0 ? 0.4 : _d,
|
|
184
|
+
_e = props.zoom,
|
|
185
|
+
zoom = _e === void 0 ? true : _e,
|
|
186
|
+
_f = props.rotate,
|
|
187
|
+
rotate = _f === void 0 ? false : _f,
|
|
188
|
+
_g = props.minZoom,
|
|
189
|
+
minZoom = _g === void 0 ? 1 : _g,
|
|
190
|
+
_h = props.maxZoom,
|
|
191
|
+
maxZoom = _h === void 0 ? 3 : _h,
|
|
192
|
+
_j = props.fillColor,
|
|
193
|
+
fillColor = _j === void 0 ? 'rgba(0,0,0,0)' : _j,
|
|
194
|
+
_k = props.prefix,
|
|
195
|
+
prefix = _k === void 0 ? 'ant' : _k,
|
|
186
196
|
modalTitle = props.modalTitle,
|
|
187
197
|
modalWidth = props.modalWidth,
|
|
188
198
|
modalOk = props.modalOk,
|
|
@@ -195,15 +205,15 @@ var ImgCrop = function ImgCrop(props) {
|
|
|
195
205
|
var MEDIA_CLASS = "".concat(pkg, "-media");
|
|
196
206
|
var hasZoom = zoom === true;
|
|
197
207
|
var hasRotate = rotate === true;
|
|
198
|
-
var
|
|
199
|
-
src =
|
|
200
|
-
setSrc =
|
|
201
|
-
var
|
|
202
|
-
zoomVal =
|
|
203
|
-
setZoomVal =
|
|
204
|
-
var
|
|
205
|
-
rotateVal =
|
|
206
|
-
setRotateVal =
|
|
208
|
+
var _l = __read(React.useState(''), 2),
|
|
209
|
+
src = _l[0],
|
|
210
|
+
setSrc = _l[1];
|
|
211
|
+
var _m = __read(React.useState(1), 2),
|
|
212
|
+
zoomVal = _m[0],
|
|
213
|
+
setZoomVal = _m[1];
|
|
214
|
+
var _o = __read(React.useState(0), 2),
|
|
215
|
+
rotateVal = _o[0],
|
|
216
|
+
setRotateVal = _o[1];
|
|
207
217
|
var beforeUploadRef = React.useRef();
|
|
208
218
|
var fileRef = React.useRef();
|
|
209
219
|
var resolveRef = React.useRef(noop);
|
|
@@ -426,17 +436,5 @@ var ImgCrop = function ImgCrop(props) {
|
|
|
426
436
|
};
|
|
427
437
|
return renderComponent(modalTitle);
|
|
428
438
|
};
|
|
429
|
-
ImgCrop.defaultProps = {
|
|
430
|
-
prefix: 'ant',
|
|
431
|
-
aspect: 1,
|
|
432
|
-
shape: 'rect',
|
|
433
|
-
grid: false,
|
|
434
|
-
quality: 0.4,
|
|
435
|
-
zoom: true,
|
|
436
|
-
rotate: false,
|
|
437
|
-
minZoom: 1,
|
|
438
|
-
maxZoom: 3,
|
|
439
|
-
fillColor: 'rgba(0,0,0,0)'
|
|
440
|
-
};
|
|
441
439
|
ImgCrop.getCroppedImg = getCroppedImg;
|
|
442
440
|
export default ImgCrop;
|
package/es/keep-tab/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface KeepTabProps extends Omit<TabsProps, 'items'> {
|
|
|
9
9
|
/** 初始化选中面板的 key,如果没有设置 activeKey */
|
|
10
10
|
defaultActiveKey?: string;
|
|
11
11
|
/** 保存激活 tab 面板的的key名 */
|
|
12
|
-
saveActiveKeyName
|
|
12
|
+
saveActiveKeyName?: string;
|
|
13
13
|
/** 当前激活 tab 面板的 key */
|
|
14
14
|
activeKey?: string;
|
|
15
15
|
/** 切换面板的回调 */
|
|
@@ -23,9 +23,6 @@ export interface SelfTabPaneProps extends TabPaneProps {
|
|
|
23
23
|
}
|
|
24
24
|
declare const KeepTab: {
|
|
25
25
|
(props: KeepTabProps): JSX.Element;
|
|
26
|
-
defaultProps: {
|
|
27
|
-
saveActiveKeyName: string;
|
|
28
|
-
};
|
|
29
26
|
displayName: string;
|
|
30
27
|
TabPane: React.FC<TabPaneProps>;
|
|
31
28
|
};
|
package/es/keep-tab/index.js
CHANGED
|
@@ -58,21 +58,22 @@ var KeepTab = function KeepTab(props) {
|
|
|
58
58
|
var _b = props.items,
|
|
59
59
|
items = _b === void 0 ? [] : _b,
|
|
60
60
|
defaultActiveKey = props.defaultActiveKey,
|
|
61
|
-
|
|
61
|
+
_c = props.saveActiveKeyName,
|
|
62
|
+
saveActiveKeyName = _c === void 0 ? 'active' : _c,
|
|
62
63
|
onChange = props.onChange,
|
|
63
|
-
|
|
64
|
-
badgeProps =
|
|
64
|
+
_d = props.badgeProps,
|
|
65
|
+
badgeProps = _d === void 0 ? defaultBadgeProps : _d,
|
|
65
66
|
restProps = __rest(props, ["items", "defaultActiveKey", "saveActiveKeyName", "onChange", "badgeProps"]);
|
|
66
67
|
var defaultUrlParams = qsHelp.getQueryObject();
|
|
67
|
-
var
|
|
68
|
-
urlParams =
|
|
69
|
-
setUrlParams =
|
|
70
|
-
var
|
|
68
|
+
var _e = __read(useUrlState((_a = {}, _a[saveActiveKeyName] = defaultUrlParams[saveActiveKeyName] || defaultActiveKey, _a)), 2),
|
|
69
|
+
urlParams = _e[0],
|
|
70
|
+
setUrlParams = _e[1];
|
|
71
|
+
var _f = __read(useControllableValue(props, {
|
|
71
72
|
valuePropName: 'activeKey',
|
|
72
73
|
defaultValue: defaultUrlParams[saveActiveKeyName] || defaultActiveKey
|
|
73
74
|
}), 2),
|
|
74
|
-
tabActiveKey =
|
|
75
|
-
setTabActiveKey =
|
|
75
|
+
tabActiveKey = _f[0],
|
|
76
|
+
setTabActiveKey = _f[1];
|
|
76
77
|
React.useEffect(function () {
|
|
77
78
|
var _a;
|
|
78
79
|
if (!('activeKey' in props) && items) {
|
|
@@ -112,9 +113,6 @@ var KeepTab = function KeepTab(props) {
|
|
|
112
113
|
items: resultItems
|
|
113
114
|
}));
|
|
114
115
|
};
|
|
115
|
-
KeepTab.defaultProps = {
|
|
116
|
-
saveActiveKeyName: 'active'
|
|
117
|
-
};
|
|
118
116
|
KeepTab.displayName = 'KeepTab';
|
|
119
117
|
KeepTab.TabPane = TabPane;
|
|
120
118
|
export default KeepTab;
|
package/es/number-input/index.js
CHANGED
|
@@ -65,7 +65,8 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
65
65
|
precision = props.precision,
|
|
66
66
|
formatter = props.formatter,
|
|
67
67
|
parser = props.parser,
|
|
68
|
-
|
|
68
|
+
_d = props.enableMinus,
|
|
69
|
+
enableMinus = _d === void 0 ? false : _d,
|
|
69
70
|
onBlur = props.onBlur,
|
|
70
71
|
maxLength = props.maxLength,
|
|
71
72
|
restProps = __rest(props, ["onChange", "numberType", "dataType", "precision", "formatter", "parser", "enableMinus", "onBlur", "maxLength"]);
|
|
@@ -117,8 +118,5 @@ var NumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
117
118
|
maxLength: maxLength
|
|
118
119
|
}, omit(restProps, ['value'])));
|
|
119
120
|
});
|
|
120
|
-
NumberInput.defaultProps = {
|
|
121
|
-
enableMinus: false
|
|
122
|
-
};
|
|
123
121
|
export { numberTypeEnum, dataTypeEnum };
|
|
124
122
|
export default NumberInput;
|
package/es/rc-echart/core.d.ts
CHANGED
|
@@ -16,14 +16,5 @@ export interface RcEchartPropsType {
|
|
|
16
16
|
onEvents?: Record<string, Function>;
|
|
17
17
|
opts?: Opts;
|
|
18
18
|
}
|
|
19
|
-
declare const ReactEchartCore:
|
|
20
|
-
(props: RcEchartPropsType): JSX.Element;
|
|
21
|
-
defaultProps: {
|
|
22
|
-
notMerge: boolean;
|
|
23
|
-
lazyUpdate: boolean;
|
|
24
|
-
className: string;
|
|
25
|
-
onEvents: {};
|
|
26
|
-
opts: {};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
19
|
+
declare const ReactEchartCore: (props: RcEchartPropsType) => JSX.Element;
|
|
29
20
|
export default ReactEchartCore;
|
package/es/rc-echart/core.js
CHANGED
|
@@ -6,13 +6,18 @@ import useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
8
8
|
var ReactEchartCore = function ReactEchartCore(props) {
|
|
9
|
-
var
|
|
9
|
+
var _a = props.className,
|
|
10
|
+
className = _a === void 0 ? '' : _a,
|
|
10
11
|
option = props.option,
|
|
11
12
|
echarts = props.echarts,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
_b = props.notMerge,
|
|
14
|
+
notMerge = _b === void 0 ? false : _b,
|
|
15
|
+
_c = props.lazyUpdate,
|
|
16
|
+
lazyUpdate = _c === void 0 ? false : _c,
|
|
17
|
+
_d = props.onEvents,
|
|
18
|
+
onEvents = _d === void 0 ? {} : _d,
|
|
19
|
+
_e = props.opts,
|
|
20
|
+
opts = _e === void 0 ? {} : _e,
|
|
16
21
|
theme = props.theme;
|
|
17
22
|
var chartDomRef = useRef();
|
|
18
23
|
var chartRef = useRef();
|
|
@@ -93,12 +98,4 @@ var ReactEchartCore = function ReactEchartCore(props) {
|
|
|
93
98
|
className: classNames('react-echart', className)
|
|
94
99
|
});
|
|
95
100
|
};
|
|
96
|
-
ReactEchartCore.defaultProps = {
|
|
97
|
-
notMerge: false,
|
|
98
|
-
lazyUpdate: false,
|
|
99
|
-
// style: {},
|
|
100
|
-
className: '',
|
|
101
|
-
onEvents: {},
|
|
102
|
-
opts: {}
|
|
103
|
-
};
|
|
104
101
|
export default ReactEchartCore;
|
package/es/rc-qrcode/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import QRCode from 'qrcode';
|
|
|
3
3
|
import useQrcode from './useQrcode';
|
|
4
4
|
export interface RcQrcodeProps {
|
|
5
5
|
/** 生成二维码的值 */
|
|
6
|
-
value
|
|
6
|
+
value?: QRCodeSegment[] | string;
|
|
7
7
|
/** qrcode的QRCodeRenderersOptions */
|
|
8
8
|
options?: QRCodeRenderersOptions;
|
|
9
9
|
/** 获取HTMLCanvasElement */
|
|
@@ -11,10 +11,6 @@ export interface RcQrcodeProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const RcQrcode: {
|
|
13
13
|
(props: RcQrcodeProps): JSX.Element;
|
|
14
|
-
defaultProps: {
|
|
15
|
-
value: string;
|
|
16
|
-
options: {};
|
|
17
|
-
};
|
|
18
14
|
useQrcode: (value: string | QRCodeSegment[], options?: QRCode.QRCodeToDataURLOptions) => string;
|
|
19
15
|
};
|
|
20
16
|
export default RcQrcode;
|
package/es/rc-qrcode/index.js
CHANGED
|
@@ -15,8 +15,10 @@ import QRCode from 'qrcode';
|
|
|
15
15
|
import useMount from "ahooks/es/useMount";
|
|
16
16
|
import useQrcode from './useQrcode';
|
|
17
17
|
var RcQrcode = function RcQrcode(props) {
|
|
18
|
-
var
|
|
19
|
-
|
|
18
|
+
var _a = props.value,
|
|
19
|
+
value = _a === void 0 ? '' : _a,
|
|
20
|
+
_b = props.options,
|
|
21
|
+
options = _b === void 0 ? {} : _b,
|
|
20
22
|
getCanvasInstance = props.getCanvasInstance;
|
|
21
23
|
var domElRef = React.useRef(null);
|
|
22
24
|
var defaultOptions = {
|
|
@@ -39,10 +41,6 @@ var RcQrcode = function RcQrcode(props) {
|
|
|
39
41
|
ref: domElRef
|
|
40
42
|
});
|
|
41
43
|
};
|
|
42
|
-
RcQrcode.defaultProps = {
|
|
43
|
-
value: '',
|
|
44
|
-
options: {}
|
|
45
|
-
};
|
|
46
44
|
RcQrcode.useQrcode = useQrcode;
|
|
47
45
|
export default RcQrcode;
|
|
48
46
|
export { useQrcode };
|
|
@@ -13,10 +13,5 @@ export interface SingleImgUploadProps extends UploadProps {
|
|
|
13
13
|
/** 格式化接口返回数据 */
|
|
14
14
|
onFormatResData?: (res: any) => string;
|
|
15
15
|
}
|
|
16
|
-
declare const SingleImgUpload:
|
|
17
|
-
(props: SingleImgUploadProps): JSX.Element;
|
|
18
|
-
defaultProps: {
|
|
19
|
-
beforeUpload(): boolean;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
16
|
+
declare const SingleImgUpload: (props: SingleImgUploadProps) => JSX.Element;
|
|
22
17
|
export default SingleImgUpload;
|
|
@@ -195,24 +195,27 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
195
195
|
onFormatResData = props.onFormatResData,
|
|
196
196
|
onSuccess = props.onSuccess,
|
|
197
197
|
onCancel = props.onCancel,
|
|
198
|
-
|
|
198
|
+
_a = props.beforeUpload,
|
|
199
|
+
beforeUpload = _a === void 0 ? function () {
|
|
200
|
+
return true;
|
|
201
|
+
} : _a,
|
|
199
202
|
onError = props.onError,
|
|
200
203
|
disabled = props.disabled,
|
|
201
204
|
restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "onCancel", "beforeUpload", "onError", "disabled"]);
|
|
202
205
|
var uploadInstanceRef = React.useRef();
|
|
203
206
|
var fileRef = React.useRef();
|
|
204
|
-
var
|
|
205
|
-
uploadStatus =
|
|
206
|
-
setUploadStatus =
|
|
207
|
-
var
|
|
208
|
-
fileUrl =
|
|
209
|
-
setFileUrl =
|
|
210
|
-
var
|
|
211
|
-
uploadPercent =
|
|
212
|
-
setUploadPercent =
|
|
213
|
-
var
|
|
214
|
-
imageLoading =
|
|
215
|
-
setImageLoading =
|
|
207
|
+
var _b = __read(React.useState(value ? 'done' : 'init'), 2),
|
|
208
|
+
uploadStatus = _b[0],
|
|
209
|
+
setUploadStatus = _b[1];
|
|
210
|
+
var _c = __read(React.useState(value), 2),
|
|
211
|
+
fileUrl = _c[0],
|
|
212
|
+
setFileUrl = _c[1];
|
|
213
|
+
var _d = __read(React.useState(0), 2),
|
|
214
|
+
uploadPercent = _d[0],
|
|
215
|
+
setUploadPercent = _d[1];
|
|
216
|
+
var _e = __read(React.useState(false), 2),
|
|
217
|
+
imageLoading = _e[0],
|
|
218
|
+
setImageLoading = _e[1];
|
|
216
219
|
React.useEffect(function () {
|
|
217
220
|
setFileUrl(value);
|
|
218
221
|
if (value) {
|
|
@@ -343,9 +346,4 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
343
346
|
})
|
|
344
347
|
}, children)));
|
|
345
348
|
};
|
|
346
|
-
SingleImgUpload.defaultProps = {
|
|
347
|
-
beforeUpload: function beforeUpload() {
|
|
348
|
-
return true;
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
349
|
export default SingleImgUpload;
|
|
@@ -5,7 +5,7 @@ export interface StepNumberInputProps {
|
|
|
5
5
|
/** 输入数据的类型 */
|
|
6
6
|
numberType?: 'int' | 'float';
|
|
7
7
|
/** 精度,只对float有效 */
|
|
8
|
-
precision
|
|
8
|
+
precision?: number;
|
|
9
9
|
/** 内容最大长度 */
|
|
10
10
|
maxLength?: number;
|
|
11
11
|
/** 指定输入框展示值的格式 */
|
|
@@ -15,7 +15,7 @@ export interface StepNumberInputProps {
|
|
|
15
15
|
/** 是否允许输入负数 */
|
|
16
16
|
enableMinus?: boolean;
|
|
17
17
|
/** 步进, 每次点击+/- 多少 */
|
|
18
|
-
step
|
|
18
|
+
step?: string | number;
|
|
19
19
|
/** 变化回调 */
|
|
20
20
|
onChange?: (value: string) => void;
|
|
21
21
|
/** 失去焦点回调 */
|
|
@@ -32,13 +32,5 @@ export interface StepNumberInputProps {
|
|
|
32
32
|
allowClear?: boolean;
|
|
33
33
|
disabled?: boolean;
|
|
34
34
|
}
|
|
35
|
-
declare const StepNumberInput:
|
|
36
|
-
(props: StepNumberInputProps): JSX.Element;
|
|
37
|
-
defaultProps: {
|
|
38
|
-
numberType: string;
|
|
39
|
-
precision: number;
|
|
40
|
-
enableMinus: boolean;
|
|
41
|
-
step: number;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
35
|
+
declare const StepNumberInput: (props: StepNumberInputProps) => JSX.Element;
|
|
44
36
|
export default StepNumberInput;
|
|
@@ -61,13 +61,18 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
61
61
|
setValue = _a[1];
|
|
62
62
|
var onChange = props.onChange,
|
|
63
63
|
onBlur = props.onBlur,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
_b = props.numberType,
|
|
65
|
+
numberType = _b === void 0 ? INT : _b,
|
|
66
|
+
_c = props.precision,
|
|
67
|
+
precision = _c === void 0 ? 2 : _c,
|
|
68
|
+
_d = props.step,
|
|
69
|
+
step = _d === void 0 ? 1 : _d,
|
|
67
70
|
max = props.max,
|
|
68
71
|
min = props.min,
|
|
69
72
|
customDisabled = props.disabled,
|
|
70
|
-
|
|
73
|
+
_e = props.enableMinus,
|
|
74
|
+
enableMinus = _e === void 0 ? false : _e,
|
|
75
|
+
restProps = __rest(props, ["onChange", "onBlur", "numberType", "precision", "step", "max", "min", "disabled", "enableMinus"]);
|
|
71
76
|
var isEmpty = isUndefined(value) || value === '';
|
|
72
77
|
var plusNumber = new BigNumber(value).plus(step).toString();
|
|
73
78
|
var minusNumber = new BigNumber(value).minus(step).toString();
|
|
@@ -129,13 +134,8 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
129
134
|
onBlur: onNumberBlur,
|
|
130
135
|
numberType: numberType,
|
|
131
136
|
precision: precision,
|
|
132
|
-
disabled: mergedDisabled
|
|
137
|
+
disabled: mergedDisabled,
|
|
138
|
+
enableMinus: enableMinus
|
|
133
139
|
}, restProps)));
|
|
134
140
|
};
|
|
135
|
-
StepNumberInput.defaultProps = {
|
|
136
|
-
numberType: INT,
|
|
137
|
-
precision: 2,
|
|
138
|
-
enableMinus: false,
|
|
139
|
-
step: 1
|
|
140
|
-
};
|
|
141
141
|
export default StepNumberInput;
|
|
@@ -8,6 +8,8 @@ export interface ComplexValSelectOptionType extends Omit<BaseOptionType, 'value'
|
|
|
8
8
|
children?: ComplexValSelectOptionType[];
|
|
9
9
|
options?: Omit<ComplexValSelectOptionType, 'children' | 'options'>[];
|
|
10
10
|
}
|
|
11
|
+
/** 判断optionsValue是否是引用类型 */
|
|
12
|
+
export declare const isReferenceTypeOption: (options?: ComplexValSelectOptionType[] | undefined) => boolean;
|
|
11
13
|
export interface ComplexValSelectProps<T> extends Omit<SelectProps, 'value' | 'onChange' | 'options'> {
|
|
12
14
|
value?: T;
|
|
13
15
|
onChange?: (val: T, opt?: ComplexValSelectOptionType[]) => void;
|
|
@@ -77,7 +77,7 @@ var __importDefault = this && this.__importDefault || function (mod) {
|
|
|
77
77
|
Object.defineProperty(exports, "__esModule", {
|
|
78
78
|
value: true
|
|
79
79
|
});
|
|
80
|
-
exports.Option = void 0;
|
|
80
|
+
exports.isReferenceTypeOption = exports.Option = void 0;
|
|
81
81
|
var React = __importStar(require("react"));
|
|
82
82
|
var omit_1 = __importDefault(require("lodash/omit"));
|
|
83
83
|
var find_1 = __importDefault(require("lodash/find"));
|
|
@@ -103,6 +103,22 @@ var formatOptions = function formatOptions(dateSource) {
|
|
|
103
103
|
}
|
|
104
104
|
return dateSource;
|
|
105
105
|
};
|
|
106
|
+
/** 判断optionsValue是否是引用类型 */
|
|
107
|
+
var isReferenceTypeOption = function isReferenceTypeOption(options) {
|
|
108
|
+
var resultBoolean = (0, some_1["default"])(options, function (item) {
|
|
109
|
+
if (item.value) {
|
|
110
|
+
return (0, isArray_1["default"])(item.value) || (0, isObject_1["default"])(item.value);
|
|
111
|
+
}
|
|
112
|
+
if (item.options) {
|
|
113
|
+
return (0, some_1["default"])(item.options, function (i) {
|
|
114
|
+
return (0, isArray_1["default"])(i.value) || (0, isObject_1["default"])(i.value);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
});
|
|
119
|
+
return resultBoolean;
|
|
120
|
+
};
|
|
121
|
+
exports.isReferenceTypeOption = isReferenceTypeOption;
|
|
106
122
|
var ComplexValSelect = React.forwardRef(function (props, ref) {
|
|
107
123
|
var _a = __read((0, useControllableValue_1["default"])(props), 2),
|
|
108
124
|
value = _a[0],
|
|
@@ -115,17 +131,7 @@ var ComplexValSelect = React.forwardRef(function (props, ref) {
|
|
|
115
131
|
return selectRef.current;
|
|
116
132
|
});
|
|
117
133
|
// 判断是否需要将optionValue转为JSON字符串
|
|
118
|
-
var isReferenceTypeVal = (0,
|
|
119
|
-
if (item.value) {
|
|
120
|
-
return (0, isArray_1["default"])(item.value) || (0, isObject_1["default"])(item.value);
|
|
121
|
-
}
|
|
122
|
-
if (item.options) {
|
|
123
|
-
return (0, some_1["default"])(item.options, function (i) {
|
|
124
|
-
return (0, isArray_1["default"])(i.value) || (0, isObject_1["default"])(i.value);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
return false;
|
|
128
|
-
});
|
|
134
|
+
var isReferenceTypeVal = (0, exports.isReferenceTypeOption)(options);
|
|
129
135
|
var finalOptions = isReferenceTypeVal ? formatOptions(options) : options;
|
|
130
136
|
var handleChange = function handleChange(val) {
|
|
131
137
|
var nextVal = val && isReferenceTypeVal ? JSON.parse(val) : val;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HighlightType } from './types';
|
|
2
2
|
export interface HighlighedContentsProps {
|
|
3
3
|
value: string;
|
|
4
|
-
highlight
|
|
4
|
+
highlight?: HighlightType;
|
|
5
5
|
}
|
|
6
6
|
declare const HighlighedContents: ({ value, highlight }: HighlighedContentsProps) => JSX.Element;
|
|
7
7
|
export default HighlighedContents;
|
|
@@ -13,7 +13,8 @@ var getRanges_1 = __importDefault(require("./getRanges"));
|
|
|
13
13
|
var extractSpansOfClasses_1 = __importDefault(require("./extractSpansOfClasses"));
|
|
14
14
|
var HighlighedContents = function HighlighedContents(_a) {
|
|
15
15
|
var value = _a.value,
|
|
16
|
-
|
|
16
|
+
_b = _a.highlight,
|
|
17
|
+
highlight = _b === void 0 ? '' : _b;
|
|
17
18
|
var ranges = (0, getRanges_1["default"])(value, highlight);
|
|
18
19
|
var parts = (0, extractSpansOfClasses_1["default"])(value, ranges);
|
|
19
20
|
return react_1["default"].createElement(react_1["default"].Fragment, null, parts.map(function (part) {
|
|
@@ -6,7 +6,7 @@ export interface HighlightTextareaProps extends HighlighedContentsProps, Omit<Re
|
|
|
6
6
|
className?: string;
|
|
7
7
|
textAreaClassName?: string;
|
|
8
8
|
onChange?: (value: string, e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
|
-
highlight
|
|
9
|
+
highlight?: HighlightType;
|
|
10
10
|
}
|
|
11
11
|
declare const HighlightWithinTextarea: React.ForwardRefExoticComponent<HighlightTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
12
12
|
export default HighlightWithinTextarea;
|
|
@@ -93,16 +93,18 @@ var trimStart_1 = __importDefault(require("lodash/trimStart"));
|
|
|
93
93
|
var useMount_1 = __importDefault(require("ahooks/lib/useMount"));
|
|
94
94
|
var HighlighedContents_1 = __importDefault(require("./HighlighedContents"));
|
|
95
95
|
var HighlightWithinTextarea = React.forwardRef(function (props, ref) {
|
|
96
|
-
var
|
|
96
|
+
var _a = props.prefixCls,
|
|
97
|
+
prefixCls = _a === void 0 ? 'ant' : _a,
|
|
97
98
|
value = props.value,
|
|
98
99
|
onChange = props.onChange,
|
|
99
|
-
|
|
100
|
+
_b = props.highlight,
|
|
101
|
+
highlight = _b === void 0 ? '' : _b,
|
|
100
102
|
className = props.className,
|
|
101
103
|
textAreaClassName = props.textAreaClassName,
|
|
102
104
|
textareaProps = __rest(props, ["prefixCls", "value", "onChange", "highlight", "className", "textAreaClassName"]);
|
|
103
|
-
var
|
|
104
|
-
textAreaValue =
|
|
105
|
-
setTextAreaValue =
|
|
105
|
+
var _c = __read(React.useState(''), 2),
|
|
106
|
+
textAreaValue = _c[0],
|
|
107
|
+
setTextAreaValue = _c[1];
|
|
106
108
|
var resultValue = value || textAreaValue;
|
|
107
109
|
var containerRef = React.useRef();
|
|
108
110
|
var backdropRef = React.useRef();
|
|
@@ -149,8 +151,4 @@ var HighlightWithinTextarea = React.forwardRef(function (props, ref) {
|
|
|
149
151
|
ref: ref
|
|
150
152
|
})));
|
|
151
153
|
});
|
|
152
|
-
HighlightWithinTextarea.defaultProps = {
|
|
153
|
-
highlight: '',
|
|
154
|
-
prefixCls: 'ant'
|
|
155
|
-
};
|
|
156
154
|
exports["default"] = HighlightWithinTextarea;
|
package/lib/img-crop/index.d.ts
CHANGED
|
@@ -6,16 +6,16 @@ export interface RcFile extends File {
|
|
|
6
6
|
uid: string;
|
|
7
7
|
}
|
|
8
8
|
export interface ImgCropProps {
|
|
9
|
-
prefix
|
|
10
|
-
aspect
|
|
11
|
-
shape
|
|
9
|
+
prefix?: string;
|
|
10
|
+
aspect?: number;
|
|
11
|
+
shape?: 'rect' | 'round';
|
|
12
12
|
grid?: boolean;
|
|
13
13
|
quality?: number;
|
|
14
14
|
zoom?: boolean;
|
|
15
15
|
rotate?: boolean;
|
|
16
|
-
minZoom
|
|
17
|
-
maxZoom
|
|
18
|
-
fillColor
|
|
16
|
+
minZoom?: number;
|
|
17
|
+
maxZoom?: number;
|
|
18
|
+
fillColor?: string;
|
|
19
19
|
modalTitle: string;
|
|
20
20
|
modalWidth?: string | number;
|
|
21
21
|
modalCancel?: string;
|
|
@@ -36,18 +36,6 @@ export declare type Area = {
|
|
|
36
36
|
};
|
|
37
37
|
declare const ImgCrop: {
|
|
38
38
|
(props: ImgCropProps): JSX.Element;
|
|
39
|
-
defaultProps: {
|
|
40
|
-
prefix: string;
|
|
41
|
-
aspect: number;
|
|
42
|
-
shape: string;
|
|
43
|
-
grid: boolean;
|
|
44
|
-
quality: number;
|
|
45
|
-
zoom: boolean;
|
|
46
|
-
rotate: boolean;
|
|
47
|
-
minZoom: number;
|
|
48
|
-
maxZoom: number;
|
|
49
|
-
fillColor: string;
|
|
50
|
-
};
|
|
51
39
|
getCroppedImg: typeof getCroppedImg;
|
|
52
40
|
};
|
|
53
41
|
export default ImgCrop;
|
package/lib/img-crop/index.js
CHANGED
|
@@ -216,16 +216,26 @@ var MIN_ROTATE = 0;
|
|
|
216
216
|
var MAX_ROTATE = 360;
|
|
217
217
|
var ROTATE_STEP = 1;
|
|
218
218
|
var ImgCrop = function ImgCrop(props) {
|
|
219
|
-
var
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
219
|
+
var _a = props.aspect,
|
|
220
|
+
aspect = _a === void 0 ? 1 : _a,
|
|
221
|
+
_b = props.shape,
|
|
222
|
+
shape = _b === void 0 ? 'rect' : _b,
|
|
223
|
+
_c = props.grid,
|
|
224
|
+
grid = _c === void 0 ? false : _c,
|
|
225
|
+
_d = props.quality,
|
|
226
|
+
quality = _d === void 0 ? 0.4 : _d,
|
|
227
|
+
_e = props.zoom,
|
|
228
|
+
zoom = _e === void 0 ? true : _e,
|
|
229
|
+
_f = props.rotate,
|
|
230
|
+
rotate = _f === void 0 ? false : _f,
|
|
231
|
+
_g = props.minZoom,
|
|
232
|
+
minZoom = _g === void 0 ? 1 : _g,
|
|
233
|
+
_h = props.maxZoom,
|
|
234
|
+
maxZoom = _h === void 0 ? 3 : _h,
|
|
235
|
+
_j = props.fillColor,
|
|
236
|
+
fillColor = _j === void 0 ? 'rgba(0,0,0,0)' : _j,
|
|
237
|
+
_k = props.prefix,
|
|
238
|
+
prefix = _k === void 0 ? 'ant' : _k,
|
|
229
239
|
modalTitle = props.modalTitle,
|
|
230
240
|
modalWidth = props.modalWidth,
|
|
231
241
|
modalOk = props.modalOk,
|
|
@@ -238,15 +248,15 @@ var ImgCrop = function ImgCrop(props) {
|
|
|
238
248
|
var MEDIA_CLASS = "".concat(pkg, "-media");
|
|
239
249
|
var hasZoom = zoom === true;
|
|
240
250
|
var hasRotate = rotate === true;
|
|
241
|
-
var
|
|
242
|
-
src =
|
|
243
|
-
setSrc =
|
|
244
|
-
var
|
|
245
|
-
zoomVal =
|
|
246
|
-
setZoomVal =
|
|
247
|
-
var
|
|
248
|
-
rotateVal =
|
|
249
|
-
setRotateVal =
|
|
251
|
+
var _l = __read(React.useState(''), 2),
|
|
252
|
+
src = _l[0],
|
|
253
|
+
setSrc = _l[1];
|
|
254
|
+
var _m = __read(React.useState(1), 2),
|
|
255
|
+
zoomVal = _m[0],
|
|
256
|
+
setZoomVal = _m[1];
|
|
257
|
+
var _o = __read(React.useState(0), 2),
|
|
258
|
+
rotateVal = _o[0],
|
|
259
|
+
setRotateVal = _o[1];
|
|
250
260
|
var beforeUploadRef = React.useRef();
|
|
251
261
|
var fileRef = React.useRef();
|
|
252
262
|
var resolveRef = React.useRef(noop);
|
|
@@ -469,17 +479,5 @@ var ImgCrop = function ImgCrop(props) {
|
|
|
469
479
|
};
|
|
470
480
|
return renderComponent(modalTitle);
|
|
471
481
|
};
|
|
472
|
-
ImgCrop.defaultProps = {
|
|
473
|
-
prefix: 'ant',
|
|
474
|
-
aspect: 1,
|
|
475
|
-
shape: 'rect',
|
|
476
|
-
grid: false,
|
|
477
|
-
quality: 0.4,
|
|
478
|
-
zoom: true,
|
|
479
|
-
rotate: false,
|
|
480
|
-
minZoom: 1,
|
|
481
|
-
maxZoom: 3,
|
|
482
|
-
fillColor: 'rgba(0,0,0,0)'
|
|
483
|
-
};
|
|
484
482
|
ImgCrop.getCroppedImg = getCroppedImg_1["default"];
|
|
485
483
|
exports["default"] = ImgCrop;
|
package/lib/keep-tab/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface KeepTabProps extends Omit<TabsProps, 'items'> {
|
|
|
9
9
|
/** 初始化选中面板的 key,如果没有设置 activeKey */
|
|
10
10
|
defaultActiveKey?: string;
|
|
11
11
|
/** 保存激活 tab 面板的的key名 */
|
|
12
|
-
saveActiveKeyName
|
|
12
|
+
saveActiveKeyName?: string;
|
|
13
13
|
/** 当前激活 tab 面板的 key */
|
|
14
14
|
activeKey?: string;
|
|
15
15
|
/** 切换面板的回调 */
|
|
@@ -23,9 +23,6 @@ export interface SelfTabPaneProps extends TabPaneProps {
|
|
|
23
23
|
}
|
|
24
24
|
declare const KeepTab: {
|
|
25
25
|
(props: KeepTabProps): JSX.Element;
|
|
26
|
-
defaultProps: {
|
|
27
|
-
saveActiveKeyName: string;
|
|
28
|
-
};
|
|
29
26
|
displayName: string;
|
|
30
27
|
TabPane: React.FC<TabPaneProps>;
|
|
31
28
|
};
|
package/lib/keep-tab/index.js
CHANGED
|
@@ -101,21 +101,22 @@ var KeepTab = function KeepTab(props) {
|
|
|
101
101
|
var _b = props.items,
|
|
102
102
|
items = _b === void 0 ? [] : _b,
|
|
103
103
|
defaultActiveKey = props.defaultActiveKey,
|
|
104
|
-
|
|
104
|
+
_c = props.saveActiveKeyName,
|
|
105
|
+
saveActiveKeyName = _c === void 0 ? 'active' : _c,
|
|
105
106
|
onChange = props.onChange,
|
|
106
|
-
|
|
107
|
-
badgeProps =
|
|
107
|
+
_d = props.badgeProps,
|
|
108
|
+
badgeProps = _d === void 0 ? defaultBadgeProps : _d,
|
|
108
109
|
restProps = __rest(props, ["items", "defaultActiveKey", "saveActiveKeyName", "onChange", "badgeProps"]);
|
|
109
110
|
var defaultUrlParams = qsHelp_1["default"].getQueryObject();
|
|
110
|
-
var
|
|
111
|
-
urlParams =
|
|
112
|
-
setUrlParams =
|
|
113
|
-
var
|
|
111
|
+
var _e = __read((0, use_url_state_1["default"])((_a = {}, _a[saveActiveKeyName] = defaultUrlParams[saveActiveKeyName] || defaultActiveKey, _a)), 2),
|
|
112
|
+
urlParams = _e[0],
|
|
113
|
+
setUrlParams = _e[1];
|
|
114
|
+
var _f = __read((0, useControllableValue_1["default"])(props, {
|
|
114
115
|
valuePropName: 'activeKey',
|
|
115
116
|
defaultValue: defaultUrlParams[saveActiveKeyName] || defaultActiveKey
|
|
116
117
|
}), 2),
|
|
117
|
-
tabActiveKey =
|
|
118
|
-
setTabActiveKey =
|
|
118
|
+
tabActiveKey = _f[0],
|
|
119
|
+
setTabActiveKey = _f[1];
|
|
119
120
|
React.useEffect(function () {
|
|
120
121
|
var _a;
|
|
121
122
|
if (!('activeKey' in props) && items) {
|
|
@@ -155,9 +156,6 @@ var KeepTab = function KeepTab(props) {
|
|
|
155
156
|
items: resultItems
|
|
156
157
|
}));
|
|
157
158
|
};
|
|
158
|
-
KeepTab.defaultProps = {
|
|
159
|
-
saveActiveKeyName: 'active'
|
|
160
|
-
};
|
|
161
159
|
KeepTab.displayName = 'KeepTab';
|
|
162
160
|
KeepTab.TabPane = TabPane;
|
|
163
161
|
exports["default"] = KeepTab;
|
|
@@ -111,7 +111,8 @@ var NumberInput = React.forwardRef(function (props, ref) {
|
|
|
111
111
|
precision = props.precision,
|
|
112
112
|
formatter = props.formatter,
|
|
113
113
|
parser = props.parser,
|
|
114
|
-
|
|
114
|
+
_d = props.enableMinus,
|
|
115
|
+
enableMinus = _d === void 0 ? false : _d,
|
|
115
116
|
onBlur = props.onBlur,
|
|
116
117
|
maxLength = props.maxLength,
|
|
117
118
|
restProps = __rest(props, ["onChange", "numberType", "dataType", "precision", "formatter", "parser", "enableMinus", "onBlur", "maxLength"]);
|
|
@@ -163,7 +164,4 @@ var NumberInput = React.forwardRef(function (props, ref) {
|
|
|
163
164
|
maxLength: maxLength
|
|
164
165
|
}, (0, omit_1["default"])(restProps, ['value'])));
|
|
165
166
|
});
|
|
166
|
-
NumberInput.defaultProps = {
|
|
167
|
-
enableMinus: false
|
|
168
|
-
};
|
|
169
167
|
exports["default"] = NumberInput;
|
package/lib/rc-echart/core.d.ts
CHANGED
|
@@ -16,14 +16,5 @@ export interface RcEchartPropsType {
|
|
|
16
16
|
onEvents?: Record<string, Function>;
|
|
17
17
|
opts?: Opts;
|
|
18
18
|
}
|
|
19
|
-
declare const ReactEchartCore:
|
|
20
|
-
(props: RcEchartPropsType): JSX.Element;
|
|
21
|
-
defaultProps: {
|
|
22
|
-
notMerge: boolean;
|
|
23
|
-
lazyUpdate: boolean;
|
|
24
|
-
className: string;
|
|
25
|
-
onEvents: {};
|
|
26
|
-
opts: {};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
19
|
+
declare const ReactEchartCore: (props: RcEchartPropsType) => JSX.Element;
|
|
29
20
|
export default ReactEchartCore;
|
package/lib/rc-echart/core.js
CHANGED
|
@@ -49,13 +49,18 @@ var useUpdateEffect_1 = __importDefault(require("ahooks/lib/useUpdateEffect"));
|
|
|
49
49
|
var classnames_1 = __importDefault(require("classnames"));
|
|
50
50
|
var resize_observer_polyfill_1 = __importDefault(require("resize-observer-polyfill"));
|
|
51
51
|
var ReactEchartCore = function ReactEchartCore(props) {
|
|
52
|
-
var
|
|
52
|
+
var _a = props.className,
|
|
53
|
+
className = _a === void 0 ? '' : _a,
|
|
53
54
|
option = props.option,
|
|
54
55
|
echarts = props.echarts,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
_b = props.notMerge,
|
|
57
|
+
notMerge = _b === void 0 ? false : _b,
|
|
58
|
+
_c = props.lazyUpdate,
|
|
59
|
+
lazyUpdate = _c === void 0 ? false : _c,
|
|
60
|
+
_d = props.onEvents,
|
|
61
|
+
onEvents = _d === void 0 ? {} : _d,
|
|
62
|
+
_e = props.opts,
|
|
63
|
+
opts = _e === void 0 ? {} : _e,
|
|
59
64
|
theme = props.theme;
|
|
60
65
|
var chartDomRef = (0, react_1.useRef)();
|
|
61
66
|
var chartRef = (0, react_1.useRef)();
|
|
@@ -136,12 +141,4 @@ var ReactEchartCore = function ReactEchartCore(props) {
|
|
|
136
141
|
className: (0, classnames_1["default"])('react-echart', className)
|
|
137
142
|
});
|
|
138
143
|
};
|
|
139
|
-
ReactEchartCore.defaultProps = {
|
|
140
|
-
notMerge: false,
|
|
141
|
-
lazyUpdate: false,
|
|
142
|
-
// style: {},
|
|
143
|
-
className: '',
|
|
144
|
-
onEvents: {},
|
|
145
|
-
opts: {}
|
|
146
|
-
};
|
|
147
144
|
exports["default"] = ReactEchartCore;
|
package/lib/rc-qrcode/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import QRCode from 'qrcode';
|
|
|
3
3
|
import useQrcode from './useQrcode';
|
|
4
4
|
export interface RcQrcodeProps {
|
|
5
5
|
/** 生成二维码的值 */
|
|
6
|
-
value
|
|
6
|
+
value?: QRCodeSegment[] | string;
|
|
7
7
|
/** qrcode的QRCodeRenderersOptions */
|
|
8
8
|
options?: QRCodeRenderersOptions;
|
|
9
9
|
/** 获取HTMLCanvasElement */
|
|
@@ -11,10 +11,6 @@ export interface RcQrcodeProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const RcQrcode: {
|
|
13
13
|
(props: RcQrcodeProps): JSX.Element;
|
|
14
|
-
defaultProps: {
|
|
15
|
-
value: string;
|
|
16
|
-
options: {};
|
|
17
|
-
};
|
|
18
14
|
useQrcode: (value: string | QRCodeSegment[], options?: QRCode.QRCodeToDataURLOptions) => string;
|
|
19
15
|
};
|
|
20
16
|
export default RcQrcode;
|
package/lib/rc-qrcode/index.js
CHANGED
|
@@ -60,8 +60,10 @@ var useMount_1 = __importDefault(require("ahooks/lib/useMount"));
|
|
|
60
60
|
var useQrcode_1 = __importDefault(require("./useQrcode"));
|
|
61
61
|
exports.useQrcode = useQrcode_1["default"];
|
|
62
62
|
var RcQrcode = function RcQrcode(props) {
|
|
63
|
-
var
|
|
64
|
-
|
|
63
|
+
var _a = props.value,
|
|
64
|
+
value = _a === void 0 ? '' : _a,
|
|
65
|
+
_b = props.options,
|
|
66
|
+
options = _b === void 0 ? {} : _b,
|
|
65
67
|
getCanvasInstance = props.getCanvasInstance;
|
|
66
68
|
var domElRef = React.useRef(null);
|
|
67
69
|
var defaultOptions = {
|
|
@@ -84,9 +86,5 @@ var RcQrcode = function RcQrcode(props) {
|
|
|
84
86
|
ref: domElRef
|
|
85
87
|
});
|
|
86
88
|
};
|
|
87
|
-
RcQrcode.defaultProps = {
|
|
88
|
-
value: '',
|
|
89
|
-
options: {}
|
|
90
|
-
};
|
|
91
89
|
RcQrcode.useQrcode = useQrcode_1["default"];
|
|
92
90
|
exports["default"] = RcQrcode;
|
|
@@ -13,10 +13,5 @@ export interface SingleImgUploadProps extends UploadProps {
|
|
|
13
13
|
/** 格式化接口返回数据 */
|
|
14
14
|
onFormatResData?: (res: any) => string;
|
|
15
15
|
}
|
|
16
|
-
declare const SingleImgUpload:
|
|
17
|
-
(props: SingleImgUploadProps): JSX.Element;
|
|
18
|
-
defaultProps: {
|
|
19
|
-
beforeUpload(): boolean;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
16
|
+
declare const SingleImgUpload: (props: SingleImgUploadProps) => JSX.Element;
|
|
22
17
|
export default SingleImgUpload;
|
|
@@ -238,24 +238,27 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
238
238
|
onFormatResData = props.onFormatResData,
|
|
239
239
|
onSuccess = props.onSuccess,
|
|
240
240
|
onCancel = props.onCancel,
|
|
241
|
-
|
|
241
|
+
_a = props.beforeUpload,
|
|
242
|
+
beforeUpload = _a === void 0 ? function () {
|
|
243
|
+
return true;
|
|
244
|
+
} : _a,
|
|
242
245
|
onError = props.onError,
|
|
243
246
|
disabled = props.disabled,
|
|
244
247
|
restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onFormatResData", "onSuccess", "onCancel", "beforeUpload", "onError", "disabled"]);
|
|
245
248
|
var uploadInstanceRef = React.useRef();
|
|
246
249
|
var fileRef = React.useRef();
|
|
247
|
-
var
|
|
248
|
-
uploadStatus =
|
|
249
|
-
setUploadStatus =
|
|
250
|
-
var
|
|
251
|
-
fileUrl =
|
|
252
|
-
setFileUrl =
|
|
253
|
-
var
|
|
254
|
-
uploadPercent =
|
|
255
|
-
setUploadPercent =
|
|
256
|
-
var
|
|
257
|
-
imageLoading =
|
|
258
|
-
setImageLoading =
|
|
250
|
+
var _b = __read(React.useState(value ? 'done' : 'init'), 2),
|
|
251
|
+
uploadStatus = _b[0],
|
|
252
|
+
setUploadStatus = _b[1];
|
|
253
|
+
var _c = __read(React.useState(value), 2),
|
|
254
|
+
fileUrl = _c[0],
|
|
255
|
+
setFileUrl = _c[1];
|
|
256
|
+
var _d = __read(React.useState(0), 2),
|
|
257
|
+
uploadPercent = _d[0],
|
|
258
|
+
setUploadPercent = _d[1];
|
|
259
|
+
var _e = __read(React.useState(false), 2),
|
|
260
|
+
imageLoading = _e[0],
|
|
261
|
+
setImageLoading = _e[1];
|
|
259
262
|
React.useEffect(function () {
|
|
260
263
|
setFileUrl(value);
|
|
261
264
|
if (value) {
|
|
@@ -386,9 +389,4 @@ var SingleImgUpload = function SingleImgUpload(props) {
|
|
|
386
389
|
})
|
|
387
390
|
}, children)));
|
|
388
391
|
};
|
|
389
|
-
SingleImgUpload.defaultProps = {
|
|
390
|
-
beforeUpload: function beforeUpload() {
|
|
391
|
-
return true;
|
|
392
|
-
}
|
|
393
|
-
};
|
|
394
392
|
exports["default"] = SingleImgUpload;
|
|
@@ -5,7 +5,7 @@ export interface StepNumberInputProps {
|
|
|
5
5
|
/** 输入数据的类型 */
|
|
6
6
|
numberType?: 'int' | 'float';
|
|
7
7
|
/** 精度,只对float有效 */
|
|
8
|
-
precision
|
|
8
|
+
precision?: number;
|
|
9
9
|
/** 内容最大长度 */
|
|
10
10
|
maxLength?: number;
|
|
11
11
|
/** 指定输入框展示值的格式 */
|
|
@@ -15,7 +15,7 @@ export interface StepNumberInputProps {
|
|
|
15
15
|
/** 是否允许输入负数 */
|
|
16
16
|
enableMinus?: boolean;
|
|
17
17
|
/** 步进, 每次点击+/- 多少 */
|
|
18
|
-
step
|
|
18
|
+
step?: string | number;
|
|
19
19
|
/** 变化回调 */
|
|
20
20
|
onChange?: (value: string) => void;
|
|
21
21
|
/** 失去焦点回调 */
|
|
@@ -32,13 +32,5 @@ export interface StepNumberInputProps {
|
|
|
32
32
|
allowClear?: boolean;
|
|
33
33
|
disabled?: boolean;
|
|
34
34
|
}
|
|
35
|
-
declare const StepNumberInput:
|
|
36
|
-
(props: StepNumberInputProps): JSX.Element;
|
|
37
|
-
defaultProps: {
|
|
38
|
-
numberType: string;
|
|
39
|
-
precision: number;
|
|
40
|
-
enableMinus: boolean;
|
|
41
|
-
step: number;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
35
|
+
declare const StepNumberInput: (props: StepNumberInputProps) => JSX.Element;
|
|
44
36
|
export default StepNumberInput;
|
|
@@ -104,13 +104,18 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
104
104
|
setValue = _a[1];
|
|
105
105
|
var onChange = props.onChange,
|
|
106
106
|
onBlur = props.onBlur,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
_b = props.numberType,
|
|
108
|
+
numberType = _b === void 0 ? numberType_1.INT : _b,
|
|
109
|
+
_c = props.precision,
|
|
110
|
+
precision = _c === void 0 ? 2 : _c,
|
|
111
|
+
_d = props.step,
|
|
112
|
+
step = _d === void 0 ? 1 : _d,
|
|
110
113
|
max = props.max,
|
|
111
114
|
min = props.min,
|
|
112
115
|
customDisabled = props.disabled,
|
|
113
|
-
|
|
116
|
+
_e = props.enableMinus,
|
|
117
|
+
enableMinus = _e === void 0 ? false : _e,
|
|
118
|
+
restProps = __rest(props, ["onChange", "onBlur", "numberType", "precision", "step", "max", "min", "disabled", "enableMinus"]);
|
|
114
119
|
var isEmpty = (0, isUndefined_1["default"])(value) || value === '';
|
|
115
120
|
var plusNumber = new bignumber_js_1["default"](value).plus(step).toString();
|
|
116
121
|
var minusNumber = new bignumber_js_1["default"](value).minus(step).toString();
|
|
@@ -172,13 +177,8 @@ var StepNumberInput = function StepNumberInput(props) {
|
|
|
172
177
|
onBlur: onNumberBlur,
|
|
173
178
|
numberType: numberType,
|
|
174
179
|
precision: precision,
|
|
175
|
-
disabled: mergedDisabled
|
|
180
|
+
disabled: mergedDisabled,
|
|
181
|
+
enableMinus: enableMinus
|
|
176
182
|
}, restProps)));
|
|
177
183
|
};
|
|
178
|
-
StepNumberInput.defaultProps = {
|
|
179
|
-
numberType: numberType_1.INT,
|
|
180
|
-
precision: 2,
|
|
181
|
-
enableMinus: false,
|
|
182
|
-
step: 1
|
|
183
|
-
};
|
|
184
184
|
exports["default"] = StepNumberInput;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.73",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"node": ">=10.0.0"
|
|
81
81
|
},
|
|
82
82
|
"license": "MIT",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "c4c76a74045ef87b12675f1b7f16ac56cbbdd18a"
|
|
84
84
|
}
|