@kdcloudjs/kdesign 1.7.69 → 1.7.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +112 -53
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +12 -12
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/hooks.js +1 -1
- package/es/base-data/base-data.js +11 -5
- package/es/carousel/carousel.js +1 -1
- package/es/cascader/cascader.js +8 -3
- package/es/city-picker/city-picker.js +2 -1
- package/es/collapse/collapse.js +1 -1
- package/es/config-provider/compDefaultProps.d.ts +0 -4
- package/es/config-provider/compDefaultProps.js +1 -5
- package/es/image/preview.js +6 -2
- package/es/image-cropper/image-cropper.js +4 -2
- package/es/input-number/inputNumber.js +1 -1
- package/es/locale/locale.d.ts +22 -1
- package/es/locale/locale.js +1 -1
- package/es/locale/zh-CN.d.ts +19 -0
- package/es/locale/zh-CN.js +21 -2
- package/es/notification/content.js +6 -2
- package/es/notification/index.js +1 -3
- package/es/qr-code/qr-code.js +7 -3
- package/es/search/search-panel.js +11 -5
- package/es/select/select.js +7 -3
- package/es/split-panel/split-panel.js +1 -1
- package/es/stepper/stepper.js +1 -1
- package/es/tree-select/tree-select.js +9 -4
- package/es/upload/upload.js +11 -6
- package/lib/_utils/hooks.js +1 -1
- package/lib/base-data/base-data.js +11 -5
- package/lib/carousel/carousel.js +1 -1
- package/lib/cascader/cascader.js +8 -3
- package/lib/city-picker/city-picker.js +2 -1
- package/lib/collapse/collapse.js +1 -1
- package/lib/config-provider/compDefaultProps.d.ts +0 -4
- package/lib/config-provider/compDefaultProps.js +1 -5
- package/lib/image/preview.js +6 -2
- package/lib/image-cropper/image-cropper.js +4 -2
- package/lib/input-number/inputNumber.js +1 -1
- package/lib/locale/locale.d.ts +22 -1
- package/lib/locale/locale.js +1 -1
- package/lib/locale/zh-CN.d.ts +19 -0
- package/lib/locale/zh-CN.js +21 -2
- package/lib/notification/content.js +6 -2
- package/lib/notification/index.js +1 -3
- package/lib/qr-code/qr-code.js +7 -3
- package/lib/search/search-panel.js +11 -5
- package/lib/select/select.js +7 -3
- package/lib/split-panel/split-panel.js +1 -1
- package/lib/stepper/stepper.js +1 -1
- package/lib/tree-select/tree-select.js +9 -4
- package/lib/upload/upload.js +11 -6
- package/package.json +1 -1
package/es/_utils/hooks.js
CHANGED
|
@@ -177,7 +177,7 @@ export function useResizeObserver(element, handler) {
|
|
|
177
177
|
element = element();
|
|
178
178
|
}
|
|
179
179
|
if (!element) {
|
|
180
|
-
devWarning(!element && element !== null, 'useResizeMeasure', 'useResizeMeasure
|
|
180
|
+
devWarning(!element && element !== null, 'useResizeMeasure', 'Specified element for useResizeMeasure does not exist');
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
var measure = function measure(entries) {
|
|
@@ -22,8 +22,11 @@ var InternalBaseData = function InternalBaseData(props, ref) {
|
|
|
22
22
|
getPrefixCls = _useContext.getPrefixCls,
|
|
23
23
|
prefixCls = _useContext.prefixCls,
|
|
24
24
|
userDefaultProps = _useContext.compDefaultProps,
|
|
25
|
-
|
|
25
|
+
locale = _useContext.locale;
|
|
26
26
|
var advancedSelectortProps = getCompProps('BaseData', userDefaultProps, props);
|
|
27
|
+
var baseDataLangMsg = locale.getCompLangMsg({
|
|
28
|
+
componentName: 'BaseData'
|
|
29
|
+
});
|
|
27
30
|
var customPrefixcls = advancedSelectortProps.prefixCls,
|
|
28
31
|
className = advancedSelectortProps.className,
|
|
29
32
|
mode = advancedSelectortProps.mode,
|
|
@@ -31,7 +34,7 @@ var InternalBaseData = function InternalBaseData(props, ref) {
|
|
|
31
34
|
_advancedSelectortPro = advancedSelectortProps.delimiter,
|
|
32
35
|
delimiter = _advancedSelectortPro === void 0 ? ',' : _advancedSelectortPro,
|
|
33
36
|
_advancedSelectortPro2 = advancedSelectortProps.placeholder,
|
|
34
|
-
placeholder = _advancedSelectortPro2 === void 0 ? getLangMsg('global', 'selectholder') : _advancedSelectortPro2,
|
|
37
|
+
placeholder = _advancedSelectortPro2 === void 0 ? locale.getLangMsg('global', 'selectholder') : _advancedSelectortPro2,
|
|
35
38
|
showDetailIcon = advancedSelectortProps.showDetailIcon,
|
|
36
39
|
showFrequent = advancedSelectortProps.showFrequent,
|
|
37
40
|
showCollectIcon = advancedSelectortProps.showCollectIcon,
|
|
@@ -451,6 +454,9 @@ var InternalBaseData = function InternalBaseData(props, ref) {
|
|
|
451
454
|
}, [onCollect]);
|
|
452
455
|
var isShowDetailBtn = showDetailIcon && !isMultiple && !isFocused;
|
|
453
456
|
var renderAdvancedSelector = function renderAdvancedSelector() {
|
|
457
|
+
var totalText = locale.getLangMsg('BaseData', 'total', {
|
|
458
|
+
total: seletedOptions.length
|
|
459
|
+
});
|
|
454
460
|
return /*#__PURE__*/React.createElement("div", {
|
|
455
461
|
className: advancedSelectorCls,
|
|
456
462
|
ref: advancedSelectorRef,
|
|
@@ -468,7 +474,7 @@ var InternalBaseData = function InternalBaseData(props, ref) {
|
|
|
468
474
|
}), showTotal && !isFocused && isMultiple && /*#__PURE__*/React.createElement("span", {
|
|
469
475
|
className: "".concat(advancedSelectorfixCls, "-total"),
|
|
470
476
|
onClick: showInputTotal
|
|
471
|
-
},
|
|
477
|
+
}, totalText), isShowDetailBtn && !disabled && /*#__PURE__*/React.createElement("span", {
|
|
472
478
|
className: "".concat(advancedSelectorfixCls, "-detail"),
|
|
473
479
|
onClick: handleShowDetail
|
|
474
480
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -639,10 +645,10 @@ var InternalBaseData = function InternalBaseData(props, ref) {
|
|
|
639
645
|
defaultActiveKey: "history"
|
|
640
646
|
}, /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
641
647
|
key: "history",
|
|
642
|
-
tab:
|
|
648
|
+
tab: baseDataLangMsg.history
|
|
643
649
|
}, renderDropdownContent(historyList, columns)), /*#__PURE__*/React.createElement(Tabs.TabPane, {
|
|
644
650
|
key: "collect",
|
|
645
|
-
tab:
|
|
651
|
+
tab: baseDataLangMsg.favorites
|
|
646
652
|
}, renderDropdownContent(collectList, columns)));
|
|
647
653
|
};
|
|
648
654
|
var renderNotContent = useCallback(function () {
|
package/es/carousel/carousel.js
CHANGED
|
@@ -104,7 +104,7 @@ var InternalCarousel = function InternalCarousel(props, ref) {
|
|
|
104
104
|
var element = carouselRef.current;
|
|
105
105
|
var handler = reSize;
|
|
106
106
|
if (!element) {
|
|
107
|
-
devWarning(!element && element !== null, 'useResizeMeasure', 'useResizeMeasure
|
|
107
|
+
devWarning(!element && element !== null, 'useResizeMeasure', 'Specified element for useResizeMeasure does not exist');
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
var measure = function measure(entries) {
|
package/es/cascader/cascader.js
CHANGED
|
@@ -56,7 +56,8 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
56
56
|
var _React$useContext = React.useContext(ConfigContext),
|
|
57
57
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
58
58
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
59
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
59
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
60
|
+
locale = _React$useContext.locale;
|
|
60
61
|
// 属性需要合并一遍用户定义的默认属性
|
|
61
62
|
var allProps = getCompProps('Cascader', userDefaultProps, props);
|
|
62
63
|
var mode = allProps.mode,
|
|
@@ -69,7 +70,8 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
69
70
|
clearIcon = allProps.clearIcon,
|
|
70
71
|
className = allProps.className,
|
|
71
72
|
fieldNames = allProps.fieldNames,
|
|
72
|
-
placeholder = allProps.placeholder,
|
|
73
|
+
_allProps$placeholder = allProps.placeholder,
|
|
74
|
+
placeholder = _allProps$placeholder === void 0 ? locale.getLangMsg('global', 'selectholder') : _allProps$placeholder,
|
|
73
75
|
defaultValue = allProps.defaultValue,
|
|
74
76
|
maxTagPlaceholder = allProps.maxTagPlaceholder,
|
|
75
77
|
displayRender = allProps.displayRender,
|
|
@@ -307,6 +309,9 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
307
309
|
margin: '2px 8px 2px 0',
|
|
308
310
|
maxWidth: '100%'
|
|
309
311
|
};
|
|
312
|
+
var totalText = locale.getLangMsg('Cascader', 'total', {
|
|
313
|
+
total: currentOptions.length
|
|
314
|
+
});
|
|
310
315
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
311
316
|
className: multipleCls,
|
|
312
317
|
ref: mergeRef,
|
|
@@ -333,7 +338,7 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
333
338
|
className: itemCls
|
|
334
339
|
}, /*#__PURE__*/React.createElement("span", {
|
|
335
340
|
className: "".concat(prefixCls, "-tag-describe-content")
|
|
336
|
-
},
|
|
341
|
+
}, totalText)) : null) : null, /*#__PURE__*/React.createElement("span", {
|
|
337
342
|
className: "".concat(prefixCls, "-placeholder")
|
|
338
343
|
}, !currentOptions.length ? placeholder : null)), /*#__PURE__*/React.createElement("span", {
|
|
339
344
|
ref: suffixRef,
|
|
@@ -59,7 +59,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
59
59
|
clearIcon = selectProps.clearIcon,
|
|
60
60
|
loading = selectProps.loading,
|
|
61
61
|
showDescription = selectProps.showDescription,
|
|
62
|
-
|
|
62
|
+
_selectProps$descript = selectProps.description,
|
|
63
|
+
description = _selectProps$descript === void 0 ? cityPickerLangMsg.title : _selectProps$descript,
|
|
63
64
|
optionHighlightProps = selectProps.optionHighlightProps,
|
|
64
65
|
_selectProps$popperSt = selectProps.popperStyle,
|
|
65
66
|
popperStyle = _selectProps$popperSt === void 0 ? {} : _selectProps$popperSt,
|
package/es/collapse/collapse.js
CHANGED
|
@@ -85,7 +85,7 @@ var InternalCollapse = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
85
85
|
return _mapInstanceProperty(_context2 = React.Children).call(_context2, children, function (item) {
|
|
86
86
|
var _a;
|
|
87
87
|
if (((_a = item === null || item === void 0 ? void 0 : item.type) === null || _a === void 0 ? void 0 : _a.displayName) !== 'Panel') {
|
|
88
|
-
devwarning(true, 'Collapse', 'children
|
|
88
|
+
devwarning(true, 'Collapse', 'children must be Collapse.Panel');
|
|
89
89
|
return item;
|
|
90
90
|
}
|
|
91
91
|
return /*#__PURE__*/React.cloneElement(item, _extends({
|
|
@@ -162,7 +162,6 @@ declare const compDefaultProps: {
|
|
|
162
162
|
mode: string;
|
|
163
163
|
defaultOpen: boolean;
|
|
164
164
|
showArrow: boolean;
|
|
165
|
-
placeholder: string;
|
|
166
165
|
filterOption: boolean;
|
|
167
166
|
optionLabelProp: string;
|
|
168
167
|
optionFilterProp: string;
|
|
@@ -400,7 +399,6 @@ declare const compDefaultProps: {
|
|
|
400
399
|
dragMode: string;
|
|
401
400
|
viewMode: number;
|
|
402
401
|
aspectRatio: number;
|
|
403
|
-
okText: string;
|
|
404
402
|
autoCropArea: number;
|
|
405
403
|
};
|
|
406
404
|
Anchor: {
|
|
@@ -451,7 +449,6 @@ declare const compDefaultProps: {
|
|
|
451
449
|
mode: string;
|
|
452
450
|
defaultOpen: boolean;
|
|
453
451
|
showArrow: boolean;
|
|
454
|
-
placeholder: string;
|
|
455
452
|
optionLabelProp: string;
|
|
456
453
|
treeNodeFilterProp: string;
|
|
457
454
|
treeExpandOnClickNode: boolean;
|
|
@@ -470,7 +467,6 @@ declare const compDefaultProps: {
|
|
|
470
467
|
defaultOpen: boolean;
|
|
471
468
|
showArrow: boolean;
|
|
472
469
|
placeholder: string;
|
|
473
|
-
description: string;
|
|
474
470
|
showDescription: boolean;
|
|
475
471
|
optionHighlightProps: string;
|
|
476
472
|
allowClear: boolean;
|
|
@@ -74,7 +74,7 @@ var compDefaultProps = {
|
|
|
74
74
|
defaultOpen: false,
|
|
75
75
|
functionalColorName: '#themeColor',
|
|
76
76
|
switchName: {
|
|
77
|
-
name: '
|
|
77
|
+
name: '',
|
|
78
78
|
internationalName: 'followFunctionalColor'
|
|
79
79
|
},
|
|
80
80
|
placeholder: '#',
|
|
@@ -167,7 +167,6 @@ var compDefaultProps = {
|
|
|
167
167
|
mode: 'single',
|
|
168
168
|
defaultOpen: false,
|
|
169
169
|
showArrow: true,
|
|
170
|
-
placeholder: '请输入需要搜索的内容',
|
|
171
170
|
filterOption: true,
|
|
172
171
|
optionLabelProp: 'children',
|
|
173
172
|
optionFilterProp: 'label'
|
|
@@ -414,7 +413,6 @@ var compDefaultProps = {
|
|
|
414
413
|
dragMode: 'crop',
|
|
415
414
|
viewMode: 0,
|
|
416
415
|
aspectRatio: NaN,
|
|
417
|
-
okText: '确认裁剪',
|
|
418
416
|
autoCropArea: 0.5
|
|
419
417
|
},
|
|
420
418
|
Anchor: {
|
|
@@ -465,7 +463,6 @@ var compDefaultProps = {
|
|
|
465
463
|
mode: 'single',
|
|
466
464
|
defaultOpen: false,
|
|
467
465
|
showArrow: true,
|
|
468
|
-
placeholder: '请输入需要搜索的内容',
|
|
469
466
|
optionLabelProp: 'title',
|
|
470
467
|
treeNodeFilterProp: 'title',
|
|
471
468
|
treeExpandOnClickNode: true,
|
|
@@ -488,7 +485,6 @@ var compDefaultProps = {
|
|
|
488
485
|
defaultOpen: false,
|
|
489
486
|
showArrow: true,
|
|
490
487
|
placeholder: '',
|
|
491
|
-
description: '城市',
|
|
492
488
|
showDescription: true,
|
|
493
489
|
optionHighlightProps: 'highlightText',
|
|
494
490
|
allowClear: true
|
package/es/image/preview.js
CHANGED
|
@@ -16,9 +16,13 @@ var Preview = function Preview(props) {
|
|
|
16
16
|
var _React$useContext = React.useContext(ConfigContext),
|
|
17
17
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
18
18
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
19
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
19
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
20
|
+
locale = _React$useContext.locale;
|
|
20
21
|
// 属性需要合并一遍用户定义的默认属性
|
|
21
22
|
var allProps = getCompProps('Image', userDefaultProps, props);
|
|
23
|
+
var imageLangMsg = locale.getCompLangMsg({
|
|
24
|
+
componentName: 'Image'
|
|
25
|
+
});
|
|
22
26
|
var src = allProps.src,
|
|
23
27
|
alt = allProps.alt,
|
|
24
28
|
name = allProps.name,
|
|
@@ -185,7 +189,7 @@ var Preview = function Preview(props) {
|
|
|
185
189
|
onClick: onClose
|
|
186
190
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
187
191
|
type: "close-solid"
|
|
188
|
-
}),
|
|
192
|
+
}), imageLangMsg.close))));
|
|
189
193
|
return /*#__PURE__*/ReactDOM.createPortal(peviewContainer, document.body);
|
|
190
194
|
};
|
|
191
195
|
export default Preview;
|
|
@@ -55,7 +55,8 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
55
55
|
var _React$useContext = React.useContext(ConfigContext),
|
|
56
56
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
57
57
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
58
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
58
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
59
|
+
locale = _React$useContext.locale;
|
|
59
60
|
var _a = getCompProps('ImageCropper', userDefaultProps, props),
|
|
60
61
|
customPrefixcls = _a.prefixCls,
|
|
61
62
|
containerWidth = _a.containerWidth,
|
|
@@ -69,7 +70,8 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
69
70
|
viewMode = _a.viewMode,
|
|
70
71
|
aspectRatio = _a.aspectRatio,
|
|
71
72
|
modal = _a.modal,
|
|
72
|
-
okText = _a.okText,
|
|
73
|
+
_a$okText = _a.okText,
|
|
74
|
+
okText = _a$okText === void 0 ? locale.getLangMsg('ImageCropper', 'okText') : _a$okText,
|
|
73
75
|
okBtn = _a.okBtn,
|
|
74
76
|
_a$image = _a.image,
|
|
75
77
|
image = _a$image === void 0 ? '' : _a$image,
|
|
@@ -196,7 +196,7 @@ var InternalInputNumber = function InternalInputNumber(props, ref) {
|
|
|
196
196
|
var _a, _b;
|
|
197
197
|
var step = stepOption.step === undefined ? 1 : parseFloat(stepOption.step);
|
|
198
198
|
if (typeof step !== 'number') {
|
|
199
|
-
devWarning(true, 'inputNumber', "stepOption.step
|
|
199
|
+
devWarning(true, 'inputNumber', "stepOption.step must be a number.");
|
|
200
200
|
return false;
|
|
201
201
|
}
|
|
202
202
|
var startingNumber = parseFloat((_b = (_a = inputNumberRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value) || 0;
|
package/es/locale/locale.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare class LocaleCache {
|
|
|
29
29
|
'global.placeholder': string;
|
|
30
30
|
'global.cancel': string;
|
|
31
31
|
'global.confirm': string;
|
|
32
|
+
'global.emptyText': string;
|
|
32
33
|
'Button.text': string;
|
|
33
34
|
'Progress.circleLoadingDesc': string;
|
|
34
35
|
'Progress.loading': string;
|
|
@@ -61,16 +62,21 @@ declare class LocaleCache {
|
|
|
61
62
|
'QuickSearch.emptyTip': string;
|
|
62
63
|
'QuickSearch.or': string;
|
|
63
64
|
'CityPicker.domestic': string;
|
|
64
|
-
'CityPicker.common': string;
|
|
65
|
+
'CityPicker.common': string; /**
|
|
66
|
+
* 获取当前语言类型
|
|
67
|
+
*/
|
|
65
68
|
'CityPicker.emptyText': string;
|
|
66
69
|
'CityPicker.commonEmptyText': string;
|
|
67
70
|
'CityPicker.tabsDomestic': string;
|
|
68
71
|
'CityPicker.tabsInternation': string;
|
|
72
|
+
'CityPicker.title': string;
|
|
69
73
|
'ColorPicker.followFunctionalColor': string;
|
|
70
74
|
'Search.placeholder': string;
|
|
71
75
|
'Search.desc': string[];
|
|
72
76
|
'Search.nplDesc': string;
|
|
73
77
|
'Search.emptyTip': string;
|
|
78
|
+
'Search.viewMoreResult': string;
|
|
79
|
+
'Search.range': string;
|
|
74
80
|
'Search.or': string;
|
|
75
81
|
'Filter.filterCondition': string;
|
|
76
82
|
'Filter.commonCondition': string;
|
|
@@ -100,11 +106,26 @@ declare class LocaleCache {
|
|
|
100
106
|
'Table.confirmFilter': string;
|
|
101
107
|
'Select.selectAll': string;
|
|
102
108
|
'Select.seleted': string;
|
|
109
|
+
'Select.total': string;
|
|
103
110
|
'Signature.clickToSign': string;
|
|
104
111
|
'Signature.pleaseWriteHere': string;
|
|
105
112
|
'Signature.okText': string;
|
|
106
113
|
'Signature.cancelText': string;
|
|
107
114
|
'Signature.handwrittenSignature': string;
|
|
115
|
+
'QRCode.qrCodeExpired': string;
|
|
116
|
+
'QRCode.clickRefresh': string;
|
|
117
|
+
'Cascader.total': string;
|
|
118
|
+
'BaseData.total': string;
|
|
119
|
+
'BaseData.history': string;
|
|
120
|
+
'BaseData.favorites': string;
|
|
121
|
+
'Image.close': string;
|
|
122
|
+
'Upload.reUpload': string;
|
|
123
|
+
'Upload.uploading': string;
|
|
124
|
+
'Upload.fail': string;
|
|
125
|
+
'Upload.delete': string;
|
|
126
|
+
'Notification.title': string;
|
|
127
|
+
'TreeSelect.total': string;
|
|
128
|
+
'ImageCropper.okText': string;
|
|
108
129
|
'DatePicker.placeholder': string;
|
|
109
130
|
'DatePicker.yearPlaceholder': string;
|
|
110
131
|
'DatePicker.quarterPlaceholder': string;
|
package/es/locale/locale.js
CHANGED
|
@@ -28,7 +28,7 @@ var LocaleCache = /*#__PURE__*/function () {
|
|
|
28
28
|
key: "setLocalesData",
|
|
29
29
|
value: function setLocalesData(locale, localeData) {
|
|
30
30
|
if (!(localeData || this.localesData[locale])) {
|
|
31
|
-
console.error("
|
|
31
|
+
console.error("Missing language pack for ".concat(locale, ". Please check and reconfigure."));
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
var newLocaleData = _extends(_extends({}, zhCNData), localeData);
|
package/es/locale/zh-CN.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ declare const locale: {
|
|
|
3
3
|
'global.placeholder': string;
|
|
4
4
|
'global.cancel': string;
|
|
5
5
|
'global.confirm': string;
|
|
6
|
+
'global.emptyText': string;
|
|
6
7
|
'Button.text': string;
|
|
7
8
|
'Progress.circleLoadingDesc': string;
|
|
8
9
|
'Progress.loading': string;
|
|
@@ -40,11 +41,14 @@ declare const locale: {
|
|
|
40
41
|
'CityPicker.commonEmptyText': string;
|
|
41
42
|
'CityPicker.tabsDomestic': string;
|
|
42
43
|
'CityPicker.tabsInternation': string;
|
|
44
|
+
'CityPicker.title': string;
|
|
43
45
|
'ColorPicker.followFunctionalColor': string;
|
|
44
46
|
'Search.placeholder': string;
|
|
45
47
|
'Search.desc': string[];
|
|
46
48
|
'Search.nplDesc': string;
|
|
47
49
|
'Search.emptyTip': string;
|
|
50
|
+
'Search.viewMoreResult': string;
|
|
51
|
+
'Search.range': string;
|
|
48
52
|
'Search.or': string;
|
|
49
53
|
'Filter.filterCondition': string;
|
|
50
54
|
'Filter.commonCondition': string;
|
|
@@ -74,11 +78,26 @@ declare const locale: {
|
|
|
74
78
|
'Table.confirmFilter': string;
|
|
75
79
|
'Select.selectAll': string;
|
|
76
80
|
'Select.seleted': string;
|
|
81
|
+
'Select.total': string;
|
|
77
82
|
'Signature.clickToSign': string;
|
|
78
83
|
'Signature.pleaseWriteHere': string;
|
|
79
84
|
'Signature.okText': string;
|
|
80
85
|
'Signature.cancelText': string;
|
|
81
86
|
'Signature.handwrittenSignature': string;
|
|
87
|
+
'QRCode.qrCodeExpired': string;
|
|
88
|
+
'QRCode.clickRefresh': string;
|
|
89
|
+
'Cascader.total': string;
|
|
90
|
+
'BaseData.total': string;
|
|
91
|
+
'BaseData.history': string;
|
|
92
|
+
'BaseData.favorites': string;
|
|
93
|
+
'Image.close': string;
|
|
94
|
+
'Upload.reUpload': string;
|
|
95
|
+
'Upload.uploading': string;
|
|
96
|
+
'Upload.fail': string;
|
|
97
|
+
'Upload.delete': string;
|
|
98
|
+
'Notification.title': string;
|
|
99
|
+
'TreeSelect.total': string;
|
|
100
|
+
'ImageCropper.okText': string;
|
|
82
101
|
'DatePicker.placeholder': string;
|
|
83
102
|
'DatePicker.yearPlaceholder': string;
|
|
84
103
|
'DatePicker.quarterPlaceholder': string;
|
package/es/locale/zh-CN.js
CHANGED
|
@@ -4,9 +4,10 @@ var locale = _extends(_extends({
|
|
|
4
4
|
locale: 'zh-CN'
|
|
5
5
|
}, DatePicker), {
|
|
6
6
|
'global.selectholder': '请选择',
|
|
7
|
-
'global.placeholder': '
|
|
7
|
+
'global.placeholder': '请输入需要搜索的内容',
|
|
8
8
|
'global.cancel': '取消',
|
|
9
9
|
'global.confirm': '确定',
|
|
10
|
+
'global.emptyText': '暂无数据',
|
|
10
11
|
'Button.text': '按钮',
|
|
11
12
|
'Progress.circleLoadingDesc': '正在加载中',
|
|
12
13
|
'Progress.loading': '正在加载中...',
|
|
@@ -44,11 +45,14 @@ var locale = _extends(_extends({
|
|
|
44
45
|
'CityPicker.commonEmptyText': '无常用城市',
|
|
45
46
|
'CityPicker.tabsDomestic': '国内',
|
|
46
47
|
'CityPicker.tabsInternation': '国际/中国港澳台',
|
|
48
|
+
'CityPicker.title': '城市',
|
|
47
49
|
'ColorPicker.followFunctionalColor': '跟随功能色',
|
|
48
50
|
'Search.placeholder': '请输入需要搜索的内容',
|
|
49
51
|
'Search.desc': ['空格代表"或",回车代表"且"'],
|
|
50
52
|
'Search.nplDesc': '智能搜索',
|
|
51
53
|
'Search.emptyTip': '暂无数据',
|
|
54
|
+
'Search.viewMoreResult': '查看更多"{inputValue}"的结果',
|
|
55
|
+
'Search.range': '范围',
|
|
52
56
|
'Search.or': '或',
|
|
53
57
|
'Filter.filterCondition': '筛选条件',
|
|
54
58
|
'Filter.commonCondition': '常用条件',
|
|
@@ -78,10 +82,25 @@ var locale = _extends(_extends({
|
|
|
78
82
|
'Table.confirmFilter': '确定',
|
|
79
83
|
'Select.selectAll': '全选',
|
|
80
84
|
'Select.seleted': '已选{size}项',
|
|
85
|
+
'Select.total': '共{total}项',
|
|
81
86
|
'Signature.clickToSign': '点击签名',
|
|
82
87
|
'Signature.pleaseWriteHere': '请在此处横向书写签名',
|
|
83
88
|
'Signature.okText': '确定',
|
|
84
89
|
'Signature.cancelText': '取消',
|
|
85
|
-
'Signature.handwrittenSignature': '手写签名'
|
|
90
|
+
'Signature.handwrittenSignature': '手写签名',
|
|
91
|
+
'QRCode.qrCodeExpired': '二维码过期',
|
|
92
|
+
'QRCode.clickRefresh': '点击刷新',
|
|
93
|
+
'Cascader.total': '共{total}项',
|
|
94
|
+
'BaseData.total': '共{total}项',
|
|
95
|
+
'BaseData.history': '历史记录',
|
|
96
|
+
'BaseData.favorites': '我的收藏',
|
|
97
|
+
'Image.close': '关闭',
|
|
98
|
+
'Upload.reUpload': '重新上传',
|
|
99
|
+
'Upload.uploading': '文件上传中ing',
|
|
100
|
+
'Upload.fail': '上传失败',
|
|
101
|
+
'Upload.delete': '删除',
|
|
102
|
+
'Notification.title': '系统提示',
|
|
103
|
+
'TreeSelect.total': '共{total}项',
|
|
104
|
+
'ImageCropper.okText': '确认裁剪'
|
|
86
105
|
});
|
|
87
106
|
export default locale;
|
|
@@ -18,7 +18,11 @@ var Content = function Content(args) {
|
|
|
18
18
|
icon = args.icon,
|
|
19
19
|
closeNode = args.closeNode;
|
|
20
20
|
var _useContext = useContext(ConfigContext),
|
|
21
|
-
prefixCls = _useContext.prefixCls
|
|
21
|
+
prefixCls = _useContext.prefixCls,
|
|
22
|
+
locale = _useContext.locale;
|
|
23
|
+
var notificationLangMsg = locale.getCompLangMsg({
|
|
24
|
+
componentName: 'Notification'
|
|
25
|
+
});
|
|
22
26
|
var classPrefix = _concatInstanceProperty(_context = "".concat(prefixCls, "-")).call(_context, suffixCls, "-content");
|
|
23
27
|
var iconMap = {
|
|
24
28
|
info: /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -65,7 +69,7 @@ var Content = function Content(args) {
|
|
|
65
69
|
className: classNames("".concat(classPrefix, "-title-left"))
|
|
66
70
|
}, renderIcon(), /*#__PURE__*/React.createElement("div", {
|
|
67
71
|
className: classNames("".concat(classPrefix, "-title-left-text"))
|
|
68
|
-
}, title)), renderCloseIcon());
|
|
72
|
+
}, typeof title === 'undefined' ? notificationLangMsg.title : title)), renderCloseIcon());
|
|
69
73
|
};
|
|
70
74
|
var getFooterElement = function getFooterElement() {
|
|
71
75
|
if ( /*#__PURE__*/React.isValidElement(footer)) {
|
package/es/notification/index.js
CHANGED
|
@@ -10,7 +10,6 @@ var defaultClosable = true;
|
|
|
10
10
|
var defaultShowIcon = false;
|
|
11
11
|
var defaultSuffixCls = 'notice';
|
|
12
12
|
var defaultType = 'primary';
|
|
13
|
-
var defaultTitle = '系统提示'; // 'notice'
|
|
14
13
|
var notificationElements = {};
|
|
15
14
|
var notificationKey = 1;
|
|
16
15
|
var getNotificationProps = function getNotificationProps(args) {
|
|
@@ -27,8 +26,7 @@ var getNotificationProps = function getNotificationProps(args) {
|
|
|
27
26
|
onClose = args.onClose,
|
|
28
27
|
_args$closable = args.closable,
|
|
29
28
|
closable = _args$closable === void 0 ? defaultClosable : _args$closable,
|
|
30
|
-
|
|
31
|
-
title = _args$title === void 0 ? defaultTitle : _args$title,
|
|
29
|
+
title = args.title,
|
|
32
30
|
footer = args.footer,
|
|
33
31
|
content = args.content,
|
|
34
32
|
icon = args.icon,
|
package/es/qr-code/qr-code.js
CHANGED
|
@@ -17,7 +17,8 @@ var QRCode = function QRCode(props) {
|
|
|
17
17
|
var _useContext = useContext(ConfigContext),
|
|
18
18
|
getPrefixCls = _useContext.getPrefixCls,
|
|
19
19
|
prefixCls = _useContext.prefixCls,
|
|
20
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
20
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
21
|
+
getCompLangMsg = _useContext.locale.getCompLangMsg;
|
|
21
22
|
var qrCodeProps = getCompProps('QRCode', userDefaultProps, props);
|
|
22
23
|
var value = qrCodeProps.value,
|
|
23
24
|
size = qrCodeProps.size,
|
|
@@ -37,6 +38,9 @@ var QRCode = function QRCode(props) {
|
|
|
37
38
|
customPrefixcls = qrCodeProps.prefixCls;
|
|
38
39
|
var qrCodePrefixCls = getPrefixCls(prefixCls, 'qrcode', customPrefixcls);
|
|
39
40
|
var qrCodeClass = classNames(qrCodePrefixCls, className, _defineProperty({}, "".concat(qrCodePrefixCls, "-borderless"), !bordered));
|
|
41
|
+
var qrCodeLangMsg = getCompLangMsg({
|
|
42
|
+
componentName: 'QRCode'
|
|
43
|
+
});
|
|
40
44
|
var gap = 8;
|
|
41
45
|
var containerSize = size + gap * 2 + 2;
|
|
42
46
|
devWarning(!value === false, 'QRCode', 'need to receive `value` props');
|
|
@@ -67,14 +71,14 @@ var QRCode = function QRCode(props) {
|
|
|
67
71
|
className: "".concat(qrCodePrefixCls, "-mask")
|
|
68
72
|
}, status === 'loading' && /*#__PURE__*/React.createElement(Spin, null), status === 'expired' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", {
|
|
69
73
|
className: "".concat(qrCodePrefixCls, "-expired")
|
|
70
|
-
},
|
|
74
|
+
}, qrCodeLangMsg.qrCodeExpired), onRefresh && /*#__PURE__*/React.createElement(Button, {
|
|
71
75
|
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
72
76
|
type: "refresh"
|
|
73
77
|
}),
|
|
74
78
|
type: "text",
|
|
75
79
|
onClick: onRefresh,
|
|
76
80
|
size: "middle"
|
|
77
|
-
},
|
|
81
|
+
}, qrCodeLangMsg.clickRefresh))), type === 'canvas' ? /*#__PURE__*/React.createElement(QRCodeCanvas, _extends({}, codeProps)) : /*#__PURE__*/React.createElement(QRCodeSVG, _extends({}, codeProps)));
|
|
78
82
|
};
|
|
79
83
|
QRCode.displayName = 'QRCode';
|
|
80
84
|
export default QRCode;
|
|
@@ -9,12 +9,12 @@ import classNames from 'classnames';
|
|
|
9
9
|
import { Input, Tooltip, Icon, Spin, Image } from '../index';
|
|
10
10
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
11
11
|
var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
12
|
-
var _context4, _context5;
|
|
12
|
+
var _context4, _context5, _context6;
|
|
13
13
|
var thisSearchPanelRef = useRef();
|
|
14
14
|
var searchPanelRef = ref || thisSearchPanelRef;
|
|
15
15
|
var tooltipRef = useRef(null);
|
|
16
16
|
var _useContext = useContext(ConfigContext),
|
|
17
|
-
|
|
17
|
+
locale = _useContext.locale;
|
|
18
18
|
var prefixCls = props.prefixCls,
|
|
19
19
|
className = props.className,
|
|
20
20
|
style = props.style,
|
|
@@ -22,6 +22,9 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
22
22
|
suffix = props.suffix,
|
|
23
23
|
_props$panelSearch = props.panelSearch,
|
|
24
24
|
panelSearch = _props$panelSearch === void 0 ? {} : _props$panelSearch;
|
|
25
|
+
var searchLanMsg = locale.getCompLangMsg({
|
|
26
|
+
componentName: 'Search'
|
|
27
|
+
});
|
|
25
28
|
var panelTypes = panelSearch.panelTypes,
|
|
26
29
|
_panelSearch$panelRes = panelSearch.panelResult,
|
|
27
30
|
panelResult = _panelSearch$panelRes === void 0 ? [] : _panelSearch$panelRes,
|
|
@@ -99,6 +102,9 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
99
102
|
var rightContent = right || '';
|
|
100
103
|
return _concatInstanceProperty(_context2 = "".concat(leftContent)).call(_context2, rightContent);
|
|
101
104
|
}, []);
|
|
105
|
+
var getMoreInputValue = locale.getLangMsg('Search', 'viewMoreResult', {
|
|
106
|
+
inputValue: inputValue
|
|
107
|
+
});
|
|
102
108
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
103
109
|
ref: searchPanelRef,
|
|
104
110
|
className: searchPanelCls,
|
|
@@ -132,7 +138,7 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
132
138
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
133
139
|
type: "arrow-down"
|
|
134
140
|
}))))), /*#__PURE__*/React.createElement(Input, {
|
|
135
|
-
placeholder: placeholder || getLangMsg('Search', 'placeholder'),
|
|
141
|
+
placeholder: placeholder || locale.getLangMsg('Search', 'placeholder'),
|
|
136
142
|
borderType: "none",
|
|
137
143
|
allowClear: true,
|
|
138
144
|
suffix: suffix,
|
|
@@ -215,9 +221,9 @@ var InternalSearchPanel = function InternalSearchPanel(props, ref) {
|
|
|
215
221
|
preview: false
|
|
216
222
|
}) : displayImg), /*#__PURE__*/React.createElement("div", {
|
|
217
223
|
className: "".concat(prefixCls, "-panel-dropDown-summary-title")
|
|
218
|
-
}, result.id === 'search' ?
|
|
224
|
+
}, result.id === 'search' ? getMoreInputValue : result.title), result.id === 'search' ? /*#__PURE__*/React.createElement("div", {
|
|
219
225
|
className: "".concat(prefixCls, "-panel-dropDown-summary-list")
|
|
220
|
-
}, "
|
|
226
|
+
}, _concatInstanceProperty(_context5 = "".concat(searchLanMsg.range, ": ")).call(_context5, type.label)) : _mapInstanceProperty(_context6 = _Object$keys(displayList)).call(_context6, function (item, index) {
|
|
221
227
|
return /*#__PURE__*/React.createElement("div", {
|
|
222
228
|
key: index,
|
|
223
229
|
className: "".concat(prefixCls, "-panel-dropDown-summary-list")
|
package/es/select/select.js
CHANGED
|
@@ -64,7 +64,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
64
64
|
labelInValue = selectProps.labelInValue,
|
|
65
65
|
children = selectProps.children,
|
|
66
66
|
options = selectProps.options,
|
|
67
|
-
|
|
67
|
+
_selectProps$placehol = selectProps.placeholder,
|
|
68
|
+
placeholder = _selectProps$placehol === void 0 ? locale.getLangMsg('global', 'placeholder') : _selectProps$placehol,
|
|
68
69
|
_selectProps$dropdown = selectProps.dropdownStyle,
|
|
69
70
|
dropdownStyle = _selectProps$dropdown === void 0 ? {} : _selectProps$dropdown,
|
|
70
71
|
style = selectProps.style,
|
|
@@ -552,7 +553,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
552
553
|
// 下拉列表为空
|
|
553
554
|
var emptyListCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-dropdown-empty"), true));
|
|
554
555
|
var notFoundContent = selectProps.notFoundContent;
|
|
555
|
-
var emptyContent = notFoundContent || '
|
|
556
|
+
var emptyContent = notFoundContent || locale.getLangMsg('global', 'emptyText');
|
|
556
557
|
return (filledOptions === null || filledOptions === void 0 ? void 0 : filledOptions.length) === 0 && /*#__PURE__*/React.createElement("div", {
|
|
557
558
|
className: emptyListCls
|
|
558
559
|
}, emptyContent);
|
|
@@ -724,6 +725,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
724
725
|
margin: '2px 8px 2px 0',
|
|
725
726
|
maxWidth: '100%'
|
|
726
727
|
};
|
|
728
|
+
var totalText = locale.getLangMsg('Select', 'total', {
|
|
729
|
+
total: mulOptions.length
|
|
730
|
+
});
|
|
727
731
|
return /*#__PURE__*/React.createElement("div", {
|
|
728
732
|
className: multipleCls,
|
|
729
733
|
ref: selectionRef
|
|
@@ -757,7 +761,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
757
761
|
className: itemCls
|
|
758
762
|
}, /*#__PURE__*/React.createElement("span", {
|
|
759
763
|
className: "".concat(selectPrefixCls, "-selection-item-content")
|
|
760
|
-
},
|
|
764
|
+
}, totalText)) : null) : null, /*#__PURE__*/React.createElement("span", {
|
|
761
765
|
className: "".concat(selectPrefixCls, "-selection-search"),
|
|
762
766
|
style: {
|
|
763
767
|
width: inputWidth
|
|
@@ -121,7 +121,7 @@ var SplitPanel = function SplitPanel(props) {
|
|
|
121
121
|
initPanel();
|
|
122
122
|
var element = outerWrapper.current;
|
|
123
123
|
if (!element) {
|
|
124
|
-
devWarning(!element && element !== null, 'useResizeMeasure', 'useResizeMeasure
|
|
124
|
+
devWarning(!element && element !== null, 'useResizeMeasure', 'Specified element for useResizeMeasure does not exist');
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
var resizeObserver = new ResizeObserver(function (entries) {
|
package/es/stepper/stepper.js
CHANGED
|
@@ -34,7 +34,7 @@ var InternalStepper = function InternalStepper(props, ref) {
|
|
|
34
34
|
propsValue = inputNumberProps.value,
|
|
35
35
|
defaultValue = inputNumberProps.defaultValue;
|
|
36
36
|
var inputPrefixCls = getPrefixCls(prefixCls, 'inputNumber', customPrefixcls);
|
|
37
|
-
devWarning(typeof step !== 'number', 'stepper', "step
|
|
37
|
+
devWarning(typeof step !== 'number', 'stepper', "step must be a number");
|
|
38
38
|
var thisInputNumberRef = useRef();
|
|
39
39
|
var stepperrref = useRef();
|
|
40
40
|
var inputNumberRef = ref || thisInputNumberRef;
|