@douyinfe/semi-ui 2.51.0-beta.0 → 2.51.0
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/umd/semi-ui.js +44 -12
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/cascader/index.js +1 -1
- package/lib/cjs/image/interface.d.ts +1 -0
- package/lib/cjs/image/previewFooter.js +4 -2
- package/lib/cjs/image/previewInner.js +2 -1
- package/lib/es/cascader/index.js +1 -1
- package/lib/es/image/interface.d.ts +1 -0
- package/lib/es/image/previewFooter.js +4 -2
- package/lib/es/image/previewInner.js +3 -2
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -48261,7 +48261,7 @@ class Cascader extends BaseComponent {
|
|
|
48261
48261
|
const formatValuePath = [];
|
|
48262
48262
|
normalizedValue.forEach(valueItem => {
|
|
48263
48263
|
const formatItem = onChangeWithObject && isObject_default()(valueItem[0]) ? valueItem.map(i => i === null || i === void 0 ? void 0 : i.value) : valueItem;
|
|
48264
|
-
formatValuePath.push(formatItem);
|
|
48264
|
+
formatItem.length > 0 && formatValuePath.push(formatItem);
|
|
48265
48265
|
});
|
|
48266
48266
|
// formatKeys is used to save key of value
|
|
48267
48267
|
const formatKeys = formatValuePath.map(v => getKeyByValuePath(v));
|
|
@@ -64318,15 +64318,21 @@ class TextAreaFoundation extends foundation {
|
|
|
64318
64318
|
maxLength,
|
|
64319
64319
|
getValueLength
|
|
64320
64320
|
} = this._adapter.getProps();
|
|
64321
|
-
if (isNumber_default()(maxLength) && maxLength >= 0 &&
|
|
64322
|
-
|
|
64323
|
-
|
|
64324
|
-
|
|
64325
|
-
|
|
64326
|
-
|
|
64321
|
+
if (isNumber_default()(maxLength) && maxLength >= 0 && isString_default()(value)) {
|
|
64322
|
+
if (isFunction_default()(getValueLength)) {
|
|
64323
|
+
const valueLength = getValueLength(value);
|
|
64324
|
+
if (valueLength > maxLength) {
|
|
64325
|
+
console.warn('[Semi TextArea] The input character is truncated because the input length exceeds the maximum length limit');
|
|
64326
|
+
const truncatedValue = this.handleTruncateValue(value, maxLength);
|
|
64327
|
+
return truncatedValue;
|
|
64328
|
+
}
|
|
64327
64329
|
} else {
|
|
64328
|
-
|
|
64330
|
+
if (value.length > maxLength) {
|
|
64331
|
+
console.warn('[Semi TextArea] The input character is truncated because the input length exceeds the maximum length limit');
|
|
64332
|
+
return value.slice(0, maxLength);
|
|
64333
|
+
}
|
|
64329
64334
|
}
|
|
64335
|
+
return value;
|
|
64330
64336
|
}
|
|
64331
64337
|
return undefined;
|
|
64332
64338
|
}
|
|
@@ -64366,8 +64372,28 @@ class TextAreaFoundation extends foundation {
|
|
|
64366
64372
|
const {
|
|
64367
64373
|
value
|
|
64368
64374
|
} = this.getStates();
|
|
64375
|
+
const {
|
|
64376
|
+
maxLength
|
|
64377
|
+
} = this.getProps();
|
|
64378
|
+
let realValue = value;
|
|
64379
|
+
if (maxLength) {
|
|
64380
|
+
// 如果设置了 maxLength,在中文输输入过程中,如果点击外部触发 blur,则拼音字符的所有内容会回显,
|
|
64381
|
+
// 该表现不符合 maxLength 规定,因此需要在 blur 的时候二次确认
|
|
64382
|
+
// 详情见 https://github.com/DouyinFE/semi-design/issues/2005
|
|
64383
|
+
// If maxLength is set, during the Chinese input process, if you click outside to trigger blur,
|
|
64384
|
+
// all the contents of the Pinyin characters will be echoed.
|
|
64385
|
+
// This behavior does not meet the maxLength requirement, so we need to confirm twice when blurring。
|
|
64386
|
+
// For details, see https://github.com/DouyinFE/semi-design/issues/2005
|
|
64387
|
+
realValue = this.handleVisibleMaxLength(value);
|
|
64388
|
+
if (realValue !== value) {
|
|
64389
|
+
if (!this._isControlledComponent()) {
|
|
64390
|
+
this._adapter.setValue(realValue);
|
|
64391
|
+
}
|
|
64392
|
+
this._adapter.notifyChange(realValue, e);
|
|
64393
|
+
}
|
|
64394
|
+
}
|
|
64369
64395
|
this._adapter.toggleFocusing(false);
|
|
64370
|
-
this._adapter.notifyBlur(
|
|
64396
|
+
this._adapter.notifyBlur(realValue, e);
|
|
64371
64397
|
}
|
|
64372
64398
|
handleKeyDown(e) {
|
|
64373
64399
|
this._adapter.notifyKeyDown(e);
|
|
@@ -99055,6 +99081,9 @@ ArrayFieldComponent.contextType = FormUpdaterContext;
|
|
|
99055
99081
|
const image_constants_cssClasses = {
|
|
99056
99082
|
PREFIX: `${BASE_CLASS_PREFIX}-image`
|
|
99057
99083
|
};
|
|
99084
|
+
const image_constants_numbers = {
|
|
99085
|
+
DEFAULT_Z_INDEX: 1070
|
|
99086
|
+
};
|
|
99058
99087
|
|
|
99059
99088
|
;// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconUploadError.js
|
|
99060
99089
|
|
|
@@ -99418,11 +99447,13 @@ class previewFooter_Footer extends BaseComponent {
|
|
|
99418
99447
|
// 根据 props 中的 showTooltip 决定是否使用 Tooltip 包一层
|
|
99419
99448
|
this.getFinalIconElement = (element, content, key) => {
|
|
99420
99449
|
const {
|
|
99421
|
-
showTooltip
|
|
99450
|
+
showTooltip,
|
|
99451
|
+
zIndex
|
|
99422
99452
|
} = this.props;
|
|
99423
99453
|
return showTooltip ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tooltip, {
|
|
99424
99454
|
content: content,
|
|
99425
|
-
key: `tooltip-${key}
|
|
99455
|
+
key: `tooltip-${key}`,
|
|
99456
|
+
zIndex: zIndex + 1
|
|
99426
99457
|
}, element) : element;
|
|
99427
99458
|
};
|
|
99428
99459
|
this.getLocalTextByKey = key => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(LocaleConsumer, {
|
|
@@ -100875,6 +100906,7 @@ class PreviewInner extends BaseComponent {
|
|
|
100875
100906
|
ratio: ratio,
|
|
100876
100907
|
prevTip: prevTip,
|
|
100877
100908
|
nextTip: nextTip,
|
|
100909
|
+
zIndex: zIndex,
|
|
100878
100910
|
zoomInTip: zoomInTip,
|
|
100879
100911
|
zoomOutTip: zoomOutTip,
|
|
100880
100912
|
rotateTip: rotateTip,
|
|
@@ -100945,7 +100977,7 @@ PreviewInner.defaultProps = {
|
|
|
100945
100977
|
lazyLoad: false,
|
|
100946
100978
|
preLoad: true,
|
|
100947
100979
|
preLoadGap: 2,
|
|
100948
|
-
zIndex:
|
|
100980
|
+
zIndex: image_constants_numbers.DEFAULT_Z_INDEX,
|
|
100949
100981
|
maskClosable: true,
|
|
100950
100982
|
viewerVisibleDelay: 10000,
|
|
100951
100983
|
maxZoom: 5,
|