@dxtmisha/functional 1.14.2 → 1.14.4
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 +18 -0
- package/ai-description.md +14 -12
- package/ai-types.md +375 -27
- package/dist/library.js +30 -30
- package/dist/src/functions/dxtFunctionalPlugin.d.ts +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.14.4] - 2026-06-29
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- **GeoFlagRef**: Refactored constructor to default to `GeoRef.getLocation().value` dynamically and reactively, avoiding hard dependencies on the static `Geo.getLocation()` during SSR.
|
|
9
|
+
- **GeoIntlRef**: Updated fallback locale resolution to use `GeoRef.getLocation().value` instead of `GeoRef.getLanguage().value` when location is empty.
|
|
10
|
+
|
|
11
|
+
## [1.14.3] - 2026-06-27
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **dxtFunctionalPlugin**: Added `errorCallbacks` configuration option (type `ErrorCenterHandlerCallback[]`) to allow registering global error callbacks via `ErrorCenter.addCallback` during Vue plugin initialization.
|
|
15
|
+
- **dxtFunctionalPlugin**: Added unit tests verifying correct registration of global callbacks during plugin installation.
|
|
16
|
+
|
|
5
17
|
## [1.14.2] - 2026-06-25
|
|
6
18
|
|
|
7
19
|
### Added
|
|
8
20
|
- **dxtFunctionalPlugin**: Added `iconsSocial` configuration option (type `InputSocialIcons`) to allow registering custom social network icons globally via `MediaSocial.addIcons` during Vue plugin initialization.
|
|
9
21
|
|
|
22
|
+
## [1.14.1] - 2026-06-23
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **GeoFlagRef**: Added a new reactive wrapper class for `GeoFlag` from `@dxtmisha/functional-basic`, providing methods like `get()`, `getFlag()`, `getList()`, and `getNational()` to retrieve flags and names reactively.
|
|
26
|
+
- **GeoFlagRef**: Added `GeoFlagRef.test.ts` for unit testing the reactive flag behaviors.
|
|
27
|
+
|
|
10
28
|
## [1.14.0] - 2026-06-22
|
|
11
29
|
|
|
12
30
|
### Added
|
package/ai-description.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
Core Purpose:
|
|
1
|
+
Core Purpose: A reactive framework for Vue 3 providing architectural abstractions for components, advanced API request orchestration with SSR support, internationalization (Intl), data list management, and global utility state synchronization.
|
|
2
2
|
|
|
3
3
|
Key Expositions:
|
|
4
|
-
-
|
|
5
|
-
- API
|
|
6
|
-
- Reactive Utilities:
|
|
7
|
-
-
|
|
8
|
-
-
|
|
4
|
+
- Component Architecture: `DesignConstructorAbstract`, `DesignComponents`, and `DesignAbstract` provide base classes for creating reactive functional components with automatic class/style/slot handling.
|
|
5
|
+
- API Management: `useApiRef` (core), `useApiAsyncRef` (SSR-enabled), and `useApiManagementRef` (CRUD/list orchestration) manage requests, caching, validation (integration with `@effect/schema`), and automatic loading states.
|
|
6
|
+
- Reactive Utilities: `DatetimeRef`, `GeoRef`, `GeoIntlRef`, `GeoFlagRef` for locale-aware data management; `ListDataRef` for complex list manipulation; `useMeta` for reactive document head management.
|
|
7
|
+
- Singleton/State Factories: `executeUse` (global, provide, or local scopes) for managing shared state instances.
|
|
8
|
+
- Primitive Wrappers: `useCookieRef`, `useStorageRef`, `useSessionRef`, `useQueryRef`, and `useHashRef` for reactive access to browser storage and URL state.
|
|
9
9
|
|
|
10
|
-
Triggers for Studying ai-types.md:
|
|
11
|
-
- When
|
|
12
|
-
- When
|
|
13
|
-
- When
|
|
14
|
-
- When integrating the `dxtFunctionalPlugin` or configuring custom API/Translate instances.
|
|
10
|
+
Triggers for Studying ai-types.md:
|
|
11
|
+
- When implementing complex component logic involving lifecycle-dependent design systems or custom Vue components using `DesignConstructorAbstract`.
|
|
12
|
+
- When dealing with API state, validation contracts, or SSR pre-fetching logic (mandatory for `useApiAsyncRef` or `useApiManagementRef`).
|
|
13
|
+
- When defining shared singleton services or managing complex reactive states that require specific injection or scope strategies (`executeUse`).
|
|
15
14
|
|
|
16
|
-
Integration Context:
|
|
15
|
+
Integration Context:
|
|
16
|
+
- Stack: Built for Vue 3 (Composition API).
|
|
17
|
+
- Dependencies: Extends `vue`, `vue-router`, and relies heavily on `@dxtmisha/functional-basic` for underlying logic.
|
|
18
|
+
- Infrastructure: Designed to be initialized via `dxtFunctionalPlugin` for global services (API, Translate, Meta, Router). Requires environment-aware implementation for SSR/hydration sequences.
|
package/ai-types.md
CHANGED
|
@@ -23,6 +23,7 @@ export declare abstract class DesignAbstract<T extends Record<string, any>, C ex
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
// File: src/classes/design/DesignAsyncAbstract.d.ts
|
|
26
|
+
import { DesignAbstract } from './DesignAbstract';
|
|
26
27
|
export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
|
|
27
28
|
make(compelled?: boolean): this;
|
|
28
29
|
makeCallback(compelled?: boolean): Promise<void>;
|
|
@@ -38,11 +39,17 @@ export declare class DesignChanged<T extends Record<string, any>> {
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
// File: src/classes/design/DesignComp.d.ts
|
|
42
|
+
import { DesignComponents } from './DesignComponents';
|
|
43
|
+
import { ConstrComponent, ConstrItem } from '../../types/constructorTypes';
|
|
41
44
|
export declare class DesignComp<COMP extends ConstrComponent, P extends ConstrItem> extends DesignComponents<COMP, P> {
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
// File: src/classes/design/DesignComponents.d.ts
|
|
48
|
+
import { ComputedRef, VNode } from 'vue';
|
|
49
|
+
import { RawChildren, RawSlots } from '../../types/refTypes';
|
|
50
|
+
import { ConstrComponent, ConstrComponentMod, ConstrItem } from '../../types/constructorTypes';
|
|
45
51
|
export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
|
|
52
|
+
protected caching: Record<string, ComputedRef<any>>;
|
|
46
53
|
constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
|
|
47
54
|
is<K extends keyof COMP>(name: K): name is K;
|
|
48
55
|
get<K extends keyof COMP>(name: K): COMP[K];
|
|
@@ -53,7 +60,22 @@ export declare class DesignComponents<COMP extends ConstrComponent, P extends Co
|
|
|
53
60
|
}
|
|
54
61
|
|
|
55
62
|
// File: src/classes/design/DesignConstructorAbstract.d.ts
|
|
63
|
+
import { ComputedRef, ToRefs, VNode, Ref } from 'vue';
|
|
64
|
+
import { DesignComponents } from './DesignComponents';
|
|
65
|
+
import { ConstrClass, ConstrClassObject, ConstrComponent, ConstrEmit, ConstrExpose, ConstrItem, ConstrOptions, ConstrStyles } from '../../types/constructorTypes';
|
|
56
66
|
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> {
|
|
67
|
+
protected readonly props: Readonly<P>;
|
|
68
|
+
protected readonly options?: ConstrOptions<COMP, EMITS, P> | undefined;
|
|
69
|
+
protected readonly name: string[];
|
|
70
|
+
protected readonly element: Ref<E | undefined, E | undefined>;
|
|
71
|
+
protected readonly refs: ToRefs<P>;
|
|
72
|
+
protected readonly components: DesignComponents<COMP, P>;
|
|
73
|
+
protected readonly emits?: ConstrEmit<EMITS>;
|
|
74
|
+
protected readonly classes?: ComputedRef<CLASSES>;
|
|
75
|
+
protected readonly styles?: ComputedRef<ConstrStyles>;
|
|
76
|
+
protected attrs?: ConstrItem;
|
|
77
|
+
protected slots?: SLOTS;
|
|
78
|
+
protected dataExpose?: EXPOSE;
|
|
57
79
|
protected constructor(name: string, props: Readonly<P>, options?: ConstrOptions<COMP, EMITS, P> | undefined);
|
|
58
80
|
protected init(): this;
|
|
59
81
|
getName(): string;
|
|
@@ -68,9 +90,15 @@ export declare abstract class DesignConstructorAbstract<E extends Element, COMP
|
|
|
68
90
|
protected abstract initClasses(): Partial<CLASSES>;
|
|
69
91
|
protected abstract initStyles(): ConstrStyles;
|
|
70
92
|
protected abstract initRender(): VNode | (VNode | any)[] | undefined;
|
|
93
|
+
protected initSlot<K extends keyof SLOTS>(name: K, children?: any[], props?: ConstrItem): VNode | undefined;
|
|
94
|
+
protected toClass(classes?: ConstrClass): ConstrClassObject;
|
|
95
|
+
protected toClassName<T extends ConstrItem>(classes?: ConstrItem): T;
|
|
71
96
|
}
|
|
72
97
|
|
|
73
98
|
// File: src/classes/ref/DatetimeRef.d.ts
|
|
99
|
+
import { ComputedRef, Ref } from 'vue';
|
|
100
|
+
import { Datetime, GeoDate, GeoFirstDay, GeoHours, NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
101
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
74
102
|
export declare class DatetimeRef {
|
|
75
103
|
constructor(date: RefOrNormal<NumberOrStringOrDate>, type?: RefOrNormal<GeoDate>, code?: RefOrNormal<string>);
|
|
76
104
|
getItem(): Ref<NumberOrStringOrDate>;
|
|
@@ -95,21 +123,32 @@ export declare class EffectScopeGlobal {
|
|
|
95
123
|
}
|
|
96
124
|
|
|
97
125
|
// File: src/classes/ref/EventRef.d.ts
|
|
126
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
127
|
+
import { ElementOrString, ElementOrWindow, EventItem, EventListenerDetail, EventOptions } from '@dxtmisha/functional-basic';
|
|
98
128
|
export declare class EventRef<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> extends EventItem<E, O, D> {
|
|
99
129
|
constructor(elementSelector?: RefOrNormal<ElementOrString<E> | undefined>, elementSelectorControl?: RefOrNormal<ElementOrString<HTMLElement>>, type?: string | string[], listener?: EventListenerDetail<O, D>, options?: EventOptions, detail?: D);
|
|
100
130
|
}
|
|
101
131
|
|
|
102
132
|
// File: src/classes/ref/GeoFlagRef.d.ts
|
|
133
|
+
import { ComputedRef } from 'vue';
|
|
134
|
+
import { GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
|
|
135
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
103
136
|
export declare class GeoFlagRef {
|
|
104
137
|
constructor(code?: RefOrNormal<string | undefined>);
|
|
105
138
|
getCode(): string;
|
|
106
139
|
get(code?: RefOrNormal<string>): ComputedRef<GeoFlagItem | undefined>;
|
|
140
|
+
getLanguage(code?: RefOrNormal<string>): ComputedRef<GeoFlagItem | undefined>;
|
|
107
141
|
getFlag(code?: RefOrNormal<string>): ComputedRef<string | undefined>;
|
|
108
142
|
getList(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagItem[]>;
|
|
143
|
+
getListLanguage(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagItem[]>;
|
|
109
144
|
getNational(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagNational[]>;
|
|
145
|
+
getNationalLanguage(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagNational[]>;
|
|
110
146
|
}
|
|
111
147
|
|
|
112
148
|
// File: src/classes/ref/GeoIntlRef.d.ts
|
|
149
|
+
import { ComputedRef } from 'vue';
|
|
150
|
+
import { GeoDate, ItemValue, NumberOrString, NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
151
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
113
152
|
export declare class GeoIntlRef {
|
|
114
153
|
constructor(code?: RefOrNormal<string>);
|
|
115
154
|
display(value?: RefOrNormal<string>, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): ComputedRef<string>;
|
|
@@ -137,6 +176,8 @@ export declare class GeoIntlRef {
|
|
|
137
176
|
}
|
|
138
177
|
|
|
139
178
|
// File: src/classes/ref/GeoRef.d.ts
|
|
179
|
+
import { ComputedRef, Ref } from 'vue';
|
|
180
|
+
import { GeoItemFull } from '@dxtmisha/functional-basic';
|
|
140
181
|
export declare class GeoRef {
|
|
141
182
|
static get(): Ref<GeoItemFull>;
|
|
142
183
|
static getCountry(): ComputedRef<string>;
|
|
@@ -151,6 +192,9 @@ export declare class GeoRef {
|
|
|
151
192
|
}
|
|
152
193
|
|
|
153
194
|
// File: src/classes/ref/ListDataRef.d.ts
|
|
195
|
+
import { RefOrNormal, RefType } from '../../types/refTypes';
|
|
196
|
+
import { ListDataFull, ListDataItem, ListList, ListNames, ListSelectedItem, ListSelectedList } from '../../types/listTypes';
|
|
197
|
+
import { ComputedRef } from 'vue';
|
|
154
198
|
export declare class ListDataRef {
|
|
155
199
|
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);
|
|
156
200
|
readonly data: ComputedRef<ListList>;
|
|
@@ -196,6 +240,8 @@ export declare class ListDataRef {
|
|
|
196
240
|
}
|
|
197
241
|
|
|
198
242
|
// File: src/classes/ref/RouterItemRef.d.ts
|
|
243
|
+
import { RouteLocationRaw, Router } from 'vue-router';
|
|
244
|
+
import { ConstrHrefProps } from '../../types/constructorTypes';
|
|
199
245
|
export declare class RouterItemRef {
|
|
200
246
|
static get(): Router;
|
|
201
247
|
static getLink(name: string, params?: any, query?: any): string | undefined;
|
|
@@ -207,6 +253,7 @@ export declare class RouterItemRef {
|
|
|
207
253
|
}
|
|
208
254
|
|
|
209
255
|
// File: src/classes/ref/ScrollbarWidthRef.d.ts
|
|
256
|
+
import { Ref, ComputedRef } from 'vue';
|
|
210
257
|
export declare class ScrollbarWidthRef {
|
|
211
258
|
readonly item: Ref<boolean | undefined, boolean | undefined>;
|
|
212
259
|
readonly width: Ref<number, number>;
|
|
@@ -215,88 +262,293 @@ export declare class ScrollbarWidthRef {
|
|
|
215
262
|
}
|
|
216
263
|
|
|
217
264
|
// File: src/composables/ref/useApiAsyncRef.d.ts
|
|
265
|
+
import { ApiInstance, ApiData, ApiDataValidation, ApiErrorStorageList } from '@dxtmisha/functional-basic';
|
|
266
|
+
import { UseApiRef } from './useApiRef';
|
|
267
|
+
import { RefOrNormal, RefType } from '../../types/refTypes';
|
|
268
|
+
import { ApiOptions } from '../../types/apiTypes';
|
|
218
269
|
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>;
|
|
219
270
|
|
|
220
271
|
// File: src/composables/ref/useApiDelete.d.ts
|
|
272
|
+
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
273
|
+
import { UseApiRequestSetup } from './useApiRequest';
|
|
274
|
+
import { Ref } from 'vue';
|
|
221
275
|
export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
222
|
-
export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiDeleteSetup<T, Request, Return>): {
|
|
276
|
+
export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiDeleteSetup<T, Request, Return>): {
|
|
277
|
+
loading: Ref<boolean, boolean>;
|
|
278
|
+
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
279
|
+
};
|
|
223
280
|
|
|
224
281
|
// File: src/composables/ref/useApiGet.d.ts
|
|
282
|
+
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
283
|
+
import { UseApiRequestSetup } from './useApiRequest';
|
|
284
|
+
import { Ref } from 'vue';
|
|
225
285
|
export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
226
|
-
export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiGetSetup<T, Request, Return>): {
|
|
286
|
+
export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiGetSetup<T, Request, Return>): {
|
|
287
|
+
loading: Ref<boolean, boolean>;
|
|
288
|
+
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
289
|
+
};
|
|
227
290
|
|
|
228
291
|
// File: src/composables/ref/useApiManagementAsyncRef.d.ts
|
|
229
|
-
|
|
292
|
+
import { ApiInstance, ArrayToItem, FormattersListColumns, FormattersOptionsList, SearchColumns, ApiDataValidation, SearchFormatList, ApiData, ApiErrorItem, ApiFetch } from '@dxtmisha/functional-basic';
|
|
293
|
+
import { ApiManagementGet, ApiManagementRequest, ApiManagementSearch, ApiManagementValue } from '../../types/apiTypes';
|
|
294
|
+
import { ComputedRef, Ref } from 'vue';
|
|
295
|
+
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): {
|
|
296
|
+
isValid: ComputedRef<boolean>;
|
|
297
|
+
isResponseContractValid: ComputedRef<boolean>;
|
|
298
|
+
responseValidationResult: ComputedRef< ApiDataValidation | undefined>;
|
|
299
|
+
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
300
|
+
readonly data: ComputedRef< ApiData<Return> | undefined>;
|
|
301
|
+
errorItem: ComputedRef< ApiErrorItem | undefined>;
|
|
302
|
+
readonly length: ComputedRef<number>;
|
|
303
|
+
lengthData: ComputedRef<number>;
|
|
304
|
+
starting: ComputedRef<boolean>;
|
|
305
|
+
reading: Ref<boolean, boolean>;
|
|
306
|
+
loading: Ref<boolean, boolean>;
|
|
307
|
+
loadingSearch: Ref<boolean, boolean> | undefined;
|
|
308
|
+
loadingPost: Ref<boolean, boolean> | undefined;
|
|
309
|
+
loadingPut: Ref<boolean, boolean> | undefined;
|
|
310
|
+
loadingDelete: Ref<boolean, boolean> | undefined;
|
|
311
|
+
isSearch: ComputedRef<boolean> | undefined;
|
|
312
|
+
search: Ref<string>;
|
|
313
|
+
init: () => void;
|
|
314
|
+
initSsr: () => void;
|
|
315
|
+
reset: () => Promise<void>;
|
|
316
|
+
abort: () => void;
|
|
317
|
+
sendPost: (request?: ApiFetch["request"]) => Promise< ApiData<Post> | undefined>;
|
|
318
|
+
sendPut: (request?: ApiFetch["request"]) => Promise< ApiData<Put> | undefined>;
|
|
319
|
+
sendDelete: (request?: ApiFetch["request"]) => Promise< ApiData<Delete> | undefined>;
|
|
320
|
+
};
|
|
230
321
|
|
|
231
322
|
// File: src/composables/ref/useApiManagementRef.d.ts
|
|
232
|
-
|
|
323
|
+
import { Ref, ComputedRef } from 'vue';
|
|
324
|
+
import { FormattersOptionsList, ApiData, ApiInstance, ArrayToItem, SearchColumns, SearchFormatList, FormattersListColumns, ApiFetch, ApiDataValidation, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
325
|
+
import { ApiManagementGet, ApiManagementRequest, ApiManagementSearch, ApiManagementValue } from '../../types/apiTypes';
|
|
326
|
+
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): {
|
|
327
|
+
isValid: ComputedRef<boolean>;
|
|
328
|
+
isResponseContractValid: ComputedRef<boolean>;
|
|
329
|
+
responseValidationResult: ComputedRef< ApiDataValidation | undefined>;
|
|
330
|
+
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
331
|
+
readonly data: ComputedRef<ApiData<Return> | undefined>;
|
|
332
|
+
errorItem: ComputedRef< ApiErrorItem | undefined>;
|
|
333
|
+
readonly length: ComputedRef<number>;
|
|
334
|
+
lengthData: ComputedRef<number>;
|
|
335
|
+
starting: ComputedRef<boolean>;
|
|
336
|
+
reading: Ref<boolean, boolean>;
|
|
337
|
+
loading: Ref<boolean, boolean>;
|
|
338
|
+
loadingSearch: Ref<boolean, boolean> | undefined;
|
|
339
|
+
loadingPost: Ref<boolean, boolean> | undefined;
|
|
340
|
+
loadingPut: Ref<boolean, boolean> | undefined;
|
|
341
|
+
loadingDelete: Ref<boolean, boolean> | undefined;
|
|
342
|
+
isSearch: ComputedRef<boolean> | undefined;
|
|
343
|
+
search: Ref<string>;
|
|
344
|
+
init: () => void;
|
|
345
|
+
initSsr: () => void;
|
|
346
|
+
reset: () => Promise<void>;
|
|
347
|
+
abort: () => void;
|
|
348
|
+
sendPost: (request?: ApiFetch["request"]) => Promise<ApiData<Post> | undefined>;
|
|
349
|
+
sendPut: (request?: ApiFetch["request"]) => Promise<ApiData<Put> | undefined>;
|
|
350
|
+
sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
|
|
351
|
+
};
|
|
233
352
|
|
|
234
353
|
// File: src/composables/ref/useApiPost.d.ts
|
|
354
|
+
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
355
|
+
import { UseApiRequestSetup } from './useApiRequest';
|
|
356
|
+
import { Ref } from 'vue';
|
|
235
357
|
export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
236
|
-
export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPostSetup<T, Request, Return>): {
|
|
358
|
+
export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPostSetup<T, Request, Return>): {
|
|
359
|
+
loading: Ref<boolean, boolean>;
|
|
360
|
+
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
361
|
+
};
|
|
237
362
|
|
|
238
363
|
// File: src/composables/ref/useApiPut.d.ts
|
|
364
|
+
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
365
|
+
import { UseApiRequestSetup } from './useApiRequest';
|
|
366
|
+
import { Ref } from 'vue';
|
|
239
367
|
export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
240
|
-
export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPutSetup<T, Request, Return>): {
|
|
368
|
+
export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPutSetup<T, Request, Return>): {
|
|
369
|
+
loading: Ref<boolean, boolean>;
|
|
370
|
+
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
371
|
+
};
|
|
241
372
|
|
|
242
373
|
// File: src/composables/ref/useApiRef.d.ts
|
|
243
|
-
|
|
374
|
+
import { ComputedRef, Ref } from 'vue';
|
|
375
|
+
import { ApiInstance, ApiData, ApiDataValidation, ApiErrorStorageList, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
376
|
+
import { ApiOptions } from '../../types/apiTypes';
|
|
377
|
+
import { RefOrNormal, RefType } from '../../types/refTypes';
|
|
378
|
+
export interface UseApiRef<R> {
|
|
379
|
+
data: ComputedRef<ApiData<R> | undefined>;
|
|
380
|
+
item: Ref<ApiData<R> | undefined>;
|
|
381
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
382
|
+
isResponseContractValid: ComputedRef<boolean>;
|
|
383
|
+
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
384
|
+
length: ComputedRef<number>;
|
|
385
|
+
starting: ComputedRef<boolean>;
|
|
386
|
+
loading: Ref<boolean>;
|
|
387
|
+
reading: Ref<boolean>;
|
|
388
|
+
isStarting(): boolean;
|
|
389
|
+
isLoading(): boolean;
|
|
390
|
+
isReading(): boolean;
|
|
391
|
+
getItem(): ApiData<R> | undefined;
|
|
392
|
+
init(): void;
|
|
393
|
+
initSsr(): void;
|
|
394
|
+
reset(): Promise<void>;
|
|
395
|
+
stop(): void;
|
|
396
|
+
abort(): void;
|
|
397
|
+
}
|
|
244
398
|
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>;
|
|
245
399
|
export declare const setApiRefGlobalConditions: (conditions: RefType<any>) => void;
|
|
246
400
|
|
|
247
401
|
// File: src/composables/ref/useApiRequest.d.ts
|
|
248
|
-
|
|
249
|
-
|
|
402
|
+
import { ApiInstance, ApiMethodItem, ApiData, ApiFetch, ApiErrorStorageList, ApiDataValidation } from '@dxtmisha/functional-basic';
|
|
403
|
+
import { ApiOptions } from '../../types/apiTypes';
|
|
404
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
405
|
+
import { Ref } from 'vue';
|
|
406
|
+
export interface UseApiRequestSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> {
|
|
407
|
+
path?: RefOrNormal<string | undefined>;
|
|
408
|
+
method?: ApiMethodItem;
|
|
409
|
+
action?: (data: Return | undefined) => Promise<void> | void;
|
|
410
|
+
transformation?: (data: T) => Return;
|
|
411
|
+
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
412
|
+
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
413
|
+
errorContract?: ApiErrorStorageList;
|
|
414
|
+
toData?: boolean;
|
|
415
|
+
options?: ApiOptions;
|
|
416
|
+
apiInstance?: ApiInstance;
|
|
417
|
+
}
|
|
418
|
+
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>): {
|
|
419
|
+
loading: Ref<boolean, boolean>;
|
|
420
|
+
send(request?: Request): Promise<Return | undefined>;
|
|
421
|
+
};
|
|
250
422
|
|
|
251
423
|
// File: src/composables/ref/useBroadcastValueRef.d.ts
|
|
424
|
+
import { Ref } from 'vue';
|
|
252
425
|
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<T | string | undefined>;
|
|
253
426
|
|
|
254
427
|
// File: src/composables/ref/useCookieRef.d.ts
|
|
428
|
+
import { Ref } from 'vue';
|
|
429
|
+
import { CookieOptions } from '@dxtmisha/functional-basic';
|
|
255
430
|
export declare function useCookieRef<T>(name: string, defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): Ref<T | string | undefined>;
|
|
256
431
|
|
|
257
432
|
// File: src/composables/ref/useFormattersRef.d.ts
|
|
258
|
-
|
|
433
|
+
import { FormattersListProp, FormattersOptionsList, FormattersReturn } from '@dxtmisha/functional-basic';
|
|
434
|
+
import { RefType } from '../../types/refTypes';
|
|
435
|
+
import { ComputedRef } from 'vue';
|
|
436
|
+
export declare function useFormattersRef<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp>(list: RefType<List | undefined>, options: Options): {
|
|
437
|
+
listFormat: ComputedRef<FormattersReturn<List, Options>>;
|
|
438
|
+
length: ComputedRef<number>;
|
|
439
|
+
};
|
|
259
440
|
|
|
260
441
|
// File: src/composables/ref/useGeoIntlRef.d.ts
|
|
442
|
+
import { GeoIntlRef } from '../../classes/ref/GeoIntlRef';
|
|
261
443
|
export declare function useGeoIntlRef(): GeoIntlRef;
|
|
262
444
|
|
|
263
445
|
// File: src/composables/ref/useHashRef.d.ts
|
|
446
|
+
import { ShallowRef } from 'vue';
|
|
264
447
|
export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
265
448
|
|
|
266
449
|
// File: src/composables/ref/useLazyItemByMarginRef.d.ts
|
|
267
|
-
|
|
268
|
-
export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin: string) => {
|
|
450
|
+
import { RefType } from '../../types/refTypes';
|
|
451
|
+
export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin: string) => {
|
|
452
|
+
lazyItemStatus: any;
|
|
453
|
+
readonly lazyItem: any;
|
|
454
|
+
};
|
|
269
455
|
|
|
270
456
|
// File: src/composables/ref/useLazyRef.d.ts
|
|
271
|
-
|
|
272
|
-
export
|
|
273
|
-
|
|
457
|
+
import { Ref, ShallowRef } from 'vue';
|
|
458
|
+
export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
459
|
+
intersectionObserver: IntersectionObserver | undefined;
|
|
460
|
+
getItem(element: HTMLElement): any;
|
|
461
|
+
addLazyItem(element: Ref<HTMLElement | undefined>): ShallowRef<boolean, boolean>;
|
|
462
|
+
removeLazyItem: (element?: HTMLElement) => void;
|
|
463
|
+
disconnectLazy: () => void | undefined;
|
|
464
|
+
};
|
|
274
465
|
|
|
275
466
|
// File: src/composables/ref/useLoadingRef.d.ts
|
|
467
|
+
import { ShallowRef } from 'vue';
|
|
276
468
|
export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
|
|
277
469
|
|
|
278
470
|
// File: src/composables/ref/useMeta.d.ts
|
|
279
|
-
|
|
471
|
+
import { MetaRobots, MetaStatic } from '@dxtmisha/functional-basic';
|
|
472
|
+
import { Ref } from 'vue';
|
|
473
|
+
export declare const useMeta: () => Readonly<{
|
|
474
|
+
meta: typeof MetaStatic;
|
|
475
|
+
title: Ref<string, string>;
|
|
476
|
+
keyword: Ref<string, string>;
|
|
477
|
+
description: Ref<string, string>;
|
|
478
|
+
author: Ref<string, string>;
|
|
479
|
+
image: Ref<string, string>;
|
|
480
|
+
canonical: Ref<string, string>;
|
|
481
|
+
robots: Ref<MetaRobots, MetaRobots>;
|
|
482
|
+
siteName: Ref<string, string>;
|
|
483
|
+
getHtmlMeta: () => string;
|
|
484
|
+
sync: () => void;
|
|
485
|
+
update: () => void;
|
|
486
|
+
updateSsr: () => void;
|
|
487
|
+
setTitle: (value: string) => void;
|
|
488
|
+
setKeywords: (value: string) => void;
|
|
489
|
+
setDescription: (value: string) => void;
|
|
490
|
+
setAuthor: (value: string) => void;
|
|
491
|
+
setImage: (value: string) => void;
|
|
492
|
+
setCanonical: (value: string) => void;
|
|
493
|
+
setRobots: (value: MetaRobots) => void;
|
|
494
|
+
setSiteName: (value: string) => void;
|
|
495
|
+
setSuffix: (suffix: string) => typeof MetaStatic;
|
|
496
|
+
}> & {
|
|
497
|
+
init(): any;
|
|
498
|
+
destroyExecute?(): void;
|
|
499
|
+
};
|
|
280
500
|
|
|
281
501
|
// File: src/composables/ref/useQueryRef.d.ts
|
|
502
|
+
import { ShallowRef } from 'vue';
|
|
282
503
|
export declare function useQueryRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
283
504
|
|
|
284
505
|
// File: src/composables/ref/useRouterList.d.ts
|
|
285
|
-
|
|
506
|
+
import { Ref, ComputedRef } from 'vue';
|
|
507
|
+
import { NumberOrString } from '@dxtmisha/functional-basic';
|
|
508
|
+
import { ConstrBind } from '../../types/constructorTypes';
|
|
509
|
+
import { ListDataBasic } from '../../types/listTypes';
|
|
510
|
+
import { RefType } from '../../types/refTypes';
|
|
511
|
+
export declare const useRouterList: <T extends ListDataBasic>(list: RefType<ConstrBind<T>[] | undefined>, selected?: Ref<string> | string, hasTo?: boolean) => {
|
|
512
|
+
item: ComputedRef<T | undefined>;
|
|
513
|
+
selected: Ref<string, string>;
|
|
514
|
+
label: ComputedRef<NumberOrString>;
|
|
515
|
+
list: ComputedRef<ConstrBind<T>[]>;
|
|
516
|
+
to: (name?: string) => void;
|
|
517
|
+
toMain(): void;
|
|
518
|
+
};
|
|
286
519
|
|
|
287
520
|
// File: src/composables/ref/useSearchRef.d.ts
|
|
288
|
-
|
|
521
|
+
import { Ref, ComputedRef } from 'vue';
|
|
522
|
+
import { SearchColumns, SearchFormatList, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
523
|
+
import { SearchListInput } from '../../types/searchTypes';
|
|
524
|
+
export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns: K, value?: Ref<string>, options?: SearchOptions): {
|
|
525
|
+
isSearch: ComputedRef<boolean>;
|
|
526
|
+
search: Ref<string, string>;
|
|
527
|
+
loading: Ref<boolean, boolean>;
|
|
528
|
+
listSearch: ComputedRef<SearchFormatList<T, K>>;
|
|
529
|
+
length: ComputedRef<number>;
|
|
530
|
+
};
|
|
289
531
|
|
|
290
532
|
// File: src/composables/ref/useSearchValueRef.d.ts
|
|
291
|
-
|
|
533
|
+
import { Ref } from 'vue';
|
|
534
|
+
import { SearchList, SearchColumns, SearchItem } from '@dxtmisha/functional-basic';
|
|
535
|
+
export declare function useSearchValueRef<T extends SearchItem, K extends SearchColumns<T>>(item: SearchList<T, K>, value?: Ref<string>): {
|
|
536
|
+
search: Ref<string, string>;
|
|
537
|
+
searchDelay: Ref<string, string>;
|
|
538
|
+
loading: Ref<boolean, boolean>;
|
|
539
|
+
};
|
|
292
540
|
|
|
293
541
|
// File: src/composables/ref/useSessionRef.d.ts
|
|
542
|
+
import { Ref } from 'vue';
|
|
294
543
|
export declare function useSessionRef<T>(name: string, defaultValue?: T | (() => T)): Ref<T | undefined>;
|
|
295
544
|
|
|
296
545
|
// File: src/composables/ref/useStorageRef.d.ts
|
|
546
|
+
import { Ref } from 'vue';
|
|
297
547
|
export declare function useStorageRef<T>(name: string, defaultValue?: T | (() => T), cache?: number): Ref<T | undefined>;
|
|
298
548
|
|
|
299
549
|
// File: src/composables/ref/useTranslateRef.d.ts
|
|
550
|
+
import { ShallowRef } from 'vue';
|
|
551
|
+
import { TranslateInstance, TranslateList } from '@dxtmisha/functional-basic';
|
|
300
552
|
export declare function useTranslateRef<T extends (string | string[])[]>(names: T, translateInstance?: TranslateInstance): ShallowRef<TranslateList<T>>;
|
|
301
553
|
export declare const t: <T extends string[]>(names: T) => ShallowRef<TranslateList<T>>;
|
|
302
554
|
|
|
@@ -307,21 +559,46 @@ export declare const uiMakeFlags: () => void;
|
|
|
307
559
|
export * from '@dxtmisha/functional-basic';
|
|
308
560
|
|
|
309
561
|
// File: src/functions/computedAsync.d.ts
|
|
562
|
+
import { ComputedRef, DebuggerOptions } from 'vue';
|
|
310
563
|
export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, initialState?: (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
|
|
311
564
|
|
|
312
565
|
// File: src/functions/computedByLanguage.d.ts
|
|
566
|
+
import { ComputedGetter, ComputedRef, DebuggerOptions } from 'vue';
|
|
313
567
|
export declare function computedByLanguage<T, R extends (T | undefined) = T | undefined>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
|
|
314
568
|
|
|
315
569
|
// File: src/functions/computedEternity.d.ts
|
|
570
|
+
import { Ref } from 'vue';
|
|
316
571
|
export declare function computedEternity<T>(getter: () => Promise<T> | T, initialState?: (() => T) | T): Ref<T, T>;
|
|
317
572
|
|
|
318
573
|
// File: src/functions/dxtFunctionalPlugin.d.ts
|
|
319
|
-
|
|
574
|
+
import { Plugin } from 'vue';
|
|
575
|
+
import { InputSocialIcons } from '@dxtmisha/media';
|
|
576
|
+
import { ApiConfig, ErrorCenterCauseList, ErrorCenterHandlerCallback, ErrorCenterHandlerList, IconsConfig, TranslateConfig } from '@dxtmisha/functional-basic';
|
|
577
|
+
import { Router } from 'vue-router';
|
|
578
|
+
export interface FunctionalPluginOptions {
|
|
579
|
+
api?: ApiConfig;
|
|
580
|
+
translate?: TranslateConfig;
|
|
581
|
+
location?: string | (() => string);
|
|
582
|
+
metaSuffix?: string;
|
|
583
|
+
icons?: IconsConfig;
|
|
584
|
+
iconsSocial?: InputSocialIcons;
|
|
585
|
+
router?: Router;
|
|
586
|
+
errorCauses?: ErrorCenterCauseList;
|
|
587
|
+
errorHandlers?: ErrorCenterHandlerList;
|
|
588
|
+
errorCallbacks?: ErrorCenterHandlerCallback[];
|
|
589
|
+
}
|
|
320
590
|
export declare const dxtFunctionalPlugin: Plugin;
|
|
321
591
|
|
|
322
592
|
// File: src/functions/executeUse.d.ts
|
|
323
|
-
export declare enum ExecuteUseType {
|
|
324
|
-
|
|
593
|
+
export declare enum ExecuteUseType {
|
|
594
|
+
global = "global",
|
|
595
|
+
provide = "provide",
|
|
596
|
+
local = "local"
|
|
597
|
+
}
|
|
598
|
+
export type ExecuteUseReturn<R> = Readonly<R & {
|
|
599
|
+
init(): Readonly<R>;
|
|
600
|
+
destroyExecute?(): void;
|
|
601
|
+
}>;
|
|
325
602
|
export declare function executeUse<R, O extends any[], RI extends ExecuteUseReturn<R> = ExecuteUseReturn<R>>(callback: (...args: O) => R, type?: ExecuteUseType): ((...args: O) => RI) | (() => RI);
|
|
326
603
|
export declare function executeUseGlobal<R>(callback: () => R): (() => Readonly<R & { init(): Readonly<R>; destroyExecute?(): void; }>) | (() => Readonly<R & { init(): Readonly<R>; destroyExecute?(): void; }>);
|
|
327
604
|
export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & { init(): Readonly<R>; destroyExecute?(): void; }>) | (() => Readonly<R & { init(): Readonly<R>; destroyExecute?(): void; }>);
|
|
@@ -332,42 +609,67 @@ export declare function executeUseGlobalInit(): void;
|
|
|
332
609
|
export declare function getInject<T>(name: string): T | undefined;
|
|
333
610
|
|
|
334
611
|
// File: src/functions/getOptions.d.ts
|
|
612
|
+
import { ApiFetch } from '@dxtmisha/functional-basic';
|
|
613
|
+
import { ApiOptions } from '../types/apiTypes';
|
|
614
|
+
import { RefOrNormal } from '../types/refTypes';
|
|
335
615
|
export declare const getOptions: (options?: ApiOptions) => RefOrNormal<ApiFetch>;
|
|
336
616
|
|
|
337
617
|
// File: src/functions/ref/executeFunctionRef.d.ts
|
|
618
|
+
import { RefOrNormalOrFunction } from '../../types/refTypes';
|
|
338
619
|
export declare function executeFunctionRef<T>(data: RefOrNormalOrFunction<T>): T;
|
|
339
620
|
|
|
340
621
|
// File: src/functions/ref/getApiErrorRef.d.ts
|
|
622
|
+
import { ComputedRef } from 'vue';
|
|
623
|
+
import { ApiData, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
624
|
+
import { RefType } from '../../types/refTypes';
|
|
341
625
|
export declare function getApiErrorRef<R>(data: RefType<ApiData<R> | undefined>): ComputedRef<ApiErrorItem | undefined>;
|
|
342
626
|
|
|
343
627
|
// File: src/functions/ref/getBindRef.d.ts
|
|
628
|
+
import { ComputedRef } from 'vue';
|
|
629
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
630
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
344
631
|
export declare function getBindRef<T, R extends ItemList>(value: RefOrNormal<T | R> | undefined, nameExtra?: RefOrNormal<ItemList> | string, name?: string): ComputedRef<R>;
|
|
345
632
|
|
|
346
633
|
// File: src/functions/ref/getRef.d.ts
|
|
634
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
347
635
|
export declare function getRef<T>(item: RefOrNormal<T>): T;
|
|
348
636
|
|
|
349
637
|
// File: src/functions/ref/render.d.ts
|
|
638
|
+
import { VNode } from 'vue';
|
|
639
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
640
|
+
import { RawChildren, RawSlots } from '../../types/refTypes';
|
|
350
641
|
export declare function render<T extends ItemList>(name: string | any, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
|
|
351
642
|
|
|
352
643
|
// File: src/functions/ref/setRef.d.ts
|
|
644
|
+
import { Ref } from 'vue';
|
|
353
645
|
export declare function setRef<T>(item: Ref<T>, value: T): void;
|
|
354
646
|
|
|
355
647
|
// File: src/functions/ref/toRefItem.d.ts
|
|
648
|
+
import { Ref } from 'vue';
|
|
649
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
356
650
|
export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
|
|
357
651
|
|
|
358
652
|
// File: src/functions/render/getBind.d.ts
|
|
653
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
654
|
+
import { ConstrBind } from '../../types/constructorTypes';
|
|
359
655
|
export declare function getBind<T, R extends ItemList>(value: T | R | undefined | null, nameExtra?: ItemList | string, name?: string, except?: boolean): ConstrBind<R>;
|
|
360
656
|
|
|
361
657
|
// File: src/functions/render/getClassName.d.ts
|
|
658
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
362
659
|
export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
|
|
363
660
|
|
|
364
661
|
// File: src/functions/render/getIndexForRender.d.ts
|
|
662
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
365
663
|
export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
|
|
366
664
|
|
|
367
665
|
// File: src/functions/toBind.d.ts
|
|
666
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
667
|
+
import { ConstrBind } from '../types/constructorTypes';
|
|
368
668
|
export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, value: ItemList): ConstrBind<R>;
|
|
369
669
|
|
|
370
670
|
// File: src/functions/toBinds.d.ts
|
|
671
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
672
|
+
import { ConstrBind } from '../types/constructorTypes';
|
|
371
673
|
export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
|
|
372
674
|
|
|
373
675
|
// File: src/library.d.ts
|
|
@@ -438,13 +740,43 @@ export * from './types/refTypes';
|
|
|
438
740
|
export * from './types/searchTypes';
|
|
439
741
|
|
|
440
742
|
// File: src/types/apiTypes.d.ts
|
|
743
|
+
import { ApiData, ApiDataValidation, ApiDefaultValue, ApiErrorStorageList, ApiFetch, ApiMethodItem, SearchColumns, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
744
|
+
import { RefOrNormal, RefType } from './refTypes';
|
|
745
|
+
import { Ref } from 'vue';
|
|
441
746
|
export type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
|
|
442
747
|
export type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
|
|
443
|
-
export type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
444
|
-
|
|
445
|
-
|
|
748
|
+
export type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
749
|
+
path?: RefOrNormal<string | undefined>;
|
|
750
|
+
options?: ApiOptions;
|
|
751
|
+
reactivity?: boolean;
|
|
752
|
+
conditions?: RefType<boolean>;
|
|
753
|
+
transformation?: (data: Type, isResponseContractValid?: ApiDataValidation) => ApiData<Return>;
|
|
754
|
+
validateResponseContract?: (data: Type) => ApiDataValidation;
|
|
755
|
+
errorContract?: ApiErrorStorageList;
|
|
756
|
+
typeData?: ((data: Return) => boolean) | any;
|
|
757
|
+
unmounted?: boolean;
|
|
758
|
+
skeleton?: () => Return;
|
|
759
|
+
};
|
|
760
|
+
export type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
|
|
761
|
+
columns: K;
|
|
762
|
+
value?: Ref<string>;
|
|
763
|
+
options?: SearchOptions;
|
|
764
|
+
};
|
|
765
|
+
export type ApiManagementRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> = {
|
|
766
|
+
path?: RefOrNormal<string | undefined>;
|
|
767
|
+
action?: (data: Return | undefined) => Promise<void> | void;
|
|
768
|
+
transformation?: (data: T) => Return;
|
|
769
|
+
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
770
|
+
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
771
|
+
errorContract?: ApiErrorStorageList;
|
|
772
|
+
toData?: boolean;
|
|
773
|
+
options?: ApiOptions;
|
|
774
|
+
};
|
|
446
775
|
|
|
447
776
|
// File: src/types/constructorTypes.d.ts
|
|
777
|
+
import { Ref, PropType, ComputedRef } from 'vue';
|
|
778
|
+
import { Undefined } from '@dxtmisha/functional-basic';
|
|
779
|
+
import { RefOrNormal, RefType } from './refTypes';
|
|
448
780
|
export type ConstrItem = Record<string, any>;
|
|
449
781
|
export type ConstrValue<T = any> = { value?: T; };
|
|
450
782
|
export type ConstrComponent = Record<string, any>;
|
|
@@ -459,8 +791,19 @@ export type ConstrClassList = Record<string, ConstrClass>;
|
|
|
459
791
|
export type ConstrClasses = { main: ConstrClass; } & ConstrClassList;
|
|
460
792
|
export type ConstrStylesItem = string | null;
|
|
461
793
|
export type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
|
|
462
|
-
export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
463
|
-
|
|
794
|
+
export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
795
|
+
components?: COMP;
|
|
796
|
+
compMod?: ConstrComponentMod<P>;
|
|
797
|
+
emits?: ConstrEmit<EMITS>;
|
|
798
|
+
classes?: RefType<ConstrClasses>;
|
|
799
|
+
styles?: RefType<ConstrStyles>;
|
|
800
|
+
};
|
|
801
|
+
export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
|
|
802
|
+
name: string;
|
|
803
|
+
element: Ref<E | undefined>;
|
|
804
|
+
classes: RefType<CLASSES>;
|
|
805
|
+
styles: RefType<ConstrStyles>;
|
|
806
|
+
} & SETUP;
|
|
464
807
|
export type ConstrRegistration = { flag?: boolean; translate?: Record<string, string>; };
|
|
465
808
|
export type ConstrBind<T> = T & Record<string, any> & { key?: string; class?: ConstrClass; style?: ConstrStyles; };
|
|
466
809
|
export type ConstrPropItemOptions<T = any> = { type?: PropType<T>; required?: boolean; default?: any; validator?(value: any, props: any): boolean; };
|
|
@@ -469,6 +812,8 @@ export type ConstrProps<P = Record<string, any>> = { [K in keyof P]: ConstrPropI
|
|
|
469
812
|
export type ConstrHrefProps = { href?: string; };
|
|
470
813
|
|
|
471
814
|
// File: src/types/listTypes.d.ts
|
|
815
|
+
import { NumberOrString, NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
|
|
816
|
+
import { ConstrBind } from './constructorTypes';
|
|
472
817
|
export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
473
818
|
export type ListDataBasic = { label?: NumberOrString; value?: any; search?: string; };
|
|
474
819
|
export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & { parent?: string; type: ListType; index: string; disabled?: boolean; }>;
|
|
@@ -484,6 +829,7 @@ export type ListName = string | number | undefined;
|
|
|
484
829
|
export type ListNames = ListName[];
|
|
485
830
|
|
|
486
831
|
// File: src/types/refTypes.d.ts
|
|
832
|
+
import { ComputedRef, Ref, VNode, VNodeArrayChildren } from 'vue';
|
|
487
833
|
export type RefType<T> = ComputedRef<T> | Ref<T>;
|
|
488
834
|
export type RefUndefined<T> = RefType<T | undefined>;
|
|
489
835
|
export type RefOrNormal<T> = RefType<T> | T;
|
|
@@ -492,5 +838,7 @@ export type RawChildren = string | number | boolean | VNode | VNodeArrayChildren
|
|
|
492
838
|
export type RawSlots = { [name: string]: unknown; $stable?: boolean; };
|
|
493
839
|
|
|
494
840
|
// File: src/types/searchTypes.d.ts
|
|
841
|
+
import { RefOrNormal } from './refTypes';
|
|
842
|
+
import { SearchItem, SearchListValue } from '@dxtmisha/functional-basic';
|
|
495
843
|
export type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
|
|
496
844
|
export type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
|
package/dist/library.js
CHANGED
|
@@ -334,34 +334,6 @@ var je = class {
|
|
|
334
334
|
let o = G(e), s = G(t);
|
|
335
335
|
super(o.value, n, r, i, a), s.value && this.setElementControl(s.value), z(o, (e) => this.setElement(e)), z(s, (e) => this.setElementControl(e));
|
|
336
336
|
}
|
|
337
|
-
}, Ne = class {
|
|
338
|
-
constructor(e = u.getLocation()) {
|
|
339
|
-
V(this, "flag", void 0), this.flag = F(() => new d(H(e)));
|
|
340
|
-
}
|
|
341
|
-
getCode() {
|
|
342
|
-
return this.flag.value.getCode();
|
|
343
|
-
}
|
|
344
|
-
get(e = this.getCode()) {
|
|
345
|
-
return F(() => this.flag.value.get(H(e)));
|
|
346
|
-
}
|
|
347
|
-
getLanguage(e = this.getCode()) {
|
|
348
|
-
return F(() => this.flag.value.getLanguage(H(e)));
|
|
349
|
-
}
|
|
350
|
-
getFlag(e = this.getCode()) {
|
|
351
|
-
return F(() => this.flag.value.getFlag(H(e)));
|
|
352
|
-
}
|
|
353
|
-
getList(e) {
|
|
354
|
-
return F(() => this.flag.value.getList(H(e)));
|
|
355
|
-
}
|
|
356
|
-
getListLanguage(e) {
|
|
357
|
-
return F(() => this.flag.value.getListLanguage(H(e)));
|
|
358
|
-
}
|
|
359
|
-
getNational(e) {
|
|
360
|
-
return F(() => this.flag.value.getNational(H(e)));
|
|
361
|
-
}
|
|
362
|
-
getNationalLanguage(e) {
|
|
363
|
-
return F(() => this.flag.value.getNationalLanguage(H(e)));
|
|
364
|
-
}
|
|
365
337
|
}, q = class {
|
|
366
338
|
static get() {
|
|
367
339
|
return b.get("__ui:geo-ref__", () => R(u.getItem()));
|
|
@@ -393,11 +365,39 @@ var je = class {
|
|
|
393
365
|
static setValueDefault(e) {
|
|
394
366
|
u.setValueDefault(e), this.get().value = u.getItem();
|
|
395
367
|
}
|
|
368
|
+
}, Ne = class {
|
|
369
|
+
constructor(e) {
|
|
370
|
+
V(this, "flag", void 0), this.flag = F(() => new d(H(e == null ? q.getLocation().value : e)));
|
|
371
|
+
}
|
|
372
|
+
getCode() {
|
|
373
|
+
return this.flag.value.getCode();
|
|
374
|
+
}
|
|
375
|
+
get(e = this.getCode()) {
|
|
376
|
+
return F(() => this.flag.value.get(H(e)));
|
|
377
|
+
}
|
|
378
|
+
getLanguage(e = this.getCode()) {
|
|
379
|
+
return F(() => this.flag.value.getLanguage(H(e)));
|
|
380
|
+
}
|
|
381
|
+
getFlag(e = this.getCode()) {
|
|
382
|
+
return F(() => this.flag.value.getFlag(H(e)));
|
|
383
|
+
}
|
|
384
|
+
getList(e) {
|
|
385
|
+
return F(() => this.flag.value.getList(H(e)));
|
|
386
|
+
}
|
|
387
|
+
getListLanguage(e) {
|
|
388
|
+
return F(() => this.flag.value.getListLanguage(H(e)));
|
|
389
|
+
}
|
|
390
|
+
getNational(e) {
|
|
391
|
+
return F(() => this.flag.value.getNational(H(e)));
|
|
392
|
+
}
|
|
393
|
+
getNationalLanguage(e) {
|
|
394
|
+
return F(() => this.flag.value.getNationalLanguage(H(e)));
|
|
395
|
+
}
|
|
396
396
|
}, Pe = class {
|
|
397
397
|
constructor(e) {
|
|
398
398
|
V(this, "location", void 0), V(this, "intl", void 0), this.location = G(e), this.intl = F(() => {
|
|
399
399
|
var e;
|
|
400
|
-
return new f((e = this.location.value) == null ? q.
|
|
400
|
+
return new f((e = this.location.value) == null ? q.getLocation().value : e);
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
display(e, t) {
|
|
@@ -1342,7 +1342,7 @@ var jt = { install(t, n = {}) {
|
|
|
1342
1342
|
let e = t.config.globalProperties.$router;
|
|
1343
1343
|
e && J.set(e);
|
|
1344
1344
|
}
|
|
1345
|
-
n.errorCauses && s.addList(n.errorCauses), n.errorHandlers && s.addHandlerList(n.errorHandlers), gt();
|
|
1345
|
+
n.errorCauses && s.addList(n.errorCauses), n.errorHandlers && s.addHandlerList(n.errorHandlers), n.errorCallbacks && n.errorCallbacks.forEach((e) => s.addCallback(e)), gt();
|
|
1346
1346
|
} };
|
|
1347
1347
|
//#endregion
|
|
1348
1348
|
//#region src/functions/getInject.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'vue';
|
|
2
2
|
import { InputSocialIcons } from '@dxtmisha/media';
|
|
3
|
-
import { ApiConfig, ErrorCenterCauseList, ErrorCenterHandlerList, IconsConfig, TranslateConfig } from '@dxtmisha/functional-basic';
|
|
3
|
+
import { ApiConfig, ErrorCenterCauseList, ErrorCenterHandlerCallback, ErrorCenterHandlerList, IconsConfig, TranslateConfig } from '@dxtmisha/functional-basic';
|
|
4
4
|
import { Router } from 'vue-router';
|
|
5
5
|
/**
|
|
6
6
|
* Interface for the functional plugin options /
|
|
@@ -52,6 +52,11 @@ export interface FunctionalPluginOptions {
|
|
|
52
52
|
* Список обработчиков ошибок для центра ошибок
|
|
53
53
|
*/
|
|
54
54
|
errorHandlers?: ErrorCenterHandlerList;
|
|
55
|
+
/**
|
|
56
|
+
* Global error callback functions for error center /
|
|
57
|
+
* Список глобальных функций обратного вызова для центра ошибок
|
|
58
|
+
*/
|
|
59
|
+
errorCallbacks?: ErrorCenterHandlerCallback[];
|
|
55
60
|
}
|
|
56
61
|
/**
|
|
57
62
|
* Vue plugin for initializing and configuring global functional services
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.14.
|
|
4
|
+
"version": "1.14.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A comprehensive library of utilities, base classes, and Vue 3 composables for reactive web development. Extends @dxtmisha/functional-basic with Composition API.",
|
|
7
7
|
"keywords": [
|