@univerjs/core 0.10.1 → 0.10.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/index.js +6 -6
- package/lib/es/index.js +1049 -1111
- package/lib/index.js +1049 -1111
- package/lib/types/index.d.ts +1 -1
- package/lib/types/shared/name.d.ts +12 -1
- package/lib/types/shared/tools.d.ts +1 -20
- package/lib/umd/index.js +7 -7
- package/package.json +4 -4
package/lib/types/index.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ export * from './shared';
|
|
|
89
89
|
export { ImageCacheMap } from './shared/cache/image-cache';
|
|
90
90
|
export { isBlackColor, isWhiteColor } from './shared/color/color-kit';
|
|
91
91
|
export { cellToRange } from './shared/common';
|
|
92
|
-
export { nameCharacterCheck } from './shared/name';
|
|
92
|
+
export { customNameCharacterCheck, nameCharacterCheck } from './shared/name';
|
|
93
93
|
export { type BBox, type IRTreeItem, RBush, RTree } from './shared/r-tree';
|
|
94
94
|
export { getIntersectRange } from './shared/range';
|
|
95
95
|
export { afterTime, bufferDebounceTime, convertObservableToBehaviorSubject, fromCallback, takeAfter } from './shared/rxjs';
|
|
@@ -21,6 +21,17 @@
|
|
|
21
21
|
The name does not contain any of the following characters: : \ / ? * [ or ].
|
|
22
22
|
The name is not empty.
|
|
23
23
|
* @param name
|
|
24
|
-
* @returns
|
|
24
|
+
* @returns {boolean} Returns true if the name is valid, false otherwise.
|
|
25
25
|
*/
|
|
26
26
|
export declare function nameCharacterCheck(name: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Checks if the custom table name or custom name is valid based on the following criteria:
|
|
29
|
+
* - The name cannot conflict with existing sheet names.
|
|
30
|
+
* - The name cannot be empty.
|
|
31
|
+
* - The name must start with a letter or underscore.
|
|
32
|
+
* The name cannot contain spaces or invalid characters (e.g., :, \, /, ?, *, [, ]).
|
|
33
|
+
* @param name The name need to check
|
|
34
|
+
* @param sheetNameSet The set of existing sheet names to check against
|
|
35
|
+
* @returns {boolean} Returns true if the name is valid, false otherwise.
|
|
36
|
+
*/
|
|
37
|
+
export declare function customNameCharacterCheck(name: string, sheetNameSet: Set<string>): boolean;
|
|
@@ -20,9 +20,7 @@ export declare class Tools {
|
|
|
20
20
|
static getValueType(value: any): string;
|
|
21
21
|
static isDefine<T>(value?: T | void): value is T;
|
|
22
22
|
static isBlank(value: any): boolean;
|
|
23
|
-
static isBoolean(value?: any): value is boolean;
|
|
24
23
|
static isPlainObject(value: any): value is object;
|
|
25
|
-
static isFunction(value?: any): value is boolean;
|
|
26
24
|
static isDate(value?: Date): value is Date;
|
|
27
25
|
static isRegExp(value?: any): value is RegExp;
|
|
28
26
|
static isArray<T>(value?: any): value is T[];
|
|
@@ -31,19 +29,11 @@ export declare class Tools {
|
|
|
31
29
|
static isStringNumber(value?: any): boolean;
|
|
32
30
|
static isObject<T>(value?: any): value is T;
|
|
33
31
|
static isEmptyObject(value?: any): boolean;
|
|
34
|
-
static isMobile(): boolean;
|
|
35
32
|
static isTablet(): boolean;
|
|
36
|
-
static isWeChat(): boolean;
|
|
37
|
-
static isAndroid(): boolean;
|
|
38
33
|
static isIPhone(): boolean;
|
|
39
34
|
static isLegalUrl(url: string): boolean;
|
|
40
35
|
static normalizeUrl(url: string): string;
|
|
41
36
|
static topLevelDomainCombiningString(): string;
|
|
42
|
-
static itCount(count: number): Function;
|
|
43
|
-
static hasLength(target: IArguments | any[] | string, length?: number): boolean;
|
|
44
|
-
static capitalize(str: string): string;
|
|
45
|
-
static fCamelCase(_all: any, letter: string): string;
|
|
46
|
-
static camelCase(str: string): string;
|
|
47
37
|
/**
|
|
48
38
|
* remove all null from object
|
|
49
39
|
* @param obj
|
|
@@ -67,27 +57,20 @@ export declare class Tools {
|
|
|
67
57
|
*/
|
|
68
58
|
static numToWord(x: number): string;
|
|
69
59
|
/**
|
|
70
|
-
*
|
|
71
60
|
* Column subscript letter to number
|
|
72
61
|
*
|
|
73
|
-
* @privateRemarks
|
|
74
|
-
* zh: 列下标 字母转数字
|
|
75
|
-
*
|
|
76
62
|
* @param a - Column subscript letter,e.g.,"A1"
|
|
77
63
|
* @returns Column subscript number,e.g.,0
|
|
78
64
|
*
|
|
79
65
|
*/
|
|
80
66
|
static ABCatNum(a: string): number;
|
|
81
67
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* zh: 列下标 数字转字母
|
|
68
|
+
* Column subscript number to letter
|
|
85
69
|
*
|
|
86
70
|
* @param n Column subscript number,e.g.,0
|
|
87
71
|
* @returns Column subscript letter,e.g.,"A1"
|
|
88
72
|
*/
|
|
89
73
|
static chatAtABC(n: number): string;
|
|
90
|
-
static randSort<T>(arr: T[]): T[];
|
|
91
74
|
/**
|
|
92
75
|
* extend two objects
|
|
93
76
|
* @param originJson
|
|
@@ -95,8 +78,6 @@ export declare class Tools {
|
|
|
95
78
|
* @returns
|
|
96
79
|
*/
|
|
97
80
|
static commonExtend<T>(originJson: IKeyValue, extendJson: IKeyValue): T;
|
|
98
|
-
static commonExtend1<T>(originJson: IKeyValue, extendJson: IKeyValue): T;
|
|
99
|
-
static arrayToObject(array: IKeyValue[][]): IKeyValue;
|
|
100
81
|
static hasIntersectionBetweenTwoRanges(range1Start: number, range1End: number, range2Start: number, range2End: number): boolean;
|
|
101
82
|
static isStartValidPosition(name: string): boolean;
|
|
102
83
|
static isValidParameter(name: string): boolean;
|