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
|
@@ -84,7 +84,7 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
84
84
|
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
85
85
|
var ChevronRightOutlined_1 = __importDefault(require("a-icons/lib/ChevronRightOutlined"));
|
|
86
86
|
var context_1 = __importDefault(require("../config-provider/context"));
|
|
87
|
-
var messages_1 =
|
|
87
|
+
var messages_1 = __importStar(require("../messages"));
|
|
88
88
|
var ColorSelect = function ColorSelect(props) {
|
|
89
89
|
var className = props.className,
|
|
90
90
|
classNameWrap = props.classNameWrap,
|
|
@@ -112,7 +112,7 @@ var ColorSelect = function ColorSelect(props) {
|
|
|
112
112
|
} : undefined
|
|
113
113
|
}) : react_1["default"].createElement("span", {
|
|
114
114
|
className: "color-select-placeholder"
|
|
115
|
-
}, (0, messages_1["default"])(messages,
|
|
115
|
+
}, (0, messages_1["default"])(messages, messages_1.langTypeEnum.global, 'placeholder')), react_1["default"].createElement("div", {
|
|
116
116
|
className: "color-select-arrow"
|
|
117
117
|
}, react_1["default"].createElement(ChevronRightOutlined_1["default"], {
|
|
118
118
|
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;
|
|
@@ -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"));
|
|
@@ -88,6 +88,37 @@ var select_1 = __importDefault(require("antd/lib/select"));
|
|
|
88
88
|
var useControllableValue_1 = __importDefault(require("ahooks/lib/useControllableValue"));
|
|
89
89
|
var Option = select_1["default"].Option;
|
|
90
90
|
exports.Option = Option;
|
|
91
|
+
var formatOptions = function formatOptions(dateSource) {
|
|
92
|
+
if (dateSource) {
|
|
93
|
+
var options = dateSource.map(function (item) {
|
|
94
|
+
var otherProps = item.options ? {
|
|
95
|
+
options: formatOptions(item.options)
|
|
96
|
+
} : {};
|
|
97
|
+
return __assign(__assign(__assign({}, item), {
|
|
98
|
+
label: item.label,
|
|
99
|
+
value: item.value ? JSON.stringify(item.value) : undefined
|
|
100
|
+
}), otherProps);
|
|
101
|
+
});
|
|
102
|
+
return options;
|
|
103
|
+
}
|
|
104
|
+
return dateSource;
|
|
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;
|
|
91
122
|
var ComplexValSelect = React.forwardRef(function (props, ref) {
|
|
92
123
|
var _a = __read((0, useControllableValue_1["default"])(props), 2),
|
|
93
124
|
value = _a[0],
|
|
@@ -100,14 +131,8 @@ var ComplexValSelect = React.forwardRef(function (props, ref) {
|
|
|
100
131
|
return selectRef.current;
|
|
101
132
|
});
|
|
102
133
|
// 判断是否需要将optionValue转为JSON字符串
|
|
103
|
-
var isReferenceTypeVal = (0,
|
|
104
|
-
|
|
105
|
-
});
|
|
106
|
-
var finalOptions = isReferenceTypeVal ? options === null || options === void 0 ? void 0 : options.map(function (item) {
|
|
107
|
-
return __assign(__assign({}, item), {
|
|
108
|
-
value: JSON.stringify(item.value)
|
|
109
|
-
});
|
|
110
|
-
}) : options;
|
|
134
|
+
var isReferenceTypeVal = (0, exports.isReferenceTypeOption)(options);
|
|
135
|
+
var finalOptions = isReferenceTypeVal ? formatOptions(options) : options;
|
|
111
136
|
var handleChange = function handleChange(val) {
|
|
112
137
|
var nextVal = val && isReferenceTypeVal ? JSON.parse(val) : val;
|
|
113
138
|
setValue(nextVal);
|
|
@@ -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
|
@@ -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
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;
|
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return m[k];
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
} : function (o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
});
|
|
19
|
+
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
value: v
|
|
23
|
+
});
|
|
24
|
+
} : function (o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = this && this.__importStar || function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k in mod) {
|
|
31
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
}
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
3
36
|
var __read = this && this.__read || function (o, n) {
|
|
4
37
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
38
|
if (!m) return o;
|
|
@@ -44,7 +77,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
44
77
|
exports.dateTypeEnum = void 0;
|
|
45
78
|
var lodash_1 = require("lodash");
|
|
46
79
|
var dateUtils_1 = __importDefault(require("aa-utils/lib/dateUtils"));
|
|
47
|
-
var messages_1 =
|
|
80
|
+
var messages_1 = __importStar(require("../messages"));
|
|
48
81
|
var dateTypeEnum;
|
|
49
82
|
(function (dateTypeEnum) {
|
|
50
83
|
dateTypeEnum[dateTypeEnum["TODAY"] = 1] = "TODAY";
|
|
@@ -74,68 +107,68 @@ var getDefaultRadioList = function getDefaultRadioList(_a) {
|
|
|
74
107
|
var now = (0, lodash_1.isNumber)(timeOffset) ? dateUtils_1["default"].getToday(timeOffset) : dateUtils_1["default"].getToday();
|
|
75
108
|
var allRadio = displayAllOption ? [{
|
|
76
109
|
key: dateTypeEnum.ALL,
|
|
77
|
-
text: (0, messages_1["default"])(messages,
|
|
110
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'all'),
|
|
78
111
|
value: [startTimeOfAllOption || dateUtils_1["default"].parseDate('2022/09/01'), now.endOf('day')]
|
|
79
112
|
}] : [];
|
|
80
113
|
var defaultRadioList = __spreadArray([{
|
|
81
114
|
key: dateTypeEnum.TODAY,
|
|
82
|
-
text: (0, messages_1["default"])(messages,
|
|
115
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'toDay'),
|
|
83
116
|
value: [now.clone().startOf('day'), now.clone().endOf('day')]
|
|
84
117
|
}, {
|
|
85
118
|
key: dateTypeEnum.YESTERDAY,
|
|
86
|
-
text: (0, messages_1["default"])(messages,
|
|
119
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'yesterDay'),
|
|
87
120
|
value: [now.clone().subtract(1, 'day').startOf('day'), now.clone().subtract(1, 'day').endOf('day')]
|
|
88
121
|
}, {
|
|
89
122
|
key: dateTypeEnum.WEEK,
|
|
90
|
-
text: (0, messages_1["default"])(messages,
|
|
123
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'week'),
|
|
91
124
|
value: [now.clone().startOf('week'), naturalDate ? now.clone().endOf('week') : now.clone().endOf('day')]
|
|
92
125
|
}, {
|
|
93
126
|
key: dateTypeEnum.LAST_WEEK,
|
|
94
|
-
text: (0, messages_1["default"])(messages,
|
|
127
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'lastWeek'),
|
|
95
128
|
value: [now.clone().subtract(1, 'week').startOf('week'), now.clone().subtract(1, 'week').endOf('week')]
|
|
96
129
|
}, {
|
|
97
130
|
key: dateTypeEnum.MONTH,
|
|
98
|
-
text: (0, messages_1["default"])(messages,
|
|
131
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'month'),
|
|
99
132
|
value: [now.clone().startOf('month'), naturalDate ? now.clone().endOf('month') : now.clone().endOf('day')]
|
|
100
133
|
}, {
|
|
101
134
|
key: dateTypeEnum.LAST_MONTH,
|
|
102
|
-
text: (0, messages_1["default"])(messages,
|
|
135
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'lastMonth'),
|
|
103
136
|
value: [now.clone().subtract(1, 'month').startOf('month'), now.clone().subtract(1, 'month').endOf('month')]
|
|
104
137
|
}, {
|
|
105
138
|
key: dateTypeEnum.QUARTER,
|
|
106
|
-
text: (0, messages_1["default"])(messages,
|
|
139
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'quarter'),
|
|
107
140
|
value: [now.clone().startOf('quarter'), naturalDate ? now.clone().endOf('quarter') : now.clone().endOf('day')]
|
|
108
141
|
}, {
|
|
109
142
|
key: dateTypeEnum.LAST_QUARTER,
|
|
110
|
-
text: (0, messages_1["default"])(messages,
|
|
143
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'lastQuarter'),
|
|
111
144
|
value: [now.clone().subtract(1, 'quarter').startOf('quarter'), now.clone().subtract(1, 'quarter').endOf('quarter')]
|
|
112
145
|
}, {
|
|
113
146
|
key: dateTypeEnum.YEAR,
|
|
114
|
-
text: (0, messages_1["default"])(messages,
|
|
147
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'year'),
|
|
115
148
|
value: [now.clone().startOf('year'), naturalDate ? now.clone().endOf('year') : now.endOf('day')]
|
|
116
149
|
}, {
|
|
117
150
|
key: dateTypeEnum.BEFORE_7_DAY,
|
|
118
|
-
text: (0, messages_1["default"])(messages,
|
|
151
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'last7days'),
|
|
119
152
|
value: [now.clone().subtract(6, 'day').startOf('day'), now.endOf('day')]
|
|
120
153
|
}, {
|
|
121
154
|
key: dateTypeEnum.BEFORE_14_DAY,
|
|
122
|
-
text: (0, messages_1["default"])(messages,
|
|
155
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'last14days'),
|
|
123
156
|
value: [now.clone().subtract(13, 'day').startOf('day'), now.endOf('day')]
|
|
124
157
|
}, {
|
|
125
158
|
key: dateTypeEnum.BEFORE_30_DAY,
|
|
126
|
-
text: (0, messages_1["default"])(messages,
|
|
159
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'last30days'),
|
|
127
160
|
value: [now.clone().subtract(29, 'day').startOf('day'), now.endOf('day')]
|
|
128
161
|
}, {
|
|
129
162
|
key: dateTypeEnum.BEFORE_90_DAY,
|
|
130
|
-
text: (0, messages_1["default"])(messages,
|
|
163
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'last90days'),
|
|
131
164
|
value: [now.clone().subtract(89, 'day').startOf('day'), now.endOf('day')]
|
|
132
165
|
}, {
|
|
133
166
|
key: dateTypeEnum.BEFORE_180_DAY,
|
|
134
|
-
text: (0, messages_1["default"])(messages,
|
|
167
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'last180days'),
|
|
135
168
|
value: [now.clone().subtract(179, 'day').startOf('day'), now.endOf('day')]
|
|
136
169
|
}, {
|
|
137
170
|
key: dateTypeEnum.BEFORE_365_DAY,
|
|
138
|
-
text: (0, messages_1["default"])(messages,
|
|
171
|
+
text: (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'last365days'),
|
|
139
172
|
value: [now.clone().subtract(364, 'day').startOf('day'), now.endOf('day')]
|
|
140
173
|
}], __read(allRadio), false);
|
|
141
174
|
return defaultRadioList;
|
|
@@ -96,7 +96,7 @@ var omit_1 = __importDefault(require("lodash/omit"));
|
|
|
96
96
|
var defaultRadioList_1 = __importDefault(require("./defaultRadioList"));
|
|
97
97
|
var label_range_picker_1 = __importDefault(require("../label-range-picker"));
|
|
98
98
|
var context_1 = __importDefault(require("../config-provider/context"));
|
|
99
|
-
var messages_1 =
|
|
99
|
+
var messages_1 = __importStar(require("../messages"));
|
|
100
100
|
var utils_1 = require("./utils");
|
|
101
101
|
var RangePicker = date_picker_1["default"].RangePicker;
|
|
102
102
|
var LabelCustomizeRangePicker = function LabelCustomizeRangePicker(props) {
|
|
@@ -261,7 +261,7 @@ var LabelCustomizeRangePicker = function LabelCustomizeRangePicker(props) {
|
|
|
261
261
|
onChange: onDiyTimeChange
|
|
262
262
|
}), react_1["default"].createElement("span", {
|
|
263
263
|
className: "customize-select-text"
|
|
264
|
-
}, (0, messages_1["default"])(messages,
|
|
264
|
+
}, (0, messages_1["default"])(messages, messages_1.langTypeEnum.labelCustomizeRangePicker, 'customTime')))), isVisiblePanel ? react_1["default"].createElement("div", {
|
|
265
265
|
className: "panel"
|
|
266
266
|
}, panel) : react_1["default"].createElement("div", {
|
|
267
267
|
className: "pick-box"
|
package/lib/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/lib/messages/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.langTypeEnum = void 0;
|
|
7
|
+
var langTypeEnum;
|
|
8
|
+
(function (langTypeEnum) {
|
|
9
|
+
langTypeEnum["labelCustomizeRangePicker"] = "labelCustomizeRangePicker";
|
|
10
|
+
langTypeEnum["global"] = "global";
|
|
11
|
+
})(langTypeEnum = exports.langTypeEnum || (exports.langTypeEnum = {}));
|
|
6
12
|
function formatMessage(message, displayName, key) {
|
|
7
13
|
return message[displayName][key];
|
|
8
14
|
}
|
|
@@ -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
|
@@ -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;
|