@douyinfe/semi-ui 2.3.0 → 2.4.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/datePicker/_story/RenderDate/index.js +13 -3
- package/datePicker/_story/RenderFullDate/index.js +36 -14
- package/datePicker/_story/RenderFullDate/index.scss +1 -1
- package/datePicker/_story/datePicker.stories.js +19 -11
- package/datePicker/_story/v2/PanelOpen.jsx +39 -0
- package/datePicker/_story/v2/index.js +2 -1
- package/datePicker/datePicker.tsx +1 -0
- package/dist/css/semi.css +34 -9
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +92 -33
- 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/dropdown/index.tsx +11 -3
- package/form/_story/demo.jsx +1 -0
- package/input/index.tsx +1 -0
- package/input/textarea.tsx +6 -4
- package/inputNumber/__test__/inputNumber.test.js +36 -8
- package/inputNumber/index.tsx +2 -1
- package/lib/cjs/datePicker/datePicker.js +12 -8
- package/lib/cjs/dropdown/index.d.ts +10 -3
- package/lib/cjs/input/index.js +2 -1
- package/lib/cjs/input/textarea.js +5 -3
- package/lib/cjs/inputNumber/index.js +3 -2
- package/lib/cjs/list/index.d.ts +4 -4
- package/lib/cjs/navigation/Item.js +1 -1
- package/lib/cjs/navigation/SubNav.js +1 -1
- package/lib/cjs/scrollList/scrollItem.d.ts +5 -1
- package/lib/cjs/scrollList/scrollItem.js +7 -0
- package/lib/cjs/select/index.js +1 -1
- package/lib/cjs/table/Table.js +9 -5
- package/lib/cjs/timePicker/TimePicker.d.ts +2 -0
- package/lib/cjs/timePicker/TimePicker.js +4 -4
- package/lib/cjs/timePicker/index.d.ts +1 -0
- package/lib/cjs/tree/treeNode.js +10 -1
- package/lib/cjs/treeSelect/index.js +11 -3
- package/lib/cjs/typography/util.js +0 -1
- package/lib/es/datePicker/datePicker.js +12 -8
- package/lib/es/dropdown/index.d.ts +10 -3
- package/lib/es/input/index.js +2 -1
- package/lib/es/input/textarea.js +5 -3
- package/lib/es/inputNumber/index.js +3 -2
- package/lib/es/list/index.d.ts +4 -4
- package/lib/es/navigation/Item.js +1 -1
- package/lib/es/navigation/SubNav.js +1 -1
- package/lib/es/scrollList/scrollItem.d.ts +5 -1
- package/lib/es/scrollList/scrollItem.js +7 -0
- package/lib/es/select/index.js +1 -1
- package/lib/es/table/Table.js +9 -5
- package/lib/es/timePicker/TimePicker.d.ts +2 -0
- package/lib/es/timePicker/TimePicker.js +4 -4
- package/lib/es/timePicker/index.d.ts +1 -0
- package/lib/es/tree/treeNode.js +9 -1
- package/lib/es/treeSelect/index.js +12 -4
- package/lib/es/typography/util.js +0 -1
- package/list/index.tsx +5 -5
- package/navigation/Item.tsx +1 -1
- package/navigation/SubNav.tsx +1 -1
- package/package.json +9 -8
- package/scrollList/scrollItem.tsx +10 -3
- package/select/index.tsx +6 -1
- package/table/Table.tsx +9 -6
- package/table/_story/table.stories.js +2 -0
- package/table/_story/v2/FixedColumnsChange/index.jsx +104 -0
- package/table/_story/v2/FixedZIndex/index.jsx +87 -0
- package/timePicker/TimePicker.tsx +4 -1
- package/timePicker/__test__/timePicker.test.js +42 -3
- package/timePicker/_story/timepicker.stories.js +18 -0
- package/tree/treeNode.tsx +9 -2
- package/treeSelect/__test__/treeSelect.test.js +157 -0
- package/treeSelect/index.tsx +21 -12
- package/typography/_story/typography.stories.js +8 -0
- package/typography/util.tsx +0 -1
package/dist/umd/semi-ui.js
CHANGED
|
@@ -30657,7 +30657,6 @@ const getRenderText = function (originEle, rows) {
|
|
|
30657
30657
|
ellipsisContainer.style.zIndex = '-1000'; // clean up css overflow
|
|
30658
30658
|
|
|
30659
30659
|
ellipsisContainer.style.textOverflow = 'clip';
|
|
30660
|
-
ellipsisContainer.style.whiteSpace = 'normal';
|
|
30661
30660
|
ellipsisContainer.style.webkitLineClamp = 'none'; // Render fake container
|
|
30662
30661
|
|
|
30663
30662
|
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.render( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null), ellipsisContainer); // Check if ellipsis in measure div is height enough for content
|
|
@@ -33629,6 +33628,7 @@ class input_Input extends baseComponent_BaseComponent {
|
|
|
33629
33628
|
prefix,
|
|
33630
33629
|
mode,
|
|
33631
33630
|
insetLabel,
|
|
33631
|
+
insetLabelId,
|
|
33632
33632
|
validateStatus,
|
|
33633
33633
|
type,
|
|
33634
33634
|
readonly,
|
|
@@ -33644,7 +33644,7 @@ class input_Input extends baseComponent_BaseComponent {
|
|
|
33644
33644
|
maxLength,
|
|
33645
33645
|
getValueLength
|
|
33646
33646
|
} = _a,
|
|
33647
|
-
rest = input_rest(_a, ["addonAfter", "addonBefore", "autofocus", "className", "disabled", "placeholder", "prefix", "mode", "insetLabel", "validateStatus", "type", "readonly", "size", "suffix", "style", "showClear", "onEnterPress", "onClear", "hideSuffix", "inputStyle", "forwardRef", "maxLength", "getValueLength"]);
|
|
33647
|
+
rest = input_rest(_a, ["addonAfter", "addonBefore", "autofocus", "className", "disabled", "placeholder", "prefix", "mode", "insetLabel", "insetLabelId", "validateStatus", "type", "readonly", "size", "suffix", "style", "showClear", "onEnterPress", "onClear", "hideSuffix", "inputStyle", "forwardRef", "maxLength", "getValueLength"]);
|
|
33648
33648
|
|
|
33649
33649
|
const {
|
|
33650
33650
|
value,
|
|
@@ -57640,6 +57640,13 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57640
57640
|
});
|
|
57641
57641
|
}
|
|
57642
57642
|
|
|
57643
|
+
componentWillUnmount() {
|
|
57644
|
+
if (this.props.cycled) {
|
|
57645
|
+
this.throttledAdjustList.cancel();
|
|
57646
|
+
this.debouncedSelect.cancel();
|
|
57647
|
+
}
|
|
57648
|
+
}
|
|
57649
|
+
|
|
57643
57650
|
componentDidMount() {
|
|
57644
57651
|
this.foundation.init();
|
|
57645
57652
|
const {
|
|
@@ -59974,14 +59981,18 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
59974
59981
|
onRangeEndTabPress: this.handleRangeEndTabPress
|
|
59975
59982
|
});
|
|
59976
59983
|
|
|
59977
|
-
return
|
|
59978
|
-
|
|
59979
|
-
|
|
59980
|
-
|
|
59981
|
-
|
|
59982
|
-
|
|
59983
|
-
|
|
59984
|
-
|
|
59984
|
+
return (
|
|
59985
|
+
/*#__PURE__*/
|
|
59986
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
|
|
59987
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
59988
|
+
onClick: this.handleTriggerWrapperClick,
|
|
59989
|
+
className: inputCls
|
|
59990
|
+
}, typeof triggerRender === 'function' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(trigger_0, assign_default()({}, props, {
|
|
59991
|
+
triggerRender: triggerRender,
|
|
59992
|
+
componentName: "DatePicker",
|
|
59993
|
+
componentProps: assign_default()({}, this.props)
|
|
59994
|
+
})) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(dateInput_DateInput, assign_default()({}, props)))
|
|
59995
|
+
);
|
|
59985
59996
|
}
|
|
59986
59997
|
|
|
59987
59998
|
render() {
|
|
@@ -64034,19 +64045,21 @@ class textarea_TextArea extends baseComponent_BaseComponent {
|
|
|
64034
64045
|
minLength: stateMinLength
|
|
64035
64046
|
} = this.state;
|
|
64036
64047
|
const wrapperCls = classnames_default()(className, "".concat(textarea_prefixCls, "-textarea-wrapper"), {
|
|
64037
|
-
["".concat(textarea_prefixCls, "-textarea-wrapper-disabled")]: disabled
|
|
64048
|
+
["".concat(textarea_prefixCls, "-textarea-wrapper-disabled")]: disabled,
|
|
64049
|
+
["".concat(textarea_prefixCls, "-textarea-wrapper-readonly")]: readonly,
|
|
64038
64050
|
[concat_default()(_context = "".concat(textarea_prefixCls, "-textarea-wrapper-")).call(_context, validateStatus)]: Boolean(validateStatus),
|
|
64039
64051
|
["".concat(textarea_prefixCls, "-textarea-wrapper-focus")]: isFocus // [`${prefixCls}-textarea-wrapper-resize`]: !autosize && resize,
|
|
64040
64052
|
|
|
64041
64053
|
}); // const ref = this.props.forwardRef || this.textAreaRef;
|
|
64042
64054
|
|
|
64043
64055
|
const itemCls = classnames_default()("".concat(textarea_prefixCls, "-textarea"), {
|
|
64044
|
-
["".concat(textarea_prefixCls, "-textarea-disabled")]: disabled
|
|
64056
|
+
["".concat(textarea_prefixCls, "-textarea-disabled")]: disabled,
|
|
64057
|
+
["".concat(textarea_prefixCls, "-textarea-readonly")]: readonly,
|
|
64045
64058
|
["".concat(textarea_prefixCls, "-textarea-autosize")]: autosize,
|
|
64046
64059
|
["".concat(textarea_prefixCls, "-textarea-showClear")]: showClear
|
|
64047
64060
|
});
|
|
64048
64061
|
|
|
64049
|
-
const itemProps = assign_default()(assign_default()({}, omit_default()(rest, 'insetLabel', 'getValueLength', 'onClear', 'showClear')), {
|
|
64062
|
+
const itemProps = assign_default()(assign_default()({}, omit_default()(rest, 'insetLabel', 'insetLabelId', 'getValueLength', 'onClear', 'showClear')), {
|
|
64050
64063
|
className: itemCls,
|
|
64051
64064
|
disabled,
|
|
64052
64065
|
readOnly: readonly,
|
|
@@ -64160,7 +64173,8 @@ const inputNumber_constants_numbers = assign_default()(assign_default()({}, inpu
|
|
|
64160
64173
|
DEFAULT_STEP: 1,
|
|
64161
64174
|
DEFAULT_SHIFT_STEP: 1,
|
|
64162
64175
|
DEFAULT_PRESS_TIMEOUT: 250,
|
|
64163
|
-
DEFAULT_PRESS_INTERVAL: 0
|
|
64176
|
+
DEFAULT_PRESS_INTERVAL: 0,
|
|
64177
|
+
MOUSE_BUTTON_LEFT: 0
|
|
64164
64178
|
});
|
|
64165
64179
|
|
|
64166
64180
|
const inputNumber_constants_strings = assign_default()({}, input_constants_strings);
|
|
@@ -64194,6 +64208,7 @@ function minus(num1, num2) {
|
|
|
64194
64208
|
|
|
64195
64209
|
|
|
64196
64210
|
|
|
64211
|
+
|
|
64197
64212
|
/* eslint-disable max-len */
|
|
64198
64213
|
|
|
64199
64214
|
/* eslint-disable no-param-reassign */
|
|
@@ -64480,6 +64495,10 @@ class foundation_InputNumberFoundation extends foundation {
|
|
|
64480
64495
|
}
|
|
64481
64496
|
|
|
64482
64497
|
handleUpClick(event) {
|
|
64498
|
+
if (!this._isMouseButtonLeft(event)) {
|
|
64499
|
+
return;
|
|
64500
|
+
}
|
|
64501
|
+
|
|
64483
64502
|
this._adapter.setClickUpOrDown(true);
|
|
64484
64503
|
|
|
64485
64504
|
if (event) {
|
|
@@ -64499,6 +64518,10 @@ class foundation_InputNumberFoundation extends foundation {
|
|
|
64499
64518
|
}
|
|
64500
64519
|
|
|
64501
64520
|
handleDownClick(event) {
|
|
64521
|
+
if (!this._isMouseButtonLeft(event)) {
|
|
64522
|
+
return;
|
|
64523
|
+
}
|
|
64524
|
+
|
|
64502
64525
|
this._adapter.setClickUpOrDown(true);
|
|
64503
64526
|
|
|
64504
64527
|
if (event) {
|
|
@@ -64516,6 +64539,15 @@ class foundation_InputNumberFoundation extends foundation {
|
|
|
64516
64539
|
});
|
|
64517
64540
|
});
|
|
64518
64541
|
}
|
|
64542
|
+
/**
|
|
64543
|
+
* Whether it is a left mouse button click
|
|
64544
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
|
|
64545
|
+
*/
|
|
64546
|
+
|
|
64547
|
+
|
|
64548
|
+
_isMouseButtonLeft(event) {
|
|
64549
|
+
return get_default()(event, 'button') === inputNumber_constants_numbers.MOUSE_BUTTON_LEFT;
|
|
64550
|
+
}
|
|
64519
64551
|
|
|
64520
64552
|
_preventDefault(event) {
|
|
64521
64553
|
const keepFocus = this._adapter.getProp('keepFocus');
|
|
@@ -65274,9 +65306,10 @@ class inputNumber_InputNumber extends baseComponent_BaseComponent {
|
|
|
65274
65306
|
innerButtons,
|
|
65275
65307
|
style,
|
|
65276
65308
|
onNumberChange,
|
|
65277
|
-
keepFocus
|
|
65309
|
+
keepFocus,
|
|
65310
|
+
defaultValue
|
|
65278
65311
|
} = _a,
|
|
65279
|
-
rest = inputNumber_rest(_a, ["disabled", "className", "prefixCls", "min", "max", "step", "shiftStep", "precision", "formatter", "parser", "forwardedRef", "onUpClick", "onDownClick", "pressInterval", "pressTimeout", "suffix", "size", "hideButtons", "innerButtons", "style", "onNumberChange", "keepFocus"]);
|
|
65312
|
+
rest = inputNumber_rest(_a, ["disabled", "className", "prefixCls", "min", "max", "step", "shiftStep", "precision", "formatter", "parser", "forwardedRef", "onUpClick", "onDownClick", "pressInterval", "pressTimeout", "suffix", "size", "hideButtons", "innerButtons", "style", "onNumberChange", "keepFocus", "defaultValue"]);
|
|
65280
65313
|
|
|
65281
65314
|
const {
|
|
65282
65315
|
value,
|
|
@@ -66177,7 +66210,7 @@ class Item_NavItem extends baseComponent_BaseComponent {
|
|
|
66177
66210
|
} else {
|
|
66178
66211
|
let placeholderIcons = null;
|
|
66179
66212
|
|
|
66180
|
-
if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent) {
|
|
66213
|
+
if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent && !isCollapsed) {
|
|
66181
66214
|
const iconAmount = icon && !indent ? level : level - 1;
|
|
66182
66215
|
placeholderIcons = times_default()(iconAmount, () => this.renderIcon(null, navigation_constants_strings.ICON_POS_RIGHT, false));
|
|
66183
66216
|
}
|
|
@@ -66622,7 +66655,7 @@ class SubNav_SubNav extends baseComponent_BaseComponent {
|
|
|
66622
66655
|
|
|
66623
66656
|
let placeholderIcons = null;
|
|
66624
66657
|
|
|
66625
|
-
if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent) {
|
|
66658
|
+
if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent && !isCollapsed) {
|
|
66626
66659
|
/* Different icons' amount means different indents.*/
|
|
66627
66660
|
const iconAmount = icon && !indent ? level : level - 1;
|
|
66628
66661
|
placeholderIcons = times_default()(iconAmount, index => this.renderIcon(null, navigation_constants_strings.ICON_POS_RIGHT, false, undefined, index));
|
|
@@ -73449,7 +73482,7 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73449
73482
|
role: "button",
|
|
73450
73483
|
"aria-label": "Use the input box to create an optional item",
|
|
73451
73484
|
onClick: e => this.onSelect(option, optionIndex, e),
|
|
73452
|
-
key:
|
|
73485
|
+
key: option.key || option.label
|
|
73453
73486
|
}, customCreateItem)
|
|
73454
73487
|
);
|
|
73455
73488
|
}
|
|
@@ -86392,15 +86425,18 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
86392
86425
|
const _dataSource = [...dataSource];
|
|
86393
86426
|
const filteredSortedDataSource = this.foundation.getFilteredSortedDataSource(_dataSource, stateQueries);
|
|
86394
86427
|
this.foundation.setCachedFilteredSortedDataSource(filteredSortedDataSource);
|
|
86395
|
-
states.dataSource = filteredSortedDataSource;
|
|
86396
|
-
|
|
86397
|
-
states.pagination = isObject_default()(statePagination) ? assign_default()(assign_default()({}, statePagination), {
|
|
86398
|
-
currentPage: isObject_default()(propsPagination) && propsPagination.currentPage ? propsPagination.currentPage : 1
|
|
86399
|
-
}) : statePagination;
|
|
86428
|
+
states.dataSource = filteredSortedDataSource;
|
|
86400
86429
|
|
|
86401
86430
|
if (this.props.groupBy) {
|
|
86402
86431
|
states.groups = null;
|
|
86403
86432
|
}
|
|
86433
|
+
} // when dataSource has change, should reset currentPage
|
|
86434
|
+
|
|
86435
|
+
|
|
86436
|
+
if (dataSource !== prevProps.dataSource) {
|
|
86437
|
+
states.pagination = isObject_default()(statePagination) ? assign_default()(assign_default()({}, statePagination), {
|
|
86438
|
+
currentPage: isObject_default()(propsPagination) && propsPagination.currentPage ? propsPagination.currentPage : 1
|
|
86439
|
+
}) : statePagination;
|
|
86404
86440
|
}
|
|
86405
86441
|
|
|
86406
86442
|
if (keys_default()(states).length) {
|
|
@@ -86587,6 +86623,7 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
86587
86623
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
86588
86624
|
ref: this.rootWrapRef,
|
|
86589
86625
|
className: classnames_default()(className, "".concat(prefixCls, "-wrapper")),
|
|
86626
|
+
"data-column-fixed": anyColumnFixed,
|
|
86590
86627
|
style: wrapStyle,
|
|
86591
86628
|
id: id
|
|
86592
86629
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(table_TableContextProvider, assign_default()({}, tableContextValue), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(spin_0, {
|
|
@@ -88862,7 +88899,13 @@ class foundation_TimePickerFoundation extends foundation {
|
|
|
88862
88899
|
}
|
|
88863
88900
|
}
|
|
88864
88901
|
|
|
88865
|
-
this.
|
|
88902
|
+
const onChangeWithDateFirst = this.getProp('onChangeWithDateFirst');
|
|
88903
|
+
|
|
88904
|
+
if (onChangeWithDateFirst) {
|
|
88905
|
+
this._adapter.notifyChange(_value, str);
|
|
88906
|
+
} else {
|
|
88907
|
+
this._adapter.notifyChange(str, _value);
|
|
88908
|
+
}
|
|
88866
88909
|
}
|
|
88867
88910
|
|
|
88868
88911
|
_hasChanged() {
|
|
@@ -89329,9 +89372,7 @@ class TimePicker_TimePicker extends baseComponent_BaseComponent {
|
|
|
89329
89372
|
notifyOpenChange: function () {
|
|
89330
89373
|
return _this2.props.onOpenChange(...arguments);
|
|
89331
89374
|
},
|
|
89332
|
-
notifyChange:
|
|
89333
|
-
return _this2.props.onChange && _this2.props.onChange(...arguments);
|
|
89334
|
-
},
|
|
89375
|
+
notifyChange: (agr1, arg2) => this.props.onChange && this.props.onChange(agr1, arg2),
|
|
89335
89376
|
notifyFocus: function () {
|
|
89336
89377
|
return _this2.props.onFocus && _this2.props.onFocus(...arguments);
|
|
89337
89378
|
},
|
|
@@ -89478,6 +89519,7 @@ class TimePicker_TimePicker extends baseComponent_BaseComponent {
|
|
|
89478
89519
|
panelFooter,
|
|
89479
89520
|
rangeSeparator,
|
|
89480
89521
|
onOpenChange,
|
|
89522
|
+
onChangeWithDateFirst,
|
|
89481
89523
|
popupClassName: propPopupClassName,
|
|
89482
89524
|
hideDisabledOptions,
|
|
89483
89525
|
use12Hours,
|
|
@@ -89489,7 +89531,7 @@ class TimePicker_TimePicker extends baseComponent_BaseComponent {
|
|
|
89489
89531
|
motion,
|
|
89490
89532
|
autoAdjustOverflow
|
|
89491
89533
|
} = _a,
|
|
89492
|
-
rest = TimePicker_rest(_a, ["prefixCls", "placeholder", "disabled", "defaultValue", "className", "popupStyle", "size", "style", "locale", "localeCode", "zIndex", "getPopupContainer", "insetLabel", "insetLabelId", "inputStyle", "showClear", "panelHeader", "panelFooter", "rangeSeparator", "onOpenChange", "popupClassName", "hideDisabledOptions", "use12Hours", "minuteStep", "hourStep", "secondStep", "scrollItemProps", "triggerRender", "motion", "autoAdjustOverflow"]);
|
|
89534
|
+
rest = TimePicker_rest(_a, ["prefixCls", "placeholder", "disabled", "defaultValue", "className", "popupStyle", "size", "style", "locale", "localeCode", "zIndex", "getPopupContainer", "insetLabel", "insetLabelId", "inputStyle", "showClear", "panelHeader", "panelFooter", "rangeSeparator", "onOpenChange", "onChangeWithDateFirst", "popupClassName", "hideDisabledOptions", "use12Hours", "minuteStep", "hourStep", "secondStep", "scrollItemProps", "triggerRender", "motion", "autoAdjustOverflow"]);
|
|
89493
89535
|
|
|
89494
89536
|
const format = this.foundation.getDefaultFormatIfNeed();
|
|
89495
89537
|
const position = this.foundation.getPosition();
|
|
@@ -89649,6 +89691,7 @@ TimePicker_TimePicker.defaultProps = assign_default()({
|
|
|
89649
89691
|
onFocus: noop_default.a,
|
|
89650
89692
|
onBlur: noop_default.a,
|
|
89651
89693
|
onChange: noop_default.a,
|
|
89694
|
+
onChangeWithDateFirst: true,
|
|
89652
89695
|
use12Hours: false,
|
|
89653
89696
|
focusOnOpen: false,
|
|
89654
89697
|
onKeyDown: noop_default.a,
|
|
@@ -91246,6 +91289,7 @@ const TreeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_re
|
|
|
91246
91289
|
|
|
91247
91290
|
|
|
91248
91291
|
|
|
91292
|
+
|
|
91249
91293
|
var treeNode_rest = undefined && undefined.__rest || function (s, e) {
|
|
91250
91294
|
var t = {};
|
|
91251
91295
|
|
|
@@ -91708,7 +91752,14 @@ class treeNode_TreeNode extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
91708
91752
|
ref: this.setRef
|
|
91709
91753
|
}, dragProps));
|
|
91710
91754
|
} else {
|
|
91711
|
-
|
|
91755
|
+
if (isEmpty_default()(style)) {
|
|
91756
|
+
return customLabel;
|
|
91757
|
+
} else {
|
|
91758
|
+
// In virtualization, props.style will contain location information
|
|
91759
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(customLabel, {
|
|
91760
|
+
style: assign_default()(assign_default()({}, get_default()(customLabel, ['props', 'style'])), style)
|
|
91761
|
+
});
|
|
91762
|
+
}
|
|
91712
91763
|
}
|
|
91713
91764
|
}
|
|
91714
91765
|
|
|
@@ -94486,7 +94537,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94486
94537
|
} // if treeData keys changes, we won't show animation
|
|
94487
94538
|
|
|
94488
94539
|
|
|
94489
|
-
if (treeData && props.motion && !isEqual_default()(
|
|
94540
|
+
if (treeData && props.motion && !isEqual_default()(keys_default()(newState.keyEntities), keys_default()(prevState.keyEntities))) {
|
|
94490
94541
|
if (prevProps && props.motion) {
|
|
94491
94542
|
newState.motionKeys = new set_default.a([]);
|
|
94492
94543
|
newState.motionType = null;
|
|
@@ -94532,7 +94583,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94532
94583
|
newState.selectedKeys = findKeysForValues(normalizeValue(props.defaultValue, withObject), valueEntities, isMultiple);
|
|
94533
94584
|
} else if (treeData) {
|
|
94534
94585
|
// If `treeData` changed, we also need check it
|
|
94535
|
-
|
|
94586
|
+
if (props.value) {
|
|
94587
|
+
newState.selectedKeys = findKeysForValues(normalizeValue(props.value, withObject) || '', valueEntities, isMultiple);
|
|
94588
|
+
} else {
|
|
94589
|
+
newState.selectedKeys = updateKeys(prevState.selectedKeys, keyEntities);
|
|
94590
|
+
}
|
|
94536
94591
|
}
|
|
94537
94592
|
} else {
|
|
94538
94593
|
// checkedKeys: multiple mode controlled || data changed
|
|
@@ -94544,7 +94599,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94544
94599
|
checkedKeyValues = findKeysForValues(normalizeValue(props.defaultValue, withObject), valueEntities, isMultiple);
|
|
94545
94600
|
} else if (treeData) {
|
|
94546
94601
|
// If `treeData` changed, we also need check it
|
|
94547
|
-
|
|
94602
|
+
if (props.value) {
|
|
94603
|
+
checkedKeyValues = findKeysForValues(normalizeValue(props.value, withObject) || [], valueEntities, isMultiple);
|
|
94604
|
+
} else {
|
|
94605
|
+
checkedKeyValues = updateKeys(prevState.checkedKeys, keyEntities);
|
|
94606
|
+
}
|
|
94548
94607
|
}
|
|
94549
94608
|
|
|
94550
94609
|
if (checkedKeyValues) {
|