@douyinfe/semi-ui 2.55.3 → 2.55.5
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 +55 -9
- 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 +7 -3
- package/lib/cjs/tree/treeNode.js +2 -1
- package/lib/es/cascader/index.js +7 -3
- package/lib/es/tree/treeNode.js +2 -1
- package/package.json +8 -8
|
@@ -67,10 +67,10 @@ class Cascader extends _baseComponent.default {
|
|
|
67
67
|
displayRender,
|
|
68
68
|
disableStrictly
|
|
69
69
|
} = this.props;
|
|
70
|
-
const isDsiabled = disabled || keyEntities[nodeKey].data.disabled || disableStrictly && disabledKeys.has(nodeKey);
|
|
71
70
|
if (keyEntities[nodeKey]) {
|
|
71
|
+
const isDisabled = disabled || keyEntities[nodeKey].data.disabled || disableStrictly && disabledKeys.has(nodeKey);
|
|
72
72
|
const tagCls = (0, _classnames.default)(`${prefixcls}-selection-tag`, {
|
|
73
|
-
[`${prefixcls}-selection-tag-disabled`]:
|
|
73
|
+
[`${prefixcls}-selection-tag-disabled`]: isDisabled
|
|
74
74
|
});
|
|
75
75
|
// custom render tags
|
|
76
76
|
if ((0, _isFunction2.default)(displayRender)) {
|
|
@@ -733,7 +733,11 @@ class Cascader extends _baseComponent.default {
|
|
|
733
733
|
formatItem.length > 0 && formatValuePath.push(formatItem);
|
|
734
734
|
});
|
|
735
735
|
// formatKeys is used to save key of value
|
|
736
|
-
const formatKeys = formatValuePath.
|
|
736
|
+
const formatKeys = formatValuePath.reduce((acc, cur) => {
|
|
737
|
+
const key = (0, _util.getKeyByValuePath)(cur);
|
|
738
|
+
keyEntities[key] && acc.push(key);
|
|
739
|
+
return acc;
|
|
740
|
+
}, []);
|
|
737
741
|
return formatKeys;
|
|
738
742
|
};
|
|
739
743
|
const needUpdateTreeData = needUpdate('treeData') || needUpdateData();
|
package/lib/cjs/tree/treeNode.js
CHANGED
|
@@ -50,6 +50,7 @@ class TreeNode extends _react.PureComponent {
|
|
|
50
50
|
onNodeExpand(e, this.props);
|
|
51
51
|
};
|
|
52
52
|
this.onCheck = e => {
|
|
53
|
+
var _a, _b;
|
|
53
54
|
if (this.isDisabled()) {
|
|
54
55
|
return;
|
|
55
56
|
}
|
|
@@ -57,7 +58,7 @@ class TreeNode extends _react.PureComponent {
|
|
|
57
58
|
onNodeCheck
|
|
58
59
|
} = this.context;
|
|
59
60
|
e.stopPropagation();
|
|
60
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
61
|
+
(_b = (_a = e.nativeEvent) === null || _a === void 0 ? void 0 : _a.stopImmediatePropagation) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
61
62
|
onNodeCheck(e, this.props);
|
|
62
63
|
};
|
|
63
64
|
/**
|
package/lib/es/cascader/index.js
CHANGED
|
@@ -58,10 +58,10 @@ class Cascader extends BaseComponent {
|
|
|
58
58
|
displayRender,
|
|
59
59
|
disableStrictly
|
|
60
60
|
} = this.props;
|
|
61
|
-
const isDsiabled = disabled || keyEntities[nodeKey].data.disabled || disableStrictly && disabledKeys.has(nodeKey);
|
|
62
61
|
if (keyEntities[nodeKey]) {
|
|
62
|
+
const isDisabled = disabled || keyEntities[nodeKey].data.disabled || disableStrictly && disabledKeys.has(nodeKey);
|
|
63
63
|
const tagCls = cls(`${prefixcls}-selection-tag`, {
|
|
64
|
-
[`${prefixcls}-selection-tag-disabled`]:
|
|
64
|
+
[`${prefixcls}-selection-tag-disabled`]: isDisabled
|
|
65
65
|
});
|
|
66
66
|
// custom render tags
|
|
67
67
|
if (_isFunction(displayRender)) {
|
|
@@ -724,7 +724,11 @@ class Cascader extends BaseComponent {
|
|
|
724
724
|
formatItem.length > 0 && formatValuePath.push(formatItem);
|
|
725
725
|
});
|
|
726
726
|
// formatKeys is used to save key of value
|
|
727
|
-
const formatKeys = formatValuePath.
|
|
727
|
+
const formatKeys = formatValuePath.reduce((acc, cur) => {
|
|
728
|
+
const key = getKeyByValuePath(cur);
|
|
729
|
+
keyEntities[key] && acc.push(key);
|
|
730
|
+
return acc;
|
|
731
|
+
}, []);
|
|
728
732
|
return formatKeys;
|
|
729
733
|
};
|
|
730
734
|
const needUpdateTreeData = needUpdate('treeData') || needUpdateData();
|
package/lib/es/tree/treeNode.js
CHANGED
|
@@ -41,6 +41,7 @@ export default class TreeNode extends PureComponent {
|
|
|
41
41
|
onNodeExpand(e, this.props);
|
|
42
42
|
};
|
|
43
43
|
this.onCheck = e => {
|
|
44
|
+
var _a, _b;
|
|
44
45
|
if (this.isDisabled()) {
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
@@ -48,7 +49,7 @@ export default class TreeNode extends PureComponent {
|
|
|
48
49
|
onNodeCheck
|
|
49
50
|
} = this.context;
|
|
50
51
|
e.stopPropagation();
|
|
51
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
52
|
+
(_b = (_a = e.nativeEvent) === null || _a === void 0 ? void 0 : _a.stopImmediatePropagation) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
52
53
|
onNodeCheck(e, this.props);
|
|
53
54
|
};
|
|
54
55
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.55.
|
|
3
|
+
"version": "2.55.5",
|
|
4
4
|
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@dnd-kit/core": "^6.0.8",
|
|
21
21
|
"@dnd-kit/sortable": "^7.0.2",
|
|
22
22
|
"@dnd-kit/utilities": "^3.2.1",
|
|
23
|
-
"@douyinfe/semi-animation": "2.55.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.55.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.55.
|
|
26
|
-
"@douyinfe/semi-icons": "2.55.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.55.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.55.
|
|
23
|
+
"@douyinfe/semi-animation": "2.55.5",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.55.5",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.55.5",
|
|
26
|
+
"@douyinfe/semi-icons": "2.55.5",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.55.5",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.55.5",
|
|
29
29
|
"async-validator": "^3.5.0",
|
|
30
30
|
"classnames": "^2.2.6",
|
|
31
31
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"author": "",
|
|
77
77
|
"license": "MIT",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "4b283dae2b36fe704607cd2a8c367a36950a759d",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|