assui 3.1.70 → 3.1.72
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/color-select/index.js +2 -2
- package/es/complex-val-select/index.d.ts +5 -3
- package/es/complex-val-select/index.js +32 -8
- package/es/highlight-textarea/index.js +7 -9
- package/es/img-crop/index.d.ts +0 -12
- package/es/img-crop/index.js +29 -31
- package/es/keep-tab/index.d.ts +0 -3
- package/es/keep-tab/index.js +10 -12
- package/es/label-customize-range-picker/defaultRadioList.js +17 -17
- package/es/label-customize-range-picker/index.js +2 -2
- package/es/messages/index.d.ts +7 -5
- package/es/messages/index.js +5 -0
- 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 +0 -4
- 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 +1 -9
- package/es/step-number-input/index.js +11 -11
- package/lib/color-select/index.js +2 -2
- package/lib/complex-val-select/index.d.ts +5 -3
- package/lib/complex-val-select/index.js +34 -9
- package/lib/highlight-textarea/index.js +7 -9
- package/lib/img-crop/index.d.ts +0 -12
- package/lib/img-crop/index.js +29 -31
- package/lib/keep-tab/index.d.ts +0 -3
- package/lib/keep-tab/index.js +10 -12
- package/lib/label-customize-range-picker/defaultRadioList.js +50 -17
- package/lib/label-customize-range-picker/index.js +2 -2
- package/lib/messages/index.d.ts +7 -5
- package/lib/messages/index.js +6 -0
- 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 +0 -4
- 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 +1 -9
- package/lib/step-number-input/index.js +11 -11
- package/package.json +2 -2
package/es/color-select/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import classNames from 'classnames';
|
|
|
41
41
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
42
42
|
import ChevronRightOutlined from "a-icons/es/ChevronRightOutlined";
|
|
43
43
|
import LocaleContext from '../config-provider/context';
|
|
44
|
-
import formatMessage from '../messages';
|
|
44
|
+
import formatMessage, { langTypeEnum } from '../messages';
|
|
45
45
|
var ColorSelect = function ColorSelect(props) {
|
|
46
46
|
var className = props.className,
|
|
47
47
|
classNameWrap = props.classNameWrap,
|
|
@@ -69,7 +69,7 @@ var ColorSelect = function ColorSelect(props) {
|
|
|
69
69
|
} : undefined
|
|
70
70
|
}) : /*#__PURE__*/React.createElement("span", {
|
|
71
71
|
className: "color-select-placeholder"
|
|
72
|
-
}, formatMessage(messages,
|
|
72
|
+
}, formatMessage(messages, langTypeEnum.global, 'placeholder')), /*#__PURE__*/React.createElement("div", {
|
|
73
73
|
className: "color-select-arrow"
|
|
74
74
|
}, /*#__PURE__*/React.createElement(ChevronRightOutlined, {
|
|
75
75
|
rotate: 90
|
|
@@ -3,11 +3,13 @@ import type { BaseOptionType, SelectProps } from 'antd/lib/select';
|
|
|
3
3
|
declare const Option: import("rc-select/lib/Option").OptionFC;
|
|
4
4
|
export { Option };
|
|
5
5
|
export declare type ComplexValSelectValueType = string | number | any[] | Record<string, any> | null | undefined;
|
|
6
|
-
export interface ComplexValSelectOptionType extends BaseOptionType {
|
|
7
|
-
label: React.ReactNode;
|
|
6
|
+
export interface ComplexValSelectOptionType extends Omit<BaseOptionType, 'value' | 'children' | 'options'> {
|
|
8
7
|
value?: ComplexValSelectValueType;
|
|
9
|
-
children?:
|
|
8
|
+
children?: ComplexValSelectOptionType[];
|
|
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;
|
|
@@ -44,6 +44,36 @@ import Select from "antd/es/select";
|
|
|
44
44
|
import useControllableValue from "ahooks/es/useControllableValue";
|
|
45
45
|
var Option = Select.Option;
|
|
46
46
|
export { Option };
|
|
47
|
+
var formatOptions = function formatOptions(dateSource) {
|
|
48
|
+
if (dateSource) {
|
|
49
|
+
var options = dateSource.map(function (item) {
|
|
50
|
+
var otherProps = item.options ? {
|
|
51
|
+
options: formatOptions(item.options)
|
|
52
|
+
} : {};
|
|
53
|
+
return __assign(__assign(__assign({}, item), {
|
|
54
|
+
label: item.label,
|
|
55
|
+
value: item.value ? JSON.stringify(item.value) : undefined
|
|
56
|
+
}), otherProps);
|
|
57
|
+
});
|
|
58
|
+
return options;
|
|
59
|
+
}
|
|
60
|
+
return dateSource;
|
|
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
|
+
};
|
|
47
77
|
var ComplexValSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
48
78
|
var _a = __read(useControllableValue(props), 2),
|
|
49
79
|
value = _a[0],
|
|
@@ -56,14 +86,8 @@ var ComplexValSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
56
86
|
return selectRef.current;
|
|
57
87
|
});
|
|
58
88
|
// 判断是否需要将optionValue转为JSON字符串
|
|
59
|
-
var isReferenceTypeVal =
|
|
60
|
-
|
|
61
|
-
});
|
|
62
|
-
var finalOptions = isReferenceTypeVal ? options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
63
|
-
return __assign(__assign({}, item), {
|
|
64
|
-
value: JSON.stringify(item.value)
|
|
65
|
-
});
|
|
66
|
-
}) : options;
|
|
89
|
+
var isReferenceTypeVal = isReferenceTypeOption(options);
|
|
90
|
+
var finalOptions = isReferenceTypeVal ? formatOptions(options) : options;
|
|
67
91
|
var handleChange = function handleChange(val) {
|
|
68
92
|
var nextVal = val && isReferenceTypeVal ? JSON.parse(val) : val;
|
|
69
93
|
setValue(nextVal);
|
|
@@ -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
|
@@ -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
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;
|
|
@@ -33,7 +33,7 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
33
33
|
};
|
|
34
34
|
import { isNumber } from 'lodash';
|
|
35
35
|
import dateUtils from "aa-utils/es/dateUtils";
|
|
36
|
-
import formatMessage from '../messages';
|
|
36
|
+
import formatMessage, { langTypeEnum } from '../messages';
|
|
37
37
|
export var dateTypeEnum;
|
|
38
38
|
(function (dateTypeEnum) {
|
|
39
39
|
dateTypeEnum[dateTypeEnum["TODAY"] = 1] = "TODAY";
|
|
@@ -63,68 +63,68 @@ var getDefaultRadioList = function getDefaultRadioList(_a) {
|
|
|
63
63
|
var now = isNumber(timeOffset) ? dateUtils.getToday(timeOffset) : dateUtils.getToday();
|
|
64
64
|
var allRadio = displayAllOption ? [{
|
|
65
65
|
key: dateTypeEnum.ALL,
|
|
66
|
-
text: formatMessage(messages,
|
|
66
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'all'),
|
|
67
67
|
value: [startTimeOfAllOption || dateUtils.parseDate('2022/09/01'), now.endOf('day')]
|
|
68
68
|
}] : [];
|
|
69
69
|
var defaultRadioList = __spreadArray([{
|
|
70
70
|
key: dateTypeEnum.TODAY,
|
|
71
|
-
text: formatMessage(messages,
|
|
71
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'toDay'),
|
|
72
72
|
value: [now.clone().startOf('day'), now.clone().endOf('day')]
|
|
73
73
|
}, {
|
|
74
74
|
key: dateTypeEnum.YESTERDAY,
|
|
75
|
-
text: formatMessage(messages,
|
|
75
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'yesterDay'),
|
|
76
76
|
value: [now.clone().subtract(1, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')]
|
|
77
77
|
}, {
|
|
78
78
|
key: dateTypeEnum.WEEK,
|
|
79
|
-
text: formatMessage(messages,
|
|
79
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'week'),
|
|
80
80
|
value: [now.clone().startOf('week'), naturalDate ? now.clone().endOf('week') : now.clone().endOf('day')]
|
|
81
81
|
}, {
|
|
82
82
|
key: dateTypeEnum.LAST_WEEK,
|
|
83
|
-
text: formatMessage(messages,
|
|
83
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'lastWeek'),
|
|
84
84
|
value: [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')]
|
|
85
85
|
}, {
|
|
86
86
|
key: dateTypeEnum.MONTH,
|
|
87
|
-
text: formatMessage(messages,
|
|
87
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'month'),
|
|
88
88
|
value: [now.clone().startOf('month'), naturalDate ? now.clone().endOf('month') : now.clone().endOf('day')]
|
|
89
89
|
}, {
|
|
90
90
|
key: dateTypeEnum.LAST_MONTH,
|
|
91
|
-
text: formatMessage(messages,
|
|
91
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'lastMonth'),
|
|
92
92
|
value: [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')]
|
|
93
93
|
}, {
|
|
94
94
|
key: dateTypeEnum.QUARTER,
|
|
95
|
-
text: formatMessage(messages,
|
|
95
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'quarter'),
|
|
96
96
|
value: [now.clone().startOf('quarter'), naturalDate ? now.clone().endOf('quarter') : now.clone().endOf('day')]
|
|
97
97
|
}, {
|
|
98
98
|
key: dateTypeEnum.LAST_QUARTER,
|
|
99
|
-
text: formatMessage(messages,
|
|
99
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'lastQuarter'),
|
|
100
100
|
value: [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')]
|
|
101
101
|
}, {
|
|
102
102
|
key: dateTypeEnum.YEAR,
|
|
103
|
-
text: formatMessage(messages,
|
|
103
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'year'),
|
|
104
104
|
value: [now.clone().startOf('year'), naturalDate ? now.clone().endOf('year') : now.endOf('day')]
|
|
105
105
|
}, {
|
|
106
106
|
key: dateTypeEnum.BEFORE_7_DAY,
|
|
107
|
-
text: formatMessage(messages,
|
|
107
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'last7days'),
|
|
108
108
|
value: [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')]
|
|
109
109
|
}, {
|
|
110
110
|
key: dateTypeEnum.BEFORE_14_DAY,
|
|
111
|
-
text: formatMessage(messages,
|
|
111
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'last14days'),
|
|
112
112
|
value: [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')]
|
|
113
113
|
}, {
|
|
114
114
|
key: dateTypeEnum.BEFORE_30_DAY,
|
|
115
|
-
text: formatMessage(messages,
|
|
115
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'last30days'),
|
|
116
116
|
value: [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')]
|
|
117
117
|
}, {
|
|
118
118
|
key: dateTypeEnum.BEFORE_90_DAY,
|
|
119
|
-
text: formatMessage(messages,
|
|
119
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'last90days'),
|
|
120
120
|
value: [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')]
|
|
121
121
|
}, {
|
|
122
122
|
key: dateTypeEnum.BEFORE_180_DAY,
|
|
123
|
-
text: formatMessage(messages,
|
|
123
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'last180days'),
|
|
124
124
|
value: [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')]
|
|
125
125
|
}, {
|
|
126
126
|
key: dateTypeEnum.BEFORE_365_DAY,
|
|
127
|
-
text: formatMessage(messages,
|
|
127
|
+
text: formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'last365days'),
|
|
128
128
|
value: [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')]
|
|
129
129
|
}], __read(allRadio), false);
|
|
130
130
|
return defaultRadioList;
|
|
@@ -53,7 +53,7 @@ import omit from 'lodash/omit';
|
|
|
53
53
|
import getDefaultRadioList from './defaultRadioList';
|
|
54
54
|
import LabelRangePicker from '../label-range-picker';
|
|
55
55
|
import LocaleContext from '../config-provider/context';
|
|
56
|
-
import formatMessage from '../messages';
|
|
56
|
+
import formatMessage, { langTypeEnum } from '../messages';
|
|
57
57
|
import { formatMaxScope, getDateDiffScope, ONE_DAY_MILLISECOND, getTimeDiffOfShowTime } from './utils';
|
|
58
58
|
var RangePicker = DatePicker.RangePicker;
|
|
59
59
|
var LabelCustomizeRangePicker = function LabelCustomizeRangePicker(props) {
|
|
@@ -218,7 +218,7 @@ var LabelCustomizeRangePicker = function LabelCustomizeRangePicker(props) {
|
|
|
218
218
|
onChange: onDiyTimeChange
|
|
219
219
|
}), /*#__PURE__*/React.createElement("span", {
|
|
220
220
|
className: "customize-select-text"
|
|
221
|
-
}, formatMessage(messages,
|
|
221
|
+
}, formatMessage(messages, langTypeEnum.labelCustomizeRangePicker, 'customTime')))), isVisiblePanel ? /*#__PURE__*/React.createElement("div", {
|
|
222
222
|
className: "panel"
|
|
223
223
|
}, panel) : /*#__PURE__*/React.createElement("div", {
|
|
224
224
|
className: "pick-box"
|
package/es/messages/index.d.ts
CHANGED
|
@@ -20,10 +20,12 @@ export declare type LabelCustomizeRangePickerType = {
|
|
|
20
20
|
export declare type Global = {
|
|
21
21
|
placeholder: string;
|
|
22
22
|
};
|
|
23
|
-
export declare
|
|
23
|
+
export declare enum langTypeEnum {
|
|
24
|
+
labelCustomizeRangePicker = "labelCustomizeRangePicker",
|
|
25
|
+
global = "global"
|
|
26
|
+
}
|
|
24
27
|
export declare type LangType = {
|
|
25
|
-
labelCustomizeRangePicker: LabelCustomizeRangePickerType;
|
|
26
|
-
global: Global;
|
|
28
|
+
[langTypeEnum.labelCustomizeRangePicker]: LabelCustomizeRangePickerType;
|
|
29
|
+
[langTypeEnum.global]: Global;
|
|
27
30
|
};
|
|
28
|
-
export
|
|
29
|
-
export default function formatMessage(message: LangType, displayName: DisplayNameType, key: keyof All): any;
|
|
31
|
+
export default function formatMessage<T extends LangType, K extends keyof T>(message: Record<K, T[K]>, displayName: K, key: keyof T[K]): Record<K, T[K]>[K][keyof T[K]];
|
package/es/messages/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export var langTypeEnum;
|
|
2
|
+
(function (langTypeEnum) {
|
|
3
|
+
langTypeEnum["labelCustomizeRangePicker"] = "labelCustomizeRangePicker";
|
|
4
|
+
langTypeEnum["global"] = "global";
|
|
5
|
+
})(langTypeEnum || (langTypeEnum = {}));
|
|
1
6
|
export default function formatMessage(message, displayName, key) {
|
|
2
7
|
return message[displayName][key];
|
|
3
8
|
}
|
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
|
@@ -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;
|
|
@@ -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;
|