@dxtmisha/functional-basic 1.8.1 → 1.8.3

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-types.md CHANGED
@@ -121,611 +121,446 @@ export type ApiStatusItem = {
121
121
  lastMessage?: string;
122
122
  };
123
123
  export type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
124
- export type ApiInstanceOptions = {
125
- headersClass?: typeof ApiHeaders;
126
- requestDefaultClass?: typeof ApiDefault;
127
- statusClass?: typeof ApiStatus;
128
- responseClass?: typeof ApiResponse;
129
- preparationClass?: typeof ApiPreparation;
130
- loadingClass?: LoadingInstance;
131
- errorCenterClass?: ErrorCenterInstance;
132
- hydrationClass?: typeof ApiHydration;
133
- wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
124
+ export type Undefined = undefined | null;
125
+ export type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
126
+ export type NumberOrString = number | string;
127
+ export type NumberOrStringOrBoolean = number | string | boolean;
128
+ export type NumberOrStringOrDate = NumberOrString | Date;
129
+ export type NormalOrArray<T = NumberOrString> = T | T[];
130
+ export type NormalOrPromise<T> = T | Promise<T>;
131
+ export type ObjectItem<T = any> = Record<string, T>;
132
+ export type ObjectOrArray<T = any> = T[] | ObjectItem<T>;
133
+ export type ArrayToItem<T> = T extends any[] ? T[number] : T;
134
+ export type FunctionReturn<R = any> = () => R;
135
+ export type FunctionVoid = () => void;
136
+ export type FunctionArgs<T, R> = (...args: T[]) => R;
137
+ export type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
138
+ export type ItemList<T = any> = Record<string, T>;
139
+ export type Item<V> = {
140
+ index: string;
141
+ value: V;
134
142
  };
135
- export declare class Api {
136
- static isLocalhost(): boolean;
137
- static getItem(): ApiInstance;
138
- static getStatus(): ApiStatus;
139
- static getResponse(): ApiResponse;
140
- static getHydration(): ApiHydration;
141
- static getHydrationScript(): string;
142
- static getOrigin(): string;
143
- static getUrl(path: string, api?: boolean): string;
144
- static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
145
- static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
146
- static setHeaders(headers: ApiHeadersValue): void;
147
- static setRequestDefault(request: ApiDefaultValue): void;
148
- static setUrl(url: string): void;
149
- static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
150
- static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
151
- static setTimeout(timeout: number): void;
152
- static setOrigin(origin: string): void;
153
- static setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): void;
154
- static setConfig(config?: ApiConfig): void;
155
- static request<T>(pathRequest: string | ApiFetch): Promise<T>;
156
- static get<T>(request: ApiFetch): Promise<T>;
157
- static post<T>(request: ApiFetch): Promise<T>;
158
- static put<T>(request: ApiFetch): Promise<T>;
159
- static patch<T>(request: ApiFetch): Promise<T>;
160
- static delete<T>(request: ApiFetch): Promise<T>;
161
- }
162
- export declare class ApiCache {
163
- static init(getListener: (key: string) => Promise<ApiCacheItem | undefined>, setListener: (key: string, value: ApiCacheItem) => Promise<boolean>, removeListener: (key: string) => Promise<boolean>, cacheStepAgeClearOld?: number): void;
164
- static reset(): void;
165
- static get<T>(key: string): Promise<T | undefined>;
166
- static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
167
- static set<T>(key: string, value: T, age?: number): Promise<void>;
168
- static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
169
- static remove(key: string): Promise<void>;
143
+ export type ItemValue<V> = {
144
+ label: string;
145
+ value: V;
146
+ };
147
+ export type ItemName<V> = {
148
+ name: string | number;
149
+ value: V;
150
+ };
151
+ export type ElementOrWindow = HTMLElement | Window;
152
+ export type ElementOrString<E extends ElementOrWindow> = E | string;
153
+ export type EventOptions = AddEventListenerOptions | boolean | undefined;
154
+ export type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;
155
+ export type EventActivityItem<E extends ElementOrWindow> = {
156
+ element: E | undefined;
157
+ type: string;
158
+ listener?: (event: any | Event) => void;
159
+ observer?: ResizeObserver;
160
+ };
161
+ export type ImageCoordinator = {
162
+ x: number;
163
+ y: number;
164
+ };
165
+ export type ErrorCenterGroup = string | undefined;
166
+ export type ErrorCenterCauseItem<D = any> = {
167
+ group?: ErrorCenterGroup;
168
+ code: string;
169
+ priority?: number;
170
+ label?: string;
171
+ message?: string;
172
+ details?: D;
173
+ };
174
+ export type ErrorCenterCauseList = ErrorCenterCauseItem[];
175
+ export type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;
176
+ export type ErrorCenterHandlerItem = {
177
+ group?: ErrorCenterGroup;
178
+ handlers: ErrorCenterHandlerCallback[];
179
+ };
180
+ export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
181
+ export type ErrorCenterHandlerIsConsoleCallback = (cause: ErrorCenterCauseItem) => boolean;
182
+ export type ErrorCenterHandlerIsConsole = boolean | ErrorCenterHandlerIsConsoleCallback;
183
+ export declare enum FormattersType {
184
+ currency = "currency",
185
+ date = "date",
186
+ name = "name",
187
+ number = "number",
188
+ plural = "plural",
189
+ unit = "unit"
170
190
  }
171
- export declare class ApiDataReturn<T = any> {
172
- constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd, error?: ApiErrorItem | undefined);
173
- init(): Promise<this>;
174
- get(): ApiData<T>;
175
- getAndStatus(status: ApiStatus): ApiData<T>;
176
- getData(): ApiData<T> | undefined;
191
+ export type FormattersOptionsCurrency = {
192
+ currencyPropName?: string;
193
+ options?: string | Intl.NumberFormatOptions;
194
+ numberOnly?: boolean;
195
+ };
196
+ export type FormattersOptionsDate = {
197
+ type?: GeoDate;
198
+ options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions;
199
+ hour24?: boolean;
200
+ };
201
+ export type FormattersOptionsName = {
202
+ lastPropName?: string;
203
+ firstPropName?: string;
204
+ surname?: string;
205
+ short?: boolean;
206
+ };
207
+ export type FormattersOptionsNumber = {
208
+ options?: Intl.NumberFormatOptions;
209
+ };
210
+ export type FormattersOptionsPlural = {
211
+ words: string;
212
+ options?: Intl.PluralRulesOptions;
213
+ optionsNumber?: Intl.NumberFormatOptions;
214
+ };
215
+ export type FormattersOptionsUnit = {
216
+ unit: string | Intl.NumberFormatOptions;
217
+ };
218
+ 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>;
219
+ export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
220
+ type?: Type;
221
+ transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
222
+ options?: FormattersOptionsInformation<Type>;
223
+ };
224
+ export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
225
+ export type FormattersListItem = Record<string, any>;
226
+ export type FormattersList<Item extends FormattersListItem> = Item[];
227
+ export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
228
+ export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
229
+ export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
230
+ export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
231
+ [K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
232
+ };
233
+ export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
234
+ export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
235
+ export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
236
+ export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
237
+ export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
238
+ 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);
239
+ export type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
240
+ export type GeoFirstDay = 1 | 6 | 0;
241
+ export type GeoHours = '12' | '24';
242
+ export type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';
243
+ export interface GeoItem {
244
+ country: string;
245
+ countryAlternative?: string[];
246
+ language: string;
247
+ languageAlternative?: string[];
248
+ firstDay?: string | null;
249
+ zone?: string | null;
250
+ phoneCode?: string;
251
+ phoneWithin?: string;
252
+ phoneMask?: string | string[];
253
+ nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
254
+ unit?: {
255
+ 'millimeter'?: string;
256
+ 'centimeter'?: string;
257
+ 'meter'?: string;
258
+ 'kilometer'?: string;
259
+ 'square-meter'?: string;
260
+ 'hectare'?: string;
261
+ 'gram'?: string;
262
+ 'kilogram'?: string;
263
+ 'tonne'?: string;
264
+ 'milliliter'?: string;
265
+ 'liter'?: string;
266
+ 'celsius'?: string;
267
+ 'kilometer-per-hour'?: string;
268
+ };
177
269
  }
178
- export declare class ApiDefault {
179
- is(): boolean;
180
- get(): Record<string, any> | undefined;
181
- request(request: ApiFetch['request']): ApiFetch['request'];
182
- set(request: ApiDefaultValue): this;
270
+ export interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
271
+ standard: string;
272
+ firstDay: string;
273
+ location: string;
274
+ locationCountry: string;
275
+ locationLanguage: string;
183
276
  }
184
- export declare class ApiError {
185
- static getStorage(): ApiErrorStorage;
186
- static add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): void;
187
- static getItem(method: ApiMethodItem, response: Response): Promise<ApiErrorItem>;
277
+ export interface GeoFlagItem {
278
+ language: string;
279
+ languageCode: string;
280
+ country: string;
281
+ countryCode: string;
282
+ standard: string;
283
+ icon?: string;
284
+ label: string;
285
+ value: string;
286
+ phoneCode?: string;
188
287
  }
189
- export declare class ApiErrorItem {
190
- constructor(method: ApiMethodItem, response: Response, error: ApiErrorStorageItem);
191
- getMethod(): ApiMethodItem;
192
- getResponse(): Response;
193
- getError(): ApiErrorStorageItem;
194
- getCode(): string | undefined;
195
- getMessage(): string | undefined;
196
- getStatus(): number;
288
+ export interface GeoFlagNational extends GeoFlagItem {
289
+ description: string;
290
+ nationalLanguage: string;
291
+ nationalCountry: string;
197
292
  }
198
- export declare class ApiErrorStorage {
199
- find(method: ApiMethodItem, response: Response): Promise<ApiErrorStorageItem>;
200
- add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): this;
293
+ export interface GeoPhoneValue {
294
+ phone: number;
295
+ within: number;
296
+ mask: string[];
297
+ value: string;
201
298
  }
202
- export declare class ApiHeaders {
203
- get(value?: Record<string, string> | null, type?: string | undefined | null): Record<string, string> | undefined;
204
- getByRequest(request: ApiFetch['request'], value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
205
- set(headers: ApiHeadersValue): this;
299
+ export interface GeoPhoneMap {
300
+ items: GeoPhoneValue[];
301
+ info: GeoPhoneValue | undefined;
302
+ value: string | undefined;
303
+ mask: string[];
304
+ maskFull: string[];
305
+ next: Record<string, GeoPhoneMap>;
206
306
  }
207
- export declare class ApiHydration {
208
- initResponse(response: ApiResponse): void;
209
- toClient<T>(apiFetch: ApiFetch, response: T): void;
210
- toString(): string;
307
+ export interface GeoPhoneMapInfo {
308
+ item?: GeoPhoneMap;
309
+ phone?: string;
211
310
  }
212
- export declare class ApiInstance {
213
- constructor(url?: string, options?: ApiInstanceOptions);
214
- isLocalhost(): boolean;
215
- getStatus(): ApiStatus;
216
- getResponse(): ApiResponse;
217
- getHydration(): ApiHydration;
218
- getOrigin(): string;
219
- getUrl(path: string, api?: boolean): string;
220
- getBody(request?: ApiFetch['request'], method?: ApiMethod): string | FormData | undefined;
221
- getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethod): string;
222
- getHydrationScript(): string;
223
- setHeaders(headers: ApiHeadersValue): this;
224
- setRequestDefault(request: ApiDefaultValue): this;
225
- setUrl(url: string): this;
226
- setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
227
- setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
228
- setTimeout(timeout: number): this;
229
- setOrigin(origin: string): this;
230
- setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): this;
231
- request<T>(pathRequest: string | ApiFetch): Promise<T>;
232
- get<T>(request: ApiFetch): Promise<T>;
233
- post<T>(request: ApiFetch): Promise<T>;
234
- put<T>(request: ApiFetch): Promise<T>;
235
- patch<T>(request: ApiFetch): Promise<T>;
236
- delete<T>(request: ApiFetch): Promise<T>;
237
- }
238
- export declare class ApiPreparation {
239
- make(active: boolean, apiFetch: ApiFetch): Promise<void>;
240
- makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
241
- set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
242
- setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
243
- }
244
- export declare class ApiResponse {
245
- constructor(requestDefault: ApiDefault);
246
- get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
247
- getList(): (ApiResponseItem & Record<string, any>)[];
248
- add(response: ApiResponseItem | ApiResponseItem[]): this;
249
- setDevMode(devMode: boolean): this;
250
- emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
251
- emulatorAsync<T>(apiFetch: ApiFetch): T | undefined;
252
- }
253
- export declare class ApiStatus {
254
- get(): ApiStatusItem | undefined;
255
- getStatus(): number | undefined;
256
- getStatusText(): string | undefined;
257
- getStatusType(): ApiStatusType | undefined;
258
- getCode(): string | undefined;
259
- getError(): string | undefined;
260
- getResponse<T>(): T | undefined;
261
- getMessage(): string;
262
- set(data: ApiStatusItem): this;
263
- setStatus(status?: number, statusText?: string): this;
264
- setError(error?: string): this;
265
- setLastResponse(response?: any): this;
266
- setLastStatus(status?: ApiStatusType): this;
267
- setLastCode(code?: string): this;
268
- setLastMessage(message?: string): this;
269
- }
270
- export declare class BroadcastMessage<Message = any> {
271
- constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
272
- getChannel(): BroadcastChannel | undefined;
273
- post(message: Message): this;
274
- setCallback(callback: (event: MessageEvent<Message>) => void): this;
275
- setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
276
- destroy(): this;
311
+ export declare enum MetaTag {
312
+ title = "title",
313
+ description = "description",
314
+ keywords = "keywords",
315
+ canonical = "canonical",
316
+ robots = "robots",
317
+ author = "author"
277
318
  }
278
- /**
279
- * Simple in-memory cache class that stores computed values by key.
280
- * @deprecated This class is obsolete and should not be used
281
- */
282
- export declare class Cache {
283
- get<T>(name: string, callback: () => T, comparison?: any[]): T;
284
- getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
319
+ export declare enum MetaRobots {
320
+ indexFollow = "index, follow",
321
+ noIndexFollow = "noindex, follow",
322
+ indexNoFollow = "index, nofollow",
323
+ noIndexNoFollow = "noindex, nofollow",
324
+ noArchive = "noarchive",
325
+ noSnippet = "nosnippet",
326
+ noImageIndex = "noimageindex",
327
+ images = "images",
328
+ noTranslate = "notranslate",
329
+ noPreview = "nopreview",
330
+ textOnly = "textonly",
331
+ noIndexSubpages = "noindex, noarchive",
332
+ none = "none"
285
333
  }
286
- /**
287
- * Class for managing a single cached value with dependency tracking.
288
- * @deprecated This class is obsolete and should not be used
289
- */
290
- export declare class CacheItem<T> {
291
- constructor(callback: () => T);
292
- getCache(comparison: any[]): T;
293
- getCacheOld(): T | undefined;
294
- getCacheAsync(comparison: any[]): Promise<T>;
334
+ export declare enum MetaOpenGraphTag {
335
+ title = "og:title",
336
+ type = "og:type",
337
+ url = "og:url",
338
+ image = "og:image",
339
+ description = "og:description",
340
+ locale = "og:locale",
341
+ siteName = "og:site_name",
342
+ localeAlternate = "og:locale:alternate",
343
+ imageUrl = "og:image:url",
344
+ imageSecureUrl = "og:image:secure_url",
345
+ imageType = "og:image:type",
346
+ imageWidth = "og:image:width",
347
+ imageHeight = "og:image:height",
348
+ imageAlt = "og:image:alt",
349
+ video = "og:video",
350
+ videoUrl = "og:video:url",
351
+ videoSecureUrl = "og:video:secure_url",
352
+ videoType = "og:video:type",
353
+ videoWidth = "og:video:width",
354
+ videoHeight = "og:video:height",
355
+ audio = "og:audio",
356
+ audioSecureUrl = "og:audio:secure_url",
357
+ audioType = "og:audio:type",
358
+ articlePublishedTime = "article:published_time",
359
+ articleModifiedTime = "article:modified_time",
360
+ articleExpirationTime = "article:expiration_time",
361
+ articleAuthor = "article:author",
362
+ articleSection = "article:section",
363
+ articleTag = "article:tag",
364
+ bookAuthor = "book:author",
365
+ bookIsbn = "book:isbn",
366
+ bookReleaseDate = "book:release_date",
367
+ bookTag = "book:tag",
368
+ musicDuration = "music:duration",
369
+ musicAlbum = "music:album",
370
+ musicAlbumDisc = "music:album:disc",
371
+ musicAlbumTrack = "music:album:track",
372
+ musicMusician = "music:musician",
373
+ musicSong = "music:song",
374
+ musicSongDisc = "music:song:disc",
375
+ musicSongTrack = "music:song:track",
376
+ musicReleaseDate = "music:release_date",
377
+ musicCreator = "music:creator",
378
+ videoActor = "video:actor",
379
+ videoActorRole = "video:actor:role",
380
+ videoDirector = "video:director",
381
+ videoWriter = "video:writer",
382
+ videoDuration = "video:duration",
383
+ videoReleaseDate = "video:release_date",
384
+ videoTag = "video:tag",
385
+ videoSeries = "video:series",
386
+ profileFirstName = "profile:first_name",
387
+ profileLastName = "profile:last_name",
388
+ profileUsername = "profile:username",
389
+ profileGender = "profile:gender",
390
+ productBrand = "product:brand",
391
+ productAvailability = "product:availability",
392
+ productCondition = "product:condition",
393
+ productPriceAmount = "product:price:amount",
394
+ productPriceCurrency = "product:price:currency",
395
+ productRetailerItemId = "product:retailer_item_id",
396
+ productCategory = "product:category",
397
+ productEan = "product:ean",
398
+ productIsbn = "product:isbn",
399
+ productMfrPartNo = "product:mfr_part_no",
400
+ productUpc = "product:upc",
401
+ productWeightValue = "product:weight:value",
402
+ productWeightUnits = "product:weight:units",
403
+ productColor = "product:color",
404
+ productMaterial = "product:material",
405
+ productPattern = "product:pattern",
406
+ productAgeGroup = "product:age_group",
407
+ productGender = "product:gender"
295
408
  }
296
- /**
297
- * Static cache class that uses ServerStorage for persistent caching across the application.
298
- * @deprecated This class is obsolete and should not be used
299
- */
300
- export declare class CacheStatic {
301
- static get<T>(name: string, callback: () => T, comparison?: any[]): T;
302
- static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
409
+ export declare enum MetaOpenGraphType {
410
+ website = "website",
411
+ article = "article",
412
+ video = "video.other",
413
+ videoTvShow = "video.tv_show",
414
+ videoEpisode = "video.episode",
415
+ videoMovie = "video.movie",
416
+ musicAlbum = "music.album",
417
+ musicPlaylist = "music.playlist",
418
+ musicSong = "music.song",
419
+ musicRadioStation = "music.radio_station",
420
+ app = "app",
421
+ product = "product",
422
+ business = "business.business",
423
+ place = "place",
424
+ event = "event",
425
+ profile = "profile",
426
+ book = "book"
303
427
  }
304
- export type CookieSameSite = 'strict' | 'lax';
305
- export type CookieOptions = {
306
- age?: number;
307
- sameSite?: CookieSameSite;
308
- path?: string;
309
- domain?: string;
310
- secure?: boolean;
311
- httpOnly?: boolean;
312
- partitioned?: boolean;
313
- arguments?: string[] | Record<string, string | number | boolean>;
314
- };
315
- export declare class Cookie<T> {
316
- static getInstance<T>(name: string): Cookie<T>;
317
- constructor(name: string);
318
- get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
319
- set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
320
- remove(): void;
428
+ export declare enum MetaOpenGraphAvailability {
429
+ inStock = "in stock",
430
+ outOfStock = "out of stock",
431
+ preorder = "preorder",
432
+ backorder = "backorder",
433
+ discontinued = "discontinued",
434
+ pending = "pending"
321
435
  }
322
- export declare class CookieBlock {
323
- static getItem(): CookieBlockInstance;
324
- static get(): boolean;
325
- static set(value: boolean): void;
436
+ export declare enum MetaOpenGraphCondition {
437
+ new = "new",
438
+ used = "used",
439
+ refurbished = "refurbished"
326
440
  }
327
- export declare class CookieBlockInstance {
328
- get(): boolean;
329
- set(value: boolean): void;
441
+ export declare enum MetaOpenGraphAge {
442
+ newborn = "newborn",
443
+ infant = "infant",
444
+ toddler = "toddler",
445
+ kids = "kids",
446
+ adult = "adult"
330
447
  }
331
- export declare class CookieStorage {
332
- static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
333
- static reset(): void;
334
- static get<T>(name: string, defaultValue?: T | (() => T)): T | undefined;
335
- static set<T>(name: string, value: T | (() => T), options?: CookieOptions): T;
336
- static remove(name: string): void;
337
- static update(): void;
448
+ export declare enum MetaOpenGraphGender {
449
+ female = "female",
450
+ male = "male",
451
+ unisex = "unisex"
338
452
  }
339
- export declare class DataStorage<T> {
340
- static setPrefix(newPrefix: string): void;
341
- constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
342
- get(defaultValue?: T | (() => T), cache?: number): T | undefined;
343
- set(value?: T | (() => T)): T | undefined;
344
- remove(): this;
345
- update(): this;
453
+ export declare enum MetaTwitterTag {
454
+ card = "twitter:card",
455
+ site = "twitter:site",
456
+ creator = "twitter:creator",
457
+ url = "twitter:url",
458
+ title = "twitter:title",
459
+ description = "twitter:description",
460
+ image = "twitter:image",
461
+ imageAlt = "twitter:image:alt",
462
+ imageSrc = "twitter:image:src",
463
+ imageWidth = "twitter:image:width",
464
+ imageHeight = "twitter:image:height",
465
+ label1 = "twitter:label1",
466
+ data1 = "twitter:data1",
467
+ label2 = "twitter:label2",
468
+ data2 = "twitter:data2",
469
+ appNameIphone = "twitter:app:name:iphone",
470
+ appIdIphone = "twitter:app:id:iphone",
471
+ appUrlIphone = "twitter:app:url:iphone",
472
+ appNameIpad = "twitter:app:name:ipad",
473
+ appIdIpad = "twitter:app:id:ipad",
474
+ appUrlIpad = "twitter:app:url:ipad",
475
+ appNameGooglePlay = "twitter:app:name:googleplay",
476
+ appIdGooglePlay = "twitter:app:id:googleplay",
477
+ appUrlGooglePlay = "twitter:app:url:googleplay",
478
+ player = "twitter:player",
479
+ playerWidth = "twitter:player:width",
480
+ playerHeight = "twitter:player:height",
481
+ playerStream = "twitter:player:stream",
482
+ playerStreamContentType = "twitter:player:stream:content_type"
346
483
  }
347
- /**
348
- * A class for working with dates.
349
- * @remarks
350
- * Creating a `Datetime` instance without a specific date (using the current time)
351
- * for rendering in SSR may lead to hydration mismatches because the time or time zone
352
- * on the server may differ from the time on the client.
353
- */
354
- export declare class Datetime {
355
- constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
356
- getIntl(): GeoIntl;
357
- getDate(): Date;
358
- getType(): GeoDate;
359
- getHoursType(): GeoHours;
360
- getHour24(): boolean;
361
- getTimeZoneOffset(): number;
362
- getTimeZone(style?: GeoTimeZoneStyle): string;
363
- getFirstDayCode(): GeoFirstDay;
364
- getYear(): number;
365
- getMonth(): number;
366
- getDay(): number;
367
- getHour(): number;
368
- getMinute(): number;
369
- getSecond(): number;
370
- getMaxDay(): number;
371
- locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
372
- localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
373
- localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
374
- localeDay(style?: Intl.DateTimeFormatOptions['day']): string;
375
- localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
376
- localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
377
- localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
378
- standard(timeZone?: boolean): string;
379
- setDate(value: NumberOrStringOrDate): this;
380
- setType(value: GeoDate): this;
381
- setHour24(value: boolean): this;
382
- setCode(code: string): this;
383
- setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
384
- setYear(value: number): this;
385
- setMonth(value: number): this;
386
- setDay(value: number): this;
387
- setHour(value: number): this;
388
- setMinute(value: number): this;
389
- setSecond(value: number): this;
390
- moveByYear(value: number): this;
391
- moveByMonth(value: number): this;
392
- moveByDay(value: number): this;
393
- moveByHour(value: number): this;
394
- moveByMinute(value: number): this;
395
- moveBySecond(value: number): this;
396
- moveMonthFirst(): this;
397
- moveMonthLast(): this;
398
- moveMonthNext(): this;
399
- moveMonthPrevious(): this;
400
- moveWeekdayFirst(): this;
401
- moveWeekdayLast(): this;
402
- moveWeekdayFirstByMonth(): this;
403
- moveWeekdayLastByMonth(): this;
404
- moveWeekdayNext(): this;
405
- moveWeekdayPrevious(): this;
406
- moveDayFirst(): this;
407
- moveDayLast(): this;
408
- moveDayNext(): this;
409
- moveDayPrevious(): this;
410
- clone(): Date;
411
- cloneClass(): Datetime;
412
- cloneMonthFirst(): Datetime;
413
- cloneMonthLast(): Datetime;
414
- cloneMonthNext(): Datetime;
415
- cloneMonthPrevious(): Datetime;
416
- cloneWeekdayFirst(): Datetime;
417
- cloneWeekdayLast(): Datetime;
418
- cloneWeekdayFirstByMonth(): Datetime;
419
- cloneWeekdayLastByMonth(): Datetime;
420
- cloneWeekdayNext(): Datetime;
421
- cloneWeekdayPrevious(): Datetime;
422
- cloneDayFirst(): Datetime;
423
- cloneDayLast(): Datetime;
424
- cloneDayNext(): Datetime;
425
- cloneDayPrevious(): Datetime;
484
+ export declare enum MetaTwitterCard {
485
+ summary = "summary",
486
+ summaryLargeImage = "summary_large_image",
487
+ app = "app",
488
+ player = "player",
489
+ product = "product",
490
+ gallery = "gallery",
491
+ photo = "photo",
492
+ leadGeneration = "lead_generation",
493
+ audio = "audio",
494
+ poll = "poll"
426
495
  }
427
- export type ErrorCenterGroup = string | undefined;
428
- export type ErrorCenterCauseItem<D = any> = {
429
- group?: ErrorCenterGroup;
430
- code: string;
431
- priority?: number;
432
- label?: string;
433
- message?: string;
434
- details?: D;
496
+ export type SearchItem = Record<string, any>;
497
+ export type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
498
+ export type SearchColumn<T extends SearchItem> = {
499
+ [K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K;
500
+ }[keyof T];
501
+ export type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
502
+ export type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
503
+ export type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
504
+ export type SearchFormatItem<T extends SearchItem, KT extends string[]> = {
505
+ [K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string;
506
+ } & {
507
+ searchActive?: boolean;
435
508
  };
436
- export type ErrorCenterCauseList = ErrorCenterCauseItem[];
437
- export type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;
438
- export type ErrorCenterHandlerItem = {
439
- group?: ErrorCenterGroup;
440
- handlers: ErrorCenterHandlerCallback[];
509
+ export type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
510
+ export type SearchListValue<T extends SearchItem> = T[] | undefined;
511
+ export type SearchOptions = {
512
+ limit?: number;
513
+ returnEverything?: boolean;
514
+ delay?: number;
515
+ findExactMatch?: boolean;
516
+ classSearchName?: string;
441
517
  };
442
- export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
443
- export declare class ErrorCenter {
444
- static getItem(): ErrorCenterInstance;
445
- static has(code: string, group?: string): boolean;
446
- static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
447
- static add(cause: ErrorCenterCauseItem): void;
448
- static addList(causes: ErrorCenterCauseList): void;
449
- static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
450
- static addHandlerList(handlers: ErrorCenterHandlerList): void;
451
- static addCallback(callback: ErrorCenterHandlerCallback): void;
452
- static on(cause: ErrorCenterCauseItem): void;
453
- }
454
- export declare class ErrorCenterHandler {
455
- constructor(handlers?: ErrorCenterHandlerList);
456
- has(group: ErrorCenterGroup): boolean;
457
- get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
458
- add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
459
- addList(handlers: ErrorCenterHandlerList): this;
460
- addCallback(callback: ErrorCenterHandlerCallback): this;
461
- on(cause: ErrorCenterCauseItem): this;
462
- }
463
- export declare class ErrorCenterInstance {
464
- constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
465
- has(code: string, group?: string): boolean;
466
- get(code: string, group?: string): ErrorCenterCauseItem | undefined;
467
- add(cause: ErrorCenterCauseItem): this;
468
- addList(causes: ErrorCenterCauseList): this;
469
- addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
470
- addHandlerList(handlers: ErrorCenterHandlerList): this;
471
- addCallback(callback: ErrorCenterHandlerCallback): this;
472
- on(cause: ErrorCenterCauseItem): this;
473
- }
474
- /**
475
- * Advanced wrapper for managing event listeners on DOM elements or the `window` object.
476
- * @example
477
- * ```typescript
478
- * const clickEvent = new EventItem('.btn', 'click', (e) => console.log('Clicked!'));
479
- * clickEvent.start();
480
- * ```
481
- */
482
- export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
483
- constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
484
- isActive(): boolean;
485
- getElement(): E | undefined;
486
- setElement(elementSelector?: ElementOrString<E>): this;
487
- setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
488
- setType(type: string | string[]): this;
489
- setListener(listener: EventListenerDetail<O, D>): this;
490
- setOptions(options?: EventOptions): this;
491
- setDetail(detail?: D): this;
492
- dispatch(detail?: D | undefined): this;
493
- start(): this;
494
- stop(): this;
495
- toggle(activity: boolean): this;
496
- reset(): this;
497
- }
498
- export declare enum FormattersType {
499
- currency = "currency",
500
- date = "date",
501
- name = "name",
502
- number = "number",
503
- plural = "plural",
504
- unit = "unit"
505
- }
506
- export type FormattersOptionsCurrency = {
507
- currencyPropName?: string;
508
- options?: string | Intl.NumberFormatOptions;
509
- numberOnly?: boolean;
518
+ export type SearchCacheItem<T extends SearchItem> = {
519
+ item: T;
520
+ value: string;
510
521
  };
511
- export type FormattersOptionsDate = {
512
- type?: GeoDate;
513
- options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions;
514
- hour24?: boolean;
522
+ export type SearchCache<T extends SearchItem> = SearchCacheItem<T>[];
523
+ export type HighlightMatchItem = {
524
+ text: string;
525
+ isMatch: boolean;
515
526
  };
516
- export type FormattersOptionsName = {
517
- lastPropName?: string;
518
- firstPropName?: string;
519
- surname?: string;
520
- short?: boolean;
527
+ export type SortDir = 'asc' | 'desc';
528
+ export type SortColumnItem = {
529
+ column?: string;
530
+ dir?: SortDir;
521
531
  };
522
- export type FormattersOptionsNumber = {
523
- options?: Intl.NumberFormatOptions;
532
+ export type SortFunction<T = any> = (a: T, b: T, column?: string, dir?: SortDir) => number;
533
+ export type TranslateConfig = {
534
+ url?: string;
535
+ propsName?: string;
536
+ readApi?: boolean;
524
537
  };
525
- export type FormattersOptionsPlural = {
526
- words: string;
527
- options?: Intl.PluralRulesOptions;
528
- optionsNumber?: Intl.NumberFormatOptions;
538
+ export type TranslateCode = string | string[];
539
+ export type TranslateList<T extends TranslateCode[]> = {
540
+ [K in T[number] as K extends readonly string[] ? K[0] : K]: string;
529
541
  };
530
- export type FormattersOptionsUnit = {
531
- unit: string | Intl.NumberFormatOptions;
542
+ export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
543
+ export type TranslateDataFileList = Record<string, string>;
544
+ export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
545
+ export type TranslateDataFile = Record<string, TranslateDataFileItem>;
546
+ export declare const TRANSLATE_GLOBAL_PREFIX = "global";
547
+ export declare const TRANSLATE_TIME_OUT = 160;
548
+ export type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
549
+ export type IconsConfig = {
550
+ url?: string;
551
+ list?: Record<string, IconsItem>;
532
552
  };
533
- export type FormattersOptionsInformation<Type extends FormattersType> = Type extends FormattersType.currency ? FormattersOptionsCurrency : Type extends FormattersType.date ? FormattersOptionsDate : Type extends FormattersType.name ? FormattersOptionsName : Type extends FormattersType.number ? FormattersOptionsNumber : Type extends FormattersType.plural ? FormattersOptionsPlural : Type extends FormattersType.unit ? FormattersOptionsUnit : Record<string, any>;
534
- export type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = {
535
- type?: Type;
536
- transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R;
537
- options?: FormattersOptionsInformation<Type>;
538
- };
539
- export type FormattersOptionsList = Record<string, FormattersOptionsItem>;
540
- export type FormattersListItem = Record<string, any>;
541
- export type FormattersList<Item extends FormattersListItem> = Item[];
542
- export type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
543
- export type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
544
- export type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
545
- export type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = {
546
- [K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string;
547
- };
548
- export type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
549
- export type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
550
- export type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
551
- export type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;
552
- export type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
553
- export type FormattersReturn<List extends FormattersListProp, Options extends FormattersOptionsList = FormattersOptionsList, Item extends FormattersItemProp<List> = FormattersItemProp<List>> = List extends any[] ? FormattersListColumns<Item, Options> : (FormattersListColumnItem<Item, Options> | undefined);
554
- export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
555
- constructor(options: Options, list?: List | undefined);
556
- is(): boolean;
557
- isArray(): this is this & {
558
- list: FormattersList<Item>;
559
- };
560
- length(): number;
561
- getList(): FormattersList<Item>;
562
- getOptions(): Options;
563
- setList(list?: List): this;
564
- to(): FormattersReturn<List, Options>;
565
- }
566
- export declare class Geo {
567
- static getObject(): GeoInstance;
568
- static get(): GeoItemFull;
569
- static getCountry(): string;
570
- static getLanguage(): string;
571
- static getStandard(): string;
572
- static getFirstDay(): string;
573
- static getLocation(): string;
574
- static getLocationCountry(): string;
575
- static getLocationLanguage(): string;
576
- static getItem(): GeoItemFull;
577
- static getList(): GeoItem[];
578
- static getByCode(code?: string): GeoItemFull;
579
- static getByCodeFull(code: string): GeoItem | undefined;
580
- static getByCountry(country: string): GeoItem | undefined;
581
- static getByLanguage(language: string): GeoItem | undefined;
582
- static getTimezone(): number;
583
- static getTimezoneFormat(): string;
584
- static find(code: string): GeoItemFull;
585
- static toStandard(item: GeoItem): string;
586
- static set(code: string, save?: boolean): void;
587
- static setTimezone(timezone: number): void;
588
- static setValueDefault(code?: string | (() => string)): void;
589
- }
590
- export declare const GEO_FLAG_ICON_NAME = "f";
591
- export declare class GeoFlag {
592
- static flags: Record<string, string>;
593
- constructor(code?: string);
594
- get(code?: string): GeoFlagItem | undefined;
595
- getLanguage(code?: string): GeoFlagItem | undefined;
596
- getCode(): string;
597
- getFlag(code?: string): string | undefined;
598
- getList(codes?: string[], sort?: boolean): GeoFlagItem[];
599
- getListLanguage(codes?: string[], sort?: boolean): GeoFlagItem[];
600
- getNational(codes?: string[], sort?: boolean): GeoFlagNational[];
601
- getNationalLanguage(codes?: string[], sort?: boolean): GeoFlagNational[];
602
- setCode(code: string): this;
603
- }
604
- export declare const UI_GEO_COOKIE_KEY = "ui-geo-code";
605
- export declare class GeoInstance {
606
- constructor();
607
- get(): GeoItemFull;
608
- getCountry(): string;
609
- getLanguage(): string;
610
- getStandard(): string;
611
- getFirstDay(): string;
612
- getLocation(): string;
613
- getLocationCountry(): string;
614
- getLocationLanguage(): string;
615
- getItem(): GeoItemFull;
616
- getList(): GeoItem[];
617
- getByCode(code?: string): GeoItemFull;
618
- getByCodeFull(code: string): GeoItem | undefined;
619
- getByCountry(country: string): GeoItem | undefined;
620
- getByLanguage(language: string): GeoItem | undefined;
621
- getTimezone(): number;
622
- getTimezoneFormat(): string;
623
- find(code: string): GeoItemFull;
624
- toStandard(item: GeoItem, language?: string): string;
625
- set(code: string, save?: boolean): void;
626
- setTimezone(timezone: number): void;
627
- setValueDefault(code?: string | (() => string)): void;
628
- }
629
- export declare class GeoIntl {
630
- static isItem(code?: string): boolean;
631
- static getLocation(code?: string): string;
632
- static getInstance(code?: string): GeoIntl;
633
- constructor(code?: string, errorCenter?: ErrorCenterInstance);
634
- getLocation(): string;
635
- getFirstDay(): string;
636
- display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
637
- languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
638
- countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
639
- fullName(last: string, first: string, surname?: string, short?: boolean): string;
640
- number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
641
- decimal(): string;
642
- currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
643
- currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
644
- unit(value: NumberOrString, unitOptions?: string | Intl.NumberFormatOptions): string;
645
- sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
646
- percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
647
- percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
648
- plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
649
- date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
650
- relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
651
- relativeLimit(value: NumberOrStringOrDate, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): string;
652
- relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
653
- month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
654
- months(style?: Intl.DateTimeFormatOptions['month']): ItemValue<number | undefined>[];
655
- weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
656
- weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
657
- time(value: NumberOrStringOrDate): string;
658
- sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
659
- }
660
- export declare class GeoPhone {
661
- static get(code: string): GeoPhoneValue | undefined;
662
- static getByPhone(phone: string): GeoPhoneMapInfo;
663
- static getByCode(code: string): GeoPhoneMap | undefined;
664
- static getList(): GeoPhoneValue[];
665
- static getMap(): Record<string, GeoPhoneMap>;
666
- static toMask(phone: string, masks?: string[]): string | undefined;
667
- static removeZero(phone: string): string;
668
- }
669
- export declare class GeoUnit {
670
- static getInstance(code?: string): GeoUnit;
671
- constructor(code?: string);
672
- getLocation(): string;
673
- millimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
674
- centimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
675
- meter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
676
- kilometer(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
677
- squareMeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
678
- hectare(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
679
- gram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
680
- kilogram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
681
- tonne(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
682
- milliliter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
683
- liter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
684
- celsius(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
685
- kilometerPerHour(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
686
- format(value: NumberOrString, unit: string, options?: Intl.NumberFormatOptions): string;
687
- }
688
- export declare class Global {
689
- static getItem(): Record<string, any>;
690
- static get<R = any>(name: string): R;
691
- static add(data: Record<string, any>): void;
692
- }
693
- export declare class Hash {
694
- static getItem(): HashInstance;
695
- static get<T>(name: string, defaultValue?: T | (() => T)): T;
696
- static set<T>(name: string, callback: T | (() => T)): void;
697
- static addWatch<T>(name: string, callback: (value: T) => void): void;
698
- static removeWatch<T>(name: string, callback: (value: T) => void): void;
699
- static reload(): void;
700
- }
701
- export declare class HashInstance extends UrlInstanceAbstract {}
702
- export type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
703
- export type IconsConfig = {
704
- url?: string;
705
- list?: Record<string, IconsItem>;
553
+ export type CookieSameSite = 'strict' | 'lax';
554
+ export type CookieOptions = {
555
+ age?: number;
556
+ sameSite?: CookieSameSite;
557
+ path?: string;
558
+ domain?: string;
559
+ secure?: boolean;
560
+ httpOnly?: boolean;
561
+ partitioned?: boolean;
562
+ arguments?: string[] | Record<string, string | number | boolean>;
706
563
  };
707
- export declare class Icons {
708
- static is(index: string): boolean;
709
- static get(index: string, url?: string, wait?: number): Promise<string>;
710
- static getAsync(index: string, url?: string): string;
711
- static getNameList(): string[];
712
- static getUrlGlobal(): string;
713
- static add(index: string, file: IconsItem): void;
714
- static addLoad(index: string): void;
715
- static addGlobal(index: string, file: string): void;
716
- static addByList(list: Record<string, IconsItem>): void;
717
- static setUrl(url: string): void;
718
- static setConfig(config: IconsConfig): void;
719
- }
720
- export declare class Loading {
721
- static is(): boolean;
722
- static get(): number;
723
- static getItem(): LoadingInstance;
724
- static show(): void;
725
- static hide(): void;
726
- static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
727
- static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
728
- }
729
564
  export type LoadingDetail = {
730
565
  loading: boolean;
731
566
  };
@@ -734,789 +569,1090 @@ export type LoadingRegistrationItem = {
734
569
  listener: EventListenerDetail<CustomEvent, LoadingDetail>;
735
570
  element?: ElementOrString<HTMLElement>;
736
571
  };
737
- export declare class LoadingInstance {
738
- constructor(eventName?: string);
739
- is(): boolean;
740
- get(): number;
741
- show(): void;
742
- hide(): void;
743
- registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
744
- unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
745
- }
746
- export declare class Meta extends MetaManager<MetaTag[]> {
747
- constructor();
748
- getOg(): MetaOg;
749
- getTwitter(): MetaTwitter;
750
- getTitle(): string;
751
- getKeywords(): string;
752
- getDescription(): string;
753
- getImage(): string;
754
- getCanonical(): string;
755
- getRobots(): MetaRobots;
756
- getAuthor(): string;
757
- getSiteName(): string;
758
- getLocale(): string;
759
- setTitle(title: string): this;
760
- setKeywords(keywords: string | string[]): this;
761
- setDescription(description: string): this;
762
- setImage(image: string): this;
763
- setCanonical(canonical: string): this;
764
- setRobots(robots: MetaRobots): this;
765
- setAuthor(author: string): this;
766
- setSiteName(siteName: string): this;
767
- setLocale(locale: string): this;
768
- setSuffix(suffix?: string): void;
769
- html(): string;
770
- htmlTitle(): string;
771
- }
772
- type MetaList<T extends readonly string[]> = {
773
- [K in T[number]]?: string;
572
+ export type ApiInstanceOptions = {
573
+ headersClass?: typeof ApiHeaders;
574
+ requestDefaultClass?: typeof ApiDefault;
575
+ statusClass?: typeof ApiStatus;
576
+ responseClass?: typeof ApiResponse;
577
+ preparationClass?: typeof ApiPreparation;
578
+ loadingClass?: LoadingInstance;
579
+ errorCenterClass?: ErrorCenterInstance;
580
+ hydrationClass?: typeof ApiHydration;
581
+ wrapper?: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>;
774
582
  };
775
- export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
776
- constructor(listMeta: T, isProperty?: boolean);
777
- getListMeta(): T;
778
- get(name: Key): string;
779
- getItems(): MetaList<T>;
780
- html(): string;
781
- set(name: Key, content: string): this;
782
- setByList(metaList: MetaList<T>): this;
783
- }
784
- export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
785
- constructor();
786
- getTitle(): string;
787
- getType(): MetaOpenGraphType;
788
- getUrl(): string;
789
- getImage(): string;
790
- getDescription(): string;
791
- getLocale(): string;
792
- getSiteName(): string;
793
- setTitle(title: string): this;
794
- setType(type: MetaOpenGraphType): this;
795
- setUrl(url: string): this;
796
- setImage(url: string): this;
797
- setDescription(description: string): this;
798
- setLocale(locale: string): this;
799
- setSiteName(siteName: string): this;
583
+ export declare const GEO_FLAG_ICON_NAME = "f";
584
+ export declare const UI_GEO_COOKIE_KEY = "ui-geo-code";
585
+ export declare const errorCauseList: ErrorCenterCauseList;
586
+ /**
587
+ * Utility for making HTTP requests.
588
+ */
589
+ export declare class Api {
590
+ static isLocalhost(): boolean;
591
+ static getItem(): ApiInstance;
592
+ static getStatus(): ApiStatus;
593
+ static getResponse(): ApiResponse;
594
+ static getHydration(): ApiHydration;
595
+ static getHydrationScript(): string;
596
+ static getOrigin(): string;
597
+ static getUrl(path: string, api?: boolean): string;
598
+ static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
599
+ static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
600
+ static setHeaders(headers: ApiHeadersValue): void;
601
+ static setRequestDefault(request: ApiDefaultValue): void;
602
+ static setUrl(url: string): void;
603
+ static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
604
+ static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
605
+ static setTimeout(timeout: number): void;
606
+ static setOrigin(origin: string): void;
607
+ static setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): void;
608
+ static setConfig(config?: ApiConfig): void;
609
+ static request<T>(pathRequest: string | ApiFetch): Promise<T>;
610
+ static get<T>(request: ApiFetch): Promise<T>;
611
+ static post<T>(request: ApiFetch): Promise<T>;
612
+ static put<T>(request: ApiFetch): Promise<T>;
613
+ static patch<T>(request: ApiFetch): Promise<T>;
614
+ static delete<T>(request: ApiFetch): Promise<T>;
800
615
  }
801
- export declare class MetaStatic {
802
- static getItem(): Meta;
803
- static getOg(): MetaOg;
804
- static getTwitter(): MetaTwitter;
805
- static getTitle(): string;
806
- static getKeywords(): string;
807
- static getDescription(): string;
808
- static getImage(): string;
809
- static getCanonical(): string;
810
- static getRobots(): MetaRobots;
811
- static getAuthor(): string;
812
- static getSiteName(): string;
813
- static getLocale(): string;
814
- static setTitle(title: string): typeof MetaStatic;
815
- static setKeywords(keywords: string | string[]): typeof MetaStatic;
816
- static setDescription(description: string): typeof MetaStatic;
817
- static setImage(image: string): typeof MetaStatic;
818
- static setCanonical(canonical: string): typeof MetaStatic;
819
- static setRobots(robots: MetaRobots): typeof MetaStatic;
820
- static setAuthor(author: string): typeof MetaStatic;
821
- static setSiteName(siteName: string): typeof MetaStatic;
822
- static setLocale(locale: string): typeof MetaStatic;
823
- static setSuffix(suffix?: string): typeof MetaStatic;
824
- static html(): string;
825
- static htmlTitle(): string;
616
+ /**
617
+ * Class for caching API responses.
618
+ */
619
+ export declare class ApiCache {
620
+ static init(getListener: (key: string) => Promise<ApiCacheItem | undefined>, setListener: (key: string, value: ApiCacheItem) => Promise<boolean>, removeListener: (key: string) => Promise<boolean>, cacheStepAgeClearOld?: number): void;
621
+ static reset(): void;
622
+ static get<T>(key: string): Promise<T | undefined>;
623
+ static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
624
+ static set<T>(key: string, value: T, age?: number): Promise<void>;
625
+ static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
626
+ static remove(key: string): Promise<void>;
826
627
  }
827
- export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
828
- constructor();
829
- getCard(): MetaTwitterCard;
830
- getSite(): string;
831
- getCreator(): string;
832
- getUrl(): string;
833
- getTitle(): string;
834
- getDescription(): string;
835
- getImage(): string;
836
- setCard(card: MetaTwitterCard): this;
837
- setSite(site: string): this;
838
- setCreator(creator: string): this;
839
- setUrl(url: string): this;
840
- setTitle(title: string): this;
841
- setDescription(description: string): this;
842
- setImage(image: string): this;
628
+ /**
629
+ * Class for handling and processing data returned from an API request.
630
+ */
631
+ export declare class ApiDataReturn<T = any> {
632
+ constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd, error?: ApiErrorItem | undefined);
633
+ init(): Promise<this>;
634
+ get(): ApiData<T>;
635
+ getAndStatus(status: ApiStatus): ApiData<T>;
636
+ getData(): ApiData<T> | undefined;
843
637
  }
844
- export declare class Query {
845
- static getItem(): QueryInstance;
846
- static get<T>(name: string, defaultValue?: T | (() => T)): T;
847
- static set<T>(name: string, callback: T | (() => T)): void;
848
- static addWatch<T>(name: string, callback: (value: T) => void): void;
849
- static removeWatch<T>(name: string, callback: (value: T) => void): void;
850
- static reload(): void;
638
+ /**
639
+ * Class for working with default API request data.
640
+ */
641
+ export declare class ApiDefault {
642
+ is(): boolean;
643
+ get(): Record<string, any> | undefined;
644
+ request(request: ApiFetch['request']): ApiFetch['request'];
645
+ set(request: ApiDefaultValue): this;
851
646
  }
852
- export declare class QueryInstance extends UrlInstanceAbstract {}
853
- export declare class ResumableTimer {
854
- constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
855
- resume(): this;
856
- pause(): this;
857
- reset(): this;
858
- clear(): this;
647
+ /**
648
+ * Utility class for managing the API error storage and creating error items.
649
+ */
650
+ export declare class ApiError {
651
+ static getStorage(): ApiErrorStorage;
652
+ static add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): void;
653
+ static getItem(method: ApiMethodItem, response: Response): Promise<ApiErrorItem>;
859
654
  }
860
- export declare class ScrollbarWidth {
861
- static is(): Promise<boolean>;
862
- static get(): Promise<number>;
863
- static getStorage(): DataStorage<number>;
864
- static getCalculate(): boolean;
655
+ /**
656
+ * Class for managing and extracting data from an API error response.
657
+ */
658
+ export declare class ApiErrorItem {
659
+ constructor(method: ApiMethodItem, response: Response, error: ApiErrorStorageItem);
660
+ getMethod(): ApiMethodItem;
661
+ getResponse(): Response;
662
+ getError(): ApiErrorStorageItem;
663
+ getCode(): string | undefined;
664
+ getMessage(): string | undefined;
665
+ getStatus(): number;
865
666
  }
866
- export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
867
- constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
868
- getData(): SearchListData<T, K>;
869
- getList(): SearchListValue<T>;
870
- getColumns(): K | undefined;
871
- getItem(): SearchListItem;
872
- getValue(): string | undefined;
873
- getOptions(): SearchListOptions;
874
- setList(list: SearchListValue<T>): this;
875
- setColumns(columns?: K): this;
876
- setValue(value?: string): this;
877
- setOptions(options: SearchOptions): this;
878
- to(): SearchFormatList<T, K>;
667
+ /**
668
+ * Manager for handling and identifying API error states.
669
+ */
670
+ export declare class ApiErrorStorage {
671
+ find(method: ApiMethodItem, response: Response): Promise<ApiErrorStorageItem>;
672
+ add(item: Partial<ApiErrorStorageItem> | Partial<ApiErrorStorageItem>[], url?: string | RegExp, method?: ApiMethodItem): this;
879
673
  }
880
- export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
881
- constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
882
- is(): this is this & {
883
- list: T[];
884
- columns: string[];
885
- };
886
- isList(): this is this & {
887
- list: T[];
888
- };
889
- getList(): SearchListValue<T>;
890
- getColumns(): K | undefined;
891
- setList(list: SearchListValue<T>): this;
892
- setColumns(columns?: SearchColumns<T>): this;
893
- findCacheItem(item: T): SearchCacheItem<T> | undefined;
894
- forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
895
- toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
674
+ /**
675
+ * Class for managing HTTP request headers.
676
+ */
677
+ export declare class ApiHeaders {
678
+ get(value?: Record<string, string> | null, type?: string | undefined | null): Record<string, string> | undefined;
679
+ getByRequest(request: ApiFetch['request'], value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
680
+ set(headers: ApiHeadersValue): this;
896
681
  }
897
- export declare class SearchListItem {
898
- constructor(value: string | undefined, options: SearchListOptions);
899
- is(): this is this & {
900
- value: string;
901
- };
902
- isSearch(): boolean;
903
- get(): string;
904
- set(value?: string): this;
682
+ /**
683
+ * Class for collecting API data for hydration on the client side during SSR.
684
+ */
685
+ export declare class ApiHydration {
686
+ initResponse(response: ApiResponse): void;
687
+ toClient<T>(apiFetch: ApiFetch, response: T): void;
688
+ toString(): string;
905
689
  }
906
- export declare class SearchListMatcher {
907
- constructor(item: SearchListItem, options: SearchListOptions);
908
- is(): boolean;
909
- isSelection(value: SearchCacheItem<any>['value']): boolean;
910
- get(): RegExp | undefined;
911
- update(): void;
690
+ /**
691
+ * Core class for managing HTTP requests using the Fetch API.
692
+ */
693
+ export declare class ApiInstance {
694
+ constructor(url?: string, options?: ApiInstanceOptions);
695
+ isLocalhost(): boolean;
696
+ getStatus(): ApiStatus;
697
+ getResponse(): ApiResponse;
698
+ getHydration(): ApiHydration;
699
+ getOrigin(): string;
700
+ getUrl(path: string, api?: boolean): string;
701
+ getBody(request?: ApiFetch['request'], method?: ApiMethod): string | FormData | undefined;
702
+ getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethod): string;
703
+ getHydrationScript(): string;
704
+ setHeaders(headers: ApiHeadersValue): this;
705
+ setRequestDefault(request: ApiDefaultValue): this;
706
+ setUrl(url: string): this;
707
+ setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
708
+ setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
709
+ setTimeout(timeout: number): this;
710
+ setOrigin(origin: string): this;
711
+ setWrapper(wrapper: <R>(callback: () => Promise<R>, apiFetch: ApiFetch) => Promise<R>): this;
712
+ request<T>(pathRequest: string | ApiFetch): Promise<T>;
713
+ get<T>(request: ApiFetch): Promise<T>;
714
+ post<T>(request: ApiFetch): Promise<T>;
715
+ put<T>(request: ApiFetch): Promise<T>;
716
+ patch<T>(request: ApiFetch): Promise<T>;
717
+ delete<T>(request: ApiFetch): Promise<T>;
912
718
  }
913
- export declare class SearchListOptions {
914
- constructor(options?: SearchOptions | undefined);
915
- getOptions(): SearchOptions;
916
- getLimit(): number;
917
- getReturnEverything(): boolean;
918
- getDelay(): number;
919
- getFindExactMatch(): boolean;
920
- getClassName(): string;
921
- setOptions(options: SearchOptions): this;
719
+ /**
720
+ * Class for preparing requests before and after execution.
721
+ */
722
+ export declare class ApiPreparation {
723
+ make(active: boolean, apiFetch: ApiFetch): Promise<void>;
724
+ makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
725
+ set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
726
+ setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
922
727
  }
923
- export declare class ServerStorage {
924
- static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
925
- static reset(): void;
926
- static has(key: string): boolean;
927
- static get<T = any>(key: string, defaultValue?: () => T, hydration?: boolean): T;
928
- static set<T = any>(key: string, value: () => T, hydration?: boolean, storageList?: Record<string, any>): T;
929
- static setErrorStatus(hide: boolean): void;
930
- static remove(key: string): void;
931
- static toString(): string;
728
+ /**
729
+ * Class for working with API responses.
730
+ */
731
+ export declare class ApiResponse {
732
+ constructor(requestDefault: ApiDefault);
733
+ get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
734
+ getList(): (ApiResponseItem & Record<string, any>)[];
735
+ add(response: ApiResponseItem | ApiResponseItem[]): this;
736
+ setDevMode(devMode: boolean): this;
737
+ emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
738
+ emulatorAsync<T>(apiFetch: ApiFetch): T | undefined;
932
739
  }
933
- export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
934
- static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
935
- constructor(name: string, group?: string);
936
- isLoading(): boolean;
937
- getName(): string;
938
- getLoading(): boolean;
939
- addCallback(callback: Callback, isOnce?: boolean): this;
940
- removeCallback(callback: Callback): this;
941
- preparation(): this;
942
- run(value: T): Promise<this>;
740
+ /**
741
+ * Class for managing API request status.
742
+ */
743
+ export declare class ApiStatus {
744
+ get(): ApiStatusItem | undefined;
745
+ getStatus(): number | undefined;
746
+ getStatusText(): string | undefined;
747
+ getStatusType(): ApiStatusType | undefined;
748
+ getCode(): string | undefined;
749
+ getError(): string | undefined;
750
+ getResponse<T>(): T | undefined;
751
+ getMessage(): string;
752
+ set(data: ApiStatusItem): this;
753
+ setStatus(status?: number, statusText?: string): this;
754
+ setError(error?: string): this;
755
+ setLastResponse(response?: any): this;
756
+ setLastStatus(status?: ApiStatusType): this;
757
+ setLastCode(code?: string): this;
758
+ setLastMessage(message?: string): this;
943
759
  }
944
- export declare class Translate {
945
- static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
946
- static getItem(): TranslateInstance;
947
- static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
948
- static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
949
- static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
950
- static add(names: string | string[]): Promise<void>;
951
- static addSync(data: Record<string, string>): void;
952
- static addNormalOrSync(data: Record<string, string>): Promise<void>;
953
- static addSyncByLocation(data: Record<string, Record<string, string>>): void;
954
- static addSyncByFile(data: TranslateDataFile): void;
955
- static setUrl(url: string): void;
956
- static setPropsName(name: string): void;
957
- static setReadApi(value: boolean): void;
958
- static setConfig(config: TranslateConfig): void;
760
+ /**
761
+ * Class for working with BroadcastChannel messages.
762
+ */
763
+ export declare class BroadcastMessage<Message = any> {
764
+ constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
765
+ getChannel(): BroadcastChannel | undefined;
766
+ post(message: Message): this;
767
+ setCallback(callback: (event: MessageEvent<Message>) => void): this;
768
+ setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
769
+ destroy(): this;
959
770
  }
960
- export declare class TranslateFile {
961
- constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
962
- isFile(): boolean;
963
- getLocation(): string;
964
- getLanguage(): string;
965
- getList(): Promise<TranslateDataFileList | undefined>;
966
- add(data: TranslateDataFile): void;
771
+ /**
772
+ * Simple in-memory cache class that stores computed values by key.
773
+ * @deprecated
774
+ */
775
+ export declare class Cache {
776
+ get<T>(name: string, callback: () => T, comparison?: any[]): T;
777
+ getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
967
778
  }
968
- export declare class TranslateInstance {
969
- constructor(url?: string, propsName?: string, files?: TranslateFile);
970
- get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
971
- getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
972
- getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
973
- getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
974
- add(names: string | string[]): Promise<void>;
975
- addSync(data: Record<string, string>): void;
976
- addNormalOrSync(data: Record<string, string>): Promise<void>;
977
- addSyncByLocation(data: Record<string, Record<string, string>>): void;
978
- addSyncByFile(data: TranslateDataFile): void;
979
- setUrl(url: string): this;
980
- setPropsName(propsName: string): this;
981
- setReadApi(value: boolean): this;
779
+ /**
780
+ * Class for managing a single cached value with dependency tracking.
781
+ * @deprecated
782
+ */
783
+ export declare class CacheItem<T> {
784
+ constructor(callback: () => T);
785
+ getCache(comparison: any[]): T;
786
+ getCacheOld(): T | undefined;
787
+ getCacheAsync(comparison: any[]): Promise<T>;
982
788
  }
983
- export declare abstract class UrlInstanceAbstract {
984
- get<T>(name: string, defaultValue?: T | (() => T)): T;
985
- set<T>(name: string, callback: T | (() => T)): this;
986
- addWatch<T>(name: string, callback: (value: T) => void): this;
987
- removeWatch<T>(name: string, callback: (value: T) => void): this;
988
- reload(): this;
789
+ /**
790
+ * Static cache class that uses ServerStorage for persistent caching across the application.
791
+ * @deprecated
792
+ */
793
+ export declare class CacheStatic {
794
+ static get<T>(name: string, callback: () => T, comparison?: any[]): T;
795
+ static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
989
796
  }
990
- export declare class UrlItem {
991
- static getInstance(): UrlItem;
992
- constructor(url?: string | URL);
993
- get href(): string;
994
- get protocol(): string;
995
- get username(): string;
996
- get password(): string;
997
- get host(): string;
998
- get hostname(): string;
999
- get port(): string;
1000
- get pathname(): string;
1001
- get search(): string;
1002
- get searchParams(): URLSearchParams;
1003
- get hash(): string;
1004
- get origin(): string;
1005
- hasParam(name: string): boolean;
1006
- getParam(name: string): string | undefined;
1007
- getParams(): Record<string, any>;
1008
- set(url?: string | URL): this;
1009
- setParam(name: string, value: string): this;
1010
- setParams(params: Record<string, any>): this;
1011
- deleteParam(name: string): this;
1012
- toString(): string;
1013
- toJSON(): string;
797
+ /**
798
+ * Class for managing browser cookies.
799
+ */
800
+ export declare class Cookie<T> {
801
+ static getInstance<T>(name: string): Cookie<T>;
802
+ constructor(name: string);
803
+ get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
804
+ set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
805
+ remove(): void;
1014
806
  }
1015
- export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
1016
- export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
1017
- export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
1018
- export declare function arrFill<T>(value: T, count: number): T[];
1019
- export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
1020
- export declare function capitalize(value: string, isLocale?: boolean): string;
1021
- export declare function copyObject<T>(value: T): T;
1022
- export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
1023
807
  /**
1024
- * @remarks
1025
- * When running on the server, the function always returns `undefined`.
1026
- * If you use it within a component's rendering logic, it may lead to hydration mismatches.
1027
- * It is recommended to call this function only inside lifecycle hooks that run exclusively on the client (e.g., `onMounted` in Vue or `useEffect` in React).
808
+ * Class for changing cookie access status.
1028
809
  */
1029
- export declare function createElement<T extends HTMLElement>(parentElement?: HTMLElement, tagName?: string, options?: Partial<T> | Record<keyof T, T[keyof T]> | ((element: T) => void), referenceElement?: HTMLElement): T | undefined;
1030
- export declare function domContentLoaded<T = void>(callback: () => T | Promise<T>): Promise<T>;
1031
- export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
1032
- export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
1033
- export declare function encodeAttribute(text: string): string;
1034
- export declare function encodeLiteAttribute(text: string): string;
1035
- export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
1036
- export declare function escapeExp(value: string): string;
1037
- export declare function eventStopPropagation(event: Event): void;
1038
- export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
1039
- export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
1040
- export declare function forEach<T, R, D extends T[] | Record<string, T> | Map<string, T> | Set<T> = T[] | Record<string, T> | Map<string, T> | Set<T>, K = D extends T[] ? number : string>(data: D & (T[] | Record<string, T> | Map<string, T> | Set<T>), callback: (item: T, key: K, dataMain: typeof data) => R, saveUndefined?: boolean): R[];
1041
- export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
1042
- export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
1043
- export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
1044
- export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
1045
- export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
810
+ export declare class CookieBlock {
811
+ static getItem(): CookieBlockInstance;
812
+ static get(): boolean;
813
+ static set(value: boolean): void;
814
+ }
1046
815
  /**
1047
- * @remarks
1048
- * Using this function for rendering in SSR may lead to hydration mismatches
1049
- * because the time or time zone on the server may differ from the time on the client.
1050
- * It is recommended to use this function inside client-side hooks only (e.g., `onMounted` in Vue or `useEffect` in React).
816
+ * Class for changing cookie access status instance.
1051
817
  */
1052
- export declare function getCurrentDate(format?: GeoDate): string;
818
+ export declare class CookieBlockInstance {
819
+ get(): boolean;
820
+ set(value: boolean): void;
821
+ }
1053
822
  /**
1054
- * @remarks
1055
- * **Warning (SSR):** Using this function for rendering in SSR will almost certainly lead to hydration mismatches
1056
- * because the timestamp on the server will differ from the timestamp on the client.
823
+ * Class for managing cookie storage with support for custom listeners.
1057
824
  */
1058
- export declare function getCurrentTime(): number;
1059
- export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
825
+ export declare class CookieStorage {
826
+ static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
827
+ static reset(): void;
828
+ static get<T>(name: string, defaultValue?: T | (() => T)): T | undefined;
829
+ static set<T>(name: string, value: T | (() => T), options?: CookieOptions): T;
830
+ static remove(name: string): void;
831
+ static update(): void;
832
+ }
1060
833
  /**
1061
- * @example
1062
- * ```typescript
1063
- * import { useId } from 'vue'
1064
- * import { initGetElementId } from '@dxtmisha/functional-basic'
1065
- *
1066
- * initGetElementId(() => useId())
1067
- * ```
834
+ * Class for working with localStorage and sessionStorage.
1068
835
  */
1069
- export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
1070
- export declare function initGetElementId(newListener: () => string | number): void;
1071
- export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
1072
- export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
1073
- export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
1074
- export declare function getElementSafeScript(id: string, data: any): string;
1075
- export declare function getExactSearchExp(search: string): RegExp;
1076
- export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
1077
- export declare function getFirst<T>(value: T | T[] | Record<string, T>): T | undefined;
1078
- export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
1079
- export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
1080
- export declare function getKey(event: KeyboardEvent): string | number | undefined;
1081
- export declare function getLast<T>(value: T | T[] | Record<string, T>): T | undefined;
1082
- export declare function getLength(value: any): number;
1083
- export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
1084
- export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
1085
- export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
1086
- export declare function getMouseClient(event: MouseEvent & TouchEvent): ImageCoordinator;
1087
- export declare function getMouseClientX(event: MouseEvent & TouchEvent): number;
1088
- export declare function getMouseClientY(event: MouseEvent & TouchEvent): number;
1089
- export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
1090
- export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
1091
- export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
1092
- export declare function getOnlyText(text: any): string;
1093
- export declare function getRandomItem<T>(value?: T | T[] | Record<string, T>): T | undefined;
1094
- export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
1095
- export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
1096
- export declare function getSearchExp(search: string, limit?: number): RegExp;
1097
- export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
1098
- export declare function getStepPercent(min: number | undefined, max: number): number;
1099
- export declare function getStepValue(min: number | undefined, max: number): number;
1100
- export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
1101
- export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
1102
- export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
1103
- export declare function handleShare(data: ShareData): Promise<boolean>;
1104
- export declare function inArray<T>(array: T[], value: T): boolean;
1105
- export declare function initScrollbarOffset(): Promise<void>;
1106
- export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
1107
- export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
1108
- export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
1109
- export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
1110
- export declare function isDomData(): boolean;
1111
- export declare function isDomRuntime(): boolean;
1112
- export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
1113
- export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
1114
- export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
1115
- export declare function isFloat(value: any): boolean;
1116
- export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
1117
- export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
1118
- export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
1119
- export declare function isIntegerBetween(value: number, between: number): boolean;
1120
- export declare const isMetaKey: (event: KeyboardEvent) => boolean;
1121
- export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
1122
- export declare function isNumber(value: any): boolean;
1123
- export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
1124
- export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
1125
- export declare function isOnLine(): boolean;
1126
- export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
1127
- export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
1128
- export declare function isShare(): boolean;
1129
- export declare function isString<T>(value: T): value is Extract<T, string>;
1130
- export declare const isTab: (event: KeyboardEvent) => boolean;
1131
- export declare function isWindow<E>(element: E): element is Extract<E, Window>;
1132
- export declare function random(min: number, max: number): number;
1133
- export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
1134
- export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
1135
- export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
1136
- export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
1137
- export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: 'auto' | 'width' | 'height', typeData?: string): string | undefined;
1138
- export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
1139
- export declare function setElementItem<E extends ElementOrWindow, K extends keyof E, V extends E[K] = E[K]>(element: ElementOrString<E>, index: K, value: V | Record<string, V>): E | undefined;
1140
- export declare function setValues<T>(selected: T | T[] | undefined, value: any, options: {
1141
- multiple?: boolean;
1142
- maxlength?: number;
1143
- alwaysChange?: boolean;
1144
- notEmpty?: boolean;
1145
- }): T | T[] | undefined;
1146
- export declare function sleep(ms: number): Promise<void>;
1147
- export declare function sortList<T = any>(list: T[], sortColumns: SortColumnItem[], customSort?: SortFunction<T>): T[];
1148
- export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
1149
- export declare function strFill(value: string, count: number): string;
1150
- export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
1151
- export declare function toArray<T>(value: T): T extends any[] ? T : [T];
1152
- export declare function toCamelCase(value: string): string;
1153
- export declare function toCamelCaseFirst(value: string): string;
1154
- export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
1155
- export declare function toKebabCase(value: string): string;
836
+ export declare class DataStorage<T> {
837
+ static setPrefix(newPrefix: string): void;
838
+ constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
839
+ get(defaultValue?: T | (() => T), cache?: number): T | undefined;
840
+ set(value?: T | (() => T)): T | undefined;
841
+ remove(): this;
842
+ update(): this;
843
+ }
1156
844
  /**
1157
- * @example
1158
- * toNumber("1 234,56") // 1234.56
1159
- * toNumber("1,234.56") // 1234.56
1160
- * toNumber("1,234") // 1.234
845
+ * Class for date manipulation and formatting.
1161
846
  */
1162
- export declare function toNumber(value?: NumberOrString): number;
1163
- export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
1164
- export declare function toNumberPositive(value?: number | string | null, defaultValue?: number): number;
1165
- export declare function toPercent(maxValue: number, value: number): number;
1166
- export declare function toPercentBy100(maxValue: number, value: number): number;
1167
- export declare function toString<T>(value: T): string;
1168
- export declare function transformation(value: any, isFunction?: boolean): any;
1169
- export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
1170
- export declare function uniqueArray<T>(value: T[]): T[];
1171
- export declare function writeClipboardData(text: string): Promise<void>;
1172
- export declare const errorCauseList: ErrorCenterCauseList;
1173
- export type Undefined = undefined | null;
1174
- export type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';
1175
- export type NumberOrString = number | string;
1176
- export type NumberOrStringOrBoolean = number | string | boolean;
1177
- export type NumberOrStringOrDate = NumberOrString | Date;
1178
- export type NormalOrArray<T = NumberOrString> = T | T[];
1179
- export type NormalOrPromise<T> = T | Promise<T>;
1180
- export type ObjectItem<T = any> = Record<string, T>;
1181
- export type ObjectOrArray<T = any> = T[] | ObjectItem<T>;
1182
- export type ArrayToItem<T> = T extends any[] ? T[number] : T;
1183
- export type FunctionReturn<R = any> = () => R;
1184
- export type FunctionVoid = () => void;
1185
- export type FunctionArgs<T, R> = (...args: T[]) => R;
1186
- export type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
1187
- export type ItemList<T = any> = Record<string, T>;
1188
- export type Item<V> = {
1189
- index: string;
1190
- value: V;
1191
- };
1192
- export type ItemValue<V> = {
1193
- label: string;
1194
- value: V;
1195
- };
1196
- export type ItemName<V> = {
1197
- name: string | number;
1198
- value: V;
1199
- };
1200
- export type ElementOrWindow = HTMLElement | Window;
1201
- export type ElementOrString<E extends ElementOrWindow> = E | string;
1202
- export type EventOptions = AddEventListenerOptions | boolean | undefined;
1203
- export type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;
1204
- export type EventActivityItem<E extends ElementOrWindow> = {
1205
- element: E | undefined;
1206
- type: string;
1207
- listener?: (event: any | Event) => void;
1208
- observer?: ResizeObserver;
1209
- };
1210
- export type ImageCoordinator = {
1211
- x: number;
1212
- y: number;
1213
- };
1214
- export type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
1215
- export type GeoFirstDay = 1 | 6 | 0;
1216
- export type GeoHours = '12' | '24';
1217
- export type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';
1218
- export interface GeoItem {
1219
- country: string;
1220
- countryAlternative?: string[];
1221
- language: string;
1222
- languageAlternative?: string[];
1223
- firstDay?: string | null;
1224
- zone?: string | null;
1225
- phoneCode?: string;
1226
- phoneWithin?: string;
1227
- phoneMask?: string | string[];
1228
- nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
1229
- unit?: {
1230
- 'millimeter'?: string;
1231
- 'centimeter'?: string;
1232
- 'meter'?: string;
1233
- 'kilometer'?: string;
1234
- 'square-meter'?: string;
1235
- 'hectare'?: string;
1236
- 'gram'?: string;
1237
- 'kilogram'?: string;
1238
- 'tonne'?: string;
1239
- 'milliliter'?: string;
1240
- 'liter'?: string;
1241
- 'celsius'?: string;
1242
- 'kilometer-per-hour'?: string;
1243
- };
847
+ export declare class Datetime {
848
+ constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
849
+ getIntl(): GeoIntl;
850
+ getDate(): Date;
851
+ getType(): GeoDate;
852
+ getHoursType(): GeoHours;
853
+ getHour24(): boolean;
854
+ getTimeZoneOffset(): number;
855
+ getTimeZone(style?: GeoTimeZoneStyle): string;
856
+ getFirstDayCode(): GeoFirstDay;
857
+ getYear(): number;
858
+ getMonth(): number;
859
+ getDay(): number;
860
+ getHour(): number;
861
+ getMinute(): number;
862
+ getSecond(): number;
863
+ getMaxDay(): number;
864
+ locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
865
+ localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
866
+ localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
867
+ localeDay(style?: Intl.DateTimeFormatOptions['day']): string;
868
+ localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
869
+ localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
870
+ localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
871
+ standard(timeZone?: boolean): string;
872
+ setDate(value: NumberOrStringOrDate): this;
873
+ setType(value: GeoDate): this;
874
+ setHour24(value: boolean): this;
875
+ setCode(code: string): this;
876
+ setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
877
+ setYear(value: number): this;
878
+ setMonth(value: number): this;
879
+ setDay(value: number): this;
880
+ setHour(value: number): this;
881
+ setMinute(value: number): this;
882
+ setSecond(value: number): this;
883
+ moveByYear(value: number): this;
884
+ moveByMonth(value: number): this;
885
+ moveByDay(value: number): this;
886
+ moveByHour(value: number): this;
887
+ moveByMinute(value: number): this;
888
+ moveBySecond(value: number): this;
889
+ moveMonthFirst(): this;
890
+ moveMonthLast(): this;
891
+ moveMonthNext(): this;
892
+ moveMonthPrevious(): this;
893
+ moveWeekdayFirst(): this;
894
+ moveWeekdayLast(): this;
895
+ moveWeekdayFirstByMonth(): this;
896
+ moveWeekdayLastByMonth(): this;
897
+ moveWeekdayNext(): this;
898
+ moveWeekdayPrevious(): this;
899
+ moveDayFirst(): this;
900
+ moveDayLast(): this;
901
+ moveDayNext(): this;
902
+ moveDayPrevious(): this;
903
+ clone(): Date;
904
+ cloneClass(): Datetime;
905
+ cloneMonthFirst(): Datetime;
906
+ cloneMonthLast(): Datetime;
907
+ cloneMonthNext(): Datetime;
908
+ cloneMonthPrevious(): Datetime;
909
+ cloneWeekdayFirst(): Datetime;
910
+ cloneWeekdayLast(): Datetime;
911
+ cloneWeekdayFirstByMonth(): Datetime;
912
+ cloneWeekdayLastByMonth(): Datetime;
913
+ cloneWeekdayNext(): Datetime;
914
+ cloneWeekdayPrevious(): Datetime;
915
+ cloneDayFirst(): Datetime;
916
+ cloneDayLast(): Datetime;
917
+ cloneDayNext(): Datetime;
918
+ cloneDayPrevious(): Datetime;
1244
919
  }
1245
- export interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
1246
- standard: string;
1247
- firstDay: string;
1248
- location: string;
1249
- locationCountry: string;
1250
- locationLanguage: string;
920
+ /**
921
+ * Class for managing application error handling globally.
922
+ */
923
+ export declare class ErrorCenter {
924
+ static getItem(): ErrorCenterInstance;
925
+ static has(code: string, group?: string): boolean;
926
+ static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
927
+ static add(cause: ErrorCenterCauseItem): void;
928
+ static addList(causes: ErrorCenterCauseList): void;
929
+ static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
930
+ static addHandlerList(handlers: ErrorCenterHandlerList): void;
931
+ static addCallback(callback: ErrorCenterHandlerCallback): void;
932
+ static setIsConsole(isConsole: ErrorCenterHandlerIsConsole): void;
933
+ static on(cause: ErrorCenterCauseItem): void;
1251
934
  }
1252
- export interface GeoFlagItem {
1253
- language: string;
1254
- languageCode: string;
1255
- country: string;
1256
- countryCode: string;
1257
- standard: string;
1258
- icon?: string;
1259
- label: string;
1260
- value: string;
1261
- phoneCode?: string;
935
+ /**
936
+ * Class for managing and triggering error handlers.
937
+ */
938
+ export declare class ErrorCenterHandler {
939
+ constructor(handlers?: ErrorCenterHandlerList, isConsole?: ErrorCenterHandlerIsConsole);
940
+ has(group: ErrorCenterGroup): boolean;
941
+ get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
942
+ add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
943
+ addList(handlers: ErrorCenterHandlerList): this;
944
+ addCallback(callback: ErrorCenterHandlerCallback): this;
945
+ setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
946
+ on(cause: ErrorCenterCauseItem): this;
1262
947
  }
1263
- export interface GeoFlagNational extends GeoFlagItem {
1264
- description: string;
1265
- nationalLanguage: string;
1266
- nationalCountry: string;
948
+ /**
949
+ * Class for managing error storage and handling within an instance.
950
+ */
951
+ export declare class ErrorCenterInstance {
952
+ constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
953
+ has(code: string, group?: string): boolean;
954
+ get(code: string, group?: string): ErrorCenterCauseItem | undefined;
955
+ add(cause: ErrorCenterCauseItem): this;
956
+ addList(causes: ErrorCenterCauseList): this;
957
+ addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
958
+ addHandlerList(handlers: ErrorCenterHandlerList): this;
959
+ addCallback(callback: ErrorCenterHandlerCallback): this;
960
+ setIsConsole(isConsole: ErrorCenterHandlerIsConsole): this;
961
+ on(cause: ErrorCenterCauseItem): this;
1267
962
  }
1268
- export interface GeoPhoneValue {
1269
- phone: number;
1270
- within: number;
1271
- mask: string[];
1272
- value: string;
963
+ /**
964
+ * Wrapper for managing DOM or window event listeners.
965
+ */
966
+ export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
967
+ constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
968
+ isActive(): boolean;
969
+ getElement(): E | undefined;
970
+ setElement(elementSelector?: ElementOrString<E>): this;
971
+ setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
972
+ setType(type: string | string[]): this;
973
+ setListener(listener: EventListenerDetail<O, D>): this;
974
+ setOptions(options?: EventOptions): this;
975
+ setDetail(detail?: D): this;
976
+ dispatch(detail?: D | undefined): this;
977
+ start(): this;
978
+ stop(): this;
979
+ toggle(activity: boolean): this;
980
+ reset(): this;
1273
981
  }
1274
- export interface GeoPhoneMap {
1275
- items: GeoPhoneValue[];
1276
- info: GeoPhoneValue | undefined;
1277
- value: string | undefined;
1278
- mask: string[];
1279
- maskFull: string[];
1280
- next: Record<string, GeoPhoneMap>;
1281
- }
1282
- export interface GeoPhoneMapInfo {
1283
- item?: GeoPhoneMap;
1284
- phone?: string;
1285
- }
1286
- export declare enum MetaTag {
1287
- title = "title",
1288
- description = "description",
1289
- keywords = "keywords",
1290
- canonical = "canonical",
1291
- robots = "robots",
1292
- author = "author"
982
+ /**
983
+ * Class for formatting a list of data based on provided options.
984
+ */
985
+ export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
986
+ constructor(options: Options, list?: List | undefined);
987
+ is(): boolean;
988
+ isArray(): this is this & {
989
+ list: FormattersList<Item>;
990
+ };
991
+ length(): number;
992
+ getList(): FormattersList<Item>;
993
+ getOptions(): Options;
994
+ setList(list?: List): this;
995
+ to(): FormattersReturn<List, Options>;
1293
996
  }
1294
- export declare enum MetaRobots {
1295
- indexFollow = "index, follow",
1296
- noIndexFollow = "noindex, follow",
1297
- indexNoFollow = "index, nofollow",
1298
- noIndexNoFollow = "noindex, nofollow",
1299
- noArchive = "noarchive",
1300
- noSnippet = "nosnippet",
1301
- noImageIndex = "noimageindex",
1302
- images = "images",
1303
- noTranslate = "notranslate",
1304
- noPreview = "nopreview",
1305
- textOnly = "textonly",
1306
- noIndexSubpages = "noindex, noarchive",
1307
- none = "none"
997
+ /**
998
+ * Static class for working with geographical data.
999
+ */
1000
+ export declare class Geo {
1001
+ static getObject(): GeoInstance;
1002
+ static get(): GeoItemFull;
1003
+ static getCountry(): string;
1004
+ static getLanguage(): string;
1005
+ static getStandard(): string;
1006
+ static getFirstDay(): string;
1007
+ static getLocation(): string;
1008
+ static getLocationCountry(): string;
1009
+ static getLocationLanguage(): string;
1010
+ static getItem(): GeoItemFull;
1011
+ static getList(): GeoItem[];
1012
+ static getByCode(code?: string): GeoItemFull;
1013
+ static getByCodeFull(code: string): GeoItem | undefined;
1014
+ static getByCountry(country: string): GeoItem | undefined;
1015
+ static getByLanguage(language: string): GeoItem | undefined;
1016
+ static getTimezone(): number;
1017
+ static getTimezoneFormat(): string;
1018
+ static find(code: string): GeoItemFull;
1019
+ static toStandard(item: GeoItem): string;
1020
+ static set(code: string, save?: boolean): void;
1021
+ static setTimezone(timezone: number): void;
1022
+ static setValueDefault(code?: string | (() => string)): void;
1308
1023
  }
1309
- export declare enum MetaOpenGraphTag {
1310
- title = "og:title",
1311
- type = "og:type",
1312
- url = "og:url",
1313
- image = "og:image",
1314
- description = "og:description",
1315
- locale = "og:locale",
1316
- siteName = "og:site_name",
1317
- localeAlternate = "og:locale:alternate",
1318
- imageUrl = "og:image:url",
1319
- imageSecureUrl = "og:image:secure_url",
1320
- imageType = "og:image:type",
1321
- imageWidth = "og:image:width",
1322
- imageHeight = "og:image:height",
1323
- imageAlt = "og:image:alt",
1324
- video = "og:video",
1325
- videoUrl = "og:video:url",
1326
- videoSecureUrl = "og:video:secure_url",
1327
- videoType = "og:video:type",
1328
- videoWidth = "og:video:width",
1329
- videoHeight = "og:video:height",
1330
- audio = "og:audio",
1331
- audioSecureUrl = "og:audio:secure_url",
1332
- audioType = "og:audio:type",
1333
- articlePublishedTime = "article:published_time",
1334
- articleModifiedTime = "article:modified_time",
1335
- articleExpirationTime = "article:expiration_time",
1336
- articleAuthor = "article:author",
1337
- articleSection = "article:section",
1338
- articleTag = "article:tag",
1339
- bookAuthor = "book:author",
1340
- bookIsbn = "book:isbn",
1341
- bookReleaseDate = "book:release_date",
1342
- bookTag = "book:tag",
1343
- musicDuration = "music:duration",
1344
- musicAlbum = "music:album",
1345
- musicAlbumDisc = "music:album:disc",
1346
- musicAlbumTrack = "music:album:track",
1347
- musicMusician = "music:musician",
1348
- musicSong = "music:song",
1349
- musicSongDisc = "music:song:disc",
1350
- musicSongTrack = "music:song:track",
1351
- musicReleaseDate = "music:release_date",
1352
- musicCreator = "music:creator",
1353
- videoActor = "video:actor",
1354
- videoActorRole = "video:actor:role",
1355
- videoDirector = "video:director",
1356
- videoWriter = "video:writer",
1357
- videoDuration = "video:duration",
1358
- videoReleaseDate = "video:release_date",
1359
- videoTag = "video:tag",
1360
- videoSeries = "video:series",
1361
- profileFirstName = "profile:first_name",
1362
- profileLastName = "profile:last_name",
1363
- profileUsername = "profile:username",
1364
- profileGender = "profile:gender",
1365
- productBrand = "product:brand",
1366
- productAvailability = "product:availability",
1367
- productCondition = "product:condition",
1368
- productPriceAmount = "product:price:amount",
1369
- productPriceCurrency = "product:price:currency",
1370
- productRetailerItemId = "product:retailer_item_id",
1371
- productCategory = "product:category",
1372
- productEan = "product:ean",
1373
- productIsbn = "product:isbn",
1374
- productMfrPartNo = "product:mfr_part_no",
1375
- productUpc = "product:upc",
1376
- productWeightValue = "product:weight:value",
1377
- productWeightUnits = "product:weight:units",
1378
- productColor = "product:color",
1379
- productMaterial = "product:material",
1380
- productPattern = "product:pattern",
1381
- productAgeGroup = "product:age_group",
1382
- productGender = "product:gender"
1024
+ /**
1025
+ * Class for working with flags and geographic information.
1026
+ */
1027
+ export declare class GeoFlag {
1028
+ static flags: Record<string, string>;
1029
+ constructor(code?: string);
1030
+ get(code?: string): GeoFlagItem | undefined;
1031
+ getLanguage(code?: string): GeoFlagItem | undefined;
1032
+ getCode(): string;
1033
+ getFlag(code?: string): string | undefined;
1034
+ getList(codes?: string[], sort?: boolean): GeoFlagItem[];
1035
+ getListLanguage(codes?: string[], sort?: boolean): GeoFlagItem[];
1036
+ getNational(codes?: string[], sort?: boolean): GeoFlagNational[];
1037
+ getNationalLanguage(codes?: string[], sort?: boolean): GeoFlagNational[];
1038
+ setCode(code: string): this;
1383
1039
  }
1384
- export declare enum MetaOpenGraphType {
1385
- website = "website",
1386
- article = "article",
1387
- video = "video.other",
1388
- videoTvShow = "video.tv_show",
1389
- videoEpisode = "video.episode",
1390
- videoMovie = "video.movie",
1391
- musicAlbum = "music.album",
1392
- musicPlaylist = "music.playlist",
1393
- musicSong = "music.song",
1394
- musicRadioStation = "music.radio_station",
1395
- app = "app",
1396
- product = "product",
1397
- business = "business.business",
1398
- place = "place",
1399
- event = "event",
1400
- profile = "profile",
1401
- book = "book"
1040
+ /**
1041
+ * Base class for working with geographic data.
1042
+ */
1043
+ export declare class GeoInstance {
1044
+ constructor();
1045
+ get(): GeoItemFull;
1046
+ getCountry(): string;
1047
+ getLanguage(): string;
1048
+ getStandard(): string;
1049
+ getFirstDay(): string;
1050
+ getLocation(): string;
1051
+ getLocationCountry(): string;
1052
+ getLocationLanguage(): string;
1053
+ getItem(): GeoItemFull;
1054
+ getList(): GeoItem[];
1055
+ getByCode(code?: string): GeoItemFull;
1056
+ getByCodeFull(code: string): GeoItem | undefined;
1057
+ getByCountry(country: string): GeoItem | undefined;
1058
+ getByLanguage(language: string): GeoItem | undefined;
1059
+ getTimezone(): number;
1060
+ getTimezoneFormat(): string;
1061
+ find(code: string): GeoItemFull;
1062
+ toStandard(item: GeoItem, language?: string): string;
1063
+ set(code: string, save?: boolean): void;
1064
+ setTimezone(timezone: number): void;
1065
+ setValueDefault(code?: string | (() => string)): void;
1402
1066
  }
1403
- export declare enum MetaOpenGraphAvailability {
1404
- inStock = "in stock",
1405
- outOfStock = "out of stock",
1406
- preorder = "preorder",
1407
- backorder = "backorder",
1408
- discontinued = "discontinued",
1409
- pending = "pending"
1067
+ /**
1068
+ * Internationalization wrapper for numbers, dates, currencies, and plurals.
1069
+ */
1070
+ export declare class GeoIntl {
1071
+ static isItem(code?: string): boolean;
1072
+ static getLocation(code?: string): string;
1073
+ static getInstance(code?: string): GeoIntl;
1074
+ constructor(code?: string, errorCenter?: ErrorCenterInstance);
1075
+ getLocation(): string;
1076
+ getFirstDay(): string;
1077
+ display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
1078
+ languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
1079
+ countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
1080
+ fullName(last: string, first: string, surname?: string, short?: boolean): string;
1081
+ number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1082
+ decimal(): string;
1083
+ currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
1084
+ currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
1085
+ unit(value: NumberOrString, unitOptions?: string | Intl.NumberFormatOptions): string;
1086
+ sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
1087
+ percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1088
+ percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1089
+ plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
1090
+ date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
1091
+ relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
1092
+ relativeLimit(value: NumberOrStringOrDate, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): string;
1093
+ relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
1094
+ month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
1095
+ months(style?: Intl.DateTimeFormatOptions['month']): ItemValue<number | undefined>[];
1096
+ weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
1097
+ weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
1098
+ time(value: NumberOrStringOrDate): string;
1099
+ sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
1410
1100
  }
1411
- export declare enum MetaOpenGraphCondition {
1412
- new = "new",
1413
- used = "used",
1414
- refurbished = "refurbished"
1101
+ /**
1102
+ * Utility for phone number formatting and country phone codes.
1103
+ */
1104
+ export declare class GeoPhone {
1105
+ static get(code: string): GeoPhoneValue | undefined;
1106
+ static getByPhone(phone: string): GeoPhoneMapInfo;
1107
+ static getByCode(code: string): GeoPhoneMap | undefined;
1108
+ static getList(): GeoPhoneValue[];
1109
+ static getMap(): Record<string, GeoPhoneMap>;
1110
+ static toMask(phone: string, masks?: string[]): string | undefined;
1111
+ static removeZero(phone: string): string;
1415
1112
  }
1416
- export declare enum MetaOpenGraphAge {
1417
- newborn = "newborn",
1418
- infant = "infant",
1419
- toddler = "toddler",
1420
- kids = "kids",
1421
- adult = "adult"
1113
+ /**
1114
+ * Class for localized unit formatting and automatic conversions.
1115
+ */
1116
+ export declare class GeoUnit {
1117
+ static getInstance(code?: string): GeoUnit;
1118
+ constructor(code?: string);
1119
+ getLocation(): string;
1120
+ millimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1121
+ centimeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1122
+ meter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1123
+ kilometer(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1124
+ squareMeter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1125
+ hectare(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1126
+ gram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1127
+ kilogram(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1128
+ tonne(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1129
+ milliliter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1130
+ liter(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1131
+ celsius(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1132
+ kilometerPerHour(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
1133
+ format(value: NumberOrString, unit: string, options?: Intl.NumberFormatOptions): string;
1422
1134
  }
1423
- export declare enum MetaOpenGraphGender {
1424
- female = "female",
1425
- male = "male",
1426
- unisex = "unisex"
1135
+ /**
1136
+ * Static utility class for global application data.
1137
+ */
1138
+ export declare class Global {
1139
+ static getItem(): Record<string, any>;
1140
+ static get<R = any>(name: string): R;
1141
+ static add(data: Record<string, any>): void;
1427
1142
  }
1428
- export declare enum MetaTwitterTag {
1429
- card = "twitter:card",
1430
- site = "twitter:site",
1431
- creator = "twitter:creator",
1432
- url = "twitter:url",
1433
- title = "twitter:title",
1434
- description = "twitter:description",
1435
- image = "twitter:image",
1436
- imageAlt = "twitter:image:alt",
1437
- imageSrc = "twitter:image:src",
1438
- imageWidth = "twitter:image:width",
1439
- imageHeight = "twitter:image:height",
1440
- label1 = "twitter:label1",
1441
- data1 = "twitter:data1",
1442
- label2 = "twitter:label2",
1443
- data2 = "twitter:data2",
1444
- appNameIphone = "twitter:app:name:iphone",
1445
- appIdIphone = "twitter:app:id:iphone",
1446
- appUrlIphone = "twitter:app:url:iphone",
1447
- appNameIpad = "twitter:app:name:ipad",
1448
- appIdIpad = "twitter:app:id:ipad",
1449
- appUrlIpad = "twitter:app:url:ipad",
1450
- appNameGooglePlay = "twitter:app:name:googleplay",
1451
- appIdGooglePlay = "twitter:app:id:googleplay",
1452
- appUrlGooglePlay = "twitter:app:url:googleplay",
1453
- player = "twitter:player",
1454
- playerWidth = "twitter:player:width",
1455
- playerHeight = "twitter:player:height",
1456
- playerStream = "twitter:player:stream",
1457
- playerStreamContentType = "twitter:player:stream:content_type"
1143
+ /**
1144
+ * Static class for working with URL hash data.
1145
+ */
1146
+ export declare class Hash {
1147
+ static getItem(): HashInstance;
1148
+ static get<T>(name: string, defaultValue?: T | (() => T)): T;
1149
+ static set<T>(name: string, callback: T | (() => T)): void;
1150
+ static addWatch<T>(name: string, callback: (value: T) => void): void;
1151
+ static removeWatch<T>(name: string, callback: (value: T) => void): void;
1152
+ static reload(): void;
1458
1153
  }
1459
- export declare enum MetaTwitterCard {
1460
- summary = "summary",
1461
- summaryLargeImage = "summary_large_image",
1462
- app = "app",
1463
- player = "player",
1464
- product = "product",
1465
- gallery = "gallery",
1466
- photo = "photo",
1467
- leadGeneration = "lead_generation",
1468
- audio = "audio",
1469
- poll = "poll"
1154
+ /**
1155
+ * Instance class for working with URL hash parameters.
1156
+ */
1157
+ export declare class HashInstance extends UrlInstanceAbstract {}
1158
+ /**
1159
+ * Class for managing icons.
1160
+ */
1161
+ export declare class Icons {
1162
+ static is(index: string): boolean;
1163
+ static get(index: string, url?: string, wait?: number): Promise<string>;
1164
+ static getAsync(index: string, url?: string): string;
1165
+ static getNameList(): string[];
1166
+ static getUrlGlobal(): string;
1167
+ static add(index: string, file: IconsItem): void;
1168
+ static addLoad(index: string): void;
1169
+ static addGlobal(index: string, file: string): void;
1170
+ static addByList(list: Record<string, IconsItem>): void;
1171
+ static setUrl(url: string): void;
1172
+ static setConfig(config: IconsConfig): void;
1470
1173
  }
1471
- export type SearchItem = Record<string, any>;
1472
- export type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
1473
- export type SearchColumn<T extends SearchItem> = {
1474
- [K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K;
1475
- }[keyof T];
1476
- export type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
1477
- export type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
1478
- export type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
1479
- export type SearchFormatItem<T extends SearchItem, KT extends string[]> = {
1480
- [K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string;
1481
- } & {
1482
- searchActive?: boolean;
1483
- };
1484
- export type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
1485
- export type SearchListValue<T extends SearchItem> = T[] | undefined;
1486
- export type SearchOptions = {
1487
- limit?: number;
1488
- returnEverything?: boolean;
1489
- delay?: number;
1490
- findExactMatch?: boolean;
1491
- classSearchName?: string;
1492
- };
1493
- export type SearchCacheItem<T extends SearchItem> = {
1494
- item: T;
1495
- value: string;
1496
- };
1497
- export type SearchCache<T extends SearchItem> = SearchCacheItem<T>[];
1498
- export type HighlightMatchItem = {
1499
- text: string;
1500
- isMatch: boolean;
1501
- };
1502
- export type SortDir = 'asc' | 'desc';
1503
- export type SortColumnItem = {
1504
- column?: string;
1505
- dir?: SortDir;
1506
- };
1507
- export type SortFunction<T = any> = (a: T, b: T, column?: string, dir?: SortDir) => number;
1508
- export type TranslateConfig = {
1509
- url?: string;
1510
- propsName?: string;
1511
- readApi?: boolean;
1512
- };
1513
- export type TranslateCode = string | string[];
1514
- export type TranslateList<T extends TranslateCode[]> = {
1515
- [K in T[number] as K extends readonly string[] ? K[0] : K]: string;
1174
+ /**
1175
+ * Class for managing global loading state.
1176
+ */
1177
+ export declare class Loading {
1178
+ static is(): boolean;
1179
+ static get(): number;
1180
+ static getItem(): LoadingInstance;
1181
+ static show(): void;
1182
+ static hide(): void;
1183
+ static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
1184
+ static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
1185
+ }
1186
+ /**
1187
+ * Instance class for managing loading state.
1188
+ */
1189
+ export declare class LoadingInstance {
1190
+ constructor(eventName?: string);
1191
+ is(): boolean;
1192
+ get(): number;
1193
+ show(): void;
1194
+ hide(): void;
1195
+ registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
1196
+ unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
1197
+ }
1198
+ /**
1199
+ * Class for managing meta tags.
1200
+ */
1201
+ export declare class Meta extends MetaManager<MetaTag[]> {
1202
+ constructor();
1203
+ getOg(): MetaOg;
1204
+ getTwitter(): MetaTwitter;
1205
+ getTitle(): string;
1206
+ getKeywords(): string;
1207
+ getDescription(): string;
1208
+ getImage(): string;
1209
+ getCanonical(): string;
1210
+ getRobots(): MetaRobots;
1211
+ getAuthor(): string;
1212
+ getSiteName(): string;
1213
+ getLocale(): string;
1214
+ setTitle(title: string): this;
1215
+ setKeywords(keywords: string | string[]): this;
1216
+ setDescription(description: string): this;
1217
+ setImage(image: string): this;
1218
+ setCanonical(canonical: string): this;
1219
+ setRobots(robots: MetaRobots): this;
1220
+ setAuthor(author: string): this;
1221
+ setSiteName(siteName: string): this;
1222
+ setLocale(locale: string): this;
1223
+ setSuffix(suffix?: string): void;
1224
+ html(): string;
1225
+ htmlTitle(): string;
1226
+ }
1227
+ /**
1228
+ * Manager class for meta tags.
1229
+ */
1230
+ export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
1231
+ constructor(listMeta: T, isProperty?: boolean);
1232
+ getListMeta(): T;
1233
+ get(name: Key): string;
1234
+ getItems(): MetaList<T>;
1235
+ html(): string;
1236
+ set(name: Key, content: string): this;
1237
+ setByList(metaList: MetaList<T>): this;
1238
+ }
1239
+ type MetaList<T extends readonly string[]> = {
1240
+ [K in T[number]]?: string;
1516
1241
  };
1517
- export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
1518
- export type TranslateDataFileList = Record<string, string>;
1519
- export type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
1520
- export type TranslateDataFile = Record<string, TranslateDataFileItem>;
1521
- export declare const TRANSLATE_GLOBAL_PREFIX = "global";
1522
- export declare const TRANSLATE_TIME_OUT = 160;
1242
+ /**
1243
+ * Class for Open Graph meta tags.
1244
+ */
1245
+ export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
1246
+ constructor();
1247
+ getTitle(): string;
1248
+ getType(): MetaOpenGraphType;
1249
+ getUrl(): string;
1250
+ getImage(): string;
1251
+ getDescription(): string;
1252
+ getLocale(): string;
1253
+ getSiteName(): string;
1254
+ setTitle(title: string): this;
1255
+ setType(type: MetaOpenGraphType): this;
1256
+ setUrl(url: string): this;
1257
+ setImage(url: string): this;
1258
+ setDescription(description: string): this;
1259
+ setLocale(locale: string): this;
1260
+ setSiteName(siteName: string): this;
1261
+ }
1262
+ /**
1263
+ * Static accessor for Meta management.
1264
+ */
1265
+ export declare class MetaStatic {
1266
+ static getItem(): Meta;
1267
+ static getOg(): MetaOg;
1268
+ static getTwitter(): MetaTwitter;
1269
+ static getTitle(): string;
1270
+ static getKeywords(): string;
1271
+ static getDescription(): string;
1272
+ static getImage(): string;
1273
+ static getCanonical(): string;
1274
+ static getRobots(): MetaRobots;
1275
+ static getAuthor(): string;
1276
+ static getSiteName(): string;
1277
+ static getLocale(): string;
1278
+ static setTitle(title: string): typeof MetaStatic;
1279
+ static setKeywords(keywords: string | string[]): typeof MetaStatic;
1280
+ static setDescription(description: string): typeof MetaStatic;
1281
+ static setImage(image: string): typeof MetaStatic;
1282
+ static setCanonical(canonical: string): typeof MetaStatic;
1283
+ static setRobots(robots: MetaRobots): typeof MetaStatic;
1284
+ static setAuthor(author: string): typeof MetaStatic;
1285
+ static setSiteName(siteName: string): typeof MetaStatic;
1286
+ static setLocale(locale: string): typeof MetaStatic;
1287
+ static setSuffix(suffix?: string): typeof MetaStatic;
1288
+ static html(): string;
1289
+ static htmlTitle(): string;
1290
+ }
1291
+ /**
1292
+ * Class for Twitter Card meta tags.
1293
+ */
1294
+ export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
1295
+ constructor();
1296
+ getCard(): MetaTwitterCard;
1297
+ getSite(): string;
1298
+ getCreator(): string;
1299
+ getUrl(): string;
1300
+ getTitle(): string;
1301
+ getDescription(): string;
1302
+ getImage(): string;
1303
+ setCard(card: MetaTwitterCard): this;
1304
+ setSite(site: string): this;
1305
+ setCreator(creator: string): this;
1306
+ setUrl(url: string): this;
1307
+ setTitle(title: string): this;
1308
+ setDescription(description: string): this;
1309
+ setImage(image: string): this;
1310
+ }
1311
+ /**
1312
+ * Static class for URL query parameter management.
1313
+ */
1314
+ export declare class Query {
1315
+ static getItem(): QueryInstance;
1316
+ static get<T>(name: string, defaultValue?: T | (() => T)): T;
1317
+ static set<T>(name: string, callback: T | (() => T)): void;
1318
+ static addWatch<T>(name: string, callback: (value: T) => void): void;
1319
+ static removeWatch<T>(name: string, callback: (value: T) => void): void;
1320
+ static reload(): void;
1321
+ }
1322
+ /**
1323
+ * Instance class for URL query parameters.
1324
+ */
1325
+ export declare class QueryInstance extends UrlInstanceAbstract {}
1326
+ /**
1327
+ * Class for creating a timer that can be paused and resumed.
1328
+ */
1329
+ export declare class ResumableTimer {
1330
+ constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
1331
+ resume(): this;
1332
+ pause(): this;
1333
+ reset(): this;
1334
+ clear(): this;
1335
+ }
1336
+ /**
1337
+ * Utility class for scrollbar calculations.
1338
+ */
1339
+ export declare class ScrollbarWidth {
1340
+ static is(): Promise<boolean>;
1341
+ static get(): Promise<number>;
1342
+ static getStorage(): DataStorage<number>;
1343
+ static getCalculate(): boolean;
1344
+ }
1345
+ /**
1346
+ * Class for managing search lists.
1347
+ */
1348
+ export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
1349
+ constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
1350
+ getData(): SearchListData<T, K>;
1351
+ getList(): SearchListValue<T>;
1352
+ getColumns(): K | undefined;
1353
+ getItem(): SearchListItem;
1354
+ getValue(): string | undefined;
1355
+ getOptions(): SearchListOptions;
1356
+ setList(list: SearchListValue<T>): this;
1357
+ setColumns(columns?: K): this;
1358
+ setValue(value?: string): this;
1359
+ setOptions(options: SearchOptions): this;
1360
+ to(): SearchFormatList<T, K>;
1361
+ }
1362
+ /**
1363
+ * Data manager for search lists.
1364
+ */
1365
+ export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
1366
+ constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
1367
+ is(): this is this & {
1368
+ list: T[];
1369
+ columns: string[];
1370
+ };
1371
+ isList(): this is this & {
1372
+ list: T[];
1373
+ };
1374
+ getList(): SearchListValue<T>;
1375
+ getColumns(): K | undefined;
1376
+ setList(list: SearchListValue<T>): this;
1377
+ setColumns(columns?: SearchColumns<T>): this;
1378
+ findCacheItem(item: T): SearchCacheItem<T> | undefined;
1379
+ forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
1380
+ toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
1381
+ }
1382
+ /**
1383
+ * Search list item wrapper.
1384
+ */
1385
+ export declare class SearchListItem {
1386
+ constructor(value: string | undefined, options: SearchListOptions);
1387
+ is(): this is this & {
1388
+ value: string;
1389
+ };
1390
+ isSearch(): boolean;
1391
+ get(): string;
1392
+ set(value?: string): this;
1393
+ }
1394
+ /**
1395
+ * Matcher for search list evaluation.
1396
+ */
1397
+ export declare class SearchListMatcher {
1398
+ constructor(item: SearchListItem, options: SearchListOptions);
1399
+ is(): boolean;
1400
+ isSelection(value: SearchCacheItem<any>['value']): boolean;
1401
+ get(): RegExp | undefined;
1402
+ update(): void;
1403
+ }
1404
+ /**
1405
+ * Options container for search lists.
1406
+ */
1407
+ export declare class SearchListOptions {
1408
+ constructor(options?: SearchOptions | undefined);
1409
+ getOptions(): SearchOptions;
1410
+ getLimit(): number;
1411
+ getReturnEverything(): boolean;
1412
+ getDelay(): number;
1413
+ getFindExactMatch(): boolean;
1414
+ getClassName(): string;
1415
+ setOptions(options: SearchOptions): this;
1416
+ }
1417
+ /**
1418
+ * Storage manager for Server-Side Rendering context.
1419
+ */
1420
+ export declare class ServerStorage {
1421
+ static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
1422
+ static reset(): void;
1423
+ static has(key: string): boolean;
1424
+ static get<T = any>(key: string, defaultValue?: () => T, hydration?: boolean): T;
1425
+ static set<T = any>(key: string, value: () => T, hydration?: boolean, storageList?: Record<string, any>): T;
1426
+ static setErrorStatus(hide: boolean): void;
1427
+ static remove(key: string): void;
1428
+ static toString(): string;
1429
+ }
1430
+ /**
1431
+ * Callback queue for storage mechanisms.
1432
+ */
1433
+ export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
1434
+ static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
1435
+ constructor(name: string, group?: string);
1436
+ isLoading(): boolean;
1437
+ getName(): string;
1438
+ getLoading(): boolean;
1439
+ addCallback(callback: Callback, isOnce?: boolean): this;
1440
+ removeCallback(callback: Callback): this;
1441
+ preparation(): this;
1442
+ run(value: T): Promise<this>;
1443
+ }
1444
+ /**
1445
+ * Utility for translation text retrieval.
1446
+ */
1447
+ export declare class Translate {
1448
+ static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
1449
+ static getItem(): TranslateInstance;
1450
+ static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
1451
+ static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
1452
+ static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
1453
+ static add(names: string | string[]): Promise<void>;
1454
+ static addSync(data: Record<string, string>): void;
1455
+ static addNormalOrSync(data: Record<string, string>): Promise<void>;
1456
+ static addSyncByLocation(data: Record<string, Record<string, string>>): void;
1457
+ static addSyncByFile(data: TranslateDataFile): void;
1458
+ static setUrl(url: string): void;
1459
+ static setPropsName(name: string): void;
1460
+ static setReadApi(value: boolean): void;
1461
+ static setConfig(config: TranslateConfig): void;
1462
+ }
1463
+ /**
1464
+ * Translation file provider.
1465
+ */
1466
+ export declare class TranslateFile {
1467
+ constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
1468
+ isFile(): boolean;
1469
+ getLocation(): string;
1470
+ getLanguage(): string;
1471
+ getList(): Promise<TranslateDataFileList | undefined>;
1472
+ add(data: TranslateDataFile): void;
1473
+ }
1474
+ /**
1475
+ * Translation engine instance.
1476
+ */
1477
+ export declare class TranslateInstance {
1478
+ constructor(url?: string, propsName?: string, files?: TranslateFile);
1479
+ get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
1480
+ getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
1481
+ getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
1482
+ getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
1483
+ add(names: string | string[]): Promise<void>;
1484
+ addSync(data: Record<string, string>): void;
1485
+ addNormalOrSync(data: Record<string, string>): Promise<void>;
1486
+ addSyncByLocation(data: Record<string, Record<string, string>>): void;
1487
+ addSyncByFile(data: TranslateDataFile): void;
1488
+ setUrl(url: string): this;
1489
+ setPropsName(name: string): this;
1490
+ setReadApi(value: boolean): this;
1491
+ }
1492
+ /**
1493
+ * Abstract class for URL state instances.
1494
+ */
1495
+ export declare abstract class UrlInstanceAbstract {
1496
+ get<T>(name: string, defaultValue?: T | (() => T)): T;
1497
+ set<T>(name: string, callback: T | (() => T)): this;
1498
+ addWatch<T>(name: string, callback: (value: T) => void): this;
1499
+ removeWatch<T>(name: string, callback: (value: T) => void): this;
1500
+ reload(): this;
1501
+ }
1502
+ /**
1503
+ * Isomorphic utility class for URL management.
1504
+ */
1505
+ export declare class UrlItem {
1506
+ static getInstance(): UrlItem;
1507
+ constructor(url?: string | URL);
1508
+ get href(): string;
1509
+ get protocol(): string;
1510
+ get username(): string;
1511
+ get password(): string;
1512
+ get host(): string;
1513
+ get hostname(): string;
1514
+ get port(): string;
1515
+ get pathname(): string;
1516
+ get search(): string;
1517
+ get searchParams(): URLSearchParams;
1518
+ get hash(): string;
1519
+ get origin(): string;
1520
+ hasParam(name: string): boolean;
1521
+ getParam(name: string): string | undefined;
1522
+ getParams(): Record<string, any>;
1523
+ set(url?: string | URL): this;
1524
+ setParam(name: string, value: string): this;
1525
+ setParams(params: Record<string, any>): this;
1526
+ deleteParam(name: string): this;
1527
+ toString(): string;
1528
+ toJSON(): string;
1529
+ }
1530
+ export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
1531
+ export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
1532
+ export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
1533
+ export declare function arrFill<T>(value: T, count: number): T[];
1534
+ export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
1535
+ export declare function capitalize(value: string, isLocale?: boolean): string;
1536
+ export declare function copyObject<T>(value: T): T;
1537
+ export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
1538
+ 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;
1539
+ export declare function domContentLoaded<T = void>(callback: () => T | Promise<T>): Promise<T>;
1540
+ export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
1541
+ export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
1542
+ export declare function encodeAttribute(text: string): string;
1543
+ export declare function encodeLiteAttribute(text: string): string;
1544
+ export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
1545
+ export declare function escapeExp(value: string): string;
1546
+ export declare function eventStopPropagation(event: Event): void;
1547
+ export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
1548
+ export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
1549
+ 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[];
1550
+ export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
1551
+ export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
1552
+ export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
1553
+ export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
1554
+ export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
1555
+ export declare function getCurrentDate(format?: GeoDate): string;
1556
+ export declare function getCurrentTime(): number;
1557
+ export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
1558
+ export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
1559
+ export declare function initGetElementId(newListener: () => string | number): void;
1560
+ export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
1561
+ export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
1562
+ export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
1563
+ export declare function getElementSafeScript(id: string, data: any): string;
1564
+ export declare function getExactSearchExp(search: string): RegExp;
1565
+ export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
1566
+ export declare function getFirst<T>(value: T | T[] | Record<string, T>): T | undefined;
1567
+ export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;
1568
+ export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
1569
+ export declare function getKey(event: KeyboardEvent): string | number | undefined;
1570
+ export declare function getLast<T>(value: T | T[] | Record<string, T>): T | undefined;
1571
+ export declare function getLength(value: any): number;
1572
+ export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];
1573
+ export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;
1574
+ export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;
1575
+ export declare function getMouseClient(event: MouseEvent & TouchEvent): ImageCoordinator;
1576
+ export declare function getMouseClientX(event: MouseEvent & TouchEvent): number;
1577
+ export declare function getMouseClientY(event: MouseEvent & TouchEvent): number;
1578
+ export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;
1579
+ export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;
1580
+ export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;
1581
+ export declare function getOnlyText(text: any): string;
1582
+ export declare function getRandomItem<T>(value?: T | T[] | Record<string, T>): T | undefined;
1583
+ export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;
1584
+ export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;
1585
+ export declare function getSearchExp(search: string, limit?: number): RegExp;
1586
+ export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;
1587
+ export declare function getStepPercent(min: number | undefined, max: number): number;
1588
+ export declare function getStepValue(min: number | undefined, max: number): number;
1589
+ export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;
1590
+ export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
1591
+ export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
1592
+ export declare function handleShare(data: ShareData): Promise<boolean>;
1593
+ export declare function inArray<T>(array: T[], value: T): boolean;
1594
+ export declare function initScrollbarOffset(): Promise<void>;
1595
+ export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;
1596
+ export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;
1597
+ export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;
1598
+ export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;
1599
+ export declare function isDomData(): boolean;
1600
+ export declare function isDomRuntime(): boolean;
1601
+ export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;
1602
+ export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
1603
+ export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;
1604
+ export declare function isFloat(value: any): boolean;
1605
+ export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;
1606
+ export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
1607
+ export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
1608
+ export declare function isIntegerBetween(value: number, between: number): boolean;
1609
+ export declare const isMetaKey: (event: KeyboardEvent) => boolean;
1610
+ export declare function isNull<T>(value: T): value is Extract<T, Undefined>;
1611
+ export declare function isNumber(value: any): boolean;
1612
+ export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;
1613
+ export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;
1614
+ export declare function isOnLine(): boolean;
1615
+ export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;
1616
+ export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;
1617
+ export declare function isShare(): boolean;
1618
+ export declare function isString<T>(value: T): value is Extract<T, string>;
1619
+ export declare const isTab: (event: KeyboardEvent) => boolean;
1620
+ export declare function isWindow<E>(element: E): element is Extract<E, Window>;
1621
+ export declare function random(min: number, max: number): number;
1622
+ export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
1623
+ export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
1624
+ export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;
1625
+ export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;
1626
+ type ResizeImageByMaxType = 'auto' | 'width' | 'height';
1627
+ export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
1628
+ export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;
1629
+ 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;
1630
+ export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
1631
+ multiple?: boolean | undefined;
1632
+ maxlength?: number | undefined;
1633
+ alwaysChange?: boolean | undefined;
1634
+ notEmpty?: boolean | undefined;
1635
+ }): T | T[] | undefined;
1636
+ export declare function sleep(ms: number): Promise<void>;
1637
+ export declare function sortList<T = any>(list: T[], sortColumns: SortColumnItem[], customSort?: SortFunction<T>): T[];
1638
+ export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;
1639
+ export declare function strFill(value: string, count: number): string;
1640
+ export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
1641
+ export declare function toArray<T>(value: T): T extends any[] ? T : [T];
1642
+ export declare function toCamelCase(value: string): string;
1643
+ export declare function toCamelCaseFirst(value: string): string;
1644
+ export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;
1645
+ export declare function toKebabCase(value: string): string;
1646
+ export declare function toNumber(value?: NumberOrString): number;
1647
+ export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
1648
+ export declare function toNumberPositive(value?: number | string | null, defaultValue?: number): number;
1649
+ export declare function toPercent(maxValue: number, value: number): number;
1650
+ export declare function toPercentBy100(maxValue: number, value: number): number;
1651
+ export declare function toString<T>(value: T): string;
1652
+ /**
1653
+ * Transforms a string into the corresponding primitive data type or object.
1654
+ */
1655
+ export declare function transformation(value: any, isFunction?: boolean): any;
1656
+ export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
1657
+ export declare function uniqueArray<T>(value: T[]): T[];
1658
+ export declare function writeClipboardData(text: string): Promise<void>;