@dxtmisha/functional-basic 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/ai-description.txt +11 -20
- package/ai-types.txt +552 -86
- package/dist/library.js +436 -381
- package/dist/src/classes/UrlItem.d.ts +71 -0
- package/dist/src/library.d.ts +1 -0
- package/package.json +1 -1
package/ai-types.txt
CHANGED
|
@@ -64,7 +64,7 @@ import { ApiStatus } from './ApiStatus';
|
|
|
64
64
|
import { ApiErrorItem } from './ApiErrorItem';
|
|
65
65
|
import { ApiData, ApiFetch, ApiPreparationEnd } from '../types/apiTypes';
|
|
66
66
|
/**
|
|
67
|
-
* Class for processing API
|
|
67
|
+
* Class for handling and processing data returned from an API request.
|
|
68
68
|
*/
|
|
69
69
|
export declare class ApiDataReturn<T = any> {
|
|
70
70
|
constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd, error?: ApiErrorItem | undefined);
|
|
@@ -76,7 +76,7 @@ export declare class ApiDataReturn<T = any> {
|
|
|
76
76
|
// File: src/classes/ApiDefault.d.ts
|
|
77
77
|
import { ApiDefaultValue, ApiFetch } from '../types/apiTypes';
|
|
78
78
|
/**
|
|
79
|
-
* Class for default API request data.
|
|
79
|
+
* Class for working with default API request data.
|
|
80
80
|
*/
|
|
81
81
|
export declare class ApiDefault {
|
|
82
82
|
is(): boolean;
|
|
@@ -89,7 +89,7 @@ import { ApiErrorItem } from './ApiErrorItem';
|
|
|
89
89
|
import { ApiErrorStorage } from './ApiErrorStorage';
|
|
90
90
|
import { ApiErrorStorageItem, ApiMethodItem } from '../types/apiTypes';
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* Utility class for managing the API error storage and creating error items.
|
|
93
93
|
*/
|
|
94
94
|
export declare class ApiError {
|
|
95
95
|
static getStorage(): ApiErrorStorage;
|
|
@@ -99,7 +99,7 @@ export declare class ApiError {
|
|
|
99
99
|
// File: src/classes/ApiErrorItem.d.ts
|
|
100
100
|
import { ApiErrorStorageItem, ApiMethodItem } from '../types/apiTypes';
|
|
101
101
|
/**
|
|
102
|
-
* Class for API error response
|
|
102
|
+
* Class for managing and extracting data from an API error response.
|
|
103
103
|
*/
|
|
104
104
|
export declare class ApiErrorItem {
|
|
105
105
|
constructor(method: ApiMethodItem, response: Response, error: ApiErrorStorageItem);
|
|
@@ -113,7 +113,7 @@ export declare class ApiErrorItem {
|
|
|
113
113
|
// File: src/classes/ApiErrorStorage.d.ts
|
|
114
114
|
import { ApiErrorStorageList, ApiErrorStorageItem, ApiMethodItem } from '../types/apiTypes';
|
|
115
115
|
/**
|
|
116
|
-
* Manager for API error states.
|
|
116
|
+
* Manager for handling and identifying API error states.
|
|
117
117
|
*/
|
|
118
118
|
export declare class ApiErrorStorage {
|
|
119
119
|
find(method: ApiMethodItem, response: Response): Promise<ApiErrorStorageItem>;
|
|
@@ -133,7 +133,7 @@ export declare class ApiHeaders {
|
|
|
133
133
|
import { ApiResponse } from './ApiResponse';
|
|
134
134
|
import { ApiFetch, ApiHydrationList } from '../types/apiTypes';
|
|
135
135
|
/**
|
|
136
|
-
* Class for collecting API data for SSR
|
|
136
|
+
* Class for collecting API data for hydration on the client side during SSR.
|
|
137
137
|
*/
|
|
138
138
|
export declare class ApiHydration {
|
|
139
139
|
initResponse(response: ApiResponse): void;
|
|
@@ -162,7 +162,7 @@ export type ApiInstanceOptions = {
|
|
|
162
162
|
hydrationClass?: typeof ApiHydration;
|
|
163
163
|
};
|
|
164
164
|
/**
|
|
165
|
-
* Core class for HTTP requests
|
|
165
|
+
* Core class for managing HTTP requests using the Fetch API.
|
|
166
166
|
*/
|
|
167
167
|
export declare class ApiInstance {
|
|
168
168
|
constructor(url?: string, options?: ApiInstanceOptions);
|
|
@@ -204,7 +204,7 @@ export declare class ApiPreparation {
|
|
|
204
204
|
import { ApiDefault } from './ApiDefault';
|
|
205
205
|
import { ApiFetch, ApiMethod, ApiResponseItem } from '../types/apiTypes';
|
|
206
206
|
/**
|
|
207
|
-
* Class for API
|
|
207
|
+
* Class for working with API responses.
|
|
208
208
|
*/
|
|
209
209
|
export declare class ApiResponse {
|
|
210
210
|
constructor(requestDefault: ApiDefault);
|
|
@@ -218,7 +218,7 @@ export declare class ApiResponse {
|
|
|
218
218
|
// File: src/classes/ApiStatus.d.ts
|
|
219
219
|
import { ApiStatusItem, ApiStatusType } from '../types/apiTypes';
|
|
220
220
|
/**
|
|
221
|
-
* Class for API request status
|
|
221
|
+
* Class for managing API request status.
|
|
222
222
|
*/
|
|
223
223
|
export declare class ApiStatus {
|
|
224
224
|
get(): ApiStatusItem | undefined;
|
|
@@ -240,7 +240,7 @@ export declare class ApiStatus {
|
|
|
240
240
|
// File: src/classes/BroadcastMessage.d.ts
|
|
241
241
|
import { ErrorCenterInstance } from './ErrorCenterInstance';
|
|
242
242
|
/**
|
|
243
|
-
* Class for BroadcastChannel
|
|
243
|
+
* Class for working with BroadcastChannel messages.
|
|
244
244
|
*/
|
|
245
245
|
export declare class BroadcastMessage<Message = any> {
|
|
246
246
|
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
|
|
@@ -252,7 +252,8 @@ export declare class BroadcastMessage<Message = any> {
|
|
|
252
252
|
}
|
|
253
253
|
// File: src/classes/Cache.d.ts
|
|
254
254
|
/**
|
|
255
|
-
*
|
|
255
|
+
* Simple in-memory cache class that stores computed values by key.
|
|
256
|
+
* @deprecated This class is obsolete and should not be used
|
|
256
257
|
*/
|
|
257
258
|
export declare class Cache {
|
|
258
259
|
get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
@@ -260,7 +261,8 @@ export declare class Cache {
|
|
|
260
261
|
}
|
|
261
262
|
// File: src/classes/CacheItem.d.ts
|
|
262
263
|
/**
|
|
263
|
-
*
|
|
264
|
+
* Class for managing a single cached value with dependency tracking.
|
|
265
|
+
* @deprecated This class is obsolete and should not be used
|
|
264
266
|
*/
|
|
265
267
|
export declare class CacheItem<T> {
|
|
266
268
|
constructor(callback: () => T);
|
|
@@ -271,7 +273,8 @@ export declare class CacheItem<T> {
|
|
|
271
273
|
// File: src/classes/CacheStatic.d.ts
|
|
272
274
|
import { Cache } from './Cache';
|
|
273
275
|
/**
|
|
274
|
-
*
|
|
276
|
+
* Static cache class that uses ServerStorage for persistent caching across the application.
|
|
277
|
+
* @deprecated This class is obsolete and should not be used
|
|
275
278
|
*/
|
|
276
279
|
export declare class CacheStatic {
|
|
277
280
|
static get<T>(name: string, callback: () => T, comparison?: any[]): T;
|
|
@@ -280,7 +283,7 @@ export declare class CacheStatic {
|
|
|
280
283
|
// File: src/classes/Cookie.d.ts
|
|
281
284
|
import { CookieOptions } from './CookieStorage';
|
|
282
285
|
/**
|
|
283
|
-
* Class for
|
|
286
|
+
* Class for working with cookies.
|
|
284
287
|
*/
|
|
285
288
|
export declare class Cookie<T> {
|
|
286
289
|
static getInstance<T>(name: string): Cookie<T>;
|
|
@@ -292,7 +295,7 @@ export declare class Cookie<T> {
|
|
|
292
295
|
// File: src/classes/CookieBlock.d.ts
|
|
293
296
|
import { CookieBlockInstance } from './CookieBlockInstance';
|
|
294
297
|
/**
|
|
295
|
-
* Class for cookie access status.
|
|
298
|
+
* Class for changing cookie access status.
|
|
296
299
|
*/
|
|
297
300
|
export declare class CookieBlock {
|
|
298
301
|
static getItem(): CookieBlockInstance;
|
|
@@ -300,6 +303,9 @@ export declare class CookieBlock {
|
|
|
300
303
|
static set(value: boolean): void;
|
|
301
304
|
}
|
|
302
305
|
// File: src/classes/CookieBlockInstance.d.ts
|
|
306
|
+
/**
|
|
307
|
+
* Class for changing cookie access status.
|
|
308
|
+
*/
|
|
303
309
|
export declare class CookieBlockInstance {
|
|
304
310
|
get(): boolean;
|
|
305
311
|
set(value: boolean): void;
|
|
@@ -317,7 +323,7 @@ export type CookieOptions = {
|
|
|
317
323
|
arguments?: string[] | Record<string, string | number | boolean>;
|
|
318
324
|
};
|
|
319
325
|
/**
|
|
320
|
-
* Class for
|
|
326
|
+
* Class for managing cookie storage with support for custom listeners.
|
|
321
327
|
*/
|
|
322
328
|
export declare class CookieStorage {
|
|
323
329
|
static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
|
|
@@ -330,7 +336,7 @@ export declare class CookieStorage {
|
|
|
330
336
|
// File: src/classes/DataStorage.d.ts
|
|
331
337
|
import { ErrorCenterInstance } from './ErrorCenterInstance';
|
|
332
338
|
/**
|
|
333
|
-
*
|
|
339
|
+
* Class for working with localStorage and sessionStorage.
|
|
334
340
|
*/
|
|
335
341
|
export declare class DataStorage<T> {
|
|
336
342
|
static setPrefix(newPrefix: string): void;
|
|
@@ -345,7 +351,7 @@ import { GeoIntl } from './GeoIntl';
|
|
|
345
351
|
import { NumberOrStringOrDate } from '../types/basicTypes';
|
|
346
352
|
import { GeoDate, GeoFirstDay, GeoHours, GeoTimeZoneStyle } from '../types/geoTypes';
|
|
347
353
|
/**
|
|
348
|
-
*
|
|
354
|
+
* A class for working with dates.
|
|
349
355
|
*/
|
|
350
356
|
export declare class Datetime {
|
|
351
357
|
constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
|
|
@@ -424,7 +430,7 @@ export declare class Datetime {
|
|
|
424
430
|
import { ErrorCenterInstance } from './ErrorCenterInstance';
|
|
425
431
|
import { ErrorCenterCauseItem, ErrorCenterCauseList, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerList } from '../types/errorCenter';
|
|
426
432
|
/**
|
|
427
|
-
*
|
|
433
|
+
* Class for managing error storage and handling.
|
|
428
434
|
*/
|
|
429
435
|
export declare class ErrorCenter {
|
|
430
436
|
static getItem(): ErrorCenterInstance;
|
|
@@ -439,7 +445,7 @@ export declare class ErrorCenter {
|
|
|
439
445
|
// File: src/classes/ErrorCenterHandler.d.ts
|
|
440
446
|
import { ErrorCenterCauseItem, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerItem, ErrorCenterHandlerList } from '../types/errorCenter';
|
|
441
447
|
/**
|
|
442
|
-
*
|
|
448
|
+
* Class for managing and triggering error handlers.
|
|
443
449
|
*/
|
|
444
450
|
export declare class ErrorCenterHandler {
|
|
445
451
|
constructor(handlers?: ErrorCenterHandlerList);
|
|
@@ -453,7 +459,7 @@ export declare class ErrorCenterHandler {
|
|
|
453
459
|
import { ErrorCenterHandler } from './ErrorCenterHandler';
|
|
454
460
|
import { ErrorCenterCauseItem, ErrorCenterCauseList, ErrorCenterGroup, ErrorCenterHandlerCallback, ErrorCenterHandlerList } from '../types/errorCenter';
|
|
455
461
|
/**
|
|
456
|
-
*
|
|
462
|
+
* Class for managing error storage and handling within an instance.
|
|
457
463
|
*/
|
|
458
464
|
export declare class ErrorCenterInstance {
|
|
459
465
|
constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
|
|
@@ -466,9 +472,9 @@ export declare class ErrorCenterInstance {
|
|
|
466
472
|
on(cause: ErrorCenterCauseItem): this;
|
|
467
473
|
}
|
|
468
474
|
// File: src/classes/EventItem.d.ts
|
|
469
|
-
import { ElementOrString, ElementOrWindow,
|
|
475
|
+
import { ElementOrString, ElementOrWindow, EventActivityItem, EventListenerDetail, EventOptions } from '../types/basicTypes';
|
|
470
476
|
/**
|
|
471
|
-
* Advanced
|
|
477
|
+
* Advanced wrapper for managing event listeners on DOM elements or the `window` object.
|
|
472
478
|
*/
|
|
473
479
|
export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
|
|
474
480
|
constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
|
|
@@ -487,16 +493,18 @@ export declare class EventItem<E extends ElementOrWindow, O extends Event, D ext
|
|
|
487
493
|
reset(): this;
|
|
488
494
|
}
|
|
489
495
|
// File: src/classes/Formatters.d.ts
|
|
490
|
-
import { FormattersType, FormattersOptionsList,
|
|
496
|
+
import { FormattersType, FormattersList, FormattersOptionsList, FormattersOptionsInformation, FormattersOptionsCurrency, FormattersOptionsDate, FormattersOptionsName, FormattersOptionsNumber, FormattersOptionsPlural, FormattersOptionsUnit, FormattersReturn, FormattersListProp, FormattersItemProp } from '../types/formattersTypes';
|
|
491
497
|
/**
|
|
492
|
-
*
|
|
498
|
+
* Class for formatting a list of data based on provided options.
|
|
493
499
|
*/
|
|
494
500
|
export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
|
|
495
501
|
constructor(options: Options, list?: List | undefined);
|
|
496
502
|
is(): boolean;
|
|
497
|
-
isArray():
|
|
503
|
+
isArray(): this is this & {
|
|
504
|
+
list: FormattersList<Item>;
|
|
505
|
+
};
|
|
498
506
|
length(): number;
|
|
499
|
-
getList():
|
|
507
|
+
getList(): FormattersList<Item>;
|
|
500
508
|
getOptions(): Options;
|
|
501
509
|
setList(list?: List): this;
|
|
502
510
|
to(): FormattersReturn<List, Options>;
|
|
@@ -505,7 +513,7 @@ export declare class Formatters<Options extends FormattersOptionsList = Formatte
|
|
|
505
513
|
import { GeoInstance } from './GeoInstance';
|
|
506
514
|
import { GeoItem, GeoItemFull } from '../types/geoTypes';
|
|
507
515
|
/**
|
|
508
|
-
* Static
|
|
516
|
+
* Static class for working with geographical data.
|
|
509
517
|
*/
|
|
510
518
|
export declare class Geo {
|
|
511
519
|
static getObject(): GeoInstance;
|
|
@@ -530,10 +538,11 @@ export declare class Geo {
|
|
|
530
538
|
static setValueDefault(code?: string): void;
|
|
531
539
|
}
|
|
532
540
|
// File: src/classes/GeoFlag.d.ts
|
|
533
|
-
import {
|
|
541
|
+
import { GeoIntl } from './GeoIntl';
|
|
542
|
+
import { GeoFlagItem, GeoFlagNational, GeoItemFull } from '../types/geoTypes';
|
|
534
543
|
export declare const GEO_FLAG_ICON_NAME = "f";
|
|
535
544
|
/**
|
|
536
|
-
*
|
|
545
|
+
* Class for working with flags and geographic information.
|
|
537
546
|
*/
|
|
538
547
|
export declare class GeoFlag {
|
|
539
548
|
static flags: Record<string, string>;
|
|
@@ -549,7 +558,7 @@ export declare class GeoFlag {
|
|
|
549
558
|
import { GeoItem, GeoItemFull } from '../types/geoTypes';
|
|
550
559
|
export declare const UI_GEO_COOKIE_KEY = "ui-geo-code";
|
|
551
560
|
/**
|
|
552
|
-
*
|
|
561
|
+
* Base class for working with geographic data.
|
|
553
562
|
*/
|
|
554
563
|
export declare class GeoInstance {
|
|
555
564
|
constructor();
|
|
@@ -578,7 +587,8 @@ import { ErrorCenterInstance } from './ErrorCenterInstance';
|
|
|
578
587
|
import { NumberOrStringOrDate, NumberOrString, ItemValue } from '../types/basicTypes';
|
|
579
588
|
import { GeoDate } from '../types/geoTypes';
|
|
580
589
|
/**
|
|
581
|
-
*
|
|
590
|
+
* The Intl namespace object contains several constructors as well as functionality common
|
|
591
|
+
* to the internationalization constructors and other language sensitive functions.
|
|
582
592
|
*/
|
|
583
593
|
export declare class GeoIntl {
|
|
584
594
|
static isItem(code?: string): boolean;
|
|
@@ -614,7 +624,7 @@ export declare class GeoIntl {
|
|
|
614
624
|
// File: src/classes/GeoPhone.d.ts
|
|
615
625
|
import { GeoPhoneValue, GeoPhoneMap, GeoPhoneMapInfo } from '../types/geoTypes';
|
|
616
626
|
/**
|
|
617
|
-
*
|
|
627
|
+
* A class for storing and processing phone number masks.
|
|
618
628
|
*/
|
|
619
629
|
export declare class GeoPhone {
|
|
620
630
|
static get(code: string): GeoPhoneValue | undefined;
|
|
@@ -627,7 +637,7 @@ export declare class GeoPhone {
|
|
|
627
637
|
}
|
|
628
638
|
// File: src/classes/Global.d.ts
|
|
629
639
|
/**
|
|
630
|
-
*
|
|
640
|
+
* Static utility class for storing and retrieving application-wide global data.
|
|
631
641
|
*/
|
|
632
642
|
export declare class Global {
|
|
633
643
|
static getItem(): Record<string, any>;
|
|
@@ -637,7 +647,7 @@ export declare class Global {
|
|
|
637
647
|
// File: src/classes/Hash.d.ts
|
|
638
648
|
import { HashInstance } from './HashInstance';
|
|
639
649
|
/**
|
|
640
|
-
* URL
|
|
650
|
+
* Static class for working with data stored in the URL hash.
|
|
641
651
|
*/
|
|
642
652
|
export declare class Hash {
|
|
643
653
|
static getItem(): HashInstance;
|
|
@@ -648,6 +658,9 @@ export declare class Hash {
|
|
|
648
658
|
static reload(): void;
|
|
649
659
|
}
|
|
650
660
|
// File: src/classes/HashInstance.d.ts
|
|
661
|
+
/**
|
|
662
|
+
* Class for working with data stored in the URL hash.
|
|
663
|
+
*/
|
|
651
664
|
export declare class HashInstance {
|
|
652
665
|
get<T>(name: string, defaultValue?: T | (() => T)): T;
|
|
653
666
|
set<T>(name: string, callback: T | (() => T)): this;
|
|
@@ -662,7 +675,7 @@ export type IconsConfig = {
|
|
|
662
675
|
list?: Record<string, IconsItem>;
|
|
663
676
|
};
|
|
664
677
|
/**
|
|
665
|
-
*
|
|
678
|
+
* Class for managing icons.
|
|
666
679
|
*/
|
|
667
680
|
export declare class Icons {
|
|
668
681
|
static is(index: string): boolean;
|
|
@@ -678,10 +691,10 @@ export declare class Icons {
|
|
|
678
691
|
static setConfig(config: IconsConfig): void;
|
|
679
692
|
}
|
|
680
693
|
// File: src/classes/Loading.d.ts
|
|
681
|
-
import { LoadingInstance } from './LoadingInstance';
|
|
694
|
+
import { LoadingInstance, LoadingDetail } from './LoadingInstance';
|
|
682
695
|
import { ElementOrString, EventListenerDetail } from '../types/basicTypes';
|
|
683
696
|
/**
|
|
684
|
-
*
|
|
697
|
+
* Class for working with global loading.
|
|
685
698
|
*/
|
|
686
699
|
export declare class Loading {
|
|
687
700
|
static is(): boolean;
|
|
@@ -689,12 +702,23 @@ export declare class Loading {
|
|
|
689
702
|
static getItem(): LoadingInstance;
|
|
690
703
|
static show(): void;
|
|
691
704
|
static hide(): void;
|
|
692
|
-
static registrationEvent(listener: EventListenerDetail<CustomEvent,
|
|
693
|
-
static unregistrationEvent(listener: EventListenerDetail<CustomEvent,
|
|
705
|
+
static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
706
|
+
static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
|
|
694
707
|
}
|
|
695
708
|
// File: src/classes/LoadingInstance.d.ts
|
|
709
|
+
import { EventItem } from './EventItem';
|
|
696
710
|
import { ElementOrString, EventListenerDetail } from '../types/basicTypes';
|
|
697
|
-
export type LoadingDetail = {
|
|
711
|
+
export type LoadingDetail = {
|
|
712
|
+
loading: boolean;
|
|
713
|
+
};
|
|
714
|
+
export type LoadingRegistrationItem = {
|
|
715
|
+
item: EventItem<Window, CustomEvent, LoadingDetail>;
|
|
716
|
+
listener: EventListenerDetail<CustomEvent, LoadingDetail>;
|
|
717
|
+
element?: ElementOrString<HTMLElement>;
|
|
718
|
+
};
|
|
719
|
+
/**
|
|
720
|
+
* Class for working with global loading.
|
|
721
|
+
*/
|
|
698
722
|
export declare class LoadingInstance {
|
|
699
723
|
constructor(eventName?: string);
|
|
700
724
|
is(): boolean;
|
|
@@ -710,7 +734,7 @@ import { MetaOg } from './MetaOg';
|
|
|
710
734
|
import { MetaTwitter } from './MetaTwitter';
|
|
711
735
|
import { MetaRobots, MetaTag } from '../types/metaTypes';
|
|
712
736
|
/**
|
|
713
|
-
* Unified meta
|
|
737
|
+
* Unified class for managing all types of meta tags.
|
|
714
738
|
*/
|
|
715
739
|
export declare class Meta extends MetaManager<MetaTag[]> {
|
|
716
740
|
constructor();
|
|
@@ -739,20 +763,27 @@ export declare class Meta extends MetaManager<MetaTag[]> {
|
|
|
739
763
|
htmlTitle(): string;
|
|
740
764
|
}
|
|
741
765
|
// File: src/classes/MetaManager.d.ts
|
|
742
|
-
|
|
766
|
+
type MetaList<T extends readonly string[]> = {
|
|
767
|
+
[K in T[number]]?: string;
|
|
768
|
+
};
|
|
769
|
+
/**
|
|
770
|
+
* Class for working with meta tags.
|
|
771
|
+
*/
|
|
772
|
+
export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
|
|
743
773
|
constructor(listMeta: T, isProperty?: boolean);
|
|
744
774
|
getListMeta(): T;
|
|
745
775
|
get(name: Key): string;
|
|
746
|
-
getItems():
|
|
776
|
+
getItems(): MetaList<T>;
|
|
747
777
|
html(): string;
|
|
748
778
|
set(name: Key, content: string): this;
|
|
749
|
-
setByList(metaList:
|
|
779
|
+
setByList(metaList: MetaList<T>): this;
|
|
750
780
|
}
|
|
781
|
+
export {};
|
|
751
782
|
// File: src/classes/MetaOg.d.ts
|
|
752
783
|
import { MetaManager } from './MetaManager';
|
|
753
784
|
import { MetaOpenGraphTag, MetaOpenGraphType } from '../types/metaTypes';
|
|
754
785
|
/**
|
|
755
|
-
* Open Graph meta
|
|
786
|
+
* Class for working with Open Graph meta tags.
|
|
756
787
|
*/
|
|
757
788
|
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
758
789
|
constructor();
|
|
@@ -776,6 +807,9 @@ import { Meta } from './Meta';
|
|
|
776
807
|
import { MetaOg } from './MetaOg';
|
|
777
808
|
import { MetaTwitter } from './MetaTwitter';
|
|
778
809
|
import { MetaRobots } from '../types/metaTypes';
|
|
810
|
+
/**
|
|
811
|
+
* Static class for managing meta tags.
|
|
812
|
+
*/
|
|
779
813
|
export declare class MetaStatic {
|
|
780
814
|
static getItem(): Meta;
|
|
781
815
|
static getOg(): MetaOg;
|
|
@@ -806,7 +840,7 @@ export declare class MetaStatic {
|
|
|
806
840
|
import { MetaManager } from './MetaManager';
|
|
807
841
|
import { MetaTwitterCard, MetaTwitterTag } from '../types/metaTypes';
|
|
808
842
|
/**
|
|
809
|
-
* Twitter Card
|
|
843
|
+
* Class for working with Twitter Card meta tags.
|
|
810
844
|
*/
|
|
811
845
|
export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
812
846
|
constructor();
|
|
@@ -828,7 +862,7 @@ export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
|
828
862
|
// File: src/classes/ResumableTimer.d.ts
|
|
829
863
|
import { FunctionVoid } from '../types/basicTypes';
|
|
830
864
|
/**
|
|
831
|
-
*
|
|
865
|
+
* Class for creating a timer that can be paused and resumed.
|
|
832
866
|
*/
|
|
833
867
|
export declare class ResumableTimer {
|
|
834
868
|
constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
|
|
@@ -839,6 +873,9 @@ export declare class ResumableTimer {
|
|
|
839
873
|
}
|
|
840
874
|
// File: src/classes/ScrollbarWidth.d.ts
|
|
841
875
|
import { DataStorage } from './DataStorage';
|
|
876
|
+
/**
|
|
877
|
+
* Class for getting the scroll width.
|
|
878
|
+
*/
|
|
842
879
|
export declare class ScrollbarWidth {
|
|
843
880
|
static is(): Promise<boolean>;
|
|
844
881
|
static get(): Promise<number>;
|
|
@@ -852,7 +889,7 @@ import { SearchListMatcher } from './SearchListMatcher';
|
|
|
852
889
|
import { SearchListOptions } from './SearchListOptions';
|
|
853
890
|
import { SearchColumns, SearchFormatList, SearchItem, SearchListValue, SearchOptions } from '../types/searchTypes';
|
|
854
891
|
/**
|
|
855
|
-
*
|
|
892
|
+
* Main class for managing a searchable list.
|
|
856
893
|
*/
|
|
857
894
|
export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
|
|
858
895
|
constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
|
|
@@ -871,24 +908,35 @@ export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>
|
|
|
871
908
|
// File: src/classes/SearchListData.d.ts
|
|
872
909
|
import { SearchListItem } from './SearchListItem';
|
|
873
910
|
import { SearchListOptions } from './SearchListOptions';
|
|
874
|
-
import { SearchColumns, SearchFormatItem, SearchFormatList, SearchItem, SearchListValue } from '../types/searchTypes';
|
|
911
|
+
import { SearchCache, SearchColumns, SearchFormatItem, SearchFormatList, SearchItem, SearchListValue } from '../types/searchTypes';
|
|
912
|
+
/**
|
|
913
|
+
* Class for managing and formatting the search data list and its cache.
|
|
914
|
+
*/
|
|
875
915
|
export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
|
|
876
916
|
constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
|
|
877
|
-
is():
|
|
878
|
-
|
|
917
|
+
is(): this is this & {
|
|
918
|
+
list: T[];
|
|
919
|
+
columns: string[];
|
|
920
|
+
};
|
|
921
|
+
isList(): this is this & {
|
|
922
|
+
list: T[];
|
|
923
|
+
};
|
|
879
924
|
getList(): SearchListValue<T>;
|
|
880
925
|
getColumns(): K | undefined;
|
|
881
926
|
setList(list: SearchListValue<T>): this;
|
|
882
927
|
setColumns(columns?: SearchColumns<T>): this;
|
|
883
|
-
findCacheItem(item: T): any | undefined;
|
|
884
|
-
forEach(callback: (item: any, value: any) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
|
|
885
928
|
toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
|
|
886
929
|
}
|
|
887
930
|
// File: src/classes/SearchListItem.d.ts
|
|
888
931
|
import { SearchListOptions } from './SearchListOptions';
|
|
932
|
+
/**
|
|
933
|
+
* Class representing a single search item's value and its search-related state.
|
|
934
|
+
*/
|
|
889
935
|
export declare class SearchListItem {
|
|
890
936
|
constructor(value: string | undefined, options: SearchListOptions);
|
|
891
|
-
is():
|
|
937
|
+
is(): this is this & {
|
|
938
|
+
value: string;
|
|
939
|
+
};
|
|
892
940
|
isSearch(): boolean;
|
|
893
941
|
get(): string;
|
|
894
942
|
set(value?: string): this;
|
|
@@ -896,15 +944,22 @@ export declare class SearchListItem {
|
|
|
896
944
|
// File: src/classes/SearchListMatcher.d.ts
|
|
897
945
|
import { SearchListItem } from './SearchListItem';
|
|
898
946
|
import { SearchListOptions } from './SearchListOptions';
|
|
947
|
+
import { SearchCacheItem } from '../types/searchTypes';
|
|
948
|
+
/**
|
|
949
|
+
* Class responsible for matching search values against the search list data.
|
|
950
|
+
*/
|
|
899
951
|
export declare class SearchListMatcher {
|
|
900
952
|
constructor(item: SearchListItem, options: SearchListOptions);
|
|
901
953
|
is(): boolean;
|
|
902
|
-
isSelection(value: any): boolean;
|
|
954
|
+
isSelection(value: SearchCacheItem<any>['value']): boolean;
|
|
903
955
|
get(): RegExp | undefined;
|
|
904
956
|
update(): void;
|
|
905
957
|
}
|
|
906
958
|
// File: src/classes/SearchListOptions.d.ts
|
|
907
959
|
import { SearchOptions } from '../types/searchTypes';
|
|
960
|
+
/**
|
|
961
|
+
* Class for managing search list options.
|
|
962
|
+
*/
|
|
908
963
|
export declare class SearchListOptions {
|
|
909
964
|
constructor(options?: SearchOptions | undefined);
|
|
910
965
|
getOptions(): SearchOptions;
|
|
@@ -917,7 +972,7 @@ export declare class SearchListOptions {
|
|
|
917
972
|
}
|
|
918
973
|
// File: src/classes/ServerStorage.d.ts
|
|
919
974
|
/**
|
|
920
|
-
*
|
|
975
|
+
* Class for managing data storage during server-side rendering (SSR).
|
|
921
976
|
*/
|
|
922
977
|
export declare class ServerStorage {
|
|
923
978
|
static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
|
|
@@ -929,9 +984,10 @@ export declare class ServerStorage {
|
|
|
929
984
|
static remove(key: string): void;
|
|
930
985
|
static toString(): string;
|
|
931
986
|
}
|
|
987
|
+
export {};
|
|
932
988
|
// File: src/classes/StorageCallback.d.ts
|
|
933
989
|
/**
|
|
934
|
-
*
|
|
990
|
+
* A class for working with callback lists for storage.
|
|
935
991
|
*/
|
|
936
992
|
export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
|
|
937
993
|
static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
|
|
@@ -948,7 +1004,7 @@ export declare class StorageCallback<T = any, Callback = (value: T) => void | Pr
|
|
|
948
1004
|
import { TranslateInstance } from './TranslateInstance';
|
|
949
1005
|
import { TranslateCode, TranslateConfig, TranslateDataFile, TranslateList } from '../types/translateTypes';
|
|
950
1006
|
/**
|
|
951
|
-
*
|
|
1007
|
+
* Class for getting the translated text.
|
|
952
1008
|
*/
|
|
953
1009
|
export declare class Translate {
|
|
954
1010
|
static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
@@ -969,7 +1025,7 @@ export declare class Translate {
|
|
|
969
1025
|
// File: src/classes/TranslateFile.d.ts
|
|
970
1026
|
import { TranslateDataFile, TranslateDataFileList } from '../types/translateTypes';
|
|
971
1027
|
/**
|
|
972
|
-
*
|
|
1028
|
+
* Class for working with translation files.
|
|
973
1029
|
*/
|
|
974
1030
|
export declare class TranslateFile {
|
|
975
1031
|
constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
|
|
@@ -982,6 +1038,9 @@ export declare class TranslateFile {
|
|
|
982
1038
|
// File: src/classes/TranslateInstance.d.ts
|
|
983
1039
|
import { TranslateFile } from './TranslateFile';
|
|
984
1040
|
import { TranslateCode, TranslateDataFile, TranslateList } from '../types/translateTypes';
|
|
1041
|
+
/**
|
|
1042
|
+
* Class for getting the translated text.
|
|
1043
|
+
*/
|
|
985
1044
|
export declare class TranslateInstance {
|
|
986
1045
|
constructor(url?: string, propsName?: string, files?: TranslateFile);
|
|
987
1046
|
get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
@@ -997,253 +1056,623 @@ export declare class TranslateInstance {
|
|
|
997
1056
|
setPropsName(name: string): this;
|
|
998
1057
|
setReadApi(value: boolean): this;
|
|
999
1058
|
}
|
|
1059
|
+
// File: src/classes/UrlItem.d.ts
|
|
1060
|
+
/**
|
|
1061
|
+
* Isomorphic utility class for working with URLs.
|
|
1062
|
+
*/
|
|
1063
|
+
export declare class UrlItem {
|
|
1064
|
+
constructor(url: string | URL);
|
|
1065
|
+
get href(): string;
|
|
1066
|
+
get protocol(): string;
|
|
1067
|
+
get username(): string;
|
|
1068
|
+
get password(): string;
|
|
1069
|
+
get host(): string;
|
|
1070
|
+
get hostname(): string;
|
|
1071
|
+
get port(): string;
|
|
1072
|
+
get pathname(): string;
|
|
1073
|
+
get search(): string;
|
|
1074
|
+
get searchParams(): URLSearchParams;
|
|
1075
|
+
get hash(): string;
|
|
1076
|
+
get origin(): string;
|
|
1077
|
+
set(url: string | URL): this;
|
|
1078
|
+
toString(): string;
|
|
1079
|
+
toJSON(): string;
|
|
1080
|
+
}
|
|
1000
1081
|
// File: src/functions/addTagHighlightMatch.d.ts
|
|
1082
|
+
/**
|
|
1083
|
+
* Adds a tag to highlight the match in the string.
|
|
1084
|
+
*/
|
|
1001
1085
|
export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
|
|
1002
1086
|
// File: src/functions/anyToString.d.ts
|
|
1087
|
+
/**
|
|
1088
|
+
* Conversion of a value to a string.
|
|
1089
|
+
*/
|
|
1003
1090
|
export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
|
|
1004
1091
|
// File: src/functions/applyTemplate.d.ts
|
|
1092
|
+
/**
|
|
1093
|
+
* Applies a template to the text, replacing keys with values from the replacement object.
|
|
1094
|
+
*/
|
|
1005
1095
|
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
|
|
1006
1096
|
// File: src/functions/arrFill.d.ts
|
|
1097
|
+
/**
|
|
1098
|
+
* The method creates an array of "count" elements with values equal to `value`.
|
|
1099
|
+
*/
|
|
1007
1100
|
export declare function arrFill<T>(value: T, count: number): T[];
|
|
1008
1101
|
// File: src/functions/blobToBase64.d.ts
|
|
1102
|
+
/**
|
|
1103
|
+
* Convert a Blob to a Base64 string.
|
|
1104
|
+
*/
|
|
1009
1105
|
export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
|
|
1010
1106
|
// File: src/functions/capitalize.d.ts
|
|
1107
|
+
/**
|
|
1108
|
+
* Capitalizes the first letter of a string.
|
|
1109
|
+
*/
|
|
1011
1110
|
export declare function capitalize(value: string, isLocale?: boolean): string;
|
|
1012
1111
|
// File: src/functions/copyObject.d.ts
|
|
1112
|
+
/**
|
|
1113
|
+
* Creates a deep copy of an object for independent data management.
|
|
1114
|
+
*/
|
|
1013
1115
|
export declare function copyObject<T>(value: T): T;
|
|
1014
1116
|
// File: src/functions/copyObjectLite.d.ts
|
|
1117
|
+
/**
|
|
1118
|
+
* Copies a simple object.
|
|
1119
|
+
*/
|
|
1015
1120
|
export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
|
|
1016
1121
|
// File: src/functions/createElement.d.ts
|
|
1122
|
+
/**
|
|
1123
|
+
* In HTML documents, creates an element with the tag that is specified in the argument.
|
|
1124
|
+
*/
|
|
1017
1125
|
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;
|
|
1018
1126
|
// File: src/functions/domQuerySelector.d.ts
|
|
1127
|
+
/**
|
|
1128
|
+
* Selects the first element that matches the specified selectors.
|
|
1129
|
+
*/
|
|
1019
1130
|
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
|
|
1020
1131
|
// File: src/functions/domQuerySelectorAll.d.ts
|
|
1132
|
+
/**
|
|
1133
|
+
* Selects all elements that match the specified selectors.
|
|
1134
|
+
*/
|
|
1021
1135
|
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
|
|
1022
1136
|
// File: src/functions/encodeAttribute.d.ts
|
|
1137
|
+
/**
|
|
1138
|
+
* Encodes special characters in a string for safe use in HTML attributes.
|
|
1139
|
+
*/
|
|
1023
1140
|
export declare function encodeAttribute(text: string): string;
|
|
1024
1141
|
// File: src/functions/encodeLiteAttribute.d.ts
|
|
1142
|
+
/**
|
|
1143
|
+
* Encodes special characters in a string for safe use in HTML attributes.
|
|
1144
|
+
*/
|
|
1025
1145
|
export declare function encodeLiteAttribute(text: string): string;
|
|
1026
1146
|
// File: src/functions/ensureMaxSize.d.ts
|
|
1147
|
+
/**
|
|
1148
|
+
* Ensures that an image does not exceed the maximum size by resizing it if needed.
|
|
1149
|
+
*/
|
|
1027
1150
|
export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
|
|
1028
1151
|
// File: src/functions/escapeExp.d.ts
|
|
1152
|
+
/**
|
|
1153
|
+
* Escapes special regex characters in a string.
|
|
1154
|
+
*/
|
|
1029
1155
|
export declare function escapeExp(value: string): string;
|
|
1030
1156
|
// File: src/functions/eventStopPropagation.d.ts
|
|
1157
|
+
/**
|
|
1158
|
+
* Stop listening to events in depth.
|
|
1159
|
+
*/
|
|
1031
1160
|
export declare function eventStopPropagation(event: Event): void;
|
|
1032
1161
|
// File: src/functions/executeFunction.d.ts
|
|
1033
1162
|
import { FunctionArgs } from '../types/basicTypes';
|
|
1163
|
+
/**
|
|
1164
|
+
* Flexible utility that executes the provided argument if it is a function, otherwise returns it as is.
|
|
1165
|
+
*/
|
|
1034
1166
|
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
|
|
1035
1167
|
// File: src/functions/executePromise.d.ts
|
|
1168
|
+
/**
|
|
1169
|
+
* Safely executes a function and awaits its result if it returns a Promise.
|
|
1170
|
+
*/
|
|
1036
1171
|
export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
|
|
1037
1172
|
// File: src/functions/forEach.d.ts
|
|
1038
|
-
|
|
1173
|
+
/**
|
|
1174
|
+
* Iterates over the object/array and applies a callback to each element.
|
|
1175
|
+
*/
|
|
1176
|
+
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[];
|
|
1039
1177
|
// File: src/functions/frame.d.ts
|
|
1178
|
+
/**
|
|
1179
|
+
* Cyclically calls requestAnimationFrame.
|
|
1180
|
+
*/
|
|
1040
1181
|
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
|
|
1041
1182
|
// File: src/functions/getArrayHighlightMatch.d.ts
|
|
1042
1183
|
import { HighlightMatchItem } from '../types/searchTypes';
|
|
1184
|
+
/**
|
|
1185
|
+
* Split a string into an array of objects to highlight matches.
|
|
1186
|
+
*/
|
|
1043
1187
|
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
|
|
1044
1188
|
// File: src/functions/getAttributes.d.ts
|
|
1045
1189
|
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
1190
|
+
/**
|
|
1191
|
+
* Gets a list of attributes of an element.
|
|
1192
|
+
*/
|
|
1046
1193
|
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
|
|
1047
1194
|
// File: src/functions/getClipboardData.d.ts
|
|
1195
|
+
/**
|
|
1196
|
+
* The method retrieves drag data (as a string) for the specified type.
|
|
1197
|
+
*/
|
|
1048
1198
|
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
|
|
1049
1199
|
// File: src/functions/getColumn.d.ts
|
|
1050
1200
|
import { ObjectOrArray } from '../types/basicTypes';
|
|
1201
|
+
/**
|
|
1202
|
+
* Returns an array of values for a specific column in the input array.
|
|
1203
|
+
*/
|
|
1051
1204
|
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
|
|
1052
1205
|
// File: src/functions/getCurrentDate.d.ts
|
|
1053
1206
|
import { GeoDate } from '../types/geoTypes';
|
|
1207
|
+
/**
|
|
1208
|
+
* Returns the current date in the specified format.
|
|
1209
|
+
*/
|
|
1054
1210
|
export declare function getCurrentDate(format?: GeoDate): string;
|
|
1055
1211
|
// File: src/functions/getCurrentTime.d.ts
|
|
1212
|
+
/**
|
|
1213
|
+
* Returns the current time in milliseconds.
|
|
1214
|
+
*/
|
|
1056
1215
|
export declare function getCurrentTime(): number;
|
|
1057
1216
|
// File: src/functions/getElement.d.ts
|
|
1058
1217
|
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
1218
|
+
/**
|
|
1219
|
+
* Returns the first Element in the document that matches the specified selector.
|
|
1220
|
+
*/
|
|
1059
1221
|
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
|
|
1060
1222
|
// File: src/functions/getElementId.d.ts
|
|
1061
1223
|
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
1224
|
+
/**
|
|
1225
|
+
* Returns the identifier (ID) of the element or creates it.
|
|
1226
|
+
*/
|
|
1062
1227
|
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
|
|
1063
1228
|
export declare function initGetElementId(newListener: () => string | number): void;
|
|
1064
1229
|
// File: src/functions/getElementImage.d.ts
|
|
1230
|
+
/**
|
|
1231
|
+
* Get image element from HTMLImageElement or string source.
|
|
1232
|
+
*/
|
|
1065
1233
|
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
|
|
1066
1234
|
// File: src/functions/getElementItem.d.ts
|
|
1067
1235
|
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
1236
|
+
/**
|
|
1237
|
+
* Returns the value of an element by its key.
|
|
1238
|
+
*/
|
|
1068
1239
|
export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
|
|
1069
1240
|
// File: src/functions/getElementOrWindow.d.ts
|
|
1070
1241
|
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
1242
|
+
/**
|
|
1243
|
+
* Returns window or element.
|
|
1244
|
+
*/
|
|
1071
1245
|
export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
|
|
1072
1246
|
// File: src/functions/getElementSafeScript.d.ts
|
|
1247
|
+
/**
|
|
1248
|
+
* Generates a safe script tag for data hydration.
|
|
1249
|
+
*/
|
|
1073
1250
|
export declare function getElementSafeScript(id: string, data: any): string;
|
|
1074
1251
|
// File: src/functions/getExactSearchExp.d.ts
|
|
1252
|
+
/**
|
|
1253
|
+
* Creates a case-insensitive regular expression for an exact match of a phrase.
|
|
1254
|
+
*/
|
|
1075
1255
|
export declare function getExactSearchExp(search: string): RegExp;
|
|
1076
1256
|
// File: src/functions/getExp.d.ts
|
|
1257
|
+
/**
|
|
1258
|
+
* Creates a regular expression object.
|
|
1259
|
+
*/
|
|
1077
1260
|
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
|
|
1078
1261
|
// File: src/functions/getFirst.d.ts
|
|
1262
|
+
/**
|
|
1263
|
+
* Returns the first element of an array or object.
|
|
1264
|
+
*/
|
|
1079
1265
|
export declare function getFirst<T>(value: T | T[] | Record<string, T>): T | undefined;
|
|
1080
1266
|
// File: src/functions/getHydrationData.d.ts
|
|
1267
|
+
/**
|
|
1268
|
+
* Retrieves and parses JSON data from a script tag in the DOM.
|
|
1269
|
+
*/
|
|
1081
1270
|
export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
|
|
1082
1271
|
// File: src/functions/getItemByPath.d.ts
|
|
1272
|
+
/**
|
|
1273
|
+
* Returns data by their path.
|
|
1274
|
+
*/
|
|
1083
1275
|
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
|
|
1084
1276
|
// File: src/functions/getKey.d.ts
|
|
1277
|
+
/**
|
|
1278
|
+
* Returns the pressed key.
|
|
1279
|
+
*/
|
|
1085
1280
|
export declare function getKey(event: KeyboardEvent): string | number | undefined;
|
|
1086
1281
|
// File: src/functions/getLength.d.ts
|
|
1282
|
+
/**
|
|
1283
|
+
* Returns the length or size of various data types.
|
|
1284
|
+
*/
|
|
1087
1285
|
export declare function getLength(value: any): number;
|
|
1088
1286
|
// File: src/functions/getLengthOfAllArray.d.ts
|
|
1089
1287
|
import { ObjectOrArray } from '../types/basicTypes';
|
|
1288
|
+
/**
|
|
1289
|
+
* Returns the length of all elements in an array.
|
|
1290
|
+
*/
|
|
1090
1291
|
export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
|
|
1091
1292
|
// File: src/functions/getMaxLengthAllArray.d.ts
|
|
1092
1293
|
import { ObjectOrArray } from '../types/basicTypes';
|
|
1294
|
+
/**
|
|
1295
|
+
* Searches for the longest string in the array.
|
|
1296
|
+
*/
|
|
1093
1297
|
export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1094
1298
|
// File: src/functions/getMinLengthAllArray.d.ts
|
|
1095
1299
|
import { ObjectOrArray } from '../types/basicTypes';
|
|
1300
|
+
/**
|
|
1301
|
+
* Searches for the shortest string in the array.
|
|
1302
|
+
*/
|
|
1096
1303
|
export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
|
|
1097
1304
|
// File: src/functions/getMouseClient.d.ts
|
|
1098
1305
|
import { ImageCoordinator } from '../types/basicTypes';
|
|
1306
|
+
/**
|
|
1307
|
+
* Returns the position of the mouse cursor or the location of the click.
|
|
1308
|
+
*/
|
|
1099
1309
|
export declare function getMouseClient(event: MouseEvent & TouchEvent): ImageCoordinator;
|
|
1100
1310
|
// File: src/functions/getMouseClientX.d.ts
|
|
1311
|
+
/**
|
|
1312
|
+
* Returns the X position of the mouse cursor.
|
|
1313
|
+
*/
|
|
1101
1314
|
export declare function getMouseClientX(event: MouseEvent & TouchEvent): number;
|
|
1102
1315
|
// File: src/functions/getMouseClientY.d.ts
|
|
1316
|
+
/**
|
|
1317
|
+
* Returns the Y position of the mouse cursor.
|
|
1318
|
+
*/
|
|
1103
1319
|
export declare function getMouseClientY(event: MouseEvent & TouchEvent): number;
|
|
1104
1320
|
// File: src/functions/getObjectByKeys.d.ts
|
|
1321
|
+
/**
|
|
1322
|
+
* Returns a new object with keys from the keys list.
|
|
1323
|
+
*/
|
|
1105
1324
|
export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
|
|
1106
1325
|
// File: src/functions/getObjectNoUndefined.d.ts
|
|
1326
|
+
/**
|
|
1327
|
+
* Removes from the object all properties belonging to the exception type.
|
|
1328
|
+
*/
|
|
1107
1329
|
export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
|
|
1108
1330
|
// File: src/functions/getObjectOrNone.d.ts
|
|
1331
|
+
/**
|
|
1332
|
+
* Returns the object if the object’s values are set.
|
|
1333
|
+
*/
|
|
1109
1334
|
export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
|
|
1110
1335
|
// File: src/functions/getOnlyText.d.ts
|
|
1336
|
+
/**
|
|
1337
|
+
* Returns only letters, numbers, and spaces from a string.
|
|
1338
|
+
*/
|
|
1111
1339
|
export declare function getOnlyText(text: any): string;
|
|
1112
1340
|
// File: src/functions/getRandomText.d.ts
|
|
1341
|
+
/**
|
|
1342
|
+
* Generates text.
|
|
1343
|
+
*/
|
|
1113
1344
|
export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
|
|
1114
1345
|
// File: src/functions/getRequestString.d.ts
|
|
1346
|
+
/**
|
|
1347
|
+
* Returns a string in the form of key-value.
|
|
1348
|
+
*/
|
|
1115
1349
|
export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
|
|
1116
1350
|
// File: src/functions/getSearchExp.d.ts
|
|
1351
|
+
/**
|
|
1352
|
+
* Builds a global RegExp for multi-word search.
|
|
1353
|
+
*/
|
|
1117
1354
|
export declare function getSearchExp(search: string, limit?: number): RegExp;
|
|
1118
1355
|
// File: src/functions/getSeparatingSearchExp.d.ts
|
|
1356
|
+
/**
|
|
1357
|
+
* Creates a case-insensitive regular expression for a search by words.
|
|
1358
|
+
*/
|
|
1119
1359
|
export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
|
|
1120
1360
|
// File: src/functions/getStepPercent.d.ts
|
|
1361
|
+
/**
|
|
1362
|
+
* Returns the unit of measurement for 1 step as a percentage.
|
|
1363
|
+
*/
|
|
1121
1364
|
export declare function getStepPercent(min: number | undefined, max: number): number;
|
|
1122
1365
|
// File: src/functions/getStepValue.d.ts
|
|
1366
|
+
/**
|
|
1367
|
+
* Returns the unit of measurement for a single step.
|
|
1368
|
+
*/
|
|
1123
1369
|
export declare function getStepValue(min: number | undefined, max: number): number;
|
|
1124
1370
|
// File: src/functions/goScroll.d.ts
|
|
1371
|
+
/**
|
|
1372
|
+
* Quickly scrolls the container to the specified element.
|
|
1373
|
+
*/
|
|
1125
1374
|
export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
|
|
1126
1375
|
// File: src/functions/goScrollSmooth.d.ts
|
|
1376
|
+
/**
|
|
1377
|
+
* Smoothly scrolls to the element.
|
|
1378
|
+
*/
|
|
1127
1379
|
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
1128
1380
|
// File: src/functions/goScrollTo.d.ts
|
|
1381
|
+
/**
|
|
1382
|
+
* Scrolls the container to make the target element visible.
|
|
1383
|
+
*/
|
|
1129
1384
|
export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
|
|
1130
1385
|
// File: src/functions/handleShare.d.ts
|
|
1386
|
+
/**
|
|
1387
|
+
* Invokes the native sharing mechanism.
|
|
1388
|
+
*/
|
|
1131
1389
|
export declare function handleShare(data: ShareData): Promise<boolean>;
|
|
1132
1390
|
// File: src/functions/inArray.d.ts
|
|
1391
|
+
/**
|
|
1392
|
+
* Checks if the value is in the current array.
|
|
1393
|
+
*/
|
|
1133
1394
|
export declare function inArray<T>(array: T[], value: T): boolean;
|
|
1134
1395
|
// File: src/functions/initScrollbarOffset.d.ts
|
|
1396
|
+
/**
|
|
1397
|
+
* Initialization of data for scroll control.
|
|
1398
|
+
*/
|
|
1135
1399
|
export declare function initScrollbarOffset(): Promise<void>;
|
|
1136
1400
|
// File: src/functions/intersectKey.d.ts
|
|
1137
|
-
|
|
1401
|
+
/**
|
|
1402
|
+
* Computes the intersection of objects using keys.
|
|
1403
|
+
*/
|
|
1404
|
+
export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
|
|
1138
1405
|
// File: src/functions/isApiSuccess.d.ts
|
|
1139
1406
|
import { ApiData } from '../types/apiTypes';
|
|
1407
|
+
/**
|
|
1408
|
+
* Checks if the API response is successful.
|
|
1409
|
+
*/
|
|
1140
1410
|
export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
|
|
1141
1411
|
// File: src/functions/isArray.d.ts
|
|
1412
|
+
/**
|
|
1413
|
+
* Checks if the values are arrays.
|
|
1414
|
+
*/
|
|
1142
1415
|
export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
|
|
1143
1416
|
// File: src/functions/isDifferent.d.ts
|
|
1144
1417
|
import { ObjectItem } from '../types/basicTypes';
|
|
1418
|
+
/**
|
|
1419
|
+
* Checks if the values of two objects are different.
|
|
1420
|
+
*/
|
|
1145
1421
|
export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
|
|
1146
1422
|
// File: src/functions/isDomData.d.ts
|
|
1423
|
+
/**
|
|
1424
|
+
* Checks if the current environment is a data URL.
|
|
1425
|
+
*/
|
|
1147
1426
|
export declare function isDomData(): boolean;
|
|
1148
1427
|
// File: src/functions/isDomRuntime.d.ts
|
|
1428
|
+
/**
|
|
1429
|
+
* Checks if running in a browser.
|
|
1430
|
+
*/
|
|
1149
1431
|
export declare function isDomRuntime(): boolean;
|
|
1150
1432
|
// File: src/functions/isElementVisible.d.ts
|
|
1151
1433
|
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
1434
|
+
/**
|
|
1435
|
+
* Checks if an element is visible in the DOM.
|
|
1436
|
+
*/
|
|
1152
1437
|
export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
|
|
1153
1438
|
// File: src/functions/isEnter.d.ts
|
|
1439
|
+
/**
|
|
1440
|
+
* Checks if the pressed key is Enter or Space.
|
|
1441
|
+
*/
|
|
1154
1442
|
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
|
|
1155
1443
|
// File: src/functions/isFilled.d.ts
|
|
1156
|
-
|
|
1444
|
+
import { EmptyValue } from '../types/basicTypes';
|
|
1445
|
+
/**
|
|
1446
|
+
* Checks if the field is filled.
|
|
1447
|
+
*/
|
|
1448
|
+
export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
|
|
1157
1449
|
// File: src/functions/isFloat.d.ts
|
|
1450
|
+
/**
|
|
1451
|
+
* Checks if the value is a number (integer or float).
|
|
1452
|
+
*/
|
|
1158
1453
|
export declare function isFloat(value: any): boolean;
|
|
1159
1454
|
// File: src/functions/isFunction.d.ts
|
|
1160
|
-
|
|
1455
|
+
import { FunctionArgs } from '../types/basicTypes';
|
|
1456
|
+
/**
|
|
1457
|
+
* Checks if the value is a function.
|
|
1458
|
+
*/
|
|
1459
|
+
export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
|
|
1161
1460
|
// File: src/functions/isInDom.d.ts
|
|
1162
1461
|
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
1462
|
+
/**
|
|
1463
|
+
* Checks if an element is still in the DOM tree.
|
|
1464
|
+
*/
|
|
1163
1465
|
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
|
|
1164
1466
|
// File: src/functions/isInput.d.ts
|
|
1467
|
+
/**
|
|
1468
|
+
* Checks if the element is an input field or editable.
|
|
1469
|
+
*/
|
|
1165
1470
|
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
|
|
1166
1471
|
// File: src/functions/isIntegerBetween.d.ts
|
|
1472
|
+
/**
|
|
1473
|
+
* Checks if the value is between integers.
|
|
1474
|
+
*/
|
|
1167
1475
|
export declare function isIntegerBetween(value: number, between: number): boolean;
|
|
1168
1476
|
// File: src/functions/isNull.d.ts
|
|
1169
|
-
|
|
1477
|
+
import { Undefined } from '../types/basicTypes';
|
|
1478
|
+
/**
|
|
1479
|
+
* Checks if the variable is equal to null or undefined.
|
|
1480
|
+
*/
|
|
1481
|
+
export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
|
|
1170
1482
|
// File: src/functions/isNumber.d.ts
|
|
1483
|
+
/**
|
|
1484
|
+
* Checks if the value is a number.
|
|
1485
|
+
*/
|
|
1171
1486
|
export declare function isNumber(value: any): boolean;
|
|
1172
1487
|
// File: src/functions/isObject.d.ts
|
|
1488
|
+
/**
|
|
1489
|
+
* Checks if a value is an object.
|
|
1490
|
+
*/
|
|
1173
1491
|
export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
|
|
1174
1492
|
// File: src/functions/isObjectNotArray.d.ts
|
|
1175
|
-
|
|
1493
|
+
/**
|
|
1494
|
+
* Checks if the value is an object and not an array.
|
|
1495
|
+
*/
|
|
1496
|
+
export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
|
|
1176
1497
|
// File: src/functions/isOnLine.d.ts
|
|
1498
|
+
/**
|
|
1499
|
+
* Check if the device is online.
|
|
1500
|
+
*/
|
|
1177
1501
|
export declare function isOnLine(): boolean;
|
|
1178
1502
|
// File: src/functions/isSelected.d.ts
|
|
1503
|
+
/**
|
|
1504
|
+
* Checks if the value is selected.
|
|
1505
|
+
*/
|
|
1179
1506
|
export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
|
|
1180
1507
|
// File: src/functions/isSelectedByList.d.ts
|
|
1508
|
+
/**
|
|
1509
|
+
* Testing isSelected property for the entire list of values.
|
|
1510
|
+
*/
|
|
1181
1511
|
export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
|
|
1182
1512
|
// File: src/functions/isShare.d.ts
|
|
1513
|
+
/**
|
|
1514
|
+
* Checks if the Web Share API is supported.
|
|
1515
|
+
*/
|
|
1183
1516
|
export declare function isShare(): boolean;
|
|
1184
1517
|
// File: src/functions/isString.d.ts
|
|
1518
|
+
/**
|
|
1519
|
+
* Checks if the value is of type string.
|
|
1520
|
+
*/
|
|
1185
1521
|
export declare function isString<T>(value: T): value is Extract<T, string>;
|
|
1186
1522
|
// File: src/functions/isTab.d.ts
|
|
1523
|
+
/**
|
|
1524
|
+
* Checks if the pressed key is Tab.
|
|
1525
|
+
*/
|
|
1187
1526
|
export declare const isTab: (event: KeyboardEvent) => boolean;
|
|
1188
1527
|
// File: src/functions/isWindow.d.ts
|
|
1528
|
+
/**
|
|
1529
|
+
* Checks if object is Window.
|
|
1530
|
+
*/
|
|
1189
1531
|
export declare function isWindow<E>(element: E): element is Extract<E, Window>;
|
|
1190
1532
|
// File: src/functions/random.d.ts
|
|
1533
|
+
/**
|
|
1534
|
+
* Generate a random integer.
|
|
1535
|
+
*/
|
|
1191
1536
|
export declare function random(min: number, max: number): number;
|
|
1192
1537
|
// File: src/functions/removeCommonPrefix.d.ts
|
|
1538
|
+
/**
|
|
1539
|
+
* Removes the common prefix from the main string.
|
|
1540
|
+
*/
|
|
1193
1541
|
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
1194
1542
|
// File: src/functions/replaceComponentName.d.ts
|
|
1543
|
+
/**
|
|
1544
|
+
* Replaces the component name in the text.
|
|
1545
|
+
*/
|
|
1195
1546
|
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
1196
1547
|
// File: src/functions/replaceRecursive.d.ts
|
|
1197
1548
|
import { ObjectItem, ObjectOrArray } from '../types/basicTypes';
|
|
1549
|
+
/**
|
|
1550
|
+
* Merge one or more arrays recursively.
|
|
1551
|
+
*/
|
|
1198
1552
|
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
|
|
1199
1553
|
// File: src/functions/replaceTemplate.d.ts
|
|
1200
|
-
|
|
1554
|
+
import { FunctionReturn } from '../types/basicTypes';
|
|
1555
|
+
/**
|
|
1556
|
+
* Replacing the value from replaces in value.
|
|
1557
|
+
*/
|
|
1558
|
+
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
|
|
1201
1559
|
// File: src/functions/resizeImageByMax.d.ts
|
|
1202
|
-
|
|
1560
|
+
/**
|
|
1561
|
+
* Resizes an image to fit within a maximum size constraint.
|
|
1562
|
+
*/
|
|
1563
|
+
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: 'auto' | 'width' | 'height', typeData?: string): string | undefined;
|
|
1203
1564
|
// File: src/functions/secondToTime.d.ts
|
|
1565
|
+
/**
|
|
1566
|
+
* Converts seconds into a time string.
|
|
1567
|
+
*/
|
|
1204
1568
|
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
|
|
1205
1569
|
// File: src/functions/setElementItem.d.ts
|
|
1206
1570
|
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
1571
|
+
/**
|
|
1572
|
+
* Modifies the value of an element.
|
|
1573
|
+
*/
|
|
1207
1574
|
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;
|
|
1208
1575
|
// File: src/functions/setValues.d.ts
|
|
1209
|
-
|
|
1576
|
+
/**
|
|
1577
|
+
* Modifies data according to its type and settings.
|
|
1578
|
+
*/
|
|
1579
|
+
export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
|
|
1580
|
+
multiple?: boolean | undefined;
|
|
1581
|
+
maxlength?: number | undefined;
|
|
1582
|
+
alwaysChange?: boolean | undefined;
|
|
1583
|
+
notEmpty?: boolean | undefined;
|
|
1584
|
+
}): T | T[] | undefined;
|
|
1210
1585
|
// File: src/functions/sleep.d.ts
|
|
1586
|
+
/**
|
|
1587
|
+
* Pause execution for a specified number of milliseconds.
|
|
1588
|
+
*/
|
|
1211
1589
|
export declare function sleep(ms: number): Promise<void>;
|
|
1212
1590
|
// File: src/functions/splice.d.ts
|
|
1213
1591
|
import { ObjectItem } from '../types/basicTypes';
|
|
1592
|
+
/**
|
|
1593
|
+
* Merges source properties into a target object.
|
|
1594
|
+
*/
|
|
1214
1595
|
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
|
|
1215
1596
|
// File: src/functions/strFill.d.ts
|
|
1597
|
+
/**
|
|
1598
|
+
* Creates a string consisting of value repeated count times.
|
|
1599
|
+
*/
|
|
1216
1600
|
export declare function strFill(value: string, count: number): string;
|
|
1217
1601
|
// File: src/functions/strSplit.d.ts
|
|
1602
|
+
/**
|
|
1603
|
+
* Splits a string by a separator with a limit.
|
|
1604
|
+
*/
|
|
1218
1605
|
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
1219
1606
|
// File: src/functions/toArray.d.ts
|
|
1607
|
+
/**
|
|
1608
|
+
* Converts a value to an array.
|
|
1609
|
+
*/
|
|
1220
1610
|
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
1221
1611
|
// File: src/functions/toCamelCase.d.ts
|
|
1612
|
+
/**
|
|
1613
|
+
* Converts a string to Camel Case.
|
|
1614
|
+
*/
|
|
1222
1615
|
export declare function toCamelCase(value: string): string;
|
|
1223
1616
|
// File: src/functions/toCamelCaseFirst.d.ts
|
|
1617
|
+
/**
|
|
1618
|
+
* Converts a string to Camel Case with first letter uppercase.
|
|
1619
|
+
*/
|
|
1224
1620
|
export declare function toCamelCaseFirst(value: string): string;
|
|
1225
1621
|
// File: src/functions/toDate.d.ts
|
|
1226
|
-
|
|
1622
|
+
/**
|
|
1623
|
+
* Converts to a Date object.
|
|
1624
|
+
*/
|
|
1625
|
+
export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
|
|
1227
1626
|
// File: src/functions/toKebabCase.d.ts
|
|
1627
|
+
/**
|
|
1628
|
+
* Converts a string to kebab-case.
|
|
1629
|
+
*/
|
|
1228
1630
|
export declare function toKebabCase(value: string): string;
|
|
1229
1631
|
// File: src/functions/toNumber.d.ts
|
|
1230
1632
|
import { NumberOrString } from '../types/basicTypes';
|
|
1633
|
+
/**
|
|
1634
|
+
* Converts a string or number to a floating-point number.
|
|
1635
|
+
*/
|
|
1231
1636
|
export declare function toNumber(value?: NumberOrString): number;
|
|
1232
1637
|
// File: src/functions/toNumberByMax.d.ts
|
|
1638
|
+
/**
|
|
1639
|
+
* Converts data to a number, taking max value into account.
|
|
1640
|
+
*/
|
|
1233
1641
|
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
1234
1642
|
// File: src/functions/toPercent.d.ts
|
|
1643
|
+
/**
|
|
1644
|
+
* Converts values to percentages.
|
|
1645
|
+
*/
|
|
1235
1646
|
export declare function toPercent(maxValue: number, value: number): number;
|
|
1236
1647
|
// File: src/functions/toPercentBy100.d.ts
|
|
1648
|
+
/**
|
|
1649
|
+
* Converts values to percentages (*100).
|
|
1650
|
+
*/
|
|
1237
1651
|
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
1238
1652
|
// File: src/functions/toString.d.ts
|
|
1653
|
+
/**
|
|
1654
|
+
* Converts the given value to a string.
|
|
1655
|
+
*/
|
|
1239
1656
|
export declare function toString<T>(value: T): string;
|
|
1240
1657
|
// File: src/functions/transformation.d.ts
|
|
1658
|
+
/**
|
|
1659
|
+
* Transforms a string into the corresponding data type.
|
|
1660
|
+
*/
|
|
1241
1661
|
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
1242
1662
|
// File: src/functions/uint8ArrayToBase64.d.ts
|
|
1663
|
+
/**
|
|
1664
|
+
* Converts a Uint8Array to a base64 encoded string.
|
|
1665
|
+
*/
|
|
1243
1666
|
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
|
|
1244
1667
|
// File: src/functions/uniqueArray.d.ts
|
|
1668
|
+
/**
|
|
1669
|
+
* Removes duplicate entries in an array.
|
|
1670
|
+
*/
|
|
1245
1671
|
export declare function uniqueArray<T>(value: T[]): T[];
|
|
1246
1672
|
// File: src/functions/writeClipboardData.d.ts
|
|
1673
|
+
/**
|
|
1674
|
+
* Writes text to the clipboard.
|
|
1675
|
+
*/
|
|
1247
1676
|
export declare function writeClipboardData(text: string): Promise<void>;
|
|
1248
1677
|
// File: src/library.d.ts
|
|
1249
1678
|
export * from './classes/Api';
|
|
@@ -1302,6 +1731,7 @@ export * from './classes/StorageCallback';
|
|
|
1302
1731
|
export * from './classes/Translate';
|
|
1303
1732
|
export * from './classes/TranslateFile';
|
|
1304
1733
|
export * from './classes/TranslateInstance';
|
|
1734
|
+
export * from './classes/UrlItem';
|
|
1305
1735
|
export * from './functions/addTagHighlightMatch';
|
|
1306
1736
|
export * from './functions/anyToString';
|
|
1307
1737
|
export * from './functions/applyTemplate';
|
|
@@ -1634,7 +2064,7 @@ export type FormattersOptionsPlural = {
|
|
|
1634
2064
|
export type FormattersOptionsUnit = {
|
|
1635
2065
|
unit: string | Intl.NumberFormatOptions;
|
|
1636
2066
|
};
|
|
1637
|
-
export type FormattersOptionsInformation<Type extends FormattersType> = any
|
|
2067
|
+
export type FormattersOptionsInformation<Type extends FormattersType> = Type extends FormattersType.currency ? FormattersOptionsCurrency : Type extends FormattersType.date ? FormattersOptionsDate : Type extends FormattersType.name ? FormattersOptionsName : Type extends FormattersType.number ? FormattersOptionsNumber : Type extends FormattersType.plural ? FormattersOptionsPlural : Type extends FormattersType.unit ? FormattersOptionsUnit : Record<string, any>;
|
|
1638
2068
|
export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
|
|
1639
2069
|
type?: Type;
|
|
1640
2070
|
transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
|
|
@@ -1643,16 +2073,18 @@ export type FormattersOptionsItem<Type extends FormattersType = FormattersType,
|
|
|
1643
2073
|
export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
|
|
1644
2074
|
export type FormattersListItem = Record<string, any>;
|
|
1645
2075
|
export type FormattersList<Item extends FormattersListItem> = Item[];
|
|
1646
|
-
export type FormattersCapitalize<K extends string> =
|
|
2076
|
+
export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
|
|
1647
2077
|
export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
|
|
1648
|
-
export type FormattersKey<K, A extends string = 'Format'> = string;
|
|
1649
|
-
export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> =
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
export type
|
|
2078
|
+
export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
|
|
2079
|
+
export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
|
|
2080
|
+
[K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
2081
|
+
};
|
|
2082
|
+
export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
|
|
2083
|
+
export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
|
|
2084
|
+
export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
|
|
1653
2085
|
export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
|
|
1654
2086
|
export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
|
|
1655
|
-
export type FormattersReturn<List extends FormattersListProp, Options extends FormattersOptionsList = FormattersOptionsList, Item extends FormattersItemProp<List> = FormattersItemProp<List>> = any;
|
|
2087
|
+
export type FormattersReturn<List extends FormattersListProp, Options extends FormattersOptionsList = FormattersOptionsList, Item extends FormattersItemProp<List> = FormattersItemProp<List>> = List extends any[] ? FormattersListColumns<Item, Options> : (FormattersListColumnItem<Item, Options> | undefined);
|
|
1656
2088
|
// File: src/types/geoTypes.d.ts
|
|
1657
2089
|
export type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
|
|
1658
2090
|
export type GeoFirstDay = 1 | 6 | 0;
|
|
@@ -1824,6 +2256,31 @@ export declare enum MetaOpenGraphType {
|
|
|
1824
2256
|
profile = "profile",
|
|
1825
2257
|
book = "book"
|
|
1826
2258
|
}
|
|
2259
|
+
export declare enum MetaOpenGraphAvailability {
|
|
2260
|
+
inStock = "in stock",
|
|
2261
|
+
outOfStock = "out of stock",
|
|
2262
|
+
preorder = "preorder",
|
|
2263
|
+
backorder = "backorder",
|
|
2264
|
+
discontinued = "discontinued",
|
|
2265
|
+
pending = "pending"
|
|
2266
|
+
}
|
|
2267
|
+
export declare enum MetaOpenGraphCondition {
|
|
2268
|
+
new = "new",
|
|
2269
|
+
used = "used",
|
|
2270
|
+
refurbished = "refurbished"
|
|
2271
|
+
}
|
|
2272
|
+
export declare enum MetaOpenGraphAge {
|
|
2273
|
+
newborn = "newborn",
|
|
2274
|
+
infant = "infant",
|
|
2275
|
+
toddler = "toddler",
|
|
2276
|
+
kids = "kids",
|
|
2277
|
+
adult = "adult"
|
|
2278
|
+
}
|
|
2279
|
+
export declare enum MetaOpenGraphGender {
|
|
2280
|
+
female = "female",
|
|
2281
|
+
male = "male",
|
|
2282
|
+
unisex = "unisex"
|
|
2283
|
+
}
|
|
1827
2284
|
export declare enum MetaTwitterTag {
|
|
1828
2285
|
card = "twitter:card",
|
|
1829
2286
|
site = "twitter:site",
|
|
@@ -1869,12 +2326,19 @@ export declare enum MetaTwitterCard {
|
|
|
1869
2326
|
}
|
|
1870
2327
|
// File: src/types/searchTypes.d.ts
|
|
1871
2328
|
export type SearchItem = Record<string, any>;
|
|
1872
|
-
export type SearchColumnPath<K, P> = string;
|
|
1873
|
-
export type SearchColumn<T extends SearchItem> =
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
export type
|
|
1877
|
-
export type
|
|
2329
|
+
export type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
|
|
2330
|
+
export type SearchColumn<T extends SearchItem> = {
|
|
2331
|
+
[K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K;
|
|
2332
|
+
}[keyof T];
|
|
2333
|
+
export type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
|
|
2334
|
+
export type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
|
|
2335
|
+
export type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
|
|
2336
|
+
export type SearchFormatItem<T extends SearchItem, KT extends string[]> = {
|
|
2337
|
+
[K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string;
|
|
2338
|
+
} & {
|
|
2339
|
+
searchActive?: boolean;
|
|
2340
|
+
};
|
|
2341
|
+
export type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
|
|
1878
2342
|
export type SearchListValue<T extends SearchItem> = T[] | undefined;
|
|
1879
2343
|
export type SearchOptions = {
|
|
1880
2344
|
limit?: number;
|
|
@@ -1899,8 +2363,10 @@ export type TranslateConfig = {
|
|
|
1899
2363
|
readApi?: boolean;
|
|
1900
2364
|
};
|
|
1901
2365
|
export type TranslateCode = string | string[];
|
|
1902
|
-
export type TranslateList<T extends TranslateCode[]> =
|
|
1903
|
-
|
|
2366
|
+
export type TranslateList<T extends TranslateCode[]> = {
|
|
2367
|
+
[K in T[number] as K extends readonly string[] ? K[0] : K]: string;
|
|
2368
|
+
};
|
|
2369
|
+
export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
|
|
1904
2370
|
export type TranslateDataFileList = Record<string, string>;
|
|
1905
2371
|
export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
|
|
1906
2372
|
export type TranslateDataFile = Record<string, TranslateDataFileItem>;
|