@dxtmisha/functional 1.15.3 → 1.15.6
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/CHANGELOG.md +17 -0
- package/README.md +42 -21
- package/ai-description.md +7 -25
- package/ai-doc.md +5 -109
- package/ai-mcp.json +26 -0
- package/ai-prompts/api-reference.md +25 -0
- package/ai-prompts/localization-seo.md +29 -0
- package/ai-prompts/reactivity-lists.md +34 -0
- package/ai-prompts/storage-state.md +27 -0
- package/ai-types.md +669 -540
- package/dist/classes/ref/GeoIntlRef.d.ts +7 -0
- package/dist/composables/ref/useGeoIntlRef.d.ts +7 -0
- package/dist/composables/ref/useLazyItemByMarginRef.d.ts +6 -4
- package/dist/composables/ref/useLazyRef.d.ts +1 -1
- package/dist/composables/ref/useSearchRef.d.ts +2 -2
- package/dist/library.js +16 -15
- package/dist/types/searchTypes.d.ts +5 -1
- package/package.json +38 -11
package/ai-types.md
CHANGED
|
@@ -6,199 +6,653 @@ The following is the content of "exports" from package.json:
|
|
|
6
6
|
{
|
|
7
7
|
".": {
|
|
8
8
|
"import": "./dist/library.js",
|
|
9
|
-
"types": "./dist/
|
|
9
|
+
"types": "./dist/library.d.ts"
|
|
10
10
|
},
|
|
11
11
|
"./flags": {
|
|
12
12
|
"import": "./dist/flags.js",
|
|
13
|
-
"types": "./dist/
|
|
13
|
+
"types": "./dist/flags.d.ts"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
import { ComputedRef, Ref, ShallowRef, ToRefs, VNode, DebuggerOptions, ComputedGetter, Plugin, PropType } from 'vue';
|
|
18
|
+
import { RouteLocationRaw, Router, _RouterClassic } from 'vue-router';
|
|
19
|
+
import { Datetime, GeoDate, GeoFirstDay, GeoHours, NumberOrStringOrDate, ElementOrString, ElementOrWindow, EventItem, EventListenerDetail, EventOptions, GeoFlag, GeoFlagItem, GeoFlagNational, ItemValue, NumberOrString, GeoItemFull, GeoUnit, ApiInstance, ApiData, ApiDataValidation, ApiErrorStorageList, ApiFetch, ArrayToItem, FormattersListColumns, FormattersOptionsList, SearchColumns, SearchFormatList, ApiErrorItem, ApiMethodItem, CookieOptions, FormattersListProp, FormattersReturn, MetaRobots, Meta, NumberOrStringOrBoolean, SearchItem, SearchOptions, TranslateInstance, TranslateList, ApiConfig, ErrorCenterCauseList, ErrorCenterHandlerCallback, ErrorCenterHandlerList, IconsConfig, TranslateConfig, ItemList, Undefined, ApiDefaultValue, SearchListValue } from '@dxtmisha/functional-basic';
|
|
20
|
+
import { InputSocialIcons } from '@dxtmisha/media';
|
|
21
|
+
export * from '@dxtmisha/functional-basic';
|
|
22
|
+
export type RefType<T> = ComputedRef<T> | Ref<T>;
|
|
23
|
+
export type RefUndefined<T> = RefType<T | undefined>;
|
|
24
|
+
export type RefOrNormal<T> = RefType<T> | T;
|
|
25
|
+
export type RefOrNormalOrFunction<T> = RefOrNormal<T> | (() => RefOrNormal<T>);
|
|
26
|
+
export type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
|
|
27
|
+
export type RawSlots = { [name: string]: unknown; $stable?: boolean; };
|
|
28
|
+
export type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
|
|
29
|
+
export type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
|
|
30
|
+
/** Configuration for the main GET request in API management. */
|
|
31
|
+
export type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
32
|
+
path?: RefOrNormal<string | undefined>;
|
|
33
|
+
options?: ApiOptions;
|
|
34
|
+
reactivity?: boolean;
|
|
35
|
+
conditions?: RefType<boolean>;
|
|
36
|
+
transformation?: (data: Type, isResponseContractValid?: ApiDataValidation) => ApiData<Return>;
|
|
37
|
+
validateResponseContract?: (data: Type) => ApiDataValidation;
|
|
38
|
+
errorContract?: ApiErrorStorageList;
|
|
39
|
+
typeData?: ((data: Return) => boolean) | any;
|
|
40
|
+
unmounted?: boolean;
|
|
41
|
+
skeleton?: () => Return;
|
|
42
|
+
};
|
|
43
|
+
/** Configuration for client-side search across API data. */
|
|
44
|
+
export type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
|
|
45
|
+
columns: K;
|
|
46
|
+
value?: Ref<string>;
|
|
47
|
+
options?: SearchOptions;
|
|
48
|
+
};
|
|
49
|
+
/** Configuration for mutation requests (POST, PUT, DELETE). */
|
|
50
|
+
export type ApiManagementRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> = {
|
|
51
|
+
path?: RefOrNormal<string | undefined>;
|
|
52
|
+
action?: (data: Return | undefined) => Promise<void> | void;
|
|
53
|
+
transformation?: (data: T) => Return;
|
|
54
|
+
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
55
|
+
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
56
|
+
errorContract?: ApiErrorStorageList;
|
|
57
|
+
toData?: boolean;
|
|
58
|
+
options?: ApiOptions;
|
|
59
|
+
};
|
|
60
|
+
export type ConstrItem = Record<string, any>;
|
|
61
|
+
export type ConstrValue<T = any> = { value?: T; };
|
|
62
|
+
export type ConstrComponent = Record<string, any>;
|
|
63
|
+
export type ConstrComponentMod<P extends ConstrItem> = ConstrItem | { [K in keyof P]?: RefOrNormal<P[K]>; };
|
|
64
|
+
export type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & { elementHtml?: ComputedRef<E | undefined>; };
|
|
65
|
+
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
66
|
+
export type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
|
|
67
|
+
export type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{ [K in keyof T]: (evt: K, ...args: T[K]) => void; }>>;
|
|
68
|
+
export type ConstrClassObject = Record<string, boolean | undefined>;
|
|
69
|
+
export type ConstrClass = string | (string | ConstrClass | Undefined)[] | ConstrClassObject;
|
|
70
|
+
export type ConstrClassList = Record<string, ConstrClass>;
|
|
71
|
+
export type ConstrClasses = { main: ConstrClass; } & ConstrClassList;
|
|
72
|
+
export type ConstrStylesItem = string | null;
|
|
73
|
+
export type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
|
|
74
|
+
export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
75
|
+
components?: COMP;
|
|
76
|
+
compMod?: ConstrComponentMod<P>;
|
|
77
|
+
emits?: ConstrEmit<EMITS>;
|
|
78
|
+
classes?: RefType<ConstrClasses>;
|
|
79
|
+
styles?: RefType<ConstrStyles>;
|
|
80
|
+
};
|
|
81
|
+
export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
|
|
82
|
+
name: string;
|
|
83
|
+
element: Ref<E | undefined>;
|
|
84
|
+
classes: RefType<CLASSES>;
|
|
85
|
+
styles: RefType<ConstrStyles>;
|
|
86
|
+
} & SETUP;
|
|
87
|
+
export type ConstrRegistration = {
|
|
88
|
+
flag?: boolean;
|
|
89
|
+
translate?: Record<string, string>;
|
|
90
|
+
};
|
|
91
|
+
export type ConstrBind<T> = T & Record<string, any> & {
|
|
92
|
+
key?: string;
|
|
93
|
+
class?: ConstrClass;
|
|
94
|
+
style?: ConstrStyles;
|
|
95
|
+
};
|
|
96
|
+
export type ConstrPropItemOptions<T = any> = {
|
|
97
|
+
type?: PropType<T>;
|
|
98
|
+
required?: boolean;
|
|
99
|
+
default?: any;
|
|
100
|
+
validator?(value: any, props: any): boolean;
|
|
101
|
+
};
|
|
102
|
+
export type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
|
|
103
|
+
export type ConstrProps<P = Record<string, any>> = { [K in keyof P]: ConstrPropItem<P[K]>; };
|
|
104
|
+
export type ConstrHrefProps = { href?: string; };
|
|
105
|
+
export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
106
|
+
export type ListDataBasic = { label?: NumberOrString; value?: any; search?: string; };
|
|
107
|
+
export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & { parent?: string; type: ListType; index: string; disabled?: boolean; }>;
|
|
108
|
+
export type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
|
|
109
|
+
export type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
|
|
110
|
+
export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & { focus: boolean; highlight?: string; selected: boolean; disabled?: boolean; };
|
|
111
|
+
export type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
|
|
112
|
+
export type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
|
|
113
|
+
export type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
|
|
114
|
+
export type ListSelectedItem = NumberOrStringOrBoolean;
|
|
115
|
+
export type ListSelectedList = ListSelectedItem | ListSelectedItem[];
|
|
116
|
+
export type ListName = string | number | undefined;
|
|
117
|
+
export type ListNames = ListName[];
|
|
118
|
+
export type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
|
|
119
|
+
export type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
|
|
120
|
+
export type SearchColumnsRef<T extends SearchItem, K extends SearchColumns<T>> = RefOrNormal<K>;
|
|
121
|
+
export type SearchColumnsInput<T extends SearchItem, K extends SearchColumns<T>> = SearchColumnsRef<T, K> | (() => SearchColumnsRef<T, K>);
|
|
122
|
+
export type LazyItemByMargin = { rootMargin: string; item: ReturnType<typeof useLazyRef>; };
|
|
123
|
+
export type LazyItem = { status: ShallowRef<boolean>; ratio: ShallowRef<number>; entry: ShallowRef<IntersectionObserverEntry | undefined>; stopWatch: () => void; };
|
|
124
|
+
export type LazyList = Record<string, LazyItem>;
|
|
125
|
+
export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
126
|
+
export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
127
|
+
export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
128
|
+
export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
129
|
+
/** Interface for reactive API request instance. */
|
|
130
|
+
export interface UseApiRef<R> {
|
|
131
|
+
data: ComputedRef<ApiData<R> | undefined>;
|
|
132
|
+
item: Ref<ApiData<R> | undefined>;
|
|
133
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
134
|
+
isResponseContractValid: ComputedRef<boolean>;
|
|
135
|
+
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
136
|
+
length: ComputedRef<number>;
|
|
137
|
+
starting: ComputedRef<boolean>;
|
|
138
|
+
loading: Ref<boolean>;
|
|
139
|
+
reading: Ref<boolean>;
|
|
140
|
+
isStarting(): boolean;
|
|
141
|
+
isLoading(): boolean;
|
|
142
|
+
isReading(): boolean;
|
|
143
|
+
getItem(): ApiData<R> | undefined;
|
|
144
|
+
init(): void;
|
|
145
|
+
initSsr(): void;
|
|
146
|
+
reset(): Promise<void>;
|
|
147
|
+
stop(): void;
|
|
148
|
+
abort(): void;
|
|
149
|
+
}
|
|
150
|
+
/** Setup interface for API request. */
|
|
151
|
+
export interface UseApiRequestSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> {
|
|
152
|
+
path?: RefOrNormal<string | undefined>;
|
|
153
|
+
method?: ApiMethodItem;
|
|
154
|
+
action?: (data: Return | undefined) => Promise<void> | void;
|
|
155
|
+
transformation?: (data: T) => Return;
|
|
156
|
+
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
157
|
+
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
158
|
+
errorContract?: ApiErrorStorageList;
|
|
159
|
+
toData?: boolean;
|
|
160
|
+
options?: ApiOptions;
|
|
161
|
+
apiInstance?: ApiInstance;
|
|
162
|
+
}
|
|
163
|
+
/** Interface for functional plugin configuration options. */
|
|
164
|
+
export interface FunctionalPluginOptions {
|
|
165
|
+
api?: ApiConfig;
|
|
166
|
+
translate?: TranslateConfig;
|
|
167
|
+
location?: string | (() => string);
|
|
168
|
+
metaSuffix?: string;
|
|
169
|
+
icons?: IconsConfig;
|
|
170
|
+
iconsSocial?: InputSocialIcons;
|
|
171
|
+
router?: Router;
|
|
172
|
+
errorCauses?: ErrorCenterCauseList;
|
|
173
|
+
errorHandlers?: ErrorCenterHandlerList;
|
|
174
|
+
errorCallbacks?: ErrorCenterHandlerCallback[];
|
|
175
|
+
}
|
|
176
|
+
/** Base abstract class for design constructor components managing properties, callbacks, and tracked changes. */
|
|
18
177
|
export declare abstract class DesignAbstract<T extends Record<string, any>, C extends Record<string, any>> {
|
|
178
|
+
/**
|
|
179
|
+
* Constructor
|
|
180
|
+
* @param props base data
|
|
181
|
+
* @param callback callback function when the value changes
|
|
182
|
+
* @param changed data for tracking
|
|
183
|
+
*/
|
|
19
184
|
constructor(props: T, callback?: ((event: C) => void) | undefined, changed?: string[]);
|
|
185
|
+
/**
|
|
186
|
+
* Calls the callback function.
|
|
187
|
+
* @param compelled forces data to update
|
|
188
|
+
*/
|
|
20
189
|
make(compelled?: boolean): this;
|
|
190
|
+
/**
|
|
191
|
+
* Calls the callback function.
|
|
192
|
+
* @param compelled forces data to update
|
|
193
|
+
*/
|
|
21
194
|
makeCallback(compelled?: boolean): void;
|
|
22
195
|
}
|
|
23
|
-
|
|
24
|
-
// File: src/classes/design/DesignAsyncAbstract.d.ts
|
|
25
|
-
import { DesignAbstract } from './DesignAbstract';
|
|
196
|
+
/** Base async abstract class for design components with asynchronous initialization. */
|
|
26
197
|
export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
|
|
198
|
+
/**
|
|
199
|
+
* Calls the callback function.
|
|
200
|
+
* @param compelled forces data to update
|
|
201
|
+
*/
|
|
27
202
|
make(compelled?: boolean): this;
|
|
203
|
+
/**
|
|
204
|
+
* Calls the callback function.
|
|
205
|
+
* @param compelled forces data to update
|
|
206
|
+
*/
|
|
28
207
|
makeCallback(compelled?: boolean): Promise<void>;
|
|
29
208
|
}
|
|
30
|
-
|
|
31
|
-
// File: src/classes/design/DesignChanged.d.ts
|
|
209
|
+
/** Class for tracking edited/changed values. */
|
|
32
210
|
export declare class DesignChanged<T extends Record<string, any>> {
|
|
211
|
+
/**
|
|
212
|
+
* Constructor
|
|
213
|
+
* @param props base data
|
|
214
|
+
* @param watch data for tracking
|
|
215
|
+
*/
|
|
33
216
|
constructor(props: T, watch?: string[]);
|
|
217
|
+
/**
|
|
218
|
+
* Checks if the value has been updated.
|
|
219
|
+
* @param name property name
|
|
220
|
+
*/
|
|
34
221
|
is(name: string | string[]): boolean;
|
|
222
|
+
/** Checks if there are changes in the data. */
|
|
35
223
|
isChanged(): boolean;
|
|
224
|
+
/** Updates all values. */
|
|
36
225
|
update(): void;
|
|
37
226
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
import { ConstrComponent, ConstrItem } from '../../types/constructorTypes';
|
|
42
|
-
export declare class DesignComp<COMP extends ConstrComponent, P extends ConstrItem> extends DesignComponents<COMP, P> {
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// File: src/classes/design/DesignComponents.d.ts
|
|
46
|
-
import { ComputedRef, VNode } from 'vue';
|
|
47
|
-
import { RawChildren, RawSlots } from '../../types/refTypes';
|
|
48
|
-
import { ConstrComponent, ConstrComponentMod, ConstrItem } from '../../types/constructorTypes';
|
|
227
|
+
/** Component wrapper class extending DesignComponents. */
|
|
228
|
+
export declare class DesignComp<COMP extends ConstrComponent, P extends ConstrItem> extends DesignComponents<COMP, P> {}
|
|
229
|
+
/** Class for working with connected components. */
|
|
49
230
|
export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
|
|
231
|
+
/**
|
|
232
|
+
* Constructor
|
|
233
|
+
* @param components list of connected components
|
|
234
|
+
* @param modification data for modification
|
|
235
|
+
*/
|
|
50
236
|
constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
|
|
237
|
+
/**
|
|
238
|
+
* Check the presence of the component.
|
|
239
|
+
* @param name name of the component
|
|
240
|
+
*/
|
|
51
241
|
is<K extends keyof COMP>(name: K): name is K;
|
|
242
|
+
/**
|
|
243
|
+
* Getting the object of the component.
|
|
244
|
+
* @param name name of the component
|
|
245
|
+
*/
|
|
52
246
|
get<K extends keyof COMP>(name: K): COMP[K];
|
|
247
|
+
/**
|
|
248
|
+
* Returns the modified input data of the connected components.
|
|
249
|
+
* @param index the name of this
|
|
250
|
+
* @param props basic data
|
|
251
|
+
*/
|
|
53
252
|
getModification<K extends keyof P>(index?: K & string | string, props?: P[K] | Record<string, any>): Record<string, any> | undefined;
|
|
253
|
+
/**
|
|
254
|
+
* Rendering a component by its name and returning an array with one component.
|
|
255
|
+
* @param name name of the component
|
|
256
|
+
* @param props property of the component
|
|
257
|
+
* @param children sub-elements of the component
|
|
258
|
+
* @param index the name of the key
|
|
259
|
+
*/
|
|
54
260
|
render<K extends keyof COMP, PK extends keyof P>(name: K & string, props?: P[PK] & ConstrItem | ConstrItem, children?: RawChildren | RawSlots, index?: PK & string | string): VNode[];
|
|
261
|
+
/**
|
|
262
|
+
* Rendering a component by its name.
|
|
263
|
+
* @param name name of the component
|
|
264
|
+
* @param props property of the component
|
|
265
|
+
* @param children sub-elements of the component
|
|
266
|
+
* @param index the name of the key
|
|
267
|
+
*/
|
|
55
268
|
renderOne<K extends keyof COMP, PK extends keyof P>(name: K & string, props?: P[PK] & ConstrItem | ConstrItem, children?: RawChildren | RawSlots, index?: PK & string | string): VNode | undefined;
|
|
269
|
+
/**
|
|
270
|
+
* Rendering the component by its name.
|
|
271
|
+
* @param item an array to which the rendered object will be added
|
|
272
|
+
* @param name name of the component
|
|
273
|
+
* @param props property of the component
|
|
274
|
+
* @param children sub-elements of the component
|
|
275
|
+
* @param index the name of the key
|
|
276
|
+
*/
|
|
56
277
|
renderAdd<K extends keyof COMP, PK extends keyof P>(item: any[], name: K & string, props?: P[PK] & ConstrItem | ConstrItem, children?: RawChildren | RawSlots, index?: PK & string | string): this;
|
|
57
278
|
}
|
|
58
|
-
|
|
59
|
-
// File: src/classes/design/DesignConstructorAbstract.d.ts
|
|
60
|
-
import { ComputedRef, ToRefs, VNode, Ref } from 'vue';
|
|
61
|
-
import { DesignComponents } from './DesignComponents';
|
|
62
|
-
import { ConstrClass, ConstrClasses, ConstrClassObject, ConstrComponent, ConstrEmit, ConstrExpose, ConstrItem, ConstrOptions, ConstrStyles } from '../../types/constructorTypes';
|
|
279
|
+
/** Class for collecting all functional components. */
|
|
63
280
|
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> {
|
|
64
|
-
|
|
65
|
-
protected init(): this;
|
|
281
|
+
/** Getting the class name. */
|
|
66
282
|
getName(): string;
|
|
283
|
+
/** Getting the design name. */
|
|
67
284
|
getDesign(): string;
|
|
285
|
+
/**
|
|
286
|
+
* Getting the class name.
|
|
287
|
+
* @param name list of class names by levels
|
|
288
|
+
*/
|
|
68
289
|
getSubClass(name: string | string[]): string;
|
|
290
|
+
/**
|
|
291
|
+
* Getting the class name for the status.
|
|
292
|
+
* @param name list of class names by levels
|
|
293
|
+
*/
|
|
69
294
|
getStatusClass(name: string | string[]): string;
|
|
295
|
+
/**
|
|
296
|
+
* Getting the property name for the style.
|
|
297
|
+
* @param name list of class names by levels
|
|
298
|
+
*/
|
|
70
299
|
getStyle(name: string | string[]): string;
|
|
300
|
+
/** Getting additional parameters. */
|
|
71
301
|
getAttrs(): ConstrItem;
|
|
302
|
+
/** List of available external variables. */
|
|
72
303
|
expose(): ConstrExpose<E, EXPOSE>;
|
|
304
|
+
/** The rendering method for the setup method. */
|
|
73
305
|
render(): () => VNode | (VNode | any)[] | undefined;
|
|
74
|
-
protected initSlot<K extends keyof SLOTS>(name: K, children?: any[], props?: ConstrItem): VNode | undefined;
|
|
75
|
-
protected toClass(classes?: ConstrClass): ConstrClassObject;
|
|
76
|
-
protected toClassName<T extends ConstrItem>(classes?: ConstrItem): T;
|
|
77
306
|
}
|
|
78
|
-
|
|
79
|
-
// File: src/classes/ref/DatetimeRef.d.ts
|
|
80
|
-
import { ComputedRef, Ref } from 'vue';
|
|
81
|
-
import { Datetime, GeoDate, GeoFirstDay, GeoHours, NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
82
|
-
import { RefOrNormal } from '../../types/refTypes';
|
|
307
|
+
/** A class for working with dates reactively. */
|
|
83
308
|
export declare class DatetimeRef {
|
|
309
|
+
/**
|
|
310
|
+
* Constructor
|
|
311
|
+
* @param date date for processing
|
|
312
|
+
* @param type type of date format for output
|
|
313
|
+
* @param code country and language code
|
|
314
|
+
*/
|
|
84
315
|
constructor(date: RefOrNormal<NumberOrStringOrDate>, type?: RefOrNormal<GeoDate>, code?: RefOrNormal<string>);
|
|
316
|
+
/** Returns the basic data for the date. */
|
|
85
317
|
getItem(): Ref<NumberOrStringOrDate>;
|
|
318
|
+
/** Returns a Date object. */
|
|
86
319
|
getDate(): Ref<Date>;
|
|
320
|
+
/** Obtaining an object of the basic Datetime class. */
|
|
87
321
|
getDatetime(): Datetime;
|
|
322
|
+
/** Returns the format of hours. */
|
|
88
323
|
getHoursType(): ComputedRef<GeoHours>;
|
|
324
|
+
/** Returns the code of the first day of the week. */
|
|
89
325
|
getFirstDayCode(): ComputedRef<GeoFirstDay>;
|
|
326
|
+
/** The method returns the year of the specified date according to local time. */
|
|
90
327
|
getYear(): ComputedRef<number>;
|
|
328
|
+
/** The method returns the month in the specified date according to local time. */
|
|
91
329
|
getMonth(): ComputedRef<number>;
|
|
330
|
+
/** The method returns the day of the month for the specified date according to local time. */
|
|
92
331
|
getDay(): ComputedRef<number>;
|
|
332
|
+
/** The method returns the hour for the specified date, according to local time. */
|
|
93
333
|
getHour(): ComputedRef<number>;
|
|
334
|
+
/** The method returns the minutes in the specified date according to local time. */
|
|
94
335
|
getMinute(): ComputedRef<number>;
|
|
336
|
+
/** The method returns the seconds in the specified date according to local time. */
|
|
95
337
|
getSecond(): ComputedRef<number>;
|
|
338
|
+
/** Returns the last day of the week. */
|
|
96
339
|
getMaxDay(): ComputedRef<number>;
|
|
340
|
+
/**
|
|
341
|
+
* Enables language-sensitive date and time formatting.
|
|
342
|
+
* @param type type of date format for output
|
|
343
|
+
* @param styleOptions the representation of the month
|
|
344
|
+
*/
|
|
97
345
|
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): ComputedRef<string>;
|
|
346
|
+
/**
|
|
347
|
+
* Output of standard data.
|
|
348
|
+
* @param timeZone add time zone
|
|
349
|
+
*/
|
|
98
350
|
standard(timeZone?: boolean): ComputedRef<string>;
|
|
99
351
|
}
|
|
100
|
-
|
|
101
|
-
// File: src/classes/ref/EffectScopeGlobal.d.ts
|
|
352
|
+
/** Global effect scope class. */
|
|
102
353
|
export declare class EffectScopeGlobal {
|
|
354
|
+
/**
|
|
355
|
+
* Runs a function within the global scope.
|
|
356
|
+
* @param fn function
|
|
357
|
+
* @returns the return value of the function
|
|
358
|
+
*/
|
|
103
359
|
static run<T>(fn: () => T): T | undefined;
|
|
104
360
|
}
|
|
105
|
-
|
|
106
|
-
// File: src/classes/ref/EventRef.d.ts
|
|
107
|
-
import { RefOrNormal } from '../../types/refTypes';
|
|
108
|
-
import { ElementOrString, ElementOrWindow, EventItem, EventListenerDetail, EventOptions } from '@dxtmisha/functional-basic';
|
|
361
|
+
/** Class for working with events (Ref). */
|
|
109
362
|
export declare class EventRef<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> extends EventItem<E, O, D> {
|
|
363
|
+
/**
|
|
364
|
+
* Classes Constructor
|
|
365
|
+
* @param elementSelector element
|
|
366
|
+
* @param elementSelectorControl control element
|
|
367
|
+
* @param type type
|
|
368
|
+
* @param listener event listener callback
|
|
369
|
+
* @param options event listener characteristics
|
|
370
|
+
* @param detail event-dependent detail value
|
|
371
|
+
*/
|
|
110
372
|
constructor(elementSelector?: RefOrNormal<ElementOrString<E> | undefined>, elementSelectorControl?: RefOrNormal<ElementOrString<HTMLElement>>, type?: string | string[], listener?: EventListenerDetail<O, D>, options?: EventOptions, detail?: D);
|
|
111
373
|
}
|
|
112
|
-
|
|
113
|
-
// File: src/classes/ref/GeoFlagRef.d.ts
|
|
114
|
-
import { ComputedRef } from 'vue';
|
|
115
|
-
import { GeoFlag, GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
|
|
116
|
-
import { RefOrNormal } from '../../types/refTypes';
|
|
374
|
+
/** Class for working with Flags. */
|
|
117
375
|
export declare class GeoFlagRef {
|
|
376
|
+
/**
|
|
377
|
+
* Constructor.
|
|
378
|
+
* @param code country and language code
|
|
379
|
+
*/
|
|
118
380
|
constructor(code?: RefOrNormal<string | undefined>);
|
|
381
|
+
/**
|
|
382
|
+
* Getting the country code.
|
|
383
|
+
* @returns country code
|
|
384
|
+
*/
|
|
119
385
|
getCode(): string;
|
|
386
|
+
/**
|
|
387
|
+
* Returns information about the country and its flag.
|
|
388
|
+
* @param code country code
|
|
389
|
+
*/
|
|
120
390
|
get(code?: RefOrNormal<string>): ComputedRef<GeoFlagItem | undefined>;
|
|
391
|
+
/**
|
|
392
|
+
* Returns information about the language and its flag.
|
|
393
|
+
* @param code country code
|
|
394
|
+
*/
|
|
121
395
|
getLanguage(code?: RefOrNormal<string>): ComputedRef<GeoFlagItem | undefined>;
|
|
396
|
+
/**
|
|
397
|
+
* Getting a link to the flag.
|
|
398
|
+
* @param code country code
|
|
399
|
+
*/
|
|
122
400
|
getFlag(code?: RefOrNormal<string>): ComputedRef<string | undefined>;
|
|
401
|
+
/**
|
|
402
|
+
* Getting a list of countries by an array of codes.
|
|
403
|
+
* @param codes list of country codes
|
|
404
|
+
*/
|
|
123
405
|
getList(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagItem[]>;
|
|
406
|
+
/**
|
|
407
|
+
* Getting a list of languages by an array of codes.
|
|
408
|
+
* @param codes list of country codes
|
|
409
|
+
*/
|
|
124
410
|
getListLanguage(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagItem[]>;
|
|
411
|
+
/**
|
|
412
|
+
* Getting a list of countries by an array of codes in national language.
|
|
413
|
+
* @param codes list of country codes
|
|
414
|
+
*/
|
|
125
415
|
getNational(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagNational[]>;
|
|
416
|
+
/**
|
|
417
|
+
* Getting a list of languages by an array of codes in national language.
|
|
418
|
+
* @param codes list of country codes
|
|
419
|
+
*/
|
|
126
420
|
getNationalLanguage(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagNational[]>;
|
|
127
421
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
422
|
+
/**
|
|
423
|
+
* Reactive class for managing the formatting of numbers and dates.
|
|
424
|
+
* @remarks
|
|
425
|
+
* Avoid using this reactive class if reactive updates are not required.
|
|
426
|
+
* For non-reactive formatting, use the standard `GeoIntl` class from `@dxtmisha/functional-basic`.
|
|
427
|
+
*/
|
|
133
428
|
export declare class GeoIntlRef {
|
|
429
|
+
/**
|
|
430
|
+
* Constructor
|
|
431
|
+
* @param code country code, full form language-country or one of them
|
|
432
|
+
*/
|
|
134
433
|
constructor(code?: RefOrNormal<string>);
|
|
434
|
+
/**
|
|
435
|
+
* The consistent translation of language, region and script display names.
|
|
436
|
+
* @param value the code to provide depends on the type
|
|
437
|
+
* @param typeOptions options object or type string
|
|
438
|
+
*/
|
|
135
439
|
display(value?: RefOrNormal<string>, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): ComputedRef<string>;
|
|
440
|
+
/**
|
|
441
|
+
* Get display names of language.
|
|
442
|
+
* @param value the code to provide depends on the type
|
|
443
|
+
* @param style the formatting style to use
|
|
444
|
+
*/
|
|
136
445
|
languageName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
446
|
+
/**
|
|
447
|
+
* Get display names of region.
|
|
448
|
+
* @param value the code to provide depends on the type
|
|
449
|
+
* @param style the formatting style to use
|
|
450
|
+
*/
|
|
137
451
|
countryName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
452
|
+
/**
|
|
453
|
+
* In basic use without specifying a locale, a formatted string.
|
|
454
|
+
* @param value a number, bigint, or string, to format
|
|
455
|
+
* @param options format options
|
|
456
|
+
*/
|
|
138
457
|
number(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
458
|
+
/** Decimal point symbol. */
|
|
139
459
|
decimal(): ComputedRef<string>;
|
|
460
|
+
/**
|
|
461
|
+
* Currency formatting.
|
|
462
|
+
* @param value a number, bigint, or string, to format
|
|
463
|
+
* @param currencyOptions currency code or options
|
|
464
|
+
* @param numberOnly do not display currency symbol
|
|
465
|
+
*/
|
|
140
466
|
currency(value: RefOrNormal<NumberOrString>, currencyOptions?: RefOrNormal<string | Intl.NumberFormatOptions>, numberOnly?: boolean): ComputedRef<string>;
|
|
467
|
+
/**
|
|
468
|
+
* Returns the currency symbol if it exists, otherwise the currency code.
|
|
469
|
+
* @param currency currency code
|
|
470
|
+
* @param currencyDisplay display mode
|
|
471
|
+
*/
|
|
141
472
|
currencySymbol(currency: RefOrNormal<string>, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): ComputedRef<string>;
|
|
473
|
+
/**
|
|
474
|
+
* Unit formatting.
|
|
475
|
+
* @param value a number, bigint, or string, to format
|
|
476
|
+
* @param unitOptions unit identifier or options
|
|
477
|
+
*/
|
|
142
478
|
unit(value: RefOrNormal<NumberOrString>, unitOptions?: string | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
479
|
+
/**
|
|
480
|
+
* Returns formatted file size.
|
|
481
|
+
* @param value size number
|
|
482
|
+
* @param unitOptions unit options
|
|
483
|
+
*/
|
|
143
484
|
sizeFile(value: RefOrNormal<NumberOrString>, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
485
|
+
/**
|
|
486
|
+
* Number as a percentage.
|
|
487
|
+
* @param value number to format
|
|
488
|
+
* @param options format options
|
|
489
|
+
*/
|
|
144
490
|
percent(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
491
|
+
/**
|
|
492
|
+
* Number as a percentage (unit).
|
|
493
|
+
* @param value number to format
|
|
494
|
+
* @param options format options
|
|
495
|
+
*/
|
|
145
496
|
percentBy100(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
497
|
+
/**
|
|
498
|
+
* Formats plural rules based on input number and words list.
|
|
499
|
+
* @param value number to format
|
|
500
|
+
* @param words formatted words separated by pipeline
|
|
501
|
+
* @param options plural rules options
|
|
502
|
+
* @param optionsNumber number format options
|
|
503
|
+
*/
|
|
146
504
|
plural(value: RefOrNormal<NumberOrString>, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
505
|
+
/**
|
|
506
|
+
* Enables language-sensitive date and time formatting.
|
|
507
|
+
* @param value date to format
|
|
508
|
+
* @param type type of data format
|
|
509
|
+
* @param styleOptions representation of month or options
|
|
510
|
+
* @param hour24 whether to use 24-hour time
|
|
511
|
+
*/
|
|
147
512
|
date(value: RefOrNormal<NumberOrStringOrDate>, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): ComputedRef<string>;
|
|
513
|
+
/**
|
|
514
|
+
* Enables language-sensitive relative time formatting.
|
|
515
|
+
* @param value number or date to format
|
|
516
|
+
* @param styleOptions style options
|
|
517
|
+
* @param todayValue reference current date
|
|
518
|
+
*/
|
|
148
519
|
relative(value: RefOrNormal<NumberOrStringOrDate>, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): ComputedRef<string>;
|
|
520
|
+
/**
|
|
521
|
+
* Enables relative time formatting with limit checks.
|
|
522
|
+
* @param value number or date to format
|
|
523
|
+
* @param limit day limit threshold
|
|
524
|
+
* @param todayValue reference current date
|
|
525
|
+
* @param relativeOptions relative options
|
|
526
|
+
* @param dateOptions date options
|
|
527
|
+
* @param type date format type
|
|
528
|
+
* @param hour24 24-hour flag
|
|
529
|
+
*/
|
|
149
530
|
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>;
|
|
531
|
+
/**
|
|
532
|
+
* Formats relative time elapsed from value.
|
|
533
|
+
* @param value number to format
|
|
534
|
+
* @param unit relative time unit
|
|
535
|
+
* @param styleOptions style options
|
|
536
|
+
*/
|
|
150
537
|
relativeByValue(value: RefOrNormal<NumberOrString>, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): ComputedRef<string>;
|
|
538
|
+
/**
|
|
539
|
+
* Names of months.
|
|
540
|
+
* @param value date
|
|
541
|
+
* @param style month style
|
|
542
|
+
*/
|
|
151
543
|
month(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['month']): ComputedRef<string>;
|
|
544
|
+
/**
|
|
545
|
+
* List of months.
|
|
546
|
+
* @param style month style
|
|
547
|
+
*/
|
|
152
548
|
months(style?: Intl.DateTimeFormatOptions['month']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
549
|
+
/**
|
|
550
|
+
* Returns weekday name.
|
|
551
|
+
* @param value date
|
|
552
|
+
* @param style weekday style
|
|
553
|
+
*/
|
|
153
554
|
weekday(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<string>;
|
|
555
|
+
/**
|
|
556
|
+
* List of weekday names.
|
|
557
|
+
* @param style weekday style
|
|
558
|
+
*/
|
|
154
559
|
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
560
|
+
/**
|
|
561
|
+
* Formatted time string.
|
|
562
|
+
* @param value date
|
|
563
|
+
*/
|
|
155
564
|
time(value: RefOrNormal<NumberOrStringOrDate>): ComputedRef<string>;
|
|
565
|
+
/**
|
|
566
|
+
* Sorts strings taking into account the characteristics of countries.
|
|
567
|
+
* @param data array data
|
|
568
|
+
* @param compareFn comparison function
|
|
569
|
+
*/
|
|
156
570
|
sort<T>(data: RefOrNormal<T[]>, compareFn?: (a: T, b: T) => [string, string]): ComputedRef<T[]>;
|
|
157
571
|
}
|
|
158
|
-
|
|
159
|
-
// File: src/classes/ref/GeoRef.d.ts
|
|
160
|
-
import { ComputedRef, Ref } from 'vue';
|
|
161
|
-
import { GeoItemFull } from '@dxtmisha/functional-basic';
|
|
572
|
+
/** Reactive class for working with geographic data. */
|
|
162
573
|
export declare class GeoRef {
|
|
574
|
+
/** Information about the current country. */
|
|
163
575
|
static get(): Ref<GeoItemFull>;
|
|
576
|
+
/** Current country code. */
|
|
164
577
|
static getCountry(): ComputedRef<string>;
|
|
578
|
+
/** Current language code. */
|
|
165
579
|
static getLanguage(): ComputedRef<string>;
|
|
580
|
+
/** Full standard locale format. */
|
|
166
581
|
static getStandard(): ComputedRef<string>;
|
|
582
|
+
/** First day of week code. */
|
|
167
583
|
static getFirstDay(): ComputedRef<string>;
|
|
584
|
+
/** Current location string. */
|
|
168
585
|
static getLocation(): ComputedRef<string>;
|
|
586
|
+
/** Current country code from location. */
|
|
169
587
|
static getLocationCountry(): ComputedRef<string>;
|
|
588
|
+
/** Current language code from location. */
|
|
170
589
|
static getLocationLanguage(): ComputedRef<string>;
|
|
590
|
+
/**
|
|
591
|
+
* Changes the data by full code.
|
|
592
|
+
* @param code location code
|
|
593
|
+
*/
|
|
171
594
|
static set(code: string): void;
|
|
595
|
+
/**
|
|
596
|
+
* Sets default country code.
|
|
597
|
+
* @param code default code or getter
|
|
598
|
+
*/
|
|
172
599
|
static setValueDefault(code?: string | (() => string)): void;
|
|
173
600
|
}
|
|
174
|
-
|
|
175
|
-
// File: src/classes/ref/GeoUnitRef.d.ts
|
|
176
|
-
import { ComputedRef, Ref } from 'vue';
|
|
177
|
-
import { GeoUnit, NumberOrString } from '@dxtmisha/functional-basic';
|
|
178
|
-
import { RefOrNormal } from '../../types/refTypes';
|
|
601
|
+
/** Reactive class for managing localized unit formatting and automatic conversions. */
|
|
179
602
|
export declare class GeoUnitRef {
|
|
603
|
+
/**
|
|
604
|
+
* Constructor.
|
|
605
|
+
* @param code location code
|
|
606
|
+
*/
|
|
180
607
|
constructor(code?: RefOrNormal<string>);
|
|
608
|
+
/** Standard location code. */
|
|
181
609
|
getLocation(): ComputedRef<string>;
|
|
610
|
+
/** Formats millimeter value. */
|
|
182
611
|
millimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
612
|
+
/** Formats centimeter value. */
|
|
183
613
|
centimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
614
|
+
/** Formats meter value. */
|
|
184
615
|
meter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
616
|
+
/** Formats kilometer value. */
|
|
185
617
|
kilometer(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
618
|
+
/** Formats square meter value. */
|
|
186
619
|
squareMeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
620
|
+
/** Formats hectare value. */
|
|
187
621
|
hectare(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
622
|
+
/** Formats gram value. */
|
|
188
623
|
gram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
624
|
+
/** Formats kilogram value. */
|
|
189
625
|
kilogram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
626
|
+
/** Formats tonne value. */
|
|
190
627
|
tonne(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
628
|
+
/** Formats milliliter value. */
|
|
191
629
|
milliliter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
630
|
+
/** Formats liter value. */
|
|
192
631
|
liter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
632
|
+
/** Formats celsius value. */
|
|
193
633
|
celsius(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
634
|
+
/** Formats kilometer per hour value. */
|
|
194
635
|
kilometerPerHour(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
636
|
+
/** Formats custom unit value. */
|
|
637
|
+
format(value: RefOrNormal<NumberOrString>, unit: RefOrNormal<string>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
195
638
|
}
|
|
196
|
-
|
|
197
|
-
// File: src/classes/ref/ListDataRef.d.ts
|
|
198
|
-
import { RefOrNormal, RefType } from '../../types/refTypes';
|
|
199
|
-
import { ListDataFull, ListDataItem, ListList, ListListInput, ListNames, ListSelectedItem, ListSelectedList } from '../../types/listTypes';
|
|
200
|
-
import { ComputedRef } from 'vue';
|
|
639
|
+
/** Class for managing list data structure and navigation. */
|
|
201
640
|
export declare class ListDataRef {
|
|
641
|
+
/**
|
|
642
|
+
* Constructor
|
|
643
|
+
* @param list list data
|
|
644
|
+
* @param focus focus identifier
|
|
645
|
+
* @param highlight search highlight text
|
|
646
|
+
* @param highlightLengthStart min length to highlight
|
|
647
|
+
* @param filterMode filter mode flag
|
|
648
|
+
* @param selected selected identifiers
|
|
649
|
+
* @param keyValue value key name
|
|
650
|
+
* @param keyLabel label key name
|
|
651
|
+
* @param lite lite mode threshold
|
|
652
|
+
* @param min minimum selection
|
|
653
|
+
* @param max maximum selection
|
|
654
|
+
* @param parent parent identifier
|
|
655
|
+
*/
|
|
202
656
|
constructor(list: RefOrNormal<ListListInput | undefined>, focus?: RefType<ListSelectedItem | undefined> | undefined, highlight?: RefType<string | undefined> | undefined, highlightLengthStart?: RefType<number | undefined> | undefined, filterMode?: RefType<boolean | undefined> | undefined, selected?: RefType<ListSelectedList | undefined> | undefined, keyValue?: RefType<string | undefined> | undefined, keyLabel?: RefType<string | undefined> | undefined, lite?: RefType<number | undefined> | undefined, min?: RefOrNormal<number | string | undefined>, max?: RefOrNormal<number | string | undefined>, parent?: string | undefined);
|
|
203
657
|
readonly data: ComputedRef<ListList>;
|
|
204
658
|
readonly liteData: ComputedRef<ListList>;
|
|
@@ -241,69 +695,56 @@ export declare class ListDataRef {
|
|
|
241
695
|
getLastItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
242
696
|
getSubList(item: ListDataItem): ListDataRef;
|
|
243
697
|
}
|
|
244
|
-
|
|
245
|
-
// File: src/classes/ref/RouterItemRef.d.ts
|
|
246
|
-
import { RouteLocationRaw, Router } from 'vue-router';
|
|
247
|
-
import { ConstrHrefProps } from '../../types/constructorTypes';
|
|
698
|
+
/** Router management class. */
|
|
248
699
|
export declare class RouterItemRef {
|
|
249
|
-
|
|
700
|
+
/** Get router instance. */
|
|
701
|
+
static get(): _RouterClassic;
|
|
702
|
+
/** Returns link by route name. */
|
|
250
703
|
static getLink(name: string, params?: any, query?: any): string | undefined;
|
|
704
|
+
/** Returns href properties by route name. */
|
|
251
705
|
static getHref(name?: string, params?: any, query?: any): ConstrHrefProps;
|
|
706
|
+
/** Changes site path. */
|
|
252
707
|
static push(to: string | RouteLocationRaw): void;
|
|
708
|
+
/** Sets router instance. */
|
|
253
709
|
static set(router: Router): void;
|
|
710
|
+
/** Sets router instance once. */
|
|
254
711
|
static setOneTime(router: Router): void;
|
|
712
|
+
/** Converts raw location to href properties. */
|
|
255
713
|
static rawToHref(to?: string | RouteLocationRaw): ConstrHrefProps;
|
|
256
714
|
}
|
|
257
|
-
|
|
258
|
-
// File: src/classes/ref/ScrollbarWidthRef.d.ts
|
|
259
|
-
import { Ref, ComputedRef } from 'vue';
|
|
715
|
+
/** Class for getting scrollbar width as a reactive item. */
|
|
260
716
|
export declare class ScrollbarWidthRef {
|
|
261
717
|
readonly item: Ref<boolean | undefined, boolean | undefined>;
|
|
262
718
|
readonly width: Ref<number, number>;
|
|
263
719
|
constructor();
|
|
264
720
|
readonly is: ComputedRef<boolean>;
|
|
265
721
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
722
|
+
/**
|
|
723
|
+
* Asynchronous reactive composable for API requests with built-in SSR support.
|
|
724
|
+
* @example
|
|
725
|
+
* ```typescript
|
|
726
|
+
* const { data, loading } = useApiAsyncRef('/users/1', { method: 'GET' });
|
|
727
|
+
* ```
|
|
728
|
+
*/
|
|
272
729
|
export declare function useApiAsyncRef<R, T = R>(path?: RefOrNormal<string | undefined>, options?: ApiOptions, reactivity?: boolean, conditions?: RefType<boolean>, transformation?: (data: T, isResponseContractValid?: ApiDataValidation) => ApiData<R>, validateResponseContract?: (data: T) => ApiDataValidation, errorContract?: ApiErrorStorageList, unmounted?: boolean, apiInstance?: ApiInstance): UseApiRef<R>;
|
|
273
|
-
|
|
274
|
-
// File: src/composables/ref/useApiDelete.d.ts
|
|
275
|
-
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
276
|
-
import { UseApiRequestSetup } from './useApiRequest';
|
|
277
|
-
import { Ref } from 'vue';
|
|
278
|
-
export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
279
|
-
}
|
|
730
|
+
/** Use API delete request helper wrapper. */
|
|
280
731
|
export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiDeleteSetup<T, Request, Return>): {
|
|
281
732
|
loading: Ref<boolean, boolean>;
|
|
282
733
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
283
734
|
};
|
|
284
|
-
|
|
285
|
-
// File: src/composables/ref/useApiGet.d.ts
|
|
286
|
-
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
287
|
-
import { UseApiRequestSetup } from './useApiRequest';
|
|
288
|
-
import { Ref } from 'vue';
|
|
289
|
-
export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
290
|
-
}
|
|
735
|
+
/** Use API get request helper wrapper. */
|
|
291
736
|
export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiGetSetup<T, Request, Return>): {
|
|
292
737
|
loading: Ref<boolean, boolean>;
|
|
293
738
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
294
739
|
};
|
|
295
|
-
|
|
296
|
-
// File: src/composables/ref/useApiManagementAsyncRef.d.ts
|
|
297
|
-
import { ApiInstance, ArrayToItem, FormattersListColumns, FormattersOptionsList, SearchColumns, ApiDataValidation, SearchFormatList, ApiData, ApiErrorItem, ApiFetch } from '@dxtmisha/functional-basic';
|
|
298
|
-
import { ApiManagementGet, ApiManagementRequest, ApiManagementSearch, ApiManagementValue } from '../../types/apiTypes';
|
|
299
|
-
import { ComputedRef, Ref } from 'vue';
|
|
740
|
+
/** Asynchronous reactive composable for API management requests with built-in SSR support. */
|
|
300
741
|
export declare function useApiManagementAsyncRef<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, apiInstance?: ApiInstance): {
|
|
301
742
|
isValid: ComputedRef<boolean>;
|
|
302
743
|
isResponseContractValid: ComputedRef<boolean>;
|
|
303
|
-
responseValidationResult: ComputedRef<
|
|
744
|
+
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
304
745
|
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
305
|
-
readonly data: ComputedRef<
|
|
306
|
-
errorItem: ComputedRef<
|
|
746
|
+
readonly data: ComputedRef<ApiData<Return> | undefined>;
|
|
747
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
307
748
|
readonly length: ComputedRef<number>;
|
|
308
749
|
lengthData: ComputedRef<number>;
|
|
309
750
|
starting: ComputedRef<boolean>;
|
|
@@ -319,22 +760,28 @@ export declare function useApiManagementAsyncRef<Return extends ApiManagementVal
|
|
|
319
760
|
initSsr: () => void;
|
|
320
761
|
reset: () => Promise<void>;
|
|
321
762
|
abort: () => void;
|
|
322
|
-
sendPost: (request?: ApiFetch["request"]) => Promise<
|
|
323
|
-
sendPut: (request?: ApiFetch["request"]) => Promise<
|
|
324
|
-
sendDelete: (request?: ApiFetch["request"]) => Promise<
|
|
763
|
+
sendPost: (request?: ApiFetch["request"]) => Promise<ApiData<Post> | undefined>;
|
|
764
|
+
sendPut: (request?: ApiFetch["request"]) => Promise<ApiData<Put> | undefined>;
|
|
765
|
+
sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
|
|
325
766
|
};
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
767
|
+
/**
|
|
768
|
+
* A powerful composable for comprehensive API request orchestration.
|
|
769
|
+
* @note This hook is recommended to be used in tandem with `executeUse` for centralized state management.
|
|
770
|
+
* @remarks Data formatting guidelines for `formattersOptions`:
|
|
771
|
+
* - Recommended for values, dates, currencies.
|
|
772
|
+
* - Not recommended for technical identifiers (IDs, UUIDs).
|
|
773
|
+
* @example
|
|
774
|
+
* ```typescript
|
|
775
|
+
* const products = useApiManagementRef({ path: '/api/v1/products' });
|
|
776
|
+
* ```
|
|
777
|
+
*/
|
|
331
778
|
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, apiInstance?: ApiInstance): {
|
|
332
779
|
isValid: ComputedRef<boolean>;
|
|
333
780
|
isResponseContractValid: ComputedRef<boolean>;
|
|
334
|
-
responseValidationResult: ComputedRef<
|
|
781
|
+
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
335
782
|
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
336
783
|
readonly data: ComputedRef<ApiData<Return> | undefined>;
|
|
337
|
-
errorItem: ComputedRef<
|
|
784
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
338
785
|
readonly length: ComputedRef<number>;
|
|
339
786
|
lengthData: ComputedRef<number>;
|
|
340
787
|
starting: ComputedRef<boolean>;
|
|
@@ -354,144 +801,68 @@ export declare function useApiManagementRef<Return extends ApiManagementValue, F
|
|
|
354
801
|
sendPut: (request?: ApiFetch["request"]) => Promise<ApiData<Put> | undefined>;
|
|
355
802
|
sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
|
|
356
803
|
};
|
|
357
|
-
|
|
358
|
-
// File: src/composables/ref/useApiPost.d.ts
|
|
359
|
-
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
360
|
-
import { UseApiRequestSetup } from './useApiRequest';
|
|
361
|
-
import { Ref } from 'vue';
|
|
362
|
-
export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
363
|
-
}
|
|
804
|
+
/** Use API post request helper wrapper. */
|
|
364
805
|
export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPostSetup<T, Request, Return>): {
|
|
365
806
|
loading: Ref<boolean, boolean>;
|
|
366
807
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
367
808
|
};
|
|
368
|
-
|
|
369
|
-
// File: src/composables/ref/useApiPut.d.ts
|
|
370
|
-
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
371
|
-
import { UseApiRequestSetup } from './useApiRequest';
|
|
372
|
-
import { Ref } from 'vue';
|
|
373
|
-
export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
374
|
-
}
|
|
809
|
+
/** Use API put request helper wrapper. */
|
|
375
810
|
export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPutSetup<T, Request, Return>): {
|
|
376
811
|
loading: Ref<boolean, boolean>;
|
|
377
812
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
378
813
|
};
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
data: ComputedRef<ApiData<R> | undefined>;
|
|
387
|
-
item: Ref<ApiData<R> | undefined>;
|
|
388
|
-
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
389
|
-
isResponseContractValid: ComputedRef<boolean>;
|
|
390
|
-
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
391
|
-
length: ComputedRef<number>;
|
|
392
|
-
starting: ComputedRef<boolean>;
|
|
393
|
-
loading: Ref<boolean>;
|
|
394
|
-
reading: Ref<boolean>;
|
|
395
|
-
isStarting(): boolean;
|
|
396
|
-
isLoading(): boolean;
|
|
397
|
-
isReading(): boolean;
|
|
398
|
-
getItem(): ApiData<R> | undefined;
|
|
399
|
-
init(): void;
|
|
400
|
-
initSsr(): void;
|
|
401
|
-
reset(): Promise<void>;
|
|
402
|
-
stop(): void;
|
|
403
|
-
abort(): void;
|
|
404
|
-
}
|
|
814
|
+
/**
|
|
815
|
+
* Main reactive composable for working with API requests in Vue.
|
|
816
|
+
* @example
|
|
817
|
+
* ```typescript
|
|
818
|
+
* const { data, loading } = useApiRef('/users/1');
|
|
819
|
+
* ```
|
|
820
|
+
*/
|
|
405
821
|
export declare function useApiRef<R, T = R>(path?: RefOrNormal<string | undefined>, options?: ApiOptions, reactivity?: boolean, conditions?: RefType<boolean>, transformation?: (data: T, isResponseContractValid?: ApiDataValidation) => ApiData<R>, validateResponseContract?: (data: T) => ApiDataValidation, errorContract?: ApiErrorStorageList, unmounted?: boolean, apiInstance?: ApiInstance): UseApiRef<R>;
|
|
406
822
|
export declare const setApiRefGlobalConditions: (conditions: RefType<any>) => void;
|
|
407
|
-
|
|
408
|
-
// File: src/composables/ref/useApiRequest.d.ts
|
|
409
|
-
import { ApiInstance, ApiMethodItem, ApiData, ApiFetch, ApiErrorStorageList, ApiDataValidation } from '@dxtmisha/functional-basic';
|
|
410
|
-
import { ApiOptions } from '../../types/apiTypes';
|
|
411
|
-
import { RefOrNormal } from '../../types/refTypes';
|
|
412
|
-
import { Ref } from 'vue';
|
|
413
|
-
export interface UseApiRequestSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> {
|
|
414
|
-
path?: RefOrNormal<string | undefined>;
|
|
415
|
-
method?: ApiMethodItem;
|
|
416
|
-
action?: (data: Return | undefined) => Promise<void> | void;
|
|
417
|
-
transformation?: (data: T) => Return;
|
|
418
|
-
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
419
|
-
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
420
|
-
errorContract?: ApiErrorStorageList;
|
|
421
|
-
toData?: boolean;
|
|
422
|
-
options?: ApiOptions;
|
|
423
|
-
apiInstance?: ApiInstance;
|
|
424
|
-
}
|
|
823
|
+
/** Sends configured API request. */
|
|
425
824
|
export declare function useApiRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>({ path, method, action, transformation, validateRequestContract, validateResponseContract, errorContract, toData, options, apiInstance }: UseApiRequestSetup<T, Request, Return>): {
|
|
426
825
|
loading: Ref<boolean, boolean>;
|
|
427
826
|
send(request?: Request): Promise<Return | undefined>;
|
|
428
827
|
};
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
type BroadcastValueItem<T> = T | string | undefined;
|
|
433
|
-
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<BroadcastValueItem<T>>;
|
|
434
|
-
|
|
435
|
-
// File: src/composables/ref/useCookieRef.d.ts
|
|
436
|
-
import { Ref } from 'vue';
|
|
437
|
-
import { CookieOptions } from '@dxtmisha/functional-basic';
|
|
828
|
+
/** Creates reactive variable synced across browser tabs using BroadcastChannel. */
|
|
829
|
+
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<T | string | undefined>;
|
|
830
|
+
/** Creates reactive cookie reference. */
|
|
438
831
|
export declare function useCookieRef<T>(name: string, defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): Ref<T | string | undefined>;
|
|
439
|
-
|
|
440
|
-
// File: src/composables/ref/useFormattersRef.d.ts
|
|
441
|
-
import { FormattersListProp, FormattersOptionsList, FormattersReturn } from '@dxtmisha/functional-basic';
|
|
442
|
-
import { RefType } from '../../types/refTypes';
|
|
443
|
-
import { ComputedRef } from 'vue';
|
|
832
|
+
/** Composable for reactive formatting of data lists based on rules. */
|
|
444
833
|
export declare function useFormattersRef<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp>(list: RefType<List | undefined>, options: Options): {
|
|
445
834
|
listFormat: ComputedRef<FormattersReturn<List, Options>>;
|
|
446
835
|
length: ComputedRef<number>;
|
|
447
836
|
};
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
837
|
+
/**
|
|
838
|
+
* Returns GeoIntlRef instance.
|
|
839
|
+
* @remarks
|
|
840
|
+
* Avoid using this reactive composable if reactive updates are not required.
|
|
841
|
+
* For non-reactive formatting, use `GeoIntl` directly.
|
|
842
|
+
*/
|
|
451
843
|
export declare function useGeoIntlRef(): GeoIntlRef;
|
|
452
|
-
|
|
453
|
-
// File: src/composables/ref/useGeoUnitRef.d.ts
|
|
454
|
-
import { GeoUnitRef } from '../../classes/ref/GeoUnitRef';
|
|
844
|
+
/** Returns GeoUnitRef instance. */
|
|
455
845
|
export declare function useGeoUnitRef(): GeoUnitRef;
|
|
456
|
-
|
|
457
|
-
// File: src/composables/ref/useHashRef.d.ts
|
|
458
|
-
import { ShallowRef } from 'vue';
|
|
846
|
+
/** Creates reactive hash variable. */
|
|
459
847
|
export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin: string) => {
|
|
465
|
-
lazyItemStatus: any;
|
|
466
|
-
readonly lazyItem: any;
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
// File: src/composables/ref/useLazyRef.d.ts
|
|
470
|
-
import { Ref, ShallowRef } from 'vue';
|
|
471
|
-
export type LazyItem = {
|
|
472
|
-
status: ShallowRef<boolean>;
|
|
473
|
-
ratio: ShallowRef<number>;
|
|
474
|
-
entry: ShallowRef<IntersectionObserverEntry | undefined>;
|
|
475
|
-
stopWatch: () => void;
|
|
848
|
+
/** Hook for initializing lazy tracking of element appearance with root margin. */
|
|
849
|
+
export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin?: string) => {
|
|
850
|
+
lazyItemStatus: ShallowRef<boolean, boolean>;
|
|
851
|
+
readonly lazyItem: LazyItem | undefined;
|
|
476
852
|
};
|
|
477
|
-
|
|
853
|
+
/** Hook for initializing lazy element appearance tracking. */
|
|
478
854
|
export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
479
855
|
intersectionObserver: IntersectionObserver | undefined;
|
|
480
|
-
getItem(element
|
|
856
|
+
getItem(element?: HTMLElement): LazyItem | undefined;
|
|
481
857
|
addLazyItem(element: Ref<HTMLElement | undefined>): ShallowRef<boolean, boolean>;
|
|
482
858
|
removeLazyItem: (element?: HTMLElement) => void;
|
|
483
859
|
disconnectLazy: () => void | undefined;
|
|
484
860
|
};
|
|
485
|
-
|
|
486
|
-
// File: src/composables/ref/useLoadingRef.d.ts
|
|
487
|
-
import { ShallowRef } from 'vue';
|
|
861
|
+
/** Returns reactive global loading status. */
|
|
488
862
|
export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
|
|
489
|
-
|
|
490
|
-
// File: src/composables/ref/useMeta.d.ts
|
|
491
|
-
import { MetaRobots, MetaStatic } from '@dxtmisha/functional-basic';
|
|
492
|
-
import { Ref } from 'vue';
|
|
863
|
+
/** Vue composable for reactive meta tags management with DOM synchronization. */
|
|
493
864
|
export declare const useMeta: () => Readonly<{
|
|
494
|
-
meta:
|
|
865
|
+
meta: Meta;
|
|
495
866
|
title: Ref<string, string>;
|
|
496
867
|
keyword: Ref<string, string>;
|
|
497
868
|
description: Ref<string, string>;
|
|
@@ -512,10 +883,10 @@ export declare const useMeta: () => Readonly<{
|
|
|
512
883
|
setCanonical: (value: string) => void;
|
|
513
884
|
setRobots: (value: MetaRobots) => void;
|
|
514
885
|
setSiteName: (value: string) => void;
|
|
515
|
-
setSuffix: (suffix: string) =>
|
|
516
|
-
} & {
|
|
886
|
+
setSuffix: (suffix: string) => void;
|
|
887
|
+
}> & {
|
|
517
888
|
init(): Readonly<{
|
|
518
|
-
meta:
|
|
889
|
+
meta: Meta;
|
|
519
890
|
title: Ref<string, string>;
|
|
520
891
|
keyword: Ref<string, string>;
|
|
521
892
|
description: Ref<string, string>;
|
|
@@ -536,21 +907,13 @@ export declare const useMeta: () => Readonly<{
|
|
|
536
907
|
setCanonical: (value: string) => void;
|
|
537
908
|
setRobots: (value: MetaRobots) => void;
|
|
538
909
|
setSiteName: (value: string) => void;
|
|
539
|
-
setSuffix: (suffix: string) =>
|
|
910
|
+
setSuffix: (suffix: string) => void;
|
|
540
911
|
}>;
|
|
541
912
|
destroyExecute?(): void;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
// File: src/composables/ref/useQueryRef.d.ts
|
|
545
|
-
import { ShallowRef } from 'vue';
|
|
913
|
+
};
|
|
914
|
+
/** Creates reactive URL query parameter reference. */
|
|
546
915
|
export declare function useQueryRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
547
|
-
|
|
548
|
-
// File: src/composables/ref/useRouterList.d.ts
|
|
549
|
-
import { Ref, ComputedRef } from 'vue';
|
|
550
|
-
import { NumberOrString } from '@dxtmisha/functional-basic';
|
|
551
|
-
import { ConstrBind } from '../../types/constructorTypes';
|
|
552
|
-
import { ListDataBasic } from '../../types/listTypes';
|
|
553
|
-
import { RefType } from '../../types/refTypes';
|
|
916
|
+
/** Managing router link list. */
|
|
554
917
|
export declare const useRouterList: <T extends ListDataBasic>(list: RefType<ConstrBind<T>[] | undefined>, selected?: Ref<string> | string, hasTo?: boolean) => {
|
|
555
918
|
item: ComputedRef<T | undefined>;
|
|
556
919
|
selected: Ref<string, string>;
|
|
@@ -559,354 +922,120 @@ export declare const useRouterList: <T extends ListDataBasic>(list: RefType<Cons
|
|
|
559
922
|
to: (name?: string) => void;
|
|
560
923
|
toMain(): void;
|
|
561
924
|
};
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
import { Ref, ComputedRef } from 'vue';
|
|
565
|
-
import { SearchColumns, SearchFormatList, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
566
|
-
import { SearchListInput } from '../../types/searchTypes';
|
|
567
|
-
export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns: K, value?: Ref<string>, options?: SearchOptions): {
|
|
925
|
+
/** Composable for search logic with reactive data. */
|
|
926
|
+
export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns?: SearchColumnsInput<T, K>, value?: Ref<string>, options?: SearchOptions): {
|
|
568
927
|
isSearch: ComputedRef<boolean>;
|
|
569
928
|
search: Ref<string, string>;
|
|
570
929
|
loading: Ref<boolean, boolean>;
|
|
571
930
|
listSearch: ComputedRef<SearchFormatList<T, K>>;
|
|
572
931
|
length: ComputedRef<number>;
|
|
573
932
|
};
|
|
574
|
-
|
|
575
|
-
// File: src/composables/ref/useSearchValueRef.d.ts
|
|
576
|
-
import { Ref } from 'vue';
|
|
577
|
-
import { SearchList, SearchColumns, SearchItem } from '@dxtmisha/functional-basic';
|
|
933
|
+
/** Composable for search value state and handling delays. */
|
|
578
934
|
export declare function useSearchValueRef<T extends SearchItem, K extends SearchColumns<T>>(item: SearchList<T, K>, value?: Ref<string>): {
|
|
579
935
|
search: Ref<string, string>;
|
|
580
936
|
searchDelay: Ref<string, string>;
|
|
581
937
|
loading: Ref<boolean, boolean>;
|
|
582
938
|
};
|
|
583
|
-
|
|
584
|
-
// File: src/composables/ref/useSessionRef.d.ts
|
|
585
|
-
import { Ref } from 'vue';
|
|
939
|
+
/** Creates reactive session storage reference. */
|
|
586
940
|
export declare function useSessionRef<T>(name: string, defaultValue?: T | (() => T)): Ref<T | undefined>;
|
|
587
|
-
|
|
588
|
-
// File: src/composables/ref/useStorageRef.d.ts
|
|
589
|
-
import { Ref } from 'vue';
|
|
941
|
+
/** Creates reactive local storage reference. */
|
|
590
942
|
export declare function useStorageRef<T>(name: string, defaultValue?: T | (() => T), cache?: number): Ref<T | undefined>;
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
943
|
+
/**
|
|
944
|
+
* Getting translated text by keys.
|
|
945
|
+
* @example
|
|
946
|
+
* ```typescript
|
|
947
|
+
* const labels = useTranslateRef(['home.title'] as const);
|
|
948
|
+
* ```
|
|
949
|
+
*/
|
|
595
950
|
export declare function useTranslateRef<T extends (string | string[])[]>(names: T, translateInstance?: TranslateInstance): ShallowRef<TranslateList<T>>;
|
|
951
|
+
/** Shorthand for useTranslateRef. */
|
|
596
952
|
export declare const t: <T extends string[]>(names: T) => ShallowRef<TranslateList<T>>;
|
|
597
|
-
|
|
598
|
-
// File: src/flags.d.ts
|
|
599
|
-
export declare const uiMakeFlags: () => void;
|
|
600
|
-
|
|
601
|
-
// File: src/functions/basic.d.ts
|
|
602
|
-
export * from '@dxtmisha/functional-basic';
|
|
603
|
-
|
|
604
|
-
// File: src/functions/computedAsync.d.ts
|
|
605
|
-
import { ComputedRef, DebuggerOptions } from 'vue';
|
|
953
|
+
/** Creates computed property handling async getters. */
|
|
606
954
|
export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, initialState?: (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
|
|
607
|
-
|
|
608
|
-
// File: src/functions/computedByLanguage.d.ts
|
|
609
|
-
import { ComputedGetter, ComputedRef, DebuggerOptions } from 'vue';
|
|
955
|
+
/** Creates computed property dependent on current language state. */
|
|
610
956
|
export declare function computedByLanguage<T, R extends (T | undefined) = T | undefined>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
|
|
611
|
-
|
|
612
|
-
// File: src/functions/computedEternity.d.ts
|
|
613
|
-
import { Ref } from 'vue';
|
|
957
|
+
/** Creates cached computed property computed on demand. */
|
|
614
958
|
export declare function computedEternity<T>(getter: () => Promise<T> | T, initialState?: (() => T) | T): Ref<T, T>;
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
api?: ApiConfig;
|
|
623
|
-
translate?: TranslateConfig;
|
|
624
|
-
location?: string | (() => string);
|
|
625
|
-
metaSuffix?: string;
|
|
626
|
-
icons?: IconsConfig;
|
|
627
|
-
iconsSocial?: InputSocialIcons;
|
|
628
|
-
router?: Router;
|
|
629
|
-
errorCauses?: ErrorCenterCauseList;
|
|
630
|
-
errorHandlers?: ErrorCenterHandlerList;
|
|
631
|
-
errorCallbacks?: ErrorCenterHandlerCallback[];
|
|
632
|
-
}
|
|
959
|
+
/**
|
|
960
|
+
* Vue plugin for initializing global functional services.
|
|
961
|
+
* @example
|
|
962
|
+
* ```typescript
|
|
963
|
+
* app.use(dxtFunctionalPlugin, { api: { url: 'https://api.example.com' } });
|
|
964
|
+
* ```
|
|
965
|
+
*/
|
|
633
966
|
export declare const dxtFunctionalPlugin: Plugin;
|
|
634
|
-
|
|
635
|
-
// File: src/functions/executeUse.d.ts
|
|
967
|
+
/** Types of initialization for executeUse singleton. */
|
|
636
968
|
export declare enum ExecuteUseType {
|
|
637
969
|
global = "global",
|
|
638
970
|
provide = "provide",
|
|
639
971
|
local = "local"
|
|
640
972
|
}
|
|
973
|
+
/** Return structure of executeUse singleton wrapper. */
|
|
641
974
|
export type ExecuteUseReturn<R> = Readonly<R & {
|
|
642
975
|
init(): Readonly<R>;
|
|
643
976
|
destroyExecute?(): void;
|
|
644
977
|
}>;
|
|
978
|
+
/**
|
|
979
|
+
* Creates managed singleton encapsulating initialization strategy.
|
|
980
|
+
* @remarks
|
|
981
|
+
* Use for API services, resource optimization, and shared state.
|
|
982
|
+
* @example
|
|
983
|
+
* ```typescript
|
|
984
|
+
* export const useUserApi = executeUseGlobal(() => useApiGet('/api/user'));
|
|
985
|
+
* ```
|
|
986
|
+
*/
|
|
645
987
|
export declare function executeUse<R, O extends any[], RI extends ExecuteUseReturn<R> = ExecuteUseReturn<R>>(callback: (...args: O) => R, type?: ExecuteUseType): ((...args: O) => RI) | (() => RI);
|
|
646
|
-
|
|
647
|
-
export declare function
|
|
648
|
-
|
|
988
|
+
/** Creates global singleton. */
|
|
989
|
+
export declare function executeUseGlobal<R>(callback: () => R): (() => Readonly<R & {
|
|
990
|
+
init(): Readonly<R>;
|
|
991
|
+
destroyExecute?(): void;
|
|
992
|
+
}>) | (() => Readonly<R & {
|
|
993
|
+
init(): Readonly<R>;
|
|
994
|
+
destroyExecute?(): void;
|
|
995
|
+
}>);
|
|
996
|
+
/** Creates component-scoped singleton via provide/inject. */
|
|
997
|
+
export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
|
|
998
|
+
init(): Readonly<R>;
|
|
999
|
+
destroyExecute?(): void;
|
|
1000
|
+
}>) | (() => Readonly<R & {
|
|
1001
|
+
init(): Readonly<R>;
|
|
1002
|
+
destroyExecute?(): void;
|
|
1003
|
+
}>);
|
|
1004
|
+
/** Creates local singleton inside closure. */
|
|
1005
|
+
export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
|
|
1006
|
+
init(): Readonly<R>;
|
|
1007
|
+
destroyExecute?(): void;
|
|
1008
|
+
}>) | (() => Readonly<R & {
|
|
1009
|
+
init(): Readonly<R>;
|
|
1010
|
+
destroyExecute?(): void;
|
|
1011
|
+
}>);
|
|
1012
|
+
/** Initializes all registered global singletons. */
|
|
649
1013
|
export declare function executeUseGlobalInit(): void;
|
|
650
|
-
|
|
651
|
-
// File: src/functions/getInject.d.ts
|
|
1014
|
+
/** Gets injected Vue value by key name. */
|
|
652
1015
|
export declare function getInject<T>(name: string): T | undefined;
|
|
653
|
-
|
|
654
|
-
// File: src/functions/getOptions.d.ts
|
|
655
|
-
import { ApiFetch } from '@dxtmisha/functional-basic';
|
|
656
|
-
import { ApiOptions } from '../types/apiTypes';
|
|
657
|
-
import { RefOrNormal } from '../types/refTypes';
|
|
1016
|
+
/** Resolves options object for API fetch calls. */
|
|
658
1017
|
export declare const getOptions: (options?: ApiOptions) => RefOrNormal<ApiFetch>;
|
|
659
|
-
|
|
660
|
-
// File: src/functions/ref/executeFunctionRef.d.ts
|
|
661
|
-
import { RefOrNormalOrFunction } from '../../types/refTypes';
|
|
1018
|
+
/** Executes argument if function and unwraps resulting Vue ref. */
|
|
662
1019
|
export declare function executeFunctionRef<T>(data: RefOrNormalOrFunction<T>): T;
|
|
663
|
-
|
|
664
|
-
// File: src/functions/ref/getApiErrorRef.d.ts
|
|
665
|
-
import { ComputedRef } from 'vue';
|
|
666
|
-
import { ApiData, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
667
|
-
import { RefType } from '../../types/refTypes';
|
|
1020
|
+
/** Returns reactive error item from API ref data. */
|
|
668
1021
|
export declare function getApiErrorRef<R>(data: RefType<ApiData<R> | undefined>): ComputedRef<ApiErrorItem | undefined>;
|
|
669
|
-
|
|
670
|
-
// File: src/functions/ref/getBindRef.d.ts
|
|
671
|
-
import { ComputedRef } from 'vue';
|
|
672
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
673
|
-
import { RefOrNormal } from '../../types/refTypes';
|
|
1022
|
+
/** Generates computed properties binding for subcomponent. */
|
|
674
1023
|
export declare function getBindRef<T, R extends ItemList>(value: RefOrNormal<T | R> | undefined, nameExtra?: RefOrNormal<ItemList> | string, name?: string): ComputedRef<R>;
|
|
675
|
-
|
|
676
|
-
// File: src/functions/ref/getRef.d.ts
|
|
677
|
-
import { RefOrNormal } from '../../types/refTypes';
|
|
1024
|
+
/** Unwraps ref value or returns raw value. */
|
|
678
1025
|
export declare function getRef<T>(item: RefOrNormal<T>): T;
|
|
679
|
-
|
|
680
|
-
// File: src/functions/ref/render.d.ts
|
|
681
|
-
import { VNode } from 'vue';
|
|
682
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
683
|
-
import { RawChildren, RawSlots } from '../../types/refTypes';
|
|
1026
|
+
/** Renders component VNode with cached properties. */
|
|
684
1027
|
export declare function render<T extends ItemList>(name: string | any, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
|
|
685
|
-
|
|
686
|
-
// File: src/functions/ref/setRef.d.ts
|
|
687
|
-
import { Ref } from 'vue';
|
|
1028
|
+
/** Updates ref value if changed. */
|
|
688
1029
|
export declare function setRef<T>(item: Ref<T>, value: T): void;
|
|
689
|
-
|
|
690
|
-
// File: src/functions/ref/toRefItem.d.ts
|
|
691
|
-
import { Ref } from 'vue';
|
|
692
|
-
import { RefOrNormal } from '../../types/refTypes';
|
|
1030
|
+
/** Wraps value into Vue ref if not reactive. */
|
|
693
1031
|
export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
|
|
694
|
-
|
|
695
|
-
// File: src/functions/render/getBind.d.ts
|
|
696
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
697
|
-
import { ConstrBind } from '../../types/constructorTypes';
|
|
1032
|
+
/** Merges two property objects merging classes and styles. */
|
|
698
1033
|
export declare function getBind<T, R extends ItemList>(value: T | R | undefined | null, nameExtra?: ItemList | string, name?: string, except?: boolean): ConstrBind<R>;
|
|
699
|
-
|
|
700
|
-
// File: src/functions/render/getClassName.d.ts
|
|
701
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
1034
|
+
/** Returns class name property from component props object. */
|
|
702
1035
|
export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
|
|
703
|
-
|
|
704
|
-
// File: src/functions/render/getIndexForRender.d.ts
|
|
705
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
1036
|
+
/** Returns or generates index key for VNode rendering. */
|
|
706
1037
|
export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
|
|
707
|
-
|
|
708
|
-
// File: src/functions/toBind.d.ts
|
|
709
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
710
|
-
import { ConstrBind } from '../types/constructorTypes';
|
|
1038
|
+
/** Merges two objects taking into account class and style arrays. */
|
|
711
1039
|
export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, value: ItemList): ConstrBind<R>;
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
715
|
-
import { ConstrBind } from '../types/constructorTypes';
|
|
716
|
-
export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
|
|
717
|
-
|
|
718
|
-
// File: src/library.d.ts
|
|
719
|
-
export * from './classes/design/DesignAbstract';
|
|
720
|
-
export * from './classes/design/DesignAsyncAbstract';
|
|
721
|
-
export * from './classes/design/DesignChanged';
|
|
722
|
-
export * from './classes/design/DesignComp';
|
|
723
|
-
export * from './classes/design/DesignComponents';
|
|
724
|
-
export * from './classes/design/DesignConstructorAbstract';
|
|
725
|
-
export * from './classes/ref/DatetimeRef';
|
|
726
|
-
export * from './classes/ref/EffectScopeGlobal';
|
|
727
|
-
export * from './classes/ref/EventRef';
|
|
728
|
-
export * from './classes/ref/GeoFlagRef';
|
|
729
|
-
export * from './classes/ref/GeoIntlRef';
|
|
730
|
-
export * from './classes/ref/GeoRef';
|
|
731
|
-
export * from './classes/ref/GeoUnitRef';
|
|
732
|
-
export * from './classes/ref/ListDataRef';
|
|
733
|
-
export * from './classes/ref/RouterItemRef';
|
|
734
|
-
export * from './classes/ref/ScrollbarWidthRef';
|
|
735
|
-
export * from './composables/ref/useApiAsyncRef';
|
|
736
|
-
export * from './composables/ref/useApiDelete';
|
|
737
|
-
export * from './composables/ref/useApiGet';
|
|
738
|
-
export * from './composables/ref/useApiManagementAsyncRef';
|
|
739
|
-
export * from './composables/ref/useApiManagementRef';
|
|
740
|
-
export * from './composables/ref/useApiPost';
|
|
741
|
-
export * from './composables/ref/useApiPut';
|
|
742
|
-
export * from './composables/ref/useApiRef';
|
|
743
|
-
export * from './composables/ref/useApiRequest';
|
|
744
|
-
export * from './composables/ref/useBroadcastValueRef';
|
|
745
|
-
export * from './composables/ref/useCookieRef';
|
|
746
|
-
export * from './composables/ref/useFormattersRef';
|
|
747
|
-
export * from './composables/ref/useGeoIntlRef';
|
|
748
|
-
export * from './composables/ref/useGeoUnitRef';
|
|
749
|
-
export * from './composables/ref/useHashRef';
|
|
750
|
-
export * from './composables/ref/useLazyItemByMarginRef';
|
|
751
|
-
export * from './composables/ref/useLazyRef';
|
|
752
|
-
export * from './composables/ref/useLoadingRef';
|
|
753
|
-
export * from './composables/ref/useMeta';
|
|
754
|
-
export * from './composables/ref/useQueryRef';
|
|
755
|
-
export * from './composables/ref/useRouterList';
|
|
756
|
-
export * from './composables/ref/useSearchRef';
|
|
757
|
-
export * from './composables/ref/useSearchValueRef';
|
|
758
|
-
export * from './composables/ref/useSessionRef';
|
|
759
|
-
export * from './composables/ref/useStorageRef';
|
|
760
|
-
export * from './composables/ref/useTranslateRef';
|
|
761
|
-
export * from './functions/basic';
|
|
762
|
-
export * from './functions/computedAsync';
|
|
763
|
-
export * from './functions/computedByLanguage';
|
|
764
|
-
export * from './functions/computedEternity';
|
|
765
|
-
export * from './functions/dxtFunctionalPlugin';
|
|
766
|
-
export * from './functions/executeUse';
|
|
767
|
-
export * from './functions/getInject';
|
|
768
|
-
export * from './functions/getOptions';
|
|
769
|
-
export * from './functions/ref/executeFunctionRef';
|
|
770
|
-
export * from './functions/ref/getApiErrorRef';
|
|
771
|
-
export * from './functions/ref/getBindRef';
|
|
772
|
-
export * from './functions/ref/getRef';
|
|
773
|
-
export * from './functions/ref/render';
|
|
774
|
-
export * from './functions/ref/setRef';
|
|
775
|
-
export * from './functions/ref/toRefItem';
|
|
776
|
-
export * from './functions/render/getBind';
|
|
777
|
-
export * from './functions/render/getClassName';
|
|
778
|
-
export * from './functions/render/getIndexForRender';
|
|
779
|
-
export * from './functions/toBind';
|
|
780
|
-
export * from './functions/toBinds';
|
|
781
|
-
export * from './types/apiTypes';
|
|
782
|
-
export * from './types/constructorTypes';
|
|
783
|
-
export * from './types/listTypes';
|
|
784
|
-
export * from './types/refTypes';
|
|
785
|
-
export * from './types/searchTypes';
|
|
786
|
-
|
|
787
|
-
// File: src/types/apiTypes.d.ts
|
|
788
|
-
import { ApiData, ApiDataValidation, ApiDefaultValue, ApiErrorStorageList, ApiFetch, ApiMethodItem, SearchColumns, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
789
|
-
import { RefOrNormal, RefType } from './refTypes';
|
|
790
|
-
import { Ref } from 'vue';
|
|
791
|
-
export type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
|
|
792
|
-
export type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
|
|
793
|
-
export type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
794
|
-
path?: RefOrNormal<string | undefined>;
|
|
795
|
-
options?: ApiOptions;
|
|
796
|
-
reactivity?: boolean;
|
|
797
|
-
conditions?: RefType<boolean>;
|
|
798
|
-
transformation?: (data: Type, isResponseContractValid?: ApiDataValidation) => ApiData<Return>;
|
|
799
|
-
validateResponseContract?: (data: Type) => ApiDataValidation;
|
|
800
|
-
errorContract?: ApiErrorStorageList;
|
|
801
|
-
typeData?: ((data: Return) => boolean) | any;
|
|
802
|
-
unmounted?: boolean;
|
|
803
|
-
skeleton?: () => Return;
|
|
804
|
-
};
|
|
805
|
-
export type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
|
|
806
|
-
columns: K;
|
|
807
|
-
value?: Ref<string>;
|
|
808
|
-
options?: SearchOptions;
|
|
809
|
-
};
|
|
810
|
-
export type ApiManagementRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> = {
|
|
811
|
-
path?: RefOrNormal<string | undefined>;
|
|
812
|
-
action?: (data: Return | undefined) => Promise<void> | void;
|
|
813
|
-
transformation?: (data: T) => Return;
|
|
814
|
-
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
815
|
-
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
816
|
-
errorContract?: ApiErrorStorageList;
|
|
817
|
-
toData?: boolean;
|
|
818
|
-
options?: ApiOptions;
|
|
819
|
-
};
|
|
820
|
-
|
|
821
|
-
// File: src/types/constructorTypes.d.ts
|
|
822
|
-
import { Ref, PropType, ComputedRef } from 'vue';
|
|
823
|
-
import { Undefined } from '@dxtmisha/functional-basic';
|
|
824
|
-
import { RefOrNormal, RefType } from './refTypes';
|
|
825
|
-
export type ConstrItem = Record<string, any>;
|
|
826
|
-
export type ConstrValue<T = any> = { value?: T; };
|
|
827
|
-
export type ConstrComponent = Record<string, any>;
|
|
828
|
-
export type ConstrComponentMod<P extends ConstrItem> = ConstrItem | { [K in keyof P]?: RefOrNormal<P[K]>; };
|
|
829
|
-
export type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & { elementHtml?: ComputedRef<E | undefined>; };
|
|
830
|
-
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
831
|
-
export type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
|
|
832
|
-
export type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{ [K in keyof T]: (evt: K, ...args: T[K]) => void; }>>;
|
|
833
|
-
export type ConstrClassObject = Record<string, boolean | undefined>;
|
|
834
|
-
export type ConstrClass = string | (string | ConstrClass | Undefined)[] | ConstrClassObject;
|
|
835
|
-
export type ConstrClassList = Record<string, ConstrClass>;
|
|
836
|
-
export type ConstrClasses = { main: ConstrClass; } & ConstrClassList;
|
|
837
|
-
export type ConstrStylesItem = string | null;
|
|
838
|
-
export type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
|
|
839
|
-
export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
840
|
-
components?: COMP;
|
|
841
|
-
compMod?: ConstrComponentMod<P>;
|
|
842
|
-
emits?: ConstrEmit<EMITS>;
|
|
843
|
-
classes?: RefType<ConstrClasses>;
|
|
844
|
-
styles?: RefType<ConstrStyles>;
|
|
845
|
-
};
|
|
846
|
-
export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
|
|
847
|
-
name: string;
|
|
848
|
-
element: Ref<E | undefined>;
|
|
849
|
-
classes: RefType<CLASSES>;
|
|
850
|
-
styles: RefType<ConstrStyles>;
|
|
851
|
-
} & SETUP;
|
|
852
|
-
export type ConstrRegistration = { flag?: boolean; translate?: Record<string, string>; };
|
|
853
|
-
export type ConstrBind<T> = T & Record<string, any> & {
|
|
854
|
-
key?: string;
|
|
855
|
-
class?: ConstrClass;
|
|
856
|
-
style?: ConstrStyles;
|
|
857
|
-
};
|
|
858
|
-
export type ConstrPropItemOptions<T = any> = {
|
|
859
|
-
type?: PropType<T>;
|
|
860
|
-
required?: boolean;
|
|
861
|
-
default?: any;
|
|
862
|
-
validator?(value: any, props: any): boolean;
|
|
863
|
-
};
|
|
864
|
-
export type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
|
|
865
|
-
export type ConstrProps<P = Record<string, any>> = { [K in keyof P]: ConstrPropItem<P[K]>; };
|
|
866
|
-
export type ConstrHrefProps = { href?: string; };
|
|
867
|
-
|
|
868
|
-
// File: src/types/listTypes.d.ts
|
|
869
|
-
import { NumberOrString, NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
|
|
870
|
-
import { ConstrBind } from './constructorTypes';
|
|
871
|
-
export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
872
|
-
export type ListDataBasic = {
|
|
873
|
-
label?: NumberOrString;
|
|
874
|
-
value?: any;
|
|
875
|
-
search?: string;
|
|
876
|
-
};
|
|
877
|
-
export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
|
|
878
|
-
parent?: string;
|
|
879
|
-
type: ListType;
|
|
880
|
-
index: string;
|
|
881
|
-
disabled?: boolean;
|
|
882
|
-
}>;
|
|
883
|
-
export type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
|
|
884
|
-
export type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
|
|
885
|
-
export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
|
|
886
|
-
focus: boolean;
|
|
887
|
-
highlight?: string;
|
|
888
|
-
selected: boolean;
|
|
889
|
-
disabled?: boolean;
|
|
890
|
-
};
|
|
891
|
-
export type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
|
|
892
|
-
export type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
|
|
893
|
-
export type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
|
|
894
|
-
export type ListSelectedItem = NumberOrStringOrBoolean;
|
|
895
|
-
export type ListSelectedList = ListSelectedItem | ListSelectedItem[];
|
|
896
|
-
export type ListName = string | number | undefined;
|
|
897
|
-
export type ListNames = ListName[];
|
|
898
|
-
|
|
899
|
-
// File: src/types/refTypes.d.ts
|
|
900
|
-
import { ComputedRef, Ref, VNode, VNodeArrayChildren } from 'vue';
|
|
901
|
-
export type RefType<T> = ComputedRef<T> | Ref<T>;
|
|
902
|
-
export type RefUndefined<T> = RefType<T | undefined>;
|
|
903
|
-
export type RefOrNormal<T> = RefType<T> | T;
|
|
904
|
-
export type RefOrNormalOrFunction<T> = RefOrNormal<T> | (() => RefOrNormal<T>);
|
|
905
|
-
export type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
|
|
906
|
-
export type RawSlots = { [name: string]: unknown; $stable?: boolean; };
|
|
907
|
-
|
|
908
|
-
// File: src/types/searchTypes.d.ts
|
|
909
|
-
import { RefOrNormal } from './refTypes';
|
|
910
|
-
import { SearchItem, SearchListValue } from '@dxtmisha/functional-basic';
|
|
911
|
-
export type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
|
|
912
|
-
export type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
|
|
1040
|
+
/** Merges multiple property objects preserving classes and styles. */
|
|
1041
|
+
export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
|