@dxtmisha/functional-basic 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +829 -0
- package/dist/classes/Api.d.ts +161 -0
- package/dist/classes/ApiDefault.d.ts +43 -0
- package/dist/classes/ApiHeaders.d.ts +23 -0
- package/dist/classes/ApiPreparation.d.ts +56 -0
- package/dist/classes/ApiResponse.d.ts +111 -0
- package/dist/classes/ApiStatus.d.ts +89 -0
- package/dist/classes/BroadcastMessage.d.ts +36 -0
- package/dist/classes/Cache.d.ts +34 -0
- package/dist/classes/CacheItem.d.ts +55 -0
- package/dist/classes/CacheStatic.d.ts +17 -0
- package/dist/classes/Cookie.d.ts +58 -0
- package/dist/classes/CookieBlock.d.ts +22 -0
- package/dist/classes/DataStorage.d.ts +82 -0
- package/dist/classes/Datetime.d.ts +482 -0
- package/dist/classes/EventItem.d.ts +160 -0
- package/dist/classes/Geo.d.ts +168 -0
- package/dist/classes/GeoFlag.d.ts +79 -0
- package/dist/classes/GeoIntl.d.ts +262 -0
- package/dist/classes/GeoPhone.d.ts +107 -0
- package/dist/classes/Global.d.ts +21 -0
- package/dist/classes/Hash.d.ts +59 -0
- package/dist/classes/Icons.d.ts +90 -0
- package/dist/classes/Loading.d.ts +49 -0
- package/dist/classes/Meta.d.ts +168 -0
- package/dist/classes/MetaManager.d.ts +103 -0
- package/dist/classes/MetaOg.d.ts +101 -0
- package/dist/classes/MetaTwitter.d.ts +101 -0
- package/dist/classes/ScrollbarWidth.d.ts +33 -0
- package/dist/classes/Translate.d.ts +116 -0
- package/dist/classes/__tests__/Api.test.d.ts +4 -0
- package/dist/classes/__tests__/ApiDefault.test.d.ts +1 -0
- package/dist/classes/__tests__/ApiHeaders.test.d.ts +1 -0
- package/dist/classes/__tests__/ApiPreparation.test.d.ts +1 -0
- package/dist/classes/__tests__/ApiResponse.test.d.ts +4 -0
- package/dist/classes/__tests__/ApiStatus.test.d.ts +1 -0
- package/dist/classes/__tests__/Meta.test.d.ts +4 -0
- package/dist/classes/__tests__/MetaManager.test.d.ts +4 -0
- package/dist/classes/__tests__/MetaOg.test.d.ts +4 -0
- package/dist/classes/__tests__/MetaTwitter.test.d.ts +4 -0
- package/dist/functions/anyToString.d.ts +7 -0
- package/dist/functions/applyTemplate.d.ts +10 -0
- package/dist/functions/arrFill.d.ts +8 -0
- package/dist/functions/copyObject.d.ts +8 -0
- package/dist/functions/createElement.d.ts +13 -0
- package/dist/functions/domQuerySelector.d.ts +7 -0
- package/dist/functions/domQuerySelectorAll.d.ts +7 -0
- package/dist/functions/encodeAttribute.d.ts +7 -0
- package/dist/functions/eventStopPropagation.d.ts +7 -0
- package/dist/functions/executeFunction.d.ts +8 -0
- package/dist/functions/executePromise.d.ts +7 -0
- package/dist/functions/forEach.d.ts +11 -0
- package/dist/functions/frame.d.ts +16 -0
- package/dist/functions/getAttributes.d.ts +8 -0
- package/dist/functions/getClipboardData.d.ts +11 -0
- package/dist/functions/getColumn.d.ts +10 -0
- package/dist/functions/getElement.d.ts +8 -0
- package/dist/functions/getElementId.d.ts +9 -0
- package/dist/functions/getElementItem.d.ts +11 -0
- package/dist/functions/getElementOrWindow.d.ts +8 -0
- package/dist/functions/getExp.d.ts +13 -0
- package/dist/functions/getItemByPath.d.ts +8 -0
- package/dist/functions/getKey.d.ts +7 -0
- package/dist/functions/getLengthOfAllArray.d.ts +8 -0
- package/dist/functions/getMaxLengthAllArray.d.ts +8 -0
- package/dist/functions/getMinLengthAllArray.d.ts +8 -0
- package/dist/functions/getMouseClient.d.ts +8 -0
- package/dist/functions/getMouseClientX.d.ts +7 -0
- package/dist/functions/getMouseClientY.d.ts +7 -0
- package/dist/functions/getObjectByKeys.d.ts +8 -0
- package/dist/functions/getObjectNoUndefined.d.ts +8 -0
- package/dist/functions/getObjectOrNone.d.ts +7 -0
- package/dist/functions/getRandomText.d.ts +11 -0
- package/dist/functions/getRequestString.d.ts +9 -0
- package/dist/functions/getStepPercent.d.ts +8 -0
- package/dist/functions/getStepValue.d.ts +8 -0
- package/dist/functions/goScroll.d.ts +10 -0
- package/dist/functions/inArray.d.ts +8 -0
- package/dist/functions/initScrollbarOffset.d.ts +6 -0
- package/dist/functions/intersectKey.d.ts +8 -0
- package/dist/functions/isArray.d.ts +7 -0
- package/dist/functions/isDifferent.d.ts +9 -0
- package/dist/functions/isDomRuntime.d.ts +10 -0
- package/dist/functions/isFilled.d.ts +9 -0
- package/dist/functions/isFloat.d.ts +7 -0
- package/dist/functions/isFunction.d.ts +8 -0
- package/dist/functions/isInDom.d.ts +8 -0
- package/dist/functions/isIntegerBetween.d.ts +8 -0
- package/dist/functions/isNull.d.ts +8 -0
- package/dist/functions/isNumber.d.ts +7 -0
- package/dist/functions/isObject.d.ts +7 -0
- package/dist/functions/isObjectNotArray.d.ts +7 -0
- package/dist/functions/isSelected.d.ts +8 -0
- package/dist/functions/isSelectedByList.d.ts +8 -0
- package/dist/functions/isString.d.ts +7 -0
- package/dist/functions/isWindow.d.ts +7 -0
- package/dist/functions/random.d.ts +8 -0
- package/dist/functions/replaceRecursive.d.ts +10 -0
- package/dist/functions/replaceTemplate.d.ts +9 -0
- package/dist/functions/secondToTime.d.ts +7 -0
- package/dist/functions/setElementItem.d.ts +10 -0
- package/dist/functions/setValues.d.ts +17 -0
- package/dist/functions/splice.d.ts +12 -0
- package/dist/functions/strFill.d.ts +8 -0
- package/dist/functions/toArray.d.ts +17 -0
- package/dist/functions/toCamelCase.d.ts +7 -0
- package/dist/functions/toCamelCaseFirst.d.ts +7 -0
- package/dist/functions/toDate.d.ts +7 -0
- package/dist/functions/toKebabCase.d.ts +15 -0
- package/dist/functions/toNumber.d.ts +8 -0
- package/dist/functions/toNumberByMax.d.ts +9 -0
- package/dist/functions/toPercent.d.ts +8 -0
- package/dist/functions/toPercentBy100.d.ts +8 -0
- package/dist/functions/transformation.d.ts +21 -0
- package/dist/functions/uniqueArray.d.ts +7 -0
- package/dist/functions/writeClipboardData.d.ts +7 -0
- package/dist/library.d.ts +109 -0
- package/dist/library.js +4916 -0
- package/dist/types/apiTypes.d.ts +116 -0
- package/dist/types/basicTypes.d.ts +126 -0
- package/dist/types/geoTypes.d.ts +86 -0
- package/dist/types/metaTypes.d.ts +584 -0
- package/package.json +68 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { MetaManager } from './MetaManager';
|
|
2
|
+
import { MetaOpenGraphTag, MetaOpenGraphType } from '../types/metaTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Class for working with Open Graph meta tags.
|
|
5
|
+
*
|
|
6
|
+
* Класс для управления мета-тегами Open Graph.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Gets the Open Graph title.
|
|
12
|
+
*
|
|
13
|
+
* Получает заголовок Open Graph.
|
|
14
|
+
*/
|
|
15
|
+
getTitle(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Gets the Open Graph type.
|
|
18
|
+
*
|
|
19
|
+
* Получает тип Open Graph.
|
|
20
|
+
*/
|
|
21
|
+
getType(): MetaOpenGraphType;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the Open Graph URL.
|
|
24
|
+
*
|
|
25
|
+
* Получает URL Open Graph.
|
|
26
|
+
*/
|
|
27
|
+
getUrl(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Gets the Open Graph image URL.
|
|
30
|
+
*
|
|
31
|
+
* Получает URL изображения Open Graph.
|
|
32
|
+
*/
|
|
33
|
+
getImage(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the Open Graph description.
|
|
36
|
+
*
|
|
37
|
+
* Получает описание Open Graph.
|
|
38
|
+
*/
|
|
39
|
+
getDescription(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the Open Graph locale.
|
|
42
|
+
*
|
|
43
|
+
* Получает локаль Open Graph.
|
|
44
|
+
*/
|
|
45
|
+
getLocale(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the Open Graph site name.
|
|
48
|
+
*
|
|
49
|
+
* Получает название сайта Open Graph.
|
|
50
|
+
*/
|
|
51
|
+
getSiteName(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the Open Graph title.
|
|
54
|
+
*
|
|
55
|
+
* Устанавливает заголовок Open Graph.
|
|
56
|
+
* @param title title / заголовок
|
|
57
|
+
*/
|
|
58
|
+
setTitle(title: string): this;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the Open Graph type.
|
|
61
|
+
*
|
|
62
|
+
* Устанавливает тип Open Graph.
|
|
63
|
+
* @param type type / тип
|
|
64
|
+
*/
|
|
65
|
+
setType(type: MetaOpenGraphType): this;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the Open Graph URL.
|
|
68
|
+
*
|
|
69
|
+
* Устанавливает URL Open Graph.
|
|
70
|
+
* @param url URL / URL
|
|
71
|
+
*/
|
|
72
|
+
setUrl(url: string): this;
|
|
73
|
+
/**
|
|
74
|
+
* Sets the Open Graph image URL.
|
|
75
|
+
*
|
|
76
|
+
* Устанавливает URL изображения Open Graph.
|
|
77
|
+
* @param url image URL / URL изображения
|
|
78
|
+
*/
|
|
79
|
+
setImage(url: string): this;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the Open Graph description.
|
|
82
|
+
*
|
|
83
|
+
* Устанавливает описание Open Graph.
|
|
84
|
+
* @param description description / описание
|
|
85
|
+
*/
|
|
86
|
+
setDescription(description: string): this;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the Open Graph locale.
|
|
89
|
+
*
|
|
90
|
+
* Устанавливает локаль Open Graph.
|
|
91
|
+
* @param locale locale (e.g. 'en_US', 'ru_RU') / локаль (например, 'en_US', 'ru_RU')
|
|
92
|
+
*/
|
|
93
|
+
setLocale(locale: string): this;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the Open Graph site name.
|
|
96
|
+
*
|
|
97
|
+
* Устанавливает название сайта Open Graph.
|
|
98
|
+
* @param siteName site name / название сайта
|
|
99
|
+
*/
|
|
100
|
+
setSiteName(siteName: string): this;
|
|
101
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { MetaManager } from './MetaManager';
|
|
2
|
+
import { MetaTwitterCard, MetaTwitterTag } from '../types/metaTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Class for working with Twitter Card meta tags.
|
|
5
|
+
*
|
|
6
|
+
* Класс для управления мета-тегами Twitter Card.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Gets the Twitter Card type.
|
|
12
|
+
*
|
|
13
|
+
* Получает тип Twitter Card.
|
|
14
|
+
*/
|
|
15
|
+
getCard(): MetaTwitterCard;
|
|
16
|
+
/**
|
|
17
|
+
* Gets the website or brand @username.
|
|
18
|
+
*
|
|
19
|
+
* Получает аккаунт сайта или бренда (@username).
|
|
20
|
+
*/
|
|
21
|
+
getSite(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the content creator @username.
|
|
24
|
+
*
|
|
25
|
+
* Получает автора контента (@username).
|
|
26
|
+
*/
|
|
27
|
+
getCreator(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Gets the page URL.
|
|
30
|
+
*
|
|
31
|
+
* Получает URL страницы.
|
|
32
|
+
*/
|
|
33
|
+
getUrl(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the card title.
|
|
36
|
+
*
|
|
37
|
+
* Получает заголовок карточки.
|
|
38
|
+
*/
|
|
39
|
+
getTitle(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the card description.
|
|
42
|
+
*
|
|
43
|
+
* Получает описание карточки.
|
|
44
|
+
*/
|
|
45
|
+
getDescription(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the card image URL.
|
|
48
|
+
*
|
|
49
|
+
* Получает URL изображения карточки.
|
|
50
|
+
*/
|
|
51
|
+
getImage(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the Twitter Card type.
|
|
54
|
+
*
|
|
55
|
+
* Устанавливает тип Twitter Card.
|
|
56
|
+
* @param card card type / тип карточки
|
|
57
|
+
*/
|
|
58
|
+
setCard(card: MetaTwitterCard): this;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the website or brand @username.
|
|
61
|
+
*
|
|
62
|
+
* Устанавливает аккаунт сайта или бренда (@username).
|
|
63
|
+
* @param site @username / аккаунт
|
|
64
|
+
*/
|
|
65
|
+
setSite(site: string): this;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the content creator @username.
|
|
68
|
+
*
|
|
69
|
+
* Устанавливает автора контента (@username).
|
|
70
|
+
* @param creator @username / аккаунт автора
|
|
71
|
+
*/
|
|
72
|
+
setCreator(creator: string): this;
|
|
73
|
+
/**
|
|
74
|
+
* Sets the page URL.
|
|
75
|
+
*
|
|
76
|
+
* Устанавливает URL страницы.
|
|
77
|
+
* @param url URL / URL
|
|
78
|
+
*/
|
|
79
|
+
setUrl(url: string): this;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the card title.
|
|
82
|
+
*
|
|
83
|
+
* Устанавливает заголовок карточки.
|
|
84
|
+
* @param title title / заголовок
|
|
85
|
+
*/
|
|
86
|
+
setTitle(title: string): this;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the card description.
|
|
89
|
+
*
|
|
90
|
+
* Устанавливает описание карточки.
|
|
91
|
+
* @param description description / описание
|
|
92
|
+
*/
|
|
93
|
+
setDescription(description: string): this;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the card image URL.
|
|
96
|
+
*
|
|
97
|
+
* Устанавливает URL изображения карточки.
|
|
98
|
+
* @param image image URL / URL изображения
|
|
99
|
+
*/
|
|
100
|
+
setImage(image: string): this;
|
|
101
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class for getting the scroll width.
|
|
3
|
+
*
|
|
4
|
+
* Класс для получения ширины скролла.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ScrollbarWidth {
|
|
7
|
+
private static storage;
|
|
8
|
+
private static calculate;
|
|
9
|
+
/**
|
|
10
|
+
* Checks whether to enable scroll hiding.
|
|
11
|
+
*
|
|
12
|
+
* Проверяет, надо ли включить скрытие скролла.
|
|
13
|
+
*/
|
|
14
|
+
static is(): Promise<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the width of the scroll.
|
|
17
|
+
*
|
|
18
|
+
* Возвращает ширину скролла.
|
|
19
|
+
*/
|
|
20
|
+
static get(): Promise<number>;
|
|
21
|
+
/**
|
|
22
|
+
* Creates elements to check the width of the scroll.
|
|
23
|
+
*
|
|
24
|
+
* Создает элементы для проверки ширины скролла.
|
|
25
|
+
*/
|
|
26
|
+
private static createElement;
|
|
27
|
+
/**
|
|
28
|
+
* Initialization of data to check the width of the scroll.
|
|
29
|
+
*
|
|
30
|
+
* Инициализация данных для проверки ширины скролла.
|
|
31
|
+
*/
|
|
32
|
+
private static init;
|
|
33
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export type TranslateCode = string | string[];
|
|
2
|
+
export type TranslateList<T extends TranslateCode[]> = {
|
|
3
|
+
[K in T[number] as K extends readonly string[] ? K[0] : K]: string;
|
|
4
|
+
};
|
|
5
|
+
export type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
|
|
6
|
+
/**
|
|
7
|
+
* Class for getting the translated text.
|
|
8
|
+
*
|
|
9
|
+
* Класс для получения переведенного текста.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Translate {
|
|
12
|
+
protected static url: string;
|
|
13
|
+
protected static propsName: string;
|
|
14
|
+
protected static readonly data: Record<string, string>;
|
|
15
|
+
protected static cache: string[];
|
|
16
|
+
protected static resolveList: (() => void)[];
|
|
17
|
+
protected static timeout?: any;
|
|
18
|
+
/**
|
|
19
|
+
* Getting the translation text by its code.
|
|
20
|
+
*
|
|
21
|
+
* Получение текста перевода по его коду.
|
|
22
|
+
* @param name code name/ название кода
|
|
23
|
+
* @param replacement If set, replaces the text with the specified values/ если установлено, заменяет текст на указанные значения
|
|
24
|
+
*/
|
|
25
|
+
static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Getting the translation text by its code (Sync).
|
|
28
|
+
*
|
|
29
|
+
* Получение текста перевода по его коду (Sync).
|
|
30
|
+
* @param name code name/ название кода
|
|
31
|
+
* @param first If set to false, returns an empty string if there is no text/
|
|
32
|
+
* если установлено false, возвращает пустую строку, если нет текста
|
|
33
|
+
* @param replacement If set, replaces the text with the specified values/
|
|
34
|
+
* если установлено, заменяет текст на указанные значения
|
|
35
|
+
*/
|
|
36
|
+
static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
37
|
+
/**
|
|
38
|
+
* Getting a list of translations by an array of text codes.
|
|
39
|
+
*
|
|
40
|
+
* Получение списка переводов по массиву кодов текста.
|
|
41
|
+
* @param names list of codes to get translations/ список кодов для получения переводов
|
|
42
|
+
*/
|
|
43
|
+
static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
|
|
44
|
+
/**
|
|
45
|
+
* Getting a list of translations by an array of text codes.
|
|
46
|
+
*
|
|
47
|
+
* Получение списка переводов по массиву кодов текста.
|
|
48
|
+
* @param names list of codes to get translations/ список кодов для получения переводов
|
|
49
|
+
* @param first If set to false, returns an empty string if there is no text/
|
|
50
|
+
* если установлено false, возвращает пустую строку, если нет текста
|
|
51
|
+
*/
|
|
52
|
+
static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
53
|
+
/**
|
|
54
|
+
* Added a list of translated texts.
|
|
55
|
+
*
|
|
56
|
+
* Добавлен список переведенных текстов.
|
|
57
|
+
* @param names list of codes to get translations/ список кодов для получения переводов
|
|
58
|
+
*/
|
|
59
|
+
static add(names: string | string[]): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Adds texts in sync mode.
|
|
62
|
+
*
|
|
63
|
+
* Добавляет тексты в режиме синхронизации.
|
|
64
|
+
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
65
|
+
*/
|
|
66
|
+
static addSync(data: Record<string, string>): void;
|
|
67
|
+
/**
|
|
68
|
+
* Adding data in the form of a query or directly, depending on the execution environment.
|
|
69
|
+
*
|
|
70
|
+
* Добавление данных в виде запроса или напрямую, в зависимости от среды выполнения.
|
|
71
|
+
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
72
|
+
*/
|
|
73
|
+
static addNormalOrSync(data: Record<string, string>): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Change the path to the script for obtaining the translation.
|
|
76
|
+
*
|
|
77
|
+
* Изменить путь к скрипту для получения перевода.
|
|
78
|
+
* @param url path to the script/ путь к скрипту
|
|
79
|
+
*/
|
|
80
|
+
static setUrl(url: string): Translate;
|
|
81
|
+
static setPropsName(name: string): Translate;
|
|
82
|
+
/**
|
|
83
|
+
* Getting the full title for translation.
|
|
84
|
+
*
|
|
85
|
+
* Получение полного названия для перевода.
|
|
86
|
+
* @param name code name/ название кода
|
|
87
|
+
*/
|
|
88
|
+
protected static getName(name: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* Returns a list of names that are not yet in the list.
|
|
91
|
+
*
|
|
92
|
+
* Возвращает список имен, которых еще нет в списке.
|
|
93
|
+
* @param names list of codes to get translations/ список кодов для получения переводов
|
|
94
|
+
*/
|
|
95
|
+
protected static getNamesNone(names: string | string[]): string[];
|
|
96
|
+
/**
|
|
97
|
+
* Getting the list of translations from the server.
|
|
98
|
+
*
|
|
99
|
+
* Получение списка переводов с сервера.
|
|
100
|
+
*/
|
|
101
|
+
protected static getResponse(): Promise<Record<string, string>>;
|
|
102
|
+
/**
|
|
103
|
+
* Replaces the text with the specified values.
|
|
104
|
+
*
|
|
105
|
+
* Заменяет текст на указанные значения.
|
|
106
|
+
* @param text text to replace/ текст для замены
|
|
107
|
+
* @param replacement values for replacement/ значения для замены
|
|
108
|
+
*/
|
|
109
|
+
protected static replacement(text: string, replacement?: string[] | Record<string, string | number>): any;
|
|
110
|
+
/**
|
|
111
|
+
* Adding translation data from the server.
|
|
112
|
+
*
|
|
113
|
+
* Добавление данных по переводу с сервера.
|
|
114
|
+
*/
|
|
115
|
+
protected static make(): Promise<void>;
|
|
116
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applies a template to the text, replacing keys with values from the replacement object
|
|
3
|
+
*
|
|
4
|
+
* Применяет шаблон к тексту, заменяя ключи на значения из объекта замены
|
|
5
|
+
* @param text text with a template containing keys in square brackets, for example "[key]"/
|
|
6
|
+
* текст с шаблоном, содержащим ключи в квадратных скобках, например "[key]"
|
|
7
|
+
* @param replacement an object containing key-value pairs for replacement/
|
|
8
|
+
* объект, содержащий пары ключ-значение для замены
|
|
9
|
+
*/
|
|
10
|
+
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number> | string[]) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The method creates an array of "count" elements with values equal to `value`.
|
|
3
|
+
*
|
|
4
|
+
* Метод создает массив из "count" элементов со значениями равными `value`.
|
|
5
|
+
* @param value value to fill the array with/ значение, заполняющее массив
|
|
6
|
+
* @param count the number of elements in that array/ число элементов этого массива
|
|
7
|
+
*/
|
|
8
|
+
export declare function arrFill<T>(value: T, count: number): T[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Создает копию простого объекта.
|
|
3
|
+
*
|
|
4
|
+
* Creates a copy of a simple object.
|
|
5
|
+
* @param value объект для копирования/ object for copying
|
|
6
|
+
* @returns возвращает новую копию объекта/ returns a new copy of the object
|
|
7
|
+
*/
|
|
8
|
+
export declare function copyObject<T>(value: T): T;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In HTML documents, creates an element with the tag that is specified in the argument.
|
|
3
|
+
*
|
|
4
|
+
* В HTML-документах создаёт элемент с тегом, который указан в аргументе.
|
|
5
|
+
* @param parentElement the DOM node's parent Element/ родитель для нового элемента
|
|
6
|
+
* @param tagName A string that specifies the type of element to be created/ строка,
|
|
7
|
+
* указывающая элемент какого типа должен быть создан
|
|
8
|
+
* @param options an object with attributes or a function for processing an element/ объект
|
|
9
|
+
* с атрибутами или функция для обработки элемента
|
|
10
|
+
* @param referenceElement the node before which newNode is inserted/ элемент,
|
|
11
|
+
* перед которым будет вставлен newElement
|
|
12
|
+
*/
|
|
13
|
+
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selects the first element that matches the specified selectors.
|
|
3
|
+
*
|
|
4
|
+
* Выбирает первый элемент, который соответствует указанным селекторам.
|
|
5
|
+
* @param selectors selectors/ селекторы
|
|
6
|
+
*/
|
|
7
|
+
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selects all elements that match the specified selectors.
|
|
3
|
+
*
|
|
4
|
+
* Выбирает все элементы, которые соответствуют указанным селекторам.
|
|
5
|
+
* @param selectors selectors/ селекторы
|
|
6
|
+
*/
|
|
7
|
+
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encodes special characters in a string for safe use in HTML attributes.
|
|
3
|
+
*
|
|
4
|
+
* Кодирует специальные символы в строке для безопасного использования в HTML-атрибутах.
|
|
5
|
+
* @param text text to encode / текст для кодирования
|
|
6
|
+
*/
|
|
7
|
+
export declare function encodeAttribute(text: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionArgs } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* The function is executed and returns its result. Or returns the input data, if it is not a function.
|
|
4
|
+
*
|
|
5
|
+
* Выполняется функция и возвращает ее результат. Или возвращает входные данные, если это не функция
|
|
6
|
+
* @param callback function or any value/ функция или любое значение
|
|
7
|
+
*/
|
|
8
|
+
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>): T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the execution result of an asynchronous function.
|
|
3
|
+
*
|
|
4
|
+
* Возвращает выполнение асинхронной функции.
|
|
5
|
+
* @param callback function or any value/ функция или любое значение
|
|
6
|
+
*/
|
|
7
|
+
export declare function executePromise<T>(callback: (() => Promise<T>) | (() => T) | T): Promise<T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The function performs the specified function once for each element in the object.
|
|
3
|
+
* And returns an array with the results of executing the function.
|
|
4
|
+
*
|
|
5
|
+
* Функция выполняет указанную функцию один раз для каждого элемента в объекте.
|
|
6
|
+
* И возвращает массив с результатами выполнения функции.
|
|
7
|
+
* @param data object for iteration/ объект для перебора
|
|
8
|
+
* @param callback a function to execute for each element in the array/
|
|
9
|
+
* функция, которая будет вызвана для каждого элемента
|
|
10
|
+
*/
|
|
11
|
+
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[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cyclically calls requestAnimationFrame until next returns true
|
|
3
|
+
* The window.requestAnimationFrame() method tells the browser that you wish to perform
|
|
4
|
+
* an animation and requests that the browser calls a specified function to update an
|
|
5
|
+
* animation right before the next repaint.
|
|
6
|
+
*
|
|
7
|
+
* Циклически вызывает requestAnimationFrame, пока next возвращает true
|
|
8
|
+
* window.requestAnimationFrame указывает браузеру на то, что вы хотите произвести
|
|
9
|
+
* анимацию, и просит его запланировать перерисовку на следующем кадре анимации.
|
|
10
|
+
* @param callback the function to call when it's time to update your animation for the next repaint/ функция,
|
|
11
|
+
* которая будет вызвана, когда придёт время обновить вашу анимацию на следующей перерисовке
|
|
12
|
+
* @param next function that determines repetition/ функция, которая определяет повторность
|
|
13
|
+
* @param end function that is executed if the animation stops/ функция,
|
|
14
|
+
* которая выполняется, если останавливается анимация
|
|
15
|
+
*/
|
|
16
|
+
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Gets a list of attributes of an element.
|
|
4
|
+
*
|
|
5
|
+
* Получает список атрибутов у элемента.
|
|
6
|
+
* @param element selectors for matching or an Element/ селекторов для сопоставления или Element
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The method retrieves drag data (as a string) for the specified type.
|
|
3
|
+
* If the drag operation does not include data, this method returns an empty string.
|
|
4
|
+
*
|
|
5
|
+
* Метод извлекает данные перетаскивания (в виде строки) для указанного типа.
|
|
6
|
+
* @param event the ClipboardEvent interface represents events providing information
|
|
7
|
+
* related to modification of the clipboard, that is cut, copy, and paste events/ интерфейс
|
|
8
|
+
* ClipboardEvent представляет события, предоставляющие информацию, связанную с изменением буфера обмена,
|
|
9
|
+
* этими события являются cut, copy и paste.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ObjectOrArray } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of values for a specific column in the input array.
|
|
4
|
+
*
|
|
5
|
+
* Возвращает массив значений для определенного столбца входного массива.
|
|
6
|
+
* @param array a one array or an array of objects from which to pull a column of values from/
|
|
7
|
+
* многомерный массив или массив объектов, из которого будет производиться выборка значений
|
|
8
|
+
* @param column the column of values to return/ ключ столбца, значения которого нужно вернуть
|
|
9
|
+
*/
|
|
10
|
+
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the first Element in the document that matches the specified selector or the element.
|
|
4
|
+
*
|
|
5
|
+
* Возвращает первый Element документа, который соответствует указанному селектору или саму element.
|
|
6
|
+
* @param element selectors for matching or an Element/ селекторов для сопоставления или Element
|
|
7
|
+
*/
|
|
8
|
+
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the identifier (ID) of the element or creates it if the element has no ID.
|
|
4
|
+
*
|
|
5
|
+
* Возвращает идентификатор (ID) элемента или создает его, если у элемента нет ID.
|
|
6
|
+
* @param element element from which you obtain an ID/ элемент, с которого получаете ID
|
|
7
|
+
* @param selector selectors for matching/ селекторов для сопоставления
|
|
8
|
+
*/
|
|
9
|
+
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the value of an element by its key.
|
|
4
|
+
*
|
|
5
|
+
* Возвращает значение элемента по его ключу.
|
|
6
|
+
* @param element checked element/ проверяемый элемент
|
|
7
|
+
* @param index index at which we retrieve values/ индекс, по которому получаем значения
|
|
8
|
+
* @param defaultValue returns this parameter if the value is missing/ возвращает этот параметр,
|
|
9
|
+
* если значение отсутствует
|
|
10
|
+
*/
|
|
11
|
+
export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Returns window or element.
|
|
4
|
+
*
|
|
5
|
+
* Возвращает окно или элемент.
|
|
6
|
+
* @param element selectors for matching or an Element/ селекторов для сопоставления или Element
|
|
7
|
+
*/
|
|
8
|
+
export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The object is used for matching text with a pattern.
|
|
3
|
+
*
|
|
4
|
+
* Конструктор создаёт объект регулярного выражения для сопоставления текста с шаблоном.
|
|
5
|
+
* @param value test for replacement/ тест для замены
|
|
6
|
+
* @param flags если определён, может принимать любую комбинацию нижеследующих значений:
|
|
7
|
+
* g - глобальное сопоставление,
|
|
8
|
+
* i - игнорирование регистра при сопоставлении
|
|
9
|
+
* m - сопоставление по нескольким строкам.
|
|
10
|
+
* @param pattern Regular expression text in which the value :value will be replaced with the optimized value of value/
|
|
11
|
+
* Текст регулярного выражения, в котором значение :value заменится на оптимизированное значение value
|
|
12
|
+
*/
|
|
13
|
+
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns data by their path.
|
|
3
|
+
*
|
|
4
|
+
* Возвращает данные по их пути.
|
|
5
|
+
* @param item object for work/ объект для работы
|
|
6
|
+
* @param path data path/ путь к данным
|
|
7
|
+
*/
|
|
8
|
+
export declare function getItemByPath<T extends Record<string, any>>(item: T, path: string): string;
|