@douyinfe/semi-ui 2.4.0-beta.0 → 2.4.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/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/dist/css/semi.css +18 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +20 -6
- 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/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/treeSelect/index.js +11 -3
- package/lib/cjs/typography/util.js +0 -1
- 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/treeSelect/index.js +12 -4
- package/lib/es/typography/util.js +0 -1
- package/navigation/Item.tsx +1 -1
- package/navigation/SubNav.tsx +1 -1
- package/package.json +8 -8
- package/scrollList/scrollItem.tsx +10 -3
- package/table/_story/v2/FixedColumnsChange/index.jsx +1 -1
- package/table/_story/v2/FixedZIndex/index.jsx +1 -1
- package/timePicker/__test__/timePicker.test.js +9 -1
- 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
|
|
@@ -57640,6 +57639,13 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57640
57639
|
});
|
|
57641
57640
|
}
|
|
57642
57641
|
|
|
57642
|
+
componentWillUnmount() {
|
|
57643
|
+
if (this.props.cycled) {
|
|
57644
|
+
this.throttledAdjustList.cancel();
|
|
57645
|
+
this.debouncedSelect.cancel();
|
|
57646
|
+
}
|
|
57647
|
+
}
|
|
57648
|
+
|
|
57643
57649
|
componentDidMount() {
|
|
57644
57650
|
this.foundation.init();
|
|
57645
57651
|
const {
|
|
@@ -66199,7 +66205,7 @@ class Item_NavItem extends baseComponent_BaseComponent {
|
|
|
66199
66205
|
} else {
|
|
66200
66206
|
let placeholderIcons = null;
|
|
66201
66207
|
|
|
66202
|
-
if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent) {
|
|
66208
|
+
if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent && !isCollapsed) {
|
|
66203
66209
|
const iconAmount = icon && !indent ? level : level - 1;
|
|
66204
66210
|
placeholderIcons = times_default()(iconAmount, () => this.renderIcon(null, navigation_constants_strings.ICON_POS_RIGHT, false));
|
|
66205
66211
|
}
|
|
@@ -66644,7 +66650,7 @@ class SubNav_SubNav extends baseComponent_BaseComponent {
|
|
|
66644
66650
|
|
|
66645
66651
|
let placeholderIcons = null;
|
|
66646
66652
|
|
|
66647
|
-
if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent) {
|
|
66653
|
+
if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent && !isCollapsed) {
|
|
66648
66654
|
/* Different icons' amount means different indents.*/
|
|
66649
66655
|
const iconAmount = icon && !indent ? level : level - 1;
|
|
66650
66656
|
placeholderIcons = times_default()(iconAmount, index => this.renderIcon(null, navigation_constants_strings.ICON_POS_RIGHT, false, undefined, index));
|
|
@@ -94525,7 +94531,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94525
94531
|
} // if treeData keys changes, we won't show animation
|
|
94526
94532
|
|
|
94527
94533
|
|
|
94528
|
-
if (treeData && props.motion && !isEqual_default()(
|
|
94534
|
+
if (treeData && props.motion && !isEqual_default()(keys_default()(newState.keyEntities), keys_default()(prevState.keyEntities))) {
|
|
94529
94535
|
if (prevProps && props.motion) {
|
|
94530
94536
|
newState.motionKeys = new set_default.a([]);
|
|
94531
94537
|
newState.motionType = null;
|
|
@@ -94571,7 +94577,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94571
94577
|
newState.selectedKeys = findKeysForValues(normalizeValue(props.defaultValue, withObject), valueEntities, isMultiple);
|
|
94572
94578
|
} else if (treeData) {
|
|
94573
94579
|
// If `treeData` changed, we also need check it
|
|
94574
|
-
|
|
94580
|
+
if (props.value) {
|
|
94581
|
+
newState.selectedKeys = findKeysForValues(normalizeValue(props.value, withObject) || '', valueEntities, isMultiple);
|
|
94582
|
+
} else {
|
|
94583
|
+
newState.selectedKeys = updateKeys(prevState.selectedKeys, keyEntities);
|
|
94584
|
+
}
|
|
94575
94585
|
}
|
|
94576
94586
|
} else {
|
|
94577
94587
|
// checkedKeys: multiple mode controlled || data changed
|
|
@@ -94583,7 +94593,11 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94583
94593
|
checkedKeyValues = findKeysForValues(normalizeValue(props.defaultValue, withObject), valueEntities, isMultiple);
|
|
94584
94594
|
} else if (treeData) {
|
|
94585
94595
|
// If `treeData` changed, we also need check it
|
|
94586
|
-
|
|
94596
|
+
if (props.value) {
|
|
94597
|
+
checkedKeyValues = findKeysForValues(normalizeValue(props.value, withObject) || [], valueEntities, isMultiple);
|
|
94598
|
+
} else {
|
|
94599
|
+
checkedKeyValues = updateKeys(prevState.checkedKeys, keyEntities);
|
|
94600
|
+
}
|
|
94587
94601
|
}
|
|
94588
94602
|
|
|
94589
94603
|
if (checkedKeyValues) {
|