@douyinfe/semi-foundation 2.70.0 → 2.70.1-alpha.1-patch-tooltip
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/lottie/foundation.d.ts +1 -1
- package/lib/cjs/tooltip/foundation.js +2 -1
- package/lib/cjs/tree/treeUtil.d.ts +1 -1
- package/lib/cjs/upload/constants.d.ts +1 -1
- package/lib/es/lottie/foundation.d.ts +1 -1
- package/lib/es/tooltip/foundation.js +2 -1
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/upload/constants.d.ts +1 -1
- package/lottie/foundation.ts +2 -2
- package/package.json +3 -3
- package/tooltip/foundation.ts +3 -2
|
@@ -8,7 +8,7 @@ export interface LottieAdapter<P = Record<string, any>, S = Record<string, any>>
|
|
|
8
8
|
export interface LottieBaseProps {
|
|
9
9
|
width?: string;
|
|
10
10
|
height?: string;
|
|
11
|
-
params: ArgsType<typeof lottie.loadAnimation>[0]
|
|
11
|
+
params: Partial<ArgsType<typeof lottie.loadAnimation>[0]>;
|
|
12
12
|
getAnimationInstance?: (instance: AnimationItem | null) => void;
|
|
13
13
|
getLottie?: (lottiePKG: typeof lottie) => void;
|
|
14
14
|
}
|
|
@@ -412,7 +412,8 @@ class Tooltip extends _foundation.default {
|
|
|
412
412
|
}
|
|
413
413
|
_togglePortalVisible(isVisible) {
|
|
414
414
|
const nowVisible = this.getState('visible');
|
|
415
|
-
|
|
415
|
+
const isInsert = this.getState("isInsert");
|
|
416
|
+
if (nowVisible !== isVisible || isInsert !== isVisible) {
|
|
416
417
|
this._adapter.togglePortalVisible(isVisible, () => {
|
|
417
418
|
if (isVisible) {
|
|
418
419
|
this._adapter.setInitialFocus();
|
|
@@ -83,6 +83,6 @@ export declare function getValueOrKey(data: any, keyMaps?: KeyMapProps): any;
|
|
|
83
83
|
export declare function normalizeValue(value: any, withObject: boolean, keyMaps?: KeyMapProps): any;
|
|
84
84
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
85
85
|
export declare function calcDisabledKeys(keyEntities: KeyEntities, keyMaps?: KeyMapProps): Set<string>;
|
|
86
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
86
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 0 | 1 | -1;
|
|
87
87
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
88
88
|
export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
|
|
@@ -18,7 +18,7 @@ declare const strings: {
|
|
|
18
18
|
DRAG_AREA_ILLEGAL: string;
|
|
19
19
|
TRIGGER_AUTO: "auto";
|
|
20
20
|
TRIGGER_CUSTOM: "custom";
|
|
21
|
-
UPLOAD_TRIGGER: ("
|
|
21
|
+
UPLOAD_TRIGGER: ("custom" | "auto")[];
|
|
22
22
|
VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
|
|
23
23
|
PROMPT_POSITION: readonly ["left", "right", "bottom"];
|
|
24
24
|
};
|
|
@@ -8,7 +8,7 @@ export interface LottieAdapter<P = Record<string, any>, S = Record<string, any>>
|
|
|
8
8
|
export interface LottieBaseProps {
|
|
9
9
|
width?: string;
|
|
10
10
|
height?: string;
|
|
11
|
-
params: ArgsType<typeof lottie.loadAnimation>[0]
|
|
11
|
+
params: Partial<ArgsType<typeof lottie.loadAnimation>[0]>;
|
|
12
12
|
getAnimationInstance?: (instance: AnimationItem | null) => void;
|
|
13
13
|
getLottie?: (lottiePKG: typeof lottie) => void;
|
|
14
14
|
}
|
|
@@ -405,7 +405,8 @@ export default class Tooltip extends BaseFoundation {
|
|
|
405
405
|
}
|
|
406
406
|
_togglePortalVisible(isVisible) {
|
|
407
407
|
const nowVisible = this.getState('visible');
|
|
408
|
-
|
|
408
|
+
const isInsert = this.getState("isInsert");
|
|
409
|
+
if (nowVisible !== isVisible || isInsert !== isVisible) {
|
|
409
410
|
this._adapter.togglePortalVisible(isVisible, () => {
|
|
410
411
|
if (isVisible) {
|
|
411
412
|
this._adapter.setInitialFocus();
|
|
@@ -83,6 +83,6 @@ export declare function getValueOrKey(data: any, keyMaps?: KeyMapProps): any;
|
|
|
83
83
|
export declare function normalizeValue(value: any, withObject: boolean, keyMaps?: KeyMapProps): any;
|
|
84
84
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
85
85
|
export declare function calcDisabledKeys(keyEntities: KeyEntities, keyMaps?: KeyMapProps): Set<string>;
|
|
86
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
86
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 0 | 1 | -1;
|
|
87
87
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
88
88
|
export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
|
|
@@ -18,7 +18,7 @@ declare const strings: {
|
|
|
18
18
|
DRAG_AREA_ILLEGAL: string;
|
|
19
19
|
TRIGGER_AUTO: "auto";
|
|
20
20
|
TRIGGER_CUSTOM: "custom";
|
|
21
|
-
UPLOAD_TRIGGER: ("
|
|
21
|
+
UPLOAD_TRIGGER: ("custom" | "auto")[];
|
|
22
22
|
VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
|
|
23
23
|
PROMPT_POSITION: readonly ["left", "right", "bottom"];
|
|
24
24
|
};
|
package/lottie/foundation.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface LottieAdapter<P = Record<string, any>, S = Record<string, any>>
|
|
|
10
10
|
export interface LottieBaseProps {
|
|
11
11
|
width?: string;
|
|
12
12
|
height?: string;
|
|
13
|
-
params: ArgsType<typeof lottie.loadAnimation>[0]
|
|
13
|
+
params: Partial<ArgsType<typeof lottie.loadAnimation>[0]>;
|
|
14
14
|
getAnimationInstance?: (instance: AnimationItem|null) => void;
|
|
15
15
|
getLottie?: (lottiePKG: typeof lottie) => void
|
|
16
16
|
|
|
@@ -57,4 +57,4 @@ class LottieFoundation <P = Record<string, any>, S = Record<string, any>> extend
|
|
|
57
57
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export default LottieFoundation;
|
|
60
|
+
export default LottieFoundation;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.70.
|
|
3
|
+
"version": "2.70.1-alpha.1-patch-tooltip",
|
|
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.70.
|
|
10
|
+
"@douyinfe/semi-animation": "2.70.1-alpha.1-patch-tooltip",
|
|
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": "94dff673c90c4fd4a2e4568ed25f197feaebe735",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
34
34
|
"@babel/preset-env": "^7.15.8",
|
package/tooltip/foundation.ts
CHANGED
|
@@ -191,7 +191,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
updateStateIfCursorOnTrigger = (trigger: HTMLElement)=>{
|
|
194
|
+
updateStateIfCursorOnTrigger = (trigger: HTMLElement) => {
|
|
195
195
|
if (trigger?.matches?.(":hover")) {
|
|
196
196
|
const eventNames = this._adapter.getEventName();
|
|
197
197
|
const triggerEventSet = this.getState("triggerEventSet");
|
|
@@ -379,7 +379,8 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
379
379
|
|
|
380
380
|
_togglePortalVisible(isVisible: boolean) {
|
|
381
381
|
const nowVisible = this.getState('visible');
|
|
382
|
-
|
|
382
|
+
const isInsert = this.getState("isInsert");
|
|
383
|
+
if (nowVisible !== isVisible || isInsert !== isVisible) {
|
|
383
384
|
this._adapter.togglePortalVisible(isVisible, () => {
|
|
384
385
|
if (isVisible) {
|
|
385
386
|
this._adapter.setInitialFocus();
|