@dxtmisha/functional-basic 1.1.6 → 1.1.7
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/ai-description.txt +5 -1
- package/ai-doc.ru.txt +5 -0
- package/ai-doc.txt +5 -0
- package/ai-types.txt +1362 -284
- package/dist/library.js +4 -4
- package/package.json +3 -1
package/ai-types.txt
CHANGED
|
@@ -15,116 +15,300 @@ The following is the content of "exports" from package.json:
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// File: classes/Api.d.ts
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Class for working with HTTP requests.
|
|
20
|
+
*/
|
|
19
21
|
export declare class Api {
|
|
20
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Checks if server is running on localhost.
|
|
24
|
+
* @returns true if local
|
|
25
|
+
*/
|
|
21
26
|
static isLocalhost(): boolean;
|
|
22
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Returns ApiInstance singleton.
|
|
29
|
+
* @returns ApiInstance singleton
|
|
30
|
+
*/
|
|
23
31
|
static getItem(): ApiInstance;
|
|
24
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Returns status of the last request.
|
|
34
|
+
* @returns ApiStatus instance
|
|
35
|
+
*/
|
|
25
36
|
static getStatus(): ApiStatus;
|
|
26
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Gets response handler.
|
|
39
|
+
* @returns ApiResponse instance
|
|
40
|
+
*/
|
|
27
41
|
static getResponse(): ApiResponse;
|
|
28
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Gets hydration handler.
|
|
44
|
+
* @returns ApiHydration instance
|
|
45
|
+
*/
|
|
29
46
|
static getHydration(): ApiHydration;
|
|
30
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Returns hydration data script for client.
|
|
49
|
+
* @returns HTML script string
|
|
50
|
+
*/
|
|
31
51
|
static getHydrationScript(): string;
|
|
32
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Gets base origin URL with API path.
|
|
54
|
+
* @returns final base URL
|
|
55
|
+
*/
|
|
33
56
|
static getOrigin(): string;
|
|
34
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Gets full path to request script.
|
|
59
|
+
* @param path script path
|
|
60
|
+
* @param api prepend base API URL
|
|
61
|
+
* @returns full URL
|
|
62
|
+
*/
|
|
35
63
|
static getUrl(path: string, api?: boolean): string;
|
|
36
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Gets data for request body.
|
|
66
|
+
* @param request request data
|
|
67
|
+
* @param method HTTP method
|
|
68
|
+
* @returns body data or FormData
|
|
69
|
+
*/
|
|
37
70
|
static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
|
|
38
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Gets query string for GET requests.
|
|
73
|
+
* @param request request data
|
|
74
|
+
* @param path request path
|
|
75
|
+
* @param method HTTP method
|
|
76
|
+
* @returns query string
|
|
77
|
+
*/
|
|
39
78
|
static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
|
|
40
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Modifies default header data.
|
|
81
|
+
* @param headers default headers
|
|
82
|
+
*/
|
|
41
83
|
static setHeaders(headers: Record<string, string>): void;
|
|
42
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Modifies default request data.
|
|
86
|
+
* @param request default data
|
|
87
|
+
*/
|
|
43
88
|
static setRequestDefault(request: Record<string, any>): void;
|
|
44
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Changes base path to script.
|
|
91
|
+
* @param url script path
|
|
92
|
+
*/
|
|
45
93
|
static setUrl(url: string): void;
|
|
46
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* Modifies function called before request.
|
|
96
|
+
* @param callback pre-request function
|
|
97
|
+
*/
|
|
47
98
|
static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
|
|
48
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Modifies function called after request.
|
|
101
|
+
* @param callback post-request function
|
|
102
|
+
*/
|
|
49
103
|
static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
|
|
50
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Changes request timeout.
|
|
106
|
+
* @param timeout ms
|
|
107
|
+
*/
|
|
51
108
|
static setTimeout(timeout: number): void;
|
|
52
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Changes origin for base URL.
|
|
111
|
+
* @param origin protocol and domain
|
|
112
|
+
*/
|
|
53
113
|
static setOrigin(origin: string): void;
|
|
54
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* Sets multiple API configuration options.
|
|
116
|
+
* @param config config object
|
|
117
|
+
*/
|
|
55
118
|
static setConfig(config?: ApiConfig): void;
|
|
56
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Executes request with path or configuration.
|
|
121
|
+
* @param pathRequest path or config
|
|
122
|
+
* @returns Promise with response
|
|
123
|
+
*/
|
|
57
124
|
static request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
125
|
+
/**
|
|
126
|
+
* Sends GET request.
|
|
127
|
+
* @param request fetch config
|
|
128
|
+
* @returns Promise with response
|
|
129
|
+
*/
|
|
58
130
|
static get<T>(request: ApiFetch): Promise<T>;
|
|
131
|
+
/**
|
|
132
|
+
* Sends POST request.
|
|
133
|
+
* @param request fetch config
|
|
134
|
+
* @returns Promise with response
|
|
135
|
+
*/
|
|
59
136
|
static post<T>(request: ApiFetch): Promise<T>;
|
|
137
|
+
/**
|
|
138
|
+
* Sends PUT request.
|
|
139
|
+
* @param request fetch config
|
|
140
|
+
* @returns Promise with response
|
|
141
|
+
*/
|
|
60
142
|
static put<T>(request: ApiFetch): Promise<T>;
|
|
143
|
+
/**
|
|
144
|
+
* Sends PATCH request.
|
|
145
|
+
* @param request fetch config
|
|
146
|
+
* @returns Promise with response
|
|
147
|
+
*/
|
|
61
148
|
static patch<T>(request: ApiFetch): Promise<T>;
|
|
149
|
+
/**
|
|
150
|
+
* Sends DELETE request.
|
|
151
|
+
* @param request fetch config
|
|
152
|
+
* @returns Promise with response
|
|
153
|
+
*/
|
|
62
154
|
static delete<T>(request: ApiFetch): Promise<T>;
|
|
63
155
|
}
|
|
64
156
|
// File: classes/ApiCache.d.ts
|
|
65
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Class for caching API responses.
|
|
159
|
+
*/
|
|
66
160
|
export declare class ApiCache {
|
|
67
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* Initializes storage with listeners.
|
|
163
|
+
* @param getListener retrieval mechanism
|
|
164
|
+
* @param setListener saving mechanism
|
|
165
|
+
* @param removeListener deletion mechanism
|
|
166
|
+
* @param cacheStepAgeClearOld requests before cleanup
|
|
167
|
+
*/
|
|
68
168
|
static init(getListener: (key: string) => Promise<ApiCacheItem | undefined>, setListener: (key: string, value: ApiCacheItem) => Promise<boolean>, removeListener: (key: string) => Promise<boolean>, cacheStepAgeClearOld?: number): void;
|
|
69
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Resets cache and listeners.
|
|
171
|
+
*/
|
|
70
172
|
static reset(): void;
|
|
71
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* Gets data from cache.
|
|
175
|
+
* @param key cache key
|
|
176
|
+
* @returns data or undefined
|
|
177
|
+
*/
|
|
72
178
|
static get<T>(key: string): Promise<T | undefined>;
|
|
73
|
-
/**
|
|
179
|
+
/**
|
|
180
|
+
* Gets data from cache using fetch options.
|
|
181
|
+
* @param fetch fetch options
|
|
182
|
+
* @returns data or undefined
|
|
183
|
+
*/
|
|
74
184
|
static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
|
|
75
|
-
/**
|
|
185
|
+
/**
|
|
186
|
+
* Saves data to cache.
|
|
187
|
+
* @param key cache key
|
|
188
|
+
* @param value data
|
|
189
|
+
* @param age age in seconds
|
|
190
|
+
*/
|
|
76
191
|
static set<T>(key: string, value: T, age?: number): Promise<void>;
|
|
77
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* Saves data to cache using fetch options.
|
|
194
|
+
* @param fetch fetch options
|
|
195
|
+
* @param value data
|
|
196
|
+
*/
|
|
78
197
|
static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
|
|
79
|
-
/**
|
|
198
|
+
/**
|
|
199
|
+
* Removes data from cache.
|
|
200
|
+
* @param key cache key
|
|
201
|
+
*/
|
|
80
202
|
static remove(key: string): Promise<void>;
|
|
81
203
|
}
|
|
82
204
|
// File: classes/ApiDataReturn.d.ts
|
|
83
|
-
/**
|
|
205
|
+
/**
|
|
206
|
+
* Class for handling data returned from an API request.
|
|
207
|
+
*/
|
|
84
208
|
export declare class ApiDataReturn<T = any> {
|
|
209
|
+
/**
|
|
210
|
+
* Constructor for ApiDataReturn.
|
|
211
|
+
* @param apiFetch API config
|
|
212
|
+
* @param query response object
|
|
213
|
+
* @param end preparation end data
|
|
214
|
+
*/
|
|
85
215
|
constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd);
|
|
86
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* Initializes class by reading response.
|
|
218
|
+
*/
|
|
87
219
|
init(): Promise<this>;
|
|
88
|
-
/**
|
|
220
|
+
/**
|
|
221
|
+
* Returns processed data.
|
|
222
|
+
*/
|
|
89
223
|
get(): ApiData<T>;
|
|
90
|
-
/**
|
|
224
|
+
/**
|
|
225
|
+
* Returns processed data with status object.
|
|
226
|
+
* @param status API status instance
|
|
227
|
+
*/
|
|
91
228
|
getAndStatus(status: ApiStatus): ApiData<T>;
|
|
92
|
-
/**
|
|
229
|
+
/**
|
|
230
|
+
* Returns raw data received from API.
|
|
231
|
+
*/
|
|
93
232
|
getData(): ApiData<T> | undefined;
|
|
94
233
|
}
|
|
95
234
|
// File: classes/ApiDefault.d.ts
|
|
96
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* Class for working with default API request data.
|
|
237
|
+
*/
|
|
97
238
|
export declare class ApiDefault {
|
|
98
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* Checks if default data exists.
|
|
241
|
+
* @returns true if exists
|
|
242
|
+
*/
|
|
99
243
|
is(): boolean;
|
|
100
|
-
/**
|
|
244
|
+
/**
|
|
245
|
+
* Gets default request data.
|
|
246
|
+
* @returns data or undefined
|
|
247
|
+
*/
|
|
101
248
|
get(): ApiDefaultValue | undefined;
|
|
102
|
-
/**
|
|
249
|
+
/**
|
|
250
|
+
* Adds default data to request.
|
|
251
|
+
* @param request request data
|
|
252
|
+
* @returns merged data
|
|
253
|
+
*/
|
|
103
254
|
request(request: ApiFetch['request']): ApiFetch['request'];
|
|
104
|
-
/**
|
|
255
|
+
/**
|
|
256
|
+
* Sets default request data.
|
|
257
|
+
* @param request default data
|
|
258
|
+
* @returns this
|
|
259
|
+
*/
|
|
105
260
|
set(request: ApiDefaultValue): this;
|
|
106
261
|
}
|
|
107
262
|
// File: classes/ApiHeaders.d.ts
|
|
108
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* Class for managing HTTP request headers.
|
|
265
|
+
*/
|
|
109
266
|
export declare class ApiHeaders {
|
|
110
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* Gets headers for request.
|
|
269
|
+
* @param value header list
|
|
270
|
+
* @param type Content-Type value
|
|
271
|
+
* @returns merged headers
|
|
272
|
+
*/
|
|
111
273
|
get(value?: Record<string, string> | null, type?: string | undefined | null): Record<string, string> | undefined;
|
|
112
|
-
/**
|
|
274
|
+
/**
|
|
275
|
+
* Gets headers based on request type.
|
|
276
|
+
* @param request request data
|
|
277
|
+
* @param value header list
|
|
278
|
+
* @param type Content-Type value
|
|
279
|
+
* @returns merged headers
|
|
280
|
+
*/
|
|
113
281
|
getByRequest(request: ApiFetch['request'], value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
|
|
114
|
-
/**
|
|
282
|
+
/**
|
|
283
|
+
* Sets default headers.
|
|
284
|
+
* @param headers default headers
|
|
285
|
+
* @returns this
|
|
286
|
+
*/
|
|
115
287
|
set(headers: Record<string, string>): this;
|
|
116
288
|
}
|
|
117
289
|
// File: classes/ApiHydration.d.ts
|
|
118
|
-
/**
|
|
290
|
+
/**
|
|
291
|
+
* Class for collecting API data for SSR hydration.
|
|
292
|
+
*/
|
|
119
293
|
export declare class ApiHydration {
|
|
120
|
-
/**
|
|
294
|
+
/**
|
|
295
|
+
* Initializes response with hydration data.
|
|
296
|
+
* @param response API response
|
|
297
|
+
*/
|
|
121
298
|
initResponse(response: ApiResponse): void;
|
|
122
|
-
/**
|
|
299
|
+
/**
|
|
300
|
+
* Saves response for client-side hydration.
|
|
301
|
+
* @param apiFetch API config
|
|
302
|
+
* @param response API response data
|
|
303
|
+
*/
|
|
123
304
|
toClient<T>(apiFetch: ApiFetch, response: T): void;
|
|
124
|
-
/**
|
|
305
|
+
/**
|
|
306
|
+
* Returns hydration data string.
|
|
307
|
+
*/
|
|
125
308
|
toString(): string;
|
|
126
309
|
}
|
|
127
310
|
// File: classes/ApiInstance.d.ts
|
|
311
|
+
/** Options for the API instance */
|
|
128
312
|
export type ApiInstanceOptions = {
|
|
129
313
|
headersClass?: typeof ApiHeaders;
|
|
130
314
|
requestDefaultClass?: typeof ApiDefault;
|
|
@@ -135,196 +319,499 @@ export type ApiInstanceOptions = {
|
|
|
135
319
|
errorCenterClass?: ErrorCenterInstance;
|
|
136
320
|
hydrationClass?: typeof ApiHydration;
|
|
137
321
|
};
|
|
138
|
-
/**
|
|
322
|
+
/**
|
|
323
|
+
* Core class for managing HTTP requests using Fetch.
|
|
324
|
+
*/
|
|
139
325
|
export declare class ApiInstance {
|
|
326
|
+
/**
|
|
327
|
+
* Constructor
|
|
328
|
+
* @param url base script path
|
|
329
|
+
* @param options instance options
|
|
330
|
+
*/
|
|
140
331
|
constructor(url?: string, options?: ApiInstanceOptions);
|
|
141
|
-
/**
|
|
332
|
+
/**
|
|
333
|
+
* Checks if server is localhost.
|
|
334
|
+
* @returns true if local
|
|
335
|
+
*/
|
|
142
336
|
isLocalhost(): boolean;
|
|
143
|
-
/**
|
|
337
|
+
/**
|
|
338
|
+
* Returns last request status.
|
|
339
|
+
* @returns ApiStatus instance
|
|
340
|
+
*/
|
|
144
341
|
getStatus(): ApiStatus;
|
|
145
|
-
/**
|
|
342
|
+
/**
|
|
343
|
+
* Gets response handler.
|
|
344
|
+
* @returns ApiResponse instance
|
|
345
|
+
*/
|
|
146
346
|
getResponse(): ApiResponse;
|
|
147
|
-
/**
|
|
347
|
+
/**
|
|
348
|
+
* Gets hydration handler.
|
|
349
|
+
* @returns ApiHydration instance
|
|
350
|
+
*/
|
|
148
351
|
getHydration(): ApiHydration;
|
|
149
|
-
/**
|
|
352
|
+
/**
|
|
353
|
+
* Gets base URL with API path.
|
|
354
|
+
* @returns final base URL
|
|
355
|
+
*/
|
|
150
356
|
getOrigin(): string;
|
|
151
|
-
/**
|
|
357
|
+
/**
|
|
358
|
+
* Gets full script path.
|
|
359
|
+
* @param path script path
|
|
360
|
+
* @param api prepend base URL
|
|
361
|
+
* @returns full URL
|
|
362
|
+
*/
|
|
152
363
|
getUrl(path: string, api?: boolean): string;
|
|
153
|
-
/**
|
|
364
|
+
/**
|
|
365
|
+
* Gets request body data.
|
|
366
|
+
* @param request request data
|
|
367
|
+
* @param method HTTP method
|
|
368
|
+
* @returns body data or FormData
|
|
369
|
+
*/
|
|
154
370
|
getBody(request?: ApiFetch['request'], method?: ApiMethod): string | FormData | undefined;
|
|
155
|
-
/**
|
|
371
|
+
/**
|
|
372
|
+
* Gets query string for GET requests.
|
|
373
|
+
* @param request request data
|
|
374
|
+
* @param path request path
|
|
375
|
+
* @param method HTTP method
|
|
376
|
+
* @returns query string with prefix
|
|
377
|
+
*/
|
|
156
378
|
getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethod): string;
|
|
157
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Returns hydration data script string.
|
|
381
|
+
* @returns HTML script string
|
|
382
|
+
*/
|
|
158
383
|
getHydrationScript(): string;
|
|
159
|
-
/**
|
|
384
|
+
/**
|
|
385
|
+
* Modifies default headers.
|
|
386
|
+
* @param headers default headers
|
|
387
|
+
*/
|
|
160
388
|
setHeaders(headers: Record<string, string>): this;
|
|
161
|
-
/**
|
|
389
|
+
/**
|
|
390
|
+
* Modifies default request data.
|
|
391
|
+
* @param request default data
|
|
392
|
+
*/
|
|
162
393
|
setRequestDefault(request: Record<string, any>): this;
|
|
163
|
-
/**
|
|
394
|
+
/**
|
|
395
|
+
* Changes base path to script.
|
|
396
|
+
* @param url script path
|
|
397
|
+
*/
|
|
164
398
|
setUrl(url: string): this;
|
|
165
|
-
/**
|
|
399
|
+
/**
|
|
400
|
+
* Sets pre-request function.
|
|
401
|
+
* @param callback pre-request function
|
|
402
|
+
*/
|
|
166
403
|
setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
167
|
-
/**
|
|
404
|
+
/**
|
|
405
|
+
* Sets post-request function.
|
|
406
|
+
* @param callback post-request function
|
|
407
|
+
*/
|
|
168
408
|
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
169
|
-
/**
|
|
409
|
+
/**
|
|
410
|
+
* Changes request timeout.
|
|
411
|
+
* @param timeout ms
|
|
412
|
+
*/
|
|
170
413
|
setTimeout(timeout: number): this;
|
|
171
|
-
/**
|
|
414
|
+
/**
|
|
415
|
+
* Changes origin for base URL.
|
|
416
|
+
* @param origin protocol and domain
|
|
417
|
+
*/
|
|
172
418
|
setOrigin(origin: string): this;
|
|
173
|
-
/**
|
|
419
|
+
/**
|
|
420
|
+
* Executes request.
|
|
421
|
+
* @param pathRequest path or config
|
|
422
|
+
* @returns Promise with response
|
|
423
|
+
*/
|
|
174
424
|
request<T>(pathRequest: string | ApiFetch): Promise<T>;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
425
|
+
/**
|
|
426
|
+
* Sends GET request.
|
|
427
|
+
* @param request fetch config
|
|
428
|
+
* @returns Promise with response
|
|
429
|
+
*/
|
|
430
|
+
get<T>(request: ApiFetch): Promise<T>;
|
|
431
|
+
/**
|
|
432
|
+
* Sends POST request.
|
|
433
|
+
* @param request fetch config
|
|
434
|
+
* @returns Promise with response
|
|
435
|
+
*/
|
|
436
|
+
post<T>(request: ApiFetch): Promise<T>;
|
|
437
|
+
/**
|
|
438
|
+
* Sends PUT request.
|
|
439
|
+
* @param request fetch config
|
|
440
|
+
* @returns Promise with response
|
|
441
|
+
*/
|
|
442
|
+
put<T>(request: ApiFetch): Promise<T>;
|
|
443
|
+
/**
|
|
444
|
+
* Sends PATCH request.
|
|
445
|
+
* @param request fetch config
|
|
446
|
+
* @returns Promise with response
|
|
447
|
+
*/
|
|
448
|
+
patch<T>(request: ApiFetch): Promise<T>;
|
|
449
|
+
/**
|
|
450
|
+
* Sends DELETE request.
|
|
451
|
+
* @param request fetch config
|
|
452
|
+
* @returns Promise with response
|
|
453
|
+
*/
|
|
454
|
+
delete<T>(request: ApiFetch): Promise<T>;
|
|
180
455
|
}
|
|
181
456
|
// File: classes/ApiPreparation.d.ts
|
|
182
|
-
/**
|
|
457
|
+
/**
|
|
458
|
+
* Class for preparing requests.
|
|
459
|
+
*/
|
|
183
460
|
export declare class ApiPreparation {
|
|
184
|
-
/**
|
|
461
|
+
/**
|
|
462
|
+
* Pre-request preparation.
|
|
463
|
+
* @param active is active
|
|
464
|
+
* @param apiFetch request options
|
|
465
|
+
*/
|
|
185
466
|
make(active: boolean, apiFetch: ApiFetch): Promise<void>;
|
|
186
|
-
/**
|
|
467
|
+
/**
|
|
468
|
+
* Post-request analysis.
|
|
469
|
+
* @param active is active
|
|
470
|
+
* @param query response data
|
|
471
|
+
* @param apiFetch request options
|
|
472
|
+
* @returns end data
|
|
473
|
+
*/
|
|
187
474
|
makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
|
|
188
|
-
/**
|
|
475
|
+
/**
|
|
476
|
+
* Sets pre-request callback.
|
|
477
|
+
* @param callback pre-request function
|
|
478
|
+
* @returns this
|
|
479
|
+
*/
|
|
189
480
|
set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
190
|
-
/**
|
|
481
|
+
/**
|
|
482
|
+
* Sets post-request callback.
|
|
483
|
+
* @param callback post-request function
|
|
484
|
+
* @returns this
|
|
485
|
+
*/
|
|
191
486
|
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
192
487
|
}
|
|
193
488
|
// File: classes/ApiResponse.d.ts
|
|
194
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* Class for working with API responses.
|
|
491
|
+
*/
|
|
195
492
|
export declare class ApiResponse {
|
|
493
|
+
/**
|
|
494
|
+
* Constructor
|
|
495
|
+
* @param requestDefault default request class
|
|
496
|
+
*/
|
|
196
497
|
constructor(requestDefault: ApiDefault);
|
|
197
|
-
/**
|
|
498
|
+
/**
|
|
499
|
+
* Gets global cached request if exists.
|
|
500
|
+
* @param path request link
|
|
501
|
+
* @param method request method
|
|
502
|
+
* @param request request data
|
|
503
|
+
* @param devMode dev mode flag
|
|
504
|
+
* @returns cached item or undefined
|
|
505
|
+
*/
|
|
198
506
|
get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
|
|
199
|
-
/**
|
|
507
|
+
/**
|
|
508
|
+
* Returns list of cached responses.
|
|
509
|
+
*/
|
|
200
510
|
getList(): (ApiResponseItem & Record<string, any>)[];
|
|
201
|
-
/**
|
|
511
|
+
/**
|
|
512
|
+
* Adds cached requests.
|
|
513
|
+
* @param response caching data
|
|
514
|
+
*/
|
|
202
515
|
add(response: ApiResponseItem | ApiResponseItem[]): this;
|
|
203
|
-
/**
|
|
516
|
+
/**
|
|
517
|
+
* Sets developer mode.
|
|
518
|
+
* @param devMode is dev mode
|
|
519
|
+
* @returns this
|
|
520
|
+
*/
|
|
204
521
|
setDevMode(devMode: boolean): this;
|
|
205
|
-
/**
|
|
522
|
+
/**
|
|
523
|
+
* Executes emulator if available.
|
|
524
|
+
* @param apiFetch fetch config
|
|
525
|
+
* @returns response or undefined
|
|
526
|
+
*/
|
|
206
527
|
emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
|
|
207
|
-
/**
|
|
528
|
+
/**
|
|
529
|
+
* Executes emulator synchronously.
|
|
530
|
+
* @param apiFetch fetch config
|
|
531
|
+
* @returns response or undefined
|
|
532
|
+
*/
|
|
208
533
|
emulatorAsync<T>(apiFetch: ApiFetch): T | undefined;
|
|
209
534
|
}
|
|
210
535
|
// File: classes/ApiStatus.d.ts
|
|
211
|
-
/**
|
|
536
|
+
/**
|
|
537
|
+
* Class for managing API request status.
|
|
538
|
+
*/
|
|
212
539
|
export declare class ApiStatus {
|
|
213
|
-
/**
|
|
540
|
+
/**
|
|
541
|
+
* Returns last status item.
|
|
542
|
+
* @returns status item or undefined
|
|
543
|
+
*/
|
|
214
544
|
get(): ApiStatusItem | undefined;
|
|
215
|
-
/**
|
|
545
|
+
/**
|
|
546
|
+
* Returns status code.
|
|
547
|
+
* @returns HTTP status code
|
|
548
|
+
*/
|
|
216
549
|
getStatus(): number | undefined;
|
|
217
|
-
/**
|
|
550
|
+
/**
|
|
551
|
+
* Returns status text.
|
|
552
|
+
* @returns status text
|
|
553
|
+
*/
|
|
218
554
|
getStatusText(): string | undefined;
|
|
219
|
-
/**
|
|
555
|
+
/**
|
|
556
|
+
* Returns last status type.
|
|
557
|
+
* @returns status type
|
|
558
|
+
*/
|
|
220
559
|
getStatusType(): ApiStatusType | undefined;
|
|
221
|
-
/**
|
|
560
|
+
/**
|
|
561
|
+
* Returns execution status code.
|
|
562
|
+
* @returns code
|
|
563
|
+
*/
|
|
222
564
|
getCode(): string | undefined;
|
|
223
|
-
/**
|
|
565
|
+
/**
|
|
566
|
+
* Returns execution error.
|
|
567
|
+
* @returns error message
|
|
568
|
+
*/
|
|
224
569
|
getError(): string | undefined;
|
|
225
|
-
/**
|
|
570
|
+
/**
|
|
571
|
+
* Returns last request data.
|
|
572
|
+
* @returns response data
|
|
573
|
+
*/
|
|
226
574
|
getResponse<T>(): T | undefined;
|
|
227
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* Returns last request message.
|
|
577
|
+
* @returns message string
|
|
578
|
+
*/
|
|
228
579
|
getMessage(): string;
|
|
229
|
-
/**
|
|
580
|
+
/**
|
|
581
|
+
* Sets status item.
|
|
582
|
+
* @param data status data
|
|
583
|
+
* @returns this
|
|
584
|
+
*/
|
|
230
585
|
set(data: ApiStatusItem): this;
|
|
231
|
-
/**
|
|
586
|
+
/**
|
|
587
|
+
* Sets status code and text.
|
|
588
|
+
* @param status code
|
|
589
|
+
* @param statusText text
|
|
590
|
+
* @returns this
|
|
591
|
+
*/
|
|
232
592
|
setStatus(status?: number, statusText?: string): this;
|
|
233
|
-
/**
|
|
593
|
+
/**
|
|
594
|
+
* Sets error message.
|
|
595
|
+
* @param error error message
|
|
596
|
+
* @returns this
|
|
597
|
+
*/
|
|
234
598
|
setError(error?: string): this;
|
|
235
|
-
/**
|
|
599
|
+
/**
|
|
600
|
+
* Sets last response and extracts status/message.
|
|
601
|
+
* @param response response data
|
|
602
|
+
* @returns this
|
|
603
|
+
*/
|
|
236
604
|
setLastResponse(response?: any): this;
|
|
237
|
-
/**
|
|
605
|
+
/**
|
|
606
|
+
* Sets last status.
|
|
607
|
+
* @param status status
|
|
608
|
+
* @returns this
|
|
609
|
+
*/
|
|
238
610
|
setLastStatus(status?: ApiStatusType): this;
|
|
239
|
-
/**
|
|
611
|
+
/**
|
|
612
|
+
* Sets last execution code.
|
|
613
|
+
* @param code code
|
|
614
|
+
* @returns this
|
|
615
|
+
*/
|
|
240
616
|
setLastCode(code?: string): this;
|
|
241
|
-
/**
|
|
617
|
+
/**
|
|
618
|
+
* Sets last request message.
|
|
619
|
+
* @param message text
|
|
620
|
+
* @returns this
|
|
621
|
+
*/
|
|
242
622
|
setLastMessage(message?: string): this;
|
|
243
623
|
}
|
|
244
624
|
// File: classes/BroadcastMessage.d.ts
|
|
245
|
-
/**
|
|
625
|
+
/**
|
|
626
|
+
* Class for BroadcastChannel messages.
|
|
627
|
+
*/
|
|
246
628
|
export declare class BroadcastMessage<Message = any> {
|
|
629
|
+
/**
|
|
630
|
+
* Constructor initializing channel with handlers.
|
|
631
|
+
* @param name channel ID
|
|
632
|
+
* @param callback message callback
|
|
633
|
+
* @param callbackError error callback
|
|
634
|
+
* @param errorCenter ErrorCenter instance
|
|
635
|
+
*/
|
|
247
636
|
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
|
|
248
|
-
/**
|
|
637
|
+
/**
|
|
638
|
+
* Gets BroadcastChannel instance.
|
|
639
|
+
* @returns channel or undefined
|
|
640
|
+
*/
|
|
249
641
|
getChannel(): BroadcastChannel | undefined;
|
|
250
|
-
/**
|
|
642
|
+
/**
|
|
643
|
+
* Sends message.
|
|
644
|
+
* @param message data
|
|
645
|
+
* @returns this
|
|
646
|
+
*/
|
|
251
647
|
post(message: Message): this;
|
|
252
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* Sets message callback.
|
|
650
|
+
* @param callback callback function
|
|
651
|
+
* @returns this
|
|
652
|
+
*/
|
|
253
653
|
setCallback(callback: (event: MessageEvent<Message>) => void): this;
|
|
254
|
-
/**
|
|
654
|
+
/**
|
|
655
|
+
* Sets error callback.
|
|
656
|
+
* @param callbackError error function
|
|
657
|
+
* @returns this
|
|
658
|
+
*/
|
|
255
659
|
setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
|
|
256
|
-
/**
|
|
660
|
+
/**
|
|
661
|
+
* Closes channel.
|
|
662
|
+
* @returns this
|
|
663
|
+
*/
|
|
257
664
|
destroy(): this;
|
|
258
665
|
}
|
|
259
666
|
// File: classes/Cache.d.ts
|
|
260
667
|
/**
|
|
261
|
-
*
|
|
262
|
-
* @deprecated
|
|
668
|
+
* Simple in-memory cache for computed values.
|
|
669
|
+
* @deprecated obsolete
|
|
263
670
|
*/
|
|
264
671
|
export declare class Cache {
|
|
265
|
-
/**
|
|
672
|
+
/**
|
|
673
|
+
* Returns cached value. Recomputes if missing.
|
|
674
|
+
* @param name cache key
|
|
675
|
+
* @param callback computation function
|
|
676
|
+
* @param comparison invalidation array
|
|
677
|
+
* @returns value
|
|
678
|
+
*/
|
|
266
679
|
get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
267
|
-
/**
|
|
680
|
+
/**
|
|
681
|
+
* Async returns cached value.
|
|
682
|
+
* @param name cache key
|
|
683
|
+
* @param callback async computation
|
|
684
|
+
* @param comparison invalidation array
|
|
685
|
+
* @returns Promise with value
|
|
686
|
+
*/
|
|
268
687
|
getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
269
688
|
}
|
|
270
689
|
// File: classes/CacheItem.d.ts
|
|
271
690
|
/**
|
|
272
|
-
*
|
|
273
|
-
* @deprecated
|
|
691
|
+
* Manages single cached value with dependency tracking.
|
|
692
|
+
* @deprecated obsolete
|
|
274
693
|
*/
|
|
275
694
|
export declare class CacheItem<T> {
|
|
695
|
+
/**
|
|
696
|
+
* Creates CacheItem instance.
|
|
697
|
+
* @param callback computation function
|
|
698
|
+
*/
|
|
276
699
|
constructor(callback: () => T);
|
|
277
|
-
/**
|
|
700
|
+
/**
|
|
701
|
+
* Returns cached value. Recomputes on dependency change.
|
|
702
|
+
* @param comparison dependency array
|
|
703
|
+
* @returns value
|
|
704
|
+
*/
|
|
278
705
|
getCache(comparison: any[]): T;
|
|
279
|
-
/**
|
|
706
|
+
/**
|
|
707
|
+
* Returns previous cached value.
|
|
708
|
+
* @returns old value or undefined
|
|
709
|
+
*/
|
|
280
710
|
getCacheOld(): T | undefined;
|
|
281
|
-
/**
|
|
711
|
+
/**
|
|
712
|
+
* Async returns cached value.
|
|
713
|
+
* @param comparison dependency array
|
|
714
|
+
* @returns Promise with value
|
|
715
|
+
*/
|
|
282
716
|
getCacheAsync(comparison: any[]): Promise<T>;
|
|
283
717
|
}
|
|
284
718
|
// File: classes/CacheStatic.d.ts
|
|
285
719
|
/**
|
|
286
|
-
*
|
|
287
|
-
* @deprecated
|
|
720
|
+
* Static cache using ServerStorage.
|
|
721
|
+
* @deprecated obsolete
|
|
288
722
|
*/
|
|
289
723
|
export declare class CacheStatic {
|
|
290
|
-
/**
|
|
724
|
+
/**
|
|
725
|
+
* Returns cached value.
|
|
726
|
+
* @param name cache key
|
|
727
|
+
* @param callback computation function
|
|
728
|
+
* @param comparison invalidation array
|
|
729
|
+
* @returns value
|
|
730
|
+
*/
|
|
291
731
|
static get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
292
|
-
/**
|
|
732
|
+
/**
|
|
733
|
+
* Async returns cached value.
|
|
734
|
+
* @param name cache key
|
|
735
|
+
* @param callback async computation
|
|
736
|
+
* @param comparison invalidation array
|
|
737
|
+
* @returns Promise with value
|
|
738
|
+
*/
|
|
293
739
|
static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
|
|
294
740
|
}
|
|
295
741
|
// File: classes/Cookie.d.ts
|
|
296
|
-
/**
|
|
742
|
+
/**
|
|
743
|
+
* Class for managing cookies.
|
|
744
|
+
*/
|
|
297
745
|
export declare class Cookie<T> {
|
|
298
|
-
/**
|
|
746
|
+
/**
|
|
747
|
+
* Returns instance by cookie name.
|
|
748
|
+
* @param name cookie name
|
|
749
|
+
*/
|
|
299
750
|
static getInstance<T>(name: string): Cookie<unknown>;
|
|
751
|
+
/**
|
|
752
|
+
* Constructor
|
|
753
|
+
* @param name cookie name
|
|
754
|
+
*/
|
|
300
755
|
constructor(name: string);
|
|
301
|
-
/**
|
|
756
|
+
/**
|
|
757
|
+
* Get or update cookie data.
|
|
758
|
+
* @param defaultValue initial value or factory
|
|
759
|
+
* @param options cookie parameters
|
|
760
|
+
* @returns value
|
|
761
|
+
*/
|
|
302
762
|
get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
|
|
303
|
-
/**
|
|
763
|
+
/**
|
|
764
|
+
* Updates cookie.
|
|
765
|
+
* @param value new value or factory
|
|
766
|
+
* @param options cookie parameters
|
|
767
|
+
*/
|
|
304
768
|
set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
|
|
305
|
-
/**
|
|
769
|
+
/**
|
|
770
|
+
* Deletes cookie.
|
|
771
|
+
*/
|
|
306
772
|
remove(): void;
|
|
307
773
|
}
|
|
308
774
|
// File: classes/CookieBlock.d.ts
|
|
309
|
-
/**
|
|
775
|
+
/**
|
|
776
|
+
* Class for cookie access status.
|
|
777
|
+
*/
|
|
310
778
|
export declare class CookieBlock {
|
|
311
|
-
/**
|
|
779
|
+
/**
|
|
780
|
+
* Returns isolated CookieBlockInstance.
|
|
781
|
+
* @returns instance
|
|
782
|
+
*/
|
|
312
783
|
static getItem(): CookieBlockInstance;
|
|
313
|
-
/**
|
|
784
|
+
/**
|
|
785
|
+
* Gets status.
|
|
786
|
+
* @returns current block status
|
|
787
|
+
*/
|
|
314
788
|
static get(): boolean;
|
|
315
|
-
/**
|
|
789
|
+
/**
|
|
790
|
+
* Sets status.
|
|
791
|
+
* @param value block status
|
|
792
|
+
*/
|
|
316
793
|
static set(value: boolean): void;
|
|
317
794
|
}
|
|
318
795
|
// File: classes/CookieBlockInstance.d.ts
|
|
319
|
-
/**
|
|
796
|
+
/**
|
|
797
|
+
* Class for cookie access status.
|
|
798
|
+
*/
|
|
320
799
|
export declare class CookieBlockInstance {
|
|
321
|
-
/**
|
|
800
|
+
/**
|
|
801
|
+
* Gets status.
|
|
802
|
+
* @returns current block status
|
|
803
|
+
*/
|
|
322
804
|
get(): boolean;
|
|
323
|
-
/**
|
|
805
|
+
/**
|
|
806
|
+
* Sets status.
|
|
807
|
+
* @param value block status
|
|
808
|
+
*/
|
|
324
809
|
set(value: boolean): void;
|
|
325
810
|
}
|
|
326
811
|
// File: classes/CookieStorage.d.ts
|
|
812
|
+
/** Cookie sameSite attribute */
|
|
327
813
|
export type CookieSameSite = 'strict' | 'lax';
|
|
814
|
+
/** Cookie options */
|
|
328
815
|
export type CookieOptions = {
|
|
329
816
|
age?: number;
|
|
330
817
|
sameSite?: CookieSameSite;
|
|
@@ -335,398 +822,659 @@ export type CookieOptions = {
|
|
|
335
822
|
partitioned?: boolean;
|
|
336
823
|
arguments?: string[] | Record<string, string | number | boolean>;
|
|
337
824
|
};
|
|
338
|
-
/**
|
|
825
|
+
/**
|
|
826
|
+
* Consistent cookie storage across environments.
|
|
827
|
+
*/
|
|
339
828
|
export declare class CookieStorage {
|
|
340
|
-
/**
|
|
829
|
+
/**
|
|
830
|
+
* Initializes storage with listeners.
|
|
831
|
+
*/
|
|
341
832
|
static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
|
|
342
|
-
/**
|
|
833
|
+
/**
|
|
834
|
+
* Resets storage.
|
|
835
|
+
*/
|
|
343
836
|
static reset(): void;
|
|
344
|
-
/**
|
|
837
|
+
/**
|
|
838
|
+
* Gets data from storage.
|
|
839
|
+
* @param name cookie name
|
|
840
|
+
* @param defaultValue default value
|
|
841
|
+
* @returns value or default
|
|
842
|
+
*/
|
|
345
843
|
static get<T>(name: string, defaultValue?: T | (() => T)): T | undefined;
|
|
346
|
-
/**
|
|
844
|
+
/**
|
|
845
|
+
* Saves data to storage.
|
|
846
|
+
* @param name cookie name
|
|
847
|
+
* @param value data or factory
|
|
848
|
+
* @param options parameters
|
|
849
|
+
* @returns saved value
|
|
850
|
+
*/
|
|
347
851
|
static set<T>(name: string, value: T | (() => T), options?: CookieOptions): T;
|
|
348
|
-
/**
|
|
852
|
+
/**
|
|
853
|
+
* Removes data from storage.
|
|
854
|
+
* @param name cookie name
|
|
855
|
+
*/
|
|
349
856
|
static remove(name: string): void;
|
|
350
|
-
/**
|
|
857
|
+
/**
|
|
858
|
+
* Updates storage from cookies.
|
|
859
|
+
*/
|
|
351
860
|
static update(): void;
|
|
352
861
|
}
|
|
353
862
|
// File: classes/DataStorage.d.ts
|
|
354
|
-
/**
|
|
863
|
+
/**
|
|
864
|
+
* Local/session storage wrapper with SSR isolation.
|
|
865
|
+
*/
|
|
355
866
|
export declare class DataStorage<T> {
|
|
356
|
-
/**
|
|
867
|
+
/**
|
|
868
|
+
* Changes key prefix.
|
|
869
|
+
* @param newPrefix prefix
|
|
870
|
+
*/
|
|
357
871
|
static setPrefix(newPrefix: string): void;
|
|
872
|
+
/**
|
|
873
|
+
* Constructor.
|
|
874
|
+
* @param name value name
|
|
875
|
+
* @param isSession use session storage
|
|
876
|
+
* @param errorCenter error center instance
|
|
877
|
+
*/
|
|
358
878
|
constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
|
|
359
|
-
/**
|
|
879
|
+
/**
|
|
880
|
+
* Gets storage data.
|
|
881
|
+
* @param defaultValue default value
|
|
882
|
+
* @param cache cache seconds
|
|
883
|
+
* @returns value or default
|
|
884
|
+
*/
|
|
360
885
|
get(defaultValue?: T | (() => T), cache?: number): T | undefined;
|
|
361
|
-
/**
|
|
886
|
+
/**
|
|
887
|
+
* Changes storage data.
|
|
888
|
+
* @param value new values
|
|
889
|
+
* @returns set value
|
|
890
|
+
*/
|
|
362
891
|
set(value?: T | (() => T)): T | undefined;
|
|
363
|
-
/**
|
|
892
|
+
/**
|
|
893
|
+
* Removes storage data.
|
|
894
|
+
* @returns this
|
|
895
|
+
*/
|
|
364
896
|
remove(): this;
|
|
365
|
-
/**
|
|
897
|
+
/**
|
|
898
|
+
* Syncs from storage.
|
|
899
|
+
* @returns this
|
|
900
|
+
*/
|
|
366
901
|
update(): this;
|
|
367
902
|
}
|
|
368
903
|
// File: classes/Datetime.d.ts
|
|
369
904
|
/**
|
|
370
|
-
*
|
|
371
|
-
* @remarks Creating instance without date in SSR
|
|
905
|
+
* Class for working with dates.
|
|
906
|
+
* @remarks Creating instance without specific date in SSR can cause hydration mismatch.
|
|
372
907
|
*/
|
|
373
908
|
export declare class Datetime {
|
|
909
|
+
/**
|
|
910
|
+
* Constructor
|
|
911
|
+
* @param date date value
|
|
912
|
+
* @param type output format type
|
|
913
|
+
* @param code locale code
|
|
914
|
+
*/
|
|
374
915
|
constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
|
|
375
|
-
/**
|
|
916
|
+
/**
|
|
917
|
+
* Returns GeoIntl object.
|
|
918
|
+
* @returns GeoIntl
|
|
919
|
+
*/
|
|
376
920
|
getIntl(): GeoIntl;
|
|
377
|
-
/**
|
|
921
|
+
/**
|
|
922
|
+
* Returns Date object.
|
|
923
|
+
* @returns Date
|
|
924
|
+
*/
|
|
378
925
|
getDate(): Date;
|
|
379
|
-
/**
|
|
926
|
+
/**
|
|
927
|
+
* Returns output type.
|
|
928
|
+
* @returns GeoDate
|
|
929
|
+
*/
|
|
380
930
|
getType(): GeoDate;
|
|
381
|
-
/**
|
|
931
|
+
/**
|
|
932
|
+
* Returns hour format.
|
|
933
|
+
* @returns GeoHours
|
|
934
|
+
*/
|
|
382
935
|
getHoursType(): GeoHours;
|
|
383
|
-
/**
|
|
936
|
+
/**
|
|
937
|
+
* Checks for 24-hour format.
|
|
938
|
+
* @returns boolean
|
|
939
|
+
*/
|
|
384
940
|
getHour24(): boolean;
|
|
385
|
-
/**
|
|
941
|
+
/**
|
|
942
|
+
* Returns local time zone offset.
|
|
943
|
+
* @returns offset in minutes
|
|
944
|
+
*/
|
|
386
945
|
getTimeZoneOffset(): number;
|
|
387
|
-
/**
|
|
946
|
+
/**
|
|
947
|
+
* Returns time zone string.
|
|
948
|
+
* @param style display style
|
|
949
|
+
* @returns time zone
|
|
950
|
+
*/
|
|
388
951
|
getTimeZone(style?: GeoTimeZoneStyle): string;
|
|
389
|
-
/**
|
|
952
|
+
/**
|
|
953
|
+
* Returns first day of week code.
|
|
954
|
+
* @returns GeoFirstDay
|
|
955
|
+
*/
|
|
390
956
|
getFirstDayCode(): GeoFirstDay;
|
|
957
|
+
/**
|
|
958
|
+
* Returns year.
|
|
959
|
+
*/
|
|
391
960
|
getYear(): number;
|
|
392
|
-
/**
|
|
961
|
+
/**
|
|
962
|
+
* Returns month (1-12).
|
|
963
|
+
*/
|
|
393
964
|
getMonth(): number;
|
|
965
|
+
/**
|
|
966
|
+
* Returns day of month (1-31).
|
|
967
|
+
*/
|
|
394
968
|
getDay(): number;
|
|
969
|
+
/**
|
|
970
|
+
* Returns hours (0-23).
|
|
971
|
+
*/
|
|
395
972
|
getHour(): number;
|
|
973
|
+
/**
|
|
974
|
+
* Returns minutes (0-59).
|
|
975
|
+
*/
|
|
396
976
|
getMinute(): number;
|
|
977
|
+
/**
|
|
978
|
+
* Returns seconds (0-59).
|
|
979
|
+
*/
|
|
397
980
|
getSecond(): number;
|
|
398
|
-
/**
|
|
981
|
+
/**
|
|
982
|
+
* Returns last day of month.
|
|
983
|
+
*/
|
|
399
984
|
getMaxDay(): number;
|
|
400
|
-
/**
|
|
985
|
+
/**
|
|
986
|
+
* Returns formatted locale date string.
|
|
987
|
+
*/
|
|
401
988
|
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
|
|
989
|
+
/** Returns formatted year. */
|
|
402
990
|
localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
|
|
991
|
+
/** Returns formatted month. */
|
|
403
992
|
localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
|
|
993
|
+
/** Returns formatted day. */
|
|
404
994
|
localeDay(style?: Intl.DateTimeFormatOptions['day']): string;
|
|
995
|
+
/** Returns formatted hour. */
|
|
405
996
|
localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
|
|
997
|
+
/** Returns formatted minute. */
|
|
406
998
|
localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
|
|
999
|
+
/** Returns formatted second. */
|
|
407
1000
|
localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
|
|
408
|
-
/**
|
|
1001
|
+
/** Standard data output string. */
|
|
409
1002
|
standard(timeZone?: boolean): string;
|
|
410
|
-
/**
|
|
1003
|
+
/** Sets date value. */
|
|
411
1004
|
setDate(value: NumberOrStringOrDate): this;
|
|
412
|
-
/**
|
|
1005
|
+
/** Sets output type. */
|
|
413
1006
|
setType(value: GeoDate): this;
|
|
414
|
-
/**
|
|
1007
|
+
/** Sets 24-hour format. */
|
|
415
1008
|
setHour24(value: boolean): this;
|
|
416
|
-
/**
|
|
1009
|
+
/** Sets location code. */
|
|
417
1010
|
setCode(code: string): this;
|
|
418
|
-
/**
|
|
1011
|
+
/** Sets update listener. */
|
|
419
1012
|
setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
|
|
1013
|
+
/** Sets year. */
|
|
420
1014
|
setYear(value: number): this;
|
|
1015
|
+
/** Sets month (1-12). */
|
|
421
1016
|
setMonth(value: number): this;
|
|
1017
|
+
/** Sets day of month. */
|
|
422
1018
|
setDay(value: number): this;
|
|
1019
|
+
/** Sets hours. */
|
|
423
1020
|
setHour(value: number): this;
|
|
1021
|
+
/** Sets minutes. */
|
|
424
1022
|
setMinute(value: number): this;
|
|
1023
|
+
/** Sets seconds. */
|
|
425
1024
|
setSecond(value: number): this;
|
|
1025
|
+
/** Shifts date by years. */
|
|
426
1026
|
moveByYear(value: number): this;
|
|
1027
|
+
/** Shifts date by months. */
|
|
427
1028
|
moveByMonth(value: number): this;
|
|
1029
|
+
/** Shifts date by days. */
|
|
428
1030
|
moveByDay(value: number): this;
|
|
1031
|
+
/** Shifts date by hours. */
|
|
429
1032
|
moveByHour(value: number): this;
|
|
1033
|
+
/** Shifts date by minutes. */
|
|
430
1034
|
moveByMinute(value: number): this;
|
|
1035
|
+
/** Shifts date by seconds. */
|
|
431
1036
|
moveBySecond(value: number): this;
|
|
1037
|
+
/** Sets date to January. */
|
|
432
1038
|
moveMonthFirst(): this;
|
|
1039
|
+
/** Sets date to December. */
|
|
433
1040
|
moveMonthLast(): this;
|
|
1041
|
+
/** Moves to next month first day. */
|
|
434
1042
|
moveMonthNext(): this;
|
|
1043
|
+
/** Moves to previous month first day. */
|
|
435
1044
|
moveMonthPrevious(): this;
|
|
1045
|
+
/** Moves to first day of week. */
|
|
436
1046
|
moveWeekdayFirst(): this;
|
|
1047
|
+
/** Moves to last day of week. */
|
|
437
1048
|
moveWeekdayLast(): this;
|
|
1049
|
+
/** Moves to first day of first week of month. */
|
|
438
1050
|
moveWeekdayFirstByMonth(): this;
|
|
1051
|
+
/** Moves to first day of first full week of following month. */
|
|
439
1052
|
moveWeekdayLastByMonth(): this;
|
|
1053
|
+
/** Moves to next week. */
|
|
440
1054
|
moveWeekdayNext(): this;
|
|
1055
|
+
/** Moves to previous week. */
|
|
441
1056
|
moveWeekdayPrevious(): this;
|
|
1057
|
+
/** Moves to first day of month. */
|
|
442
1058
|
moveDayFirst(): this;
|
|
1059
|
+
/** Moves to last day of month. */
|
|
443
1060
|
moveDayLast(): this;
|
|
1061
|
+
/** Moves to next day. */
|
|
444
1062
|
moveDayNext(): this;
|
|
1063
|
+
/** Moves to previous day. */
|
|
445
1064
|
moveDayPrevious(): this;
|
|
446
|
-
/**
|
|
1065
|
+
/** Clones Date object. */
|
|
447
1066
|
clone(): Date;
|
|
448
|
-
/**
|
|
1067
|
+
/** Clones Datetime instance. */
|
|
449
1068
|
cloneClass(): Datetime;
|
|
1069
|
+
/** Clones and sets month to Jan. */
|
|
450
1070
|
cloneMonthFirst(): Datetime;
|
|
1071
|
+
/** Clones and sets month to Dec. */
|
|
451
1072
|
cloneMonthLast(): Datetime;
|
|
1073
|
+
/** Clones and moves 1 month ahead. */
|
|
452
1074
|
cloneMonthNext(): Datetime;
|
|
1075
|
+
/** Clones and moves 1 month back. */
|
|
453
1076
|
cloneMonthPrevious(): Datetime;
|
|
1077
|
+
/** Clones and sets to first day of week. */
|
|
454
1078
|
cloneWeekdayFirst(): Datetime;
|
|
1079
|
+
/** Clones and sets to last day of week. */
|
|
455
1080
|
cloneWeekdayLast(): Datetime;
|
|
1081
|
+
/** Clones and sets to first day of week in current month. */
|
|
456
1082
|
cloneWeekdayFirstByMonth(): Datetime;
|
|
1083
|
+
/** Clones and sets to last day of week in current month. */
|
|
457
1084
|
cloneWeekdayLastByMonth(): Datetime;
|
|
1085
|
+
/** Clones and sets to next week. */
|
|
458
1086
|
cloneWeekdayNext(): Datetime;
|
|
1087
|
+
/** Clones and sets to previous week. */
|
|
459
1088
|
cloneWeekdayPrevious(): Datetime;
|
|
1089
|
+
/** Clones and moves to beginning of month. */
|
|
460
1090
|
cloneDayFirst(): Datetime;
|
|
1091
|
+
/** Clones and moves to end of month. */
|
|
461
1092
|
cloneDayLast(): Datetime;
|
|
1093
|
+
/** Clones and moves 1 day ahead. */
|
|
462
1094
|
cloneDayNext(): Datetime;
|
|
1095
|
+
/** Clones and moves 1 day back. */
|
|
463
1096
|
cloneDayPrevious(): Datetime;
|
|
464
1097
|
}
|
|
465
1098
|
// File: classes/ErrorCenter.d.ts
|
|
466
|
-
/**
|
|
1099
|
+
/**
|
|
1100
|
+
* Class for managing error storage and handling.
|
|
1101
|
+
*/
|
|
467
1102
|
export declare class ErrorCenter {
|
|
468
|
-
/**
|
|
1103
|
+
/** Returns request-isolated ErrorCenterInstance. */
|
|
469
1104
|
static getItem(): ErrorCenterInstance;
|
|
470
|
-
/**
|
|
1105
|
+
/** Checks if cause with code exists. */
|
|
471
1106
|
static has(code: string, group?: string): boolean;
|
|
472
|
-
/**
|
|
1107
|
+
/** Gets error cause by code and group. */
|
|
473
1108
|
static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
474
|
-
/**
|
|
1109
|
+
/** Adds error cause. */
|
|
475
1110
|
static add(cause: ErrorCenterCauseItem): void;
|
|
476
|
-
/**
|
|
1111
|
+
/** Adds list of error causes. */
|
|
477
1112
|
static addList(causes: ErrorCenterCauseList): void;
|
|
478
|
-
/**
|
|
1113
|
+
/** Registers new handler. */
|
|
479
1114
|
static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
|
|
480
|
-
/**
|
|
1115
|
+
/** Registers list of handlers. */
|
|
481
1116
|
static addHandlerList(handlers: ErrorCenterHandlerList): void;
|
|
482
|
-
/**
|
|
1117
|
+
/** Triggers error handling. */
|
|
483
1118
|
static on(cause: ErrorCenterCauseItem): void;
|
|
484
1119
|
}
|
|
485
1120
|
// File: classes/ErrorCenterHandler.d.ts
|
|
486
|
-
/**
|
|
1121
|
+
/**
|
|
1122
|
+
* Class for managing and triggering error handlers.
|
|
1123
|
+
*/
|
|
487
1124
|
export declare class ErrorCenterHandler {
|
|
1125
|
+
/** Constructor */
|
|
488
1126
|
constructor(handlers?: ErrorCenterHandlerList);
|
|
489
|
-
/**
|
|
1127
|
+
/** Checks for handlers in group. */
|
|
490
1128
|
has(group: ErrorCenterGroup): boolean;
|
|
491
|
-
/**
|
|
1129
|
+
/** Gets handlers for group. */
|
|
492
1130
|
get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
|
|
493
|
-
/**
|
|
1131
|
+
/** Adds handler for group. */
|
|
494
1132
|
add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
495
|
-
/**
|
|
1133
|
+
/** Adds list of handlers. */
|
|
496
1134
|
addList(handlers: ErrorCenterHandlerList): this;
|
|
497
|
-
/**
|
|
1135
|
+
/** Triggers handlers and logs error. */
|
|
498
1136
|
on(cause: ErrorCenterCauseItem): this;
|
|
499
1137
|
}
|
|
500
1138
|
// File: classes/ErrorCenterInstance.d.ts
|
|
501
|
-
/**
|
|
1139
|
+
/**
|
|
1140
|
+
* Instance-based error storage and handling.
|
|
1141
|
+
*/
|
|
502
1142
|
export declare class ErrorCenterInstance {
|
|
1143
|
+
/** Constructor */
|
|
503
1144
|
constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
|
|
1145
|
+
/** Checks for cause by code. */
|
|
504
1146
|
has(code: string, group?: string): boolean;
|
|
1147
|
+
/** Gets cause by code. */
|
|
505
1148
|
get(code: string, group?: string): ErrorCenterCauseItem | undefined;
|
|
1149
|
+
/** Adds error cause. */
|
|
506
1150
|
add(cause: ErrorCenterCauseItem): this;
|
|
1151
|
+
/** Adds causes list. */
|
|
507
1152
|
addList(causes: ErrorCenterCauseList): this;
|
|
1153
|
+
/** Registers handler. */
|
|
508
1154
|
addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
|
|
1155
|
+
/** Registers handlers list. */
|
|
509
1156
|
addHandlerList(handlers: ErrorCenterHandlerList): this;
|
|
1157
|
+
/** Triggers error handling. */
|
|
510
1158
|
on(cause: ErrorCenterCauseItem): this;
|
|
511
1159
|
}
|
|
512
1160
|
// File: classes/EventItem.d.ts
|
|
513
1161
|
/**
|
|
514
|
-
*
|
|
515
|
-
*
|
|
1162
|
+
* Advanced wrapper for managing event listeners.
|
|
1163
|
+
*
|
|
1164
|
+
* ### Key Features:
|
|
1165
|
+
* - **Lifecycle Control**: `start`, `stop`, `toggle`, `reset`.
|
|
1166
|
+
* - **DOM Safety**: Automatically halts if element removed.
|
|
1167
|
+
* - **Optimizations**: `resize` via `ResizeObserver`, `scroll-sync` via `requestAnimationFrame`.
|
|
1168
|
+
*
|
|
1169
|
+
* ### Usage Examples:
|
|
516
1170
|
* @example
|
|
517
|
-
* const clickEvent = new EventItem('.btn', 'click', () => console.log('
|
|
1171
|
+
* const clickEvent = new EventItem('.btn', 'click', () => console.log('OK'));
|
|
518
1172
|
* clickEvent.start();
|
|
1173
|
+
* @example
|
|
1174
|
+
* interface UserData { id: number }
|
|
1175
|
+
* const emitter = new EventItem<Window, CustomEvent, UserData>(window, 'update');
|
|
1176
|
+
* emitter.setListener((e, detail) => console.log(detail?.id));
|
|
1177
|
+
* emitter.start();
|
|
1178
|
+
* emitter.dispatch({ id: 123 });
|
|
519
1179
|
*/
|
|
520
1180
|
export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
|
|
1181
|
+
/**
|
|
1182
|
+
* Constructor
|
|
1183
|
+
* @param elementSelector target element or selector
|
|
1184
|
+
* @param type event type or types array
|
|
1185
|
+
* @param listener handler function
|
|
1186
|
+
* @param options standard options or capture flag
|
|
1187
|
+
* @param detail custom data for listener
|
|
1188
|
+
*/
|
|
521
1189
|
constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
|
|
522
|
-
/**
|
|
1190
|
+
/** Checks if listening is active. */
|
|
523
1191
|
isActive(): boolean;
|
|
524
|
-
/**
|
|
1192
|
+
/** Returns target element. */
|
|
525
1193
|
getElement(): E | undefined;
|
|
526
|
-
/**
|
|
1194
|
+
/** Changes target element. */
|
|
527
1195
|
setElement(elementSelector?: ElementOrString<E>): this;
|
|
528
|
-
/**
|
|
1196
|
+
/** Modifies safety check element. */
|
|
529
1197
|
setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
|
|
530
|
-
/**
|
|
1198
|
+
/** Changes event type. */
|
|
531
1199
|
setType(type: string | string[]): this;
|
|
532
|
-
/**
|
|
1200
|
+
/** Modifies listener. */
|
|
533
1201
|
setListener(listener: EventListenerDetail<O, D>): this;
|
|
534
|
-
/**
|
|
1202
|
+
/** Modifies options. */
|
|
535
1203
|
setOptions(options?: EventOptions): this;
|
|
536
|
-
/**
|
|
1204
|
+
/** Modifies detail data. */
|
|
537
1205
|
setDetail(detail?: D): this;
|
|
538
|
-
/** Manually
|
|
1206
|
+
/** Manually triggers custom event dispatch. */
|
|
539
1207
|
dispatch(detail?: D | undefined): this;
|
|
540
|
-
/**
|
|
1208
|
+
/** Starts listening. */
|
|
541
1209
|
start(): this;
|
|
542
|
-
/**
|
|
1210
|
+
/** Stops listening. */
|
|
543
1211
|
stop(): this;
|
|
544
|
-
/**
|
|
1212
|
+
/** Toggles state. */
|
|
545
1213
|
toggle(activity: boolean): this;
|
|
546
|
-
/**
|
|
1214
|
+
/** Resets (stop and start if active). */
|
|
547
1215
|
reset(): this;
|
|
548
1216
|
}
|
|
549
1217
|
// File: classes/Formatters.d.ts
|
|
550
|
-
/**
|
|
1218
|
+
/**
|
|
1219
|
+
* Formats data list based on options.
|
|
1220
|
+
*/
|
|
551
1221
|
export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
|
|
1222
|
+
/**
|
|
1223
|
+
* Constructor
|
|
1224
|
+
* @param options formatting configuration
|
|
1225
|
+
* @param list data list
|
|
1226
|
+
*/
|
|
552
1227
|
constructor(options: Options, list?: List | undefined);
|
|
553
|
-
/**
|
|
1228
|
+
/** Checks if list set. */
|
|
554
1229
|
is(): boolean;
|
|
555
|
-
/**
|
|
556
|
-
isArray(): this is this & {
|
|
557
|
-
|
|
558
|
-
};
|
|
559
|
-
/** Get list length. */
|
|
1230
|
+
/** Checks if list is array. */
|
|
1231
|
+
isArray(): this is this & { list: FormattersList<Item>; };
|
|
1232
|
+
/** Returns record count. */
|
|
560
1233
|
length(): number;
|
|
561
|
-
/**
|
|
1234
|
+
/** Returns array list. */
|
|
562
1235
|
getList(): FormattersList<Item>;
|
|
563
|
-
/**
|
|
1236
|
+
/** Returns options. */
|
|
564
1237
|
getOptions(): Options;
|
|
565
|
-
/**
|
|
1238
|
+
/** Sets data list. */
|
|
566
1239
|
setList(list?: List): this;
|
|
567
|
-
/**
|
|
1240
|
+
/** Formats data. Adds values with 'Format' suffix. */
|
|
568
1241
|
to(): FormattersReturn<List, Options>;
|
|
569
1242
|
}
|
|
570
1243
|
// File: classes/Geo.d.ts
|
|
571
|
-
/**
|
|
1244
|
+
/**
|
|
1245
|
+
* Static geographic data management.
|
|
1246
|
+
*/
|
|
572
1247
|
export declare class Geo {
|
|
573
|
-
/**
|
|
1248
|
+
/** Returns request-isolated GeoInstance. */
|
|
574
1249
|
static getObject(): GeoInstance;
|
|
575
|
-
/**
|
|
1250
|
+
/** Returns current country and language. */
|
|
576
1251
|
static get(): GeoItemFull;
|
|
577
|
-
/**
|
|
1252
|
+
/** Returns 2-letter country code. */
|
|
578
1253
|
static getCountry(): string;
|
|
579
|
-
/**
|
|
1254
|
+
/** Returns 2-letter language code. */
|
|
580
1255
|
static getLanguage(): string;
|
|
581
|
-
/**
|
|
1256
|
+
/** Returns 'en-US' style locale. */
|
|
582
1257
|
static getStandard(): string;
|
|
583
|
-
/**
|
|
1258
|
+
/** Returns first day code. */
|
|
584
1259
|
static getFirstDay(): string;
|
|
585
|
-
/**
|
|
1260
|
+
/** Returns location string. */
|
|
586
1261
|
static getLocation(): string;
|
|
587
|
-
/**
|
|
1262
|
+
/** Returns processed geo data. */
|
|
588
1263
|
static getItem(): GeoItemFull;
|
|
589
|
-
/**
|
|
1264
|
+
/** Returns countries list. */
|
|
590
1265
|
static getList(): GeoItem[];
|
|
591
|
-
/**
|
|
1266
|
+
/** Gets data by code. */
|
|
592
1267
|
static getByCode(code?: string): GeoItemFull;
|
|
593
|
-
/**
|
|
1268
|
+
/** Search by full locale match. */
|
|
594
1269
|
static getByCodeFull(code: string): GeoItem | undefined;
|
|
1270
|
+
/** Search by country code. */
|
|
595
1271
|
static getByCountry(country: string): GeoItem | undefined;
|
|
1272
|
+
/** Search by language code. */
|
|
596
1273
|
static getByLanguage(language: string): GeoItem | undefined;
|
|
597
|
-
/**
|
|
1274
|
+
/** Returns timezone offset. */
|
|
598
1275
|
static getTimezone(): number;
|
|
599
|
-
/**
|
|
1276
|
+
/** Returns formatted timezone ('+00:00'). */
|
|
600
1277
|
static getTimezoneFormat(): string;
|
|
601
|
-
/**
|
|
1278
|
+
/** Determine geo data for code. */
|
|
602
1279
|
static find(code: string): GeoItemFull;
|
|
603
|
-
/**
|
|
1280
|
+
/** Returns 'en-US' string from item. */
|
|
604
1281
|
static toStandard(item: GeoItem): string;
|
|
605
|
-
/**
|
|
1282
|
+
/** Sets location. */
|
|
606
1283
|
static set(code: string, save?: boolean): void;
|
|
607
|
-
/**
|
|
1284
|
+
/** Sets timezone offset. */
|
|
608
1285
|
static setTimezone(timezone: number): void;
|
|
609
1286
|
}
|
|
610
1287
|
// File: classes/GeoFlag.d.ts
|
|
611
1288
|
export declare const GEO_FLAG_ICON_NAME = "f";
|
|
612
|
-
/**
|
|
1289
|
+
/**
|
|
1290
|
+
* Manage flags and geographic info.
|
|
1291
|
+
*/
|
|
613
1292
|
export declare class GeoFlag {
|
|
1293
|
+
static flags: Record<string, string>;
|
|
1294
|
+
/** Constructor */
|
|
614
1295
|
constructor(code?: string);
|
|
615
|
-
/**
|
|
1296
|
+
/** Gets country info and flag. */
|
|
616
1297
|
get(code?: string): GeoFlagItem | undefined;
|
|
617
|
-
/**
|
|
1298
|
+
/** Gets flag icon ID. */
|
|
618
1299
|
getFlag(code?: string): string | undefined;
|
|
619
|
-
/**
|
|
1300
|
+
/** Returns countries list. */
|
|
620
1301
|
getList(codes?: string[]): GeoFlagItem[];
|
|
621
|
-
/**
|
|
1302
|
+
/** Returns list with national names. */
|
|
622
1303
|
getNational(codes?: string[]): GeoFlagNational[];
|
|
623
|
-
/**
|
|
1304
|
+
/** Changes locale. */
|
|
624
1305
|
setCode(code: string): this;
|
|
625
1306
|
}
|
|
626
1307
|
// File: classes/GeoInstance.d.ts
|
|
627
|
-
/**
|
|
1308
|
+
/**
|
|
1309
|
+
* Base class for geographic data.
|
|
1310
|
+
*/
|
|
628
1311
|
export declare class GeoInstance {
|
|
629
1312
|
constructor();
|
|
1313
|
+
/** Gets current country info. */
|
|
630
1314
|
get(): GeoItemFull;
|
|
1315
|
+
/** Gets country code. */
|
|
631
1316
|
getCountry(): string;
|
|
1317
|
+
/** Gets language code. */
|
|
632
1318
|
getLanguage(): string;
|
|
1319
|
+
/** Gets language-country format. */
|
|
633
1320
|
getStandard(): string;
|
|
1321
|
+
/** Gets first day of week. */
|
|
634
1322
|
getFirstDay(): string;
|
|
1323
|
+
/** Gets location string. */
|
|
635
1324
|
getLocation(): string;
|
|
1325
|
+
/** Gets processed data. */
|
|
636
1326
|
getItem(): GeoItemFull;
|
|
1327
|
+
/** Returns countries list. */
|
|
637
1328
|
getList(): GeoItem[];
|
|
1329
|
+
/** Gets data by code. */
|
|
638
1330
|
getByCode(code?: string): GeoItemFull;
|
|
1331
|
+
/** Gets data by language-country. */
|
|
639
1332
|
getByCodeFull(code: string): GeoItem | undefined;
|
|
1333
|
+
/** Gets data by country code. */
|
|
640
1334
|
getByCountry(country: string): GeoItem | undefined;
|
|
1335
|
+
/** Gets data by language code. */
|
|
641
1336
|
getByLanguage(language: string): GeoItem | undefined;
|
|
1337
|
+
/** Gets offset minutes. */
|
|
642
1338
|
getTimezone(): number;
|
|
1339
|
+
/** Gets formatted offset string. */
|
|
643
1340
|
getTimezoneFormat(): string;
|
|
1341
|
+
/** Finds country data by code/name. */
|
|
644
1342
|
find(code: string): GeoItemFull;
|
|
1343
|
+
/** Converts to standard code. */
|
|
645
1344
|
toStandard(item: GeoItem): string;
|
|
1345
|
+
/** Updates location. */
|
|
646
1346
|
set(code: string, save?: boolean): void;
|
|
1347
|
+
/** Updates timezone offset. */
|
|
647
1348
|
setTimezone(timezone: number): void;
|
|
648
1349
|
}
|
|
649
1350
|
// File: classes/GeoIntl.d.ts
|
|
650
|
-
/**
|
|
1351
|
+
/**
|
|
1352
|
+
* Intl wrapper for language-sensitive formatting.
|
|
1353
|
+
*/
|
|
651
1354
|
export declare class GeoIntl {
|
|
1355
|
+
/** Checks for code instance. */
|
|
652
1356
|
static isItem(code?: string): boolean;
|
|
1357
|
+
/** Returns location code. */
|
|
653
1358
|
static getLocation(code?: string): string;
|
|
1359
|
+
/** Returns instance for code. */
|
|
654
1360
|
static getInstance(code?: string): GeoIntl;
|
|
1361
|
+
/** Constructor */
|
|
655
1362
|
constructor(code?: string, errorCenter?: ErrorCenterInstance);
|
|
1363
|
+
/** Returns location code. */
|
|
656
1364
|
getLocation(): string;
|
|
1365
|
+
/** Returns first day. */
|
|
657
1366
|
getFirstDay(): string;
|
|
658
|
-
/**
|
|
1367
|
+
/** Translated names for language/region. */
|
|
659
1368
|
display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
|
|
1369
|
+
/** Display language name. */
|
|
660
1370
|
languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
1371
|
+
/** Display region name. */
|
|
661
1372
|
countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
|
|
662
|
-
/**
|
|
1373
|
+
/** Formatted full name. */
|
|
663
1374
|
fullName(last: string, first: string, surname?: string, short?: boolean): string;
|
|
1375
|
+
/** Number formatting. */
|
|
664
1376
|
number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
665
|
-
/**
|
|
1377
|
+
/** Decimal point symbol. */
|
|
666
1378
|
decimal(): string;
|
|
1379
|
+
/** Currency formatting. */
|
|
667
1380
|
currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
|
|
1381
|
+
/** Returns currency symbol or code. */
|
|
668
1382
|
currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
|
|
1383
|
+
/** Unit formatting. */
|
|
669
1384
|
unit(value: NumberOrString, unitOptions?: string | Intl.NumberFormatOptions): string;
|
|
1385
|
+
/** File size formatting. */
|
|
670
1386
|
sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
|
|
1387
|
+
/** Percent formatting. */
|
|
671
1388
|
percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
1389
|
+
/** Percent formatting (base 100). */
|
|
672
1390
|
percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
|
|
673
|
-
/**
|
|
1391
|
+
/** Plural rule formatting. */
|
|
674
1392
|
plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
|
|
1393
|
+
/** Date formatting. */
|
|
675
1394
|
date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
|
|
1395
|
+
/** Relative time formatting. */
|
|
676
1396
|
relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
|
|
677
|
-
/** Relative time with fallback
|
|
1397
|
+
/** Relative time with fallback limit. */
|
|
678
1398
|
relativeLimit(value: NumberOrStringOrDate, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): string;
|
|
1399
|
+
/** Relative time by specific value and unit. */
|
|
679
1400
|
relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
|
|
1401
|
+
/** Month name. */
|
|
680
1402
|
month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
|
|
1403
|
+
/** Months list. */
|
|
681
1404
|
months(style?: Intl.DateTimeFormatOptions['month']): ItemValue<number | undefined>[];
|
|
1405
|
+
/** Weekday name. */
|
|
682
1406
|
weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
|
|
1407
|
+
/** Weekdays list. */
|
|
683
1408
|
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
|
|
1409
|
+
/** Time string. */
|
|
684
1410
|
time(value: NumberOrStringOrDate): string;
|
|
685
|
-
/** Locale-
|
|
1411
|
+
/** Locale-sensitive sort. */
|
|
686
1412
|
sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
|
|
687
1413
|
}
|
|
688
1414
|
// File: classes/GeoPhone.d.ts
|
|
689
|
-
/**
|
|
1415
|
+
/**
|
|
1416
|
+
* Phone number mask storage and processing.
|
|
1417
|
+
*/
|
|
690
1418
|
export declare class GeoPhone {
|
|
691
|
-
/**
|
|
1419
|
+
/** Gets code and country info. */
|
|
692
1420
|
static get(code: string): GeoPhoneValue | undefined;
|
|
693
|
-
/**
|
|
1421
|
+
/** Gets info by phone. */
|
|
694
1422
|
static getByPhone(phone: string): GeoPhoneMapInfo;
|
|
695
|
-
/**
|
|
1423
|
+
/** Gets mask data by country code. */
|
|
696
1424
|
static getByCode(code: string): GeoPhoneMap | undefined;
|
|
1425
|
+
/** Returns codes list. */
|
|
697
1426
|
static getList(): GeoPhoneValue[];
|
|
1427
|
+
/** Returns map tree. */
|
|
698
1428
|
static getMap(): Record<string, GeoPhoneMap>;
|
|
699
|
-
/**
|
|
1429
|
+
/** Converts to phone mask. */
|
|
700
1430
|
static toMask(phone: string, masks?: string[]): string | undefined;
|
|
701
|
-
/**
|
|
1431
|
+
/** Removes country code. */
|
|
702
1432
|
static removeZero(phone: string): string;
|
|
703
1433
|
}
|
|
704
1434
|
// File: classes/Global.d.ts
|
|
705
|
-
/**
|
|
1435
|
+
/**
|
|
1436
|
+
* Global application data storage.
|
|
1437
|
+
*/
|
|
706
1438
|
export declare class Global {
|
|
1439
|
+
/** Returns storage instance. */
|
|
707
1440
|
static getItem(): Record<string, any>;
|
|
1441
|
+
/** Gets value by name. */
|
|
708
1442
|
static get<R = any>(name: string): R;
|
|
709
|
-
/**
|
|
1443
|
+
/** Adds data once. */
|
|
710
1444
|
static add(data: Record<string, any>): void;
|
|
711
1445
|
}
|
|
712
1446
|
// File: classes/Hash.d.ts
|
|
713
|
-
/**
|
|
1447
|
+
/**
|
|
1448
|
+
* URL hash data management.
|
|
1449
|
+
*/
|
|
714
1450
|
export declare class Hash {
|
|
1451
|
+
/** Returns HashInstance. */
|
|
715
1452
|
static getItem(): HashInstance;
|
|
1453
|
+
/** Gets data from hash. */
|
|
716
1454
|
static get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1455
|
+
/** Sets data in hash. */
|
|
717
1456
|
static set<T>(name: string, callback: T | (() => T)): void;
|
|
1457
|
+
/** Adds change watcher. */
|
|
718
1458
|
static addWatch<T>(name: string, callback: (value: T) => void): void;
|
|
1459
|
+
/** Removes watcher. */
|
|
719
1460
|
static removeWatch<T>(name: string, callback: (value: T) => void): void;
|
|
720
|
-
/**
|
|
1461
|
+
/** Reloads from URL string. */
|
|
721
1462
|
static reload(): void;
|
|
722
1463
|
}
|
|
723
1464
|
// File: classes/HashInstance.d.ts
|
|
724
|
-
/**
|
|
1465
|
+
/**
|
|
1466
|
+
* URL hash data management.
|
|
1467
|
+
*/
|
|
725
1468
|
export declare class HashInstance {
|
|
1469
|
+
/** Gets data from hash. */
|
|
726
1470
|
get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
1471
|
+
/** Sets data in hash. */
|
|
727
1472
|
set<T>(name: string, callback: T | (() => T)): this;
|
|
1473
|
+
/** Adds change listener. */
|
|
728
1474
|
addWatch<T>(name: string, callback: (value: T) => void): this;
|
|
1475
|
+
/** Removes listener. */
|
|
729
1476
|
removeWatch<T>(name: string, callback: (value: T) => void): this;
|
|
1477
|
+
/** Updates from URL. */
|
|
730
1478
|
reload(): this;
|
|
731
1479
|
}
|
|
732
1480
|
// File: classes/Icons.d.ts
|
|
@@ -735,96 +1483,168 @@ export type IconsConfig = {
|
|
|
735
1483
|
url?: string;
|
|
736
1484
|
list?: Record<string, IconsItem>;
|
|
737
1485
|
};
|
|
738
|
-
/**
|
|
1486
|
+
/**
|
|
1487
|
+
* Icons management.
|
|
1488
|
+
*/
|
|
739
1489
|
export declare class Icons {
|
|
1490
|
+
/** Checks if icon registered. */
|
|
740
1491
|
static is(index: string): boolean;
|
|
741
|
-
/**
|
|
1492
|
+
/** Returns icon content/path. */
|
|
742
1493
|
static get(index: string, url?: string, wait?: number): Promise<string>;
|
|
743
|
-
/**
|
|
1494
|
+
/** Sync returns icon. */
|
|
744
1495
|
static getAsync(index: string, url?: string): string;
|
|
1496
|
+
/** Returns icon names list. */
|
|
745
1497
|
static getNameList(): string[];
|
|
1498
|
+
/** Returns global URL. */
|
|
746
1499
|
static getUrlGlobal(): string;
|
|
1500
|
+
/** Adds custom icon. */
|
|
747
1501
|
static add(index: string, file: IconsItem): void;
|
|
1502
|
+
/** Adds loading placeholder. */
|
|
748
1503
|
static addLoad(index: string): void;
|
|
1504
|
+
/** Adds global icon. */
|
|
749
1505
|
static addGlobal(index: string, file: string): void;
|
|
1506
|
+
/** Adds icons list. */
|
|
750
1507
|
static addByList(list: Record<string, IconsItem>): void;
|
|
1508
|
+
/** Changes path. */
|
|
751
1509
|
static setUrl(url: string): void;
|
|
1510
|
+
/** Changes config. */
|
|
752
1511
|
static setConfig(config: IconsConfig): void;
|
|
753
1512
|
}
|
|
754
1513
|
// File: classes/Loading.d.ts
|
|
755
|
-
/**
|
|
1514
|
+
/**
|
|
1515
|
+
* Global loading state.
|
|
1516
|
+
*/
|
|
756
1517
|
export declare class Loading {
|
|
1518
|
+
/** Checks if active. */
|
|
757
1519
|
static is(): boolean;
|
|
1520
|
+
/** Gets current value. */
|
|
758
1521
|
static get(): number;
|
|
1522
|
+
/** Returns LoadingInstance. */
|
|
759
1523
|
static getItem(): LoadingInstance;
|
|
1524
|
+
/** Shows loader. */
|
|
760
1525
|
static show(): void;
|
|
1526
|
+
/** Hides loader. */
|
|
761
1527
|
static hide(): void;
|
|
1528
|
+
/** Registers event listener. */
|
|
762
1529
|
static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1530
|
+
/** Unregisters event listener. */
|
|
763
1531
|
static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
764
1532
|
}
|
|
765
1533
|
// File: classes/LoadingInstance.d.ts
|
|
1534
|
+
/** Loading event data */
|
|
766
1535
|
export type LoadingDetail = {
|
|
767
1536
|
loading: boolean;
|
|
768
1537
|
};
|
|
1538
|
+
/** Loading registration item */
|
|
769
1539
|
export type LoadingRegistrationItem = {
|
|
770
1540
|
item: EventItem<Window, CustomEvent, LoadingDetail>;
|
|
771
1541
|
listener: EventListenerDetail<CustomEvent, LoadingDetail>;
|
|
772
1542
|
element?: ElementOrString<HTMLElement>;
|
|
773
1543
|
};
|
|
774
|
-
/**
|
|
1544
|
+
/**
|
|
1545
|
+
* Global loading instance.
|
|
1546
|
+
*/
|
|
775
1547
|
export declare class LoadingInstance {
|
|
1548
|
+
/** Constructor */
|
|
776
1549
|
constructor(eventName?: string);
|
|
1550
|
+
/** Checks if loader active. */
|
|
777
1551
|
is(): boolean;
|
|
1552
|
+
/** Gets loading value. */
|
|
778
1553
|
get(): number;
|
|
1554
|
+
/** Shows loader. */
|
|
779
1555
|
show(): void;
|
|
1556
|
+
/** Hides loader. */
|
|
780
1557
|
hide(): void;
|
|
1558
|
+
/** Registers event. */
|
|
781
1559
|
registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
1560
|
+
/** Unregisters event. */
|
|
782
1561
|
unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
783
1562
|
}
|
|
784
1563
|
// File: classes/Meta.d.ts
|
|
785
|
-
/**
|
|
1564
|
+
/**
|
|
1565
|
+
* Unified meta tag manager (Standard, OG, Twitter).
|
|
1566
|
+
*/
|
|
786
1567
|
export declare class Meta extends MetaManager<MetaTag[]> {
|
|
1568
|
+
/** Constructor */
|
|
787
1569
|
constructor();
|
|
1570
|
+
/** Gets MetaOg instance. */
|
|
788
1571
|
getOg(): MetaOg;
|
|
1572
|
+
/** Gets MetaTwitter instance. */
|
|
789
1573
|
getTwitter(): MetaTwitter;
|
|
1574
|
+
/** Gets title. */
|
|
790
1575
|
getTitle(): string;
|
|
1576
|
+
/** Gets keywords. */
|
|
791
1577
|
getKeywords(): string;
|
|
1578
|
+
/** Gets description. */
|
|
792
1579
|
getDescription(): string;
|
|
1580
|
+
/** Gets OG image. */
|
|
793
1581
|
getImage(): string;
|
|
1582
|
+
/** Gets canonical URL. */
|
|
794
1583
|
getCanonical(): string;
|
|
1584
|
+
/** Gets robots directive. */
|
|
795
1585
|
getRobots(): MetaRobots;
|
|
1586
|
+
/** Gets author. */
|
|
796
1587
|
getAuthor(): string;
|
|
1588
|
+
/** Gets OG site name. */
|
|
797
1589
|
getSiteName(): string;
|
|
1590
|
+
/** Gets OG locale. */
|
|
798
1591
|
getLocale(): string;
|
|
799
|
-
/**
|
|
1592
|
+
/** Sets title and syncs cards. */
|
|
800
1593
|
setTitle(title: string): this;
|
|
1594
|
+
/** Sets keywords. */
|
|
801
1595
|
setKeywords(keywords: string | string[]): this;
|
|
1596
|
+
/** Sets description. */
|
|
802
1597
|
setDescription(description: string): this;
|
|
1598
|
+
/** Sets OG/Twitter image. */
|
|
803
1599
|
setImage(image: string): this;
|
|
1600
|
+
/** Sets canonical and syncs cards. */
|
|
804
1601
|
setCanonical(canonical: string): this;
|
|
1602
|
+
/** Sets robots. */
|
|
805
1603
|
setRobots(robots: MetaRobots): this;
|
|
1604
|
+
/** Sets author. */
|
|
806
1605
|
setAuthor(author: string): this;
|
|
1606
|
+
/** Sets OG/Twitter site name. */
|
|
807
1607
|
setSiteName(siteName: string): this;
|
|
1608
|
+
/** Sets OG locale. */
|
|
808
1609
|
setLocale(locale: string): this;
|
|
809
|
-
/**
|
|
1610
|
+
/** Sets title suffix. */
|
|
810
1611
|
setSuffix(suffix?: string): void;
|
|
811
|
-
/**
|
|
1612
|
+
/** Generates full HTML. */
|
|
812
1613
|
html(): string;
|
|
813
|
-
/**
|
|
1614
|
+
/** Generates HTML-safe title. */
|
|
814
1615
|
htmlTitle(): string;
|
|
815
1616
|
}
|
|
816
1617
|
// File: classes/MetaManager.d.ts
|
|
1618
|
+
type MetaList<T extends readonly string[]> = {
|
|
1619
|
+
[K in T[number]]?: string;
|
|
1620
|
+
};
|
|
1621
|
+
/**
|
|
1622
|
+
* Base meta tag management.
|
|
1623
|
+
*/
|
|
817
1624
|
export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
|
|
1625
|
+
/**
|
|
1626
|
+
* Constructor
|
|
1627
|
+
* @param listMeta names list
|
|
1628
|
+
* @param isProperty use property attribute
|
|
1629
|
+
*/
|
|
818
1630
|
constructor(listMeta: T, isProperty?: boolean);
|
|
1631
|
+
/** Returns tag names list. */
|
|
819
1632
|
getListMeta(): T;
|
|
1633
|
+
/** Gets content by name. */
|
|
820
1634
|
get(name: Key): string;
|
|
1635
|
+
/** Returns all tags object. */
|
|
821
1636
|
getItems(): MetaList<T>;
|
|
1637
|
+
/** Returns all tags HTML. */
|
|
822
1638
|
html(): string;
|
|
1639
|
+
/** Sets tag content. */
|
|
823
1640
|
set(name: Key, content: string): this;
|
|
1641
|
+
/** Sets multiple tags. */
|
|
824
1642
|
setByList(metaList: MetaList<T>): this;
|
|
825
1643
|
}
|
|
826
1644
|
// File: classes/MetaOg.d.ts
|
|
827
|
-
/**
|
|
1645
|
+
/**
|
|
1646
|
+
* Open Graph meta manager.
|
|
1647
|
+
*/
|
|
828
1648
|
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
829
1649
|
constructor();
|
|
830
1650
|
getTitle(): string;
|
|
@@ -843,7 +1663,9 @@ export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
|
843
1663
|
setSiteName(siteName: string): this;
|
|
844
1664
|
}
|
|
845
1665
|
// File: classes/MetaStatic.d.ts
|
|
846
|
-
/**
|
|
1666
|
+
/**
|
|
1667
|
+
* Static meta tag management.
|
|
1668
|
+
*/
|
|
847
1669
|
export declare class MetaStatic {
|
|
848
1670
|
static getItem(): Meta;
|
|
849
1671
|
static getOg(): MetaOg;
|
|
@@ -871,7 +1693,9 @@ export declare class MetaStatic {
|
|
|
871
1693
|
static htmlTitle(): string;
|
|
872
1694
|
}
|
|
873
1695
|
// File: classes/MetaTwitter.d.ts
|
|
874
|
-
/**
|
|
1696
|
+
/**
|
|
1697
|
+
* Twitter Card meta manager.
|
|
1698
|
+
*/
|
|
875
1699
|
export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
876
1700
|
constructor();
|
|
877
1701
|
getCard(): MetaTwitterCard;
|
|
@@ -890,74 +1714,140 @@ export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
|
890
1714
|
setImage(image: string): this;
|
|
891
1715
|
}
|
|
892
1716
|
// File: classes/ResumableTimer.d.ts
|
|
893
|
-
/**
|
|
1717
|
+
/**
|
|
1718
|
+
* Timer that can be paused/resumed.
|
|
1719
|
+
*/
|
|
894
1720
|
export declare class ResumableTimer {
|
|
1721
|
+
/**
|
|
1722
|
+
* Constructor
|
|
1723
|
+
* @param callback function to call
|
|
1724
|
+
* @param delay ms
|
|
1725
|
+
* @param blockStart no immediate start
|
|
1726
|
+
*/
|
|
895
1727
|
constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
|
|
1728
|
+
/** Resumes/starts timer. */
|
|
896
1729
|
resume(): this;
|
|
1730
|
+
/** Pauses timer. */
|
|
897
1731
|
pause(): this;
|
|
1732
|
+
/** Resets with original delay. */
|
|
898
1733
|
reset(): this;
|
|
1734
|
+
/** Clears timer state. */
|
|
899
1735
|
clear(): this;
|
|
900
1736
|
}
|
|
901
1737
|
// File: classes/ScrollbarWidth.d.ts
|
|
902
|
-
/**
|
|
1738
|
+
/**
|
|
1739
|
+
* Gets scrollbar width.
|
|
1740
|
+
*/
|
|
903
1741
|
export declare class ScrollbarWidth {
|
|
1742
|
+
/** Checks if scroll hiding enabled. */
|
|
904
1743
|
static is(): Promise<boolean>;
|
|
1744
|
+
/** Returns width in pixels. */
|
|
905
1745
|
static get(): Promise<number>;
|
|
1746
|
+
/** Returns storage instance. */
|
|
906
1747
|
static getStorage(): DataStorage<number>;
|
|
1748
|
+
/** Checks if calculation active. */
|
|
907
1749
|
static getCalculate(): boolean;
|
|
908
1750
|
}
|
|
909
1751
|
// File: classes/SearchList.d.ts
|
|
910
|
-
/**
|
|
1752
|
+
/**
|
|
1753
|
+
* Manages searchable list.
|
|
1754
|
+
*/
|
|
911
1755
|
export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
|
|
1756
|
+
/**
|
|
1757
|
+
* Constructor
|
|
1758
|
+
* @param list data list
|
|
1759
|
+
* @param columns search columns
|
|
1760
|
+
* @param value initial value
|
|
1761
|
+
* @param options search options
|
|
1762
|
+
*/
|
|
912
1763
|
constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
|
|
1764
|
+
/** Returns data manager. */
|
|
913
1765
|
getData(): SearchListData<T, K>;
|
|
1766
|
+
/** Returns items list. */
|
|
914
1767
|
getList(): SearchListValue<T>;
|
|
1768
|
+
/** Returns search columns. */
|
|
915
1769
|
getColumns(): K | undefined;
|
|
1770
|
+
/** Returns search item instance. */
|
|
916
1771
|
getItem(): SearchListItem;
|
|
1772
|
+
/** Returns current search value. */
|
|
917
1773
|
getValue(): string | undefined;
|
|
1774
|
+
/** Returns options manager. */
|
|
918
1775
|
getOptions(): SearchListOptions;
|
|
1776
|
+
/** Sets items and resets cache. */
|
|
919
1777
|
setList(list: SearchListValue<T>): this;
|
|
1778
|
+
/** Sets columns and resets cache. */
|
|
920
1779
|
setColumns(columns?: K): this;
|
|
1780
|
+
/** Sets value and updates matcher. */
|
|
921
1781
|
setValue(value?: string): this;
|
|
1782
|
+
/** Sets options and updates matcher. */
|
|
922
1783
|
setOptions(options: SearchOptions): this;
|
|
923
|
-
/**
|
|
1784
|
+
/** Processes and returns formatted list. */
|
|
924
1785
|
to(): SearchFormatList<T, K>;
|
|
925
1786
|
}
|
|
926
1787
|
// File: classes/SearchListData.d.ts
|
|
927
|
-
/**
|
|
1788
|
+
/**
|
|
1789
|
+
* Search data and cache manager.
|
|
1790
|
+
*/
|
|
928
1791
|
export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
|
|
1792
|
+
/** Constructor */
|
|
929
1793
|
constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
|
|
1794
|
+
/** Checks if ready for search. */
|
|
930
1795
|
is(): this is this & { list: T[]; columns: string[]; };
|
|
1796
|
+
/** Checks for list. */
|
|
931
1797
|
isList(): this is this & { list: T[]; };
|
|
1798
|
+
/** Returns original list. */
|
|
932
1799
|
getList(): SearchListValue<T>;
|
|
1800
|
+
/** Returns columns. */
|
|
933
1801
|
getColumns(): K | undefined;
|
|
1802
|
+
/** Sets list and regenerates cache. */
|
|
934
1803
|
setList(list: SearchListValue<T>): this;
|
|
1804
|
+
/** Sets columns and regenerates cache. */
|
|
935
1805
|
setColumns(columns?: SearchColumns<T>): this;
|
|
1806
|
+
/** Finds cached item. */
|
|
936
1807
|
findCacheItem(item: T): SearchCacheItem<T> | undefined;
|
|
1808
|
+
/** Executes callback for each cached item. */
|
|
937
1809
|
forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
|
|
1810
|
+
/** Formats single item with highlights. */
|
|
938
1811
|
toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
|
|
939
1812
|
}
|
|
940
1813
|
// File: classes/SearchListItem.d.ts
|
|
941
|
-
/**
|
|
1814
|
+
/**
|
|
1815
|
+
* Single search item state.
|
|
1816
|
+
*/
|
|
942
1817
|
export declare class SearchListItem {
|
|
1818
|
+
/** Constructor */
|
|
943
1819
|
constructor(value: string | undefined, options: SearchListOptions);
|
|
1820
|
+
/** Checks for value. */
|
|
944
1821
|
is(): this is this & { value: string; };
|
|
1822
|
+
/** Checks if search should trigger. */
|
|
945
1823
|
isSearch(): boolean;
|
|
1824
|
+
/** Returns value. */
|
|
946
1825
|
get(): string;
|
|
1826
|
+
/** Sets value. */
|
|
947
1827
|
set(value?: string): this;
|
|
948
1828
|
}
|
|
949
1829
|
// File: classes/SearchListMatcher.d.ts
|
|
950
|
-
/**
|
|
1830
|
+
/**
|
|
1831
|
+
* Search regex matcher.
|
|
1832
|
+
*/
|
|
951
1833
|
export declare class SearchListMatcher {
|
|
1834
|
+
/** Constructor */
|
|
952
1835
|
constructor(item: SearchListItem, options: SearchListOptions);
|
|
1836
|
+
/** Checks if initialized. */
|
|
953
1837
|
is(): boolean;
|
|
1838
|
+
/** Checks for match. */
|
|
954
1839
|
isSelection(value: SearchCacheItem<any>['value']): boolean;
|
|
1840
|
+
/** Returns current RegExp. */
|
|
955
1841
|
get(): RegExp | undefined;
|
|
1842
|
+
/** Updates matcher from value/options. */
|
|
956
1843
|
update(): void;
|
|
957
1844
|
}
|
|
958
1845
|
// File: classes/SearchListOptions.d.ts
|
|
959
|
-
/**
|
|
1846
|
+
/**
|
|
1847
|
+
* Search options manager.
|
|
1848
|
+
*/
|
|
960
1849
|
export declare class SearchListOptions {
|
|
1850
|
+
/** Constructor */
|
|
961
1851
|
constructor(options?: SearchOptions | undefined);
|
|
962
1852
|
getOptions(): SearchOptions;
|
|
963
1853
|
getLimit(): number;
|
|
@@ -968,265 +1858,431 @@ export declare class SearchListOptions {
|
|
|
968
1858
|
setOptions(options: SearchOptions): this;
|
|
969
1859
|
}
|
|
970
1860
|
// File: classes/ServerStorage.d.ts
|
|
971
|
-
|
|
1861
|
+
type ServerStorageItem = {
|
|
1862
|
+
value: any;
|
|
1863
|
+
hydration: boolean;
|
|
1864
|
+
};
|
|
1865
|
+
type ServerStorageList = Record<string, ServerStorageItem>;
|
|
1866
|
+
/**
|
|
1867
|
+
* SSR data isolation manager.
|
|
1868
|
+
*/
|
|
972
1869
|
export declare class ServerStorage {
|
|
973
|
-
/**
|
|
1870
|
+
/**
|
|
1871
|
+
* Initializes storage with context listener.
|
|
1872
|
+
* @param listener context factory
|
|
1873
|
+
* @returns this class
|
|
1874
|
+
*/
|
|
974
1875
|
static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
|
|
975
1876
|
static reset(): void;
|
|
1877
|
+
/** Checks key existence. */
|
|
976
1878
|
static has(key: string): boolean;
|
|
1879
|
+
/** Gets value or creates with factory. */
|
|
977
1880
|
static get<T = any>(key: string, defaultValue?: () => T, hydration?: boolean): T;
|
|
1881
|
+
/** Saves value. */
|
|
978
1882
|
static set<T = any>(key: string, value: () => T, hydration?: boolean): T;
|
|
979
1883
|
static setErrorStatus(hide: boolean): void;
|
|
980
1884
|
static remove(key: string): void;
|
|
981
|
-
/**
|
|
1885
|
+
/** Returns hydration script string. */
|
|
982
1886
|
static toString(): string;
|
|
983
1887
|
}
|
|
984
1888
|
// File: classes/StorageCallback.d.ts
|
|
985
|
-
/**
|
|
1889
|
+
/**
|
|
1890
|
+
* Callback lists for storage.
|
|
1891
|
+
*/
|
|
986
1892
|
export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
|
|
1893
|
+
/** Returns instance by name. */
|
|
987
1894
|
static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
|
|
1895
|
+
/** Constructor */
|
|
988
1896
|
constructor(name: string, group?: string);
|
|
1897
|
+
/** Gets loading state. */
|
|
989
1898
|
isLoading(): boolean;
|
|
1899
|
+
/** Gets name. */
|
|
990
1900
|
getName(): string;
|
|
991
1901
|
getLoading(): boolean;
|
|
1902
|
+
/** Adds callback. */
|
|
992
1903
|
addCallback(callback: Callback, isOnce?: boolean): this;
|
|
1904
|
+
/** Removes callback. */
|
|
993
1905
|
removeCallback(callback: Callback): this;
|
|
1906
|
+
/** Prepares launch. */
|
|
994
1907
|
preparation(): this;
|
|
1908
|
+
/** Executes all callbacks. */
|
|
995
1909
|
run(value: T): Promise<this>;
|
|
996
1910
|
}
|
|
997
1911
|
// File: classes/Translate.d.ts
|
|
998
|
-
/**
|
|
1912
|
+
/**
|
|
1913
|
+
* Translation text retrieval.
|
|
1914
|
+
*/
|
|
999
1915
|
export declare class Translate {
|
|
1916
|
+
/** Gets text by code. */
|
|
1000
1917
|
static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
1918
|
+
/** Returns TranslateInstance. */
|
|
1001
1919
|
static getItem(): TranslateInstance;
|
|
1920
|
+
/** Sync gets text by code. */
|
|
1002
1921
|
static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
1922
|
+
/** Gets list of translations. */
|
|
1003
1923
|
static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
1924
|
+
/** Sync gets translations list. */
|
|
1004
1925
|
static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
1926
|
+
/** Adds translated texts. */
|
|
1005
1927
|
static add(names: string | string[]): Promise<void>;
|
|
1928
|
+
/** Sync adds texts. */
|
|
1006
1929
|
static addSync(data: Record<string, string>): void;
|
|
1930
|
+
/** Adds based on environment. */
|
|
1007
1931
|
static addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
1932
|
+
/** Adds sync by location. */
|
|
1008
1933
|
static addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
1934
|
+
/** Adds sync from file. */
|
|
1009
1935
|
static addSyncByFile(data: TranslateDataFile): void;
|
|
1936
|
+
/** Sets script URL. */
|
|
1010
1937
|
static setUrl(url: string): void;
|
|
1938
|
+
/** Sets property name. */
|
|
1011
1939
|
static setPropsName(name: string): void;
|
|
1940
|
+
/** Changes read mode. */
|
|
1012
1941
|
static setReadApi(value: boolean): void;
|
|
1942
|
+
/** Sets configuration. */
|
|
1013
1943
|
static setConfig(config: TranslateConfig): void;
|
|
1014
1944
|
}
|
|
1015
1945
|
// File: classes/TranslateFile.d.ts
|
|
1016
|
-
/**
|
|
1946
|
+
/**
|
|
1947
|
+
* Translation files manager.
|
|
1948
|
+
*/
|
|
1017
1949
|
export declare class TranslateFile {
|
|
1950
|
+
/** Constructor */
|
|
1018
1951
|
constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
|
|
1952
|
+
/** Checks for files. */
|
|
1019
1953
|
isFile(): boolean;
|
|
1954
|
+
/** Gets location. */
|
|
1020
1955
|
getLocation(): string;
|
|
1956
|
+
/** Gets language. */
|
|
1021
1957
|
getLanguage(): string;
|
|
1958
|
+
/** Returns translations list. */
|
|
1022
1959
|
getList(): Promise<TranslateDataFileList | undefined>;
|
|
1960
|
+
/** Adds files list. */
|
|
1023
1961
|
add(data: TranslateDataFile): void;
|
|
1024
1962
|
}
|
|
1025
1963
|
// File: classes/TranslateInstance.d.ts
|
|
1026
|
-
/**
|
|
1964
|
+
/**
|
|
1965
|
+
* Translation text retrieval instance.
|
|
1966
|
+
*/
|
|
1027
1967
|
export declare class TranslateInstance {
|
|
1968
|
+
/** Constructor */
|
|
1028
1969
|
constructor(url?: string, propsName?: string, files?: TranslateFile);
|
|
1970
|
+
/** Gets text by code. */
|
|
1029
1971
|
get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
1972
|
+
/** Sync gets text. */
|
|
1030
1973
|
getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
1974
|
+
/** Gets translations list. */
|
|
1031
1975
|
getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
1976
|
+
/** Sync gets list. */
|
|
1032
1977
|
getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
1978
|
+
/** Adds texts. */
|
|
1033
1979
|
add(names: string | string[]): Promise<void>;
|
|
1980
|
+
/** Sync adds texts. */
|
|
1034
1981
|
addSync(data: Record<string, string>): void;
|
|
1982
|
+
/** Environment-based add. */
|
|
1035
1983
|
addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
1984
|
+
/** Sync add by location. */
|
|
1036
1985
|
addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
1986
|
+
/** Sync add from file. */
|
|
1037
1987
|
addSyncByFile(data: TranslateDataFile): void;
|
|
1988
|
+
/** Sets script URL. */
|
|
1038
1989
|
setUrl(url: string): this;
|
|
1990
|
+
/** Sets property name. */
|
|
1039
1991
|
setPropsName(name: string): this;
|
|
1992
|
+
/** Sets read mode. */
|
|
1040
1993
|
setReadApi(value: boolean): this;
|
|
1041
1994
|
}
|
|
1042
1995
|
// File: functions/addTagHighlightMatch.d.ts
|
|
1996
|
+
/** Highlights match in string with tags. */
|
|
1043
1997
|
export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
|
|
1044
1998
|
// File: functions/anyToString.d.ts
|
|
1999
|
+
/** Converts any value to string. */
|
|
1045
2000
|
export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
|
|
1046
2001
|
// File: functions/applyTemplate.d.ts
|
|
2002
|
+
/** Replaces template keys [key] or {key} with values. */
|
|
1047
2003
|
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
|
|
1048
2004
|
// File: functions/arrFill.d.ts
|
|
2005
|
+
/** Creates array of length count filled with value. */
|
|
1049
2006
|
export declare function arrFill<T>(value: T, count: number): T[];
|
|
1050
2007
|
// File: functions/blobToBase64.d.ts
|
|
2008
|
+
/** Converts Blob to Base64. */
|
|
1051
2009
|
export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
|
|
1052
2010
|
// File: functions/capitalize.d.ts
|
|
2011
|
+
/** Capitalizes first letter. */
|
|
1053
2012
|
export declare function capitalize(value: string, isLocale?: boolean): string;
|
|
1054
2013
|
// File: functions/copyObject.d.ts
|
|
2014
|
+
/** Deep copy of object. */
|
|
1055
2015
|
export declare function copyObject<T>(value: T): T;
|
|
1056
2016
|
// File: functions/copyObjectLite.d.ts
|
|
2017
|
+
/** Shallow copy of simple object. */
|
|
1057
2018
|
export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
|
|
1058
2019
|
// File: functions/createElement.d.ts
|
|
1059
|
-
/**
|
|
2020
|
+
/**
|
|
2021
|
+
* Creates HTML element.
|
|
2022
|
+
* @remarks Client-side only. Returns undefined in SSR.
|
|
2023
|
+
*/
|
|
1060
2024
|
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;
|
|
1061
2025
|
// File: functions/domQuerySelector.d.ts
|
|
2026
|
+
/** Returns first matched element. */
|
|
1062
2027
|
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
|
|
1063
2028
|
// File: functions/domQuerySelectorAll.d.ts
|
|
2029
|
+
/** Returns all matched elements. */
|
|
1064
2030
|
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
|
|
1065
2031
|
// File: functions/encodeAttribute.d.ts
|
|
2032
|
+
/** Encodes for HTML attributes. */
|
|
1066
2033
|
export declare function encodeAttribute(text: string): string;
|
|
1067
2034
|
// File: functions/encodeLiteAttribute.d.ts
|
|
2035
|
+
/** Lightly encodes for HTML attributes. */
|
|
1068
2036
|
export declare function encodeLiteAttribute(text: string): string;
|
|
1069
2037
|
// File: functions/ensureMaxSize.d.ts
|
|
2038
|
+
/** Resizes image if it exceeds max size. */
|
|
1070
2039
|
export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
|
|
1071
2040
|
// File: functions/escapeExp.d.ts
|
|
2041
|
+
/** Escapes special regex characters. */
|
|
1072
2042
|
export declare function escapeExp(value: string): string;
|
|
1073
2043
|
// File: functions/eventStopPropagation.d.ts
|
|
2044
|
+
/** Stops event propagation. */
|
|
1074
2045
|
export declare function eventStopPropagation(event: Event): void;
|
|
1075
2046
|
// File: functions/executeFunction.d.ts
|
|
2047
|
+
/** Executes argument if function, else returns value. */
|
|
1076
2048
|
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
|
|
1077
2049
|
// File: functions/executePromise.d.ts
|
|
2050
|
+
/** Safely executes function/Promise and awaits result. */
|
|
1078
2051
|
export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
|
|
1079
2052
|
// File: functions/forEach.d.ts
|
|
2053
|
+
/** Iterates and returns array of results. */
|
|
1080
2054
|
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[];
|
|
1081
2055
|
// File: functions/frame.d.ts
|
|
2056
|
+
/** Loops requestAnimationFrame until next returns false. */
|
|
1082
2057
|
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
|
|
1083
2058
|
// File: functions/getArrayHighlightMatch.d.ts
|
|
2059
|
+
/** Splits string into segment array with match flags. */
|
|
1084
2060
|
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
|
|
1085
2061
|
// File: functions/getAttributes.d.ts
|
|
2062
|
+
/** Gets attributes record of element. */
|
|
1086
2063
|
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
|
|
1087
2064
|
// File: functions/getClipboardData.d.ts
|
|
2065
|
+
/** Retrieves clipboard string. */
|
|
1088
2066
|
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
|
|
1089
2067
|
// File: functions/getColumn.d.ts
|
|
2068
|
+
/** Returns array of specific column values. */
|
|
1090
2069
|
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
|
|
1091
2070
|
// File: functions/getCurrentDate.d.ts
|
|
1092
|
-
/**
|
|
2071
|
+
/**
|
|
2072
|
+
* Returns current date string.
|
|
2073
|
+
* @remarks Client-side only recommended for SSR safety.
|
|
2074
|
+
*/
|
|
1093
2075
|
export declare function getCurrentDate(format?: GeoDate): string;
|
|
1094
2076
|
// File: functions/getCurrentTime.d.ts
|
|
1095
|
-
/**
|
|
2077
|
+
/**
|
|
2078
|
+
* Returns current timestamp ms.
|
|
2079
|
+
* @note Warning: Causes SSR hydration mismatch if used in rendering.
|
|
2080
|
+
*/
|
|
1096
2081
|
export declare function getCurrentTime(): number;
|
|
1097
2082
|
// File: functions/getElement.d.ts
|
|
2083
|
+
/** Returns first matched Element. */
|
|
1098
2084
|
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
|
|
1099
2085
|
// File: functions/getElementId.d.ts
|
|
2086
|
+
/** Gets or creates element ID. */
|
|
1100
2087
|
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
|
|
1101
|
-
/**
|
|
2088
|
+
/**
|
|
2089
|
+
* Initializes getElementId.
|
|
2090
|
+
* @warning Mandatory for SSR.
|
|
2091
|
+
*/
|
|
1102
2092
|
export declare function initGetElementId(newListener: () => string | number): void;
|
|
1103
2093
|
// File: functions/getElementImage.d.ts
|
|
2094
|
+
/** Gets Image element from source. */
|
|
1104
2095
|
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
|
|
1105
2096
|
// File: functions/getElementItem.d.ts
|
|
2097
|
+
/** Returns element property value. */
|
|
1106
2098
|
export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
|
|
1107
2099
|
// File: functions/getElementOrWindow.d.ts
|
|
2100
|
+
/** Returns Window or Element. */
|
|
1108
2101
|
export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
|
|
1109
2102
|
// File: functions/getElementSafeScript.d.ts
|
|
2103
|
+
/** Generates script tag for hydration. */
|
|
1110
2104
|
export declare function getElementSafeScript(id: string, data: any): string;
|
|
1111
2105
|
// File: functions/getExactSearchExp.d.ts
|
|
2106
|
+
/** Regex for exact case-insensitive phrase match. */
|
|
1112
2107
|
export declare function getExactSearchExp(search: string): RegExp;
|
|
1113
2108
|
// File: functions/getExp.d.ts
|
|
2109
|
+
/** Creates RegExp from template. */
|
|
1114
2110
|
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
|
|
1115
2111
|
// File: functions/getHydrationData.d.ts
|
|
2112
|
+
/** Parses JSON from script tag. */
|
|
1116
2113
|
export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
|
|
1117
2114
|
// File: functions/getItemByPath.d.ts
|
|
2115
|
+
/** Returns data by path string. */
|
|
1118
2116
|
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
|
|
1119
2117
|
// File: functions/getKey.d.ts
|
|
2118
|
+
/** Returns pressed key. */
|
|
1120
2119
|
export declare function getKey(event: KeyboardEvent): string;
|
|
1121
2120
|
// File: functions/getLengthOfAllArray.d.ts
|
|
2121
|
+
/** Returns lengths of all elements. */
|
|
1122
2122
|
export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
|
|
1123
2123
|
// File: functions/getMaxLengthAllArray.d.ts
|
|
2124
|
+
/** Returns length of longest string. */
|
|
2125
|
+
export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
|
|
1124
2126
|
export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1125
2127
|
// File: functions/getMinLengthAllArray.d.ts
|
|
2128
|
+
/** Returns length of shortest string. */
|
|
1126
2129
|
export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1127
2130
|
// File: functions/getMouseClient.d.ts
|
|
2131
|
+
/** Returns mouse/click coordinates. */
|
|
1128
2132
|
export declare function getMouseClient(event: MouseEvent & TouchEvent): ImageCoordinator;
|
|
1129
2133
|
// File: functions/getMouseClientX.d.ts
|
|
2134
|
+
/** Returns X coordinate. */
|
|
1130
2135
|
export declare function getMouseClientX(event: MouseEvent & TouchEvent): number;
|
|
1131
2136
|
// File: functions/getMouseClientY.d.ts
|
|
2137
|
+
/** Returns Y coordinate. */
|
|
1132
2138
|
export declare function getMouseClientY(event: MouseEvent & TouchEvent): number;
|
|
1133
2139
|
// File: functions/getObjectByKeys.d.ts
|
|
2140
|
+
/** New object with specified keys. */
|
|
1134
2141
|
export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
|
|
1135
2142
|
// File: functions/getObjectNoUndefined.d.ts
|
|
2143
|
+
/** Removes properties matching exception type. */
|
|
1136
2144
|
export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
|
|
1137
2145
|
// File: functions/getObjectOrNone.d.ts
|
|
2146
|
+
/** Returns object or empty object. */
|
|
1138
2147
|
export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
|
|
1139
2148
|
// File: functions/getOnlyText.d.ts
|
|
2149
|
+
/** Keeps letters, numbers, spaces. */
|
|
1140
2150
|
export declare function getOnlyText(text: any): string;
|
|
1141
2151
|
// File: functions/getRandomText.d.ts
|
|
2152
|
+
/** Generates random text. */
|
|
1142
2153
|
export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
|
|
1143
2154
|
// File: functions/getRequestString.d.ts
|
|
2155
|
+
/** Formats request as key-value string. */
|
|
1144
2156
|
export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
|
|
1145
2157
|
// File: functions/getSearchExp.d.ts
|
|
2158
|
+
/** RegExp for "contains all words" search. */
|
|
1146
2159
|
export declare function getSearchExp(search: string, limit?: number): RegExp;
|
|
1147
2160
|
// File: functions/getSeparatingSearchExp.d.ts
|
|
2161
|
+
/** RegExp for search by space-separated words. */
|
|
1148
2162
|
export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
|
|
1149
2163
|
// File: functions/getStepPercent.d.ts
|
|
2164
|
+
/** Step unit in percent. */
|
|
1150
2165
|
export declare function getStepPercent(min: number | undefined, max: number): number;
|
|
1151
2166
|
// File: functions/getStepValue.d.ts
|
|
2167
|
+
/** Step unit value. */
|
|
1152
2168
|
export declare function getStepValue(min: number | undefined, max: number): number;
|
|
1153
2169
|
// File: functions/goScroll.d.ts
|
|
2170
|
+
/** Quick scroll to element. */
|
|
1154
2171
|
export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
|
|
1155
2172
|
// File: functions/goScrollSmooth.d.ts
|
|
2173
|
+
/** Smooth scroll to element. */
|
|
1156
2174
|
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
1157
2175
|
// File: functions/goScrollTo.d.ts
|
|
2176
|
+
/** Scrolls container to target. */
|
|
1158
2177
|
export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
|
|
1159
2178
|
// File: functions/handleShare.d.ts
|
|
2179
|
+
/** Web Share API wrapper. */
|
|
1160
2180
|
export declare function handleShare(data: ShareData): Promise<boolean>;
|
|
1161
2181
|
// File: functions/inArray.d.ts
|
|
2182
|
+
/** Checks value in array. */
|
|
1162
2183
|
export declare function inArray<T>(array: T[], value: T): boolean;
|
|
1163
2184
|
// File: functions/initScrollbarOffset.d.ts
|
|
2185
|
+
/** Init scroll control data. */
|
|
1164
2186
|
export declare function initScrollbarOffset(): Promise<void>;
|
|
1165
2187
|
// File: functions/intersectKey.d.ts
|
|
2188
|
+
/** Intersection of arrays using keys. */
|
|
1166
2189
|
export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
|
|
1167
2190
|
// File: functions/isApiSuccess.d.ts
|
|
2191
|
+
/** Checks API success flag. */
|
|
1168
2192
|
export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
|
|
1169
2193
|
// File: functions/isArray.d.ts
|
|
2194
|
+
/** Checks if array. */
|
|
1170
2195
|
export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
|
|
1171
2196
|
// File: functions/isDifferent.d.ts
|
|
2197
|
+
/** Checks object value difference. */
|
|
1172
2198
|
export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
|
|
1173
2199
|
// File: functions/isDomData.d.ts
|
|
2200
|
+
/** Checks for data URL environment. */
|
|
1174
2201
|
export declare function isDomData(): boolean;
|
|
1175
2202
|
// File: functions/isDomRuntime.d.ts
|
|
2203
|
+
/** Checks if window available. */
|
|
1176
2204
|
export declare function isDomRuntime(): boolean;
|
|
1177
2205
|
// File: functions/isElementVisible.d.ts
|
|
2206
|
+
/** Checks CSS visibility and DOM presence. */
|
|
1178
2207
|
export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
|
|
1179
2208
|
// File: functions/isEnter.d.ts
|
|
2209
|
+
/** Checks Enter/Space key. */
|
|
1180
2210
|
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
|
|
1181
2211
|
// File: functions/isFilled.d.ts
|
|
2212
|
+
/** Checks if field filled. */
|
|
1182
2213
|
export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
|
|
1183
2214
|
// File: functions/isFloat.d.ts
|
|
2215
|
+
/** Checks if numeric/float. */
|
|
1184
2216
|
export declare function isFloat(value: any): boolean;
|
|
1185
2217
|
// File: functions/isFunction.d.ts
|
|
2218
|
+
/** Checks if function. */
|
|
1186
2219
|
export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
|
|
1187
2220
|
// File: functions/isInDom.d.ts
|
|
2221
|
+
/** Checks DOM presence. */
|
|
1188
2222
|
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
|
|
1189
2223
|
// File: functions/isInput.d.ts
|
|
2224
|
+
/** Checks if input/editable. */
|
|
1190
2225
|
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
|
|
1191
2226
|
// File: functions/isIntegerBetween.d.ts
|
|
2227
|
+
/** Checks if between integers. */
|
|
1192
2228
|
export declare function isIntegerBetween(value: number, between: number): boolean;
|
|
1193
2229
|
// File: functions/isNull.d.ts
|
|
2230
|
+
/** Checks null/undefined. */
|
|
1194
2231
|
export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
|
|
1195
2232
|
// File: functions/isNumber.d.ts
|
|
2233
|
+
/** Checks if number. */
|
|
1196
2234
|
export declare function isNumber(value: any): boolean;
|
|
1197
2235
|
// File: functions/isObject.d.ts
|
|
2236
|
+
/** Checks if object. */
|
|
1198
2237
|
export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
|
|
1199
2238
|
// File: functions/isObjectNotArray.d.ts
|
|
2239
|
+
/** Checks if object and not array. */
|
|
1200
2240
|
export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
|
|
1201
2241
|
// File: functions/isOnLine.d.ts
|
|
2242
|
+
/** Checks online status. */
|
|
1202
2243
|
export declare function isOnLine(): boolean;
|
|
1203
2244
|
// File: functions/isSelected.d.ts
|
|
2245
|
+
/** Checks value in selected array/string. */
|
|
1204
2246
|
export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
|
|
1205
2247
|
// File: functions/isSelectedByList.d.ts
|
|
2248
|
+
/** Checks selection for entire list. */
|
|
1206
2249
|
export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
|
|
1207
2250
|
// File: functions/isShare.d.ts
|
|
2251
|
+
/** Checks Web Share API support. */
|
|
1208
2252
|
export declare function isShare(): boolean;
|
|
1209
2253
|
// File: functions/isString.d.ts
|
|
2254
|
+
/** Checks if string. */
|
|
1210
2255
|
export declare function isString<T>(value: T): value is Extract<T, string>;
|
|
1211
2256
|
// File: functions/isWindow.d.ts
|
|
2257
|
+
/** Checks if Window. */
|
|
1212
2258
|
export declare function isWindow<E>(element: E): element is Extract<E, Window>;
|
|
1213
2259
|
// File: functions/random.d.ts
|
|
2260
|
+
/** Random integer generator. */
|
|
1214
2261
|
export declare function random(min: number, max: number): number;
|
|
1215
2262
|
// File: functions/removeCommonPrefix.d.ts
|
|
2263
|
+
/** Removes prefix from string. */
|
|
1216
2264
|
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
1217
2265
|
// File: functions/replaceComponentName.d.ts
|
|
2266
|
+
/** Replaces component name in text. */
|
|
1218
2267
|
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
1219
2268
|
// File: functions/replaceRecursive.d.ts
|
|
2269
|
+
/** Recursive merge of arrays/objects. */
|
|
1220
2270
|
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
|
|
1221
2271
|
// File: functions/replaceTemplate.d.ts
|
|
2272
|
+
/** Data-based template replacement. */
|
|
1222
2273
|
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
|
|
1223
2274
|
// File: functions/resizeImageByMax.d.ts
|
|
1224
|
-
|
|
2275
|
+
type ResizeImageByMaxType = 'auto' | 'width' | 'height';
|
|
2276
|
+
/** Resizes image within max constraint. */
|
|
2277
|
+
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
|
|
1225
2278
|
// File: functions/secondToTime.d.ts
|
|
2279
|
+
/** Seconds to time string. */
|
|
1226
2280
|
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
|
|
1227
2281
|
// File: functions/setElementItem.d.ts
|
|
2282
|
+
/** Modifies element property. */
|
|
1228
2283
|
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;
|
|
1229
2284
|
// File: functions/setValues.d.ts
|
|
2285
|
+
/** Modifies data by type and settings (multiple, maxlength). */
|
|
1230
2286
|
export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
|
|
1231
2287
|
multiple?: boolean | undefined;
|
|
1232
2288
|
maxlength?: number | undefined;
|
|
@@ -1234,41 +2290,61 @@ export declare function setValues<T>(selected: T | T[] | undefined, value: any,
|
|
|
1234
2290
|
notEmpty?: boolean | undefined;
|
|
1235
2291
|
}): T | T[] | undefined;
|
|
1236
2292
|
// File: functions/sleep.d.ts
|
|
2293
|
+
/** ms delay promise. */
|
|
1237
2294
|
export declare function sleep(ms: number): Promise<void>;
|
|
1238
2295
|
// File: functions/splice.d.ts
|
|
2296
|
+
/** enumerable property copy into target object. */
|
|
1239
2297
|
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
|
|
1240
2298
|
// File: functions/strFill.d.ts
|
|
2299
|
+
/** String of length count filled with value. */
|
|
1241
2300
|
export declare function strFill(value: string, count: number): string;
|
|
1242
2301
|
// File: functions/strSplit.d.ts
|
|
2302
|
+
/** Splitting with limit. Last element contains remainder. */
|
|
1243
2303
|
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
1244
2304
|
// File: functions/toArray.d.ts
|
|
2305
|
+
/** Wraps in array if not array. */
|
|
1245
2306
|
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
1246
2307
|
// File: functions/toCamelCase.d.ts
|
|
2308
|
+
/** Camel case (upper). */
|
|
1247
2309
|
export declare function toCamelCase(value: string): string;
|
|
1248
2310
|
// File: functions/toCamelCaseFirst.d.ts
|
|
2311
|
+
/** Camel case with first letter upper. */
|
|
1249
2312
|
export declare function toCamelCaseFirst(value: string): string;
|
|
1250
2313
|
// File: functions/toDate.d.ts
|
|
2314
|
+
/** Date object conversion. */
|
|
1251
2315
|
export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
|
|
1252
2316
|
// File: functions/toKebabCase.d.ts
|
|
2317
|
+
/** Kebab-case conversion. */
|
|
1253
2318
|
export declare function toKebabCase(value: string): string;
|
|
1254
2319
|
// File: functions/toNumber.d.ts
|
|
1255
|
-
/**
|
|
2320
|
+
/**
|
|
2321
|
+
* String/number to float. Handles separators.
|
|
2322
|
+
* @example toNumber("1 234,56") // 1234.56
|
|
2323
|
+
*/
|
|
1256
2324
|
export declare function toNumber(value?: NumberOrString): number;
|
|
1257
2325
|
// File: functions/toNumberByMax.d.ts
|
|
2326
|
+
/** Number conversion with max limit and formatting. */
|
|
1258
2327
|
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
1259
2328
|
// File: functions/toPercent.d.ts
|
|
2329
|
+
/** Percentage conversion. */
|
|
1260
2330
|
export declare function toPercent(maxValue: number, value: number): number;
|
|
1261
2331
|
// File: functions/toPercentBy100.d.ts
|
|
2332
|
+
/** Percentage * 100 conversion. */
|
|
1262
2333
|
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
1263
2334
|
// File: functions/toString.d.ts
|
|
2335
|
+
/** String conversion. Empty if null/undefined. */
|
|
1264
2336
|
export declare function toString<T>(value: T): string;
|
|
1265
2337
|
// File: functions/transformation.d.ts
|
|
2338
|
+
/** Transforms string to inferred type (null, boolean, object, function). */
|
|
1266
2339
|
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
1267
2340
|
// File: functions/uint8ArrayToBase64.d.ts
|
|
2341
|
+
/** Uint8Array to base64 string. */
|
|
1268
2342
|
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
|
1269
2343
|
// File: functions/uniqueArray.d.ts
|
|
2344
|
+
/** Removes duplicates. */
|
|
1270
2345
|
export declare function uniqueArray<T>(value: T[]): T[];
|
|
1271
2346
|
// File: functions/writeClipboardData.d.ts
|
|
2347
|
+
/** Writes string to buffer. */
|
|
1272
2348
|
export declare function writeClipboardData(text: string): Promise<void>;
|
|
1273
2349
|
// File: types/apiTypes.d.ts
|
|
1274
2350
|
export declare enum ApiMethodItem {
|
|
@@ -1594,7 +2670,7 @@ export declare enum MetaOpenGraphTag {
|
|
|
1594
2670
|
musicAlbumDisc = "music:album:disc",
|
|
1595
2671
|
musicAlbumTrack = "music:album:track",
|
|
1596
2672
|
musicMusician = "music:musician",
|
|
1597
|
-
musicSong = "music
|
|
2673
|
+
musicSong = "music:song",
|
|
1598
2674
|
musicSongDisc = "music:song:disc",
|
|
1599
2675
|
musicSongTrack = "music:song:track",
|
|
1600
2676
|
musicReleaseDate = "music:release_date",
|
|
@@ -1764,4 +2840,6 @@ export type TranslateDataFileList = Record<string, string>;
|
|
|
1764
2840
|
export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
|
|
1765
2841
|
export type TranslateDataFile = Record<string, TranslateDataFileItem>;
|
|
1766
2842
|
export declare const TRANSLATE_GLOBAL_PREFIX = "global";
|
|
1767
|
-
export declare const TRANSLATE_TIME_OUT = 160;
|
|
2843
|
+
export declare const TRANSLATE_TIME_OUT = 160;
|
|
2844
|
+
// File: media/errorCauseList.d.ts
|
|
2845
|
+
export declare const errorCauseList: ErrorCenterCauseList;
|