@dxtmisha/functional-basic 1.7.1 → 1.8.0
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/CHANGELOG.md +10 -0
- package/README.md +2 -0
- package/ai-description.md +4 -16
- package/ai-doc.md +33 -112
- package/ai-types.md +660 -767
- package/dist/functions/domContentLoaded.d.ts +13 -0
- package/dist/functions/getRandomItem.d.ts +10 -0
- package/dist/functions/sortList.d.ts +11 -0
- package/dist/functions/toNumberPositive.d.ts +9 -0
- package/dist/library.d.ts +5 -0
- package/dist/library.js +584 -531
- package/dist/types/sortTypes.d.ts +20 -0
- package/package.json +17 -5
package/ai-types.md
CHANGED
|
@@ -10,242 +10,324 @@ The following is the content of "exports" from package.json:
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
export declare enum ApiMethodItem {
|
|
14
|
+
delete = "DELETE",
|
|
15
|
+
get = "GET",
|
|
16
|
+
post = "POST",
|
|
17
|
+
put = "PUT",
|
|
18
|
+
patch = "PATCH"
|
|
19
|
+
}
|
|
20
|
+
export type ApiCacheItem<T = any> = {
|
|
21
|
+
value: T;
|
|
22
|
+
age?: number;
|
|
23
|
+
cacheAge: number;
|
|
24
|
+
};
|
|
25
|
+
export type ApiCacheList = Record<string, ApiCacheItem>;
|
|
26
|
+
export type ApiConfig = {
|
|
27
|
+
urlRoot?: string;
|
|
28
|
+
origin?: string;
|
|
29
|
+
headers?: ApiHeadersValue;
|
|
30
|
+
requestDefault?: ApiDefaultValue;
|
|
31
|
+
preparation?: (apiFetch: ApiFetch) => Promise<void>;
|
|
32
|
+
end?: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>;
|
|
33
|
+
timeout?: number;
|
|
34
|
+
devMode?: boolean;
|
|
35
|
+
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
36
|
+
};
|
|
37
|
+
export type ApiData<T = any> = T extends any[] ? T : ApiDataItem<T>;
|
|
38
|
+
export type ApiDataValidation = {
|
|
39
|
+
status?: ApiStatusType;
|
|
40
|
+
code?: string | number;
|
|
41
|
+
message?: string;
|
|
42
|
+
error?: {
|
|
43
|
+
code?: string | number;
|
|
44
|
+
message?: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type ApiDataItem<T = any> = T & ApiDataValidation & {
|
|
48
|
+
data?: T;
|
|
49
|
+
success?: boolean;
|
|
50
|
+
statusObject?: ApiStatusItem;
|
|
51
|
+
errorObject?: ApiErrorItem;
|
|
52
|
+
};
|
|
53
|
+
export type ApiHeadersValue = Record<string, string> | (() => Record<string, string>);
|
|
54
|
+
export type ApiDefaultValue = Record<string, any> | (() => Record<string, any>);
|
|
55
|
+
export type ApiFetch = {
|
|
56
|
+
api?: boolean;
|
|
57
|
+
path?: string;
|
|
58
|
+
pathFull?: string;
|
|
59
|
+
method?: ApiMethod;
|
|
60
|
+
request?: FormData | Record<string, any> | string;
|
|
61
|
+
auth?: boolean;
|
|
62
|
+
headers?: Record<string, string> | null;
|
|
63
|
+
type?: string;
|
|
64
|
+
toData?: boolean;
|
|
65
|
+
global?: boolean;
|
|
66
|
+
devMode?: boolean;
|
|
67
|
+
hideError?: boolean;
|
|
68
|
+
hideLoading?: boolean;
|
|
69
|
+
retry?: number;
|
|
70
|
+
retryDelay?: number;
|
|
71
|
+
queryReturn?: (query: Response) => Promise<any | ApiDataValidation>;
|
|
72
|
+
globalPreparation?: boolean;
|
|
73
|
+
globalEnd?: boolean;
|
|
74
|
+
init?: RequestInit;
|
|
75
|
+
initError?: boolean;
|
|
76
|
+
timeout?: number;
|
|
77
|
+
controller?: AbortController;
|
|
78
|
+
cache?: number;
|
|
79
|
+
enableClientCache?: boolean;
|
|
80
|
+
cacheId?: number | string;
|
|
81
|
+
endResetLimit?: number;
|
|
82
|
+
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
83
|
+
};
|
|
84
|
+
export type ApiHydrationItem = {
|
|
85
|
+
path: string;
|
|
86
|
+
method: ApiMethod;
|
|
87
|
+
request?: ApiFetch['request'];
|
|
88
|
+
response: any;
|
|
89
|
+
};
|
|
90
|
+
export type ApiHydrationList = ApiHydrationItem[];
|
|
91
|
+
export type ApiErrorStorageItem = Record<string, any> & {
|
|
92
|
+
url: string | RegExp;
|
|
93
|
+
method: ApiMethodItem;
|
|
94
|
+
code?: string;
|
|
95
|
+
status?: number;
|
|
96
|
+
validation?: (response: Response) => boolean;
|
|
97
|
+
message?: string | ((response?: Response) => string);
|
|
98
|
+
};
|
|
99
|
+
export type ApiErrorStorageList = ApiErrorStorageItem[];
|
|
100
|
+
export type ApiMethod = string | ApiMethodItem;
|
|
101
|
+
export type ApiPreparationEnd = {
|
|
102
|
+
reset?: boolean;
|
|
103
|
+
data?: any;
|
|
104
|
+
};
|
|
105
|
+
export type ApiResponseItem = {
|
|
106
|
+
path: string | RegExp;
|
|
107
|
+
method: ApiMethod;
|
|
108
|
+
request?: ApiFetch['request'] | '*any';
|
|
109
|
+
response: any | ((request?: ApiFetch['request']) => any);
|
|
110
|
+
disable?: any;
|
|
111
|
+
isForGlobal?: boolean;
|
|
112
|
+
lag?: any;
|
|
113
|
+
};
|
|
114
|
+
export type ApiStatusItem = {
|
|
115
|
+
status?: number;
|
|
116
|
+
statusText?: string;
|
|
117
|
+
error?: string;
|
|
118
|
+
lastResponse?: any;
|
|
119
|
+
lastStatus?: ApiStatusType;
|
|
120
|
+
lastCode?: string;
|
|
121
|
+
lastMessage?: string;
|
|
122
|
+
};
|
|
123
|
+
export type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
|
|
124
|
+
export type ApiInstanceOptions = {
|
|
125
|
+
headersClass?: typeof ApiHeaders;
|
|
126
|
+
requestDefaultClass?: typeof ApiDefault;
|
|
127
|
+
statusClass?: typeof ApiStatus;
|
|
128
|
+
responseClass?: typeof ApiResponse;
|
|
129
|
+
preparationClass?: typeof ApiPreparation;
|
|
130
|
+
loadingClass?: LoadingInstance;
|
|
131
|
+
errorCenterClass?: ErrorCenterInstance;
|
|
132
|
+
hydrationClass?: typeof ApiHydration;
|
|
133
|
+
wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
|
|
134
|
+
};
|
|
14
135
|
export declare class Api {
|
|
15
136
|
static isLocalhost(): boolean;
|
|
16
|
-
static getItem():
|
|
17
|
-
static getStatus():
|
|
18
|
-
static getResponse():
|
|
19
|
-
static getHydration():
|
|
137
|
+
static getItem(): ApiInstance;
|
|
138
|
+
static getStatus(): ApiStatus;
|
|
139
|
+
static getResponse(): ApiResponse;
|
|
140
|
+
static getHydration(): ApiHydration;
|
|
20
141
|
static getHydrationScript(): string;
|
|
21
142
|
static getOrigin(): string;
|
|
22
143
|
static getUrl(path: string, api?: boolean): string;
|
|
23
|
-
static getBody(request?:
|
|
24
|
-
static getBodyForGet(request:
|
|
25
|
-
static setHeaders(headers:
|
|
26
|
-
static setRequestDefault(request:
|
|
144
|
+
static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
|
|
145
|
+
static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
|
|
146
|
+
static setHeaders(headers: ApiHeadersValue): void;
|
|
147
|
+
static setRequestDefault(request: ApiDefaultValue): void;
|
|
27
148
|
static setUrl(url: string): void;
|
|
28
|
-
static setPreparation(callback: (apiFetch:
|
|
29
|
-
static setEnd(callback: (query: Response, apiFetch:
|
|
149
|
+
static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
|
|
150
|
+
static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
|
|
30
151
|
static setTimeout(timeout: number): void;
|
|
31
152
|
static setOrigin(origin: string): void;
|
|
32
|
-
static setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch:
|
|
33
|
-
static setConfig(config?:
|
|
34
|
-
static request<T>(pathRequest: string |
|
|
35
|
-
static get<T>(request:
|
|
36
|
-
static post<T>(request:
|
|
37
|
-
static put<T>(request:
|
|
38
|
-
static patch<T>(request:
|
|
39
|
-
static delete<T>(request:
|
|
153
|
+
static setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): void;
|
|
154
|
+
static setConfig(config?: ApiConfig): void;
|
|
155
|
+
static request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
156
|
+
static get<T>(request: ApiFetch): Promise<T>;
|
|
157
|
+
static post<T>(request: ApiFetch): Promise<T>;
|
|
158
|
+
static put<T>(request: ApiFetch): Promise<T>;
|
|
159
|
+
static patch<T>(request: ApiFetch): Promise<T>;
|
|
160
|
+
static delete<T>(request: ApiFetch): Promise<T>;
|
|
40
161
|
}
|
|
41
|
-
|
|
42
|
-
// File: classes/ApiCache.d.ts
|
|
43
162
|
export declare class ApiCache {
|
|
44
|
-
static init(getListener: (key: string) => Promise<
|
|
163
|
+
static init(getListener: (key: string) => Promise<ApiCacheItem | undefined>, setListener: (key: string, value: ApiCacheItem) => Promise<boolean>, removeListener: (key: string) => Promise<boolean>, cacheStepAgeClearOld?: number): void;
|
|
45
164
|
static reset(): void;
|
|
46
165
|
static get<T>(key: string): Promise<T | undefined>;
|
|
47
|
-
static getByFetch<T>(fetch:
|
|
166
|
+
static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
|
|
48
167
|
static set<T>(key: string, value: T, age?: number): Promise<void>;
|
|
49
|
-
static setByFetch<T>(fetch:
|
|
168
|
+
static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
|
|
50
169
|
static remove(key: string): Promise<void>;
|
|
51
170
|
}
|
|
52
|
-
|
|
53
|
-
// File: classes/ApiDataReturn.d.ts
|
|
54
171
|
export declare class ApiDataReturn<T = any> {
|
|
55
|
-
constructor(apiFetch:
|
|
172
|
+
constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd, error?: ApiErrorItem | undefined);
|
|
56
173
|
init(): Promise<this>;
|
|
57
|
-
get():
|
|
58
|
-
getAndStatus(status:
|
|
59
|
-
getData():
|
|
174
|
+
get(): ApiData<T>;
|
|
175
|
+
getAndStatus(status: ApiStatus): ApiData<T>;
|
|
176
|
+
getData(): ApiData<T> | undefined;
|
|
60
177
|
}
|
|
61
|
-
|
|
62
|
-
// File: classes/ApiDefault.d.ts
|
|
63
178
|
export declare class ApiDefault {
|
|
64
179
|
is(): boolean;
|
|
65
180
|
get(): Record<string, any> | undefined;
|
|
66
|
-
request(request:
|
|
67
|
-
set(request:
|
|
181
|
+
request(request: ApiFetch['request']): ApiFetch['request'];
|
|
182
|
+
set(request: ApiDefaultValue): this;
|
|
68
183
|
}
|
|
69
|
-
|
|
70
|
-
// File: classes/ApiError.d.ts
|
|
71
184
|
export declare class ApiError {
|
|
72
|
-
static getStorage():
|
|
73
|
-
static add(item:
|
|
74
|
-
static getItem(method:
|
|
185
|
+
static getStorage(): ApiErrorStorage;
|
|
186
|
+
static add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): void;
|
|
187
|
+
static getItem(method: ApiMethodItem, response: Response): Promise<ApiErrorItem>;
|
|
75
188
|
}
|
|
76
|
-
|
|
77
|
-
// File: classes/ApiErrorItem.d.ts
|
|
78
189
|
export declare class ApiErrorItem {
|
|
79
|
-
constructor(method:
|
|
80
|
-
getMethod():
|
|
190
|
+
constructor(method: ApiMethodItem, response: Response, error: ApiErrorStorageItem);
|
|
191
|
+
getMethod(): ApiMethodItem;
|
|
81
192
|
getResponse(): Response;
|
|
82
|
-
getError():
|
|
193
|
+
getError(): ApiErrorStorageItem;
|
|
83
194
|
getCode(): string | undefined;
|
|
84
195
|
getMessage(): string | undefined;
|
|
85
196
|
getStatus(): number;
|
|
86
197
|
}
|
|
87
|
-
|
|
88
|
-
// File: classes/ApiErrorStorage.d.ts
|
|
89
198
|
export declare class ApiErrorStorage {
|
|
90
|
-
find(method:
|
|
91
|
-
add(item:
|
|
199
|
+
find(method: ApiMethodItem, response: Response): Promise<ApiErrorStorageItem>;
|
|
200
|
+
add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): this;
|
|
92
201
|
}
|
|
93
|
-
|
|
94
|
-
// File: classes/ApiHeaders.d.ts
|
|
95
202
|
export declare class ApiHeaders {
|
|
96
203
|
get(value?: Record<string, string> | null, type?: string | undefined | null): Record<string, string> | undefined;
|
|
97
|
-
getByRequest(request:
|
|
98
|
-
set(headers:
|
|
204
|
+
getByRequest(request: ApiFetch['request'], value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
|
|
205
|
+
set(headers: ApiHeadersValue): this;
|
|
99
206
|
}
|
|
100
|
-
|
|
101
|
-
// File: classes/ApiHydration.d.ts
|
|
102
207
|
export declare class ApiHydration {
|
|
103
|
-
initResponse(response:
|
|
104
|
-
toClient<T>(apiFetch:
|
|
208
|
+
initResponse(response: ApiResponse): void;
|
|
209
|
+
toClient<T>(apiFetch: ApiFetch, response: T): void;
|
|
105
210
|
toString(): string;
|
|
106
211
|
}
|
|
107
|
-
|
|
108
|
-
// File: classes/ApiInstance.d.ts
|
|
109
|
-
export type ApiInstanceOptions = {
|
|
110
|
-
headersClass?: any;
|
|
111
|
-
requestDefaultClass?: any;
|
|
112
|
-
statusClass?: any;
|
|
113
|
-
responseClass?: any;
|
|
114
|
-
preparationClass?: any;
|
|
115
|
-
loadingClass?: any;
|
|
116
|
-
errorCenterClass?: any;
|
|
117
|
-
hydrationClass?: any;
|
|
118
|
-
wrapper?: <R>(callback: () => Promise<R>, apiFetch: any) => Promise<R>;
|
|
119
|
-
};
|
|
120
212
|
export declare class ApiInstance {
|
|
121
213
|
constructor(url?: string, options?: ApiInstanceOptions);
|
|
122
214
|
isLocalhost(): boolean;
|
|
123
|
-
getStatus():
|
|
124
|
-
getResponse():
|
|
125
|
-
getHydration():
|
|
215
|
+
getStatus(): ApiStatus;
|
|
216
|
+
getResponse(): ApiResponse;
|
|
217
|
+
getHydration(): ApiHydration;
|
|
126
218
|
getOrigin(): string;
|
|
127
219
|
getUrl(path: string, api?: boolean): string;
|
|
128
|
-
getBody(request?:
|
|
129
|
-
getBodyForGet(request:
|
|
220
|
+
getBody(request?: ApiFetch['request'], method?: ApiMethod): string | FormData | undefined;
|
|
221
|
+
getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethod): string;
|
|
130
222
|
getHydrationScript(): string;
|
|
131
|
-
setHeaders(headers:
|
|
132
|
-
setRequestDefault(request:
|
|
223
|
+
setHeaders(headers: ApiHeadersValue): this;
|
|
224
|
+
setRequestDefault(request: ApiDefaultValue): this;
|
|
133
225
|
setUrl(url: string): this;
|
|
134
|
-
setPreparation(callback: (apiFetch:
|
|
135
|
-
setEnd(callback: (query: Response, apiFetch:
|
|
226
|
+
setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
227
|
+
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
136
228
|
setTimeout(timeout: number): this;
|
|
137
229
|
setOrigin(origin: string): this;
|
|
138
|
-
setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch:
|
|
139
|
-
request<T>(pathRequest: string |
|
|
140
|
-
get<T>(request:
|
|
141
|
-
post<T>(request:
|
|
142
|
-
put<T>(request:
|
|
143
|
-
patch<T>(request:
|
|
144
|
-
delete<T>(request:
|
|
230
|
+
setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): this;
|
|
231
|
+
request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
232
|
+
get<T>(request: ApiFetch): Promise<T>;
|
|
233
|
+
post<T>(request: ApiFetch): Promise<T>;
|
|
234
|
+
put<T>(request: ApiFetch): Promise<T>;
|
|
235
|
+
patch<T>(request: ApiFetch): Promise<T>;
|
|
236
|
+
delete<T>(request: ApiFetch): Promise<T>;
|
|
145
237
|
}
|
|
146
|
-
|
|
147
|
-
// File: classes/ApiPreparation.d.ts
|
|
148
238
|
export declare class ApiPreparation {
|
|
149
|
-
make(active: boolean, apiFetch:
|
|
150
|
-
makeEnd(active: boolean, query: Response, apiFetch:
|
|
151
|
-
set(callback: (apiFetch:
|
|
152
|
-
setEnd(callback: (query: Response, apiFetch:
|
|
239
|
+
make(active: boolean, apiFetch: ApiFetch): Promise<void>;
|
|
240
|
+
makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
|
|
241
|
+
set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
242
|
+
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
153
243
|
}
|
|
154
|
-
|
|
155
|
-
// File: classes/ApiResponse.d.ts
|
|
156
244
|
export declare class ApiResponse {
|
|
157
|
-
constructor(requestDefault:
|
|
158
|
-
get(path: string | undefined, method:
|
|
159
|
-
getList(): any[];
|
|
160
|
-
add(response:
|
|
245
|
+
constructor(requestDefault: ApiDefault);
|
|
246
|
+
get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
|
|
247
|
+
getList(): (ApiResponseItem & Record<string, any>)[];
|
|
248
|
+
add(response: ApiResponseItem | ApiResponseItem[]): this;
|
|
161
249
|
setDevMode(devMode: boolean): this;
|
|
162
|
-
emulator<T>(apiFetch:
|
|
163
|
-
emulatorAsync<T>(apiFetch:
|
|
250
|
+
emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
|
|
251
|
+
emulatorAsync<T>(apiFetch: ApiFetch): T | undefined;
|
|
164
252
|
}
|
|
165
|
-
|
|
166
|
-
// File: classes/ApiStatus.d.ts
|
|
167
253
|
export declare class ApiStatus {
|
|
168
|
-
get():
|
|
254
|
+
get(): ApiStatusItem | undefined;
|
|
169
255
|
getStatus(): number | undefined;
|
|
170
256
|
getStatusText(): string | undefined;
|
|
171
|
-
getStatusType():
|
|
257
|
+
getStatusType(): ApiStatusType | undefined;
|
|
172
258
|
getCode(): string | undefined;
|
|
173
259
|
getError(): string | undefined;
|
|
174
260
|
getResponse<T>(): T | undefined;
|
|
175
261
|
getMessage(): string;
|
|
176
|
-
set(data:
|
|
262
|
+
set(data: ApiStatusItem): this;
|
|
177
263
|
setStatus(status?: number, statusText?: string): this;
|
|
178
264
|
setError(error?: string): this;
|
|
179
265
|
setLastResponse(response?: any): this;
|
|
180
|
-
setLastStatus(status?:
|
|
266
|
+
setLastStatus(status?: ApiStatusType): this;
|
|
181
267
|
setLastCode(code?: string): this;
|
|
182
268
|
setLastMessage(message?: string): this;
|
|
183
269
|
}
|
|
184
|
-
|
|
185
|
-
// File: classes/BroadcastMessage.d.ts
|
|
186
270
|
export declare class BroadcastMessage<Message = any> {
|
|
187
|
-
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?:
|
|
271
|
+
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
|
|
188
272
|
getChannel(): BroadcastChannel | undefined;
|
|
189
273
|
post(message: Message): this;
|
|
190
274
|
setCallback(callback: (event: MessageEvent<Message>) => void): this;
|
|
191
275
|
setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
|
|
192
276
|
destroy(): this;
|
|
193
277
|
}
|
|
194
|
-
|
|
195
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Simple in-memory cache class that stores computed values by key.
|
|
280
|
+
* @deprecated This class is obsolete and should not be used
|
|
281
|
+
*/
|
|
196
282
|
export declare class Cache {
|
|
197
283
|
get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
198
284
|
getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
199
285
|
}
|
|
200
|
-
|
|
201
|
-
|
|
286
|
+
/**
|
|
287
|
+
* Class for managing a single cached value with dependency tracking.
|
|
288
|
+
* @deprecated This class is obsolete and should not be used
|
|
289
|
+
*/
|
|
202
290
|
export declare class CacheItem<T> {
|
|
203
291
|
constructor(callback: () => T);
|
|
204
292
|
getCache(comparison: any[]): T;
|
|
205
293
|
getCacheOld(): T | undefined;
|
|
206
294
|
getCacheAsync(comparison: any[]): Promise<T>;
|
|
207
295
|
}
|
|
208
|
-
|
|
209
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Static cache class that uses ServerStorage for persistent caching across the application.
|
|
298
|
+
* @deprecated This class is obsolete and should not be used
|
|
299
|
+
*/
|
|
210
300
|
export declare class CacheStatic {
|
|
211
301
|
static get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
212
302
|
static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
213
303
|
}
|
|
214
|
-
|
|
215
|
-
|
|
304
|
+
export type CookieSameSite = 'strict' | 'lax';
|
|
305
|
+
export type CookieOptions = {
|
|
306
|
+
age?: number;
|
|
307
|
+
sameSite?: CookieSameSite;
|
|
308
|
+
path?: string;
|
|
309
|
+
domain?: string;
|
|
310
|
+
secure?: boolean;
|
|
311
|
+
httpOnly?: boolean;
|
|
312
|
+
partitioned?: boolean;
|
|
313
|
+
arguments?: string[] | Record<string, string | number | boolean>;
|
|
314
|
+
};
|
|
216
315
|
export declare class Cookie<T> {
|
|
217
316
|
static getInstance<T>(name: string): Cookie<T>;
|
|
218
317
|
constructor(name: string);
|
|
219
|
-
get(defaultValue?: T | string | (() => (T | string)), options?:
|
|
220
|
-
set(value?: T | string | (() => (T | string)), options?:
|
|
318
|
+
get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
|
|
319
|
+
set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
|
|
221
320
|
remove(): void;
|
|
222
321
|
}
|
|
223
|
-
|
|
224
|
-
// File: classes/CookieBlock.d.ts
|
|
225
322
|
export declare class CookieBlock {
|
|
226
|
-
static getItem():
|
|
323
|
+
static getItem(): CookieBlockInstance;
|
|
227
324
|
static get(): boolean;
|
|
228
325
|
static set(value: boolean): void;
|
|
229
326
|
}
|
|
230
|
-
|
|
231
|
-
// File: classes/CookieBlockInstance.d.ts
|
|
232
327
|
export declare class CookieBlockInstance {
|
|
233
328
|
get(): boolean;
|
|
234
329
|
set(value: boolean): void;
|
|
235
330
|
}
|
|
236
|
-
|
|
237
|
-
// File: classes/CookieStorage.d.ts
|
|
238
|
-
export type CookieSameSite = 'strict' | 'lax';
|
|
239
|
-
export type CookieOptions = {
|
|
240
|
-
age?: number;
|
|
241
|
-
sameSite?: CookieSameSite;
|
|
242
|
-
path?: string;
|
|
243
|
-
domain?: string;
|
|
244
|
-
secure?: boolean;
|
|
245
|
-
httpOnly?: boolean;
|
|
246
|
-
partitioned?: boolean;
|
|
247
|
-
arguments?: string[] | Record<string, string | number | boolean>;
|
|
248
|
-
};
|
|
249
331
|
export declare class CookieStorage {
|
|
250
332
|
static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
|
|
251
333
|
static reset(): void;
|
|
@@ -254,28 +336,31 @@ export declare class CookieStorage {
|
|
|
254
336
|
static remove(name: string): void;
|
|
255
337
|
static update(): void;
|
|
256
338
|
}
|
|
257
|
-
|
|
258
|
-
// File: classes/DataStorage.d.ts
|
|
259
339
|
export declare class DataStorage<T> {
|
|
260
340
|
static setPrefix(newPrefix: string): void;
|
|
261
|
-
constructor(name: string, isSession?: boolean, errorCenter?:
|
|
341
|
+
constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
|
|
262
342
|
get(defaultValue?: T | (() => T), cache?: number): T | undefined;
|
|
263
343
|
set(value?: T | (() => T)): T | undefined;
|
|
264
344
|
remove(): this;
|
|
265
345
|
update(): this;
|
|
266
346
|
}
|
|
267
|
-
|
|
268
|
-
|
|
347
|
+
/**
|
|
348
|
+
* A class for working with dates.
|
|
349
|
+
* @remarks
|
|
350
|
+
* Creating a `Datetime` instance without a specific date (using the current time)
|
|
351
|
+
* for rendering in SSR may lead to hydration mismatches because the time or time zone
|
|
352
|
+
* on the server may differ from the time on the client.
|
|
353
|
+
*/
|
|
269
354
|
export declare class Datetime {
|
|
270
|
-
constructor(date?:
|
|
271
|
-
getIntl():
|
|
355
|
+
constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
|
|
356
|
+
getIntl(): GeoIntl;
|
|
272
357
|
getDate(): Date;
|
|
273
|
-
getType():
|
|
274
|
-
getHoursType():
|
|
358
|
+
getType(): GeoDate;
|
|
359
|
+
getHoursType(): GeoHours;
|
|
275
360
|
getHour24(): boolean;
|
|
276
361
|
getTimeZoneOffset(): number;
|
|
277
|
-
getTimeZone(style?:
|
|
278
|
-
getFirstDayCode():
|
|
362
|
+
getTimeZone(style?: GeoTimeZoneStyle): string;
|
|
363
|
+
getFirstDayCode(): GeoFirstDay;
|
|
279
364
|
getYear(): number;
|
|
280
365
|
getMonth(): number;
|
|
281
366
|
getDay(): number;
|
|
@@ -283,19 +368,19 @@ export declare class Datetime {
|
|
|
283
368
|
getMinute(): number;
|
|
284
369
|
getSecond(): number;
|
|
285
370
|
getMaxDay(): number;
|
|
286
|
-
locale(type?:
|
|
287
|
-
localeYear(style?:
|
|
288
|
-
localeMonth(style?:
|
|
289
|
-
localeDay(style?:
|
|
290
|
-
localeHour(style?:
|
|
291
|
-
localeMinute(style?:
|
|
292
|
-
localeSecond(style?:
|
|
371
|
+
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
|
|
372
|
+
localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
|
|
373
|
+
localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
|
|
374
|
+
localeDay(style?: Intl.DateTimeFormatOptions['day']): string;
|
|
375
|
+
localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
|
|
376
|
+
localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
|
|
377
|
+
localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
|
|
293
378
|
standard(timeZone?: boolean): string;
|
|
294
|
-
setDate(value:
|
|
295
|
-
setType(value:
|
|
379
|
+
setDate(value: NumberOrStringOrDate): this;
|
|
380
|
+
setType(value: GeoDate): this;
|
|
296
381
|
setHour24(value: boolean): this;
|
|
297
382
|
setCode(code: string): this;
|
|
298
|
-
setWatch(watch: (date: Date, type:
|
|
383
|
+
setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
|
|
299
384
|
setYear(value: number): this;
|
|
300
385
|
setMonth(value: number): this;
|
|
301
386
|
setDay(value: number): this;
|
|
@@ -339,54 +424,70 @@ export declare class Datetime {
|
|
|
339
424
|
cloneDayNext(): Datetime;
|
|
340
425
|
cloneDayPrevious(): Datetime;
|
|
341
426
|
}
|
|
342
|
-
|
|
343
|
-
|
|
427
|
+
export type ErrorCenterGroup = string | undefined;
|
|
428
|
+
export type ErrorCenterCauseItem<D = any> = {
|
|
429
|
+
group?: ErrorCenterGroup;
|
|
430
|
+
code: string;
|
|
431
|
+
priority?: number;
|
|
432
|
+
label?: string;
|
|
433
|
+
message?: string;
|
|
434
|
+
details?: D;
|
|
435
|
+
};
|
|
436
|
+
export type ErrorCenterCauseList = ErrorCenterCauseItem[];
|
|
437
|
+
export type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;
|
|
438
|
+
export type ErrorCenterHandlerItem = {
|
|
439
|
+
group?: ErrorCenterGroup;
|
|
440
|
+
handlers: ErrorCenterHandlerCallback[];
|
|
441
|
+
};
|
|
442
|
+
export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
|
|
344
443
|
export declare class ErrorCenter {
|
|
345
|
-
static getItem():
|
|
444
|
+
static getItem(): ErrorCenterInstance;
|
|
346
445
|
static has(code: string, group?: string): boolean;
|
|
347
|
-
static get(code: string, group?: string):
|
|
348
|
-
static add(cause:
|
|
349
|
-
static addList(causes:
|
|
350
|
-
static addHandler(group:
|
|
351
|
-
static addHandlerList(handlers:
|
|
352
|
-
static addCallback(callback:
|
|
353
|
-
static on(cause:
|
|
446
|
+
static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
447
|
+
static add(cause: ErrorCenterCauseItem): void;
|
|
448
|
+
static addList(causes: ErrorCenterCauseList): void;
|
|
449
|
+
static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
|
|
450
|
+
static addHandlerList(handlers: ErrorCenterHandlerList): void;
|
|
451
|
+
static addCallback(callback: ErrorCenterHandlerCallback): void;
|
|
452
|
+
static on(cause: ErrorCenterCauseItem): void;
|
|
354
453
|
}
|
|
355
|
-
|
|
356
|
-
// File: classes/ErrorCenterHandler.d.ts
|
|
357
454
|
export declare class ErrorCenterHandler {
|
|
358
|
-
constructor(handlers?:
|
|
359
|
-
has(group:
|
|
360
|
-
get(group:
|
|
361
|
-
add(group:
|
|
362
|
-
addList(handlers:
|
|
363
|
-
addCallback(callback:
|
|
364
|
-
on(cause:
|
|
455
|
+
constructor(handlers?: ErrorCenterHandlerList);
|
|
456
|
+
has(group: ErrorCenterGroup): boolean;
|
|
457
|
+
get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
|
|
458
|
+
add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
459
|
+
addList(handlers: ErrorCenterHandlerList): this;
|
|
460
|
+
addCallback(callback: ErrorCenterHandlerCallback): this;
|
|
461
|
+
on(cause: ErrorCenterCauseItem): this;
|
|
365
462
|
}
|
|
366
|
-
|
|
367
|
-
// File: classes/ErrorCenterInstance.d.ts
|
|
368
463
|
export declare class ErrorCenterInstance {
|
|
369
|
-
constructor(causes?:
|
|
464
|
+
constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
|
|
370
465
|
has(code: string, group?: string): boolean;
|
|
371
|
-
get(code: string, group?: string):
|
|
372
|
-
add(cause:
|
|
373
|
-
addList(causes:
|
|
374
|
-
addHandler(group:
|
|
375
|
-
addHandlerList(handlers:
|
|
376
|
-
addCallback(callback:
|
|
377
|
-
on(cause:
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
466
|
+
get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
467
|
+
add(cause: ErrorCenterCauseItem): this;
|
|
468
|
+
addList(causes: ErrorCenterCauseList): this;
|
|
469
|
+
addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
470
|
+
addHandlerList(handlers: ErrorCenterHandlerList): this;
|
|
471
|
+
addCallback(callback: ErrorCenterHandlerCallback): this;
|
|
472
|
+
on(cause: ErrorCenterCauseItem): this;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Advanced wrapper for managing event listeners on DOM elements or the `window` object.
|
|
476
|
+
* @example
|
|
477
|
+
* ```typescript
|
|
478
|
+
* const clickEvent = new EventItem('.btn', 'click', (e) => console.log('Clicked!'));
|
|
479
|
+
* clickEvent.start();
|
|
480
|
+
* ```
|
|
481
|
+
*/
|
|
482
|
+
export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
|
|
483
|
+
constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
|
|
383
484
|
isActive(): boolean;
|
|
384
485
|
getElement(): E | undefined;
|
|
385
|
-
setElement(elementSelector?:
|
|
386
|
-
setElementControl<EC extends HTMLElement>(elementSelector?:
|
|
486
|
+
setElement(elementSelector?: ElementOrString<E>): this;
|
|
487
|
+
setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
|
|
387
488
|
setType(type: string | string[]): this;
|
|
388
|
-
setListener(listener:
|
|
389
|
-
setOptions(options?:
|
|
489
|
+
setListener(listener: EventListenerDetail<O, D>): this;
|
|
490
|
+
setOptions(options?: EventOptions): this;
|
|
390
491
|
setDetail(detail?: D): this;
|
|
391
492
|
dispatch(detail?: D | undefined): this;
|
|
392
493
|
start(): this;
|
|
@@ -394,23 +495,77 @@ export declare class EventItem<E extends any, O extends Event, D extends Record<
|
|
|
394
495
|
toggle(activity: boolean): this;
|
|
395
496
|
reset(): this;
|
|
396
497
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
498
|
+
export declare enum FormattersType {
|
|
499
|
+
currency = "currency",
|
|
500
|
+
date = "date",
|
|
501
|
+
name = "name",
|
|
502
|
+
number = "number",
|
|
503
|
+
plural = "plural",
|
|
504
|
+
unit = "unit"
|
|
505
|
+
}
|
|
506
|
+
export type FormattersOptionsCurrency = {
|
|
507
|
+
currencyPropName?: string;
|
|
508
|
+
options?: string | Intl.NumberFormatOptions;
|
|
509
|
+
numberOnly?: boolean;
|
|
510
|
+
};
|
|
511
|
+
export type FormattersOptionsDate = {
|
|
512
|
+
type?: GeoDate;
|
|
513
|
+
options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions;
|
|
514
|
+
hour24?: boolean;
|
|
515
|
+
};
|
|
516
|
+
export type FormattersOptionsName = {
|
|
517
|
+
lastPropName?: string;
|
|
518
|
+
firstPropName?: string;
|
|
519
|
+
surname?: string;
|
|
520
|
+
short?: boolean;
|
|
521
|
+
};
|
|
522
|
+
export type FormattersOptionsNumber = {
|
|
523
|
+
options?: Intl.NumberFormatOptions;
|
|
524
|
+
};
|
|
525
|
+
export type FormattersOptionsPlural = {
|
|
526
|
+
words: string;
|
|
527
|
+
options?: Intl.PluralRulesOptions;
|
|
528
|
+
optionsNumber?: Intl.NumberFormatOptions;
|
|
529
|
+
};
|
|
530
|
+
export type FormattersOptionsUnit = {
|
|
531
|
+
unit: string | Intl.NumberFormatOptions;
|
|
532
|
+
};
|
|
533
|
+
export type FormattersOptionsInformation<Type extends FormattersType> = Type extends FormattersType.currency ? FormattersOptionsCurrency : Type extends FormattersType.date ? FormattersOptionsDate : Type extends FormattersType.name ? FormattersOptionsName : Type extends FormattersType.number ? FormattersOptionsNumber : Type extends FormattersType.plural ? FormattersOptionsPlural : Type extends FormattersType.unit ? FormattersOptionsUnit : Record<string, any>;
|
|
534
|
+
export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
|
|
535
|
+
type?: Type;
|
|
536
|
+
transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
|
|
537
|
+
options?: FormattersOptionsInformation<Type>;
|
|
538
|
+
};
|
|
539
|
+
export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
|
|
540
|
+
export type FormattersListItem = Record<string, any>;
|
|
541
|
+
export type FormattersList<Item extends FormattersListItem> = Item[];
|
|
542
|
+
export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
|
|
543
|
+
export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
|
|
544
|
+
export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
|
|
545
|
+
export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
|
|
546
|
+
[K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
547
|
+
};
|
|
548
|
+
export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
|
|
549
|
+
export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
|
|
550
|
+
export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
|
|
551
|
+
export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
|
|
552
|
+
export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
|
|
553
|
+
export type FormattersReturn<List extends FormattersListProp, Options extends FormattersOptionsList = FormattersOptionsList, Item extends FormattersItemProp<List> = FormattersItemProp<List>> = List extends any[] ? FormattersListColumns<Item, Options> : (FormattersListColumnItem<Item, Options> | undefined);
|
|
554
|
+
export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
|
|
400
555
|
constructor(options: Options, list?: List | undefined);
|
|
401
556
|
is(): boolean;
|
|
402
|
-
isArray():
|
|
557
|
+
isArray(): this is this & {
|
|
558
|
+
list: FormattersList<Item>;
|
|
559
|
+
};
|
|
403
560
|
length(): number;
|
|
404
|
-
getList():
|
|
561
|
+
getList(): FormattersList<Item>;
|
|
405
562
|
getOptions(): Options;
|
|
406
563
|
setList(list?: List): this;
|
|
407
|
-
to():
|
|
564
|
+
to(): FormattersReturn<List, Options>;
|
|
408
565
|
}
|
|
409
|
-
|
|
410
|
-
// File: classes/Geo.d.ts
|
|
411
566
|
export declare class Geo {
|
|
412
|
-
static getObject():
|
|
413
|
-
static get():
|
|
567
|
+
static getObject(): GeoInstance;
|
|
568
|
+
static get(): GeoItemFull;
|
|
414
569
|
static getCountry(): string;
|
|
415
570
|
static getLanguage(): string;
|
|
416
571
|
static getStandard(): string;
|
|
@@ -418,40 +573,38 @@ export declare class Geo {
|
|
|
418
573
|
static getLocation(): string;
|
|
419
574
|
static getLocationCountry(): string;
|
|
420
575
|
static getLocationLanguage(): string;
|
|
421
|
-
static getItem():
|
|
422
|
-
static getList():
|
|
423
|
-
static getByCode(code?: string):
|
|
424
|
-
static getByCodeFull(code: string):
|
|
425
|
-
static getByCountry(country: string):
|
|
426
|
-
static getByLanguage(language: string):
|
|
576
|
+
static getItem(): GeoItemFull;
|
|
577
|
+
static getList(): GeoItem[];
|
|
578
|
+
static getByCode(code?: string): GeoItemFull;
|
|
579
|
+
static getByCodeFull(code: string): GeoItem | undefined;
|
|
580
|
+
static getByCountry(country: string): GeoItem | undefined;
|
|
581
|
+
static getByLanguage(language: string): GeoItem | undefined;
|
|
427
582
|
static getTimezone(): number;
|
|
428
583
|
static getTimezoneFormat(): string;
|
|
429
|
-
static find(code: string):
|
|
430
|
-
static toStandard(item:
|
|
584
|
+
static find(code: string): GeoItemFull;
|
|
585
|
+
static toStandard(item: GeoItem): string;
|
|
431
586
|
static set(code: string, save?: boolean): void;
|
|
432
587
|
static setTimezone(timezone: number): void;
|
|
433
588
|
static setValueDefault(code?: string | (() => string)): void;
|
|
434
589
|
}
|
|
435
|
-
|
|
436
|
-
// File: classes/GeoFlag.d.ts
|
|
590
|
+
export declare const GEO_FLAG_ICON_NAME = "f";
|
|
437
591
|
export declare class GeoFlag {
|
|
438
592
|
static flags: Record<string, string>;
|
|
439
593
|
constructor(code?: string);
|
|
440
|
-
get(code?: string):
|
|
441
|
-
getLanguage(code?: string):
|
|
594
|
+
get(code?: string): GeoFlagItem | undefined;
|
|
595
|
+
getLanguage(code?: string): GeoFlagItem | undefined;
|
|
442
596
|
getCode(): string;
|
|
443
597
|
getFlag(code?: string): string | undefined;
|
|
444
|
-
getList(codes?: string[], sort?: boolean):
|
|
445
|
-
getListLanguage(codes?: string[], sort?: boolean):
|
|
446
|
-
getNational(codes?: string[], sort?: boolean):
|
|
447
|
-
getNationalLanguage(codes?: string[], sort?: boolean):
|
|
598
|
+
getList(codes?: string[], sort?: boolean): GeoFlagItem[];
|
|
599
|
+
getListLanguage(codes?: string[], sort?: boolean): GeoFlagItem[];
|
|
600
|
+
getNational(codes?: string[], sort?: boolean): GeoFlagNational[];
|
|
601
|
+
getNationalLanguage(codes?: string[], sort?: boolean): GeoFlagNational[];
|
|
448
602
|
setCode(code: string): this;
|
|
449
603
|
}
|
|
450
|
-
|
|
451
|
-
// File: classes/GeoInstance.d.ts
|
|
604
|
+
export declare const UI_GEO_COOKIE_KEY = "ui-geo-code";
|
|
452
605
|
export declare class GeoInstance {
|
|
453
606
|
constructor();
|
|
454
|
-
get():
|
|
607
|
+
get(): GeoItemFull;
|
|
455
608
|
getCountry(): string;
|
|
456
609
|
getLanguage(): string;
|
|
457
610
|
getStandard(): string;
|
|
@@ -459,155 +612,147 @@ export declare class GeoInstance {
|
|
|
459
612
|
getLocation(): string;
|
|
460
613
|
getLocationCountry(): string;
|
|
461
614
|
getLocationLanguage(): string;
|
|
462
|
-
getItem():
|
|
463
|
-
getList():
|
|
464
|
-
getByCode(code?: string):
|
|
465
|
-
getByCodeFull(code: string):
|
|
466
|
-
getByCountry(country: string):
|
|
467
|
-
getByLanguage(language: string):
|
|
615
|
+
getItem(): GeoItemFull;
|
|
616
|
+
getList(): GeoItem[];
|
|
617
|
+
getByCode(code?: string): GeoItemFull;
|
|
618
|
+
getByCodeFull(code: string): GeoItem | undefined;
|
|
619
|
+
getByCountry(country: string): GeoItem | undefined;
|
|
620
|
+
getByLanguage(language: string): GeoItem | undefined;
|
|
468
621
|
getTimezone(): number;
|
|
469
622
|
getTimezoneFormat(): string;
|
|
470
|
-
find(code: string):
|
|
471
|
-
toStandard(item:
|
|
623
|
+
find(code: string): GeoItemFull;
|
|
624
|
+
toStandard(item: GeoItem, language?: string): string;
|
|
472
625
|
set(code: string, save?: boolean): void;
|
|
473
626
|
setTimezone(timezone: number): void;
|
|
474
627
|
setValueDefault(code?: string | (() => string)): void;
|
|
475
628
|
}
|
|
476
|
-
|
|
477
|
-
// File: classes/GeoIntl.d.ts
|
|
478
629
|
export declare class GeoIntl {
|
|
479
630
|
static isItem(code?: string): boolean;
|
|
480
631
|
static getLocation(code?: string): string;
|
|
481
632
|
static getInstance(code?: string): GeoIntl;
|
|
482
|
-
constructor(code?: string, errorCenter?:
|
|
633
|
+
constructor(code?: string, errorCenter?: ErrorCenterInstance);
|
|
483
634
|
getLocation(): string;
|
|
484
635
|
getFirstDay(): string;
|
|
485
|
-
display(value?: string, typeOptions?:
|
|
486
|
-
languageName(value?: string, style?:
|
|
487
|
-
countryName(value?: string, style?:
|
|
636
|
+
display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
|
|
637
|
+
languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
638
|
+
countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
488
639
|
fullName(last: string, first: string, surname?: string, short?: boolean): string;
|
|
489
|
-
number(value:
|
|
640
|
+
number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
490
641
|
decimal(): string;
|
|
491
|
-
currency(value:
|
|
492
|
-
currencySymbol(currency: string, currencyDisplay?:
|
|
493
|
-
unit(value:
|
|
494
|
-
sizeFile(value:
|
|
495
|
-
percent(value:
|
|
496
|
-
percentBy100(value:
|
|
497
|
-
plural(value:
|
|
498
|
-
date(value:
|
|
499
|
-
relative(value:
|
|
500
|
-
relativeLimit(value:
|
|
501
|
-
relativeByValue(value:
|
|
502
|
-
month(value?:
|
|
503
|
-
months(style?:
|
|
504
|
-
weekday(value?:
|
|
505
|
-
weekdays(style?:
|
|
506
|
-
time(value:
|
|
642
|
+
currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
|
|
643
|
+
currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
|
|
644
|
+
unit(value: NumberOrString, unitOptions?: string | Intl.NumberFormatOptions): string;
|
|
645
|
+
sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
|
|
646
|
+
percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
647
|
+
percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
648
|
+
plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
|
|
649
|
+
date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
|
|
650
|
+
relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
|
|
651
|
+
relativeLimit(value: NumberOrStringOrDate, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): string;
|
|
652
|
+
relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
|
|
653
|
+
month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
|
|
654
|
+
months(style?: Intl.DateTimeFormatOptions['month']): ItemValue<number | undefined>[];
|
|
655
|
+
weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
|
|
656
|
+
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
|
|
657
|
+
time(value: NumberOrStringOrDate): string;
|
|
507
658
|
sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
|
|
508
659
|
}
|
|
509
|
-
|
|
510
|
-
// File: classes/GeoPhone.d.ts
|
|
511
660
|
export declare class GeoPhone {
|
|
512
|
-
static get(code: string):
|
|
513
|
-
static getByPhone(phone: string):
|
|
514
|
-
static getByCode(code: string):
|
|
515
|
-
static getList():
|
|
516
|
-
static getMap(): Record<string,
|
|
661
|
+
static get(code: string): GeoPhoneValue | undefined;
|
|
662
|
+
static getByPhone(phone: string): GeoPhoneMapInfo;
|
|
663
|
+
static getByCode(code: string): GeoPhoneMap | undefined;
|
|
664
|
+
static getList(): GeoPhoneValue[];
|
|
665
|
+
static getMap(): Record<string, GeoPhoneMap>;
|
|
517
666
|
static toMask(phone: string, masks?: string[]): string | undefined;
|
|
518
667
|
static removeZero(phone: string): string;
|
|
519
668
|
}
|
|
520
|
-
|
|
521
|
-
// File: classes/GeoUnit.d.ts
|
|
522
669
|
export declare class GeoUnit {
|
|
523
670
|
static getInstance(code?: string): GeoUnit;
|
|
524
671
|
constructor(code?: string);
|
|
525
672
|
getLocation(): string;
|
|
526
|
-
millimeter(value:
|
|
527
|
-
centimeter(value:
|
|
528
|
-
meter(value:
|
|
529
|
-
kilometer(value:
|
|
530
|
-
squareMeter(value:
|
|
531
|
-
hectare(value:
|
|
532
|
-
gram(value:
|
|
533
|
-
kilogram(value:
|
|
534
|
-
tonne(value:
|
|
535
|
-
milliliter(value:
|
|
536
|
-
liter(value:
|
|
537
|
-
celsius(value:
|
|
538
|
-
kilometerPerHour(value:
|
|
539
|
-
format(value:
|
|
673
|
+
millimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
674
|
+
centimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
675
|
+
meter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
676
|
+
kilometer(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
677
|
+
squareMeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
678
|
+
hectare(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
679
|
+
gram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
680
|
+
kilogram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
681
|
+
tonne(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
682
|
+
milliliter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
683
|
+
liter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
684
|
+
celsius(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
685
|
+
kilometerPerHour(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
686
|
+
format(value: NumberOrString, unit: string, options?: Intl.NumberFormatOptions): string;
|
|
540
687
|
}
|
|
541
|
-
|
|
542
|
-
// File: classes/Global.d.ts
|
|
543
688
|
export declare class Global {
|
|
544
689
|
static getItem(): Record<string, any>;
|
|
545
690
|
static get<R = any>(name: string): R;
|
|
546
691
|
static add(data: Record<string, any>): void;
|
|
547
692
|
}
|
|
548
|
-
|
|
549
|
-
// File: classes/Hash.d.ts
|
|
550
693
|
export declare class Hash {
|
|
551
|
-
static getItem():
|
|
694
|
+
static getItem(): HashInstance;
|
|
552
695
|
static get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
553
696
|
static set<T>(name: string, callback: T | (() => T)): void;
|
|
554
697
|
static addWatch<T>(name: string, callback: (value: T) => void): void;
|
|
555
698
|
static removeWatch<T>(name: string, callback: (value: T) => void): void;
|
|
556
699
|
static reload(): void;
|
|
557
700
|
}
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
export
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
701
|
+
export declare class HashInstance extends UrlInstanceAbstract {}
|
|
702
|
+
export type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
|
|
703
|
+
export type IconsConfig = {
|
|
704
|
+
url?: string;
|
|
705
|
+
list?: Record<string, IconsItem>;
|
|
706
|
+
};
|
|
564
707
|
export declare class Icons {
|
|
565
708
|
static is(index: string): boolean;
|
|
566
709
|
static get(index: string, url?: string, wait?: number): Promise<string>;
|
|
567
710
|
static getAsync(index: string, url?: string): string;
|
|
568
711
|
static getNameList(): string[];
|
|
569
712
|
static getUrlGlobal(): string;
|
|
570
|
-
static add(index: string, file:
|
|
713
|
+
static add(index: string, file: IconsItem): void;
|
|
571
714
|
static addLoad(index: string): void;
|
|
572
715
|
static addGlobal(index: string, file: string): void;
|
|
573
|
-
static addByList(list: Record<string,
|
|
716
|
+
static addByList(list: Record<string, IconsItem>): void;
|
|
574
717
|
static setUrl(url: string): void;
|
|
575
|
-
static setConfig(config:
|
|
718
|
+
static setConfig(config: IconsConfig): void;
|
|
576
719
|
}
|
|
577
|
-
|
|
578
|
-
// File: classes/Loading.d.ts
|
|
579
720
|
export declare class Loading {
|
|
580
721
|
static is(): boolean;
|
|
581
722
|
static get(): number;
|
|
582
|
-
static getItem():
|
|
723
|
+
static getItem(): LoadingInstance;
|
|
583
724
|
static show(): void;
|
|
584
725
|
static hide(): void;
|
|
585
|
-
static registrationEvent(listener:
|
|
586
|
-
static unregistrationEvent(listener:
|
|
726
|
+
static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
727
|
+
static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
587
728
|
}
|
|
588
|
-
|
|
589
|
-
|
|
729
|
+
export type LoadingDetail = {
|
|
730
|
+
loading: boolean;
|
|
731
|
+
};
|
|
732
|
+
export type LoadingRegistrationItem = {
|
|
733
|
+
item: EventItem<Window, CustomEvent, LoadingDetail>;
|
|
734
|
+
listener: EventListenerDetail<CustomEvent, LoadingDetail>;
|
|
735
|
+
element?: ElementOrString<HTMLElement>;
|
|
736
|
+
};
|
|
590
737
|
export declare class LoadingInstance {
|
|
591
738
|
constructor(eventName?: string);
|
|
592
739
|
is(): boolean;
|
|
593
740
|
get(): number;
|
|
594
741
|
show(): void;
|
|
595
742
|
hide(): void;
|
|
596
|
-
registrationEvent(listener:
|
|
597
|
-
unregistrationEvent(listener:
|
|
743
|
+
registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
744
|
+
unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
598
745
|
}
|
|
599
|
-
|
|
600
|
-
// File: classes/Meta.d.ts
|
|
601
|
-
export declare class Meta extends any {
|
|
746
|
+
export declare class Meta extends MetaManager<MetaTag[]> {
|
|
602
747
|
constructor();
|
|
603
|
-
getOg():
|
|
604
|
-
getTwitter():
|
|
748
|
+
getOg(): MetaOg;
|
|
749
|
+
getTwitter(): MetaTwitter;
|
|
605
750
|
getTitle(): string;
|
|
606
751
|
getKeywords(): string;
|
|
607
752
|
getDescription(): string;
|
|
608
753
|
getImage(): string;
|
|
609
754
|
getCanonical(): string;
|
|
610
|
-
getRobots():
|
|
755
|
+
getRobots(): MetaRobots;
|
|
611
756
|
getAuthor(): string;
|
|
612
757
|
getSiteName(): string;
|
|
613
758
|
getLocale(): string;
|
|
@@ -616,7 +761,7 @@ export declare class Meta extends any {
|
|
|
616
761
|
setDescription(description: string): this;
|
|
617
762
|
setImage(image: string): this;
|
|
618
763
|
setCanonical(canonical: string): this;
|
|
619
|
-
setRobots(robots:
|
|
764
|
+
setRobots(robots: MetaRobots): this;
|
|
620
765
|
setAuthor(author: string): this;
|
|
621
766
|
setSiteName(siteName: string): this;
|
|
622
767
|
setLocale(locale: string): this;
|
|
@@ -624,48 +769,45 @@ export declare class Meta extends any {
|
|
|
624
769
|
html(): string;
|
|
625
770
|
htmlTitle(): string;
|
|
626
771
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
772
|
+
type MetaList<T extends readonly string[]> = {
|
|
773
|
+
[K in T[number]]?: string;
|
|
774
|
+
};
|
|
775
|
+
export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
|
|
630
776
|
constructor(listMeta: T, isProperty?: boolean);
|
|
631
777
|
getListMeta(): T;
|
|
632
778
|
get(name: Key): string;
|
|
633
|
-
getItems():
|
|
779
|
+
getItems(): MetaList<T>;
|
|
634
780
|
html(): string;
|
|
635
781
|
set(name: Key, content: string): this;
|
|
636
|
-
setByList(metaList:
|
|
782
|
+
setByList(metaList: MetaList<T>): this;
|
|
637
783
|
}
|
|
638
|
-
|
|
639
|
-
// File: classes/MetaOg.d.ts
|
|
640
|
-
export declare class MetaOg extends any {
|
|
784
|
+
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
641
785
|
constructor();
|
|
642
786
|
getTitle(): string;
|
|
643
|
-
getType():
|
|
787
|
+
getType(): MetaOpenGraphType;
|
|
644
788
|
getUrl(): string;
|
|
645
789
|
getImage(): string;
|
|
646
790
|
getDescription(): string;
|
|
647
791
|
getLocale(): string;
|
|
648
792
|
getSiteName(): string;
|
|
649
793
|
setTitle(title: string): this;
|
|
650
|
-
setType(type:
|
|
794
|
+
setType(type: MetaOpenGraphType): this;
|
|
651
795
|
setUrl(url: string): this;
|
|
652
796
|
setImage(url: string): this;
|
|
653
797
|
setDescription(description: string): this;
|
|
654
798
|
setLocale(locale: string): this;
|
|
655
799
|
setSiteName(siteName: string): this;
|
|
656
800
|
}
|
|
657
|
-
|
|
658
|
-
// File: classes/MetaStatic.d.ts
|
|
659
801
|
export declare class MetaStatic {
|
|
660
|
-
static getItem():
|
|
661
|
-
static getOg():
|
|
662
|
-
static getTwitter():
|
|
802
|
+
static getItem(): Meta;
|
|
803
|
+
static getOg(): MetaOg;
|
|
804
|
+
static getTwitter(): MetaTwitter;
|
|
663
805
|
static getTitle(): string;
|
|
664
806
|
static getKeywords(): string;
|
|
665
807
|
static getDescription(): string;
|
|
666
808
|
static getImage(): string;
|
|
667
809
|
static getCanonical(): string;
|
|
668
|
-
static getRobots():
|
|
810
|
+
static getRobots(): MetaRobots;
|
|
669
811
|
static getAuthor(): string;
|
|
670
812
|
static getSiteName(): string;
|
|
671
813
|
static getLocale(): string;
|
|
@@ -674,7 +816,7 @@ export declare class MetaStatic {
|
|
|
674
816
|
static setDescription(description: string): typeof MetaStatic;
|
|
675
817
|
static setImage(image: string): typeof MetaStatic;
|
|
676
818
|
static setCanonical(canonical: string): typeof MetaStatic;
|
|
677
|
-
static setRobots(robots:
|
|
819
|
+
static setRobots(robots: MetaRobots): typeof MetaStatic;
|
|
678
820
|
static setAuthor(author: string): typeof MetaStatic;
|
|
679
821
|
static setSiteName(siteName: string): typeof MetaStatic;
|
|
680
822
|
static setLocale(locale: string): typeof MetaStatic;
|
|
@@ -682,18 +824,16 @@ export declare class MetaStatic {
|
|
|
682
824
|
static html(): string;
|
|
683
825
|
static htmlTitle(): string;
|
|
684
826
|
}
|
|
685
|
-
|
|
686
|
-
// File: classes/MetaTwitter.d.ts
|
|
687
|
-
export declare class MetaTwitter extends any {
|
|
827
|
+
export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
688
828
|
constructor();
|
|
689
|
-
getCard():
|
|
829
|
+
getCard(): MetaTwitterCard;
|
|
690
830
|
getSite(): string;
|
|
691
831
|
getCreator(): string;
|
|
692
832
|
getUrl(): string;
|
|
693
833
|
getTitle(): string;
|
|
694
834
|
getDescription(): string;
|
|
695
835
|
getImage(): string;
|
|
696
|
-
setCard(card:
|
|
836
|
+
setCard(card: MetaTwitterCard): this;
|
|
697
837
|
setSite(site: string): this;
|
|
698
838
|
setCreator(creator: string): this;
|
|
699
839
|
setUrl(url: string): this;
|
|
@@ -701,111 +841,95 @@ export declare class MetaTwitter extends any {
|
|
|
701
841
|
setDescription(description: string): this;
|
|
702
842
|
setImage(image: string): this;
|
|
703
843
|
}
|
|
704
|
-
|
|
705
|
-
// File: classes/Query.d.ts
|
|
706
844
|
export declare class Query {
|
|
707
|
-
static getItem():
|
|
845
|
+
static getItem(): QueryInstance;
|
|
708
846
|
static get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
709
847
|
static set<T>(name: string, callback: T | (() => T)): void;
|
|
710
848
|
static addWatch<T>(name: string, callback: (value: T) => void): void;
|
|
711
849
|
static removeWatch<T>(name: string, callback: (value: T) => void): void;
|
|
712
850
|
static reload(): void;
|
|
713
851
|
}
|
|
714
|
-
|
|
715
|
-
// File: classes/QueryInstance.d.ts
|
|
716
|
-
export declare class QueryInstance extends any {
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
// File: classes/ResumableTimer.d.ts
|
|
852
|
+
export declare class QueryInstance extends UrlInstanceAbstract {}
|
|
720
853
|
export declare class ResumableTimer {
|
|
721
|
-
constructor(callback:
|
|
854
|
+
constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
|
|
722
855
|
resume(): this;
|
|
723
856
|
pause(): this;
|
|
724
857
|
reset(): this;
|
|
725
858
|
clear(): this;
|
|
726
859
|
}
|
|
727
|
-
|
|
728
|
-
// File: classes/ScrollbarWidth.d.ts
|
|
729
860
|
export declare class ScrollbarWidth {
|
|
730
861
|
static is(): Promise<boolean>;
|
|
731
862
|
static get(): Promise<number>;
|
|
732
|
-
static getStorage():
|
|
863
|
+
static getStorage(): DataStorage<number>;
|
|
733
864
|
static getCalculate(): boolean;
|
|
734
865
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
getData(): any;
|
|
740
|
-
getList(): any;
|
|
866
|
+
export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
|
|
867
|
+
constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
|
|
868
|
+
getData(): SearchListData<T, K>;
|
|
869
|
+
getList(): SearchListValue<T>;
|
|
741
870
|
getColumns(): K | undefined;
|
|
742
|
-
getItem():
|
|
871
|
+
getItem(): SearchListItem;
|
|
743
872
|
getValue(): string | undefined;
|
|
744
|
-
getOptions():
|
|
745
|
-
setList(list:
|
|
873
|
+
getOptions(): SearchListOptions;
|
|
874
|
+
setList(list: SearchListValue<T>): this;
|
|
746
875
|
setColumns(columns?: K): this;
|
|
747
876
|
setValue(value?: string): this;
|
|
748
|
-
setOptions(options:
|
|
749
|
-
to():
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
877
|
+
setOptions(options: SearchOptions): this;
|
|
878
|
+
to(): SearchFormatList<T, K>;
|
|
879
|
+
}
|
|
880
|
+
export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
|
|
881
|
+
constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
|
|
882
|
+
is(): this is this & {
|
|
883
|
+
list: T[];
|
|
884
|
+
columns: string[];
|
|
885
|
+
};
|
|
886
|
+
isList(): this is this & {
|
|
887
|
+
list: T[];
|
|
888
|
+
};
|
|
889
|
+
getList(): SearchListValue<T>;
|
|
758
890
|
getColumns(): K | undefined;
|
|
759
|
-
setList(list:
|
|
760
|
-
setColumns(columns?:
|
|
761
|
-
findCacheItem(item: T):
|
|
762
|
-
forEach(callback: (item:
|
|
763
|
-
toFormatItem(item: T, selection: boolean):
|
|
891
|
+
setList(list: SearchListValue<T>): this;
|
|
892
|
+
setColumns(columns?: SearchColumns<T>): this;
|
|
893
|
+
findCacheItem(item: T): SearchCacheItem<T> | undefined;
|
|
894
|
+
forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
|
|
895
|
+
toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
|
|
764
896
|
}
|
|
765
|
-
|
|
766
|
-
// File: classes/SearchListItem.d.ts
|
|
767
897
|
export declare class SearchListItem {
|
|
768
|
-
constructor(value: string | undefined, options:
|
|
769
|
-
is():
|
|
898
|
+
constructor(value: string | undefined, options: SearchListOptions);
|
|
899
|
+
is(): this is this & {
|
|
900
|
+
value: string;
|
|
901
|
+
};
|
|
770
902
|
isSearch(): boolean;
|
|
771
903
|
get(): string;
|
|
772
904
|
set(value?: string): this;
|
|
773
905
|
}
|
|
774
|
-
|
|
775
|
-
// File: classes/SearchListMatcher.d.ts
|
|
776
906
|
export declare class SearchListMatcher {
|
|
777
|
-
constructor(item:
|
|
907
|
+
constructor(item: SearchListItem, options: SearchListOptions);
|
|
778
908
|
is(): boolean;
|
|
779
|
-
isSelection(value: any): boolean;
|
|
909
|
+
isSelection(value: SearchCacheItem<any>['value']): boolean;
|
|
780
910
|
get(): RegExp | undefined;
|
|
781
911
|
update(): void;
|
|
782
912
|
}
|
|
783
|
-
|
|
784
|
-
// File: classes/SearchListOptions.d.ts
|
|
785
913
|
export declare class SearchListOptions {
|
|
786
|
-
constructor(options?:
|
|
787
|
-
getOptions():
|
|
914
|
+
constructor(options?: SearchOptions | undefined);
|
|
915
|
+
getOptions(): SearchOptions;
|
|
788
916
|
getLimit(): number;
|
|
789
917
|
getReturnEverything(): boolean;
|
|
790
918
|
getDelay(): number;
|
|
791
919
|
getFindExactMatch(): boolean;
|
|
792
920
|
getClassName(): string;
|
|
793
|
-
setOptions(options:
|
|
921
|
+
setOptions(options: SearchOptions): this;
|
|
794
922
|
}
|
|
795
|
-
|
|
796
|
-
// File: classes/ServerStorage.d.ts
|
|
797
923
|
export declare class ServerStorage {
|
|
798
924
|
static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
|
|
799
925
|
static reset(): void;
|
|
800
926
|
static has(key: string): boolean;
|
|
801
927
|
static get<T = any>(key: string, defaultValue?: () => T, hydration?: boolean): T;
|
|
802
|
-
static set<T = any>(key: string, value: () => T, hydration?: boolean): T;
|
|
928
|
+
static set<T = any>(key: string, value: () => T, hydration?: boolean, storageList?: Record<string, any>): T;
|
|
803
929
|
static setErrorStatus(hide: boolean): void;
|
|
804
930
|
static remove(key: string): void;
|
|
805
931
|
static toString(): string;
|
|
806
932
|
}
|
|
807
|
-
|
|
808
|
-
// File: classes/StorageCallback.d.ts
|
|
809
933
|
export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
|
|
810
934
|
static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
|
|
811
935
|
constructor(name: string, group?: string);
|
|
@@ -817,53 +941,45 @@ export declare class StorageCallback<T = any, Callback = (value: T) => void | Pr
|
|
|
817
941
|
preparation(): this;
|
|
818
942
|
run(value: T): Promise<this>;
|
|
819
943
|
}
|
|
820
|
-
|
|
821
|
-
// File: classes/Translate.d.ts
|
|
822
944
|
export declare class Translate {
|
|
823
945
|
static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
824
|
-
static getItem():
|
|
946
|
+
static getItem(): TranslateInstance;
|
|
825
947
|
static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
826
|
-
static getList<T extends
|
|
827
|
-
static getListSync<T extends
|
|
948
|
+
static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
949
|
+
static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
828
950
|
static add(names: string | string[]): Promise<void>;
|
|
829
951
|
static addSync(data: Record<string, string>): void;
|
|
830
952
|
static addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
831
953
|
static addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
832
|
-
static addSyncByFile(data:
|
|
954
|
+
static addSyncByFile(data: TranslateDataFile): void;
|
|
833
955
|
static setUrl(url: string): void;
|
|
834
956
|
static setPropsName(name: string): void;
|
|
835
957
|
static setReadApi(value: boolean): void;
|
|
836
|
-
static setConfig(config:
|
|
958
|
+
static setConfig(config: TranslateConfig): void;
|
|
837
959
|
}
|
|
838
|
-
|
|
839
|
-
// File: classes/TranslateFile.d.ts
|
|
840
960
|
export declare class TranslateFile {
|
|
841
|
-
constructor(data?:
|
|
961
|
+
constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
|
|
842
962
|
isFile(): boolean;
|
|
843
963
|
getLocation(): string;
|
|
844
964
|
getLanguage(): string;
|
|
845
|
-
getList(): Promise<
|
|
846
|
-
add(data:
|
|
965
|
+
getList(): Promise<TranslateDataFileList | undefined>;
|
|
966
|
+
add(data: TranslateDataFile): void;
|
|
847
967
|
}
|
|
848
|
-
|
|
849
|
-
// File: classes/TranslateInstance.d.ts
|
|
850
968
|
export declare class TranslateInstance {
|
|
851
|
-
constructor(url?: string, propsName?: string, files?:
|
|
969
|
+
constructor(url?: string, propsName?: string, files?: TranslateFile);
|
|
852
970
|
get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
853
971
|
getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
854
|
-
getList<T extends
|
|
855
|
-
getListSync<T extends
|
|
972
|
+
getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
973
|
+
getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
856
974
|
add(names: string | string[]): Promise<void>;
|
|
857
975
|
addSync(data: Record<string, string>): void;
|
|
858
976
|
addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
859
977
|
addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
860
|
-
addSyncByFile(data:
|
|
978
|
+
addSyncByFile(data: TranslateDataFile): void;
|
|
861
979
|
setUrl(url: string): this;
|
|
862
|
-
setPropsName(
|
|
980
|
+
setPropsName(propsName: string): this;
|
|
863
981
|
setReadApi(value: boolean): this;
|
|
864
982
|
}
|
|
865
|
-
|
|
866
|
-
// File: classes/UrlInstanceAbstract.d.ts
|
|
867
983
|
export declare abstract class UrlInstanceAbstract {
|
|
868
984
|
get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
869
985
|
set<T>(name: string, callback: T | (() => T)): this;
|
|
@@ -871,8 +987,6 @@ export declare abstract class UrlInstanceAbstract {
|
|
|
871
987
|
removeWatch<T>(name: string, callback: (value: T) => void): this;
|
|
872
988
|
reload(): this;
|
|
873
989
|
}
|
|
874
|
-
|
|
875
|
-
// File: classes/UrlItem.d.ts
|
|
876
990
|
export declare class UrlItem {
|
|
877
991
|
static getInstance(): UrlItem;
|
|
878
992
|
constructor(url?: string | URL);
|
|
@@ -898,387 +1012,164 @@ export declare class UrlItem {
|
|
|
898
1012
|
toString(): string;
|
|
899
1013
|
toJSON(): string;
|
|
900
1014
|
}
|
|
901
|
-
|
|
902
|
-
// File: functions/addTagHighlightMatch.d.ts
|
|
903
1015
|
export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
|
|
904
|
-
|
|
905
|
-
// File: functions/anyToString.d.ts
|
|
906
1016
|
export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
|
|
907
|
-
|
|
908
|
-
// File: functions/applyTemplate.d.ts
|
|
909
1017
|
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
|
|
910
|
-
|
|
911
|
-
// File: functions/arrFill.d.ts
|
|
912
1018
|
export declare function arrFill<T>(value: T, count: number): T[];
|
|
913
|
-
|
|
914
|
-
// File: functions/blobToBase64.d.ts
|
|
915
1019
|
export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
|
|
916
|
-
|
|
917
|
-
// File: functions/capitalize.d.ts
|
|
918
1020
|
export declare function capitalize(value: string, isLocale?: boolean): string;
|
|
919
|
-
|
|
920
|
-
// File: functions/copyObject.d.ts
|
|
921
1021
|
export declare function copyObject<T>(value: T): T;
|
|
922
|
-
|
|
923
|
-
// File: functions/copyObjectLite.d.ts
|
|
924
1022
|
export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
1023
|
+
/**
|
|
1024
|
+
* @remarks
|
|
1025
|
+
* When running on the server, the function always returns `undefined`.
|
|
1026
|
+
* If you use it within a component's rendering logic, it may lead to hydration mismatches.
|
|
1027
|
+
* It is recommended to call this function only inside lifecycle hooks that run exclusively on the client (e.g., `onMounted` in Vue or `useEffect` in React).
|
|
1028
|
+
*/
|
|
1029
|
+
export declare function createElement<T extends HTMLElement>(parentElement?: HTMLElement, tagName?: string, options?: Partial<T> | Record<keyof T, T[keyof T]> | ((element: T) => void), referenceElement?: HTMLElement): T | undefined;
|
|
1030
|
+
export declare function domContentLoaded<T = void>(callback: () => T | Promise<T>): Promise<T>;
|
|
930
1031
|
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
|
|
931
|
-
|
|
932
|
-
// File: functions/domQuerySelectorAll.d.ts
|
|
933
1032
|
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
|
|
934
|
-
|
|
935
|
-
// File: functions/encodeAttribute.d.ts
|
|
936
1033
|
export declare function encodeAttribute(text: string): string;
|
|
937
|
-
|
|
938
|
-
// File: functions/encodeLiteAttribute.d.ts
|
|
939
1034
|
export declare function encodeLiteAttribute(text: string): string;
|
|
940
|
-
|
|
941
|
-
// File: functions/ensureMaxSize.d.ts
|
|
942
1035
|
export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
|
|
943
|
-
|
|
944
|
-
// File: functions/escapeExp.d.ts
|
|
945
1036
|
export declare function escapeExp(value: string): string;
|
|
946
|
-
|
|
947
|
-
// File: functions/eventStopPropagation.d.ts
|
|
948
1037
|
export declare function eventStopPropagation(event: Event): void;
|
|
949
|
-
|
|
950
|
-
// File: functions/executeFunction.d.ts
|
|
951
|
-
export declare function executeFunction<T>(callback: T | ((...args: any[]) => T), ...args: any[]): T;
|
|
952
|
-
|
|
953
|
-
// File: functions/executePromise.d.ts
|
|
1038
|
+
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
|
|
954
1039
|
export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
|
|
955
|
-
|
|
956
|
-
// File: functions/forEach.d.ts
|
|
957
|
-
export declare function forEach<T, R>(data: any, callback: (item: T, key: any, dataMain: any) => R, saveUndefined?: boolean): R[];
|
|
958
|
-
|
|
959
|
-
// File: functions/frame.d.ts
|
|
1040
|
+
export declare function forEach<T, R, D extends T[] | Record<string, T> | Map<string, T> | Set<T> = T[] | Record<string, T> | Map<string, T> | Set<T>, K = D extends T[] ? number : string>(data: D & (T[] | Record<string, T> | Map<string, T> | Set<T>), callback: (item: T, key: K, dataMain: typeof data) => R, saveUndefined?: boolean): R[];
|
|
960
1041
|
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): any[];
|
|
964
|
-
|
|
965
|
-
// File: functions/getAttributes.d.ts
|
|
966
|
-
export declare function getAttributes<E extends any>(element?: any): Record<string, string | undefined>;
|
|
967
|
-
|
|
968
|
-
// File: functions/getClipboardData.d.ts
|
|
1042
|
+
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
|
|
1043
|
+
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
|
|
969
1044
|
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
1045
|
+
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
|
|
1046
|
+
/**
|
|
1047
|
+
* @remarks
|
|
1048
|
+
* Using this function for rendering in SSR may lead to hydration mismatches
|
|
1049
|
+
* because the time or time zone on the server may differ from the time on the client.
|
|
1050
|
+
* It is recommended to use this function inside client-side hooks only (e.g., `onMounted` in Vue or `useEffect` in React).
|
|
1051
|
+
*/
|
|
1052
|
+
export declare function getCurrentDate(format?: GeoDate): string;
|
|
1053
|
+
/**
|
|
1054
|
+
* @remarks
|
|
1055
|
+
* **Warning (SSR):** Using this function for rendering in SSR will almost certainly lead to hydration mismatches
|
|
1056
|
+
* because the timestamp on the server will differ from the timestamp on the client.
|
|
1057
|
+
*/
|
|
978
1058
|
export declare function getCurrentTime(): number;
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1059
|
+
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
|
|
1060
|
+
/**
|
|
1061
|
+
* @example
|
|
1062
|
+
* ```typescript
|
|
1063
|
+
* import { useId } from 'vue'
|
|
1064
|
+
* import { initGetElementId } from '@dxtmisha/functional-basic'
|
|
1065
|
+
*
|
|
1066
|
+
* initGetElementId(() => useId())
|
|
1067
|
+
* ```
|
|
1068
|
+
*/
|
|
1069
|
+
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
|
|
985
1070
|
export declare function initGetElementId(newListener: () => string | number): void;
|
|
986
|
-
|
|
987
|
-
// File: functions/getElementImage.d.ts
|
|
988
1071
|
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
export declare function getElementItem<T extends any, K extends keyof T, D>(element: any, index: K | string, defaultValue?: D): T[K] | D | undefined;
|
|
992
|
-
|
|
993
|
-
// File: functions/getElementOrWindow.d.ts
|
|
994
|
-
export declare function getElementOrWindow<E extends any>(element?: any): E | undefined;
|
|
995
|
-
|
|
996
|
-
// File: functions/getElementSafeScript.d.ts
|
|
1072
|
+
export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
|
|
1073
|
+
export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
|
|
997
1074
|
export declare function getElementSafeScript(id: string, data: any): string;
|
|
998
|
-
|
|
999
|
-
// File: functions/getExactSearchExp.d.ts
|
|
1000
1075
|
export declare function getExactSearchExp(search: string): RegExp;
|
|
1001
|
-
|
|
1002
|
-
// File: functions/getExp.d.ts
|
|
1003
1076
|
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
|
|
1004
|
-
|
|
1005
|
-
// File: functions/getFirst.d.ts
|
|
1006
1077
|
export declare function getFirst<T>(value: T | T[] | Record<string, T>): T | undefined;
|
|
1007
|
-
|
|
1008
|
-
// File: functions/getHydrationData.d.ts
|
|
1009
1078
|
export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
|
|
1010
|
-
|
|
1011
|
-
// File: functions/getItemByPath.d.ts
|
|
1012
1079
|
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
|
|
1013
|
-
|
|
1014
|
-
// File: functions/getKey.d.ts
|
|
1015
1080
|
export declare function getKey(event: KeyboardEvent): string | number | undefined;
|
|
1016
|
-
|
|
1017
|
-
// File: functions/getLength.d.ts
|
|
1081
|
+
export declare function getLast<T>(value: T | T[] | Record<string, T>): T | undefined;
|
|
1018
1082
|
export declare function getLength(value: any): number;
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
export declare function
|
|
1022
|
-
|
|
1023
|
-
// File: functions/getMaxLengthAllArray.d.ts
|
|
1024
|
-
export declare function getMaxLengthAllArray(data: any): number;
|
|
1025
|
-
|
|
1026
|
-
// File: functions/getMinLengthAllArray.d.ts
|
|
1027
|
-
export declare function getMinLengthAllArray(data: any): number;
|
|
1028
|
-
|
|
1029
|
-
// File: functions/getMouseClient.d.ts
|
|
1030
|
-
export declare function getMouseClient(event: MouseEvent & TouchEvent): any;
|
|
1031
|
-
|
|
1032
|
-
// File: functions/getMouseClientX.d.ts
|
|
1083
|
+
export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
|
|
1084
|
+
export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1085
|
+
export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1086
|
+
export declare function getMouseClient(event: MouseEvent & TouchEvent): ImageCoordinator;
|
|
1033
1087
|
export declare function getMouseClientX(event: MouseEvent & TouchEvent): number;
|
|
1034
|
-
|
|
1035
|
-
// File: functions/getMouseClientY.d.ts
|
|
1036
1088
|
export declare function getMouseClientY(event: MouseEvent & TouchEvent): number;
|
|
1037
|
-
|
|
1038
|
-
// File: functions/getObjectByKeys.d.ts
|
|
1039
1089
|
export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
|
|
1040
|
-
|
|
1041
|
-
// File: functions/getObjectNoUndefined.d.ts
|
|
1042
1090
|
export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
|
|
1043
|
-
|
|
1044
|
-
// File: functions/getObjectOrNone.d.ts
|
|
1045
1091
|
export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
|
|
1046
|
-
|
|
1047
|
-
// File: functions/getOnlyText.d.ts
|
|
1048
1092
|
export declare function getOnlyText(text: any): string;
|
|
1049
|
-
|
|
1050
|
-
// File: functions/getRandomText.d.ts
|
|
1093
|
+
export declare function getRandomItem<T>(value?: T | T[] | Record<string, T>): T | undefined;
|
|
1051
1094
|
export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
|
|
1052
|
-
|
|
1053
|
-
// File: functions/getRequestString.d.ts
|
|
1054
1095
|
export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
|
|
1055
|
-
|
|
1056
|
-
// File: functions/getSearchExp.d.ts
|
|
1057
1096
|
export declare function getSearchExp(search: string, limit?: number): RegExp;
|
|
1058
|
-
|
|
1059
|
-
// File: functions/getSeparatingSearchExp.d.ts
|
|
1060
1097
|
export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
|
|
1061
|
-
|
|
1062
|
-
// File: functions/getStepPercent.d.ts
|
|
1063
1098
|
export declare function getStepPercent(min: number | undefined, max: number): number;
|
|
1064
|
-
|
|
1065
|
-
// File: functions/getStepValue.d.ts
|
|
1066
1099
|
export declare function getStepValue(min: number | undefined, max: number): number;
|
|
1067
|
-
|
|
1068
|
-
// File: functions/goScroll.d.ts
|
|
1069
1100
|
export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
|
|
1070
|
-
|
|
1071
|
-
// File: functions/goScrollSmooth.d.ts
|
|
1072
1101
|
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
1073
|
-
|
|
1074
|
-
// File: functions/goScrollTo.d.ts
|
|
1075
1102
|
export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
|
|
1076
|
-
|
|
1077
|
-
// File: functions/handleShare.d.ts
|
|
1078
1103
|
export declare function handleShare(data: ShareData): Promise<boolean>;
|
|
1079
|
-
|
|
1080
|
-
// File: functions/inArray.d.ts
|
|
1081
1104
|
export declare function inArray<T>(array: T[], value: T): boolean;
|
|
1082
|
-
|
|
1083
|
-
// File: functions/initScrollbarOffset.d.ts
|
|
1084
1105
|
export declare function initScrollbarOffset(): Promise<void>;
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
export declare function
|
|
1088
|
-
|
|
1089
|
-
// File: functions/isApiSuccess.d.ts
|
|
1090
|
-
export declare const isApiSuccess: <T>(data: any) => boolean;
|
|
1091
|
-
|
|
1092
|
-
// File: functions/isArray.d.ts
|
|
1093
|
-
export declare function isArray<T, R>(value: T): boolean;
|
|
1094
|
-
|
|
1095
|
-
// File: functions/isDifferent.d.ts
|
|
1096
|
-
export declare function isDifferent<T>(value: any, old: any): boolean;
|
|
1097
|
-
|
|
1098
|
-
// File: functions/isDomData.d.ts
|
|
1106
|
+
export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
|
|
1107
|
+
export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
|
|
1108
|
+
export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
|
|
1109
|
+
export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
|
|
1099
1110
|
export declare function isDomData(): boolean;
|
|
1100
|
-
|
|
1101
|
-
// File: functions/isDomRuntime.d.ts
|
|
1102
1111
|
export declare function isDomRuntime(): boolean;
|
|
1103
|
-
|
|
1104
|
-
// File: functions/isElementVisible.d.ts
|
|
1105
|
-
export declare function isElementVisible<E extends any>(elementSelectors?: any): boolean;
|
|
1106
|
-
|
|
1107
|
-
// File: functions/isEnter.d.ts
|
|
1112
|
+
export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
|
|
1108
1113
|
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
|
|
1109
|
-
|
|
1110
|
-
// File: functions/isFilled.d.ts
|
|
1111
|
-
export declare function isFilled<T>(value: T, zeroTrue?: boolean): boolean;
|
|
1112
|
-
|
|
1113
|
-
// File: functions/isFloat.d.ts
|
|
1114
|
+
export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
|
|
1114
1115
|
export declare function isFloat(value: any): boolean;
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
export declare function isFunction<T>(callback: T): boolean;
|
|
1118
|
-
|
|
1119
|
-
// File: functions/isInDom.d.ts
|
|
1120
|
-
export declare function isInDom<E extends any>(element?: any): boolean;
|
|
1121
|
-
|
|
1122
|
-
// File: functions/isInput.d.ts
|
|
1116
|
+
export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
|
|
1117
|
+
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
|
|
1123
1118
|
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
|
|
1124
|
-
|
|
1125
|
-
// File: functions/isIntegerBetween.d.ts
|
|
1126
1119
|
export declare function isIntegerBetween(value: number, between: number): boolean;
|
|
1127
|
-
|
|
1128
|
-
// File: functions/isMetaKey.d.ts
|
|
1129
1120
|
export declare const isMetaKey: (event: KeyboardEvent) => boolean;
|
|
1130
|
-
|
|
1131
|
-
// File: functions/isNull.d.ts
|
|
1132
|
-
export declare function isNull<T>(value: T): boolean;
|
|
1133
|
-
|
|
1134
|
-
// File: functions/isNumber.d.ts
|
|
1121
|
+
export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
|
|
1135
1122
|
export declare function isNumber(value: any): boolean;
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
export declare function isObject<T>(value: T): boolean;
|
|
1139
|
-
|
|
1140
|
-
// File: functions/isObjectNotArray.d.ts
|
|
1141
|
-
export declare function isObjectNotArray<T>(value: T): boolean;
|
|
1142
|
-
|
|
1143
|
-
// File: functions/isOnLine.d.ts
|
|
1123
|
+
export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
|
|
1124
|
+
export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
|
|
1144
1125
|
export declare function isOnLine(): boolean;
|
|
1145
|
-
|
|
1146
|
-
// File: functions/isSelected.d.ts
|
|
1147
1126
|
export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
|
|
1148
|
-
|
|
1149
|
-
// File: functions/isSelectedByList.d.ts
|
|
1150
1127
|
export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
|
|
1151
|
-
|
|
1152
|
-
// File: functions/isShare.d.ts
|
|
1153
1128
|
export declare function isShare(): boolean;
|
|
1154
|
-
|
|
1155
|
-
// File: functions/isString.d.ts
|
|
1156
|
-
export declare function isString<T>(value: T): boolean;
|
|
1157
|
-
|
|
1158
|
-
// File: functions/isTab.d.ts
|
|
1129
|
+
export declare function isString<T>(value: T): value is Extract<T, string>;
|
|
1159
1130
|
export declare const isTab: (event: KeyboardEvent) => boolean;
|
|
1160
|
-
|
|
1161
|
-
// File: functions/isWindow.d.ts
|
|
1162
|
-
export declare function isWindow<E>(element: E): boolean;
|
|
1163
|
-
|
|
1164
|
-
// File: functions/random.d.ts
|
|
1131
|
+
export declare function isWindow<E>(element: E): element is Extract<E, Window>;
|
|
1165
1132
|
export declare function random(min: number, max: number): number;
|
|
1166
|
-
|
|
1167
|
-
// File: functions/removeCommonPrefix.d.ts
|
|
1168
1133
|
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
1169
|
-
|
|
1170
|
-
// File: functions/replaceComponentName.d.ts
|
|
1171
1134
|
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
export declare function
|
|
1175
|
-
|
|
1176
|
-
// File: functions/replaceTemplate.d.ts
|
|
1177
|
-
export declare function replaceTemplate(value: string, replaces: Record<string, string | (() => string)>): string;
|
|
1178
|
-
|
|
1179
|
-
// File: functions/resizeImageByMax.d.ts
|
|
1180
|
-
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: any, typeData?: string): string | undefined;
|
|
1181
|
-
|
|
1182
|
-
// File: functions/secondToTime.d.ts
|
|
1135
|
+
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
|
|
1136
|
+
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
|
|
1137
|
+
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: 'auto' | 'width' | 'height', typeData?: string): string | undefined;
|
|
1183
1138
|
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
|
|
1184
|
-
|
|
1185
|
-
// File: functions/setElementItem.d.ts
|
|
1186
|
-
export declare function setElementItem<E extends any, K extends keyof E, V extends E[K] = E[K]>(element: any, index: K, value: V | Record<string, V>): E | undefined;
|
|
1187
|
-
|
|
1188
|
-
// File: functions/setValues.d.ts
|
|
1139
|
+
export declare function setElementItem<E extends ElementOrWindow, K extends keyof E, V extends E[K] = E[K]>(element: ElementOrString<E>, index: K, value: V | Record<string, V>): E | undefined;
|
|
1189
1140
|
export declare function setValues<T>(selected: T | T[] | undefined, value: any, options: {
|
|
1190
1141
|
multiple?: boolean;
|
|
1191
1142
|
maxlength?: number;
|
|
1192
1143
|
alwaysChange?: boolean;
|
|
1193
1144
|
notEmpty?: boolean;
|
|
1194
1145
|
}): T | T[] | undefined;
|
|
1195
|
-
|
|
1196
|
-
// File: functions/sleep.d.ts
|
|
1197
1146
|
export declare function sleep(ms: number): Promise<void>;
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
export declare function splice<I>(array: any, replacement?: any, indexStart?: string): any;
|
|
1201
|
-
|
|
1202
|
-
// File: functions/strFill.d.ts
|
|
1147
|
+
export declare function sortList<T = any>(list: T[], sortColumns: SortColumnItem[], customSort?: SortFunction<T>): T[];
|
|
1148
|
+
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
|
|
1203
1149
|
export declare function strFill(value: string, count: number): string;
|
|
1204
|
-
|
|
1205
|
-
// File: functions/strSplit.d.ts
|
|
1206
1150
|
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
1207
|
-
|
|
1208
|
-
// File: functions/toArray.d.ts
|
|
1209
|
-
export declare function toArray<T>(value: T): any;
|
|
1210
|
-
|
|
1211
|
-
// File: functions/toCamelCase.d.ts
|
|
1151
|
+
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
1212
1152
|
export declare function toCamelCase(value: string): string;
|
|
1213
|
-
|
|
1214
|
-
// File: functions/toCamelCaseFirst.d.ts
|
|
1215
1153
|
export declare function toCamelCaseFirst(value: string): string;
|
|
1216
|
-
|
|
1217
|
-
// File: functions/toDate.d.ts
|
|
1218
|
-
export declare function toDate<T extends Date | number | string>(value?: T): Date;
|
|
1219
|
-
|
|
1220
|
-
// File: functions/toKebabCase.d.ts
|
|
1154
|
+
export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
|
|
1221
1155
|
export declare function toKebabCase(value: string): string;
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
//
|
|
1156
|
+
/**
|
|
1157
|
+
* @example
|
|
1158
|
+
* toNumber("1 234,56") // 1234.56
|
|
1159
|
+
* toNumber("1,234.56") // 1234.56
|
|
1160
|
+
* toNumber("1,234") // 1.234
|
|
1161
|
+
*/
|
|
1162
|
+
export declare function toNumber(value?: NumberOrString): number;
|
|
1227
1163
|
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
1228
|
-
|
|
1229
|
-
// File: functions/toPercent.d.ts
|
|
1164
|
+
export declare function toNumberPositive(value?: number | string | null, defaultValue?: number): number;
|
|
1230
1165
|
export declare function toPercent(maxValue: number, value: number): number;
|
|
1231
|
-
|
|
1232
|
-
// File: functions/toPercentBy100.d.ts
|
|
1233
1166
|
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
1234
|
-
|
|
1235
|
-
// File: functions/toString.d.ts
|
|
1236
1167
|
export declare function toString<T>(value: T): string;
|
|
1237
|
-
|
|
1238
|
-
// File: functions/transformation.d.ts
|
|
1239
1168
|
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
1240
|
-
|
|
1241
|
-
// File: functions/uint8ArrayToBase64.d.ts
|
|
1242
1169
|
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
|
1243
|
-
|
|
1244
|
-
// File: functions/uniqueArray.d.ts
|
|
1245
1170
|
export declare function uniqueArray<T>(value: T[]): T[];
|
|
1246
|
-
|
|
1247
|
-
// File: functions/writeClipboardData.d.ts
|
|
1248
1171
|
export declare function writeClipboardData(text: string): Promise<void>;
|
|
1249
|
-
|
|
1250
|
-
// File: types/apiTypes.d.ts
|
|
1251
|
-
export declare enum ApiMethodItem {
|
|
1252
|
-
delete = "DELETE",
|
|
1253
|
-
get = "GET",
|
|
1254
|
-
post = "POST",
|
|
1255
|
-
put = "PUT",
|
|
1256
|
-
patch = "PATCH"
|
|
1257
|
-
}
|
|
1258
|
-
export type ApiCacheItem<T = any> = {
|
|
1259
|
-
value: T;
|
|
1260
|
-
age?: number;
|
|
1261
|
-
cacheAge: number;
|
|
1262
|
-
};
|
|
1263
|
-
export type ApiCacheList = Record<string, ApiCacheItem>;
|
|
1264
|
-
export type ApiConfig = any;
|
|
1265
|
-
export type ApiData<T = any> = any;
|
|
1266
|
-
export type ApiDataValidation = any;
|
|
1267
|
-
export type ApiDataItem<T = any> = any;
|
|
1268
|
-
export type ApiHeadersValue = Record<string, string> | (() => Record<string, string>);
|
|
1269
|
-
export type ApiDefaultValue = Record<string, any> | (() => Record<string, any>);
|
|
1270
|
-
export type ApiFetch = any;
|
|
1271
|
-
export type ApiHydrationItem = any;
|
|
1272
|
-
export type ApiHydrationList = ApiHydrationItem[];
|
|
1273
|
-
export type ApiErrorStorageItem = any;
|
|
1274
|
-
export type ApiErrorStorageList = ApiErrorStorageItem[];
|
|
1275
|
-
export type ApiMethod = string | ApiMethodItem;
|
|
1276
|
-
export type ApiPreparationEnd = any;
|
|
1277
|
-
export type ApiResponseItem = any;
|
|
1278
|
-
export type ApiStatusItem = any;
|
|
1279
|
-
export type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
|
|
1280
|
-
|
|
1281
|
-
// File: types/basicTypes.d.ts
|
|
1172
|
+
export declare const errorCauseList: ErrorCenterCauseList;
|
|
1282
1173
|
export type Undefined = undefined | null;
|
|
1283
1174
|
export type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
|
|
1284
1175
|
export type NumberOrString = number | string;
|
|
@@ -1310,52 +1201,16 @@ export type ElementOrWindow = HTMLElement | Window;
|
|
|
1310
1201
|
export type ElementOrString<E extends ElementOrWindow> = E | string;
|
|
1311
1202
|
export type EventOptions = AddEventListenerOptions | boolean | undefined;
|
|
1312
1203
|
export type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;
|
|
1313
|
-
export type EventActivityItem<E extends ElementOrWindow> =
|
|
1204
|
+
export type EventActivityItem<E extends ElementOrWindow> = {
|
|
1205
|
+
element: E | undefined;
|
|
1206
|
+
type: string;
|
|
1207
|
+
listener?: (event: any | Event) => void;
|
|
1208
|
+
observer?: ResizeObserver;
|
|
1209
|
+
};
|
|
1314
1210
|
export type ImageCoordinator = {
|
|
1315
1211
|
x: number;
|
|
1316
1212
|
y: number;
|
|
1317
1213
|
};
|
|
1318
|
-
|
|
1319
|
-
// File: types/errorCenter.d.ts
|
|
1320
|
-
export type ErrorCenterGroup = string | undefined;
|
|
1321
|
-
export type ErrorCenterCauseItem<D = any> = any;
|
|
1322
|
-
export type ErrorCenterCauseList = ErrorCenterCauseItem[];
|
|
1323
|
-
export type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;
|
|
1324
|
-
export type ErrorCenterHandlerItem = any;
|
|
1325
|
-
export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
|
|
1326
|
-
|
|
1327
|
-
// File: types/formattersTypes.d.ts
|
|
1328
|
-
export declare enum FormattersType {
|
|
1329
|
-
currency = "currency",
|
|
1330
|
-
date = "date",
|
|
1331
|
-
name = "name",
|
|
1332
|
-
number = "number",
|
|
1333
|
-
plural = "plural",
|
|
1334
|
-
unit = "unit"
|
|
1335
|
-
}
|
|
1336
|
-
export type FormattersOptionsCurrency = any;
|
|
1337
|
-
export type FormattersOptionsDate = any;
|
|
1338
|
-
export type FormattersOptionsName = any;
|
|
1339
|
-
export type FormattersOptionsNumber = any;
|
|
1340
|
-
export type FormattersOptionsPlural = any;
|
|
1341
|
-
export type FormattersOptionsUnit = any;
|
|
1342
|
-
export type FormattersOptionsInformation<Type extends FormattersType> = any;
|
|
1343
|
-
export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = any;
|
|
1344
|
-
export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
|
|
1345
|
-
export type FormattersListItem = Record<string, any>;
|
|
1346
|
-
export type FormattersList<Item extends FormattersListItem> = Item[];
|
|
1347
|
-
export type FormattersCapitalize<K extends string> = any;
|
|
1348
|
-
export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
|
|
1349
|
-
export type FormattersKey<K, A extends string = 'Format'> = any;
|
|
1350
|
-
export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = any;
|
|
1351
|
-
export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = any;
|
|
1352
|
-
export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = any;
|
|
1353
|
-
export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = any;
|
|
1354
|
-
export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
|
|
1355
|
-
export type FormattersItemProp<List extends FormattersListProp> = any;
|
|
1356
|
-
export type FormattersReturn<List extends FormattersListProp, Options extends FormattersOptionsList = FormattersOptionsList, Item extends FormattersItemProp<List> = FormattersItemProp<List>> = any;
|
|
1357
|
-
|
|
1358
|
-
// File: types/geoTypes.d.ts
|
|
1359
1214
|
export type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
|
|
1360
1215
|
export type GeoFirstDay = 1 | 6 | 0;
|
|
1361
1216
|
export type GeoHours = '12' | '24';
|
|
@@ -1371,7 +1226,21 @@ export interface GeoItem {
|
|
|
1371
1226
|
phoneWithin?: string;
|
|
1372
1227
|
phoneMask?: string | string[];
|
|
1373
1228
|
nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
|
|
1374
|
-
unit?:
|
|
1229
|
+
unit?: {
|
|
1230
|
+
'millimeter'?: string;
|
|
1231
|
+
'centimeter'?: string;
|
|
1232
|
+
'meter'?: string;
|
|
1233
|
+
'kilometer'?: string;
|
|
1234
|
+
'square-meter'?: string;
|
|
1235
|
+
'hectare'?: string;
|
|
1236
|
+
'gram'?: string;
|
|
1237
|
+
'kilogram'?: string;
|
|
1238
|
+
'tonne'?: string;
|
|
1239
|
+
'milliliter'?: string;
|
|
1240
|
+
'liter'?: string;
|
|
1241
|
+
'celsius'?: string;
|
|
1242
|
+
'kilometer-per-hour'?: string;
|
|
1243
|
+
};
|
|
1375
1244
|
}
|
|
1376
1245
|
export interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
|
|
1377
1246
|
standard: string;
|
|
@@ -1414,8 +1283,6 @@ export interface GeoPhoneMapInfo {
|
|
|
1414
1283
|
item?: GeoPhoneMap;
|
|
1415
1284
|
phone?: string;
|
|
1416
1285
|
}
|
|
1417
|
-
|
|
1418
|
-
// File: types/metaTypes.d.ts
|
|
1419
1286
|
export declare enum MetaTag {
|
|
1420
1287
|
title = "title",
|
|
1421
1288
|
description = "description",
|
|
@@ -1601,27 +1468,53 @@ export declare enum MetaTwitterCard {
|
|
|
1601
1468
|
audio = "audio",
|
|
1602
1469
|
poll = "poll"
|
|
1603
1470
|
}
|
|
1604
|
-
|
|
1605
|
-
// File: types/searchTypes.d.ts
|
|
1606
1471
|
export type SearchItem = Record<string, any>;
|
|
1607
|
-
export type SearchColumnPath<K, P> =
|
|
1608
|
-
export type SearchColumn<T extends SearchItem> =
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
export type
|
|
1612
|
-
export type
|
|
1613
|
-
export type
|
|
1472
|
+
export type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
|
|
1473
|
+
export type SearchColumn<T extends SearchItem> = {
|
|
1474
|
+
[K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K;
|
|
1475
|
+
}[keyof T];
|
|
1476
|
+
export type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
|
|
1477
|
+
export type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
|
|
1478
|
+
export type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
|
|
1479
|
+
export type SearchFormatItem<T extends SearchItem, KT extends string[]> = {
|
|
1480
|
+
[K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
1481
|
+
} & {
|
|
1482
|
+
searchActive?: boolean;
|
|
1483
|
+
};
|
|
1484
|
+
export type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
|
|
1614
1485
|
export type SearchListValue<T extends SearchItem> = T[] | undefined;
|
|
1615
|
-
export type SearchOptions =
|
|
1616
|
-
|
|
1486
|
+
export type SearchOptions = {
|
|
1487
|
+
limit?: number;
|
|
1488
|
+
returnEverything?: boolean;
|
|
1489
|
+
delay?: number;
|
|
1490
|
+
findExactMatch?: boolean;
|
|
1491
|
+
classSearchName?: string;
|
|
1492
|
+
};
|
|
1493
|
+
export type SearchCacheItem<T extends SearchItem> = {
|
|
1494
|
+
item: T;
|
|
1495
|
+
value: string;
|
|
1496
|
+
};
|
|
1617
1497
|
export type SearchCache<T extends SearchItem> = SearchCacheItem<T>[];
|
|
1618
|
-
export type HighlightMatchItem =
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1498
|
+
export type HighlightMatchItem = {
|
|
1499
|
+
text: string;
|
|
1500
|
+
isMatch: boolean;
|
|
1501
|
+
};
|
|
1502
|
+
export type SortDir = 'asc' | 'desc';
|
|
1503
|
+
export type SortColumnItem = {
|
|
1504
|
+
column?: string;
|
|
1505
|
+
dir?: SortDir;
|
|
1506
|
+
};
|
|
1507
|
+
export type SortFunction<T = any> = (a: T, b: T, column?: string, dir?: SortDir) => number;
|
|
1508
|
+
export type TranslateConfig = {
|
|
1509
|
+
url?: string;
|
|
1510
|
+
propsName?: string;
|
|
1511
|
+
readApi?: boolean;
|
|
1512
|
+
};
|
|
1622
1513
|
export type TranslateCode = string | string[];
|
|
1623
|
-
export type TranslateList<T extends TranslateCode[]> =
|
|
1624
|
-
|
|
1514
|
+
export type TranslateList<T extends TranslateCode[]> = {
|
|
1515
|
+
[K in T[number] as K extends readonly string[] ? K[0] : K]: string;
|
|
1516
|
+
};
|
|
1517
|
+
export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
|
|
1625
1518
|
export type TranslateDataFileList = Record<string, string>;
|
|
1626
1519
|
export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
|
|
1627
1520
|
export type TranslateDataFile = Record<string, TranslateDataFileItem>;
|