@dxtmisha/functional 1.15.13 → 1.15.15
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 +8 -0
- package/ai-description.md +7 -7
- package/ai-mcp-resources.json +8 -8
- package/ai-types.md +736 -1047
- package/dist/library.d.ts +3556 -67
- package/dist/library.js +281 -311
- package/package.json +11 -4
- package/dist/classes/design/DesignAbstract.d.ts +0 -61
- package/dist/classes/design/DesignAsyncAbstract.d.ts +0 -28
- package/dist/classes/design/DesignChanged.d.ts +0 -42
- package/dist/classes/design/DesignComp.d.ts +0 -4
- package/dist/classes/design/DesignComponents.d.ts +0 -81
- package/dist/classes/design/DesignConstructorAbstract.d.ts +0 -150
- package/dist/classes/ref/DatetimeRef.d.ts +0 -123
- package/dist/classes/ref/EffectScopeGlobal.d.ts +0 -22
- package/dist/classes/ref/EventRef.d.ts +0 -22
- package/dist/classes/ref/GeoFlagRef.d.ts +0 -82
- package/dist/classes/ref/GeoIntlRef.d.ts +0 -220
- package/dist/classes/ref/GeoRef.d.ts +0 -82
- package/dist/classes/ref/GeoUnitRef.d.ts +0 -153
- package/dist/classes/ref/ListDataRef.d.ts +0 -366
- package/dist/classes/ref/RouterItemRef.d.ts +0 -61
- package/dist/classes/ref/ScrollbarWidthRef.d.ts +0 -22
- package/dist/composables/ref/useApiAsyncRef.d.ts +0 -70
- package/dist/composables/ref/useApiDelete.d.ts +0 -23
- package/dist/composables/ref/useApiGet.d.ts +0 -23
- package/dist/composables/ref/useApiManagementAsyncRef.d.ts +0 -58
- package/dist/composables/ref/useApiManagementRef.d.ts +0 -161
- package/dist/composables/ref/useApiPost.d.ts +0 -23
- package/dist/composables/ref/useApiPut.d.ts +0 -23
- package/dist/composables/ref/useApiRef.d.ts +0 -159
- package/dist/composables/ref/useApiRequest.d.ts +0 -105
- package/dist/composables/ref/useBroadcastValueRef.d.ts +0 -11
- package/dist/composables/ref/useCookieRef.d.ts +0 -11
- package/dist/composables/ref/useFormattersRef.d.ts +0 -21
- package/dist/composables/ref/useGeoIntlRef.d.ts +0 -14
- package/dist/composables/ref/useGeoUnitRef.d.ts +0 -7
- package/dist/composables/ref/useHashRef.d.ts +0 -9
- package/dist/composables/ref/useLazyItemByMarginRef.d.ts +0 -24
- package/dist/composables/ref/useLazyRef.d.ts +0 -42
- package/dist/composables/ref/useLoadingRef.d.ts +0 -7
- package/dist/composables/ref/useMeta.d.ts +0 -223
- package/dist/composables/ref/useQueryRef.d.ts +0 -9
- package/dist/composables/ref/useRouterList.d.ts +0 -28
- package/dist/composables/ref/useSearchRef.d.ts +0 -36
- package/dist/composables/ref/useSearchValueRef.d.ts +0 -19
- package/dist/composables/ref/useSessionRef.d.ts +0 -9
- package/dist/composables/ref/useStorageRef.d.ts +0 -10
- package/dist/composables/ref/useTranslateRef.d.ts +0 -40
- package/dist/flags.d.ts +0 -1
- package/dist/functions/basic.d.ts +0 -1
- package/dist/functions/computedAsync.d.ts +0 -13
- package/dist/functions/computedByLanguage.d.ts +0 -15
- package/dist/functions/computedEternity.d.ts +0 -15
- package/dist/functions/dxtFunctionalPlugin.d.ts +0 -82
- package/dist/functions/executeUse.d.ts +0 -216
- package/dist/functions/getInject.d.ts +0 -7
- package/dist/functions/getOptions.d.ts +0 -10
- package/dist/functions/ref/executeFunctionRef.d.ts +0 -11
- package/dist/functions/ref/getApiErrorRef.d.ts +0 -10
- package/dist/functions/ref/getBindRef.d.ts +0 -13
- package/dist/functions/ref/getRef.d.ts +0 -8
- package/dist/functions/ref/render.d.ts +0 -13
- package/dist/functions/ref/setRef.d.ts +0 -9
- package/dist/functions/ref/toRefItem.d.ts +0 -9
- package/dist/functions/render/getBind.d.ts +0 -14
- package/dist/functions/render/getClassName.d.ts +0 -8
- package/dist/functions/render/getIndexForRender.d.ts +0 -10
- package/dist/functions/toBind.d.ts +0 -10
- package/dist/functions/toBinds.d.ts +0 -9
- package/dist/types/apiTypes.d.ts +0 -74
- package/dist/types/constructorTypes.d.ts +0 -126
- package/dist/types/listTypes.d.ts +0 -65
- package/dist/types/refTypes.d.ts +0 -43
- package/dist/types/searchTypes.d.ts +0 -10
package/ai-types.md
CHANGED
|
@@ -1,1066 +1,760 @@
|
|
|
1
|
-
All these methods are in the @dxtmisha/functional (v1.15.
|
|
1
|
+
All these methods are in the @dxtmisha/functional (v1.15.15) library.
|
|
2
2
|
|
|
3
|
-
/** Base class for
|
|
3
|
+
/** Base abstract class for component design constructors. @keywords design abstract constructor */
|
|
4
4
|
export declare abstract class DesignAbstract<T extends Record<string, any>, C extends Record<string, any>> {
|
|
5
|
-
/**
|
|
5
|
+
/** Initializes the design instance with properties, change callback, and watched keys. @keywords constructor init */
|
|
6
6
|
constructor(props: T, callback?: ((event: C) => void) | undefined, changed?: string[]);
|
|
7
|
-
/**
|
|
7
|
+
/** Triggers updates and executes the callback function. @param compelled Forces data to update @keywords make update */
|
|
8
8
|
make(compelled?: boolean): this;
|
|
9
|
-
/**
|
|
9
|
+
/** Executes the change callback function. @param compelled Forces data update execution @keywords callback invoke */
|
|
10
10
|
makeCallback(compelled?: boolean): void;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
/** Base class for asynchronous
|
|
13
|
+
/** Base abstract class for working with asynchronous constructors. @keywords design, async, abstract, constructor */
|
|
14
14
|
export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
|
|
15
|
-
/**
|
|
15
|
+
/** Triggers the async update process. @param compelled Forces data update. @keywords make, async, update */
|
|
16
16
|
make(compelled?: boolean): this;
|
|
17
|
-
/**
|
|
17
|
+
/** Executes the asynchronous callback to update data. @param compelled Forces data update. @keywords make callback, async, promise */
|
|
18
18
|
makeCallback(compelled?: boolean): Promise<void>;
|
|
19
|
-
/** Initializes event asynchronously. @keywords init event async */
|
|
20
|
-
protected abstract initEvent(): Promise<void>;
|
|
21
19
|
}
|
|
22
20
|
|
|
23
|
-
/**
|
|
21
|
+
/** Tracks and checks edited or modified values in a dataset. @keywords change detection, dirty check, watch, state tracker */
|
|
24
22
|
export declare class DesignChanged<T extends Record<string, any>> {
|
|
25
|
-
/**
|
|
23
|
+
/** Initializes change tracker with base properties and optional watched keys. @keywords constructor, init */
|
|
26
24
|
constructor(props: T, watch?: string[]);
|
|
27
|
-
/** Checks if property
|
|
25
|
+
/** Checks if a specific property or list of properties has been modified. @keywords is modified, changed property, check */
|
|
28
26
|
is(name: string | string[]): boolean;
|
|
29
|
-
/** Checks if any
|
|
27
|
+
/** Checks if any tracked data has changed. @keywords is changed, dirty check, modified */
|
|
30
28
|
isChanged(): boolean;
|
|
31
|
-
/** Updates
|
|
29
|
+
/** Updates internal snapshot to current values, resetting change status. @keywords update, sync, reset snapshot */
|
|
32
30
|
update(): void;
|
|
33
31
|
}
|
|
34
32
|
|
|
33
|
+
/** Helper class extending DesignComponents for managing and rendering subcomponents. @keywords design components subcomponents render */
|
|
35
34
|
export declare class DesignComp<COMP extends ConstrComponent, P extends ConstrItem> extends DesignComponents<COMP, P> {
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
/** Manages and renders connected UI components with modifier support. @keywords design components modification render */
|
|
37
|
+
import { type VNode } from 'vue';
|
|
38
|
+
/** Manages connected components, prop modifications, and dynamic rendering. @keywords design components, component registry, dynamic renderer */
|
|
41
39
|
export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
|
|
42
|
-
/**
|
|
40
|
+
/** Initializes component registry and modification definitions. @keywords constructor, init components */
|
|
43
41
|
constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
|
|
44
|
-
/** Checks
|
|
42
|
+
/** Checks whether a component exists in the registry. @keywords check component, has component, component exists */
|
|
45
43
|
is<K extends keyof COMP>(name: K): name is K;
|
|
46
|
-
/** Retrieves a component by name. @keywords get component */
|
|
44
|
+
/** Retrieves a component definition by name. @keywords get component, component lookup */
|
|
47
45
|
get<K extends keyof COMP>(name: K): COMP[K];
|
|
48
|
-
/**
|
|
46
|
+
/** Returns modified input properties for connected components. @keywords component modification, props override */
|
|
49
47
|
getModification<K extends keyof P>(index?: K & string | string, props?: P[K] | Record<string, any>): Record<string, any> | undefined;
|
|
50
|
-
/** Renders a component and returns an array containing the VNode. @keywords render component array */
|
|
48
|
+
/** Renders a component by name and returns an array containing the VNode. @keywords render component, vnode array */
|
|
51
49
|
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[];
|
|
52
|
-
/** Renders a single component VNode. @keywords render
|
|
50
|
+
/** Renders a single component VNode by name. @keywords render single component, render vnode */
|
|
53
51
|
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;
|
|
54
|
-
/** Renders a component and appends
|
|
52
|
+
/** Renders a component and appends the resulting VNode to the target array. @keywords render add, append vnode */
|
|
55
53
|
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;
|
|
56
|
-
/** Computes modifications for a specific component index. @keywords compute modification */
|
|
57
|
-
protected computeModification<K extends keyof P>(index: K & string | string): Record<string, any>;
|
|
58
54
|
}
|
|
59
55
|
|
|
60
|
-
import { ComputedRef, ToRefs, VNode
|
|
61
|
-
/**
|
|
56
|
+
import { type ComputedRef, type ToRefs, type VNode } from 'vue';
|
|
57
|
+
/** Abstract base constructor for collecting and managing functional design components. @keywords design constructor, abstract component */
|
|
62
58
|
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> {
|
|
63
|
-
/**
|
|
64
|
-
protected constructor(name: string, props: Readonly<P>, options?: ConstrOptions<COMP, EMITS, P> | undefined);
|
|
65
|
-
/** Initializes instance properties. @keywords init design */
|
|
66
|
-
protected init(): this;
|
|
67
|
-
/** Gets full class name. @keywords get name class */
|
|
59
|
+
/** Gets the component class name. @keywords component name, class name */
|
|
68
60
|
getName(): string;
|
|
69
|
-
/** Gets design
|
|
61
|
+
/** Gets the design name. @keywords design name */
|
|
70
62
|
getDesign(): string;
|
|
71
|
-
/** Gets sub-class name by
|
|
63
|
+
/** Gets the sub-element class name by hierarchical level. @keywords sub class, class name */
|
|
72
64
|
getSubClass(name: string | string[]): string;
|
|
73
|
-
/** Gets status modifier class name. @keywords
|
|
65
|
+
/** Gets the status modifier class name. @keywords status class, state */
|
|
74
66
|
getStatusClass(name: string | string[]): string;
|
|
75
|
-
/** Gets
|
|
67
|
+
/** Gets the style property name. @keywords style property */
|
|
76
68
|
getStyle(name: string | string[]): string;
|
|
77
|
-
/** Gets
|
|
69
|
+
/** Gets additional component attributes. @keywords attributes, attrs */
|
|
78
70
|
getAttrs(): ConstrItem;
|
|
79
|
-
/**
|
|
71
|
+
/** Gets key and class attributes for a sub-element. @keywords key class, sub element */
|
|
72
|
+
getKeyClass<K extends keyof CLASSES>(name: K & string): {
|
|
73
|
+
key: K & string;
|
|
74
|
+
class: any;
|
|
75
|
+
};
|
|
76
|
+
/** Exposes public properties and methods to the component instance. @keywords expose, public api */
|
|
80
77
|
expose(): ConstrExpose<E, EXPOSE>;
|
|
81
|
-
/**
|
|
78
|
+
/** Render function generator for the setup execution context. @keywords render, setup */
|
|
82
79
|
render(): () => VNode | (VNode | any)[] | undefined;
|
|
83
|
-
/** Initializes exposed context. @keywords init expose */
|
|
84
|
-
protected abstract initExpose(): EXPOSE;
|
|
85
|
-
/** Initializes computed CSS classes. @keywords init classes */
|
|
86
|
-
protected abstract initClasses(): Partial<CLASSES>;
|
|
87
|
-
/** Initializes computed inline styles. @keywords init styles */
|
|
88
|
-
protected abstract initStyles(): ConstrStyles;
|
|
89
|
-
/** Renders component template VNode. @keywords init render */
|
|
90
|
-
protected abstract initRender(): VNode | (VNode | any)[] | undefined;
|
|
91
|
-
/** Initializes slot content and optionally pushes to children. @keywords init slot */
|
|
92
|
-
protected initSlot<K extends keyof SLOTS>(name: K, children?: any[], props?: ConstrItem): VNode | undefined;
|
|
93
|
-
/** Normalizes class definition into class object map. @keywords to class */
|
|
94
|
-
protected toClass(classes?: ConstrClass): ConstrClassObject;
|
|
95
|
-
/** Maps class definition placeholders to component names. @keywords to class name */
|
|
96
|
-
protected toClassName<T extends ConstrItem>(classes?: ConstrItem): T;
|
|
97
80
|
}
|
|
98
81
|
|
|
99
|
-
import { ComputedRef, Ref } from 'vue';
|
|
100
|
-
import { Datetime, GeoDate, GeoFirstDay, GeoHours, NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
82
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
83
|
+
import { Datetime, type GeoDate, type GeoFirstDay, type GeoHours, type NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
101
84
|
|
|
102
|
-
/** @keywords
|
|
85
|
+
/** Reactive wrapper for date operations and localization. @keywords datetime date time reactive vue */
|
|
103
86
|
export declare class DatetimeRef {
|
|
104
|
-
/** @keywords constructor
|
|
87
|
+
/** Initializes a new DatetimeRef instance. @keywords constructor datetime init */
|
|
105
88
|
constructor(date: RefOrNormal<NumberOrStringOrDate>, type?: RefOrNormal<GeoDate>, code?: RefOrNormal<string>);
|
|
106
|
-
/** @keywords
|
|
89
|
+
/** Returns the raw reactive date value. @keywords item value raw */
|
|
107
90
|
getItem(): Ref<NumberOrStringOrDate>;
|
|
108
|
-
/** @keywords
|
|
91
|
+
/** Returns the reactive Date object. @keywords date object */
|
|
109
92
|
getDate(): Ref<Date>;
|
|
110
|
-
/** @keywords
|
|
93
|
+
/** Returns the underlying basic Datetime instance. @keywords datetime instance base */
|
|
111
94
|
getDatetime(): Datetime;
|
|
112
|
-
/** @keywords
|
|
95
|
+
/** Returns the reactive hour format type. @keywords hours format type 12h 24h */
|
|
113
96
|
getHoursType(): ComputedRef<GeoHours>;
|
|
114
|
-
/** @keywords
|
|
97
|
+
/** Returns the reactive first day of the week code. @keywords first day week code */
|
|
115
98
|
getFirstDayCode(): ComputedRef<GeoFirstDay>;
|
|
116
|
-
/** @keywords
|
|
99
|
+
/** Returns the reactive year according to local time. @keywords year local */
|
|
117
100
|
getYear(): ComputedRef<number>;
|
|
118
|
-
/** @keywords
|
|
101
|
+
/** Returns the reactive zero-based month index according to local time. @keywords month index local */
|
|
119
102
|
getMonth(): ComputedRef<number>;
|
|
120
|
-
/** @keywords
|
|
103
|
+
/** Returns the reactive day of the month according to local time. @keywords day month local */
|
|
121
104
|
getDay(): ComputedRef<number>;
|
|
122
|
-
/** @keywords
|
|
105
|
+
/** Returns the reactive hour according to local time. @keywords hour local */
|
|
123
106
|
getHour(): ComputedRef<number>;
|
|
124
|
-
/** @keywords
|
|
107
|
+
/** Returns the reactive minutes according to local time. @keywords minute local */
|
|
125
108
|
getMinute(): ComputedRef<number>;
|
|
126
|
-
/** @keywords
|
|
109
|
+
/** Returns the reactive seconds according to local time. @keywords second local */
|
|
127
110
|
getSecond(): ComputedRef<number>;
|
|
128
|
-
/** @keywords
|
|
111
|
+
/** Returns the reactive maximum number of days in the month. @keywords max day month days */
|
|
129
112
|
getMaxDay(): ComputedRef<number>;
|
|
130
|
-
/** @keywords locale
|
|
113
|
+
/** Returns localized date/time string based on format and style options. @keywords locale format intl */
|
|
131
114
|
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): ComputedRef<string>;
|
|
132
|
-
/** @keywords standard
|
|
115
|
+
/** Returns standard formatted date string with optional time zone. @keywords standard format timezone */
|
|
133
116
|
standard(timeZone?: boolean): ComputedRef<string>;
|
|
134
|
-
protected updateDate(): this;
|
|
135
117
|
}
|
|
136
118
|
|
|
137
|
-
/** Global effect scope
|
|
119
|
+
/** Global effect scope container. @keywords effect scope, reactivity, global scope */
|
|
138
120
|
export declare class EffectScopeGlobal {
|
|
139
|
-
/** Runs a
|
|
121
|
+
/** Runs a callback within the global effect scope. @keywords run, execute, global effect scope */
|
|
140
122
|
static run<T>(fn: () => T): T | undefined;
|
|
141
|
-
/** Gets the global effect scope instance. @keywords get scope instance global */
|
|
142
|
-
static getScope(): import("vue").EffectScope;
|
|
143
123
|
}
|
|
144
124
|
|
|
145
|
-
import { ElementOrString, ElementOrWindow, EventItem, EventListenerDetail, EventOptions } from '@dxtmisha/functional-basic';
|
|
125
|
+
import { type ElementOrString, type ElementOrWindow, EventItem, type EventListenerDetail, type EventOptions } from '@dxtmisha/functional-basic';
|
|
146
126
|
|
|
147
|
-
/**
|
|
148
|
-
* Class for working with events using reactive references.
|
|
149
|
-
* @keywords event_ref event_wrapper reactive_event dom_event
|
|
150
|
-
*/
|
|
127
|
+
/** Class for managing DOM event listeners with reactive reference targets. @keywords event, listener, ref, dom, reactive */
|
|
151
128
|
export declare class EventRef<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> extends EventItem<E, O, D> {
|
|
152
|
-
/**
|
|
153
|
-
* Creates an instance of EventRef.
|
|
154
|
-
* @keywords constructor event_ref_init
|
|
155
|
-
*/
|
|
129
|
+
/** Creates an instance of EventRef. @keywords constructor, event, ref */
|
|
156
130
|
constructor(elementSelector?: RefOrNormal<ElementOrString<E> | undefined>, elementSelectorControl?: RefOrNormal<ElementOrString<HTMLElement>>, type?: string | string[], listener?: EventListenerDetail<O, D>, options?: EventOptions, detail?: D);
|
|
157
131
|
}
|
|
158
132
|
|
|
159
|
-
import { ComputedRef } from 'vue';
|
|
160
|
-
import { GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
|
|
133
|
+
import { type ComputedRef } from 'vue';
|
|
134
|
+
import { type GeoFlagItem, type GeoFlagNational } from '@dxtmisha/functional-basic';
|
|
161
135
|
|
|
162
|
-
/**
|
|
136
|
+
/** Reactive wrapper for managing geo flags and country/language information. @keywords geo, flag, country, language, reactive */
|
|
163
137
|
export declare class GeoFlagRef {
|
|
164
|
-
/**
|
|
165
|
-
* Creates a new GeoFlagRef instance.
|
|
166
|
-
* @param code Country or language code
|
|
167
|
-
*/
|
|
138
|
+
/** Initializes the reactive geo flag manager with an optional country or language code. @keywords constructor, init */
|
|
168
139
|
constructor(code?: RefOrNormal<string | undefined>);
|
|
169
|
-
/**
|
|
140
|
+
/** Retrieves the resolved country code. @keywords country_code, get_code */
|
|
170
141
|
getCode(): string;
|
|
171
|
-
/**
|
|
142
|
+
/** Retrieves reactive country and flag metadata. @keywords country, flag_item, metadata */
|
|
172
143
|
get(code?: RefOrNormal<string>): ComputedRef<GeoFlagItem | undefined>;
|
|
173
|
-
/**
|
|
144
|
+
/** Retrieves reactive language and flag metadata. @keywords language, flag_item, metadata */
|
|
174
145
|
getLanguage(code?: RefOrNormal<string>): ComputedRef<GeoFlagItem | undefined>;
|
|
175
|
-
/**
|
|
146
|
+
/** Retrieves a reactive link or URL to the flag asset. @keywords flag_url, flag_link */
|
|
176
147
|
getFlag(code?: RefOrNormal<string>): ComputedRef<string | undefined>;
|
|
177
|
-
/**
|
|
148
|
+
/** Retrieves a reactive list of country flag items filtered by codes. @keywords country_list, flag_list */
|
|
178
149
|
getList(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagItem[]>;
|
|
179
|
-
/**
|
|
150
|
+
/** Retrieves a reactive list of language flag items filtered by codes. @keywords language_list, flag_list */
|
|
180
151
|
getListLanguage(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagItem[]>;
|
|
181
|
-
/**
|
|
152
|
+
/** Retrieves a reactive list of country flag items in their national language. @keywords national_names, country_national */
|
|
182
153
|
getNational(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagNational[]>;
|
|
183
|
-
/**
|
|
154
|
+
/** Retrieves a reactive list of language flag items in their national language. @keywords national_languages, language_national */
|
|
184
155
|
getNationalLanguage(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagNational[]>;
|
|
185
156
|
}
|
|
186
157
|
|
|
187
|
-
import { ComputedRef } from 'vue';
|
|
188
|
-
import { GeoDate, ItemValue, NumberOrString, NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
189
|
-
|
|
158
|
+
import { type ComputedRef } from 'vue';
|
|
159
|
+
import { type GeoDate, type ItemValue, type NumberOrString, type NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
190
160
|
/**
|
|
191
|
-
* Reactive
|
|
192
|
-
* @
|
|
161
|
+
* Reactive internationalization formatter for numbers, dates, currencies, and units.
|
|
162
|
+
* @remarks Use standard `GeoIntl` if reactivity is not required.
|
|
163
|
+
* @keywords i18n, intl, reactive, localization, format
|
|
193
164
|
*/
|
|
194
165
|
export declare class GeoIntlRef {
|
|
195
|
-
/**
|
|
196
|
-
* Constructor for GeoIntlRef.
|
|
197
|
-
* @keywords constructor initialize geo intl ref
|
|
198
|
-
*/
|
|
166
|
+
/** Initializes reactive GeoIntl instance with locale code. @keywords constructor, locale */
|
|
199
167
|
constructor(code?: RefOrNormal<string>);
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Format display names for language, region, and script.
|
|
203
|
-
* @keywords display name language region script intl
|
|
204
|
-
*/
|
|
168
|
+
/** Translates language, region, and script display names reactively. @keywords displayNames, translation, locale */
|
|
205
169
|
display(value?: RefOrNormal<string>, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): ComputedRef<string>;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Get display names of language.
|
|
209
|
-
* @keywords language name translate intl
|
|
210
|
-
*/
|
|
170
|
+
/** Returns reactive display name of a language. @keywords language, displayNames, locale */
|
|
211
171
|
languageName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Get display names of region.
|
|
215
|
-
* @keywords country region name intl
|
|
216
|
-
*/
|
|
172
|
+
/** Returns reactive display name of a region or country. @keywords country, region, displayNames, locale */
|
|
217
173
|
countryName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Format a number value.
|
|
221
|
-
* @keywords number format intl digit
|
|
222
|
-
*/
|
|
174
|
+
/** Formats number reactively using locale rules. @keywords numberFormat, format, locale */
|
|
223
175
|
number(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Get the decimal point symbol.
|
|
227
|
-
* @keywords decimal point symbol separator
|
|
228
|
-
*/
|
|
176
|
+
/** Returns decimal point symbol for current locale. @keywords decimal, separator, symbol */
|
|
229
177
|
decimal(): ComputedRef<string>;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Format a currency value.
|
|
233
|
-
* @keywords currency format money price intl
|
|
234
|
-
*/
|
|
178
|
+
/** Formats currency amount reactively. @keywords currency, money, format */
|
|
235
179
|
currency(value: RefOrNormal<NumberOrString>, currencyOptions?: RefOrNormal<string | Intl.NumberFormatOptions>, numberOnly?: boolean): ComputedRef<string>;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Get the currency symbol or code.
|
|
239
|
-
* @keywords currency symbol code intl
|
|
240
|
-
*/
|
|
180
|
+
/** Returns currency symbol or code for specified currency. @keywords currencySymbol, currencyCode */
|
|
241
181
|
currencySymbol(currency: RefOrNormal<string>, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): ComputedRef<string>;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Format a unit value.
|
|
245
|
-
* @keywords unit format measurement intl
|
|
246
|
-
*/
|
|
182
|
+
/** Formats value with measurement unit reactively. @keywords unit, measurement, format */
|
|
247
183
|
unit(value: RefOrNormal<NumberOrString>, unitOptions?: string | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Format a file size value.
|
|
251
|
-
* @keywords size file bytes megabytes intl
|
|
252
|
-
*/
|
|
184
|
+
/** Formats file size in bytes reactively. @keywords fileSize, bytes, format */
|
|
253
185
|
sizeFile(value: RefOrNormal<NumberOrString>, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Format a number as a percentage.
|
|
257
|
-
* @keywords percent percentage format intl
|
|
258
|
-
*/
|
|
186
|
+
/** Formats number as percentage reactively. @keywords percent, percentage, format */
|
|
259
187
|
percent(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Format a number as a percentage by 100.
|
|
263
|
-
* @keywords percent 100 format intl
|
|
264
|
-
*/
|
|
188
|
+
/** Formats number multiplied by 100 as percentage reactively. @keywords percent, percentage, format */
|
|
265
189
|
percentBy100(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Format text based on plural rules and language words.
|
|
269
|
-
* @keywords plural rules words format intl
|
|
270
|
-
*/
|
|
190
|
+
/** Formats string applying locale-sensitive pluralization rules. @param words Format: "one|two|few|many|other|zero" @keywords plural, pluralRules */
|
|
271
191
|
plural(value: RefOrNormal<NumberOrString>, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Format a date and time value.
|
|
275
|
-
* @keywords date time format intl calendar
|
|
276
|
-
*/
|
|
192
|
+
/** Formats date and time reactively. @keywords date, dateTime, format */
|
|
277
193
|
date(value: RefOrNormal<NumberOrStringOrDate>, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): ComputedRef<string>;
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Format relative time.
|
|
281
|
-
* @keywords relative time ago format intl
|
|
282
|
-
*/
|
|
194
|
+
/** Formats relative time reactively. @keywords relativeTime, timeAgo, format */
|
|
283
195
|
relative(value: RefOrNormal<NumberOrStringOrDate>, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): ComputedRef<string>;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Format relative time with a limit falling back to standard date.
|
|
287
|
-
* @keywords relative time limit format intl
|
|
288
|
-
*/
|
|
196
|
+
/** Formats relative time with fallback limit to standard date format. @keywords relativeLimit, relativeTime, fallback */
|
|
289
197
|
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>;
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Format relative time by specific unit and value.
|
|
293
|
-
* @keywords relative value unit time format intl
|
|
294
|
-
*/
|
|
198
|
+
/** Formats relative time from a numerical value and unit. @keywords relativeByValue, relativeTime, unit */
|
|
295
199
|
relativeByValue(value: RefOrNormal<NumberOrString>, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): ComputedRef<string>;
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Get the name of a month.
|
|
299
|
-
* @keywords month name date format intl
|
|
300
|
-
*/
|
|
200
|
+
/** Returns month name reactively. @keywords month, monthName */
|
|
301
201
|
month(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['month']): ComputedRef<string>;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Get an array of all months.
|
|
305
|
-
* @keywords months list array intl
|
|
306
|
-
*/
|
|
202
|
+
/** Returns list of all localized month names. @keywords months, monthList */
|
|
307
203
|
months(style?: Intl.DateTimeFormatOptions['month']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Get the name of a weekday.
|
|
311
|
-
* @keywords weekday name date format intl
|
|
312
|
-
*/
|
|
204
|
+
/** Returns weekday name reactively. @keywords weekday, dayName */
|
|
313
205
|
weekday(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<string>;
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Get an array of all weekdays.
|
|
317
|
-
* @keywords weekdays list array intl
|
|
318
|
-
*/
|
|
206
|
+
/** Returns list of all localized weekday names. @keywords weekdays, weekdayList */
|
|
319
207
|
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
* Format time.
|
|
323
|
-
* @keywords time format intl
|
|
324
|
-
*/
|
|
208
|
+
/** Formats time reactively. @keywords time, timeFormat */
|
|
325
209
|
time(value: RefOrNormal<NumberOrStringOrDate>): ComputedRef<string>;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Sort an array of items taking into account locale specifics.
|
|
329
|
-
* @keywords sort locale array intl
|
|
330
|
-
*/
|
|
210
|
+
/** Sorts array elements taking into account locale collation rules. @keywords sort, collation, localeCompare */
|
|
331
211
|
sort<T>(data: RefOrNormal<T[]>, compareFn?: (a: T, b: T) => [string, string]): ComputedRef<T[]>;
|
|
332
212
|
}
|
|
333
213
|
|
|
334
|
-
import { ComputedRef, Ref } from 'vue';
|
|
335
|
-
import { GeoItemFull } from '@dxtmisha/functional-basic';
|
|
336
|
-
|
|
337
|
-
/** Geo reference reactive manager class @keywords geo ref country language */
|
|
214
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
215
|
+
import { type GeoItemFull } from '@dxtmisha/functional-basic';
|
|
216
|
+
/** Reactive class for geographic and locale data management. @keywords geo, location, country, language, locale */
|
|
338
217
|
export declare class GeoRef {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
218
|
+
/** Returns reactive object with full geographic information. @keywords geo, country, info, ref */
|
|
219
|
+
static get(): Ref<GeoItemFull>;
|
|
220
|
+
/** Returns reactive string with current country code. @keywords country, code, geo */
|
|
221
|
+
static getCountry(): ComputedRef<string>;
|
|
222
|
+
/** Returns reactive string with current language code. @keywords language, code, locale */
|
|
223
|
+
static getLanguage(): ComputedRef<string>;
|
|
224
|
+
/** Returns reactive string with full standard locale format. @keywords standard, locale, format */
|
|
225
|
+
static getStandard(): ComputedRef<string>;
|
|
226
|
+
/** Returns reactive string representing first day of the week. @keywords first day, week, calendar */
|
|
227
|
+
static getFirstDay(): ComputedRef<string>;
|
|
228
|
+
/** Returns reactive string with current location identifier. @keywords location, geo */
|
|
229
|
+
static getLocation(): ComputedRef<string>;
|
|
230
|
+
/** Returns reactive string with current country code from location. @keywords location, country */
|
|
231
|
+
static getLocationCountry(): ComputedRef<string>;
|
|
232
|
+
/** Returns reactive string with current language code from location. @keywords location, language */
|
|
233
|
+
static getLocationLanguage(): ComputedRef<string>;
|
|
234
|
+
/** Updates geographic data by locale or country code. @keywords set, update, locale, geo */
|
|
235
|
+
static set(code: string): void;
|
|
236
|
+
/** Sets default country code value or resolver function. @keywords default, fallback, country */
|
|
237
|
+
static setValueDefault(code?: string | (() => string)): void;
|
|
359
238
|
}
|
|
360
239
|
|
|
361
|
-
import { ComputedRef, Ref } from 'vue';
|
|
362
|
-
import { GeoUnit, NumberOrString } from '@dxtmisha/functional-basic';
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* Reactive class for managing localized unit formatting and automatic conversions.
|
|
366
|
-
* @keywords GeoUnitRef, geo, unit, formatting, conversion, localized
|
|
367
|
-
*/
|
|
240
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
241
|
+
import { GeoUnit, type NumberOrString } from '@dxtmisha/functional-basic';
|
|
242
|
+
/** Reactive manager for localized unit formatting and automatic conversions. @keywords geo, unit, format, localization, vue, reactive */
|
|
368
243
|
export declare class GeoUnitRef {
|
|
369
|
-
/**
|
|
370
|
-
* Creates an instance of GeoUnitRef.
|
|
371
|
-
* @keywords constructor, geo, unit
|
|
372
|
-
*/
|
|
244
|
+
/** Initializes GeoUnitRef with an optional country or locale code. @keywords constructor, locale */
|
|
373
245
|
constructor(code?: RefOrNormal<string>);
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Returns the standard location code.
|
|
377
|
-
* @keywords getLocation, location, code, standard
|
|
378
|
-
*/
|
|
246
|
+
/** Returns the standard location code as a computed reference. @keywords location, locale, computed */
|
|
379
247
|
getLocation(): ComputedRef<string>;
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Formats millimeter value, converting to inches if overridden by locale unit settings.
|
|
383
|
-
* @keywords millimeter, format, length, unit
|
|
384
|
-
*/
|
|
248
|
+
/** Formats millimeter value, converting to inches if required by locale. @keywords millimeter, mm, length, format */
|
|
385
249
|
millimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* Formats centimeter value, converting to inches if overridden by locale unit settings.
|
|
389
|
-
* @keywords centimeter, format, length, unit
|
|
390
|
-
*/
|
|
250
|
+
/** Formats centimeter value, converting to inches if required by locale. @keywords centimeter, cm, length, format */
|
|
391
251
|
centimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* Formats meter value, converting to feet if overridden by locale unit settings.
|
|
395
|
-
* @keywords meter, format, length, unit
|
|
396
|
-
*/
|
|
252
|
+
/** Formats meter value, converting to feet if required by locale. @keywords meter, length, format */
|
|
397
253
|
meter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Formats kilometer value, converting to miles if overridden by locale unit settings.
|
|
401
|
-
* @keywords kilometer, format, length, unit
|
|
402
|
-
*/
|
|
254
|
+
/** Formats kilometer value, converting to miles if required by locale. @keywords kilometer, km, distance, format */
|
|
403
255
|
kilometer(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Formats square meter value, converting to square feet if overridden by locale unit settings.
|
|
407
|
-
* @keywords squareMeter, format, area, unit
|
|
408
|
-
*/
|
|
256
|
+
/** Formats square meter value, converting to square feet if required by locale. @keywords square meter, area, format */
|
|
409
257
|
squareMeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Formats hectare value, converting to acres if overridden by locale unit settings.
|
|
413
|
-
* @keywords hectare, format, area, unit
|
|
414
|
-
*/
|
|
258
|
+
/** Formats hectare value, converting to acres if required by locale. @keywords hectare, area, format */
|
|
415
259
|
hectare(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Formats gram value, converting to ounces if overridden by locale unit settings.
|
|
419
|
-
* @keywords gram, format, mass, weight, unit
|
|
420
|
-
*/
|
|
260
|
+
/** Formats gram value, converting to ounces if required by locale. @keywords gram, weight, mass, format */
|
|
421
261
|
gram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* Formats kilogram value, converting to pounds if overridden by locale unit settings.
|
|
425
|
-
* @keywords kilogram, format, mass, weight, unit
|
|
426
|
-
*/
|
|
262
|
+
/** Formats kilogram value, converting to pounds if required by locale. @keywords kilogram, kg, weight, format */
|
|
427
263
|
kilogram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Formats tonne value, converting to short tons if overridden by locale unit settings.
|
|
431
|
-
* @keywords tonne, format, mass, weight, unit
|
|
432
|
-
*/
|
|
264
|
+
/** Formats tonne value, converting to short tons if required by locale. @keywords tonne, weight, mass, format */
|
|
433
265
|
tonne(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Formats milliliter value, converting to fluid ounces if overridden by locale unit settings.
|
|
437
|
-
* @keywords milliliter, format, volume, unit
|
|
438
|
-
*/
|
|
266
|
+
/** Formats milliliter value, converting to fluid ounces if required by locale. @keywords milliliter, ml, volume, format */
|
|
439
267
|
milliliter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Formats liter value, converting to gallons if overridden by locale unit settings.
|
|
443
|
-
* @keywords liter, format, volume, unit
|
|
444
|
-
*/
|
|
268
|
+
/** Formats liter value, converting to gallons if required by locale. @keywords liter, volume, format */
|
|
445
269
|
liter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* Formats celsius value, converting to fahrenheit if overridden by locale unit settings.
|
|
449
|
-
* @keywords celsius, format, temperature, unit
|
|
450
|
-
*/
|
|
270
|
+
/** Formats celsius value, converting to fahrenheit if required by locale. @keywords celsius, temperature, format */
|
|
451
271
|
celsius(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Formats kilometer per hour value, converting to miles per hour if overridden by locale unit settings.
|
|
455
|
-
* @keywords kilometerPerHour, format, speed, unit
|
|
456
|
-
*/
|
|
272
|
+
/** Formats kilometer per hour value, converting to mph if required by locale. @keywords speed, kilometerPerHour, velocity, format */
|
|
457
273
|
kilometerPerHour(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Formats the value for the specified unit reactively, converting and formatting it according to the locale.
|
|
461
|
-
* @keywords format, unit, conversion, localized
|
|
462
|
-
*/
|
|
274
|
+
/** Reactively formats a value for a specified unit according to locale settings. @keywords format, unit, locale */
|
|
463
275
|
format(value: RefOrNormal<NumberOrString>, unit: RefOrNormal<string>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
464
276
|
}
|
|
465
277
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Class for managing the data list.
|
|
470
|
-
* @keywords list data management collection items
|
|
471
|
-
*/
|
|
278
|
+
/** Reactive data list management with search, focus, selection, and navigation. @keywords list, data, reactive, selection, focus */
|
|
472
279
|
export declare class ListDataRef {
|
|
473
|
-
/**
|
|
474
|
-
* Creates an instance of ListData for managing list data.
|
|
475
|
-
* @keywords list data constructor initialize
|
|
476
|
-
*/
|
|
280
|
+
/** Initializes list data manager with reactive configurations. @keywords constructor, init */
|
|
477
281
|
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);
|
|
478
|
-
/**
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
readonly
|
|
488
|
-
/**
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
readonly
|
|
498
|
-
/**
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
readonly items: ComputedRef<ListList>;
|
|
508
|
-
/**
|
|
509
|
-
* Finds the first element that meets the search conditions.
|
|
510
|
-
* @keywords highlight first item search index
|
|
511
|
-
*/
|
|
512
|
-
readonly highlightFirstItem: ComputedRef<number>;
|
|
513
|
-
/**
|
|
514
|
-
* Is there a selected item.
|
|
515
|
-
* @keywords is selected boolean state
|
|
516
|
-
*/
|
|
517
|
-
readonly isSelected: ComputedRef<boolean>;
|
|
518
|
-
/**
|
|
519
|
-
* Is the minimum selection reached.
|
|
520
|
-
* @keywords is selected min threshold
|
|
521
|
-
*/
|
|
522
|
-
readonly isSelectedMin: ComputedRef<boolean>;
|
|
523
|
-
/**
|
|
524
|
-
* Is the maximum selection reached.
|
|
525
|
-
* @keywords is selected max threshold
|
|
526
|
-
*/
|
|
527
|
-
readonly isSelectedMax: ComputedRef<boolean>;
|
|
528
|
-
/**
|
|
529
|
-
* Returns a list of selected items on the map.
|
|
530
|
-
* @keywords selected list items
|
|
531
|
-
*/
|
|
532
|
-
readonly selectedList: ComputedRef<ListList>;
|
|
533
|
-
/**
|
|
534
|
-
* Returns a list of selected items in the current group.
|
|
535
|
-
* @keywords selected list group items
|
|
536
|
-
*/
|
|
537
|
-
readonly selectedListInGroup: ComputedRef<ListList>;
|
|
538
|
-
/**
|
|
539
|
-
* Returns a list of selected labels on the map.
|
|
540
|
-
* @keywords selected names labels list
|
|
541
|
-
*/
|
|
542
|
-
readonly selectedNames: ComputedRef<ListNames>;
|
|
543
|
-
/**
|
|
544
|
-
* Returns a list of selected values on the map.
|
|
545
|
-
* @keywords selected values list
|
|
546
|
-
*/
|
|
547
|
-
readonly selectedValues: ComputedRef<any[]>;
|
|
548
|
-
/**
|
|
549
|
-
* Checks whether it is necessary to first display a simplified version.
|
|
550
|
-
* @keywords is lite mode check
|
|
551
|
-
*/
|
|
282
|
+
/** Reactive list formatted for display. @keywords data, items, list */
|
|
283
|
+
readonly data: import("vue").ComputedRef<ListList>;
|
|
284
|
+
/** Simplified reactive list for fast rendering. @keywords lite, fast-load */
|
|
285
|
+
readonly liteData: import("vue").ComputedRef<ListList>;
|
|
286
|
+
/** Detailed reactive records including selection and focus state. @keywords full-data, records */
|
|
287
|
+
readonly fullData: import("vue").ComputedRef<ListDataFull>;
|
|
288
|
+
/** Flat map containing all records including sublists. @keywords map, flat */
|
|
289
|
+
readonly map: import("vue").ComputedRef<ListList>;
|
|
290
|
+
/** Flat list containing item-type entries only. @keywords map-items, entries */
|
|
291
|
+
readonly mapItems: import("vue").ComputedRef<ListList>;
|
|
292
|
+
/** Reactive selectable list items. @keywords items, selectable */
|
|
293
|
+
readonly items: import("vue").ComputedRef<ListList>;
|
|
294
|
+
/** Index of first item matching search highlight criteria. @keywords highlight, search-index */
|
|
295
|
+
readonly highlightFirstItem: import("vue").ComputedRef<number>;
|
|
296
|
+
/** Indicates whether any item is currently selected. @keywords selected, check */
|
|
297
|
+
readonly isSelected: import("vue").ComputedRef<boolean>;
|
|
298
|
+
/** Indicates whether minimum selection threshold is satisfied. @keywords min-selection, limit */
|
|
299
|
+
readonly isSelectedMin: import("vue").ComputedRef<boolean>;
|
|
300
|
+
/** Indicates whether maximum selection threshold is reached. @keywords max-selection, limit */
|
|
301
|
+
readonly isSelectedMax: import("vue").ComputedRef<boolean>;
|
|
302
|
+
/** List of currently selected items across full map. @keywords selected-list */
|
|
303
|
+
readonly selectedList: import("vue").ComputedRef<ListList>;
|
|
304
|
+
/** List of currently selected items within active group. @keywords selected-group */
|
|
305
|
+
readonly selectedListInGroup: import("vue").ComputedRef<ListList>;
|
|
306
|
+
/** List of display labels for selected items. @keywords labels, selected-names */
|
|
307
|
+
readonly selectedNames: import("vue").ComputedRef<ListNames>;
|
|
308
|
+
/** Array of raw values for selected items. @keywords values, selected-values */
|
|
309
|
+
readonly selectedValues: import("vue").ComputedRef<any[]>;
|
|
310
|
+
/** Checks if lite rendering mode is enabled. @keywords lite-check */
|
|
552
311
|
isLite(): boolean;
|
|
553
|
-
/**
|
|
554
|
-
* Checks if an element is in focus.
|
|
555
|
-
* @keywords is focus check
|
|
556
|
-
*/
|
|
312
|
+
/** Checks if any item is focused. @keywords focus-check */
|
|
557
313
|
isFocus(): boolean;
|
|
558
|
-
/**
|
|
559
|
-
* Checks if there is a highlighted item (search results).
|
|
560
|
-
* @keywords is highlight check search
|
|
561
|
-
*/
|
|
314
|
+
/** Checks if search highlight matches exist. @keywords highlight-check */
|
|
562
315
|
isHighlight(): boolean;
|
|
563
|
-
/**
|
|
564
|
-
* Checks if highlighting is active (minimum length reached).
|
|
565
|
-
* @keywords is highlight active check
|
|
566
|
-
*/
|
|
316
|
+
/** Checks if search query meets minimum highlight length. @keywords highlight-active */
|
|
567
317
|
isHighlightActive(): boolean;
|
|
568
|
-
/**
|
|
569
|
-
* Returns the number of records in the current list.
|
|
570
|
-
* @keywords get length count list
|
|
571
|
-
*/
|
|
318
|
+
/** Total count of records in current view. @keywords length, count */
|
|
572
319
|
getLength(): number;
|
|
573
|
-
/**
|
|
574
|
-
* Returns the number of all available records in the map.
|
|
575
|
-
* @keywords get length map count
|
|
576
|
-
*/
|
|
320
|
+
/** Total count of all mapped records. @keywords map-length, count */
|
|
577
321
|
getLengthByMap(): number;
|
|
578
|
-
/**
|
|
579
|
-
* Returns the number of all available records (items).
|
|
580
|
-
* @keywords get length items count
|
|
581
|
-
*/
|
|
322
|
+
/** Total count of selectable items. @keywords items-length, count */
|
|
582
323
|
getLengthByItems(): number;
|
|
583
|
-
/**
|
|
584
|
-
* Returns the identifier in focus.
|
|
585
|
-
* @keywords get focus identifier
|
|
586
|
-
*/
|
|
324
|
+
/** Returns identifier of currently focused item. @keywords get-focus */
|
|
587
325
|
getFocus(): ListSelectedItem | undefined;
|
|
588
|
-
/**
|
|
589
|
-
* Returns the item in focus.
|
|
590
|
-
* @keywords get focus item data
|
|
591
|
-
*/
|
|
326
|
+
/** Returns record of currently focused item. @keywords get-focus-item */
|
|
592
327
|
getFocusItem(): ListDataItem | undefined;
|
|
593
|
-
/**
|
|
594
|
-
* Returns the highlight text.
|
|
595
|
-
* @keywords get highlight search text
|
|
596
|
-
*/
|
|
328
|
+
/** Returns active highlight search string. @keywords get-highlight */
|
|
597
329
|
getHighlight(): string | undefined;
|
|
598
|
-
/**
|
|
599
|
-
* Returns the minimum length for highlight to start.
|
|
600
|
-
* @keywords get highlight length start
|
|
601
|
-
*/
|
|
330
|
+
/** Returns minimum query length required to trigger highlight. @keywords highlight-length */
|
|
602
331
|
getHighlightLengthStart(): number;
|
|
603
|
-
/**
|
|
604
|
-
* Returns the selected identifiers list.
|
|
605
|
-
* @keywords get selected list
|
|
606
|
-
*/
|
|
332
|
+
/** Returns list of selected item identifiers. @keywords get-selected */
|
|
607
333
|
getSelected(): ListSelectedList | undefined;
|
|
608
|
-
/**
|
|
609
|
-
* Returns an item by moving a certain number of steps from the selected item.
|
|
610
|
-
* @keywords get selected by step navigation
|
|
611
|
-
*/
|
|
334
|
+
/** Finds selected identifier offset by given step. @keywords selected-step */
|
|
612
335
|
getSelectedByStep(step: number): ListSelectedItem | undefined;
|
|
613
|
-
/**
|
|
614
|
-
* Returns the next item from the selected one.
|
|
615
|
-
* @keywords get selected next item
|
|
616
|
-
*/
|
|
336
|
+
/** Finds next selected identifier. @keywords selected-next */
|
|
617
337
|
getSelectedNext(): ListSelectedItem | undefined;
|
|
618
|
-
/**
|
|
619
|
-
* Returns the previous item from the selected one.
|
|
620
|
-
* @keywords get selected prev item
|
|
621
|
-
*/
|
|
338
|
+
/** Finds previous selected identifier. @keywords selected-prev */
|
|
622
339
|
getSelectedPrev(): ListSelectedItem | undefined;
|
|
623
|
-
/**
|
|
624
|
-
* Returns an item by moving a certain number of steps from the specified item.
|
|
625
|
-
* @keywords get item by step navigation
|
|
626
|
-
*/
|
|
340
|
+
/** Finds item offset by step count relative to given item. @keywords item-step */
|
|
627
341
|
getItemByStep(item: ListDataItem, step: number): ListDataItem | undefined;
|
|
628
|
-
/**
|
|
629
|
-
* Returns the next item from the specified one.
|
|
630
|
-
* @keywords get item next
|
|
631
|
-
*/
|
|
342
|
+
/** Finds next sequential item from given item. @keywords item-next */
|
|
632
343
|
getItemNext(item: ListDataItem): ListDataItem | undefined;
|
|
633
|
-
/**
|
|
634
|
-
* Returns the previous item from the specified one.
|
|
635
|
-
* @keywords get item prev
|
|
636
|
-
*/
|
|
344
|
+
/** Finds previous sequential item from given item. @keywords item-prev */
|
|
637
345
|
getItemPrev(item: ListDataItem): ListDataItem | undefined;
|
|
638
|
-
/**
|
|
639
|
-
* Returns an item by moving a certain number of steps from the specified index.
|
|
640
|
-
* @keywords get index by step navigation
|
|
641
|
-
*/
|
|
346
|
+
/** Finds item offset by step count relative to given index. @keywords index-step */
|
|
642
347
|
getIndexByStep(index: string, step: number): ListDataItem | undefined;
|
|
643
|
-
/**
|
|
644
|
-
* Returns the next item from the specified index.
|
|
645
|
-
* @keywords get index next
|
|
646
|
-
*/
|
|
348
|
+
/** Finds next sequential item after given index. @keywords index-next */
|
|
647
349
|
getIndexNext(index: string): ListDataItem | undefined;
|
|
648
|
-
/**
|
|
649
|
-
* Returns the previous item from the specified index.
|
|
650
|
-
* @keywords get index prev
|
|
651
|
-
*/
|
|
350
|
+
/** Finds previous sequential item before given index. @keywords index-prev */
|
|
652
351
|
getIndexPrev(index: string): ListDataItem | undefined;
|
|
653
|
-
/**
|
|
654
|
-
* Returns an item by its index.
|
|
655
|
-
* @keywords get item by index
|
|
656
|
-
*/
|
|
352
|
+
/** Retrieves item record and key by index identifier. @keywords item-by-index */
|
|
657
353
|
getItemByIndex(index?: string): {
|
|
658
354
|
key: number;
|
|
659
355
|
item: ListDataItem;
|
|
660
356
|
} | undefined;
|
|
661
|
-
/**
|
|
662
|
-
* Returns an item by its key.
|
|
663
|
-
* @keywords get item by key number
|
|
664
|
-
*/
|
|
357
|
+
/** Retrieves item record by numeric key. @keywords item-by-key */
|
|
665
358
|
getItemByKey(key: number): ListDataItem | undefined;
|
|
666
|
-
/**
|
|
667
|
-
* Returns the first item with the specified parent.
|
|
668
|
-
* @keywords get first item by parent
|
|
669
|
-
*/
|
|
359
|
+
/** Retrieves first child item under specified parent. @keywords first-child, parent */
|
|
670
360
|
getFirstItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
671
|
-
/**
|
|
672
|
-
* Returns the last item with the specified parent.
|
|
673
|
-
* @keywords get last item by parent
|
|
674
|
-
*/
|
|
361
|
+
/** Retrieves last child item under specified parent. @keywords last-child, parent */
|
|
675
362
|
getLastItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
676
|
-
/**
|
|
677
|
-
* Returns a sublist object for a group item.
|
|
678
|
-
* @keywords get sub list group item
|
|
679
|
-
*/
|
|
363
|
+
/** Creates sublist manager for group item. @keywords sublist, group */
|
|
680
364
|
getSubList(item: ListDataItem): ListDataRef;
|
|
681
365
|
}
|
|
682
366
|
|
|
683
|
-
import { RouteLocationRaw, Router
|
|
684
|
-
|
|
685
|
-
/**
|
|
686
|
-
* Router management class.
|
|
687
|
-
* @keywords router, navigation, ref, link, href
|
|
688
|
-
*/
|
|
367
|
+
import type { RouteLocationRaw, Router } from 'vue-router';
|
|
368
|
+
/** Router management and navigation utility. @keywords router, navigation, vue-router */
|
|
689
369
|
export declare class RouterItemRef {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
370
|
+
/** Retrieves the active router instance. @keywords router instance, get router */
|
|
371
|
+
static get(): import("vue-router")._RouterClassic;
|
|
372
|
+
/** Resolves and returns a URL link path by route name. @keywords get link, route url, resolve route */
|
|
373
|
+
static getLink(name: string, params?: any, query?: any): string | undefined;
|
|
374
|
+
/** Resolves href properties for a route by name. @keywords get href, link props, route href */
|
|
375
|
+
static getHref(name?: string, params?: any, query?: any): ConstrHrefProps;
|
|
376
|
+
/** Navigates to a target route location. @keywords navigate, router push, route change */
|
|
377
|
+
static push(to: string | RouteLocationRaw): void;
|
|
378
|
+
/** Sets the global router instance. @keywords set router, register router */
|
|
379
|
+
static set(router: Router): void;
|
|
380
|
+
/** Sets the router instance only if it has not been set previously. @keywords set router once, init router */
|
|
381
|
+
static setOneTime(router: Router): void;
|
|
382
|
+
/** Converts a raw route location into href properties. @keywords raw to href, route location, href builder */
|
|
383
|
+
static rawToHref(to?: string | RouteLocationRaw): ConstrHrefProps;
|
|
704
384
|
}
|
|
705
385
|
|
|
706
|
-
import {
|
|
386
|
+
import type { ComputedRef, Ref } from 'vue';
|
|
707
387
|
|
|
708
|
-
/**
|
|
388
|
+
/** Reactive scrollbar width tracker @keywords scrollbar, width, reactive, vue */
|
|
709
389
|
export declare class ScrollbarWidthRef {
|
|
710
|
-
/** Reactive
|
|
711
|
-
readonly item: Ref<boolean | undefined
|
|
712
|
-
/** Reactive scrollbar width
|
|
713
|
-
readonly width: Ref<number
|
|
714
|
-
/**
|
|
390
|
+
/** Reactive state indicating measurement activity @keywords reactive, state */
|
|
391
|
+
readonly item: Ref<boolean | undefined>;
|
|
392
|
+
/** Reactive scrollbar width in pixels @keywords reactive, width, scrollbar */
|
|
393
|
+
readonly width: Ref<number>;
|
|
394
|
+
/** Initializes the reactive scrollbar width tracker @keywords constructor, init */
|
|
715
395
|
constructor();
|
|
716
|
-
/**
|
|
396
|
+
/** Computed flag indicating if scrollbar width is measured and defined @keywords computed, check */
|
|
717
397
|
readonly is: ComputedRef<boolean>;
|
|
718
398
|
}
|
|
719
399
|
|
|
720
|
-
import { ApiInstance, ApiData, ApiDataValidation, ApiErrorStorageList } from '@dxtmisha/functional-basic';
|
|
721
|
-
|
|
400
|
+
import { type ApiInstance, type ApiData, type ApiDataValidation, type ApiErrorStorageList } from '@dxtmisha/functional-basic';
|
|
722
401
|
/**
|
|
723
|
-
* Asynchronous reactive composable for API requests with built-in SSR support.
|
|
724
|
-
* @keywords api,
|
|
402
|
+
* Asynchronous reactive composable for API requests with built-in SSR pre-fetching support.
|
|
403
|
+
* @keywords api, composable, ssr, prefetch, useApiAsyncRef, useApiRef, reactive, fetch
|
|
404
|
+
* @example
|
|
405
|
+
* ```typescript
|
|
406
|
+
* const { data, loading, errorItem } = useApiAsyncRef('/users/1', { method: 'GET' });
|
|
407
|
+
* ```
|
|
408
|
+
* @param path Request path (string, Ref, or Getter)
|
|
409
|
+
* @param options Request options and headers
|
|
410
|
+
* @param reactivity Auto-refetch when reactive dependencies change
|
|
411
|
+
* @param conditions Execution conditions (waits until true)
|
|
412
|
+
* @param transformation Transforms received response data
|
|
413
|
+
* @param validateResponseContract Validates response data contract
|
|
414
|
+
* @param errorContract Predefined expected error contracts
|
|
415
|
+
* @param unmounted Aborts request and clears cache when component unmounts
|
|
416
|
+
* @param apiInstance Custom Api instance
|
|
725
417
|
*/
|
|
726
418
|
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>;
|
|
727
419
|
|
|
728
|
-
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
729
|
-
import { Ref } from 'vue';
|
|
730
|
-
|
|
420
|
+
import { type ApiData, type ApiFetch } from '@dxtmisha/functional-basic';
|
|
731
421
|
export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
732
422
|
}
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* Executes a DELETE request via the API.
|
|
736
|
-
* @keywords api delete request setup composable
|
|
737
|
-
*/
|
|
423
|
+
/** Wrapper over `useApiRequest` pre-configured for DELETE HTTP requests. @keywords api, delete, fetch, request, http */
|
|
738
424
|
export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiDeleteSetup<T, Request, Return>): {
|
|
739
|
-
loading: Ref<boolean, boolean>;
|
|
425
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
740
426
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
741
427
|
};
|
|
742
428
|
|
|
743
|
-
|
|
429
|
+
import { type ApiData, type ApiFetch } from '@dxtmisha/functional-basic';
|
|
430
|
+
/** Setup options for API GET request. @keywords api, get, request, setup */
|
|
744
431
|
export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
745
432
|
}
|
|
746
|
-
|
|
747
|
-
/** Executes an API GET request with loading state and send method @keywords api get request wrapper */
|
|
433
|
+
/** Wrapper over `useApiRequest` pre-configured for GET requests. @keywords api, get, fetch, request, query */
|
|
748
434
|
export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiGetSetup<T, Request, Return>): {
|
|
749
|
-
loading: Ref<boolean, boolean>;
|
|
435
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
750
436
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
751
437
|
};
|
|
752
438
|
|
|
753
|
-
import { ApiInstance, ArrayToItem, FormattersListColumns, FormattersOptionsList, SearchColumns
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* Asynchronous reactive composable for API management requests with SSR support.
|
|
758
|
-
* @keywords api management async ssr composable fetch
|
|
759
|
-
*/
|
|
439
|
+
import { type ApiInstance, type ArrayToItem, type FormattersListColumns, type FormattersOptionsList, type SearchColumns } from '@dxtmisha/functional-basic';
|
|
440
|
+
/** Asynchronous reactive composable for API management requests with SSR prefetching. @keywords api, management, ssr, reactive, fetch, composable */
|
|
760
441
|
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): {
|
|
761
|
-
isValid: ComputedRef<boolean>;
|
|
762
|
-
isResponseContractValid: ComputedRef<boolean>;
|
|
763
|
-
responseValidationResult: ComputedRef<
|
|
764
|
-
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
765
|
-
readonly data: ComputedRef<
|
|
766
|
-
errorItem: ComputedRef<
|
|
767
|
-
readonly length: ComputedRef<number>;
|
|
768
|
-
lengthData: ComputedRef<number>;
|
|
769
|
-
starting: ComputedRef<boolean>;
|
|
770
|
-
reading: Ref<boolean, boolean>;
|
|
771
|
-
loading: Ref<boolean, boolean>;
|
|
772
|
-
loadingSearch: Ref<boolean, boolean> | undefined;
|
|
773
|
-
loadingPost: Ref<boolean, boolean> | undefined;
|
|
774
|
-
loadingPut: Ref<boolean, boolean> | undefined;
|
|
775
|
-
loadingDelete: Ref<boolean, boolean> | undefined;
|
|
776
|
-
isSearch: ComputedRef<boolean> | undefined;
|
|
777
|
-
search: Ref<string>;
|
|
442
|
+
isValid: import("vue").ComputedRef<boolean>;
|
|
443
|
+
isResponseContractValid: import("vue").ComputedRef<boolean>;
|
|
444
|
+
responseValidationResult: import("vue").ComputedRef<import("@dxtmisha/functional-basic").ApiDataValidation | undefined>;
|
|
445
|
+
list: import("vue").ComputedRef<import("@dxtmisha/functional-basic").SearchFormatList<ItemFormatters, Columns>>;
|
|
446
|
+
readonly data: import("vue").ComputedRef<import("@dxtmisha/functional-basic").ApiData<Return> | undefined>;
|
|
447
|
+
errorItem: import("vue").ComputedRef<import("@dxtmisha/functional-basic").ApiErrorItem | undefined>;
|
|
448
|
+
readonly length: import("vue").ComputedRef<number>;
|
|
449
|
+
lengthData: import("vue").ComputedRef<number>;
|
|
450
|
+
starting: import("vue").ComputedRef<boolean>;
|
|
451
|
+
reading: import("vue").Ref<boolean, boolean>;
|
|
452
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
453
|
+
loadingSearch: import("vue").Ref<boolean, boolean> | undefined;
|
|
454
|
+
loadingPost: import("vue").Ref<boolean, boolean> | undefined;
|
|
455
|
+
loadingPut: import("vue").Ref<boolean, boolean> | undefined;
|
|
456
|
+
loadingDelete: import("vue").Ref<boolean, boolean> | undefined;
|
|
457
|
+
isSearch: import("vue").ComputedRef<boolean> | undefined;
|
|
458
|
+
search: import("vue").Ref<string>;
|
|
778
459
|
init: () => void;
|
|
779
460
|
initSsr: () => void;
|
|
780
461
|
reset: () => Promise<void>;
|
|
781
462
|
abort: () => void;
|
|
782
|
-
sendPost: (request?: ApiFetch["request"]) => Promise<
|
|
783
|
-
sendPut: (request?: ApiFetch["request"]) => Promise<
|
|
784
|
-
sendDelete: (request?: ApiFetch["request"]) => Promise<
|
|
463
|
+
sendPost: (request?: import("@dxtmisha/functional-basic").ApiFetch["request"]) => Promise<import("@dxtmisha/functional-basic").ApiData<Post> | undefined>;
|
|
464
|
+
sendPut: (request?: import("@dxtmisha/functional-basic").ApiFetch["request"]) => Promise<import("@dxtmisha/functional-basic").ApiData<Put> | undefined>;
|
|
465
|
+
sendDelete: (request?: import("@dxtmisha/functional-basic").ApiFetch["request"]) => Promise<import("@dxtmisha/functional-basic").ApiData<Delete> | undefined>;
|
|
785
466
|
};
|
|
786
467
|
|
|
787
|
-
import {
|
|
788
|
-
import {
|
|
468
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
469
|
+
import {
|
|
470
|
+
type ApiData,
|
|
471
|
+
type ApiDataValidation,
|
|
472
|
+
type ApiErrorItem,
|
|
473
|
+
type ApiFetch,
|
|
474
|
+
type ApiInstance,
|
|
475
|
+
type ArrayToItem,
|
|
476
|
+
type FormattersListColumns,
|
|
477
|
+
type FormattersOptionsList,
|
|
478
|
+
type SearchColumns,
|
|
479
|
+
type SearchFormatList
|
|
480
|
+
} from '@dxtmisha/functional-basic';
|
|
789
481
|
|
|
790
482
|
/**
|
|
791
|
-
*
|
|
792
|
-
* @
|
|
483
|
+
* Orchestrates API requests, data loading (GET), list formatting, client-side search, and mutations (POST, PUT, DELETE).
|
|
484
|
+
* @note Recommended for use with `executeUse` for centralized state management.
|
|
485
|
+
* @remarks
|
|
486
|
+
* Data formatting guidelines for `formattersOptions`:
|
|
487
|
+
* - Recommended: values (prices, counts), dates, currency, units, statuses.
|
|
488
|
+
* - Not recommended: technical identifiers (ID, UUID, internal codes).
|
|
489
|
+
* @example
|
|
490
|
+
* const products = useApiManagementRef(
|
|
491
|
+
* { path: '/api/v1/products', skeleton: () => Array(5).fill({ id: 0, name: 'Loading...', price: 0 }) },
|
|
492
|
+
* { price: (v) => `${v} USD`, created_at: (v) => new Date(v).toLocaleDateString() },
|
|
493
|
+
* { columns: ['name', 'category'] },
|
|
494
|
+
* { path: '/api/v1/products' },
|
|
495
|
+
* { path: (data) => `/api/v1/products/${data.id}` },
|
|
496
|
+
* { path: (data) => `/api/v1/products/${data.id}` }
|
|
497
|
+
* );
|
|
498
|
+
* @keywords api, management, fetch, mutations, search, formatters, reactive
|
|
793
499
|
*/
|
|
794
|
-
export declare function useApiManagementRef<
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
500
|
+
export declare function useApiManagementRef<
|
|
501
|
+
Return extends ApiManagementValue,
|
|
502
|
+
FormattersOptions extends FormattersOptionsList,
|
|
503
|
+
Post extends Record<string, any>,
|
|
504
|
+
Put extends Record<string, any>,
|
|
505
|
+
Delete extends Record<string, any>,
|
|
506
|
+
Type extends ApiManagementValue = Return,
|
|
507
|
+
Item extends ArrayToItem<Return> = ArrayToItem<Return>,
|
|
508
|
+
ItemFormatters extends FormattersListColumns<Item, FormattersOptions>[number] = FormattersListColumns<Item, FormattersOptions>[number],
|
|
509
|
+
Columns extends SearchColumns<ItemFormatters> = []
|
|
510
|
+
>(
|
|
511
|
+
propsGet: ApiManagementGet<Return, Type>,
|
|
512
|
+
formattersOptions?: FormattersOptions,
|
|
513
|
+
searchOptions?: ApiManagementSearch<Item, Columns>,
|
|
514
|
+
postRequest?: ApiManagementRequest<Post>,
|
|
515
|
+
putRequest?: ApiManagementRequest<Put>,
|
|
516
|
+
deleteRequest?: ApiManagementRequest<Delete>,
|
|
517
|
+
action?: () => Promise<void> | void,
|
|
518
|
+
apiInstance?: ApiInstance
|
|
519
|
+
): {
|
|
520
|
+
/** Whether data passed type verification check. @keywords valid, validation */
|
|
521
|
+
isValid: ComputedRef<boolean>;
|
|
522
|
+
/** Status of response contract validation. @keywords contract, validation */
|
|
523
|
+
isResponseContractValid: ComputedRef<boolean>;
|
|
524
|
+
/** Result of response schema validation. @keywords response, validation, result */
|
|
525
|
+
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
526
|
+
/** Processed data array with skeleton, formatters, and search applied. @keywords list, formatted, search */
|
|
527
|
+
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
528
|
+
/** Raw reactive response data. @keywords raw data, response */
|
|
529
|
+
readonly data: ComputedRef<ApiData<Return> | undefined>;
|
|
530
|
+
/** Current request error item. @keywords error */
|
|
531
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
532
|
+
/** Current number of items in filtered list. @keywords length, count */
|
|
533
|
+
readonly length: ComputedRef<number>;
|
|
534
|
+
/** Total number of items in raw data. @keywords total length, raw count */
|
|
535
|
+
lengthData: ComputedRef<number>;
|
|
536
|
+
/** Initial loading flag before data is first fetched. @keywords starting, initial load */
|
|
537
|
+
starting: ComputedRef<boolean>;
|
|
538
|
+
/** Active read operation flag. @keywords reading, fetching */
|
|
539
|
+
reading: Ref<boolean, boolean>;
|
|
540
|
+
/** Loading state for the main GET request. @keywords loading, state */
|
|
541
|
+
loading: Ref<boolean, boolean>;
|
|
542
|
+
/** Loading state during search processing. @keywords search loading */
|
|
543
|
+
loadingSearch: Ref<boolean, boolean> | undefined;
|
|
544
|
+
/** Loading state for POST mutation. @keywords post loading */
|
|
545
|
+
loadingPost: Ref<boolean, boolean> | undefined;
|
|
546
|
+
/** Loading state for PUT mutation. @keywords put loading */
|
|
547
|
+
loadingPut: Ref<boolean, boolean> | undefined;
|
|
548
|
+
/** Loading state for DELETE mutation. @keywords delete loading */
|
|
549
|
+
loadingDelete: Ref<boolean, boolean> | undefined;
|
|
550
|
+
/** Indicates whether search filter is active. @keywords is search, searching */
|
|
551
|
+
isSearch: ComputedRef<boolean> | undefined;
|
|
552
|
+
/** Reactive search query string proxy. @keywords search query */
|
|
553
|
+
search: Ref<string>;
|
|
554
|
+
/** Manually initializes API request. @keywords init, manual init */
|
|
555
|
+
init: () => void;
|
|
556
|
+
/** Initializes API request for SSR. @keywords ssr init */
|
|
557
|
+
initSsr: () => void;
|
|
558
|
+
/** Resets GET request and clears state. @keywords reset, reload */
|
|
559
|
+
reset: () => Promise<void>;
|
|
560
|
+
/** Aborts active network request. @keywords abort, cancel */
|
|
561
|
+
abort: () => void;
|
|
562
|
+
/** Executes POST mutation request. @keywords send post, create */
|
|
563
|
+
sendPost: (request?: ApiFetch['request']) => Promise<ApiData<Post> | undefined>;
|
|
564
|
+
/** Executes PUT mutation request. @keywords send put, update */
|
|
565
|
+
sendPut: (request?: ApiFetch['request']) => Promise<ApiData<Put> | undefined>;
|
|
566
|
+
/** Executes DELETE mutation request. @keywords send delete, remove */
|
|
567
|
+
sendDelete: (request?: ApiFetch['request']) => Promise<ApiData<Delete> | undefined>;
|
|
826
568
|
};
|
|
827
569
|
|
|
828
|
-
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
829
|
-
import { Ref } from 'vue';
|
|
830
|
-
|
|
831
|
-
/**
|
|
832
|
-
* Setup interface for API POST request.
|
|
833
|
-
* @keywords api, post, setup, request
|
|
834
|
-
*/
|
|
570
|
+
import { type ApiData, type ApiFetch } from '@dxtmisha/functional-basic';
|
|
835
571
|
export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
836
572
|
}
|
|
837
|
-
|
|
838
|
-
/**
|
|
839
|
-
* Executes a POST request using the API.
|
|
840
|
-
* @keywords api, post, request, send
|
|
841
|
-
*/
|
|
573
|
+
/** Composable wrapper over useApiRequest pre-configured for HTTP POST requests. @keywords api, post, http, fetch, request */
|
|
842
574
|
export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPostSetup<T, Request, Return>): {
|
|
843
|
-
loading: Ref<boolean, boolean>;
|
|
575
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
844
576
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
845
577
|
};
|
|
846
578
|
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
}
|
|
850
|
-
|
|
579
|
+
import { type ApiData, type ApiFetch } from '@dxtmisha/functional-basic';
|
|
580
|
+
|
|
581
|
+
export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {}
|
|
582
|
+
|
|
583
|
+
/** Setup and execute API PUT request with reactive loading state. @keywords api, put, request, fetch, http, vue */
|
|
851
584
|
export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPutSetup<T, Request, Return>): {
|
|
852
|
-
loading: Ref<boolean, boolean>;
|
|
585
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
853
586
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
854
587
|
};
|
|
855
588
|
|
|
856
|
-
import { ComputedRef, Ref } from 'vue';
|
|
857
|
-
import { ApiInstance, ApiData, ApiDataValidation, ApiErrorStorageList, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
589
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
590
|
+
import { type ApiInstance, type ApiData, type ApiDataValidation, type ApiErrorStorageList, ApiErrorItem, type ApiOptions, type RefOrNormal, type RefType } from '@dxtmisha/functional-basic';
|
|
858
591
|
|
|
859
592
|
export interface UseApiRef<R> {
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
init(): void;
|
|
888
|
-
/** @keywords init, ssr */
|
|
889
|
-
initSsr(): void;
|
|
890
|
-
/** @keywords reset */
|
|
891
|
-
reset(): Promise<void>;
|
|
892
|
-
/** @keywords stop */
|
|
893
|
-
stop(): void;
|
|
894
|
-
/** @keywords abort */
|
|
895
|
-
abort(): void;
|
|
593
|
+
data: ComputedRef<ApiData<R> | undefined>;
|
|
594
|
+
item: Ref<ApiData<R> | undefined>;
|
|
595
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
596
|
+
isResponseContractValid: ComputedRef<boolean>;
|
|
597
|
+
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
598
|
+
length: ComputedRef<number>;
|
|
599
|
+
starting: ComputedRef<boolean>;
|
|
600
|
+
loading: Ref<boolean>;
|
|
601
|
+
reading: Ref<boolean>;
|
|
602
|
+
/** Checks if the request is starting @keywords starting, status */
|
|
603
|
+
isStarting(): boolean;
|
|
604
|
+
/** Checks if the request is currently loading @keywords loading, status */
|
|
605
|
+
isLoading(): boolean;
|
|
606
|
+
/** Checks if the request is currently reading @keywords reading, status */
|
|
607
|
+
isReading(): boolean;
|
|
608
|
+
/** Gets current item data @keywords data, get */
|
|
609
|
+
getItem(): ApiData<R> | undefined;
|
|
610
|
+
/** Performs manual request initialization @keywords init, start */
|
|
611
|
+
init(): void;
|
|
612
|
+
/** Performs SSR request initialization @keywords ssr, init */
|
|
613
|
+
initSsr(): void;
|
|
614
|
+
/** Resets request state and data @keywords reset */
|
|
615
|
+
reset(): Promise<void>;
|
|
616
|
+
/** Stops the active request @keywords stop */
|
|
617
|
+
stop(): void;
|
|
618
|
+
/** Aborts the active request @keywords abort, cancel */
|
|
619
|
+
abort(): void;
|
|
896
620
|
}
|
|
897
621
|
|
|
898
|
-
/**
|
|
622
|
+
/**
|
|
623
|
+
* Main reactive composable for working with API requests in Vue, handling reactivity, SSR, caching, validation, and error management.
|
|
624
|
+
* @keywords api, fetch, request, composable, vue, query
|
|
625
|
+
* @example
|
|
626
|
+
* ```typescript
|
|
627
|
+
* const { data, loading, errorItem } = useApiRef('/users/1', { method: 'GET' });
|
|
628
|
+
* ```
|
|
629
|
+
* @param path Request endpoint path, Ref, or getter
|
|
630
|
+
* @param options Request options (headers, method, body, etc.)
|
|
631
|
+
* @param reactivity Automatically re-fetch when reactive dependencies change
|
|
632
|
+
* @param conditions Execution conditions (request waits until evaluated to true)
|
|
633
|
+
* @param transformation Transforms received response data
|
|
634
|
+
* @param validateResponseContract Validates response data contract
|
|
635
|
+
* @param errorContract Predefined error contracts for error handling
|
|
636
|
+
* @param unmounted Stops request and clears cached data when component unmounts
|
|
637
|
+
* @param apiInstance Custom Api instance
|
|
638
|
+
*/
|
|
899
639
|
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>;
|
|
900
640
|
|
|
901
|
-
/**
|
|
641
|
+
/**
|
|
642
|
+
* Defines global conditions for executing API requests.
|
|
643
|
+
* @keywords api, global, conditions
|
|
644
|
+
* @param conditions Conditions evaluated before request execution
|
|
645
|
+
*/
|
|
902
646
|
export declare const setApiRefGlobalConditions: (conditions: RefType<any>) => void;
|
|
903
647
|
|
|
904
|
-
import { ApiInstance, ApiMethodItem, ApiData, ApiFetch, ApiErrorStorageList, ApiDataValidation } from '@dxtmisha/functional-basic';
|
|
905
|
-
import { Ref } from 'vue';
|
|
648
|
+
import { type ApiInstance, ApiMethodItem, type ApiData, type ApiFetch, type ApiErrorStorageList, type ApiDataValidation } from '@dxtmisha/functional-basic';
|
|
906
649
|
|
|
907
|
-
/**
|
|
650
|
+
/** API request setup configuration options. @keywords api, request, setup, options */
|
|
908
651
|
export interface UseApiRequestSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> {
|
|
909
|
-
/**
|
|
652
|
+
/** Endpoint path or reactive ref. */
|
|
910
653
|
path?: RefOrNormal<string | undefined>;
|
|
911
|
-
/** HTTP method
|
|
654
|
+
/** HTTP method. Defaults to POST. */
|
|
912
655
|
method?: ApiMethodItem;
|
|
913
|
-
/**
|
|
656
|
+
/** Callback executed upon successful request completion. */
|
|
914
657
|
action?: (data: Return | undefined) => Promise<void> | void;
|
|
915
|
-
/**
|
|
658
|
+
/** Transforms raw response data before returning. */
|
|
916
659
|
transformation?: (data: T) => Return;
|
|
917
|
-
/**
|
|
660
|
+
/** Validates request payload contract. */
|
|
918
661
|
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
919
|
-
/**
|
|
662
|
+
/** Validates response data contract. */
|
|
920
663
|
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
921
|
-
/**
|
|
664
|
+
/** Expected error contracts list for centralized handling. */
|
|
922
665
|
errorContract?: ApiErrorStorageList;
|
|
923
|
-
/**
|
|
666
|
+
/** Extracts nested 'data' field from response envelope. Defaults to true. */
|
|
924
667
|
toData?: boolean;
|
|
925
|
-
/** Additional request options.
|
|
668
|
+
/** Additional request options. */
|
|
926
669
|
options?: ApiOptions;
|
|
927
|
-
/** Custom Api instance.
|
|
670
|
+
/** Custom Api instance. Defaults to global singleton. */
|
|
928
671
|
apiInstance?: ApiInstance;
|
|
929
672
|
}
|
|
930
673
|
|
|
931
|
-
/**
|
|
674
|
+
/** Composable for managing and executing API requests with loading state. @keywords api, request, fetch, composable */
|
|
932
675
|
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>): {
|
|
933
|
-
/**
|
|
934
|
-
loading: Ref<boolean, boolean>;
|
|
935
|
-
/**
|
|
676
|
+
/** Reactive loading state indicator. */
|
|
677
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
678
|
+
/** Executes the API request. @keywords send, execute, call */
|
|
936
679
|
send(request?: Request): Promise<Return | undefined>;
|
|
937
680
|
};
|
|
938
681
|
|
|
939
|
-
import { Ref } from 'vue';
|
|
682
|
+
import { type Ref } from 'vue';
|
|
940
683
|
|
|
941
684
|
type BroadcastValueItem<T> = T | string | undefined;
|
|
942
685
|
|
|
943
|
-
/**
|
|
944
|
-
* Creates a reactive variable to manage data between browser tabs.
|
|
945
|
-
* @keywords broadcast value ref tabs reactive
|
|
946
|
-
* @param name value name
|
|
947
|
-
* @param defaultValue default value
|
|
948
|
-
*/
|
|
686
|
+
/** Creates a reactive ref synchronized across browser tabs. @param name Channel/storage key name @param defaultValue Initial value or factory function @keywords broadcast channel sync cross tab reactive state */
|
|
949
687
|
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<BroadcastValueItem<T>>;
|
|
950
688
|
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
import { CookieOptions } from '@dxtmisha/functional-basic';
|
|
955
|
-
|
|
956
|
-
/**
|
|
957
|
-
* Creates a reactive variable to manage cookies.
|
|
958
|
-
* @keywords cookie, ref, reactive, storage, useCookieRef
|
|
959
|
-
*/
|
|
689
|
+
import { type Ref } from 'vue';
|
|
690
|
+
import { type CookieOptions } from '@dxtmisha/functional-basic';
|
|
691
|
+
/** Creates a reactive Vue ref synchronized with browser cookies. @param name Cookie name @param defaultValue Initial fallback value or getter function @param options Cookie configuration options @keywords cookie reactive state storage vue ref useCookieRef */
|
|
960
692
|
export declare function useCookieRef<T>(name: string, defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): Ref<T | string | undefined>;
|
|
961
693
|
|
|
962
|
-
import { FormattersListProp, FormattersOptionsList, FormattersReturn } from '@dxtmisha/functional-basic';
|
|
963
|
-
import { ComputedRef } from 'vue';
|
|
694
|
+
import { type FormattersListProp, type FormattersOptionsList, type FormattersReturn } from '@dxtmisha/functional-basic';
|
|
964
695
|
|
|
965
|
-
/**
|
|
966
|
-
* Reactively formats a list of data based on provided formatting options.
|
|
967
|
-
* @keywords useFormattersRef formatters list reactive
|
|
968
|
-
*/
|
|
696
|
+
/** Reactively formats data lists based on property rules. @keywords format, list, reactive, transform */
|
|
969
697
|
export declare function useFormattersRef<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp>(list: RefType<List | undefined>, options: Options): {
|
|
970
|
-
/** Formatted data list. @keywords list
|
|
971
|
-
listFormat: ComputedRef<FormattersReturn<List, Options>>;
|
|
972
|
-
/**
|
|
973
|
-
length: ComputedRef<number>;
|
|
698
|
+
/** Formatted reactive data list. @keywords formatted list */
|
|
699
|
+
listFormat: import("vue").ComputedRef<FormattersReturn<List, Options>>;
|
|
700
|
+
/** Total count of records in the list. @keywords length, count */
|
|
701
|
+
length: import("vue").ComputedRef<number>;
|
|
974
702
|
};
|
|
975
703
|
|
|
976
|
-
/** Returns a class object for working with data formatting. @keywords geo intl format ref */
|
|
977
|
-
export declare function useGeoIntlRef(): GeoIntlRef;
|
|
978
|
-
|
|
979
704
|
/**
|
|
980
|
-
* Returns a
|
|
981
|
-
* @
|
|
705
|
+
* Returns a reactive instance for working with internationalization and data formatting.
|
|
706
|
+
* @remarks Avoid using this reactive composable if reactive updates are not required; use non-reactive `GeoIntl` instead.
|
|
707
|
+
* @keywords geointl, intl, format, localization, i18n, reactive
|
|
982
708
|
*/
|
|
983
|
-
export declare function
|
|
709
|
+
export declare function useGeoIntlRef(): GeoIntlRef;
|
|
984
710
|
|
|
985
|
-
|
|
711
|
+
/** Provides unit formatting and automatic conversion reference. @keywords geo unit conversion format measurement */
|
|
712
|
+
export declare function useGeoUnitRef(): GeoUnitRef;
|
|
986
713
|
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
* @keywords useHashRef hash reactive variable state url
|
|
990
|
-
* @param name value name
|
|
991
|
-
* @param defaultValue default value
|
|
992
|
-
*/
|
|
714
|
+
import { type ShallowRef } from 'vue';
|
|
715
|
+
/** Creates a reactive shallow reference synchronized with the URL hash. @keywords hash reactive url state shallowRef */
|
|
993
716
|
export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
994
717
|
|
|
995
718
|
export type LazyItemByMargin = {
|
|
996
719
|
rootMargin: string;
|
|
997
720
|
item: ReturnType<typeof useLazyRef>;
|
|
998
721
|
};
|
|
999
|
-
/**
|
|
1000
|
-
* Hook for tracking element visibility by margin.
|
|
1001
|
-
* @keywords useLazyItemByMarginRef, lazy, observer, margin
|
|
1002
|
-
*/
|
|
722
|
+
/** Initializes element visibility tracking based on root margin. @keywords lazy loading, intersection observer, viewport, margin tracking */
|
|
1003
723
|
export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin?: string) => {
|
|
1004
|
-
/** Lazy item status */
|
|
1005
|
-
lazyItemStatus: ShallowRef<boolean, boolean>;
|
|
1006
|
-
/** Tracked lazy item instance */
|
|
724
|
+
/** Lazy item visibility status. */
|
|
725
|
+
lazyItemStatus: import("vue").ShallowRef<boolean, boolean>;
|
|
726
|
+
/** Tracked lazy item instance. */
|
|
1007
727
|
readonly lazyItem: LazyItem | undefined;
|
|
1008
728
|
};
|
|
1009
729
|
|
|
1010
|
-
import { Ref, ShallowRef } from 'vue';
|
|
1011
|
-
|
|
730
|
+
import { type Ref, type ShallowRef } from 'vue';
|
|
1012
731
|
export type LazyItem = {
|
|
1013
732
|
status: ShallowRef<boolean>;
|
|
1014
733
|
ratio: ShallowRef<number>;
|
|
1015
734
|
entry: ShallowRef<IntersectionObserverEntry | undefined>;
|
|
1016
735
|
stopWatch: () => void;
|
|
1017
736
|
};
|
|
1018
|
-
|
|
1019
737
|
export type LazyList = Record<string, LazyItem>;
|
|
1020
|
-
|
|
1021
|
-
/**
|
|
1022
|
-
* Initializes lazy reference tracking using Intersection Observer.
|
|
1023
|
-
* @keywords useLazyRef, lazy, observer, intersection, ref
|
|
1024
|
-
*/
|
|
738
|
+
/** Initializes tracking of element visibility using IntersectionObserver. @keywords intersection observer, lazy loading, visibility tracking, viewport */
|
|
1025
739
|
export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
1026
740
|
intersectionObserver: IntersectionObserver | undefined;
|
|
1027
|
-
/**
|
|
1028
|
-
* Gets lazy item by element.
|
|
1029
|
-
* @keywords getItem, lazy, element
|
|
1030
|
-
*/
|
|
741
|
+
/** Retrieves tracked state for an element. @keywords get lazy item, tracking state */
|
|
1031
742
|
getItem(element?: HTMLElement): LazyItem | undefined;
|
|
1032
|
-
/**
|
|
1033
|
-
* Adds an element for lazy tracking.
|
|
1034
|
-
* @keywords addLazyItem, lazy, track
|
|
1035
|
-
*/
|
|
743
|
+
/** Registers an element for visibility tracking and returns its visibility status ref. @keywords add lazy item, observe, viewport visibility */
|
|
1036
744
|
addLazyItem(element: Ref<HTMLElement | undefined>): ShallowRef<boolean, boolean>;
|
|
1037
|
-
/**
|
|
1038
|
-
* Removes an element from lazy tracking.
|
|
1039
|
-
* @keywords removeLazyItem, lazy, remove
|
|
1040
|
-
*/
|
|
745
|
+
/** Removes a specific element from tracking. @keywords remove lazy item, unobserve */
|
|
1041
746
|
removeLazyItem: (element?: HTMLElement) => void;
|
|
1042
|
-
/**
|
|
1043
|
-
* Disconnects lazy observer.
|
|
1044
|
-
* @keywords disconnectLazy, lazy, observer
|
|
1045
|
-
*/
|
|
747
|
+
/** Disconnects the observer and removes all tracked elements. @keywords disconnect, stop observing, clear lazy items */
|
|
1046
748
|
disconnectLazy: () => void | undefined;
|
|
1047
749
|
};
|
|
1048
750
|
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
/**
|
|
1052
|
-
* Returns the global loading status reference.
|
|
1053
|
-
* @keywords useLoadingRef, loading, status, ref
|
|
1054
|
-
*/
|
|
1055
|
-
export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
|
|
751
|
+
/** Returns a shallow reactive reference for the loading status. @keywords loading state, shallow ref, progress, status */
|
|
752
|
+
export declare function useLoadingRef(): import("vue").ShallowRef<boolean, boolean>;
|
|
1056
753
|
|
|
1057
|
-
import {
|
|
754
|
+
import { Meta, MetaRobots } from '@dxtmisha/functional-basic';
|
|
1058
755
|
import { Ref } from 'vue';
|
|
1059
756
|
|
|
1060
|
-
/**
|
|
1061
|
-
* Vue composable for reactive meta tags management.
|
|
1062
|
-
* @keywords use_meta meta tags management seo vue
|
|
1063
|
-
*/
|
|
757
|
+
/** Reactive meta tag management composable with automatic DOM synchronization. @keywords useMeta, meta, seo, head, open graph */
|
|
1064
758
|
export declare const useMeta: () => Readonly<{
|
|
1065
759
|
meta: Meta;
|
|
1066
760
|
title: Ref<string, string>;
|
|
@@ -1071,33 +765,34 @@ export declare const useMeta: () => Readonly<{
|
|
|
1071
765
|
canonical: Ref<string, string>;
|
|
1072
766
|
robots: Ref<MetaRobots, MetaRobots>;
|
|
1073
767
|
siteName: Ref<string, string>;
|
|
1074
|
-
/** Generates HTML string for all meta tags. @keywords
|
|
768
|
+
/** Generates HTML string for all meta tags for SSR. @keywords ssr, html, meta */
|
|
1075
769
|
getHtmlMeta: () => string;
|
|
1076
|
-
/** Synchronizes reactive
|
|
770
|
+
/** Synchronizes reactive state with current MetaStatic state. @keywords sync, meta */
|
|
1077
771
|
sync: () => void;
|
|
1078
|
-
/** Updates MetaStatic values with current reactive state. @keywords update meta */
|
|
772
|
+
/** Updates MetaStatic values with current reactive state. @keywords update, meta */
|
|
1079
773
|
update: () => void;
|
|
1080
|
-
/** Updates MetaStatic values in SSR
|
|
774
|
+
/** Updates MetaStatic values in SSR environments. @keywords ssr, update */
|
|
1081
775
|
updateSsr: () => void;
|
|
1082
|
-
/** Sets the page title. @keywords
|
|
776
|
+
/** Sets the page title. @keywords title, seo */
|
|
1083
777
|
setTitle: (value: string) => void;
|
|
1084
|
-
/** Sets the keywords meta tag. @keywords
|
|
778
|
+
/** Sets the keywords meta tag. @keywords keywords, seo */
|
|
1085
779
|
setKeywords: (value: string) => void;
|
|
1086
|
-
/** Sets the description meta tag. @keywords
|
|
780
|
+
/** Sets the description meta tag. @keywords description, seo */
|
|
1087
781
|
setDescription: (value: string) => void;
|
|
1088
|
-
/** Sets the author meta tag. @keywords
|
|
782
|
+
/** Sets the author meta tag. @keywords author, meta */
|
|
1089
783
|
setAuthor: (value: string) => void;
|
|
1090
|
-
/** Sets
|
|
784
|
+
/** Sets Open Graph and Twitter Card image URL. @keywords image, og, twitter */
|
|
1091
785
|
setImage: (value: string) => void;
|
|
1092
|
-
/** Sets the canonical URL. @keywords
|
|
786
|
+
/** Sets the canonical URL. @keywords canonical, url */
|
|
1093
787
|
setCanonical: (value: string) => void;
|
|
1094
|
-
/** Sets the robots meta tag directive. @keywords
|
|
788
|
+
/** Sets the robots meta tag directive. @keywords robots, indexing */
|
|
1095
789
|
setRobots: (value: MetaRobots) => void;
|
|
1096
|
-
/** Sets
|
|
790
|
+
/** Sets site name for Open Graph and Twitter Card. @keywords siteName, og, twitter */
|
|
1097
791
|
setSiteName: (value: string) => void;
|
|
1098
|
-
/** Sets
|
|
792
|
+
/** Sets suffix for the page title. @keywords suffix, title */
|
|
1099
793
|
setSuffix: (suffix: string) => void;
|
|
1100
|
-
} & {
|
|
794
|
+
}> & {
|
|
795
|
+
/** Initializes meta manager instance. @keywords init, meta */
|
|
1101
796
|
init(): Readonly<{
|
|
1102
797
|
meta: Meta;
|
|
1103
798
|
title: Ref<string, string>;
|
|
@@ -1108,450 +803,477 @@ export declare const useMeta: () => Readonly<{
|
|
|
1108
803
|
canonical: Ref<string, string>;
|
|
1109
804
|
robots: Ref<MetaRobots, MetaRobots>;
|
|
1110
805
|
siteName: Ref<string, string>;
|
|
1111
|
-
/** Generates HTML string for all meta tags. @keywords
|
|
806
|
+
/** Generates HTML string for all meta tags for SSR. @keywords ssr, html, meta */
|
|
1112
807
|
getHtmlMeta: () => string;
|
|
1113
|
-
/** Synchronizes reactive
|
|
808
|
+
/** Synchronizes reactive state with current MetaStatic state. @keywords sync, meta */
|
|
1114
809
|
sync: () => void;
|
|
1115
|
-
/** Updates MetaStatic values with current reactive state. @keywords update meta */
|
|
810
|
+
/** Updates MetaStatic values with current reactive state. @keywords update, meta */
|
|
1116
811
|
update: () => void;
|
|
1117
|
-
/** Updates MetaStatic values in SSR
|
|
812
|
+
/** Updates MetaStatic values in SSR environments. @keywords ssr, update */
|
|
1118
813
|
updateSsr: () => void;
|
|
1119
|
-
/** Sets the page title. @keywords
|
|
814
|
+
/** Sets the page title. @keywords title, seo */
|
|
1120
815
|
setTitle: (value: string) => void;
|
|
1121
|
-
/** Sets the keywords meta tag. @keywords
|
|
816
|
+
/** Sets the keywords meta tag. @keywords keywords, seo */
|
|
1122
817
|
setKeywords: (value: string) => void;
|
|
1123
|
-
/** Sets the description meta tag. @keywords
|
|
818
|
+
/** Sets the description meta tag. @keywords description, seo */
|
|
1124
819
|
setDescription: (value: string) => void;
|
|
1125
|
-
/** Sets the author meta tag. @keywords
|
|
820
|
+
/** Sets the author meta tag. @keywords author, meta */
|
|
1126
821
|
setAuthor: (value: string) => void;
|
|
1127
|
-
/** Sets
|
|
822
|
+
/** Sets Open Graph and Twitter Card image URL. @keywords image, og, twitter */
|
|
1128
823
|
setImage: (value: string) => void;
|
|
1129
|
-
/** Sets the canonical URL. @keywords
|
|
824
|
+
/** Sets the canonical URL. @keywords canonical, url */
|
|
1130
825
|
setCanonical: (value: string) => void;
|
|
1131
|
-
/** Sets the robots meta tag directive. @keywords
|
|
826
|
+
/** Sets the robots meta tag directive. @keywords robots, indexing */
|
|
1132
827
|
setRobots: (value: MetaRobots) => void;
|
|
1133
|
-
/** Sets
|
|
828
|
+
/** Sets site name for Open Graph and Twitter Card. @keywords siteName, og, twitter */
|
|
1134
829
|
setSiteName: (value: string) => void;
|
|
1135
|
-
/** Sets
|
|
830
|
+
/** Sets suffix for the page title. @keywords suffix, title */
|
|
1136
831
|
setSuffix: (suffix: string) => void;
|
|
1137
832
|
}>;
|
|
1138
|
-
/**
|
|
833
|
+
/** Cleans up meta watchers and listeners. @keywords cleanup, destroy */
|
|
1139
834
|
destroyExecute?(): void;
|
|
1140
|
-
}
|
|
835
|
+
};
|
|
1141
836
|
|
|
1142
|
-
import { ShallowRef } from 'vue';
|
|
837
|
+
import { type ShallowRef } from 'vue';
|
|
1143
838
|
|
|
1144
|
-
/**
|
|
1145
|
-
* Creates a reactive variable to manage URL query parameters.
|
|
1146
|
-
* @keywords query parameter url ref reactive
|
|
1147
|
-
* @param name Parameter name
|
|
1148
|
-
* @param defaultValue Default value
|
|
1149
|
-
*/
|
|
839
|
+
/** Creates a reactive shallow ref synchronized with a URL query parameter. @keywords vue, query, url, search params, reactive ref */
|
|
1150
840
|
export declare function useQueryRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
1151
841
|
|
|
1152
|
-
import {
|
|
1153
|
-
import { NumberOrString } from '@dxtmisha/functional-basic';
|
|
842
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
843
|
+
import { type NumberOrString } from '@dxtmisha/functional-basic';
|
|
1154
844
|
|
|
1155
|
-
/**
|
|
1156
|
-
* Managing a list of links for the router.
|
|
1157
|
-
* @keywords useRouterList router links navigation
|
|
1158
|
-
*/
|
|
845
|
+
/** Manages a list of router navigation links and selection state. @keywords router list navigation route */
|
|
1159
846
|
export declare const useRouterList: <T extends ListDataBasic>(list: RefType<ConstrBind<T>[] | undefined>, selected?: Ref<string> | string, hasTo?: boolean) => {
|
|
1160
|
-
/** Active router item / Активный элемент роутера */
|
|
1161
847
|
item: ComputedRef<T | undefined>;
|
|
1162
|
-
/** Selected
|
|
848
|
+
/** Selected item identifier. */
|
|
1163
849
|
selected: Ref<string, string>;
|
|
1164
|
-
/** Label of selected element / Метка выбранного элемента */
|
|
1165
850
|
label: ComputedRef<NumberOrString>;
|
|
1166
|
-
/**
|
|
851
|
+
/** Processed router link elements list. */
|
|
1167
852
|
list: ComputedRef<ConstrBind<T>[]>;
|
|
1168
|
-
/**
|
|
853
|
+
/** Navigates to the target route item by name. @keywords navigate route to */
|
|
1169
854
|
to: (name?: string) => void;
|
|
1170
|
-
/**
|
|
855
|
+
/** Navigates to the main root element. @keywords navigate main home route */
|
|
1171
856
|
toMain(): void;
|
|
1172
857
|
};
|
|
1173
858
|
|
|
1174
|
-
import {
|
|
1175
|
-
import { SearchColumns, SearchFormatList, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
* Composable for handling search logic with reactive data.
|
|
1179
|
-
* @keywords search ref reactive list columns
|
|
1180
|
-
*/
|
|
859
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
860
|
+
import { type SearchColumns, type SearchFormatList, type SearchItem, type SearchOptions } from '@dxtmisha/functional-basic';
|
|
861
|
+
/** Composable for managing reactive search logic, match highlights, and loading status. @keywords vue search filter reactive useSearchRef */
|
|
1181
862
|
export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns?: SearchColumnsInput<T, K>, value?: Ref<string>, options?: SearchOptions): {
|
|
1182
|
-
/** Whether search is currently active. @keywords isSearch active */
|
|
863
|
+
/** Whether search is currently active and meets character threshold. @keywords isSearch active */
|
|
1183
864
|
isSearch: ComputedRef<boolean>;
|
|
1184
|
-
/**
|
|
865
|
+
/** Reactive search query string reference. @keywords search query */
|
|
1185
866
|
search: Ref<string, string>;
|
|
1186
|
-
/** Search loading status
|
|
867
|
+
/** Search loading status during delayed execution. @keywords loading status */
|
|
1187
868
|
loading: Ref<boolean, boolean>;
|
|
1188
|
-
/** Formatted search results
|
|
869
|
+
/** Formatted list of search results with match highlights. @keywords listSearch results highlight */
|
|
1189
870
|
listSearch: ComputedRef<SearchFormatList<T, K>>;
|
|
1190
|
-
/**
|
|
871
|
+
/** Total count of matching search results. @keywords length count */
|
|
1191
872
|
length: ComputedRef<number>;
|
|
1192
873
|
};
|
|
1193
874
|
|
|
1194
|
-
import { Ref } from 'vue';
|
|
1195
|
-
import { SearchList, SearchColumns, SearchItem } from '@dxtmisha/functional-basic';
|
|
875
|
+
import { type Ref } from 'vue';
|
|
876
|
+
import { SearchList, type SearchColumns, type SearchItem } from '@dxtmisha/functional-basic';
|
|
1196
877
|
|
|
1197
|
-
/**
|
|
1198
|
-
* Manages search value state and handling delays.
|
|
1199
|
-
* @keywords useSearchValueRef, search, delay, debounce, loading
|
|
1200
|
-
*/
|
|
878
|
+
/** Manages search query state, debounce delay, and loading status. @keywords search, query, debounce, delay, loading, search list */
|
|
1201
879
|
export declare function useSearchValueRef<T extends SearchItem, K extends SearchColumns<T>>(item: SearchList<T, K>, value?: Ref<string>): {
|
|
1202
880
|
/** Current search value */
|
|
1203
881
|
search: Ref<string, string>;
|
|
1204
|
-
/** Search value with applied delay */
|
|
882
|
+
/** Search value with applied debounce delay */
|
|
1205
883
|
searchDelay: Ref<string, string>;
|
|
1206
|
-
/** Loading
|
|
884
|
+
/** Loading state during debounce delay */
|
|
1207
885
|
loading: Ref<boolean, boolean>;
|
|
1208
886
|
};
|
|
1209
887
|
|
|
1210
|
-
import { Ref } from 'vue';
|
|
888
|
+
import { type Ref } from 'vue';
|
|
1211
889
|
|
|
1212
|
-
/**
|
|
1213
|
-
* Creates a reactive variable for session storage.
|
|
1214
|
-
* @keywords session ref storage reactive
|
|
1215
|
-
*/
|
|
890
|
+
/** Creates a reactive ref synchronized with sessionStorage. @keywords session storage, reactive ref, useSessionRef, vue */
|
|
1216
891
|
export declare function useSessionRef<T>(name: string, defaultValue?: T | (() => T)): Ref<T | undefined>;
|
|
1217
892
|
|
|
1218
|
-
import { Ref } from 'vue';
|
|
1219
|
-
|
|
1220
|
-
/**
|
|
1221
|
-
* Creates a reactive reference to manage browser local storage.
|
|
1222
|
-
* @keywords storage, local, reactive, ref
|
|
1223
|
-
*/
|
|
893
|
+
import { type Ref } from 'vue';
|
|
894
|
+
/** Creates a reactive ref synchronized with local storage. @keywords storage, localstorage, reactive, ref, state, cache */
|
|
1224
895
|
export declare function useStorageRef<T>(name: string, defaultValue?: T | (() => T), cache?: number): Ref<T | undefined>;
|
|
1225
896
|
|
|
1226
|
-
import { ShallowRef } from 'vue';
|
|
1227
|
-
import { TranslateInstance, TranslateList } from '@dxtmisha/functional-basic';
|
|
1228
|
-
|
|
897
|
+
import { type ShallowRef } from 'vue';
|
|
898
|
+
import { type TranslateInstance, type TranslateList } from '@dxtmisha/functional-basic';
|
|
1229
899
|
/**
|
|
1230
|
-
*
|
|
1231
|
-
* @
|
|
900
|
+
* Returns a reactive ShallowRef of translated texts for given keys, auto-updating on locale change.
|
|
901
|
+
* @example const translations = useTranslateRef(['home.title', 'home.description'] as const);
|
|
902
|
+
* @keywords translate translation i18n vue composable shallowRef reactive
|
|
1232
903
|
*/
|
|
1233
904
|
export declare function useTranslateRef<T extends (string | string[])[]>(names: T, translateInstance?: TranslateInstance): ShallowRef<TranslateList<T>>;
|
|
1234
|
-
|
|
1235
|
-
/**
|
|
1236
|
-
* Shorthand alias for useTranslateRef.
|
|
1237
|
-
* @keywords translate t localization i18n shorthand
|
|
1238
|
-
*/
|
|
905
|
+
/** Shorthand for `useTranslateRef`. @keywords translate i18n t vue composable */
|
|
1239
906
|
export declare const t: <T extends string[]>(names: T) => ShallowRef<TranslateList<T>>;
|
|
1240
907
|
|
|
1241
|
-
|
|
1242
|
-
/** Initializes user interface flags. @keywords ui, flags, initialize */
|
|
908
|
+
/** Initializes UI flags configuration. @keywords ui, flags, make flags */
|
|
1243
909
|
export declare const uiMakeFlags: () => void;
|
|
1244
|
-
```
|
|
1245
910
|
|
|
1246
911
|
export * from '@dxtmisha/functional-basic';
|
|
1247
912
|
|
|
1248
|
-
import { ComputedRef, DebuggerOptions } from 'vue';
|
|
1249
|
-
|
|
1250
|
-
/**
|
|
1251
|
-
* Creates a computed property that handles asynchronous getters.
|
|
1252
|
-
* @keywords computed async reactive vue
|
|
1253
|
-
*/
|
|
913
|
+
import { type ComputedRef, type DebuggerOptions } from 'vue';
|
|
914
|
+
/** Creates a reactive computed property that supports asynchronous getters, initial states, and ignored values. @keywords computedAsync, async computed, vue reactivity, promise computed */
|
|
1254
915
|
export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, initialState?: (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
|
|
1255
916
|
|
|
1256
|
-
import { ComputedGetter, ComputedRef, DebuggerOptions } from 'vue';
|
|
1257
|
-
|
|
1258
|
-
/**
|
|
1259
|
-
* Creates a language-dependent computed reactive property.
|
|
1260
|
-
* @keywords computed language reactive getter
|
|
1261
|
-
*/
|
|
917
|
+
import { type ComputedGetter, type ComputedRef, type DebuggerOptions } from 'vue';
|
|
918
|
+
/** Creates a reactive computed property evaluated based on language and conditions, with fallback support. @keywords computed, i18n, language, localization, reactive, fallback */
|
|
1262
919
|
export declare function computedByLanguage<T, R extends (T | undefined) = T | undefined>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
|
|
1263
920
|
|
|
1264
|
-
|
|
921
|
+
import { type Ref } from 'vue';
|
|
922
|
+
|
|
923
|
+
/** Creates a cached on-demand computed property with a persistent watcher active for the entire application lifecycle. @keywords computed, lazy, cache, persistent, watcher */
|
|
1265
924
|
export declare function computedEternity<T>(getter: () => Promise<T> | T, initialState?: (() => T) | T): Ref<T, T>;
|
|
1266
925
|
|
|
1267
|
-
import { Plugin } from 'vue';
|
|
1268
|
-
import { InputSocialIcons } from '@dxtmisha/media';
|
|
1269
|
-
import { ApiConfig, ErrorCenterCauseList, ErrorCenterHandlerCallback, ErrorCenterHandlerList, IconsConfig, TranslateConfig } from '@dxtmisha/functional-basic';
|
|
1270
|
-
import { Router } from 'vue-router';
|
|
926
|
+
import { type Plugin } from 'vue';
|
|
927
|
+
import { type InputSocialIcons } from '@dxtmisha/media';
|
|
928
|
+
import { type ApiConfig, type ErrorCenterCauseList, type ErrorCenterHandlerCallback, type ErrorCenterHandlerList, type IconsConfig, type TranslateConfig } from '@dxtmisha/functional-basic';
|
|
929
|
+
import type { Router } from 'vue-router';
|
|
1271
930
|
|
|
931
|
+
/** Options for configuring the functional plugin. @keywords plugin, options, config */
|
|
1272
932
|
export interface FunctionalPluginOptions {
|
|
933
|
+
/** Configuration for the API client. */
|
|
1273
934
|
api?: ApiConfig;
|
|
935
|
+
/** Configuration for the translation service. */
|
|
1274
936
|
translate?: TranslateConfig;
|
|
937
|
+
/** Default geographical location or language code. */
|
|
1275
938
|
location?: string | (() => string);
|
|
939
|
+
/** Suffix appended to all page titles. */
|
|
1276
940
|
metaSuffix?: string;
|
|
941
|
+
/** Configuration for the icon management service. */
|
|
1277
942
|
icons?: IconsConfig;
|
|
943
|
+
/** Configuration for the social icons service. */
|
|
1278
944
|
iconsSocial?: InputSocialIcons;
|
|
945
|
+
/** Vue Router instance for navigation state management. */
|
|
1279
946
|
router?: Router;
|
|
947
|
+
/** Error causes list for error center. */
|
|
1280
948
|
errorCauses?: ErrorCenterCauseList;
|
|
949
|
+
/** Error handlers list for error center. */
|
|
1281
950
|
errorHandlers?: ErrorCenterHandlerList;
|
|
951
|
+
/** Global error callback functions for error center. */
|
|
1282
952
|
errorCallbacks?: ErrorCenterHandlerCallback[];
|
|
1283
953
|
}
|
|
1284
954
|
|
|
1285
955
|
/**
|
|
1286
|
-
* Vue plugin for initializing and configuring global functional services.
|
|
1287
|
-
* @keywords plugin,
|
|
956
|
+
* Vue plugin for initializing and configuring global functional services (API, Translate, Icons, Meta).
|
|
957
|
+
* @keywords vue, plugin, api, translate, icons, meta, error-center
|
|
1288
958
|
* @example
|
|
1289
|
-
*
|
|
1290
|
-
* import {
|
|
1291
|
-
*
|
|
1292
|
-
*
|
|
959
|
+
* ```typescript
|
|
960
|
+
* import { createApp } from 'vue';
|
|
961
|
+
* import { dxtFunctionalPlugin } from '@dxtmisha/functional';
|
|
962
|
+
* import router from './router';
|
|
963
|
+
*
|
|
964
|
+
* const app = createApp(App);
|
|
965
|
+
* app.use(dxtFunctionalPlugin, {
|
|
966
|
+
* api: { url: 'https://api.example.com' },
|
|
967
|
+
* metaSuffix: ' | My App',
|
|
968
|
+
* router
|
|
969
|
+
* });
|
|
970
|
+
* ```
|
|
1293
971
|
*/
|
|
1294
972
|
export declare const dxtFunctionalPlugin: Plugin;
|
|
1295
973
|
|
|
1296
|
-
/** Types of initialization for a singleton @keywords execute, use, type */
|
|
1297
974
|
export declare enum ExecuteUseType {
|
|
1298
|
-
/** Global application instance @keywords global, singleton */
|
|
1299
975
|
global = "global",
|
|
1300
|
-
/** Provide/inject shared instance @keywords provide, inject */
|
|
1301
976
|
provide = "provide",
|
|
1302
|
-
/** Local closure instance @keywords local, closure */
|
|
1303
977
|
local = "local"
|
|
1304
978
|
}
|
|
1305
979
|
|
|
1306
980
|
export type ExecuteUseReturn<R> = Readonly<R & {
|
|
1307
|
-
/** Returns raw instance @keywords init,
|
|
981
|
+
/** Returns the raw instance without management methods. @keywords init, unwrap */
|
|
1308
982
|
init(): Readonly<R>;
|
|
1309
|
-
/** Resets cached instance @keywords destroy,
|
|
983
|
+
/** Resets the cached instance for local and global strategies. @keywords reset, destroy, cache */
|
|
1310
984
|
destroyExecute?(): void;
|
|
1311
985
|
}>;
|
|
1312
986
|
|
|
1313
987
|
/**
|
|
1314
|
-
* Creates a managed singleton
|
|
1315
|
-
* @keywords
|
|
988
|
+
* Creates a managed singleton encapsulating initialization logic and access strategy.
|
|
989
|
+
* @keywords singleton, provide-inject, global-state, factory, cache
|
|
990
|
+
* @remarks
|
|
991
|
+
* Supports three initialization strategies:
|
|
992
|
+
* - `global`: Single instance across the entire application.
|
|
993
|
+
* - `provide`: Shared via provide/inject in the component hierarchy.
|
|
994
|
+
* - `local`: Single instance scoped to the returned function closure.
|
|
995
|
+
* @example
|
|
996
|
+
* const useUserApi = executeUseGlobal(() => useApiGet('/api/user'));
|
|
1316
997
|
*/
|
|
1317
998
|
export declare function executeUse<R, O extends any[], RI extends ExecuteUseReturn<R> = ExecuteUseReturn<R>>(callback: (...args: O) => R, type?: ExecuteUseType): ((...args: O) => RI) | (() => RI);
|
|
1318
999
|
|
|
1319
1000
|
/**
|
|
1320
|
-
* Creates
|
|
1321
|
-
* @keywords
|
|
1001
|
+
* Creates an application-wide global singleton.
|
|
1002
|
+
* @keywords global, singleton, shared-instance
|
|
1003
|
+
* @remarks See {@link executeUse} for more details.
|
|
1322
1004
|
*/
|
|
1323
1005
|
export declare function executeUseGlobal<R>(callback: () => R): (() => Readonly<R & {
|
|
1006
|
+
/** Returns the raw instance without management methods. @keywords init, unwrap */
|
|
1324
1007
|
init(): Readonly<R>;
|
|
1008
|
+
/** Resets the cached instance for local and global strategies. @keywords reset, destroy, cache */
|
|
1325
1009
|
destroyExecute?(): void;
|
|
1326
1010
|
}>) | (() => Readonly<R & {
|
|
1011
|
+
/** Returns the raw instance without management methods. @keywords init, unwrap */
|
|
1327
1012
|
init(): Readonly<R>;
|
|
1013
|
+
/** Resets the cached instance for local and global strategies. @keywords reset, destroy, cache */
|
|
1328
1014
|
destroyExecute?(): void;
|
|
1329
1015
|
}>);
|
|
1330
1016
|
|
|
1331
1017
|
/**
|
|
1332
|
-
* Creates a component-scoped singleton.
|
|
1333
|
-
* @keywords
|
|
1018
|
+
* Creates a component-tree scoped singleton using provide/inject.
|
|
1019
|
+
* @keywords provide, inject, vue, scoped-state
|
|
1020
|
+
* @remarks Best for sharing state within a component sub-tree. See {@link executeUse}.
|
|
1334
1021
|
*/
|
|
1335
1022
|
export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
|
|
1023
|
+
/** Returns the raw instance without management methods. @keywords init, unwrap */
|
|
1336
1024
|
init(): Readonly<R>;
|
|
1025
|
+
/** Resets the cached instance for local and global strategies. @keywords reset, destroy, cache */
|
|
1337
1026
|
destroyExecute?(): void;
|
|
1338
1027
|
}>) | (() => Readonly<R & {
|
|
1028
|
+
/** Returns the raw instance without management methods. @keywords init, unwrap */
|
|
1339
1029
|
init(): Readonly<R>;
|
|
1030
|
+
/** Resets the cached instance for local and global strategies. @keywords reset, destroy, cache */
|
|
1340
1031
|
destroyExecute?(): void;
|
|
1341
1032
|
}>);
|
|
1342
1033
|
|
|
1343
1034
|
/**
|
|
1344
|
-
* Creates a local singleton.
|
|
1345
|
-
* @keywords
|
|
1035
|
+
* Creates a closure-scoped local singleton.
|
|
1036
|
+
* @keywords local, singleton, closure, memoize
|
|
1037
|
+
* @remarks Best for preserving internal state within a closure. See {@link executeUse}.
|
|
1346
1038
|
*/
|
|
1347
1039
|
export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
|
|
1040
|
+
/** Returns the raw instance without management methods. @keywords init, unwrap */
|
|
1348
1041
|
init(): Readonly<R>;
|
|
1042
|
+
/** Resets the cached instance for local and global strategies. @keywords reset, destroy, cache */
|
|
1349
1043
|
destroyExecute?(): void;
|
|
1350
1044
|
}>) | (() => Readonly<R & {
|
|
1045
|
+
/** Returns the raw instance without management methods. @keywords init, unwrap */
|
|
1351
1046
|
init(): Readonly<R>;
|
|
1047
|
+
/** Resets the cached instance for local and global strategies. @keywords reset, destroy, cache */
|
|
1352
1048
|
destroyExecute?(): void;
|
|
1353
1049
|
}>);
|
|
1354
1050
|
|
|
1355
|
-
/**
|
|
1356
|
-
* Initializes all global callbacks.
|
|
1357
|
-
* @keywords execute, use, global, init
|
|
1358
|
-
*/
|
|
1051
|
+
/** Initializes all registered global singleton callbacks. @keywords initialize, bootstrap, global-init */
|
|
1359
1052
|
export declare function executeUseGlobalInit(): void;
|
|
1360
1053
|
|
|
1361
|
-
/**
|
|
1362
|
-
* Get injected value by name.
|
|
1363
|
-
* @keywords get_inject dependency injection
|
|
1364
|
-
*/
|
|
1054
|
+
/** Retrieves an injected value by its key name. @keywords inject dependency injection di container get */
|
|
1365
1055
|
export declare function getInject<T>(name: string): T | undefined;
|
|
1366
1056
|
|
|
1367
|
-
|
|
1057
|
+
import type { ApiFetch } from '@dxtmisha/functional-basic';
|
|
1058
|
+
/** Gets request options for API fetch calls. @keywords request, options, api, fetch */
|
|
1368
1059
|
export declare const getOptions: (options?: ApiOptions) => RefOrNormal<ApiFetch>;
|
|
1369
1060
|
|
|
1370
|
-
/**
|
|
1371
|
-
* Executes a function if provided and unwraps the resulting Vue Ref.
|
|
1372
|
-
* @keywords execute, function, ref, unwrap, reactive
|
|
1373
|
-
*/
|
|
1061
|
+
/** Executes a function or unwraps a Vue ref or raw value to resolve its underlying value. @keywords execute, unwrap, ref, getter, reactive */
|
|
1374
1062
|
export declare function executeFunctionRef<T>(data: RefOrNormalOrFunction<T>): T;
|
|
1375
1063
|
|
|
1376
|
-
import { ComputedRef } from 'vue';
|
|
1377
|
-
import { ApiData, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
1064
|
+
import { type ComputedRef } from 'vue';
|
|
1065
|
+
import { type ApiData, type ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
1378
1066
|
|
|
1379
|
-
/**
|
|
1380
|
-
* Returns the error item for the Api ref.
|
|
1381
|
-
* @keywords api error ref reactive getApiErrorRef
|
|
1382
|
-
*/
|
|
1067
|
+
/** Returns a computed ref containing the API error item. @keywords api, error, ref, computed */
|
|
1383
1068
|
export declare function getApiErrorRef<R>(data: RefType<ApiData<R> | undefined>): ComputedRef<ApiErrorItem | undefined>;
|
|
1384
1069
|
|
|
1385
|
-
import { ComputedRef } from 'vue';
|
|
1386
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
1070
|
+
import { type ComputedRef } from 'vue';
|
|
1071
|
+
import type { ItemList } from '@dxtmisha/functional-basic';
|
|
1387
1072
|
|
|
1388
|
-
/**
|
|
1389
|
-
* Generates a computed reference for subcomponent bindings.
|
|
1390
|
-
* @keywords get_bind_ref reactive properties computed binding
|
|
1391
|
-
*/
|
|
1073
|
+
/** Generates reactive bound properties for a subcomponent. @keywords subcomponent, props binding, computed ref */
|
|
1392
1074
|
export declare function getBindRef<T, R extends ItemList>(value: RefOrNormal<T | R> | undefined, nameExtra?: RefOrNormal<ItemList> | string, name?: string): ComputedRef<R>;
|
|
1393
1075
|
|
|
1394
|
-
/**
|
|
1076
|
+
/** Unwraps a ref or returns the value directly if not reactive. @keywords unref, ref, reactive, unwrap */
|
|
1395
1077
|
export declare function getRef<T>(item: RefOrNormal<T>): T;
|
|
1396
1078
|
|
|
1397
|
-
import { VNode } from 'vue';
|
|
1398
|
-
import { ItemList } from '@dxtmisha/functional-basic';
|
|
1079
|
+
import { type VNode } from 'vue';
|
|
1080
|
+
import type { ItemList } from '@dxtmisha/functional-basic';
|
|
1399
1081
|
|
|
1400
|
-
/**
|
|
1082
|
+
/** Renders and caches immutable VNode component structures. @keywords render, vnode, component, cache */
|
|
1401
1083
|
export declare function render<T extends ItemList>(name: string | any, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
|
|
1402
1084
|
|
|
1403
|
-
import { Ref } from 'vue';
|
|
1085
|
+
import { type Ref } from 'vue';
|
|
1404
1086
|
|
|
1405
|
-
/**
|
|
1406
|
-
* Changes the value of a reactive reference.
|
|
1407
|
-
* @keywords set ref value update
|
|
1408
|
-
*/
|
|
1087
|
+
/** Updates the value of a Vue Ref. @keywords vue ref reactivity set update */
|
|
1409
1088
|
export declare function setRef<T>(item: Ref<T>, value: T): void;
|
|
1410
1089
|
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
* @keywords ref toRefItem wrap reactive variable
|
|
1414
|
-
*/
|
|
1090
|
+
import { type Ref } from 'vue';
|
|
1091
|
+
/** Converts a value or ref into a Vue Ref. @keywords vue, ref, toRef, reactivity */
|
|
1415
1092
|
export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
|
|
1416
1093
|
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
* @keywords getBind bind properties component attributes
|
|
1420
|
-
*/
|
|
1094
|
+
import { type ItemList } from '@dxtmisha/functional-basic';
|
|
1095
|
+
/** Generates binding properties for a subcomponent. @keywords bind, props, subcomponent, generate */
|
|
1421
1096
|
export declare function getBind<T, R extends ItemList>(value: T | R | undefined | null, nameExtra?: ItemList | string, name?: string, except?: boolean): ConstrBind<R>;
|
|
1422
1097
|
|
|
1423
|
-
|
|
1424
|
-
* Returns the class name from the provided properties object.
|
|
1425
|
-
* @keywords get class name props
|
|
1426
|
-
*/
|
|
1427
|
-
export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
|
|
1098
|
+
import type { ItemList } from '@dxtmisha/functional-basic';
|
|
1428
1099
|
|
|
1429
|
-
|
|
1100
|
+
/** Returns the class name from component properties. @keywords get class name, props, class extraction */
|
|
1101
|
+
export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
|
|
1430
1102
|
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
* @keywords render, index, key, generator
|
|
1434
|
-
*/
|
|
1103
|
+
import { type ItemList } from '@dxtmisha/functional-basic';
|
|
1104
|
+
/** Resolves or generates a unique key index for rendering a component item. @keywords render index, component key, unique key */
|
|
1435
1105
|
export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
|
|
1436
1106
|
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
*/
|
|
1107
|
+
import type { ItemList } from '@dxtmisha/functional-basic';
|
|
1108
|
+
|
|
1109
|
+
/** Merges two property objects, combining their classes and styles. @keywords merge objects, classes, styles, bind properties */
|
|
1441
1110
|
export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, value: ItemList): ConstrBind<R>;
|
|
1442
1111
|
|
|
1443
|
-
|
|
1112
|
+
import type { ItemList } from '@dxtmisha/functional-basic';
|
|
1113
|
+
/** Merges multiple objects with properties, intelligently combining their classes and styles. @keywords merge binds classes styles */
|
|
1444
1114
|
export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
|
|
1445
1115
|
|
|
1446
|
-
|
|
1447
|
-
|
|
1116
|
+
import type { ApiData, ApiDataValidation, ApiDefaultValue, ApiErrorStorageList, ApiFetch, ApiMethodItem, SearchColumns, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
1117
|
+
import type { Ref } from 'vue';
|
|
1448
1118
|
export type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
|
|
1449
1119
|
export type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
|
|
1120
|
+
/** Configuration for GET requests in API management @keywords api, get, fetch, request */
|
|
1450
1121
|
export type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
1122
|
+
/** API endpoint path */
|
|
1451
1123
|
path?: RefOrNormal<string | undefined>;
|
|
1124
|
+
/** Additional request options */
|
|
1452
1125
|
options?: ApiOptions;
|
|
1126
|
+
/** Enables reactive refetching on path or options change */
|
|
1453
1127
|
reactivity?: boolean;
|
|
1128
|
+
/** Condition required to trigger the request */
|
|
1454
1129
|
conditions?: RefType<boolean>;
|
|
1130
|
+
/** Custom transformation applied to fetched data */
|
|
1455
1131
|
transformation?: (data: Type, isResponseContractValid?: ApiDataValidation) => ApiData<Return>;
|
|
1132
|
+
/** Validates the response data contract */
|
|
1456
1133
|
validateResponseContract?: (data: Type) => ApiDataValidation;
|
|
1134
|
+
/** Storage of response error contracts */
|
|
1457
1135
|
errorContract?: ApiErrorStorageList;
|
|
1136
|
+
/** Validation function or constructor type for data */
|
|
1458
1137
|
typeData?: ((data: Return) => boolean) | any;
|
|
1138
|
+
/** Clears data on component unmount */
|
|
1459
1139
|
unmounted?: boolean;
|
|
1140
|
+
/** Provides skeleton placeholder data during loading */
|
|
1460
1141
|
skeleton?: () => Return;
|
|
1461
1142
|
};
|
|
1143
|
+
/** Configuration for client-side search across API data @keywords api, search, filter */
|
|
1462
1144
|
export type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
|
|
1145
|
+
/** Columns to search through */
|
|
1463
1146
|
columns: K;
|
|
1147
|
+
/** Reactive search query string */
|
|
1464
1148
|
value?: Ref<string>;
|
|
1149
|
+
/** Search algorithm configuration */
|
|
1465
1150
|
options?: SearchOptions;
|
|
1466
1151
|
};
|
|
1152
|
+
/** Configuration for mutation requests (POST, PUT, DELETE) @keywords api, mutation, request, post, put, delete */
|
|
1467
1153
|
export type ApiManagementRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> = {
|
|
1154
|
+
/** Target API endpoint path */
|
|
1468
1155
|
path?: RefOrNormal<string | undefined>;
|
|
1156
|
+
/** Callback executed after successful request */
|
|
1469
1157
|
action?: (data: Return | undefined) => Promise<void> | void;
|
|
1158
|
+
/** Transformation applied before sending data */
|
|
1470
1159
|
transformation?: (data: T) => Return;
|
|
1160
|
+
/** Request contract validation function */
|
|
1471
1161
|
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
1162
|
+
/** Response contract validation function */
|
|
1472
1163
|
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
1164
|
+
/** Storage of response error contracts */
|
|
1473
1165
|
errorContract?: ApiErrorStorageList;
|
|
1166
|
+
/** Wraps payload into a `data` property */
|
|
1474
1167
|
toData?: boolean;
|
|
1168
|
+
/** Additional mutation request options */
|
|
1475
1169
|
options?: ApiOptions;
|
|
1476
1170
|
};
|
|
1477
1171
|
|
|
1172
|
+
import type { Ref, PropType, ComputedRef } from 'vue';
|
|
1173
|
+
import type { Undefined } from '@dxtmisha/functional-basic';
|
|
1174
|
+
|
|
1478
1175
|
export type ConstrItem = Record<string, any>;
|
|
1176
|
+
|
|
1479
1177
|
export type ConstrValue<T = any> = {
|
|
1480
|
-
|
|
1178
|
+
value?: T;
|
|
1481
1179
|
};
|
|
1180
|
+
|
|
1482
1181
|
export type ConstrComponent = Record<string, any>;
|
|
1182
|
+
|
|
1183
|
+
/** Constructor component modification type with reactive or normal values. @keywords component, modifier, reactive */
|
|
1483
1184
|
export type ConstrComponentMod<P extends ConstrItem> = ConstrItem | {
|
|
1484
|
-
|
|
1185
|
+
[K in keyof P]?: RefOrNormal<P[K]>;
|
|
1485
1186
|
};
|
|
1187
|
+
|
|
1486
1188
|
export type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & {
|
|
1487
|
-
|
|
1189
|
+
elementHtml?: ComputedRef<E | undefined>;
|
|
1488
1190
|
};
|
|
1191
|
+
|
|
1192
|
+
/** Converts union types to intersection types. @keywords union, intersection, utility */
|
|
1489
1193
|
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
1194
|
+
|
|
1490
1195
|
export type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
|
|
1196
|
+
|
|
1197
|
+
/** Constructor emit type generating strongly-typed event handler signatures. @keywords emit, events, handler */
|
|
1491
1198
|
export type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{
|
|
1492
|
-
|
|
1199
|
+
[K in keyof T]: (evt: K, ...args: T[K]) => void;
|
|
1493
1200
|
}>>;
|
|
1201
|
+
|
|
1494
1202
|
export type ConstrClassObject = Record<string, boolean | undefined>;
|
|
1203
|
+
|
|
1495
1204
|
export type ConstrClass = string | (string | ConstrClass | Undefined)[] | ConstrClassObject;
|
|
1205
|
+
|
|
1496
1206
|
export type ConstrClassList = Record<string, ConstrClass>;
|
|
1207
|
+
|
|
1497
1208
|
export type ConstrClasses = {
|
|
1498
|
-
|
|
1209
|
+
main: ConstrClass;
|
|
1499
1210
|
} & ConstrClassList;
|
|
1211
|
+
|
|
1500
1212
|
export type ConstrStylesItem = string | null;
|
|
1213
|
+
|
|
1501
1214
|
export type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
|
|
1502
|
-
|
|
1215
|
+
|
|
1216
|
+
/** Constructor options interface for component configuration. @keywords options, configuration */
|
|
1503
1217
|
export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1218
|
+
components?: COMP;
|
|
1219
|
+
compMod?: ConstrComponentMod<P>;
|
|
1220
|
+
emits?: ConstrEmit<EMITS>;
|
|
1221
|
+
classes?: RefType<ConstrClasses>;
|
|
1222
|
+
styles?: RefType<ConstrStyles>;
|
|
1509
1223
|
};
|
|
1510
|
-
|
|
1224
|
+
|
|
1225
|
+
/** Constructor setup interface for component initialization. @keywords setup, initialize */
|
|
1511
1226
|
export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1227
|
+
name: string;
|
|
1228
|
+
element: Ref<E | undefined>;
|
|
1229
|
+
classes: RefType<CLASSES>;
|
|
1230
|
+
styles: RefType<ConstrStyles>;
|
|
1516
1231
|
} & SETUP;
|
|
1232
|
+
|
|
1517
1233
|
export type ConstrRegistration = {
|
|
1518
|
-
|
|
1519
|
-
|
|
1234
|
+
flag?: boolean;
|
|
1235
|
+
translate?: Record<string, string>;
|
|
1520
1236
|
};
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1237
|
+
|
|
1238
|
+
/** Constructor binding type supporting element attributes, classes, and styles. @keywords bind, template, attributes */
|
|
1239
|
+
export type ConstrBind<T = ConstrItem> = T & Record<string, any> & {
|
|
1240
|
+
key?: string;
|
|
1241
|
+
class?: ConstrClass;
|
|
1242
|
+
style?: ConstrStyles;
|
|
1526
1243
|
};
|
|
1244
|
+
|
|
1245
|
+
/** Constructor prop item options for Vue prop definitions. @keywords prop, options, vue */
|
|
1527
1246
|
export type ConstrPropItemOptions<T = any> = {
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1247
|
+
type?: PropType<T>;
|
|
1248
|
+
required?: boolean;
|
|
1249
|
+
default?: any;
|
|
1250
|
+
/** Validates the provided prop value. @keywords validator, prop */
|
|
1251
|
+
validator?(value: any, props: any): boolean;
|
|
1532
1252
|
};
|
|
1253
|
+
|
|
1533
1254
|
export type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
|
|
1255
|
+
|
|
1534
1256
|
export type ConstrProps<P = Record<string, any>> = {
|
|
1535
|
-
|
|
1257
|
+
[K in keyof P]: ConstrPropItem<P[K]>;
|
|
1536
1258
|
};
|
|
1537
|
-
|
|
1259
|
+
|
|
1538
1260
|
export type ConstrHrefProps = {
|
|
1539
|
-
|
|
1261
|
+
href?: string;
|
|
1540
1262
|
};
|
|
1541
1263
|
|
|
1542
|
-
import { NumberOrString, NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
|
|
1264
|
+
import type { NumberOrString, NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
|
|
1543
1265
|
|
|
1544
|
-
/** Type of list item @keywords list, type, item */
|
|
1266
|
+
/** Type of list item @keywords list, type, item, space, line, subtitle, html, menu, group */
|
|
1545
1267
|
export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
1546
1268
|
|
|
1547
|
-
/** Basic data structure for list item @keywords list, data, basic */
|
|
1269
|
+
/** Basic data structure for list item @keywords list, data, basic, record */
|
|
1548
1270
|
export type ListDataBasic = {
|
|
1549
1271
|
label?: NumberOrString;
|
|
1550
1272
|
value?: any;
|
|
1551
1273
|
search?: string;
|
|
1552
1274
|
};
|
|
1553
1275
|
|
|
1554
|
-
/** Extended list item with type and index @keywords list, item,
|
|
1276
|
+
/** Extended list item with type and index @keywords list, data, item, index, parent */
|
|
1555
1277
|
export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
|
|
1556
1278
|
parent?: string;
|
|
1557
1279
|
type: ListType;
|
|
@@ -1559,13 +1281,11 @@ export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBin
|
|
|
1559
1281
|
disabled?: boolean;
|
|
1560
1282
|
}>;
|
|
1561
1283
|
|
|
1562
|
-
/** Array of list data items @keywords list, items, array */
|
|
1563
1284
|
export type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
|
|
1564
1285
|
|
|
1565
|
-
/** List or record structure for list data @keywords list, record, structure */
|
|
1566
1286
|
export type ListRecord<Item extends ListDataBasic = ListDataBasic> = Item[] | Record<string, Item>;
|
|
1567
1287
|
|
|
1568
|
-
/** Extended list item with additional state properties @keywords list, item,
|
|
1288
|
+
/** Extended list item with additional state properties @keywords list, item, focus, highlight, selected */
|
|
1569
1289
|
export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
|
|
1570
1290
|
focus: boolean;
|
|
1571
1291
|
highlight?: string;
|
|
@@ -1573,74 +1293,43 @@ export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListD
|
|
|
1573
1293
|
disabled?: boolean;
|
|
1574
1294
|
};
|
|
1575
1295
|
|
|
1576
|
-
/** Array of extended list items with state @keywords list, data, full, state */
|
|
1577
1296
|
export type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
|
|
1578
1297
|
|
|
1579
|
-
/** Input item for list creation @keywords list, input, item */
|
|
1580
1298
|
export type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
|
|
1581
1299
|
|
|
1582
|
-
/** Various input formats for list creation @keywords list, input,
|
|
1300
|
+
/** Various input formats for list creation @keywords list, input, format, record */
|
|
1583
1301
|
export type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
|
|
1584
1302
|
|
|
1585
|
-
/** Single selected item identifier @keywords list, selected, item */
|
|
1586
1303
|
export type ListSelectedItem = NumberOrStringOrBoolean;
|
|
1587
1304
|
|
|
1588
|
-
/** Single or multiple selected items @keywords list, selected, list */
|
|
1589
1305
|
export type ListSelectedList = ListSelectedItem | ListSelectedItem[];
|
|
1590
1306
|
|
|
1591
|
-
/** Name of selected list item @keywords list, name */
|
|
1592
1307
|
export type ListName = string | number | undefined;
|
|
1593
1308
|
|
|
1594
|
-
/** Array of list item names @keywords list, names, array */
|
|
1595
1309
|
export type ListNames = ListName[];
|
|
1596
1310
|
|
|
1597
|
-
import { ComputedRef, Ref, VNode, VNodeArrayChildren } from 'vue';
|
|
1311
|
+
import { type ComputedRef, type Ref, type VNode, type VNodeArrayChildren } from 'vue';
|
|
1598
1312
|
|
|
1599
|
-
/**
|
|
1600
|
-
* Union type for Vue reactive references (computed or ref)
|
|
1601
|
-
* @keywords ref type computed reactive
|
|
1602
|
-
*/
|
|
1313
|
+
/** Vue reactive reference (Ref or ComputedRef). @keywords vue ref computed */
|
|
1603
1314
|
export type RefType<T> = ComputedRef<T> | Ref<T>;
|
|
1604
|
-
|
|
1605
|
-
/**
|
|
1606
|
-
* Union type for Vue reactive references that can be undefined
|
|
1607
|
-
* @keywords ref undefined computed reactive
|
|
1608
|
-
*/
|
|
1315
|
+
/** Vue reactive reference that can be undefined. @keywords vue ref undefined */
|
|
1609
1316
|
export type RefUndefined<T> = RefType<T | undefined>;
|
|
1610
|
-
|
|
1611
|
-
/**
|
|
1612
|
-
* Union type that can be either a Vue reactive reference or a normal value
|
|
1613
|
-
* @keywords ref normal value reactive
|
|
1614
|
-
*/
|
|
1317
|
+
/** Vue reactive reference or raw unwrapped value. @keywords vue ref value */
|
|
1615
1318
|
export type RefOrNormal<T> = RefType<T> | T;
|
|
1616
|
-
|
|
1617
|
-
/**
|
|
1618
|
-
* Union type that can be a Vue reactive reference, normal value, or function returning them
|
|
1619
|
-
* @keywords ref normal function reactive
|
|
1620
|
-
*/
|
|
1319
|
+
/** Vue reactive reference, raw value, or getter function. @keywords vue ref getter */
|
|
1621
1320
|
export type RefOrNormalOrFunction<T> = RefOrNormal<T> | (() => RefOrNormal<T>);
|
|
1622
|
-
|
|
1623
|
-
/**
|
|
1624
|
-
* Union type for Vue raw children content
|
|
1625
|
-
* @keywords raw children vnode array
|
|
1626
|
-
*/
|
|
1321
|
+
/** Vue raw children content (primitives, VNodes, array, or render function). @keywords vue vnode children */
|
|
1627
1322
|
export type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
|
|
1628
|
-
|
|
1629
|
-
/**
|
|
1630
|
-
* Type for Vue raw slots with optional stability flag
|
|
1631
|
-
* @keywords raw slots stable vue
|
|
1632
|
-
*/
|
|
1323
|
+
/** Vue raw slots definition with optional stability flag. @keywords vue slots */
|
|
1633
1324
|
export type RawSlots = {
|
|
1634
1325
|
[name: string]: unknown;
|
|
1326
|
+
/** Stability flag for slot optimization. @keywords vue slot stable */
|
|
1635
1327
|
$stable?: boolean;
|
|
1636
1328
|
};
|
|
1637
1329
|
|
|
1638
|
-
import { SearchColumns, SearchItem, SearchListValue } from '@dxtmisha/functional-basic';
|
|
1639
|
-
|
|
1330
|
+
import type { SearchColumns, SearchItem, SearchListValue } from '@dxtmisha/functional-basic';
|
|
1331
|
+
|
|
1640
1332
|
export type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
|
|
1641
|
-
/** Search list input configuration @keywords search list input */
|
|
1642
1333
|
export type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
|
|
1643
|
-
/** Search columns reference @keywords search columns ref */
|
|
1644
1334
|
export type SearchColumnsRef<T extends SearchItem, K extends SearchColumns<T>> = RefOrNormal<K>;
|
|
1645
|
-
/** Search columns input configuration @keywords search columns input */
|
|
1646
1335
|
export type SearchColumnsInput<T extends SearchItem, K extends SearchColumns<T>> = SearchColumnsRef<T, K> | (() => SearchColumnsRef<T, K>);
|