@dxtmisha/functional-basic 0.7.2 → 0.8.5
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/dist/library.d.ts +150 -60
- package/dist/library.js +956 -884
- package/package.json +2 -2
package/dist/library.d.ts
CHANGED
|
@@ -86,14 +86,14 @@ export declare class Api {
|
|
|
86
86
|
* Изменить функцию перед запросом.
|
|
87
87
|
* @param callback function for call/ функция для вызова
|
|
88
88
|
*/
|
|
89
|
-
static setPreparation(callback: () => Promise<void>): Api;
|
|
89
|
+
static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): Api;
|
|
90
90
|
/**
|
|
91
91
|
* Modify the function after the request.
|
|
92
92
|
*
|
|
93
93
|
* Изменить функцию после запроса.
|
|
94
94
|
* @param callback function for call/ функция для вызова
|
|
95
95
|
*/
|
|
96
|
-
static setEnd(callback: (query: Response) => Promise<ApiPreparationEnd>): Api;
|
|
96
|
+
static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): Api;
|
|
97
97
|
/**
|
|
98
98
|
* To execute a request.
|
|
99
99
|
*
|
|
@@ -144,7 +144,7 @@ export declare class Api {
|
|
|
144
144
|
* @param queryReturn custom function for reading data/ кастомная функция для чтения данных
|
|
145
145
|
* @param end finalization data/ данные финализации
|
|
146
146
|
*/
|
|
147
|
-
protected static readData(query: Response, queryReturn: ApiFetch['queryReturn'], end: ApiPreparationEnd): Promise<
|
|
147
|
+
protected static readData<T>(query: Response, queryReturn: ApiFetch['queryReturn'], end: ApiPreparationEnd): Promise<ApiData<T>>;
|
|
148
148
|
/**
|
|
149
149
|
* Executing the request.
|
|
150
150
|
*
|
|
@@ -159,17 +159,31 @@ export declare class Api {
|
|
|
159
159
|
* @param data data for transformation/ данные для преобразования
|
|
160
160
|
* @param toData is it necessary to process the data/ нужно ли обрабатывать данные
|
|
161
161
|
*/
|
|
162
|
-
protected static makeData<T>(data: ApiData<T>, toData: boolean): T
|
|
162
|
+
protected static makeData<T>(data: ApiData<T>, toData: boolean): ApiData<T>;
|
|
163
|
+
/**
|
|
164
|
+
* Appends the status object to the response data if possible.
|
|
165
|
+
*
|
|
166
|
+
* Добавляет объект статуса к данным ответа, если это возможно.
|
|
167
|
+
* @param data response data/ данные ответа
|
|
168
|
+
* @param status status object/ объект статуса
|
|
169
|
+
*/
|
|
170
|
+
protected static makeStatus<T>(data: ApiData<T>, status: ApiStatus): ApiData<T>;
|
|
163
171
|
}
|
|
164
172
|
|
|
165
173
|
/**
|
|
166
174
|
* Shape of API response data wrapper/ Структура обёртки данных ответа API
|
|
167
175
|
*/
|
|
168
|
-
export declare type ApiData<T> = T & {
|
|
176
|
+
export declare type ApiData<T = any> = T & {
|
|
169
177
|
/** Primary payload (optional)/ Основная полезная нагрузка (опционально) */
|
|
170
178
|
data?: T;
|
|
171
179
|
/** Success flag/ Флаг успешности */
|
|
172
180
|
success?: boolean;
|
|
181
|
+
/** Status/ Статус */
|
|
182
|
+
status?: ApiStatusType;
|
|
183
|
+
/** Message/ Сообщение */
|
|
184
|
+
message?: string;
|
|
185
|
+
/** Status object/ Объект статуса */
|
|
186
|
+
statusObject?: ApiStatusItem;
|
|
173
187
|
};
|
|
174
188
|
|
|
175
189
|
/**
|
|
@@ -256,6 +270,8 @@ export declare type ApiFetch = {
|
|
|
256
270
|
globalEnd?: boolean;
|
|
257
271
|
/** Additional fetch() options/ Дополнительные опции fetch() */
|
|
258
272
|
init?: RequestInit;
|
|
273
|
+
/** AbortController for canceling the request/ AbortController для отмены запроса */
|
|
274
|
+
controller?: AbortController;
|
|
259
275
|
};
|
|
260
276
|
|
|
261
277
|
/**
|
|
@@ -322,9 +338,9 @@ export declare enum ApiMethodItem {
|
|
|
322
338
|
*/
|
|
323
339
|
export declare class ApiPreparation {
|
|
324
340
|
/** Function for call before the request/ Функция для вызова перед запросом */
|
|
325
|
-
protected callback?: () => Promise<void>;
|
|
341
|
+
protected callback?: (apiFetch: ApiFetch) => Promise<void>;
|
|
326
342
|
/** Function for call after the request/ Функция для вызова после запроса */
|
|
327
|
-
protected callbackEnd?: (query: Response) => Promise<ApiPreparationEnd>;
|
|
343
|
+
protected callbackEnd?: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>;
|
|
328
344
|
/** Is the preparation in progress/ Идет ли подготовка */
|
|
329
345
|
protected loading: boolean;
|
|
330
346
|
/**
|
|
@@ -332,43 +348,47 @@ export declare class ApiPreparation {
|
|
|
332
348
|
*
|
|
333
349
|
* Подготовка перед выполнением запроса.
|
|
334
350
|
* @param active is preparation active/ активна ли подготовка
|
|
351
|
+
* @param apiFetch request options/ опции запроса
|
|
335
352
|
*/
|
|
336
|
-
make(active: boolean): Promise<void>;
|
|
353
|
+
make(active: boolean, apiFetch: ApiFetch): Promise<void>;
|
|
337
354
|
/**
|
|
338
355
|
* Analysis of the request after execution.
|
|
339
356
|
*
|
|
340
357
|
* Анализ запроса после выполнения.
|
|
341
358
|
* @param active is preparation active/ активна ли подготовка
|
|
342
359
|
* @param query data received in the request/ данные, полученные в запросе
|
|
360
|
+
* @param apiFetch request options/ опции запроса
|
|
343
361
|
*/
|
|
344
|
-
makeEnd(active: boolean, query: Response): Promise<ApiPreparationEnd>;
|
|
362
|
+
makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
|
|
345
363
|
/**
|
|
346
364
|
* The function is modified for a call before the request.
|
|
347
365
|
*
|
|
348
366
|
* Изменить функцию перед запросом.
|
|
349
367
|
* @param callback function for call/ функция для вызова
|
|
350
368
|
*/
|
|
351
|
-
set(callback: () => Promise<void>): this;
|
|
369
|
+
set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
|
|
352
370
|
/**
|
|
353
371
|
* Modify the function after the request.
|
|
354
372
|
*
|
|
355
373
|
* Изменить функцию после запроса.
|
|
356
374
|
* @param callback function for call/ функция для вызова
|
|
357
375
|
*/
|
|
358
|
-
setEnd(callback: (query: Response) => Promise<ApiPreparationEnd>): this;
|
|
376
|
+
setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
|
|
359
377
|
/**
|
|
360
378
|
* To execute preparation.
|
|
361
379
|
*
|
|
362
380
|
* Выполнить подготовку.
|
|
381
|
+
* @param apiFetch request options/ опции запроса
|
|
363
382
|
*/
|
|
364
|
-
protected go(): Promise<void>;
|
|
383
|
+
protected go(apiFetch: ApiFetch): Promise<void>;
|
|
365
384
|
/**
|
|
366
385
|
* Analysis of the request after execution.
|
|
367
386
|
*
|
|
368
387
|
* Анализ запроса после выполнения.
|
|
369
388
|
* @param query data received in the request/ данные, полученные в запросе
|
|
389
|
+
* @param apiFetch request options/ опции запроса
|
|
370
390
|
*/
|
|
371
|
-
protected end(query: Response): Promise<ApiPreparationEnd>;
|
|
391
|
+
protected end(query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
|
|
372
392
|
}
|
|
373
393
|
|
|
374
394
|
/**
|
|
@@ -381,6 +401,11 @@ export declare type ApiPreparationEnd = {
|
|
|
381
401
|
data?: any;
|
|
382
402
|
};
|
|
383
403
|
|
|
404
|
+
/**
|
|
405
|
+
* Class for working with API responses.
|
|
406
|
+
*
|
|
407
|
+
* Класс для работы с ответами API.
|
|
408
|
+
*/
|
|
384
409
|
export declare class ApiResponse {
|
|
385
410
|
protected readonly requestDefault: ApiDefault;
|
|
386
411
|
/** List of first-time API requests/ Список первичных API запросов */
|
|
@@ -536,6 +561,12 @@ export declare class ApiStatus {
|
|
|
536
561
|
* Возвращает текст статуса выполнения.
|
|
537
562
|
*/
|
|
538
563
|
getStatusText(): string | undefined;
|
|
564
|
+
/**
|
|
565
|
+
* Returns the last status type.
|
|
566
|
+
*
|
|
567
|
+
* Возвращает последний тип статуса.
|
|
568
|
+
*/
|
|
569
|
+
getStatusType(): ApiStatusType | undefined;
|
|
539
570
|
/**
|
|
540
571
|
* Returns the script execution error.
|
|
541
572
|
*
|
|
@@ -583,6 +614,13 @@ export declare class ApiStatus {
|
|
|
583
614
|
* @param response response data/ данные ответа
|
|
584
615
|
*/
|
|
585
616
|
setLastResponse(response?: any): this;
|
|
617
|
+
/**
|
|
618
|
+
* Sets the last status.
|
|
619
|
+
*
|
|
620
|
+
* Устанавливает последний статус.
|
|
621
|
+
* @param status status/ статус
|
|
622
|
+
*/
|
|
623
|
+
setLastStatus(status?: ApiStatusType): this;
|
|
586
624
|
/**
|
|
587
625
|
* Sets messages from the last request.
|
|
588
626
|
*
|
|
@@ -601,19 +639,29 @@ export declare class ApiStatus {
|
|
|
601
639
|
}
|
|
602
640
|
|
|
603
641
|
export declare type ApiStatusItem = {
|
|
642
|
+
/** HTTP status code/ Код статуса HTTP */
|
|
604
643
|
status?: number;
|
|
644
|
+
/** HTTP status text/ Текст статуса HTTP */
|
|
605
645
|
statusText?: string;
|
|
646
|
+
/** Error message/ Сообщение об ошибке */
|
|
606
647
|
error?: string;
|
|
648
|
+
/** Last response/ Последний ответ */
|
|
607
649
|
lastResponse?: any;
|
|
650
|
+
/** Last status/ Последний статус */
|
|
651
|
+
lastStatus?: ApiStatusType;
|
|
652
|
+
/** Last message/ Последнее сообщение */
|
|
608
653
|
lastMessage?: string;
|
|
609
654
|
};
|
|
610
655
|
|
|
656
|
+
/** API status type/ Тип статуса API */
|
|
657
|
+
export declare type ApiStatusType = 'success' | 'error' | 'warning' | 'info';
|
|
658
|
+
|
|
611
659
|
/**
|
|
612
660
|
* Applies a template to the text, replacing keys with values from the replacement object
|
|
613
661
|
*
|
|
614
662
|
* Применяет шаблон к тексту, заменяя ключи на значения из объекта замены
|
|
615
|
-
* @param text text with a template containing keys in square brackets, for example "[key]"/
|
|
616
|
-
* текст с шаблоном, содержащим ключи в квадратных скобках, например "[key]"
|
|
663
|
+
* @param text text with a template containing keys in square or curly brackets, for example "[key]" or "{key}"/
|
|
664
|
+
* текст с шаблоном, содержащим ключи в квадратных или фигурных скобках, например "[key]" или "{key}"
|
|
617
665
|
* @param replacement an object containing key-value pairs for replacement/
|
|
618
666
|
* объект, содержащий пары ключ-значение для замены
|
|
619
667
|
*/
|
|
@@ -643,13 +691,22 @@ export declare function blobToBase64(blob: Blob): Promise<string | ArrayBuffer |
|
|
|
643
691
|
*/
|
|
644
692
|
export declare class BroadcastMessage<Message = any> {
|
|
645
693
|
protected callback?: ((event: MessageEvent<Message>) => void) | undefined;
|
|
694
|
+
protected callbackError?: ((event: MessageEvent<Message>) => void) | undefined;
|
|
646
695
|
protected channel?: BroadcastChannel;
|
|
647
696
|
/**
|
|
648
697
|
* Constructor
|
|
649
698
|
* @param name channel name/ название канала
|
|
650
699
|
* @param callback callback on message received/ колбэк на получение сообщения
|
|
700
|
+
* @param callbackError callback on message error/ колбэк на ошибку сообщения
|
|
651
701
|
*/
|
|
652
|
-
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined);
|
|
702
|
+
constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined);
|
|
703
|
+
/**
|
|
704
|
+
* Get the channel.
|
|
705
|
+
*
|
|
706
|
+
* Получить канал.
|
|
707
|
+
* @returns channel/ канал
|
|
708
|
+
*/
|
|
709
|
+
getChannel(): BroadcastChannel | undefined;
|
|
653
710
|
/**
|
|
654
711
|
* Send a message to the channel.
|
|
655
712
|
*
|
|
@@ -664,6 +721,13 @@ export declare class BroadcastMessage<Message = any> {
|
|
|
664
721
|
* @param callback callback function/ функция колбэка
|
|
665
722
|
*/
|
|
666
723
|
setCallback(callback: (event: MessageEvent<Message>) => void): this;
|
|
724
|
+
/**
|
|
725
|
+
* Set the callback function to be called when a message error occurs.
|
|
726
|
+
*
|
|
727
|
+
* Установить функцию колбэка, которая будет вызвана при возникновении ошибки сообщения.
|
|
728
|
+
* @param callbackError callback function/ функция колбэка
|
|
729
|
+
*/
|
|
730
|
+
setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
|
|
667
731
|
/**
|
|
668
732
|
* Update state on message received.
|
|
669
733
|
*
|
|
@@ -671,6 +735,13 @@ export declare class BroadcastMessage<Message = any> {
|
|
|
671
735
|
* @param event message event/ событие сообщения
|
|
672
736
|
*/
|
|
673
737
|
protected readonly update: (event: MessageEvent<Message>) => this;
|
|
738
|
+
/**
|
|
739
|
+
* Update error state on message error.
|
|
740
|
+
*
|
|
741
|
+
* Обновление состояния ошибки при получении ошибки сообщения.
|
|
742
|
+
* @param event message error event/ событие ошибки сообщения
|
|
743
|
+
*/
|
|
744
|
+
protected readonly updateError: (event: MessageEvent<Message>) => this;
|
|
674
745
|
}
|
|
675
746
|
|
|
676
747
|
/**
|
|
@@ -1496,48 +1567,6 @@ export declare type ElementOrString<E extends ElementOrWindow> = E | string;
|
|
|
1496
1567
|
*/
|
|
1497
1568
|
export declare type ElementOrWindow = HTMLElement | Window;
|
|
1498
1569
|
|
|
1499
|
-
/**
|
|
1500
|
-
* Class for taking screenshots of an element.
|
|
1501
|
-
*
|
|
1502
|
-
* Класс для создания скриншотов элемента.
|
|
1503
|
-
*
|
|
1504
|
-
* This class uses native browser APIs to capture an element by embedding its HTML into an SVG.
|
|
1505
|
-
* It has limitations and may not render everything with perfect accuracy, especially:
|
|
1506
|
-
* - Images, iframes, or other resources from different origins (due to CORS security policies).
|
|
1507
|
-
* - CSS pseudo-elements like ::before and ::after are not rendered.
|
|
1508
|
-
* - The element's context is lost, so CSS rules depending on parent elements might not apply correctly.
|
|
1509
|
-
*
|
|
1510
|
-
* For more robust and accurate capturing, a library like html2canvas is recommended as it reconstructs
|
|
1511
|
-
* the element and its styles on a canvas from scratch.
|
|
1512
|
-
*/
|
|
1513
|
-
export declare class ElementScreenshot {
|
|
1514
|
-
protected readonly element: HTMLElement;
|
|
1515
|
-
/**
|
|
1516
|
-
* Constructor
|
|
1517
|
-
* @param element HTML element to capture/ HTML элемент для захвата
|
|
1518
|
-
*/
|
|
1519
|
-
constructor(element: HTMLElement);
|
|
1520
|
-
/**
|
|
1521
|
-
* Takes a screenshot of the element.
|
|
1522
|
-
*
|
|
1523
|
-
* Делает скриншот элемента.
|
|
1524
|
-
*/
|
|
1525
|
-
take(): Promise<string>;
|
|
1526
|
-
/**
|
|
1527
|
-
* Takes a screenshot and downloads it.
|
|
1528
|
-
*
|
|
1529
|
-
* Делает скриншот и скачивает его.
|
|
1530
|
-
* @param filename name of the file to download/ имя файла для скачивания
|
|
1531
|
-
*/
|
|
1532
|
-
download(filename?: string): Promise<void>;
|
|
1533
|
-
/**
|
|
1534
|
-
* Gathers all CSS styles from the document's stylesheets.
|
|
1535
|
-
*
|
|
1536
|
-
* Собирает все стили CSS из таблиц стилей документа.
|
|
1537
|
-
*/
|
|
1538
|
-
protected getStyles(): string;
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
1570
|
/**
|
|
1542
1571
|
* Union type for all "empty" values including falsy primitives and string representations/
|
|
1543
1572
|
* Объединенный тип для всех "пустых" значений включая ложные примитивы и строковые представления
|
|
@@ -1769,8 +1798,10 @@ export declare function executePromise<T>(callback: (() => Promise<T>) | (() =>
|
|
|
1769
1798
|
* @param data object for iteration/ объект для перебора
|
|
1770
1799
|
* @param callback a function to execute for each element in the array/
|
|
1771
1800
|
* функция, которая будет вызвана для каждого элемента
|
|
1801
|
+
* @param saveUndefined if true, the function will return an array with undefined values/
|
|
1802
|
+
* если true, функция вернет массив с undefined значениями
|
|
1772
1803
|
*/
|
|
1773
|
-
export declare function forEach<T, R, D extends T[] | Record<string, T> | Map<string, T> = T[] | Record<string, T> | Map<string, T>, K = D extends T[] ? number : string>(data: D & (T[] | Record<string, T> | Map<string, T>), callback: (item: T, key: K, dataMain: typeof data) => R): R[];
|
|
1804
|
+
export declare function forEach<T, R, D extends T[] | Record<string, T> | Map<string, T> = T[] | Record<string, T> | Map<string, T>, K = D extends T[] ? number : string>(data: D & (T[] | Record<string, T> | Map<string, T>), callback: (item: T, key: K, dataMain: typeof data) => R, saveUndefined?: boolean): R[];
|
|
1774
1805
|
|
|
1775
1806
|
/**
|
|
1776
1807
|
* Cyclically calls requestAnimationFrame until next returns true
|
|
@@ -2625,7 +2656,7 @@ export declare function getExp(value: string, flags?: string, pattern?: string):
|
|
|
2625
2656
|
* @param item object for work/ объект для работы
|
|
2626
2657
|
* @param path data path/ путь к данным
|
|
2627
2658
|
*/
|
|
2628
|
-
export declare function getItemByPath<T extends Record<string, any
|
|
2659
|
+
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;
|
|
2629
2660
|
|
|
2630
2661
|
/**
|
|
2631
2662
|
* Returns the pressed key.
|
|
@@ -2792,6 +2823,16 @@ export declare function goScroll(selector: string, elementTo: HTMLElement | unde
|
|
|
2792
2823
|
*/
|
|
2793
2824
|
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
|
|
2794
2825
|
|
|
2826
|
+
/**
|
|
2827
|
+
* Scrolls the container to make the target element visible.
|
|
2828
|
+
*
|
|
2829
|
+
* Прокручивает контейнер, чтобы целевой элемент стал видимым.
|
|
2830
|
+
* @param element container element/ элемент контейнера
|
|
2831
|
+
* @param elementTo target element/ целевой элемент
|
|
2832
|
+
* @param behavior scroll behavior/ режим прокрутки
|
|
2833
|
+
*/
|
|
2834
|
+
export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;
|
|
2835
|
+
|
|
2795
2836
|
/**
|
|
2796
2837
|
* Working with data stored in hash.
|
|
2797
2838
|
*
|
|
@@ -4480,6 +4521,18 @@ export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem
|
|
|
4480
4521
|
*/
|
|
4481
4522
|
export declare function strFill(value: string, count: number): string;
|
|
4482
4523
|
|
|
4524
|
+
/**
|
|
4525
|
+
* Splits a string by a separator, limited to a certain number of elements.
|
|
4526
|
+
* If a limit is specified, the last element will contain the remainder of the string.
|
|
4527
|
+
*
|
|
4528
|
+
* Разделяет строку по разделителю, ограничивая количество элементов.
|
|
4529
|
+
* Если указан лимит, последний элемент будет содержать остаток строки.
|
|
4530
|
+
* @param value input value/ входное значение
|
|
4531
|
+
* @param separator separator/ разделитель
|
|
4532
|
+
* @param limit limit/ лимит
|
|
4533
|
+
*/
|
|
4534
|
+
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];
|
|
4535
|
+
|
|
4483
4536
|
/**
|
|
4484
4537
|
* Преобразует значение в массив.
|
|
4485
4538
|
* Если переданное значение уже является массивом, возвращается оно само.
|
|
@@ -4664,6 +4717,13 @@ export declare class Translate {
|
|
|
4664
4717
|
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
4665
4718
|
*/
|
|
4666
4719
|
static addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
4720
|
+
/**
|
|
4721
|
+
* Adds texts synchronously by location.
|
|
4722
|
+
*
|
|
4723
|
+
* Добавляет тексты синхронно по местоположению.
|
|
4724
|
+
* @param data list of texts by location/ список текстов по местоположению
|
|
4725
|
+
*/
|
|
4726
|
+
static addSyncByLocation(data: Record<string, Record<string, string>>): void;
|
|
4667
4727
|
/**
|
|
4668
4728
|
* Change the path to the script for obtaining the translation.
|
|
4669
4729
|
*
|
|
@@ -4672,6 +4732,20 @@ export declare class Translate {
|
|
|
4672
4732
|
*/
|
|
4673
4733
|
static setUrl(url: string): Translate;
|
|
4674
4734
|
static setPropsName(name: string): Translate;
|
|
4735
|
+
/**
|
|
4736
|
+
* Checks for translation by code, taking into account fallback options.
|
|
4737
|
+
*
|
|
4738
|
+
* Проверяет наличие перевода по коду с учетом запасных вариантов.
|
|
4739
|
+
* @param name code name/ название кода
|
|
4740
|
+
*/
|
|
4741
|
+
protected static hasName(name: string): boolean;
|
|
4742
|
+
/**
|
|
4743
|
+
* Retrieves translation text by code, returning the first matching fallback.
|
|
4744
|
+
*
|
|
4745
|
+
* Получает текст перевода по коду, возвращая первое совпадение из запасных вариантов.
|
|
4746
|
+
* @param name code name/ название кода
|
|
4747
|
+
*/
|
|
4748
|
+
protected static getText(name: string): string | undefined;
|
|
4675
4749
|
/**
|
|
4676
4750
|
* Getting the full title for translation.
|
|
4677
4751
|
*
|
|
@@ -4679,6 +4753,20 @@ export declare class Translate {
|
|
|
4679
4753
|
* @param name code name/ название кода
|
|
4680
4754
|
*/
|
|
4681
4755
|
protected static getName(name: string): string;
|
|
4756
|
+
/**
|
|
4757
|
+
* Getting the title for translation by language.
|
|
4758
|
+
*
|
|
4759
|
+
* Получение названия для перевода по языку.
|
|
4760
|
+
* @param name code name/ название кода
|
|
4761
|
+
*/
|
|
4762
|
+
protected static getNameByLanguage(name: string): string;
|
|
4763
|
+
/**
|
|
4764
|
+
* Getting the title for translation globally.
|
|
4765
|
+
*
|
|
4766
|
+
* Получение названия для перевода глобально.
|
|
4767
|
+
* @param name code name/ название кода
|
|
4768
|
+
*/
|
|
4769
|
+
protected static getNameByGlobal(name: string): string;
|
|
4682
4770
|
/**
|
|
4683
4771
|
* Returns a list of names that are not yet in the list.
|
|
4684
4772
|
*
|
|
@@ -4708,6 +4796,8 @@ export declare class Translate {
|
|
|
4708
4796
|
protected static make(): Promise<void>;
|
|
4709
4797
|
}
|
|
4710
4798
|
|
|
4799
|
+
export declare const TRANSLATE_GLOBAL_PREFIX = "global";
|
|
4800
|
+
|
|
4711
4801
|
export declare type TranslateCode = string | string[];
|
|
4712
4802
|
|
|
4713
4803
|
export declare type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
|