@douyinfe/semi-foundation 2.20.4 → 2.20.5-alpha.2
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/datePicker/monthsGridFoundation.d.ts +1 -1
- package/lib/cjs/tree/treeUtil.d.ts +1 -1
- package/lib/cjs/upload/constants.d.ts +1 -1
- package/lib/cjs/utils/uuid.js +1 -1
- package/lib/es/datePicker/monthsGridFoundation.d.ts +1 -1
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/upload/constants.d.ts +1 -1
- package/lib/es/utils/uuid.js +1 -1
- package/package.json +2 -2
- package/utils/uuid.ts +1 -3
|
@@ -249,6 +249,6 @@ export default class MonthsGridFoundation extends BaseFoundation<MonthsGridAdapt
|
|
|
249
249
|
* - When yam open type is 'left' or 'right', weeks minHeight should be set
|
|
250
250
|
* If the minHeight is not set, the change of the number of weeks will cause the scrollList to be unstable
|
|
251
251
|
*/
|
|
252
|
-
getYAMOpenType(): "left" | "right" | "
|
|
252
|
+
getYAMOpenType(): "left" | "right" | "both" | "none";
|
|
253
253
|
}
|
|
254
254
|
export {};
|
|
@@ -74,6 +74,6 @@ export declare function getValueOrKey(data: any): any;
|
|
|
74
74
|
export declare function normalizeValue(value: any, withObject: boolean): any;
|
|
75
75
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
76
76
|
export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
|
|
77
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
77
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 0 | 1 | -1;
|
|
78
78
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
79
79
|
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/lib/cjs/utils/uuid.js
CHANGED
|
@@ -14,7 +14,7 @@ function getUuid(prefix) {
|
|
|
14
14
|
|
|
15
15
|
function getUuidv4() {
|
|
16
16
|
try {
|
|
17
|
-
return
|
|
17
|
+
return crypto.randomUUID();
|
|
18
18
|
} catch (err) {
|
|
19
19
|
return getUuid('semi');
|
|
20
20
|
}
|
|
@@ -249,6 +249,6 @@ export default class MonthsGridFoundation extends BaseFoundation<MonthsGridAdapt
|
|
|
249
249
|
* - When yam open type is 'left' or 'right', weeks minHeight should be set
|
|
250
250
|
* If the minHeight is not set, the change of the number of weeks will cause the scrollList to be unstable
|
|
251
251
|
*/
|
|
252
|
-
getYAMOpenType(): "left" | "right" | "
|
|
252
|
+
getYAMOpenType(): "left" | "right" | "both" | "none";
|
|
253
253
|
}
|
|
254
254
|
export {};
|
|
@@ -74,6 +74,6 @@ export declare function getValueOrKey(data: any): any;
|
|
|
74
74
|
export declare function normalizeValue(value: any, withObject: boolean): any;
|
|
75
75
|
export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
|
|
76
76
|
export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
|
|
77
|
-
export declare function calcDropRelativePosition(event: any, treeNode: any):
|
|
77
|
+
export declare function calcDropRelativePosition(event: any, treeNode: any): 0 | 1 | -1;
|
|
78
78
|
export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
|
|
79
79
|
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/lib/es/utils/uuid.js
CHANGED
|
@@ -4,7 +4,7 @@ export default function getUuid(prefix) {
|
|
|
4
4
|
|
|
5
5
|
function getUuidv4() {
|
|
6
6
|
try {
|
|
7
|
-
return
|
|
7
|
+
return crypto.randomUUID();
|
|
8
8
|
} catch (err) {
|
|
9
9
|
return getUuid('semi');
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.5-alpha.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "4c4b25fd1c11f392a1c323fb6a11a50a744b24ad",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/utils/uuid.ts
CHANGED
|
@@ -5,9 +5,7 @@ export default function getUuid(prefix: string) {
|
|
|
5
5
|
// https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
|
|
6
6
|
function getUuidv4() {
|
|
7
7
|
try {
|
|
8
|
-
return
|
|
9
|
-
(Number(c) ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (Number(c) / 4)))).toString(16)
|
|
10
|
-
);
|
|
8
|
+
return crypto.randomUUID();
|
|
11
9
|
} catch (err) {
|
|
12
10
|
return getUuid('semi');
|
|
13
11
|
}
|