@douyinfe/semi-foundation 2.62.0 → 2.62.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/lib/cjs/treeSelect/foundation.d.ts +3 -3
- package/lib/cjs/treeSelect/foundation.js +2 -6
- package/lib/cjs/upload/upload.css +4 -0
- package/lib/cjs/upload/upload.scss +9 -0
- package/lib/es/treeSelect/foundation.d.ts +3 -3
- package/lib/es/treeSelect/foundation.js +2 -6
- package/lib/es/upload/upload.css +4 -0
- package/lib/es/upload/upload.scss +9 -0
- package/package.json +3 -3
- package/treeSelect/foundation.ts +3 -9
- package/upload/upload.scss +9 -0
|
@@ -107,8 +107,6 @@ export interface TreeSelectAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
107
107
|
updateInputFocus: (bool: boolean) => void;
|
|
108
108
|
updateLoadKeys: (data: BasicTreeNodeData, resolve: (value?: any) => void) => void;
|
|
109
109
|
updateIsFocus: (bool: boolean) => void;
|
|
110
|
-
setClearInputFlag: (flag: boolean) => void;
|
|
111
|
-
getClearInputFlag: () => boolean;
|
|
112
110
|
}
|
|
113
111
|
export default class TreeSelectFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<TreeSelectAdapter<P, S>, P, S> {
|
|
114
112
|
constructor(adapter: TreeSelectAdapter<P, S>);
|
|
@@ -164,7 +162,9 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
|
|
|
164
162
|
handleSingleSelect(e: any, treeNode: BasicTreeNodeProps): void;
|
|
165
163
|
calcCheckedKeys(eventKey: BasicTreeNodeProps['eventKey'], targetStatus: boolean): {
|
|
166
164
|
checkedKeys: Set<string>;
|
|
167
|
-
halfCheckedKeys: Set<string>;
|
|
165
|
+
halfCheckedKeys: Set<string>; /**
|
|
166
|
+
* A11y: simulate selection click
|
|
167
|
+
*/
|
|
168
168
|
};
|
|
169
169
|
handleMultipleSelect(e: any, treeNode: BasicTreeNodeProps): void;
|
|
170
170
|
calcNonDisabledCheckedKeys(eventKey: string, targetStatus: boolean): {
|
|
@@ -794,8 +794,7 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
794
794
|
* When the search box is on the trigger, the focus event processing method
|
|
795
795
|
*/
|
|
796
796
|
handleInputTriggerFocus() {
|
|
797
|
-
|
|
798
|
-
inputValue && this.clearInput();
|
|
797
|
+
this.clearInput();
|
|
799
798
|
this._adapter.updateState({
|
|
800
799
|
inputTriggerFocus: true
|
|
801
800
|
});
|
|
@@ -809,11 +808,9 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
809
808
|
searchAutoFocus,
|
|
810
809
|
searchPosition
|
|
811
810
|
} = this.getProps();
|
|
812
|
-
const inputValue = this.getState('inputValue');
|
|
813
811
|
// 将 inputValue 清空,如果有选中值的话,选中项能够快速回显
|
|
814
812
|
// Clear the inputValue. If there is a selected value, the selected item can be quickly echoed.
|
|
815
813
|
if (isVisible === false && filterTreeNode) {
|
|
816
|
-
inputValue && this._adapter.setClearInputFlag(true);
|
|
817
814
|
this.clearInputValue();
|
|
818
815
|
}
|
|
819
816
|
if (filterTreeNode && searchPosition === _constants.strings.SEARCH_POSITION_DROPDOWN && isVisible && searchAutoFocus) {
|
|
@@ -830,8 +827,7 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
830
827
|
const {
|
|
831
828
|
filterTreeNode
|
|
832
829
|
} = this.getProps();
|
|
833
|
-
|
|
834
|
-
filterTreeNode && shouldClear && this.clearInput();
|
|
830
|
+
filterTreeNode && this.clearInput();
|
|
835
831
|
}
|
|
836
832
|
}
|
|
837
833
|
exports.default = TreeSelectFoundation;
|
|
@@ -291,6 +291,10 @@
|
|
|
291
291
|
object-fit: cover;
|
|
292
292
|
border-radius: var(--semi-border-radius-small);
|
|
293
293
|
}
|
|
294
|
+
.semi-upload-picture-file-card-custom-thumbnail .semi-image img {
|
|
295
|
+
width: inherit;
|
|
296
|
+
height: inherit;
|
|
297
|
+
}
|
|
294
298
|
.semi-upload-picture-file-card-close {
|
|
295
299
|
visibility: hidden;
|
|
296
300
|
display: inline-flex;
|
|
@@ -358,6 +358,15 @@ $module: #{$prefix}-upload;
|
|
|
358
358
|
border-radius: $radius-upload_picture_file_card_img;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
&-custom-thumbnail {
|
|
362
|
+
.#{$prefix}-image {
|
|
363
|
+
img {
|
|
364
|
+
width: inherit;
|
|
365
|
+
height: inherit;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
361
370
|
&-close {
|
|
362
371
|
visibility: hidden;
|
|
363
372
|
display: inline-flex;
|
|
@@ -107,8 +107,6 @@ export interface TreeSelectAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
107
107
|
updateInputFocus: (bool: boolean) => void;
|
|
108
108
|
updateLoadKeys: (data: BasicTreeNodeData, resolve: (value?: any) => void) => void;
|
|
109
109
|
updateIsFocus: (bool: boolean) => void;
|
|
110
|
-
setClearInputFlag: (flag: boolean) => void;
|
|
111
|
-
getClearInputFlag: () => boolean;
|
|
112
110
|
}
|
|
113
111
|
export default class TreeSelectFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<TreeSelectAdapter<P, S>, P, S> {
|
|
114
112
|
constructor(adapter: TreeSelectAdapter<P, S>);
|
|
@@ -164,7 +162,9 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
|
|
|
164
162
|
handleSingleSelect(e: any, treeNode: BasicTreeNodeProps): void;
|
|
165
163
|
calcCheckedKeys(eventKey: BasicTreeNodeProps['eventKey'], targetStatus: boolean): {
|
|
166
164
|
checkedKeys: Set<string>;
|
|
167
|
-
halfCheckedKeys: Set<string>;
|
|
165
|
+
halfCheckedKeys: Set<string>; /**
|
|
166
|
+
* A11y: simulate selection click
|
|
167
|
+
*/
|
|
168
168
|
};
|
|
169
169
|
handleMultipleSelect(e: any, treeNode: BasicTreeNodeProps): void;
|
|
170
170
|
calcNonDisabledCheckedKeys(eventKey: string, targetStatus: boolean): {
|
|
@@ -787,8 +787,7 @@ export default class TreeSelectFoundation extends BaseFoundation {
|
|
|
787
787
|
* When the search box is on the trigger, the focus event processing method
|
|
788
788
|
*/
|
|
789
789
|
handleInputTriggerFocus() {
|
|
790
|
-
|
|
791
|
-
inputValue && this.clearInput();
|
|
790
|
+
this.clearInput();
|
|
792
791
|
this._adapter.updateState({
|
|
793
792
|
inputTriggerFocus: true
|
|
794
793
|
});
|
|
@@ -802,11 +801,9 @@ export default class TreeSelectFoundation extends BaseFoundation {
|
|
|
802
801
|
searchAutoFocus,
|
|
803
802
|
searchPosition
|
|
804
803
|
} = this.getProps();
|
|
805
|
-
const inputValue = this.getState('inputValue');
|
|
806
804
|
// 将 inputValue 清空,如果有选中值的话,选中项能够快速回显
|
|
807
805
|
// Clear the inputValue. If there is a selected value, the selected item can be quickly echoed.
|
|
808
806
|
if (isVisible === false && filterTreeNode) {
|
|
809
|
-
inputValue && this._adapter.setClearInputFlag(true);
|
|
810
807
|
this.clearInputValue();
|
|
811
808
|
}
|
|
812
809
|
if (filterTreeNode && searchPosition === strings.SEARCH_POSITION_DROPDOWN && isVisible && searchAutoFocus) {
|
|
@@ -823,7 +820,6 @@ export default class TreeSelectFoundation extends BaseFoundation {
|
|
|
823
820
|
const {
|
|
824
821
|
filterTreeNode
|
|
825
822
|
} = this.getProps();
|
|
826
|
-
|
|
827
|
-
filterTreeNode && shouldClear && this.clearInput();
|
|
823
|
+
filterTreeNode && this.clearInput();
|
|
828
824
|
}
|
|
829
825
|
}
|
package/lib/es/upload/upload.css
CHANGED
|
@@ -291,6 +291,10 @@
|
|
|
291
291
|
object-fit: cover;
|
|
292
292
|
border-radius: var(--semi-border-radius-small);
|
|
293
293
|
}
|
|
294
|
+
.semi-upload-picture-file-card-custom-thumbnail .semi-image img {
|
|
295
|
+
width: inherit;
|
|
296
|
+
height: inherit;
|
|
297
|
+
}
|
|
294
298
|
.semi-upload-picture-file-card-close {
|
|
295
299
|
visibility: hidden;
|
|
296
300
|
display: inline-flex;
|
|
@@ -358,6 +358,15 @@ $module: #{$prefix}-upload;
|
|
|
358
358
|
border-radius: $radius-upload_picture_file_card_img;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
&-custom-thumbnail {
|
|
362
|
+
.#{$prefix}-image {
|
|
363
|
+
img {
|
|
364
|
+
width: inherit;
|
|
365
|
+
height: inherit;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
361
370
|
&-close {
|
|
362
371
|
visibility: hidden;
|
|
363
372
|
display: inline-flex;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.62.
|
|
3
|
+
"version": "2.62.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.62.
|
|
10
|
+
"@douyinfe/semi-animation": "2.62.1",
|
|
11
11
|
"@mdx-js/mdx": "^3.0.1",
|
|
12
12
|
"async-validator": "^3.5.0",
|
|
13
13
|
"classnames": "^2.2.6",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"*.scss",
|
|
29
29
|
"*.css"
|
|
30
30
|
],
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "99b473508df61ea87098d68db7d0d8a07c8c42b8",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
34
34
|
"@babel/preset-env": "^7.15.8",
|
package/treeSelect/foundation.ts
CHANGED
|
@@ -200,9 +200,7 @@ export interface TreeSelectAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
200
200
|
notifyLoad: (newLoadedKeys: Set<string>, data: BasicTreeNodeData) => void;
|
|
201
201
|
updateInputFocus: (bool: boolean) => void;
|
|
202
202
|
updateLoadKeys: (data: BasicTreeNodeData, resolve: (value?: any) => void) => void;
|
|
203
|
-
updateIsFocus: (bool: boolean) => void
|
|
204
|
-
setClearInputFlag: (flag: boolean) => void;
|
|
205
|
-
getClearInputFlag: () => boolean
|
|
203
|
+
updateIsFocus: (bool: boolean) => void
|
|
206
204
|
}
|
|
207
205
|
|
|
208
206
|
export default class TreeSelectFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<TreeSelectAdapter<P, S>, P, S> {
|
|
@@ -895,8 +893,7 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
|
|
|
895
893
|
* When the search box is on the trigger, the focus event processing method
|
|
896
894
|
*/
|
|
897
895
|
handleInputTriggerFocus() {
|
|
898
|
-
|
|
899
|
-
inputValue && this.clearInput();
|
|
896
|
+
this.clearInput();
|
|
900
897
|
this._adapter.updateState({
|
|
901
898
|
inputTriggerFocus: true
|
|
902
899
|
});
|
|
@@ -908,11 +905,9 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
|
|
|
908
905
|
|
|
909
906
|
handlePopoverVisibleChange(isVisible: boolean) {
|
|
910
907
|
const { filterTreeNode, searchAutoFocus, searchPosition } = this.getProps();
|
|
911
|
-
const inputValue = this.getState('inputValue');
|
|
912
908
|
// 将 inputValue 清空,如果有选中值的话,选中项能够快速回显
|
|
913
909
|
// Clear the inputValue. If there is a selected value, the selected item can be quickly echoed.
|
|
914
910
|
if (isVisible === false && filterTreeNode) {
|
|
915
|
-
inputValue && this._adapter.setClearInputFlag(true);
|
|
916
911
|
this.clearInputValue();
|
|
917
912
|
}
|
|
918
913
|
if (filterTreeNode && searchPosition === strings.SEARCH_POSITION_DROPDOWN && isVisible && searchAutoFocus) {
|
|
@@ -928,7 +923,6 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
|
|
|
928
923
|
// After the pop-up layer is completely closed, recalculate the expandedKey and flattenNode in the state through clearInput.
|
|
929
924
|
// Prevent the pop-up layer from flickering visually due to changes in the number of options in the pop-up panel when the pop-up layer is not collapsed.
|
|
930
925
|
const { filterTreeNode } = this.getProps();
|
|
931
|
-
|
|
932
|
-
filterTreeNode && shouldClear && this.clearInput();
|
|
926
|
+
filterTreeNode && this.clearInput();
|
|
933
927
|
}
|
|
934
928
|
}
|
package/upload/upload.scss
CHANGED
|
@@ -358,6 +358,15 @@ $module: #{$prefix}-upload;
|
|
|
358
358
|
border-radius: $radius-upload_picture_file_card_img;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
&-custom-thumbnail {
|
|
362
|
+
.#{$prefix}-image {
|
|
363
|
+
img {
|
|
364
|
+
width: inherit;
|
|
365
|
+
height: inherit;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
361
370
|
&-close {
|
|
362
371
|
visibility: hidden;
|
|
363
372
|
display: inline-flex;
|