@douyinfe/semi-ui 2.33.0-beta.0 → 2.33.1
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/css/semi.css +9 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +31 -17
- 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/_utils/index.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/input/index.d.ts +1 -1
- package/lib/cjs/input/index.js +1 -1
- package/lib/cjs/table/Body/BaseRow.js +1 -1
- package/lib/cjs/tooltip/index.d.ts +2 -0
- package/lib/cjs/tooltip/index.js +14 -0
- package/lib/cjs/transfer/index.js +1 -1
- package/lib/es/_utils/index.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/input/index.d.ts +1 -1
- package/lib/es/input/index.js +1 -1
- package/lib/es/table/Body/BaseRow.js +1 -1
- package/lib/es/tooltip/index.d.ts +2 -0
- package/lib/es/tooltip/index.js +14 -0
- package/lib/es/transfer/index.js +1 -1
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -20371,6 +20371,18 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
|
|
|
20371
20371
|
}
|
|
20372
20372
|
};
|
|
20373
20373
|
|
|
20374
|
+
this.handlePortalFocus = e => {
|
|
20375
|
+
if (this.props.stopPropagation) {
|
|
20376
|
+
Object(_utils["g" /* stopPropagation */])(e);
|
|
20377
|
+
}
|
|
20378
|
+
};
|
|
20379
|
+
|
|
20380
|
+
this.handlePortalBlur = e => {
|
|
20381
|
+
if (this.props.stopPropagation) {
|
|
20382
|
+
Object(_utils["g" /* stopPropagation */])(e);
|
|
20383
|
+
}
|
|
20384
|
+
};
|
|
20385
|
+
|
|
20374
20386
|
this.handlePortalInnerKeyDown = e => {
|
|
20375
20387
|
this.foundation.handleContainerKeydown(e);
|
|
20376
20388
|
};
|
|
@@ -20468,6 +20480,8 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
|
|
|
20468
20480
|
style: portalInnerStyle,
|
|
20469
20481
|
ref: this.setContainerEl,
|
|
20470
20482
|
onClick: this.handlePortalInnerClick,
|
|
20483
|
+
onFocus: this.handlePortalFocus,
|
|
20484
|
+
onBlur: this.handlePortalBlur,
|
|
20471
20485
|
onMouseDown: this.handlePortalMouseDown,
|
|
20472
20486
|
onKeyDown: this.handlePortalInnerKeyDown
|
|
20473
20487
|
}, inner));
|
|
@@ -27916,7 +27930,7 @@ input_Input.defaultProps = {
|
|
|
27916
27930
|
onKeyPress: noop_default.a,
|
|
27917
27931
|
onEnterPress: noop_default.a,
|
|
27918
27932
|
validateStatus: 'default',
|
|
27919
|
-
|
|
27933
|
+
borderless: false
|
|
27920
27934
|
};
|
|
27921
27935
|
const ForwardInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef((props, ref) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(input_Input, Object.assign({}, props, {
|
|
27922
27936
|
forwardRef: ref
|
|
@@ -53321,7 +53335,7 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
53321
53335
|
|
|
53322
53336
|
const changedDates = this._getChangedDates(result);
|
|
53323
53337
|
|
|
53324
|
-
if (!this._someDateDisabled(changedDates)) {
|
|
53338
|
+
if (!this._someDateDisabled(changedDates, result)) {
|
|
53325
53339
|
if (!isEqual_default()(result, stateValue)) {
|
|
53326
53340
|
this._notifyChange(result);
|
|
53327
53341
|
}
|
|
@@ -53357,7 +53371,7 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
53357
53371
|
if (result && result.length) {
|
|
53358
53372
|
const changedDates = this._getChangedDates(result);
|
|
53359
53373
|
|
|
53360
|
-
if (!this._someDateDisabled(changedDates)) {
|
|
53374
|
+
if (!this._someDateDisabled(changedDates, result)) {
|
|
53361
53375
|
if (!isEqual_default()(result, stateValue)) {
|
|
53362
53376
|
if (!this._isControlledComponent() && !this._adapter.needConfirm()) {
|
|
53363
53377
|
this._adapter.updateValue(result);
|
|
@@ -53384,7 +53398,7 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
53384
53398
|
|
|
53385
53399
|
const changedLooseResult = this._getChangedDates(looseResult);
|
|
53386
53400
|
|
|
53387
|
-
if (!this._someDateDisabled(changedLooseResult)) {
|
|
53401
|
+
if (!this._someDateDisabled(changedLooseResult, looseResult)) {
|
|
53388
53402
|
this.resetCachedSelectedValue(looseResult);
|
|
53389
53403
|
}
|
|
53390
53404
|
}
|
|
@@ -53489,7 +53503,7 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
53489
53503
|
|
|
53490
53504
|
const changedDates = this._getChangedDates(parsedResult);
|
|
53491
53505
|
|
|
53492
|
-
if (!this._someDateDisabled(changedDates) && !isEqual_default()(parsedResult, stateValue)) {
|
|
53506
|
+
if (!this._someDateDisabled(changedDates, parsedResult) && !isEqual_default()(parsedResult, stateValue)) {
|
|
53493
53507
|
this._notifyChange(parsedResult);
|
|
53494
53508
|
}
|
|
53495
53509
|
}
|
|
@@ -53843,7 +53857,7 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
53843
53857
|
const changedDates = this._getChangedDates(_value); // You cannot update the value directly when needConfirm, you can only change the value through handleConfirm
|
|
53844
53858
|
|
|
53845
53859
|
|
|
53846
|
-
if (!this._isControlledComponent() && !this._someDateDisabled(changedDates) && !this._adapter.needConfirm()) {
|
|
53860
|
+
if (!this._isControlledComponent() && !this._someDateDisabled(changedDates, _value) && !this._adapter.needConfirm()) {
|
|
53847
53861
|
this._adapter.updateValue(_value);
|
|
53848
53862
|
}
|
|
53849
53863
|
}
|
|
@@ -53889,7 +53903,7 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
53889
53903
|
|
|
53890
53904
|
let inputValue, insetInputValue;
|
|
53891
53905
|
|
|
53892
|
-
if (!this._someDateDisabled(changedDates)) {
|
|
53906
|
+
if (!this._someDateDisabled(changedDates, dates)) {
|
|
53893
53907
|
this.resetCachedSelectedValue(dates);
|
|
53894
53908
|
inputValue = this._isMultiple() ? this.formatMultipleDates(dates) : this.formatDates(dates);
|
|
53895
53909
|
|
|
@@ -54196,12 +54210,12 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
54196
54210
|
}
|
|
54197
54211
|
/**
|
|
54198
54212
|
* Whether a date is disabled
|
|
54199
|
-
* @param
|
|
54213
|
+
* @param value The date that needs to be judged whether to disable
|
|
54214
|
+
* @param selectedValue Selected date, when selecting a range, pass this date to the second parameter of `disabledDate`
|
|
54200
54215
|
*/
|
|
54201
54216
|
|
|
54202
54217
|
|
|
54203
|
-
_someDateDisabled(value) {
|
|
54204
|
-
const stateValue = this.getState('value');
|
|
54218
|
+
_someDateDisabled(value, selectedValue) {
|
|
54205
54219
|
const {
|
|
54206
54220
|
rangeInputFocus
|
|
54207
54221
|
} = this.getStates();
|
|
@@ -54211,14 +54225,14 @@ class foundation_DatePickerFoundation extends foundation {
|
|
|
54211
54225
|
rangeInputFocus
|
|
54212
54226
|
}; // DisabledDate needs to pass the second parameter
|
|
54213
54227
|
|
|
54214
|
-
if (this._isRangeType() && Array.isArray(
|
|
54215
|
-
if (isValid(
|
|
54216
|
-
const rangeStart = format_format(
|
|
54228
|
+
if (this._isRangeType() && Array.isArray(selectedValue)) {
|
|
54229
|
+
if (isValid(selectedValue[0])) {
|
|
54230
|
+
const rangeStart = format_format(selectedValue[0], 'yyyy-MM-dd');
|
|
54217
54231
|
disabledOptions.rangeStart = rangeStart;
|
|
54218
54232
|
}
|
|
54219
54233
|
|
|
54220
|
-
if (isValid(
|
|
54221
|
-
const rangeEnd = format_format(
|
|
54234
|
+
if (isValid(selectedValue[1])) {
|
|
54235
|
+
const rangeEnd = format_format(selectedValue[1], 'yyyy-MM-dd');
|
|
54222
54236
|
disabledOptions.rangeEnd = rangeEnd;
|
|
54223
54237
|
}
|
|
54224
54238
|
}
|
|
@@ -89745,7 +89759,7 @@ class BaseRow_TableRow extends baseComponent_BaseComponent {
|
|
|
89745
89759
|
if (level != null && columnIndex === firstIndex) {
|
|
89746
89760
|
expandableProps.indent = level;
|
|
89747
89761
|
|
|
89748
|
-
if (!expandableRow) {
|
|
89762
|
+
if (!expandableRow && hideExpandedColumn) {
|
|
89749
89763
|
expandableProps.indent = level + 1;
|
|
89750
89764
|
}
|
|
89751
89765
|
}
|
|
@@ -104366,7 +104380,7 @@ const transfer_SortableList = sortableContainer(_ref => {
|
|
|
104366
104380
|
/*#__PURE__*/
|
|
104367
104381
|
// @ts-ignore skip SortableItem type check
|
|
104368
104382
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(transfer_SortableItem, {
|
|
104369
|
-
key: item.
|
|
104383
|
+
key: item.key,
|
|
104370
104384
|
index: index,
|
|
104371
104385
|
item: item
|
|
104372
104386
|
}))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|