@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,150 @@
|
|
|
1
|
+
import { ComputedRef, ToRefs, VNode, Ref } from 'vue';
|
|
2
|
+
import { DesignComponents } from './DesignComponents';
|
|
3
|
+
import { ConstrClass, ConstrClasses, ConstrClassObject, ConstrComponent, ConstrEmit, ConstrItem, ConstrOptions, ConstrStyles } from '../../types/constructorTypes';
|
|
4
|
+
/**
|
|
5
|
+
* Class for collecting all functional components.
|
|
6
|
+
*
|
|
7
|
+
* Класс для сбора всех функциональных компонентов.
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class DesignConstructorAbstract<E extends Element, COMP extends ConstrComponent, EMITS extends ConstrItem, EXPOSE extends ConstrItem, SLOTS extends ConstrItem, CLASSES extends ConstrClasses, P extends ConstrItem> {
|
|
10
|
+
protected readonly props: Readonly<P>;
|
|
11
|
+
protected readonly options?: ConstrOptions<COMP, EMITS, P> | undefined;
|
|
12
|
+
protected readonly name: string[];
|
|
13
|
+
protected readonly element: Ref<E | undefined, E | undefined>;
|
|
14
|
+
protected readonly refs: ToRefs<P>;
|
|
15
|
+
protected readonly components: DesignComponents<COMP, P>;
|
|
16
|
+
protected readonly emits?: ConstrEmit<EMITS>;
|
|
17
|
+
protected readonly classes?: ComputedRef<CLASSES>;
|
|
18
|
+
protected classesSub?: ComputedRef<Partial<CLASSES>>;
|
|
19
|
+
protected readonly styles?: ComputedRef<ConstrStyles>;
|
|
20
|
+
protected stylesSub?: ComputedRef<ConstrStyles>;
|
|
21
|
+
protected attrs?: ConstrItem;
|
|
22
|
+
protected slots?: SLOTS;
|
|
23
|
+
protected dataExpose?: EXPOSE;
|
|
24
|
+
/**
|
|
25
|
+
* Constructor
|
|
26
|
+
* @param name class name/ название класса
|
|
27
|
+
* @param props properties/ свойства
|
|
28
|
+
* @param options list of additional parameters/ список дополнительных параметров
|
|
29
|
+
*/
|
|
30
|
+
protected constructor(name: string, props: Readonly<P>, options?: ConstrOptions<COMP, EMITS, P> | undefined);
|
|
31
|
+
protected init(): this;
|
|
32
|
+
/**
|
|
33
|
+
* Getting the class name.
|
|
34
|
+
*
|
|
35
|
+
* Получение названия класса.
|
|
36
|
+
*/
|
|
37
|
+
getName(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Getting the class name.
|
|
40
|
+
*
|
|
41
|
+
* Получение названия дизайна.
|
|
42
|
+
*/
|
|
43
|
+
getDesign(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Getting the class name.
|
|
46
|
+
*
|
|
47
|
+
* Получение названия класса.
|
|
48
|
+
* @param name list of class names by levels/ список названий классов по уровням
|
|
49
|
+
*/
|
|
50
|
+
getSubClass(name: string | string[]): string;
|
|
51
|
+
/**
|
|
52
|
+
* Getting the class name for the status.
|
|
53
|
+
*
|
|
54
|
+
* Получение названия класса для статуса.
|
|
55
|
+
* @param name list of class names by levels/ список названий классов по уровням
|
|
56
|
+
*/
|
|
57
|
+
getStatusClass(name: string | string[]): string;
|
|
58
|
+
/**
|
|
59
|
+
* Getting the property name for the style.
|
|
60
|
+
*
|
|
61
|
+
* Получение названия свойства для стиля.
|
|
62
|
+
* @param name list of class names by levels/ список названий классов по уровням
|
|
63
|
+
*/
|
|
64
|
+
getStyle(name: string | string[]): string;
|
|
65
|
+
/**
|
|
66
|
+
* Getting additional parameters.
|
|
67
|
+
*
|
|
68
|
+
* Получение дополнительных параметров.
|
|
69
|
+
*/
|
|
70
|
+
getAttrs(): ConstrItem;
|
|
71
|
+
/**
|
|
72
|
+
* List of available external variables.
|
|
73
|
+
*
|
|
74
|
+
* Список доступных переменных извне.
|
|
75
|
+
*/
|
|
76
|
+
expose(): EXPOSE;
|
|
77
|
+
/**
|
|
78
|
+
* The rendering method for the setup method.
|
|
79
|
+
*
|
|
80
|
+
* Метод рендеринга для метода настройки.
|
|
81
|
+
*/
|
|
82
|
+
render(): () => VNode | (VNode | any)[] | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Initialization of all the necessary properties for work
|
|
85
|
+
*
|
|
86
|
+
* Инициализация всех необходимых свойств для работы.
|
|
87
|
+
*/
|
|
88
|
+
protected abstract initExpose(): EXPOSE;
|
|
89
|
+
/**
|
|
90
|
+
* Improvement of the obtained list of classes.
|
|
91
|
+
*
|
|
92
|
+
* Доработка полученного списка классов.
|
|
93
|
+
*/
|
|
94
|
+
protected abstract initClasses(): Partial<CLASSES>;
|
|
95
|
+
/**
|
|
96
|
+
* Refinement of the received list of styles.
|
|
97
|
+
*
|
|
98
|
+
* Доработка полученного списка стилей.
|
|
99
|
+
*/
|
|
100
|
+
protected abstract initStyles(): ConstrStyles;
|
|
101
|
+
/**
|
|
102
|
+
* A method for rendering.
|
|
103
|
+
*
|
|
104
|
+
* Метод для рендеринга.
|
|
105
|
+
*/
|
|
106
|
+
protected abstract initRender(): VNode | (VNode | any)[] | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Initializes the slot.
|
|
109
|
+
*
|
|
110
|
+
* Инициализирует слот.
|
|
111
|
+
* @param name slot name/ название слота
|
|
112
|
+
* @param children if you pass this element, the slot will be added to it/
|
|
113
|
+
* если передать этот элемент, то слот добавится в него
|
|
114
|
+
* @param props property for the slot/ свойство для слота
|
|
115
|
+
*/
|
|
116
|
+
protected initSlot<K extends keyof SLOTS>(name: K, children?: any[], props?: ConstrItem): VNode | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Transformation of the class value into an object.
|
|
119
|
+
*
|
|
120
|
+
* Преобразование значения класса в объект.
|
|
121
|
+
* @param classes list of classes for transformation/ список классов для преобразования
|
|
122
|
+
*/
|
|
123
|
+
protected toClass(classes?: ConstrClass): ConstrClassObject;
|
|
124
|
+
/**
|
|
125
|
+
* Converts the class name to standard for the current component.
|
|
126
|
+
*
|
|
127
|
+
* Преобразовывает название класса в стандартное для текущего компонента.
|
|
128
|
+
* @param classes list of classes/ список классов
|
|
129
|
+
*/
|
|
130
|
+
protected toClassName<T extends ConstrItem>(classes?: ConstrItem): T;
|
|
131
|
+
/**
|
|
132
|
+
* Getting component names as an array.
|
|
133
|
+
*
|
|
134
|
+
* Получение названий компонентов в виде массива.
|
|
135
|
+
* @param name component name for transformation/ название компонента для преобразования
|
|
136
|
+
*/
|
|
137
|
+
private initName;
|
|
138
|
+
/**
|
|
139
|
+
* Updating data about the class.
|
|
140
|
+
*
|
|
141
|
+
* Обновление данных об классе.
|
|
142
|
+
*/
|
|
143
|
+
private updateClasses;
|
|
144
|
+
/**
|
|
145
|
+
* Refinement of the received list of styles.
|
|
146
|
+
*
|
|
147
|
+
* Доработка полученного списка стилей.
|
|
148
|
+
*/
|
|
149
|
+
private updateStyles;
|
|
150
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { Datetime } from '../Datetime';
|
|
3
|
+
import { NumberOrStringOrDate } from '../../types/basicTypes';
|
|
4
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
5
|
+
import { GeoDate, GeoFirstDay, GeoHours } from '../../types/geoTypes';
|
|
6
|
+
/**
|
|
7
|
+
* A class for working with dates.
|
|
8
|
+
*
|
|
9
|
+
* Класс для работы с датами.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DatetimeRef {
|
|
12
|
+
protected item: Ref<NumberOrStringOrDate>;
|
|
13
|
+
protected type: Ref<GeoDate>;
|
|
14
|
+
protected code: Ref<string>;
|
|
15
|
+
protected date: Ref<Date>;
|
|
16
|
+
protected datetime: Datetime;
|
|
17
|
+
protected year: ComputedRef<number>;
|
|
18
|
+
protected month: ComputedRef<number>;
|
|
19
|
+
protected day: ComputedRef<number>;
|
|
20
|
+
protected hour: ComputedRef<number>;
|
|
21
|
+
protected minute: ComputedRef<number>;
|
|
22
|
+
protected second: ComputedRef<number>;
|
|
23
|
+
/**
|
|
24
|
+
* Constructor
|
|
25
|
+
* @param date date for processing. дата для обработки
|
|
26
|
+
* @param type type of date format for output. тип формата даты вывода
|
|
27
|
+
* @param code country and language code. код страны и языка
|
|
28
|
+
*/
|
|
29
|
+
constructor(date: RefOrNormal<NumberOrStringOrDate>, type?: RefOrNormal<GeoDate>, code?: RefOrNormal<string>);
|
|
30
|
+
/**
|
|
31
|
+
* Returns the basic data for the date.
|
|
32
|
+
*
|
|
33
|
+
* Возвращает основные данные для даты.
|
|
34
|
+
*/
|
|
35
|
+
getItem(): RefOrNormal<NumberOrStringOrDate>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns a Date object.
|
|
38
|
+
*
|
|
39
|
+
* Возвращает объект Date.
|
|
40
|
+
*/
|
|
41
|
+
getDate(): Ref<Date>;
|
|
42
|
+
/**
|
|
43
|
+
* Obtaining an object of the basic Datetime class.
|
|
44
|
+
*
|
|
45
|
+
* Получение объекта основного класса Datetime.
|
|
46
|
+
*/
|
|
47
|
+
getDatetime(): Datetime;
|
|
48
|
+
/**
|
|
49
|
+
* Returns the format of hours.
|
|
50
|
+
*
|
|
51
|
+
* Возвращает формат часов.
|
|
52
|
+
*/
|
|
53
|
+
getHoursType(): ComputedRef<GeoHours>;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the code of the first day of the week.
|
|
56
|
+
*
|
|
57
|
+
* Возвращает код первого дня недели.
|
|
58
|
+
*/
|
|
59
|
+
getFirstDayCode(): ComputedRef<GeoFirstDay>;
|
|
60
|
+
/**
|
|
61
|
+
* The method returns the year of the specified date according to local time.
|
|
62
|
+
*
|
|
63
|
+
* Метод возвращает год указанной даты по местному времени.
|
|
64
|
+
*/
|
|
65
|
+
getYear(): ComputedRef<number>;
|
|
66
|
+
/**
|
|
67
|
+
* The method returns the month in the specified date according to local time,
|
|
68
|
+
* as a zero-based value.
|
|
69
|
+
*
|
|
70
|
+
* Метод возвращает месяц указанной даты по местному времени, нумерация
|
|
71
|
+
* месяцев начинается с нуля для первого месяца в году.
|
|
72
|
+
*/
|
|
73
|
+
getMonth(): ComputedRef<number>;
|
|
74
|
+
/**
|
|
75
|
+
* The method returns the day of the month for the specified date according to local time.
|
|
76
|
+
*
|
|
77
|
+
* Метод возвращает день месяца указанной даты по местному времени.
|
|
78
|
+
*/
|
|
79
|
+
getDay(): ComputedRef<number>;
|
|
80
|
+
/**
|
|
81
|
+
* The method returns the hour for the specified date, according to local time.
|
|
82
|
+
*
|
|
83
|
+
* Метод возвращает часы указанной даты по местному времени.
|
|
84
|
+
*/
|
|
85
|
+
getHour(): ComputedRef<number>;
|
|
86
|
+
/**
|
|
87
|
+
* The method returns the minutes in the specified date according to local time.
|
|
88
|
+
*
|
|
89
|
+
* Метод возвращает минуты указанной даты по местному времени.
|
|
90
|
+
*/
|
|
91
|
+
getMinute(): ComputedRef<number>;
|
|
92
|
+
/**
|
|
93
|
+
* The method returns the seconds in the specified date according to local time.
|
|
94
|
+
*
|
|
95
|
+
* Метод возвращает секунды указанной даты по местному времени.
|
|
96
|
+
*/
|
|
97
|
+
getSecond(): ComputedRef<number>;
|
|
98
|
+
/**
|
|
99
|
+
* Returns the last day of the week.
|
|
100
|
+
*
|
|
101
|
+
* Возвращает последний день недели.
|
|
102
|
+
*/
|
|
103
|
+
getMaxDay(): ComputedRef<number>;
|
|
104
|
+
/**
|
|
105
|
+
* Enables language-sensitive date and time formatting.
|
|
106
|
+
*
|
|
107
|
+
* Конструктором объектов, включающих языка-зависимое форматирование даты и времени.
|
|
108
|
+
* @param type type of date format for output. тип формата даты вывода
|
|
109
|
+
* @param styleOptions the representation of the month. представление месяца
|
|
110
|
+
*/
|
|
111
|
+
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): ComputedRef<string>;
|
|
112
|
+
/**
|
|
113
|
+
* Output of standard data.
|
|
114
|
+
*
|
|
115
|
+
* Вывод стандартных данных.
|
|
116
|
+
* @param timeZone add time zone. добавить временную зону
|
|
117
|
+
*/
|
|
118
|
+
standard(timeZone?: boolean): ComputedRef<string>;
|
|
119
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventItem } from '../EventItem';
|
|
2
|
+
import { ElementOrString, ElementOrWindow, EventListenerDetail, EventOptions } from '../../types/basicTypes';
|
|
3
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
4
|
+
/**
|
|
5
|
+
* Class for working with events (Ref).
|
|
6
|
+
*
|
|
7
|
+
* Класс для работа с события (Ref).
|
|
8
|
+
*/
|
|
9
|
+
export declare class EventRef<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> extends EventItem<E, O, D> {
|
|
10
|
+
/**
|
|
11
|
+
* Classes Constructor
|
|
12
|
+
* @param elementSelector element/ элемент
|
|
13
|
+
* @param elementSelectorControl control element/ элемент управления
|
|
14
|
+
* @param type type/ тип
|
|
15
|
+
* @param listener the object that receives a notification (an object that implements the
|
|
16
|
+
* Event interface) when an event of the specified type occurs/ объект, который принимает
|
|
17
|
+
* уведомление, когда событие указанного типа произошло
|
|
18
|
+
* @param options object that specifies characteristics/ объект options
|
|
19
|
+
* @param detail an event-dependent value associated with the event/ зависимое от события
|
|
20
|
+
* значение, связанное с событием
|
|
21
|
+
*/
|
|
22
|
+
constructor(elementSelector?: RefOrNormal<ElementOrString<E> | undefined>, elementSelectorControl?: RefOrNormal<ElementOrString<HTMLElement>>, type?: string | string[], listener?: EventListenerDetail<O, D>, options?: EventOptions, detail?: D);
|
|
23
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { GeoFlag } from '../GeoFlag';
|
|
3
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
4
|
+
import { GeoFlagItem, GeoFlagNational } from '../../types/geoTypes';
|
|
5
|
+
/**
|
|
6
|
+
* Class for working with Flags.
|
|
7
|
+
*
|
|
8
|
+
* Класс для работы с Флагами.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GeoFlagRef {
|
|
11
|
+
protected code: Ref<string>;
|
|
12
|
+
protected flag: GeoFlag;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param code country and language code/ код страны и языка
|
|
16
|
+
*/
|
|
17
|
+
constructor(code?: RefOrNormal<string>);
|
|
18
|
+
/**
|
|
19
|
+
* Obtaining a reactive object with the country code.
|
|
20
|
+
*
|
|
21
|
+
* Получение реактивного объекта с кодом страны.
|
|
22
|
+
*/
|
|
23
|
+
getCode(): Ref<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns information about the country and its flag.
|
|
26
|
+
*
|
|
27
|
+
* Возвращает информацию о стране и её флаге.
|
|
28
|
+
* @param code country code/ код страны
|
|
29
|
+
*/
|
|
30
|
+
get(code?: string): ComputedRef<GeoFlagItem | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Getting a link to the flag.
|
|
33
|
+
*
|
|
34
|
+
* Получение ссылки на флаг.
|
|
35
|
+
* @param code country code/ код страны
|
|
36
|
+
*/
|
|
37
|
+
getFlag(code?: string): ComputedRef<string | undefined>;
|
|
38
|
+
/**
|
|
39
|
+
* Getting a list of countries by an array of codes.
|
|
40
|
+
*
|
|
41
|
+
* Получение списка стран по массиву с кодами.
|
|
42
|
+
* @param codes country code/ код страны
|
|
43
|
+
*/
|
|
44
|
+
getList(codes?: string[]): ComputedRef<GeoFlagItem[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Getting a list of countries by an array of codes in national language.
|
|
47
|
+
*
|
|
48
|
+
* Получение списка стран по массиву с кодами на национальный язык.
|
|
49
|
+
* @param codes country code/ код страны.
|
|
50
|
+
*/
|
|
51
|
+
getNational(codes?: string[]): ComputedRef<GeoFlagNational[]>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { ItemValue, NumberOrString, NumberOrStringOrDate } from '../../types/basicTypes';
|
|
3
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
4
|
+
import { GeoDate } from '../../types/geoTypes';
|
|
5
|
+
/**
|
|
6
|
+
* Reactive class for managing the formatting of numbers and dates.
|
|
7
|
+
*
|
|
8
|
+
* Реактивный класс для управления форматированием чисел и дат.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GeoIntlRef {
|
|
11
|
+
private location;
|
|
12
|
+
private intl;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param code country code, full form language-country or one of them/
|
|
16
|
+
* код страны, полный вид язык-страна или один из них
|
|
17
|
+
*/
|
|
18
|
+
constructor(code?: RefOrNormal<string>);
|
|
19
|
+
/**
|
|
20
|
+
* The consistent translation of language, region and script display names.
|
|
21
|
+
*
|
|
22
|
+
* Последовательный перевод отображаемых названий языка, региона и скрипта.
|
|
23
|
+
* @param value the code to provide depends on the type/ предоставляемый код зависит от типа
|
|
24
|
+
* @param typeOptions an object with some or all of the following properties/
|
|
25
|
+
* объект с некоторыми или всеми из следующих свойств
|
|
26
|
+
*/
|
|
27
|
+
display(value?: RefOrNormal<string>, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): ComputedRef<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Get display names of language.
|
|
30
|
+
*
|
|
31
|
+
* Получить отображаемые имена языка.
|
|
32
|
+
* @param value the code to provide depends on the type/ предоставляемый код зависит от типа
|
|
33
|
+
* @param style the formatting style to use/ используемый стиль форматирования
|
|
34
|
+
*/
|
|
35
|
+
languageName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Get display names of region.
|
|
38
|
+
*
|
|
39
|
+
* Получить отображаемые имена региона.
|
|
40
|
+
* @param value the code to provide depends on the type/ предоставляемый код зависит от типа
|
|
41
|
+
* @param style the formatting style to use/ используемый стиль форматирования
|
|
42
|
+
*/
|
|
43
|
+
countryName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
44
|
+
/**
|
|
45
|
+
* In basic use without specifying a locale, a formatted string.
|
|
46
|
+
*
|
|
47
|
+
* При обычном использовании без указания локали форматированная строка
|
|
48
|
+
*
|
|
49
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
50
|
+
* @param options an object with some or all properties/ объект с некоторыми
|
|
51
|
+
* или всеми свойствами
|
|
52
|
+
*/
|
|
53
|
+
number(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Decimal point symbol.
|
|
56
|
+
*
|
|
57
|
+
* Символ десятичной точки.
|
|
58
|
+
*/
|
|
59
|
+
decimal(): ComputedRef<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Currency formatting.
|
|
62
|
+
*
|
|
63
|
+
* Форматирование валюты.
|
|
64
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
65
|
+
* @param currencyOptions the currency to use in currency formatting/
|
|
66
|
+
* валюта для использования в форматировании валюты
|
|
67
|
+
* @param numberOnly do not display the currency symbol/ не выводить значок валюты
|
|
68
|
+
*/
|
|
69
|
+
currency(value: RefOrNormal<NumberOrString>, currencyOptions?: RefOrNormal<string | Intl.NumberFormatOptions>, numberOnly?: boolean): ComputedRef<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Unit formatting.
|
|
72
|
+
* If the style is 'unit', a unit property must be provided.
|
|
73
|
+
*
|
|
74
|
+
* Форматирование юнитов.
|
|
75
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
76
|
+
* @param unitOptions the unit to use in unit formatting/ блок для использования
|
|
77
|
+
* в форматировании блока
|
|
78
|
+
*/
|
|
79
|
+
unit(value: RefOrNormal<NumberOrString>, unitOptions?: string | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Number as a percentage.
|
|
82
|
+
*
|
|
83
|
+
* Число в виде процента.
|
|
84
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
85
|
+
* @param options an object with some or all properties/ объект с некоторыми или всеми свойствами
|
|
86
|
+
*/
|
|
87
|
+
percent(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
88
|
+
/**
|
|
89
|
+
* Number as a percentage (unit).
|
|
90
|
+
*
|
|
91
|
+
* Число в виде процента (единица).
|
|
92
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
93
|
+
* @param options an object with some or all properties/
|
|
94
|
+
* объект с некоторыми или всеми свойствами
|
|
95
|
+
*/
|
|
96
|
+
percentBy100(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
97
|
+
/**
|
|
98
|
+
* Enables language-sensitive date and time formatting.
|
|
99
|
+
*
|
|
100
|
+
* Конструктором объектов, включающих языка-зависимое форматирование даты и времени.
|
|
101
|
+
* @param value the date to format/ дата для форматирования
|
|
102
|
+
* @param type type of data format/ тип формата data
|
|
103
|
+
* @param styleOptions the representation of the month/ представление месяца
|
|
104
|
+
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
105
|
+
*/
|
|
106
|
+
date(value: RefOrNormal<NumberOrStringOrDate>, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): ComputedRef<string>;
|
|
107
|
+
/**
|
|
108
|
+
* Enables language-sensitive relative time formatting.
|
|
109
|
+
*
|
|
110
|
+
* Включает форматирование относительного времени с учетом языка.
|
|
111
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
112
|
+
* @param styleOptions the length of the internationalized message/
|
|
113
|
+
* длина интернационализированного сообщения
|
|
114
|
+
* @param todayValue current day/ текущий день
|
|
115
|
+
*/
|
|
116
|
+
relative(value: RefOrNormal<NumberOrStringOrDate>, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): ComputedRef<string>;
|
|
117
|
+
/**
|
|
118
|
+
* Enables language-sensitive relative time formatting
|
|
119
|
+
* Including the ability to add a limit to output the standard time format if the value
|
|
120
|
+
* exceeds the allowable limit.
|
|
121
|
+
*
|
|
122
|
+
* Включает форматирование относительного времени с учетом языка.
|
|
123
|
+
* Включая возможность добавления лимита, чтобы выводить уже стандартный формат времени,
|
|
124
|
+
* если значение вышло за пределы допустимого.
|
|
125
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
126
|
+
* @param limit values that determine the output limit (values per day)/
|
|
127
|
+
* значения, по которым определяем предел вывода (значения в день)
|
|
128
|
+
* @param todayValue current day/ текущий день
|
|
129
|
+
* @param relativeOptions the length of the internationalized message/
|
|
130
|
+
* длина интернационализированного сообщения
|
|
131
|
+
* @param dateOptions the representation of the month/ представление месяца
|
|
132
|
+
* @param type type of data format/ тип формата data
|
|
133
|
+
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
134
|
+
*/
|
|
135
|
+
relativeLimit(value: RefOrNormal<NumberOrStringOrDate>, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): ComputedRef<string>;
|
|
136
|
+
/**
|
|
137
|
+
* Names of months.
|
|
138
|
+
*
|
|
139
|
+
* Названия месяцев.
|
|
140
|
+
* @param value the date to format/ дата для форматирования
|
|
141
|
+
* @param style the representation of the month/ представление месяца
|
|
142
|
+
*/
|
|
143
|
+
month(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['month']): ComputedRef<string>;
|
|
144
|
+
/**
|
|
145
|
+
* Array to list of months.
|
|
146
|
+
*
|
|
147
|
+
* Массив в список месяцев.
|
|
148
|
+
* @param style the representation of the month/ представление месяца
|
|
149
|
+
*/
|
|
150
|
+
months(style?: Intl.DateTimeFormatOptions['month']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
151
|
+
/**
|
|
152
|
+
* Returns names of days of the week.
|
|
153
|
+
*
|
|
154
|
+
* Возвращает названия дней недели.
|
|
155
|
+
* @param value the date to format/ дата для форматирования
|
|
156
|
+
* @param style the representation of the weekday/ представление о дне недели
|
|
157
|
+
*/
|
|
158
|
+
weekday(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<string>;
|
|
159
|
+
/**
|
|
160
|
+
* An array of the list of names of the days of the week.
|
|
161
|
+
*
|
|
162
|
+
* Массив из списка названий дней недели.
|
|
163
|
+
* @param style the representation of the weekday/ представление о дне недели
|
|
164
|
+
*/
|
|
165
|
+
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
166
|
+
/**
|
|
167
|
+
* Time.
|
|
168
|
+
*
|
|
169
|
+
* Время.
|
|
170
|
+
* @param value the date to format/ дата для форматирования
|
|
171
|
+
*/
|
|
172
|
+
time(value: RefOrNormal<NumberOrStringOrDate>): ComputedRef<string>;
|
|
173
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { GeoItemFull } from '../../types/geoTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Reactive class for working with geographic data.
|
|
5
|
+
*
|
|
6
|
+
* Реактивный класс для работы с географическими данными.
|
|
7
|
+
*/
|
|
8
|
+
export declare class GeoRef {
|
|
9
|
+
private static readonly item;
|
|
10
|
+
private static readonly country;
|
|
11
|
+
private static readonly language;
|
|
12
|
+
private static readonly standard;
|
|
13
|
+
private static readonly firstDay;
|
|
14
|
+
/**
|
|
15
|
+
* Information about the current country.
|
|
16
|
+
*
|
|
17
|
+
* Информация об текущей стране.
|
|
18
|
+
*/
|
|
19
|
+
static get(): Ref<GeoItemFull>;
|
|
20
|
+
/**
|
|
21
|
+
* Current country.
|
|
22
|
+
*
|
|
23
|
+
* Текущая страна.
|
|
24
|
+
*/
|
|
25
|
+
static getCountry(): ComputedRef<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Current language.
|
|
28
|
+
*
|
|
29
|
+
* Текущий язык.
|
|
30
|
+
*/
|
|
31
|
+
static getLanguage(): ComputedRef<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Full format according to the standard.
|
|
34
|
+
*
|
|
35
|
+
* Полный формат согласно стандарту.
|
|
36
|
+
*/
|
|
37
|
+
static getStandard(): ComputedRef<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the first day of the week.
|
|
40
|
+
*
|
|
41
|
+
* Возвращает первый день недели.
|
|
42
|
+
*/
|
|
43
|
+
static getFirstDay(): ComputedRef<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Changes the data by the full code.
|
|
46
|
+
*
|
|
47
|
+
* Изменяет данные по полному коду.
|
|
48
|
+
* @param code country code, full form language-country or one of them/
|
|
49
|
+
* код страны, полный вид язык-страна или один из них
|
|
50
|
+
*/
|
|
51
|
+
static set(code: string): void;
|
|
52
|
+
}
|