@dxtmisha/functional 1.0.9
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 +767 -0
- package/dist/Icons-C2lZhD4l.js +1284 -0
- package/dist/classes/Api.d.ts +305 -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 +52 -0
- package/dist/classes/CookieBlock.d.ts +22 -0
- package/dist/classes/DataStorage.d.ts +70 -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/ScrollbarWidth.d.ts +33 -0
- package/dist/classes/Translate.d.ts +116 -0
- package/dist/classes/design/DesignAbstract.d.ts +61 -0
- package/dist/classes/design/DesignAsyncAbstract.d.ts +28 -0
- package/dist/classes/design/DesignChanged.d.ts +42 -0
- package/dist/classes/design/DesignComp.d.ts +4 -0
- package/dist/classes/design/DesignComponents.d.ts +81 -0
- package/dist/classes/design/DesignConstructorAbstract.d.ts +150 -0
- package/dist/classes/ref/DatetimeRef.d.ts +119 -0
- package/dist/classes/ref/EventRef.d.ts +23 -0
- package/dist/classes/ref/GeoFlagRef.d.ts +52 -0
- package/dist/classes/ref/GeoIntlRef.d.ts +173 -0
- package/dist/classes/ref/GeoRef.d.ts +52 -0
- package/dist/classes/ref/ListDataRef.d.ts +228 -0
- package/dist/classes/ref/RouterItemRef.d.ts +36 -0
- package/dist/classes/ref/ScrollbarWidthRef.d.ts +24 -0
- package/dist/composables/ref/useApiRef.d.ts +25 -0
- package/dist/composables/ref/useCookieRef.d.ts +11 -0
- package/dist/composables/ref/useGeoIntlRef.d.ts +7 -0
- package/dist/composables/ref/useHashRef.d.ts +9 -0
- package/dist/composables/ref/useLazyRef.d.ts +33 -0
- package/dist/composables/ref/useLoadingRef.d.ts +7 -0
- package/dist/composables/ref/useSessionRef.d.ts +9 -0
- package/dist/composables/ref/useStorageRef.d.ts +10 -0
- package/dist/composables/ref/useTranslateRef.d.ts +16 -0
- package/dist/flags.d.ts +1 -0
- package/dist/flags.js +8 -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/eventStopPropagation.d.ts +7 -0
- package/dist/functions/executeFunction.d.ts +8 -0
- package/dist/functions/executePromise.d.ts +7 -0
- package/dist/functions/executeUse.d.ts +11 -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/ref/getBindRef.d.ts +13 -0
- package/dist/functions/ref/getComputedAsync.d.ts +9 -0
- package/dist/functions/ref/getRef.d.ts +8 -0
- package/dist/functions/ref/render.d.ts +13 -0
- package/dist/functions/ref/setRef.d.ts +9 -0
- package/dist/functions/ref/toComputed.d.ts +8 -0
- package/dist/functions/ref/toRefItem.d.ts +9 -0
- package/dist/functions/render/getBind.d.ts +14 -0
- package/dist/functions/render/getClassName.d.ts +8 -0
- package/dist/functions/render/getIndexForRender.d.ts +10 -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/toBind.d.ts +10 -0
- package/dist/functions/toBinds.d.ts +9 -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 +135 -0
- package/dist/library.js +4254 -0
- package/dist/types/basicTypes.d.ts +126 -0
- package/dist/types/constructorTypes.d.ts +114 -0
- package/dist/types/geoTypes.d.ts +86 -0
- package/dist/types/listTypes.d.ts +61 -0
- package/dist/types/refTypes.d.ts +36 -0
- package/package.json +77 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The method creates a string of length count, consisting of the characters value.
|
|
3
|
+
*
|
|
4
|
+
* Метод создает строку длиной count, состоящую из символов value.
|
|
5
|
+
* @param value character for filling/ символ для заполнения
|
|
6
|
+
* @param count length of the string/ длина строки
|
|
7
|
+
*/
|
|
8
|
+
export declare function strFill(value: string, count: number): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Преобразует значение в массив.
|
|
3
|
+
* Если переданное значение уже является массивом, возвращается оно само.
|
|
4
|
+
* В противном случае значение оборачивается в массив.
|
|
5
|
+
*
|
|
6
|
+
* Converts a value to an array.
|
|
7
|
+
* If the value is already an array, it returns it as is.
|
|
8
|
+
* Otherwise, it wraps the value in an array.
|
|
9
|
+
*
|
|
10
|
+
* @param value - Значение, которое необходимо преобразовать в массив.
|
|
11
|
+
*
|
|
12
|
+
* The value to be converted into an array.
|
|
13
|
+
* @returns Массив, содержащий переданное значение.
|
|
14
|
+
*
|
|
15
|
+
* An array containing the provided value.
|
|
16
|
+
*/
|
|
17
|
+
export declare function toArray<T>(value: T): T extends any[] ? T : [T];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ItemList } from '../types/basicTypes';
|
|
2
|
+
import { ConstrBind } from '../types/constructorTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Merges two objects with properties, taking into account their classes and styles
|
|
5
|
+
*
|
|
6
|
+
* Объединяет два объекта со свойствами с учётом классов и стилей в них
|
|
7
|
+
* @param extra additional property/ дополнительное свойство
|
|
8
|
+
* @param value input value/ входное значение
|
|
9
|
+
*/
|
|
10
|
+
export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, value: ItemList): ConstrBind<R>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConstrBind } from '../types/constructorTypes';
|
|
2
|
+
import { ItemList } from '../types/basicTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Merges multiple objects with properties, taking into account their classes and styles
|
|
5
|
+
*
|
|
6
|
+
* Объединяет несколько объектов со свойствами с учётом классов и стилей в них
|
|
7
|
+
* @param values list of input values/ список входных значений
|
|
8
|
+
*/
|
|
9
|
+
export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Преобразует строку в формат kebab-case.
|
|
3
|
+
* Преобразует все заглавные буквы в строчные, заменяет пробелы и другие символы на дефисы.
|
|
4
|
+
*
|
|
5
|
+
* Converts a string to kebab-case.
|
|
6
|
+
* It converts uppercase letters to lowercase, replaces spaces and other characters with dashes.
|
|
7
|
+
*
|
|
8
|
+
* @param value - Строка, которую необходимо преобразовать.
|
|
9
|
+
*
|
|
10
|
+
* The string to be converted.
|
|
11
|
+
* @returns Строка в формате kebab-case.
|
|
12
|
+
*
|
|
13
|
+
* The string in kebab-case format.
|
|
14
|
+
*/
|
|
15
|
+
export declare function toKebabCase(value: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NumberOrString } from '../types/basicTypes';
|
|
2
|
+
/**
|
|
3
|
+
* The method parses a string argument and returns a floating point number.
|
|
4
|
+
*
|
|
5
|
+
* Метод принимает строку в качестве аргумента и возвращает десятичное число
|
|
6
|
+
* @param value input value/ входное значение
|
|
7
|
+
*/
|
|
8
|
+
export declare function toNumber<T extends NumberOrString>(value?: T): (T & number) | number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts the data into a number, taking into account the maximum permissible value.<br>
|
|
3
|
+
* Преобразует данные в число с учетом максимально допустимого значения.
|
|
4
|
+
* @param value input value /<br>входное значение
|
|
5
|
+
* @param max maximum achievable value /<br>максимально достижимое значение
|
|
6
|
+
* @param formatting format the number /<br>форматировать число
|
|
7
|
+
* @param language formatting language /<br>язык форматирования
|
|
8
|
+
*/
|
|
9
|
+
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts values to percentages
|
|
3
|
+
*
|
|
4
|
+
* Преобразует значения в проценты
|
|
5
|
+
* @param maxValue maximum value/ максимальное значение
|
|
6
|
+
* @param value current value/ текущее значение
|
|
7
|
+
*/
|
|
8
|
+
export declare function toPercent(maxValue: number, value: number): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts values to percentages (three-digit)
|
|
3
|
+
*
|
|
4
|
+
* Преобразует значения в проценты (трёхзначный)
|
|
5
|
+
* @param maxValue maximum value/ максимальное значение
|
|
6
|
+
* @param value current value/ текущее значение
|
|
7
|
+
*/
|
|
8
|
+
export declare function toPercentBy100(maxValue: number, value: number): number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Преобразует строку в соответствующий тип данных.
|
|
3
|
+
* В зависимости от содержания строки, она может быть преобразована в
|
|
4
|
+
* `undefined`, `null`, `true`, `false`, объект, число или функцию.
|
|
5
|
+
*
|
|
6
|
+
* Transforms a string into the corresponding data type.
|
|
7
|
+
* Based on the string content, it may be transformed into `undefined`,
|
|
8
|
+
* `null`, `true`, `false`, object, number, or function.
|
|
9
|
+
*
|
|
10
|
+
* @param value - Значение, которое необходимо преобразовать
|
|
11
|
+
*
|
|
12
|
+
* The value to be transformed
|
|
13
|
+
* @param isFunction - Флаг, который указывает, необходимо ли проверять функцию
|
|
14
|
+
* в глобальном объекте window
|
|
15
|
+
*
|
|
16
|
+
* A flag that indicates whether to check for a function in the global window object
|
|
17
|
+
* @returns Преобразованное значение
|
|
18
|
+
*
|
|
19
|
+
* The transformed value
|
|
20
|
+
*/
|
|
21
|
+
export declare function transformation(value: any, isFunction?: boolean): any;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export * from './classes/Api';
|
|
2
|
+
export * from './classes/Cache';
|
|
3
|
+
export * from './classes/CacheItem';
|
|
4
|
+
export * from './classes/CacheStatic';
|
|
5
|
+
export * from './classes/Cookie';
|
|
6
|
+
export * from './classes/CookieBlock';
|
|
7
|
+
export * from './classes/DataStorage';
|
|
8
|
+
export * from './classes/Datetime';
|
|
9
|
+
export * from './classes/EventItem';
|
|
10
|
+
export * from './classes/Geo';
|
|
11
|
+
export * from './classes/GeoFlag';
|
|
12
|
+
export * from './classes/GeoIntl';
|
|
13
|
+
export * from './classes/GeoPhone';
|
|
14
|
+
export * from './classes/Global';
|
|
15
|
+
export * from './classes/Hash';
|
|
16
|
+
export * from './classes/Icons';
|
|
17
|
+
export * from './classes/Loading';
|
|
18
|
+
export * from './classes/ScrollbarWidth';
|
|
19
|
+
export * from './classes/Translate';
|
|
20
|
+
export * from './classes/design/DesignAbstract';
|
|
21
|
+
export * from './classes/design/DesignAsyncAbstract';
|
|
22
|
+
export * from './classes/design/DesignChanged';
|
|
23
|
+
export * from './classes/design/DesignComp';
|
|
24
|
+
export * from './classes/design/DesignComponents';
|
|
25
|
+
export * from './classes/design/DesignConstructorAbstract';
|
|
26
|
+
export * from './classes/ref/DatetimeRef';
|
|
27
|
+
export * from './classes/ref/EventRef';
|
|
28
|
+
export * from './classes/ref/GeoFlagRef';
|
|
29
|
+
export * from './classes/ref/GeoIntlRef';
|
|
30
|
+
export * from './classes/ref/GeoRef';
|
|
31
|
+
export * from './classes/ref/ListDataRef';
|
|
32
|
+
export * from './classes/ref/RouterItemRef';
|
|
33
|
+
export * from './classes/ref/ScrollbarWidthRef';
|
|
34
|
+
export * from './composables/ref/useApiRef';
|
|
35
|
+
export * from './composables/ref/useCookieRef';
|
|
36
|
+
export * from './composables/ref/useGeoIntlRef';
|
|
37
|
+
export * from './composables/ref/useHashRef';
|
|
38
|
+
export * from './composables/ref/useLazyRef';
|
|
39
|
+
export * from './composables/ref/useLoadingRef';
|
|
40
|
+
export * from './composables/ref/useSessionRef';
|
|
41
|
+
export * from './composables/ref/useStorageRef';
|
|
42
|
+
export * from './composables/ref/useTranslateRef';
|
|
43
|
+
export * from './functions/anyToString';
|
|
44
|
+
export * from './functions/applyTemplate';
|
|
45
|
+
export * from './functions/arrFill';
|
|
46
|
+
export * from './functions/copyObject';
|
|
47
|
+
export * from './functions/createElement';
|
|
48
|
+
export * from './functions/domQuerySelector';
|
|
49
|
+
export * from './functions/domQuerySelectorAll';
|
|
50
|
+
export * from './functions/eventStopPropagation';
|
|
51
|
+
export * from './functions/executeFunction';
|
|
52
|
+
export * from './functions/executePromise';
|
|
53
|
+
export * from './functions/executeUse';
|
|
54
|
+
export * from './functions/forEach';
|
|
55
|
+
export * from './functions/frame';
|
|
56
|
+
export * from './functions/getAttributes';
|
|
57
|
+
export * from './functions/getClipboardData';
|
|
58
|
+
export * from './functions/getColumn';
|
|
59
|
+
export * from './functions/getElement';
|
|
60
|
+
export * from './functions/getElementId';
|
|
61
|
+
export * from './functions/getElementItem';
|
|
62
|
+
export * from './functions/getElementOrWindow';
|
|
63
|
+
export * from './functions/getExp';
|
|
64
|
+
export * from './functions/getItemByPath';
|
|
65
|
+
export * from './functions/getKey';
|
|
66
|
+
export * from './functions/getLengthOfAllArray';
|
|
67
|
+
export * from './functions/getMaxLengthAllArray';
|
|
68
|
+
export * from './functions/getMinLengthAllArray';
|
|
69
|
+
export * from './functions/getMouseClient';
|
|
70
|
+
export * from './functions/getMouseClientX';
|
|
71
|
+
export * from './functions/getMouseClientY';
|
|
72
|
+
export * from './functions/getObjectByKeys';
|
|
73
|
+
export * from './functions/getObjectNoUndefined';
|
|
74
|
+
export * from './functions/getObjectOrNone';
|
|
75
|
+
export * from './functions/getRandomText';
|
|
76
|
+
export * from './functions/getRequestString';
|
|
77
|
+
export * from './functions/getStepPercent';
|
|
78
|
+
export * from './functions/getStepValue';
|
|
79
|
+
export * from './functions/goScroll';
|
|
80
|
+
export * from './functions/inArray';
|
|
81
|
+
export * from './functions/initScrollbarOffset';
|
|
82
|
+
export * from './functions/intersectKey';
|
|
83
|
+
export * from './functions/isArray';
|
|
84
|
+
export * from './functions/isDifferent';
|
|
85
|
+
export * from './functions/isDomRuntime';
|
|
86
|
+
export * from './functions/isFilled';
|
|
87
|
+
export * from './functions/isFloat';
|
|
88
|
+
export * from './functions/isFunction';
|
|
89
|
+
export * from './functions/isInDom';
|
|
90
|
+
export * from './functions/isIntegerBetween';
|
|
91
|
+
export * from './functions/isNull';
|
|
92
|
+
export * from './functions/isNumber';
|
|
93
|
+
export * from './functions/isObject';
|
|
94
|
+
export * from './functions/isObjectNotArray';
|
|
95
|
+
export * from './functions/isSelected';
|
|
96
|
+
export * from './functions/isSelectedByList';
|
|
97
|
+
export * from './functions/isString';
|
|
98
|
+
export * from './functions/isWindow';
|
|
99
|
+
export * from './functions/random';
|
|
100
|
+
export * from './functions/ref/getBindRef';
|
|
101
|
+
export * from './functions/ref/getComputedAsync';
|
|
102
|
+
export * from './functions/ref/getRef';
|
|
103
|
+
export * from './functions/ref/render';
|
|
104
|
+
export * from './functions/ref/setRef';
|
|
105
|
+
export * from './functions/ref/toComputed';
|
|
106
|
+
export * from './functions/ref/toRefItem';
|
|
107
|
+
export * from './functions/render/getBind';
|
|
108
|
+
export * from './functions/render/getClassName';
|
|
109
|
+
export * from './functions/render/getIndexForRender';
|
|
110
|
+
export * from './functions/replaceRecursive';
|
|
111
|
+
export * from './functions/replaceTemplate';
|
|
112
|
+
export * from './functions/secondToTime';
|
|
113
|
+
export * from './functions/setElementItem';
|
|
114
|
+
export * from './functions/setValues';
|
|
115
|
+
export * from './functions/splice';
|
|
116
|
+
export * from './functions/strFill';
|
|
117
|
+
export * from './functions/toArray';
|
|
118
|
+
export * from './functions/toBind';
|
|
119
|
+
export * from './functions/toBinds';
|
|
120
|
+
export * from './functions/toCamelCase';
|
|
121
|
+
export * from './functions/toCamelCaseFirst';
|
|
122
|
+
export * from './functions/toDate';
|
|
123
|
+
export * from './functions/toKebabCase';
|
|
124
|
+
export * from './functions/toNumber';
|
|
125
|
+
export * from './functions/toNumberByMax';
|
|
126
|
+
export * from './functions/toPercent';
|
|
127
|
+
export * from './functions/toPercentBy100';
|
|
128
|
+
export * from './functions/transformation';
|
|
129
|
+
export * from './functions/uniqueArray';
|
|
130
|
+
export * from './functions/writeClipboardData';
|
|
131
|
+
export * from './types/basicTypes';
|
|
132
|
+
export * from './types/constructorTypes';
|
|
133
|
+
export * from './types/geoTypes';
|
|
134
|
+
export * from './types/listTypes';
|
|
135
|
+
export * from './types/refTypes';
|