@dxtmisha/functional 1.6.6 → 1.9.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.
Files changed (4) hide show
  1. package/README.md +36 -727
  2. package/dist/library.d.ts +768 -309
  3. package/dist/library.js +1161 -446
  4. package/package.json +13 -8
package/dist/library.d.ts CHANGED
@@ -1,5 +1,8 @@
1
+ import { ApiData } from '@dxtmisha/functional-basic';
2
+ import { ApiDefaultValue } from '@dxtmisha/functional-basic';
1
3
  import { ApiFetch } from '@dxtmisha/functional-basic';
2
4
  import { ApiMethodItem } from '@dxtmisha/functional-basic';
5
+ import { ArrayToItem } from '@dxtmisha/functional-basic';
3
6
  import { ComputedGetter } from 'vue';
4
7
  import { ComputedRef } from 'vue';
5
8
  import { CookieOptions } from '@dxtmisha/functional-basic';
@@ -10,6 +13,10 @@ import { ElementOrWindow } from '@dxtmisha/functional-basic';
10
13
  import { EventItem } from '@dxtmisha/functional-basic';
11
14
  import { EventListenerDetail } from '@dxtmisha/functional-basic';
12
15
  import { EventOptions } from '@dxtmisha/functional-basic';
16
+ import { FormattersListColumns } from '@dxtmisha/functional-basic';
17
+ import { FormattersListProp } from '@dxtmisha/functional-basic';
18
+ import { FormattersOptionsList } from '@dxtmisha/functional-basic';
19
+ import { FormattersReturn } from '@dxtmisha/functional-basic';
13
20
  import { GeoDate } from '@dxtmisha/functional-basic';
14
21
  import { GeoFirstDay } from '@dxtmisha/functional-basic';
15
22
  import { GeoFlag } from '@dxtmisha/functional-basic';
@@ -28,6 +35,12 @@ import { PropType } from 'vue';
28
35
  import { Ref } from 'vue';
29
36
  import { RouteLocationRaw } from 'vue-router';
30
37
  import { Router } from 'vue-router';
38
+ import { SearchColumns } from '@dxtmisha/functional-basic';
39
+ import { SearchFormatList } from '@dxtmisha/functional-basic';
40
+ import { SearchItem } from '@dxtmisha/functional-basic';
41
+ import { SearchList } from '@dxtmisha/functional-basic';
42
+ import { SearchListValue } from '@dxtmisha/functional-basic';
43
+ import { SearchOptions } from '@dxtmisha/functional-basic';
31
44
  import { ShallowRef } from 'vue';
32
45
  import { ToRefs } from 'vue';
33
46
  import { TranslateList } from '@dxtmisha/functional-basic';
@@ -35,7 +48,34 @@ import { Undefined } from '@dxtmisha/functional-basic';
35
48
  import { VNode } from 'vue';
36
49
  import { VNodeArrayChildren } from 'vue';
37
50
 
38
- declare type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
51
+ export declare type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
52
+ path?: RefOrNormal<string | undefined>;
53
+ options?: ApiOptions;
54
+ reactivity?: boolean;
55
+ conditions?: RefType<boolean>;
56
+ transformation?: (data: Type) => ApiData<Return>;
57
+ unmounted?: boolean;
58
+ skeleton?: () => Return;
59
+ };
60
+
61
+ export declare type ApiManagementRequest<T, Return extends ApiData<T> = ApiData<T>> = {
62
+ path?: RefOrNormal<string | undefined>;
63
+ action?: (data: Return | undefined) => Promise<void> | void;
64
+ transformation?: (data: T) => Return;
65
+ toData?: boolean;
66
+ options?: ApiOptions;
67
+ };
68
+
69
+ export declare type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
70
+ columns: K;
71
+ value?: Ref<string>;
72
+ options?: SearchOptions;
73
+ };
74
+
75
+ export declare type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
76
+
77
+ /** Options for api requests/ Опции для запросов api */
78
+ export declare type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
39
79
 
40
80
  declare type BroadcastValueItem<T> = T | string | undefined;
41
81
 
@@ -45,10 +85,11 @@ declare type BroadcastValueItem<T> = T | string | undefined;
45
85
  * Создаёт вычисляемое свойство, которое может обрабатывать асинхронные геттеры.
46
86
  * @param getter Asynchronous function, synchronous function, or direct value to compute the result/
47
87
  * Асинхронная функция, синхронная функция или прямое значение для вычисления результата
88
+ * @param ignore values to be ignored/ значения для исключения из обработки
48
89
  * @param debugOptions Used for debugging reactive computations. Supported by Vue.js library/
49
90
  * Используется для отладки реактивных вычислений. Поддерживается библиотекой Vue.js
50
91
  */
51
- export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, debugOptions?: DebuggerOptions): ComputedRef<R>;
92
+ export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
52
93
 
53
94
  /**
54
95
  * Метод `computedByLanguage` предоставляет возможность создания реактивного свойства `computed`,
@@ -63,7 +104,21 @@ export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R)
63
104
  * @param debugOptions Используется для отладки реактивных вычислений.
64
105
  * Поддерживается библиотекой Vue.js
65
106
  */
66
- export declare function computedByLanguage<T, R extends (T | undefined)>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
107
+ export declare function computedByLanguage<T, R extends (T | undefined) = T | undefined>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
108
+
109
+ /**
110
+ * Creates a computed property that is computed on demand and cached.
111
+ * The value is updated automatically when dependencies change, but only if it has been accessed at least once.
112
+ * The watcher remains active throughout the life of the application.
113
+ *
114
+ * Создаёт вычисляемое свойство, которое вычисляется по требованию и кешируется.
115
+ * Значение обновляется автоматически при изменении зависимостей, но только если к нему был осуществлён доступ хотя бы один раз.
116
+ * Вотчер остаётся активным на протяжении работы всего приложения.
117
+ *
118
+ * @param getter A function that returns the value to be computed/
119
+ * Функция, которая возвращает вычисляемое значение
120
+ */
121
+ export declare function computedEternity<T>(getter: () => Promise<T> | T): Ref<T, T>;
67
122
 
68
123
  /**
69
124
  * Constructor bind type for component binding with class and style support/
@@ -117,6 +172,18 @@ export declare type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToInter
117
172
  /** Extract emit item type from constructor item/ Извлечение типа элемента emit из элемента конструктора */
118
173
  export declare type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
119
174
 
175
+ export declare type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & {
176
+ elementHtml?: ComputedRef<E | undefined>;
177
+ };
178
+
179
+ /**
180
+ * Props for link handling/ Пропсы для обработки ссылок
181
+ */
182
+ export declare type ConstrHrefProps = {
183
+ /** Hyperlink reference/ Гиперссылка */
184
+ href?: string;
185
+ };
186
+
120
187
  /** Generic record type for constructor items/ Дженерик тип записи для элементов конструктора */
121
188
  export declare type ConstrItem = Record<string, any>;
122
189
 
@@ -206,12 +273,12 @@ export declare class DatetimeRef {
206
273
  protected code: Ref<string>;
207
274
  protected date: Ref<Date>;
208
275
  protected datetime: Datetime;
209
- protected year: ComputedRef<number>;
210
- protected month: ComputedRef<number>;
211
- protected day: ComputedRef<number>;
212
- protected hour: ComputedRef<number>;
213
- protected minute: ComputedRef<number>;
214
- protected second: ComputedRef<number>;
276
+ protected year: Ref<number, number>;
277
+ protected month: Ref<number, number>;
278
+ protected day: Ref<number, number>;
279
+ protected hour: Ref<number, number>;
280
+ protected minute: Ref<number, number>;
281
+ protected second: Ref<number, number>;
215
282
  /**
216
283
  * Constructor
217
284
  * @param date date for processing. дата для обработки
@@ -224,7 +291,7 @@ export declare class DatetimeRef {
224
291
  *
225
292
  * Возвращает основные данные для даты.
226
293
  */
227
- getItem(): RefOrNormal<NumberOrStringOrDate>;
294
+ getItem(): Ref<NumberOrStringOrDate>;
228
295
  /**
229
296
  * Returns a Date object.
230
297
  *
@@ -308,6 +375,12 @@ export declare class DatetimeRef {
308
375
  * @param timeZone add time zone. добавить временную зону
309
376
  */
310
377
  standard(timeZone?: boolean): ComputedRef<string>;
378
+ /**
379
+ * Updates all reactive date values.
380
+ *
381
+ * Обновляет все реактивные значения даты.
382
+ */
383
+ protected updateDate(): this;
311
384
  }
312
385
 
313
386
  /**
@@ -596,7 +669,7 @@ export declare abstract class DesignConstructorAbstract<E extends Element, COMP
596
669
  *
597
670
  * Список доступных переменных извне.
598
671
  */
599
- expose(): EXPOSE;
672
+ expose(): ConstrExpose<E, EXPOSE>;
600
673
  /**
601
674
  * The rendering method for the setup method.
602
675
  *
@@ -672,6 +745,35 @@ export declare abstract class DesignConstructorAbstract<E extends Element, COMP
672
745
  private updateStyles;
673
746
  }
674
747
 
748
+ /**
749
+ * Global effect scope class.
750
+ *
751
+ * Глобальный класс для области действия эффекта.
752
+ */
753
+ export declare class EffectScopeGlobal {
754
+ /**
755
+ * Effect scope instance.
756
+ *
757
+ * Экземпляр области действия эффекта.
758
+ */
759
+ private static scope;
760
+ /**
761
+ * Runs a function within the global scope.
762
+ *
763
+ * Запускает функцию в глобальной области.
764
+ * @param fn function/ функция
765
+ * @returns the return value of the function/ возвращаемое значение функции
766
+ */
767
+ static run<T>(fn: () => T): T | undefined;
768
+ /**
769
+ * Gets the global effect scope instance.
770
+ *
771
+ * Получает экземпляр глобальной области действия эффекта.
772
+ * @returns the global effect scope instance/ экземпляр глобальной области действия эффекта
773
+ */
774
+ private static getScope;
775
+ }
776
+
675
777
  /**
676
778
  * Class for working with events (Ref).
677
779
  *
@@ -694,20 +796,139 @@ export declare class EventRef<E extends ElementOrWindow, O extends Event, D exte
694
796
  }
695
797
 
696
798
  /**
697
- * Returns a function for use during the initialization of control methods.
799
+ * Creates a managed singleton that encapsulates initialization logic and access mode.
698
800
  *
699
- * Возвращает функцию для использования при инициализации методов управления.
700
- * @param callback function or any value/ функция или любое значение
701
- * @param unmounted delete data from the cache/ удалить ли данные из кеша
702
- * @param isGlobal is the object global?/ является ли объект глобальным?
703
- * @param isProvide execution as a component inheritance/ выполнение как наследие компонента
801
+ * Создает управляемый синглтон, который инкапсулирует логику инициализации и режим доступа.
802
+ * @param callback Initialization function/ Функция инициализации
803
+ * @param type Initialization type/ Тип инициализации
804
+ */
805
+ export declare function executeUse<R, O extends any[], RI extends ExecuteUseReturn<R> = ExecuteUseReturn<R>>(callback: (...args: O) => R, type?: ExecuteUseType): ((...args: O) => RI) | (() => RI);
806
+
807
+ /**
808
+ * Creates a global singleton.
809
+ *
810
+ * Создает глобальный синглтон.
811
+ * @param callback Initialization function/ Функция инициализации
704
812
  */
705
- export declare function executeUse<R, O extends any[], RI extends Readonly<Readonly<R> & {
813
+ export declare function executeUseGlobal<R>(callback: () => R): (() => Readonly<R & {
814
+ /**
815
+ * Returns the raw instance without management methods/
816
+ * Возвращает чистый экземпляр без методов управления
817
+ */
818
+ init(): Readonly<R>;
819
+ /**
820
+ * Resets the cached instance (available for local and global)/
821
+ * Сбрасывает закешированный экземпляр (доступно для local и global)
822
+ */
823
+ destroyExecute?(): void;
824
+ }>) | (() => Readonly<R & {
825
+ /**
826
+ * Returns the raw instance without management methods/
827
+ * Возвращает чистый экземпляр без методов управления
828
+ */
706
829
  init(): Readonly<R>;
707
- }>>(callback: (...args: O) => R, unmounted?: boolean, isGlobal?: boolean, isProvide?: boolean): ((...args: O) => RI) | (() => RI);
830
+ /**
831
+ * Resets the cached instance (available for local and global)/
832
+ * Сбрасывает закешированный экземпляр (доступно для local и global)
833
+ */
834
+ destroyExecute?(): void;
835
+ }>);
708
836
 
837
+ /**
838
+ * Initializes all global callbacks.
839
+ *
840
+ * Инициализирует все глобальные callback.
841
+ */
709
842
  export declare function executeUseGlobalInit(): void;
710
843
 
844
+ /**
845
+ * Creates a local singleton.
846
+ *
847
+ * Создает локальный синглтон.
848
+ * @param callback Initialization function/ Функция инициализации
849
+ */
850
+ export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
851
+ /**
852
+ * Returns the raw instance without management methods/
853
+ * Возвращает чистый экземпляр без методов управления
854
+ */
855
+ init(): Readonly<R>;
856
+ /**
857
+ * Resets the cached instance (available for local and global)/
858
+ * Сбрасывает закешированный экземпляр (доступно для local и global)
859
+ */
860
+ destroyExecute?(): void;
861
+ }>) | (() => Readonly<R & {
862
+ /**
863
+ * Returns the raw instance without management methods/
864
+ * Возвращает чистый экземпляр без методов управления
865
+ */
866
+ init(): Readonly<R>;
867
+ /**
868
+ * Resets the cached instance (available for local and global)/
869
+ * Сбрасывает закешированный экземпляр (доступно для local и global)
870
+ */
871
+ destroyExecute?(): void;
872
+ }>);
873
+
874
+ /**
875
+ * Creates a component-scoped singleton.
876
+ *
877
+ * Создает компонентный синглтон.
878
+ * @param callback Initialization function/ Функция инициализации
879
+ */
880
+ export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
881
+ /**
882
+ * Returns the raw instance without management methods/
883
+ * Возвращает чистый экземпляр без методов управления
884
+ */
885
+ init(): Readonly<R>;
886
+ /**
887
+ * Resets the cached instance (available for local and global)/
888
+ * Сбрасывает закешированный экземпляр (доступно для local и global)
889
+ */
890
+ destroyExecute?(): void;
891
+ }>) | (() => Readonly<R & {
892
+ /**
893
+ * Returns the raw instance without management methods/
894
+ * Возвращает чистый экземпляр без методов управления
895
+ */
896
+ init(): Readonly<R>;
897
+ /**
898
+ * Resets the cached instance (available for local and global)/
899
+ * Сбрасывает закешированный экземпляр (доступно для local и global)
900
+ */
901
+ destroyExecute?(): void;
902
+ }>);
903
+
904
+ /**
905
+ * The object returned by the factory function/ Объект, возвращаемый фабричной функцией
906
+ */
907
+ export declare type ExecuteUseReturn<R> = Readonly<R & {
908
+ /**
909
+ * Returns the raw instance without management methods/
910
+ * Возвращает чистый экземпляр без методов управления
911
+ */
912
+ init(): Readonly<R>;
913
+ /**
914
+ * Resets the cached instance (available for local and global)/
915
+ * Сбрасывает закешированный экземпляр (доступно для local и global)
916
+ */
917
+ destroyExecute?(): void;
918
+ }>;
919
+
920
+ /**
921
+ * Types of initialization for a singleton/ Типы инициализации для синглтона
922
+ */
923
+ export declare enum ExecuteUseType {
924
+ /** A single instance for the entire application/ Единственный экземпляр на всё приложение */
925
+ global = "global",
926
+ /** Shared via provide/inject in the component tree/ Разделяется через provide/inject в дереве компонентов */
927
+ provide = "provide",
928
+ /** A single instance within the closure/ Единственный экземпляр в замыкании */
929
+ local = "local"
930
+ }
931
+
711
932
  /**
712
933
  * Class for working with Flags.
713
934
  *
@@ -822,6 +1043,16 @@ export declare class GeoIntlRef {
822
1043
  * @param numberOnly do not display the currency symbol/ не выводить значок валюты
823
1044
  */
824
1045
  currency(value: RefOrNormal<NumberOrString>, currencyOptions?: RefOrNormal<string | Intl.NumberFormatOptions>, numberOnly?: boolean): ComputedRef<string>;
1046
+ /**
1047
+ * Returns the currency symbol if it exists, otherwise the currency code.
1048
+ *
1049
+ * Возвращает символ для валюты, если он есть, или сам код валюты.
1050
+ * @param currency the currency to use in currency formatting/
1051
+ * валюта для использования в форматировании валюты
1052
+ * @param currencyDisplay how to display the currency in currency formatting/
1053
+ * как отобразить валюту в формате валюты
1054
+ */
1055
+ currencySymbol(currency: RefOrNormal<string>, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): ComputedRef<string>;
825
1056
  /**
826
1057
  * Unit formatting.
827
1058
  * If the style is 'unit', a unit property must be provided.
@@ -832,6 +1063,13 @@ export declare class GeoIntlRef {
832
1063
  * в форматировании блока
833
1064
  */
834
1065
  unit(value: RefOrNormal<NumberOrString>, unitOptions?: string | Intl.NumberFormatOptions): ComputedRef<string>;
1066
+ /**
1067
+ * Возвращает отформатированный размер файла
1068
+ * @param value a number, bigint, or string, to format /<br>число для форматирования
1069
+ * @param unitOptions the unit to use in unit formatting /<br>блок для использования
1070
+ * в форматировании блока
1071
+ */
1072
+ sizeFile(value: RefOrNormal<NumberOrString>, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): ComputedRef<string>;
835
1073
  /**
836
1074
  * Number as a percentage.
837
1075
  *
@@ -849,6 +1087,15 @@ export declare class GeoIntlRef {
849
1087
  * объект с некоторыми или всеми свойствами
850
1088
  */
851
1089
  percentBy100(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
1090
+ /**
1091
+ * Применять форматирование, учитывающее множественное число, и языковые правила, связанные с множественным числом
1092
+ * @param value a number, bigint, or string, to format/ число для форматирования
1093
+ * @param words list of words for formatting (in the format one|two|few|many|other|zero)/
1094
+ * список слов для форматирования (в формате `one|two|few|many|other|zero`)
1095
+ * @param options Property for PluralRules/ свойство для PluralRules
1096
+ * @param optionsNumber an object with some or all properties/ объект с некоторыми или всеми свойствами
1097
+ */
1098
+ plural(value: RefOrNormal<NumberOrString>, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): ComputedRef<string>;
852
1099
  /**
853
1100
  * Enables language-sensitive date and time formatting.
854
1101
  *
@@ -888,6 +1135,13 @@ export declare class GeoIntlRef {
888
1135
  * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
889
1136
  */
890
1137
  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>;
1138
+ /**
1139
+ * Возвращает отформатированное значение времени, прошедшего с момента события
1140
+ * @param value a number, bigint, or string, to format/ число для форматирования
1141
+ * @param unit time unit/ единица времени
1142
+ * @param styleOptions additional option or formatting style/ дополнительная опция или стиль форматирования
1143
+ */
1144
+ relativeByValue(value: RefOrNormal<NumberOrString>, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): ComputedRef<string>;
891
1145
  /**
892
1146
  * Names of months.
893
1147
  *
@@ -925,6 +1179,14 @@ export declare class GeoIntlRef {
925
1179
  * @param value the date to format/ дата для форматирования
926
1180
  */
927
1181
  time(value: RefOrNormal<NumberOrStringOrDate>): ComputedRef<string>;
1182
+ /**
1183
+ * Sorts strings taking into account the characteristics of countries.
1184
+ *
1185
+ * Сортирует строки с учетом особенностей стран.
1186
+ * @param data an array with data/ массив с данными
1187
+ * @param compareFn a function for sorting/ функция для сортировки
1188
+ */
1189
+ sort<T>(data: RefOrNormal<T[]>, compareFn?: (a: T, b: T) => [string, string]): ComputedRef<T[]>;
928
1190
  }
929
1191
 
930
1192
  /**
@@ -942,30 +1204,37 @@ export declare class GeoRef {
942
1204
  * Information about the current country.
943
1205
  *
944
1206
  * Информация об текущей стране.
1207
+ * @returns reactive object with full geographic information/ реактивный объект с полной географической информацией
945
1208
  */
946
1209
  static get(): Ref<GeoItemFull>;
947
1210
  /**
948
1211
  * Current country.
949
1212
  *
950
1213
  * Текущая страна.
1214
+ * @returns reactive string with the current country code/ реактивная строка с кодом текущей страны
951
1215
  */
952
1216
  static getCountry(): ComputedRef<string>;
953
1217
  /**
954
1218
  * Current language.
955
1219
  *
956
1220
  * Текущий язык.
1221
+ * @returns reactive string with the current language code/ реактивная строка с кодом текущего языка
957
1222
  */
958
1223
  static getLanguage(): ComputedRef<string>;
959
1224
  /**
960
1225
  * Full format according to the standard.
961
1226
  *
962
1227
  * Полный формат согласно стандарту.
1228
+ * @returns reactive string with the full standard locale format/
1229
+ * реактивная строка с полным форматом стандарта локали
963
1230
  */
964
1231
  static getStandard(): ComputedRef<string>;
965
1232
  /**
966
1233
  * Returns the first day of the week.
967
1234
  *
968
1235
  * Возвращает первый день недели.
1236
+ * @returns reactive string representing the first day of the week/
1237
+ * реактивная строка, представляющая первый день недели
969
1238
  */
970
1239
  static getFirstDay(): ComputedRef<string>;
971
1240
  /**
@@ -1010,15 +1279,6 @@ export declare function getBindRef<T, R extends ItemList>(value: RefOrNormal<T |
1010
1279
  */
1011
1280
  export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
1012
1281
 
1013
- /**
1014
- * Processes an asynchronous method for wrapping in computed.
1015
- *
1016
- * Обрабатывает асинхронный метод для обёртки в computed.
1017
- * @param callback callback function/ функция обратного вызова
1018
- * @param ignore values to be ignored/ значения для исключения из обработки
1019
- */
1020
- export declare const getComputedAsync: <T, I = undefined>(callback: () => Promise<Ref<T | I> | T | I>, ignore?: I) => ComputedRef<T | undefined>;
1021
-
1022
1282
  /**
1023
1283
  * Returns or generates a new element.
1024
1284
  *
@@ -1027,7 +1287,15 @@ export declare const getComputedAsync: <T, I = undefined>(callback: () => Promis
1027
1287
  * @param props property of the component/ свойство компонента
1028
1288
  * @param index the name of the key/ названия ключа
1029
1289
  */
1030
- export declare function getIndexForRender<T extends ItemList>(name: string, props?: T, index?: string): string;
1290
+ export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
1291
+
1292
+ /**
1293
+ * Get request options.
1294
+ *
1295
+ * Возвращает опции запроса.
1296
+ * @param options options / параметры
1297
+ */
1298
+ export declare const getOptions: (options?: ApiOptions) => RefOrNormal<ApiFetch>;
1031
1299
 
1032
1300
  /**
1033
1301
  * You return the values of the ref variable or the variable itself if it is not reactive.
@@ -1133,136 +1401,170 @@ export declare class ListDataRef {
1133
1401
  * Returns a list for forming a list.
1134
1402
  *
1135
1403
  * Возвращает список для формирования списка.
1404
+ * @returns reactive list of items/ реактивный список элементов
1136
1405
  */
1137
1406
  readonly data: ComputedRef<ListList>;
1138
1407
  /**
1139
1408
  * Returns a simplified list for quick loading.
1140
1409
  *
1141
1410
  * Возвращает упрощенный список для быстрой загрузки.
1411
+ * @returns simplified reactive list/ упрощенный реактивный список
1142
1412
  */
1143
1413
  readonly liteData: ComputedRef<ListList>;
1144
1414
  /**
1145
- * Returns a list of records with all additional data.
1415
+ * Returns a list of records with all additional data (focus, selection, disabled status).
1146
1416
  *
1147
- * Возвращает список записей со всеми дополнительными данными.
1417
+ * Возвращает список записей со всеми дополнительными данными (фокус, выделение, статус активности).
1418
+ * @returns full reactive list/ полный реактивный список
1148
1419
  */
1149
1420
  readonly fullData: ComputedRef<ListDataFull>;
1150
1421
  /**
1151
- * Returns a map of all entries.
1422
+ * Returns a flat map of all entries including sublists.
1152
1423
  *
1153
- * Возвращает карту всех записей.
1424
+ * Возвращает плоскую карту всех записей, включая подсписки.
1425
+ * @returns reactive flat list/ реактивный плоский список
1154
1426
  */
1155
1427
  readonly map: ComputedRef<ListList>;
1156
1428
  /** Returns a list consisting only of items/ Возвращает список, состоящий только из элементов. */
1157
1429
  readonly mapItems: ComputedRef<ListList>;
1158
1430
  /**
1159
- * Returns a list consisting only of values for selection.
1431
+ * Returns a list consisting only of values for selection (item, group, menu).
1160
1432
  *
1161
- * Возвращает список, состоящий только из значений для выбора.
1433
+ * Возвращает список, состоящий только из значений для выбора (item, group, menu).
1434
+ * @returns reactive list/ реактивный список
1162
1435
  */
1163
1436
  readonly items: ComputedRef<ListList>;
1164
1437
  /**
1165
1438
  * Finds the first element that meets the search conditions.
1166
1439
  *
1167
1440
  * Находит первый элемент, соответствующий условиям поиска.
1441
+ * @returns first found index/ первый найденный индекс
1168
1442
  */
1169
1443
  readonly highlightFirstItem: ComputedRef<number>;
1170
1444
  /**
1171
1445
  * Is there a selected item.
1172
1446
  *
1173
1447
  * Есть ли выбранный элемент.
1448
+ * @returns true if selection exists/ true, если есть выбор
1174
1449
  */
1175
1450
  readonly isSelected: ComputedRef<boolean>;
1176
- /** Is the minimum selection reached/ Достигнуто ли минимальное выделение */
1451
+ /**
1452
+ * Is the minimum selection reached.
1453
+ *
1454
+ * Достигнуто ли минимальное выделение.
1455
+ * @returns true if minimum reached/ true, если минимум достигнут
1456
+ */
1177
1457
  readonly isSelectedMin: ComputedRef<boolean>;
1178
- /** Is the maximum selection reached/ Достигнуто ли максимальное выделение */
1458
+ /**
1459
+ * Is the maximum selection reached.
1460
+ *
1461
+ * Достигнуто ли максимальное выделение.
1462
+ * @returns true if maximum reached/ true, если максимум достигнут
1463
+ */
1179
1464
  readonly isSelectedMax: ComputedRef<boolean>;
1180
1465
  /**
1181
- * Returns a list of selected items on the map/
1182
- * Возвращает список выделенных элементов на карте
1466
+ * Returns a list of selected items on the map.
1467
+ *
1468
+ * Возвращает список выделенных элементов на карте.
1469
+ * @returns reactive list of selected items/ реактивный список выделенных элементов
1183
1470
  */
1184
1471
  readonly selectedList: ComputedRef<ListList>;
1185
1472
  /**
1186
- * Returns a list of selected items in the current group/
1187
- * Возвращает список выделенных элементов в текущей группе
1473
+ * Returns a list of selected items in the current group.
1474
+ *
1475
+ * Возвращает список выделенных элементов в текущей группе.
1476
+ * @returns reactive list of selected items in group/ реактивный список выделенных элементов в группе
1188
1477
  */
1189
1478
  readonly selectedListInGroup: ComputedRef<ListList>;
1190
1479
  /**
1191
- * Returns a list of selected items on the map.
1480
+ * Returns a list of selected labels on the map.
1192
1481
  *
1193
- * Возвращает список выделенных элементов на карте.
1482
+ * Возвращает список названий выделенных элементов на карте.
1483
+ * @returns reactive list of labels/ реактивный список названий
1194
1484
  */
1195
1485
  readonly selectedNames: ComputedRef<ListNames>;
1196
1486
  /**
1197
- * Returns a list of selected item values on the map.
1487
+ * Returns a list of selected values on the map.
1198
1488
  *
1199
1489
  * Возвращает список значений выделенных элементов на карте.
1490
+ * @returns reactive list of values/ реактивный список значений
1200
1491
  */
1201
1492
  readonly selectedValues: ComputedRef<any[]>;
1202
1493
  /**
1203
1494
  * Checks whether it is necessary to first display a simplified version.
1204
1495
  *
1205
1496
  * Проверяет, надо ли сначала вывести упрощенную версию.
1497
+ * @returns true if lite mode is active/ true, если активен облегченный режим
1206
1498
  */
1207
1499
  isLite(): boolean;
1208
1500
  /**
1209
1501
  * Checks if an element is in focus.
1210
1502
  *
1211
1503
  * Проверяет, есть ли элемент в фокусе.
1504
+ * @returns true if focus exists/ true, если есть фокус
1212
1505
  */
1213
1506
  isFocus(): boolean;
1214
1507
  /**
1215
- * Checks if there is a selected item.
1508
+ * Checks if there is a highlighted item (search results).
1216
1509
  *
1217
- * Проверяет, есть ли выделенный элемент.
1510
+ * Проверяет, есть ли найденный элемент (результаты поиска).
1511
+ * @returns true if highlight exists/ true, если есть совпадения
1218
1512
  */
1219
1513
  isHighlight(): boolean;
1220
1514
  /**
1221
- * Checks if highlighting is active.
1515
+ * Checks if highlighting is active (minimum length reached).
1222
1516
  *
1223
- * Проверяет, активно ли выделение.
1517
+ * Проверяет, активно ли выделение (достигнута минимальная длина).
1518
+ * @returns true if active/ true, если активно
1224
1519
  */
1225
1520
  isHighlightActive(): boolean;
1226
1521
  /**
1227
- * Returns the number of records.
1522
+ * Returns the number of records in the current list.
1228
1523
  *
1229
- * Возвращает количество записей.
1524
+ * Возвращает количество записей в текущем списке.
1525
+ * @returns length/ количество
1230
1526
  */
1231
1527
  getLength(): number;
1232
1528
  /**
1233
- * Returns the number of all available records.
1529
+ * Returns the number of all available records in the map.
1234
1530
  *
1235
- * Возвращает количество всех доступных записей.
1531
+ * Возвращает количество всех доступных записей в карте.
1532
+ * @returns length/ количество
1236
1533
  */
1237
1534
  getLengthByMap(): number;
1238
1535
  /**
1239
- * Returns the number of all available records.
1536
+ * Returns the number of all available records (items).
1240
1537
  *
1241
- * Возвращает количество всех доступных записей.
1538
+ * Возвращает количество всех доступных записей (элементы).
1539
+ * @returns length/ количество
1242
1540
  */
1243
1541
  getLengthByItems(): number;
1244
1542
  /**
1245
- * Returns the values in focus.
1543
+ * Returns the identifier in focus.
1246
1544
  *
1247
- * Возвращает значения в фокусе.
1545
+ * Возвращает идентификатор в фокусе.
1546
+ * @returns focus identifier/ идентификатор в фокусе
1248
1547
  */
1249
1548
  getFocus(): ListSelectedItem | undefined;
1250
1549
  /**
1251
- * Returns the selected value.
1550
+ * Returns the highlight text.
1252
1551
  *
1253
- * Возвращает выделенного значение.
1552
+ * Возвращает текст для выделения.
1553
+ * @returns text/ текст
1254
1554
  */
1255
1555
  getHighlight(): string | undefined;
1256
1556
  /**
1257
1557
  * Returns the minimum length for highlight to start.
1258
1558
  *
1259
1559
  * Возвращает минимальную длину для начала выделения.
1560
+ * @returns length/ длина
1260
1561
  */
1261
1562
  getHighlightLengthStart(): number;
1262
1563
  /**
1263
- * Returns the selected value.
1564
+ * Returns the selected identifiers list.
1264
1565
  *
1265
- * Возвращает выбранное значение.
1566
+ * Возвращает список выбранных идентификаторов.
1567
+ * @returns list/ список
1266
1568
  */
1267
1569
  getSelected(): ListSelectedList | undefined;
1268
1570
  /**
@@ -1270,13 +1572,79 @@ export declare class ListDataRef {
1270
1572
  *
1271
1573
  * Возвращает элемент, перемещаясь на определенное количество шагов от выбранного элемента.
1272
1574
  * @param step number of steps/ количество шагов
1575
+ * @returns target item index/ индекс целевого элемента
1273
1576
  */
1274
1577
  getSelectedByStep(step: number): ListSelectedItem | undefined;
1578
+ /**
1579
+ * Returns the next item from the selected one.
1580
+ *
1581
+ * Возвращает следующий элемент от выбранного.
1582
+ * @returns next item index/ индекс следующего элемента
1583
+ */
1584
+ getSelectedNext(): ListSelectedItem | undefined;
1585
+ /**
1586
+ * Returns the previous item from the selected one.
1587
+ *
1588
+ * Возвращает предыдущий элемент от выбранного.
1589
+ * @returns previous item index/ индекс предыдущего элемента
1590
+ */
1591
+ getSelectedPrev(): ListSelectedItem | undefined;
1592
+ /**
1593
+ * Returns an item by moving a certain number of steps from the specified item.
1594
+ *
1595
+ * Возвращает элемент, перемещаясь на определенное количество шагов от указанного элемента.
1596
+ * @param item item/ элемент
1597
+ * @param step number of steps/ количество шагов
1598
+ * @returns target item/ целевой элемент
1599
+ */
1600
+ getItemByStep(item: ListDataItem, step: number): ListDataItem | undefined;
1601
+ /**
1602
+ * Returns the next item from the specified one.
1603
+ *
1604
+ * Возвращает следующий элемент от указанного.
1605
+ * @param item item/ элемент
1606
+ * @returns next item/ следующий элемент
1607
+ */
1608
+ getItemNext(item: ListDataItem): ListDataItem | undefined;
1609
+ /**
1610
+ * Returns the previous item from the specified one.
1611
+ *
1612
+ * Возвращает предыдущий элемент от указанного.
1613
+ * @param item item/ элемент
1614
+ * @returns previous item/ предыдущий элемент
1615
+ */
1616
+ getItemPrev(item: ListDataItem): ListDataItem | undefined;
1617
+ /**
1618
+ * Returns an item by moving a certain number of steps from the specified index.
1619
+ *
1620
+ * Возвращает элемент, перемещаясь на определенное количество шагов от указанного индекса.
1621
+ * @param index item index/ индекс элемента
1622
+ * @param step number of steps/ количество шагов
1623
+ * @returns target item/ целевой элемент
1624
+ */
1625
+ getIndexByStep(index: string, step: number): ListDataItem | undefined;
1626
+ /**
1627
+ * Returns the next item from the specified index.
1628
+ *
1629
+ * Возвращает следующий элемент от указанного индекса.
1630
+ * @param index item index/ индекс элемента
1631
+ * @returns next item/ следующий элемент
1632
+ */
1633
+ getIndexNext(index: string): ListDataItem | undefined;
1634
+ /**
1635
+ * Returns the previous item from the specified index.
1636
+ *
1637
+ * Возвращает предыдущий элемент от указанного индекса.
1638
+ * @param index item index/ индекс элемента
1639
+ * @returns previous item/ предыдущий элемент
1640
+ */
1641
+ getIndexPrev(index: string): ListDataItem | undefined;
1275
1642
  /**
1276
1643
  * Returns an item by its index.
1277
1644
  *
1278
1645
  * Возвращает элемент по его индексу.
1279
1646
  * @param index item index/ индекс элемента
1647
+ * @returns found item details/ информация о найденном элементе
1280
1648
  */
1281
1649
  getItemByIndex(index?: string): {
1282
1650
  key: number;
@@ -1287,6 +1655,7 @@ export declare class ListDataRef {
1287
1655
  *
1288
1656
  * Возвращает элемент по его ключу.
1289
1657
  * @param key item key/ ключ элемента
1658
+ * @returns found item/ найденный элемент
1290
1659
  */
1291
1660
  getItemByKey(key: number): ListDataItem | undefined;
1292
1661
  /**
@@ -1294,20 +1663,23 @@ export declare class ListDataRef {
1294
1663
  *
1295
1664
  * Возвращает первый элемент с указанным родителем.
1296
1665
  * @param parent parent identifier to search for / идентификатор родителя для поиска
1666
+ * @returns first item/ первый элемент
1297
1667
  */
1298
- getFirstItemByParent(parent: string): ListDataItem | undefined;
1668
+ getFirstItemByParent(parent: string | undefined): ListDataItem | undefined;
1299
1669
  /**
1300
1670
  * Returns the last item with the specified parent.
1301
1671
  *
1302
1672
  * Возвращает последний элемент с указанным родителем.
1303
1673
  * @param parent parent identifier to search for / идентификатор родителя для поиска
1674
+ * @returns last item/ последний элемент
1304
1675
  */
1305
- getLastItemByParent(parent: string): ListDataItem | undefined;
1676
+ getLastItemByParent(parent: string | undefined): ListDataItem | undefined;
1306
1677
  /**
1307
1678
  * Returns a sublist object for a group item.
1308
1679
  *
1309
1680
  * Возвращает объект подсписка для группового элемента.
1310
1681
  * @param item List item data/ данные элемента списка
1682
+ * @returns sublist instance/ экземпляр подсписка
1311
1683
  */
1312
1684
  getSubList(item: ListDataItem): ListDataRef;
1313
1685
  /**
@@ -1324,7 +1696,7 @@ export declare class ListDataRef {
1324
1696
  * @param parent parent identifier to search for / идентификатор родителя для поиска
1325
1697
  * @param item List item data/ данные элемента списка
1326
1698
  */
1327
- protected isInParent(parent: string, item: ListDataItem): boolean;
1699
+ protected isInParent(parent: string | undefined, item: ListDataItem): boolean;
1328
1700
  /**
1329
1701
  * Returns the index for the list item.
1330
1702
  *
@@ -1427,7 +1799,7 @@ export declare type RefUndefined<T> = RefType<T | undefined>;
1427
1799
  * @param children sub-elements of the component/ под элементы компонента
1428
1800
  * @param index the name of the key/ названия ключа
1429
1801
  */
1430
- export declare function render<T extends ItemList>(name: string, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
1802
+ export declare function render<T extends ItemList>(name: string | any, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
1431
1803
 
1432
1804
  /**
1433
1805
  * Router management class.
@@ -1442,6 +1814,24 @@ export declare class RouterItemRef {
1442
1814
  * Получить экземпляр роутера.
1443
1815
  */
1444
1816
  static get(): Router | undefined;
1817
+ /**
1818
+ * Returns the link by name.
1819
+ *
1820
+ * Возвращает ссылку по имени.
1821
+ * @param name route name/ имя маршрута
1822
+ * @param params route parameters/ параметры маршрута
1823
+ * @param query route query/ запрос маршрута
1824
+ */
1825
+ static getLink(name: string, params?: any, query?: any): string | undefined;
1826
+ /**
1827
+ * Returns the link property by name.
1828
+ *
1829
+ * Возвращает свойство ссылки по имени.
1830
+ * @param name route name/ имя маршрута
1831
+ * @param params route parameters/ параметры маршрута
1832
+ * @param query route query/ запрос маршрута
1833
+ */
1834
+ static getHref(name?: string, params?: any, query?: any): ConstrHrefProps;
1445
1835
  /**
1446
1836
  * Site path change.
1447
1837
  *
@@ -1463,6 +1853,13 @@ export declare class RouterItemRef {
1463
1853
  * @param router router instance/ экземпляр роутера
1464
1854
  */
1465
1855
  static setOneTime(router: Router): void;
1856
+ /**
1857
+ * Converts the raw route location to href properties.
1858
+ *
1859
+ * Преобразует необработанное местоположение маршрута в свойства href.
1860
+ * @param to raw route location/ необработанное местоположение маршрута
1861
+ */
1862
+ static rawToHref(to?: string | RouteLocationRaw): ConstrHrefProps;
1466
1863
  }
1467
1864
 
1468
1865
  /**
@@ -1489,6 +1886,18 @@ export declare class ScrollbarWidthRef {
1489
1886
  readonly is: ComputedRef<boolean>;
1490
1887
  }
1491
1888
 
1889
+ /** Search list input / Входные данные списка поиска */
1890
+ export declare type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
1891
+
1892
+ /** Search list data / Данные списка поиска */
1893
+ export declare type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
1894
+
1895
+ /**
1896
+ * Defines global conditions for the API request.
1897
+ *
1898
+ * Определяет глобальные условия для API запроса.
1899
+ * @param conditions conditions for executing the request/ условия выполнения запроса
1900
+ */
1492
1901
  export declare const setApiRefGlobalConditions: (conditions: RefType<any>) => void;
1493
1902
 
1494
1903
  /**
@@ -1525,14 +1934,6 @@ export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, v
1525
1934
  */
1526
1935
  export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
1527
1936
 
1528
- /**
1529
- * Packs reactive values into computed to prohibit editing.
1530
- *
1531
- * Упаковывает реактивные значения в computed для запрета редактирования.
1532
- * @param callback callback function/ функция обратного вызова
1533
- */
1534
- export declare function toComputed<T>(callback: () => Ref<T>): ComputedRef<T>;
1535
-
1536
1937
  /**
1537
1938
  * Returns a regular variable or wraps it in a regular variable if it is an ordinary variable.
1538
1939
  *
@@ -1544,12 +1945,174 @@ export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
1544
1945
  /** Utility type to convert union types to intersection types/ Утилитарный тип для преобразования объединенных типов в пересеченные */
1545
1946
  export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
1546
1947
 
1948
+ export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions): {
1949
+ loading: Ref<boolean, boolean>;
1950
+ send(request?: Request | undefined): Promise<Return | undefined>;
1951
+ };
1952
+
1953
+ export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions): {
1954
+ loading: Ref<boolean, boolean>;
1955
+ send(request?: Request | undefined): Promise<Return | undefined>;
1956
+ };
1957
+
1958
+ /**
1959
+ * Hook for managing API requests, formatting, search, and mutations (POST, PUT, DELETE).
1960
+ *
1961
+ * Хук для управления API-запросами, форматированием, поиском и мутациями (POST, PUT, DELETE).
1962
+ * @param propsGet properties for GET request / параметры для GET запроса
1963
+ * @param formattersOptions options for formatting / опции форматирования
1964
+ * @param searchOptions options for search / опции поиска
1965
+ * @param postRequest properties for POST request / параметры для POST запроса
1966
+ * @param putRequest properties for PUT request / параметры для PUT запроса
1967
+ * @param deleteRequest properties for DELETE request / параметры для DELETE запроса
1968
+ * @param action additional action to perform on mutations / дополнительное действие при мутациях
1969
+ */
1970
+ export declare function useApiManagementRef<Return extends ApiManagementValue, FormattersOptions extends FormattersOptionsList, Post extends Record<string, any>, Put extends Record<string, any>, Delete extends Record<string, any>, Type extends ApiManagementValue = Return, Item extends ArrayToItem<Return> = ArrayToItem<Return>, ItemFormatters extends FormattersListColumns<Item, FormattersOptions>[number] = FormattersListColumns<Item, FormattersOptions>[number], Columns extends SearchColumns<ItemFormatters> = []>(propsGet: ApiManagementGet<Return, Type>, formattersOptions?: FormattersOptions, searchOptions?: ApiManagementSearch<Item, Columns>, postRequest?: ApiManagementRequest<Post>, putRequest?: ApiManagementRequest<Put>, deleteRequest?: ApiManagementRequest<Delete>, action?: () => Promise<void> | void): {
1971
+ /** List data (Computed) / Данные списка (Computed) */
1972
+ readonly list: ComputedRef<{
1973
+ isSearch: ComputedRef<boolean>;
1974
+ search: Ref<string, string>;
1975
+ loading: Ref<boolean, boolean>;
1976
+ listSearch: ComputedRef<SearchFormatList<Item, Columns>>;
1977
+ length: ComputedRef<number>;
1978
+ } | undefined extends undefined ? ({
1979
+ listFormat: ComputedRef<FormattersReturn<Return, FormattersOptions, ArrayToItem<Return>>>;
1980
+ length: ComputedRef<number>;
1981
+ } | undefined extends undefined ? (ApiData<Return> | undefined) : FormattersReturn<Return, FormattersOptions>) : SearchFormatList<{
1982
+ listFormat: ComputedRef<FormattersReturn<Return, FormattersOptions, ArrayToItem<Return>>>;
1983
+ length: ComputedRef<number>;
1984
+ } | undefined extends undefined ? Item : ItemFormatters, Columns>>;
1985
+ /** Raw request data (Computed) / Исходные данные запроса (Computed) */
1986
+ readonly data: ComputedRef<ApiData<Return> | undefined>;
1987
+ /** Length of the list (Computed) / Длина списка (Computed) */
1988
+ readonly length: ComputedRef<number>;
1989
+ /** Data length (number) / Длина исходных данных */
1990
+ lengthData: ComputedRef<number>;
1991
+ /** Active starting flag (true if no data yet) / Флаг начальной загрузки (true если еще нет данных) */
1992
+ starting: ComputedRef<boolean>;
1993
+ /** Active reading flag / Флаг активного чтения */
1994
+ reading: Ref<boolean, boolean>;
1995
+ /** Request load flag / Флаг загрузки запроса */
1996
+ loading: Ref<boolean, boolean>;
1997
+ /** Loading search flag / Флаг загрузки поиска */
1998
+ loadingSearch: Ref<boolean, boolean> | undefined;
1999
+ /** POST request load flag / Флаг загрузки POST запроса */
2000
+ loadingPost: Ref<boolean, boolean> | undefined;
2001
+ /** PUT request load flag / Флаг загрузки PUT запроса */
2002
+ loadingPut: Ref<boolean, boolean> | undefined;
2003
+ /** DELETE request load flag / Флаг загрузки DELETE запроса */
2004
+ loadingDelete: Ref<boolean, boolean> | undefined;
2005
+ /** Is search active / Активен ли поиск */
2006
+ isSearch: ComputedRef<boolean> | undefined;
2007
+ /** Search function / Функция поиска */
2008
+ search: Ref<string, string> | undefined;
2009
+ /**
2010
+ * Default reset.
2011
+ *
2012
+ * Сброс по умолчанию.
2013
+ */
2014
+ reset: () => Promise<void>;
2015
+ /**
2016
+ * Abort request.
2017
+ *
2018
+ * Отмена запроса.
2019
+ */
2020
+ abort: () => void;
2021
+ /**
2022
+ * Send POST request.
2023
+ *
2024
+ * Выполнить POST запрос.
2025
+ * @param request request data / данные запроса
2026
+ */
2027
+ sendPost: (request?: ApiFetch["request"]) => Promise<ApiData<Post> | undefined>;
2028
+ /**
2029
+ * Send PUT request.
2030
+ *
2031
+ * Выполнить PUT запрос.
2032
+ * @param request request data / данные запроса
2033
+ */
2034
+ sendPut: (request?: ApiFetch["request"]) => Promise<ApiData<Put> | undefined>;
2035
+ /**
2036
+ * Send DELETE request.
2037
+ *
2038
+ * Выполнить DELETE запрос.
2039
+ * @param request request data / данные запроса
2040
+ */
2041
+ sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
2042
+ };
2043
+
2044
+ export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions): {
2045
+ loading: Ref<boolean, boolean>;
2046
+ send(request?: Request | undefined): Promise<Return | undefined>;
2047
+ };
2048
+
2049
+ export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions): {
2050
+ loading: Ref<boolean, boolean>;
2051
+ send(request?: Request | undefined): Promise<Return | undefined>;
2052
+ };
2053
+
2054
+ /**
2055
+ * Use api ref return type.
2056
+ *
2057
+ * Тип возвращаемого значения для useApiRef.
2058
+ */
1547
2059
  export declare interface UseApiRef<R> {
1548
- data: Ref<R | undefined>;
1549
- isStarting: ComputedRef<boolean>;
1550
- loading: ComputedRef<boolean>;
1551
- reading: ComputedRef<boolean>;
2060
+ /** Reactive data (Computed) / Реактивные данные (Computed) */
2061
+ data: ComputedRef<ApiData<R> | undefined>;
2062
+ /** Item (Ref) / Элемент (Ref) */
2063
+ item: Ref<ApiData<R> | undefined>;
2064
+ /** Length of the list (Computed) / Длина списка (Computed) */
2065
+ length: ComputedRef<number>;
2066
+ /** Start request flag (true if no data yet) / Флаг начала запроса (true если еще нет данных) */
2067
+ starting: ComputedRef<boolean>;
2068
+ /** Request load flag / Флаг загрузки запроса */
2069
+ loading: Ref<boolean>;
2070
+ /** Active reading flag / Флаг активного чтения */
2071
+ reading: Ref<boolean>;
2072
+ /** Checks if the request is starting (true if no data yet) / Проверяет, начинается ли запрос (true, если данных еще нет) */
2073
+ isStarting(): boolean;
2074
+ /**
2075
+ * Checks if the request is currently loading.
2076
+ *
2077
+ * Проверяет, загружается ли запрос в данный момент.
2078
+ */
2079
+ isLoading(): boolean;
2080
+ /**
2081
+ * Checks if the request is currently reading.
2082
+ *
2083
+ * Проверяет, читается ли запрос в данный момент.
2084
+ */
2085
+ isReading(): boolean;
2086
+ /**
2087
+ * Gets the current item data.
2088
+ *
2089
+ * Получает текущие данные элемента.
2090
+ */
2091
+ getItem(): ApiData<R> | undefined;
2092
+ /**
2093
+ * Manual initialization
2094
+ *
2095
+ * Ручная инициализация
2096
+ */
2097
+ init(): void;
2098
+ /**
2099
+ * Default reset
2100
+ *
2101
+ * Сброс по умолчанию
2102
+ */
1552
2103
  reset(): Promise<void>;
2104
+ /**
2105
+ * Stop request
2106
+ *
2107
+ * Остановка запроса
2108
+ */
2109
+ stop(): void;
2110
+ /**
2111
+ * Abort request
2112
+ *
2113
+ * Отмена запроса
2114
+ */
2115
+ abort(): void;
1553
2116
  }
1554
2117
 
1555
2118
  /**
@@ -1563,7 +2126,31 @@ export declare interface UseApiRef<R> {
1563
2126
  * @param transformation transforms the received request/ преобразовывает полученный запрос
1564
2127
  * @param unmounted delete data from the cache/ удалить ли данные из кеша
1565
2128
  */
1566
- export declare function useApiRef<R, T = any>(path?: RefOrNormal<string | undefined>, options?: ApiOptions, reactivity?: boolean, conditions?: RefType<boolean>, transformation?: (data: T) => R, unmounted?: boolean): UseApiRef<R>;
2129
+ export declare function useApiRef<R, T = R>(path?: RefOrNormal<string | undefined>, options?: ApiOptions, reactivity?: boolean, conditions?: RefType<boolean>, transformation?: (data: T) => ApiData<R>, unmounted?: boolean): UseApiRef<R>;
2130
+
2131
+ /**
2132
+ * Use api request.
2133
+ *
2134
+ * Использование запроса api.
2135
+ * @param path Path to the API endpoint / Путь к endpoint API
2136
+ * @param method HTTP method / HTTP метод
2137
+ * @param action Action to perform after the request / Действие, выполняемое после запроса
2138
+ * @param transformation Transformation function / Функция трансформации
2139
+ * @param toData Extract 'data' field from response / Извлечь поле 'data' из ответа
2140
+ * @param options Additional request options / Дополнительные опции запроса
2141
+ * @returns Object with loading state and send method / Объект с состоянием загрузки и методом отправки
2142
+ */
2143
+ export declare function useApiRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, method?: ApiMethodItem, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions): {
2144
+ loading: Ref<boolean, boolean>;
2145
+ /**
2146
+ * Send request.
2147
+ *
2148
+ * Отправка запроса.
2149
+ * @param request Request data / Данные запроса
2150
+ * @returns Response data / Данные ответа
2151
+ */
2152
+ send(request?: Request): Promise<Return | undefined>;
2153
+ };
1567
2154
 
1568
2155
  /**
1569
2156
  * Creates a reactive variable to manage data between browser tabs.
@@ -1578,12 +2165,31 @@ export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T |
1578
2165
  * Creates a reactive variable to manage cookies.
1579
2166
  *
1580
2167
  * Создает реактивную переменную для управления cookie.
1581
- * @param name cookie name/ название cookie
1582
- * @param defaultValue value or function to change data/ значение или функция для изменения данных
1583
- * @param options additional parameters/ дополнительные параметры
2168
+ * @param name cookie name / название cookie
2169
+ * @param defaultValue value or function to change data / значение или функция для изменения данных
2170
+ * @param options additional parameters / дополнительные параметры
1584
2171
  */
1585
2172
  export declare function useCookieRef<T>(name: string, defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): Ref<T | string | undefined>;
1586
2173
 
2174
+ /**
2175
+ * Composable for reactive formatting of data lists based on specified rules for each property. /
2176
+ * Композабл для реактивного форматирования списков данных на основе заданных правил для каждого свойства.
2177
+ * @param list source data list (Ref or ComputedRef) / исходный список данных (Ref или ComputedRef)
2178
+ * @param options formatting settings for each property / настройки форматирования для каждого свойства
2179
+ */
2180
+ export declare function useFormattersRef<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp>(list: RefType<List | undefined>, options: Options): {
2181
+ /**
2182
+ * Formatted data list (ComputedRef) /
2183
+ * Отформатированный список данных (ComputedRef)
2184
+ */
2185
+ listFormat: ComputedRef<FormattersReturn<List, Options>>;
2186
+ /**
2187
+ * Returns the count of records in the list (ComputedRef) /
2188
+ * Возвращает количество записей в списке (ComputedRef)
2189
+ */
2190
+ length: ComputedRef<number>;
2191
+ };
2192
+
1587
2193
  /**
1588
2194
  * Returns a class object for working with data formatting.
1589
2195
  *
@@ -1595,10 +2201,10 @@ export declare function useGeoIntlRef(): GeoIntlRef;
1595
2201
  * Creates a reactive variable to manage the hash.
1596
2202
  *
1597
2203
  * Создает реактивную переменную для управления хэшем.
1598
- * @param name value name/ название значения
1599
- * @param defaultValue default value/ значение по умолчанию
2204
+ * @param name value name / название значения
2205
+ * @param defaultValue default value / значение по умолчанию
1600
2206
  */
1601
- export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): Ref<any, any> | undefined;
2207
+ export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
1602
2208
 
1603
2209
  /**
1604
2210
  * Hook for initializing the tracking of an element's appearance on the screen by margin.
@@ -1667,7 +2273,7 @@ export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
1667
2273
  * Vue композабл для реактивного управления мета-тегами с автоматической синхронизацией DOM.
1668
2274
  * Использует паттерн singleton - все компоненты используют одно состояние мета-тегов.
1669
2275
  */
1670
- export declare const useMeta: () => Readonly<Readonly<{
2276
+ export declare const useMeta: () => Readonly<{
1671
2277
  meta: Meta;
1672
2278
  title: Ref<string, string>;
1673
2279
  keyword: Ref<string, string>;
@@ -1678,7 +2284,7 @@ export declare const useMeta: () => Readonly<Readonly<{
1678
2284
  robots: Ref<MetaRobots, MetaRobots>;
1679
2285
  siteName: Ref<string, string>;
1680
2286
  getHtmlMeta: () => string;
1681
- }> & {
2287
+ } & {
1682
2288
  init(): Readonly<{
1683
2289
  meta: Meta;
1684
2290
  title: Ref<string, string>;
@@ -1691,8 +2297,85 @@ export declare const useMeta: () => Readonly<Readonly<{
1691
2297
  siteName: Ref<string, string>;
1692
2298
  getHtmlMeta: () => string;
1693
2299
  }>;
2300
+ destroyExecute?(): void;
1694
2301
  }>;
1695
2302
 
2303
+ /**
2304
+ * Managing a list of links for the router.
2305
+ *
2306
+ * Управление списком ссылок для роутера.
2307
+ * @param list list of items / список элементов
2308
+ * @param selected selected item / выбранный элемент
2309
+ * @param hasTo has to / имеет to
2310
+ */
2311
+ export declare const useRouterList: <T extends ListDataBasic>(list: RefType<ConstrBind<T>[] | undefined>, selected?: Ref<string> | string, hasTo?: boolean) => {
2312
+ item: ComputedRef<T | undefined>;
2313
+ /** Selected element / Выбранный элемент */
2314
+ selected: Ref<string, string>;
2315
+ label: ComputedRef<NumberOrString>;
2316
+ /** List of elements / Список элементов */
2317
+ list: ComputedRef<ConstrBind<T>[]>;
2318
+ to: (name?: string) => void;
2319
+ /**
2320
+ * Transition to the main element.
2321
+ *
2322
+ * Переход к главному элементу.
2323
+ */
2324
+ toMain(): void;
2325
+ };
2326
+
2327
+ /**
2328
+ * Composable for handling search logic with reactive data.
2329
+ *
2330
+ * Композабл для управления логикой поиска с реактивными данными.
2331
+ * @param list list of items to search / список элементов для поиска
2332
+ * @param columns columns to search in / колонки, по которым ведется поиск
2333
+ * @param value reactive search string / реактивная строка поиска
2334
+ * @param options search options / настройки поиска
2335
+ */
2336
+ export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns: K, value?: Ref<string>, options?: SearchOptions): {
2337
+ /**
2338
+ * Whether the search is currently active (minimum character limit reached)/
2339
+ * Активен ли поиск в данный момент (достигнут ли лимит символов)
2340
+ */
2341
+ isSearch: ComputedRef<boolean>;
2342
+ /** Search string ref/ Ссылка на строку поиска */
2343
+ search: Ref<string, string>;
2344
+ /**
2345
+ * Search loading status (if delay is used) /
2346
+ * Статус загрузки поиска (если используется задержка)
2347
+ */
2348
+ loading: Ref<boolean, boolean>;
2349
+ /**
2350
+ * Formatted list of search results with highlights /
2351
+ * Форматированный список результатов поиска с подсветкой совпадений
2352
+ */
2353
+ listSearch: ComputedRef<SearchFormatList<T, K>>;
2354
+ /**
2355
+ * Length of the search results /
2356
+ * Длина списка результатов поиска
2357
+ */
2358
+ length: ComputedRef<number>;
2359
+ };
2360
+
2361
+ /**
2362
+ * Composable for managing search value state and handling delays.
2363
+ *
2364
+ * Композабл для управления состоянием значения поиска и обработки задержек.
2365
+ * Он изолирует логику debounce, предоставляя `searchDelay` (строка с задержкой)
2366
+ * и `loading` (флаг ожидания), которые затем читаются классом `SearchList` или `useSearchRef`.
2367
+ * @param item search list instance / экземпляр поиска `SearchList`
2368
+ * @param value reactive search string / реактивная строка поиска (опционально)
2369
+ */
2370
+ export declare function useSearchValueRef<T extends SearchItem, K extends SearchColumns<T>>(item: SearchList<T, K>, value?: Ref<string>): {
2371
+ /** Current search value / Текущее значение поиска */
2372
+ search: Ref<string, string>;
2373
+ /** Search value with applied delay / Значение поиска с примененной задержкой */
2374
+ searchDelay: Ref<string, string>;
2375
+ /** Loading status during delay / Статус загрузки во время задержки */
2376
+ loading: Ref<boolean, boolean>;
2377
+ };
2378
+
1696
2379
  /**
1697
2380
  * Creates a reactive variable to manage session storage.
1698
2381
  *
@@ -1724,227 +2407,3 @@ export declare function useTranslateRef<T extends (string | string[])[]>(names:
1724
2407
  export * from "@dxtmisha/functional-basic";
1725
2408
 
1726
2409
  export { }
1727
-
1728
-
1729
-
1730
- declare module '@vue/reactivity' {
1731
- interface RefUnwrapBailTypes {
1732
- runtimeCoreBailTypes: VNode | {
1733
- $: ComponentInternalInstance;
1734
- };
1735
- }
1736
- }
1737
-
1738
-
1739
- // Note: this file is auto concatenated to the end of the bundled d.ts during
1740
- // build.
1741
-
1742
- declare module '@vue/runtime-core' {
1743
- export interface GlobalComponents {
1744
- Teleport: DefineComponent<TeleportProps>
1745
- Suspense: DefineComponent<SuspenseProps>
1746
- KeepAlive: DefineComponent<KeepAliveProps>
1747
- BaseTransition: DefineComponent<BaseTransitionProps>
1748
- }
1749
- }
1750
-
1751
-
1752
- declare module '@vue/reactivity' {
1753
- interface RefUnwrapBailTypes {
1754
- runtimeDOMBailTypes: DomType<Node | Window>;
1755
- }
1756
- }
1757
-
1758
-
1759
- declare module '@vue/runtime-core' {
1760
- interface GlobalComponents {
1761
- Transition: DefineComponent<TransitionProps>;
1762
- TransitionGroup: DefineComponent<TransitionGroupProps>;
1763
- }
1764
- interface GlobalDirectives {
1765
- vShow: typeof vShow;
1766
- vOn: VOnDirective;
1767
- vBind: VModelDirective;
1768
- vIf: Directive<any, boolean>;
1769
- vOnce: Directive;
1770
- vSlot: Directive;
1771
- }
1772
- }
1773
-
1774
-
1775
-
1776
-
1777
-
1778
- declare module '@vue/reactivity' {
1779
- interface RefUnwrapBailTypes {
1780
- runtimeCoreBailTypes: VNode | {
1781
- $: ComponentInternalInstance;
1782
- };
1783
- }
1784
- }
1785
-
1786
-
1787
-
1788
-
1789
- // Note: this file is auto concatenated to the end of the bundled d.ts during
1790
- // build.
1791
-
1792
- declare module '@vue/runtime-core' {
1793
- export interface GlobalComponents {
1794
- Teleport: DefineComponent<TeleportProps>
1795
- Suspense: DefineComponent<SuspenseProps>
1796
- KeepAlive: DefineComponent<KeepAliveProps>
1797
- BaseTransition: DefineComponent<BaseTransitionProps>
1798
- }
1799
- }
1800
-
1801
-
1802
-
1803
-
1804
- declare module '@vue/reactivity' {
1805
- interface RefUnwrapBailTypes {
1806
- runtimeDOMBailTypes: DomType<Node | Window>;
1807
- }
1808
- }
1809
-
1810
-
1811
-
1812
-
1813
- declare module '@vue/runtime-core' {
1814
- interface GlobalComponents {
1815
- Transition: DefineComponent<TransitionProps>;
1816
- TransitionGroup: DefineComponent<TransitionGroupProps>;
1817
- }
1818
- interface GlobalDirectives {
1819
- vShow: typeof vShow;
1820
- vOn: VOnDirective;
1821
- vBind: VModelDirective;
1822
- vIf: Directive<any, boolean>;
1823
- vOnce: Directive;
1824
- vSlot: Directive;
1825
- }
1826
- }
1827
-
1828
-
1829
-
1830
-
1831
-
1832
- // CSS
1833
- declare module '*.css' {}
1834
-
1835
-
1836
-
1837
-
1838
- declare module '*.scss' {}
1839
-
1840
-
1841
-
1842
-
1843
- declare module '*.sass' {}
1844
-
1845
-
1846
-
1847
-
1848
- declare module '*.less' {}
1849
-
1850
-
1851
-
1852
-
1853
- declare module '*.styl' {}
1854
-
1855
-
1856
-
1857
-
1858
- declare module '*.stylus' {}
1859
-
1860
-
1861
-
1862
-
1863
- declare module '*.pcss' {}
1864
-
1865
-
1866
-
1867
-
1868
- declare module '*.sss' {}
1869
-
1870
-
1871
- //#endregion
1872
- //#region src/index.d.ts
1873
- declare module 'vue' {
1874
- interface ComponentCustomOptions {
1875
- /**
1876
- * Guard called when the router is navigating to the route that is rendering
1877
- * this component from a different route. Differently from `beforeRouteUpdate`
1878
- * and `beforeRouteLeave`, `beforeRouteEnter` does not have access to the
1879
- * component instance through `this` because it triggers before the component
1880
- * is even mounted.
1881
- *
1882
- * @param to - RouteLocationRaw we are navigating to
1883
- * @param from - RouteLocationRaw we are navigating from
1884
- * @param next - function to validate, cancel or modify (by redirecting) the
1885
- * navigation
1886
- */
1887
- beforeRouteEnter?: TypesConfig extends Record<'beforeRouteEnter', infer T> ? T : NavigationGuardWithThis<undefined>;
1888
- /**
1889
- * Guard called whenever the route that renders this component has changed, but
1890
- * it is reused for the new route. This allows you to guard for changes in
1891
- * params, the query or the hash.
1892
- *
1893
- * @param to - RouteLocationRaw we are navigating to
1894
- * @param from - RouteLocationRaw we are navigating from
1895
- * @param next - function to validate, cancel or modify (by redirecting) the
1896
- * navigation
1897
- */
1898
- beforeRouteUpdate?: TypesConfig extends Record<'beforeRouteUpdate', infer T> ? T : NavigationGuard;
1899
- /**
1900
- * Guard called when the router is navigating away from the current route that
1901
- * is rendering this component.
1902
- *
1903
- * @param to - RouteLocationRaw we are navigating to
1904
- * @param from - RouteLocationRaw we are navigating from
1905
- * @param next - function to validate, cancel or modify (by redirecting) the
1906
- * navigation
1907
- */
1908
- beforeRouteLeave?: TypesConfig extends Record<'beforeRouteLeave', infer T> ? T : NavigationGuard;
1909
- }
1910
- interface ComponentCustomProperties {
1911
- /**
1912
- * Normalized current location. See {@link RouteLocationNormalizedLoaded}.
1913
- */
1914
- $route: TypesConfig extends Record<'$route', infer T> ? T : RouteLocationNormalizedLoaded;
1915
- /**
1916
- * {@link Router} instance used by the application.
1917
- */
1918
- $router: TypesConfig extends Record<'$router', infer T> ? T : Router;
1919
- }
1920
- interface GlobalComponents {
1921
- RouterView: TypesConfig extends Record<'RouterView', infer T> ? T : typeof RouterView;
1922
- RouterLink: TypesConfig extends Record<'RouterLink', infer T> ? T : typeof RouterLink;
1923
- }
1924
- }
1925
-
1926
-
1927
-
1928
- // CSS
1929
- declare module '*.css' {}
1930
-
1931
-
1932
- declare module '*.scss' {}
1933
-
1934
-
1935
- declare module '*.sass' {}
1936
-
1937
-
1938
- declare module '*.less' {}
1939
-
1940
-
1941
- declare module '*.styl' {}
1942
-
1943
-
1944
- declare module '*.stylus' {}
1945
-
1946
-
1947
- declare module '*.pcss' {}
1948
-
1949
-
1950
- declare module '*.sss' {}