@dxtmisha/functional 1.11.0 → 1.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai-types.txt +136 -202
- package/dist/library.d.ts +38 -7
- package/dist/library.js +271 -244
- package/package.json +1 -1
package/ai-types.txt
CHANGED
|
@@ -17,53 +17,53 @@ The following is the content of "exports" from package.json:
|
|
|
17
17
|
|
|
18
18
|
// File: library.d.ts
|
|
19
19
|
|
|
20
|
-
/** Config for main
|
|
20
|
+
/** Config for main GET request. */
|
|
21
21
|
export declare type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
22
|
-
/** API endpoint path
|
|
22
|
+
/** API endpoint path */
|
|
23
23
|
path?: RefOrNormal<string | undefined>;
|
|
24
|
-
/**
|
|
24
|
+
/** Additional request options */
|
|
25
25
|
options?: ApiOptions;
|
|
26
|
-
/** Enable reactive updates on path/options change
|
|
26
|
+
/** Enable reactive updates on path/options change */
|
|
27
27
|
reactivity?: boolean;
|
|
28
|
-
/**
|
|
28
|
+
/** Request condition */
|
|
29
29
|
conditions?: RefType<boolean>;
|
|
30
|
-
/** Custom data transformation
|
|
30
|
+
/** Custom data transformation */
|
|
31
31
|
transformation?: (data: Type, isResponseContractValid?: ApiDataValidation) => ApiData<Return>;
|
|
32
|
-
/** Response contract validation
|
|
32
|
+
/** Response contract validation */
|
|
33
33
|
validateResponseContract?: (data: Type) => ApiDataValidation;
|
|
34
|
-
/** Data
|
|
34
|
+
/** Data validation function or class */
|
|
35
35
|
typeData?: ((data: Return) => boolean) | any;
|
|
36
|
-
/** Clear data on unmount
|
|
36
|
+
/** Clear data on unmount */
|
|
37
37
|
unmounted?: boolean;
|
|
38
|
-
/** Loading skeleton data
|
|
38
|
+
/** Loading skeleton data */
|
|
39
39
|
skeleton?: () => Return;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
/** Config for POST, PUT, DELETE
|
|
42
|
+
/** Config for mutation requests (POST, PUT, DELETE). */
|
|
43
43
|
export declare type ApiManagementRequest<T, Return extends ApiData<T> = ApiData<T>> = {
|
|
44
|
-
/** API endpoint path
|
|
44
|
+
/** Target API endpoint path */
|
|
45
45
|
path?: RefOrNormal<string | undefined>;
|
|
46
|
-
/** Success callback
|
|
46
|
+
/** Success callback */
|
|
47
47
|
action?: (data: Return | undefined) => Promise<void> | void;
|
|
48
|
-
/** Pre-send transformation
|
|
48
|
+
/** Pre-send transformation */
|
|
49
49
|
transformation?: (data: T) => Return;
|
|
50
|
-
/** Wrap payload in 'data' property
|
|
50
|
+
/** Wrap payload in 'data' property */
|
|
51
51
|
toData?: boolean;
|
|
52
|
-
/**
|
|
52
|
+
/** Additional options */
|
|
53
53
|
options?: ApiOptions;
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
/** Config for client-side search. */
|
|
57
57
|
export declare type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
|
|
58
|
-
/**
|
|
58
|
+
/** Columns to search through */
|
|
59
59
|
columns: K;
|
|
60
|
-
/** Reactive search query
|
|
60
|
+
/** Reactive search query */
|
|
61
61
|
value?: Ref<string>;
|
|
62
|
-
/** Search algorithm options
|
|
62
|
+
/** Search algorithm options */
|
|
63
63
|
options?: SearchOptions;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
/**
|
|
66
|
+
/** Base type for API values. */
|
|
67
67
|
export declare type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
|
|
68
68
|
|
|
69
69
|
/** API request options. */
|
|
@@ -71,65 +71,79 @@ export declare type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
|
|
|
71
71
|
|
|
72
72
|
declare type BroadcastValueItem<T> = T | string | undefined;
|
|
73
73
|
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Creates computed property for async getters.
|
|
76
|
+
* @param getter Sync/async function or value
|
|
77
|
+
* @param ignore Values to exclude
|
|
78
|
+
* @param debugOptions Vue debug options
|
|
79
|
+
*/
|
|
75
80
|
export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
|
|
76
81
|
|
|
77
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Computed property dependent on current language.
|
|
84
|
+
* @param getter Main language-dependent value
|
|
85
|
+
* @param getterNone Fallback value
|
|
86
|
+
* @param conditions Trigger conditions
|
|
87
|
+
* @param debugOptions Vue debug options
|
|
88
|
+
*/
|
|
78
89
|
export declare function computedByLanguage<T, R extends (T | undefined) = T | undefined>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
|
|
79
90
|
|
|
80
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Cached on-demand computed property. Persists for app lifetime.
|
|
93
|
+
* @param getter Function returning value or promise
|
|
94
|
+
*/
|
|
81
95
|
export declare function computedEternity<T>(getter: () => Promise<T> | T): Ref<T, T>;
|
|
82
96
|
|
|
83
|
-
/**
|
|
97
|
+
/** Constructor bind type with class/style support. */
|
|
84
98
|
export declare type ConstrBind<T> = T & Record<string, any> & {
|
|
85
99
|
key?: string;
|
|
86
100
|
class?: ConstrClass;
|
|
87
101
|
style?: ConstrStyles;
|
|
88
102
|
};
|
|
89
103
|
|
|
90
|
-
/** Constructor class type
|
|
104
|
+
/** Constructor class type. */
|
|
91
105
|
export declare type ConstrClass = string | (string | ConstrClass | Undefined)[] | ConstrClassObject;
|
|
92
106
|
|
|
93
|
-
/**
|
|
107
|
+
/** Constructor classes with main and additional list. */
|
|
94
108
|
export declare type ConstrClasses = {
|
|
95
109
|
main: ConstrClass;
|
|
96
110
|
} & ConstrClassList;
|
|
97
111
|
|
|
98
|
-
/**
|
|
112
|
+
/** Class name mapping. */
|
|
99
113
|
export declare type ConstrClassList = Record<string, ConstrClass>;
|
|
100
114
|
|
|
101
|
-
/** CSS class object
|
|
115
|
+
/** CSS class object. */
|
|
102
116
|
export declare type ConstrClassObject = Record<string, boolean | undefined>;
|
|
103
117
|
|
|
104
118
|
/** Constructor component record. */
|
|
105
119
|
export declare type ConstrComponent = Record<string, any>;
|
|
106
120
|
|
|
107
|
-
/** Component modification
|
|
121
|
+
/** Component modification type. */
|
|
108
122
|
export declare type ConstrComponentMod<P extends ConstrItem> = ConstrItem | {
|
|
109
123
|
[K in keyof P]?: RefOrNormal<P[K]>;
|
|
110
124
|
};
|
|
111
125
|
|
|
112
|
-
/** Constructor emit
|
|
126
|
+
/** Constructor emit type. */
|
|
113
127
|
export declare type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{
|
|
114
128
|
[K in keyof T]: (evt: K, ...args: T[K]) => void;
|
|
115
129
|
}>>;
|
|
116
130
|
|
|
117
|
-
/** Extract emit item
|
|
131
|
+
/** Extract emit item. */
|
|
118
132
|
export declare type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
|
|
119
133
|
|
|
120
134
|
export declare type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & {
|
|
121
135
|
elementHtml?: ComputedRef<E | undefined>;
|
|
122
136
|
};
|
|
123
137
|
|
|
124
|
-
/**
|
|
138
|
+
/** Link props. */
|
|
125
139
|
export declare type ConstrHrefProps = {
|
|
126
140
|
href?: string;
|
|
127
141
|
};
|
|
128
142
|
|
|
129
|
-
/**
|
|
143
|
+
/** Generic constructor item. */
|
|
130
144
|
export declare type ConstrItem = Record<string, any>;
|
|
131
145
|
|
|
132
|
-
/**
|
|
146
|
+
/** Component configuration options. */
|
|
133
147
|
export declare type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
134
148
|
components?: COMP;
|
|
135
149
|
compMod?: ConstrComponentMod<P>;
|
|
@@ -138,10 +152,10 @@ export declare type ConstrOptions<COMP extends ConstrComponent, EMITS extends Co
|
|
|
138
152
|
styles?: RefType<ConstrStyles>;
|
|
139
153
|
};
|
|
140
154
|
|
|
141
|
-
/**
|
|
155
|
+
/** Prop item definition. */
|
|
142
156
|
export declare type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
|
|
143
157
|
|
|
144
|
-
/** Vue prop
|
|
158
|
+
/** Vue prop options. */
|
|
145
159
|
export declare type ConstrPropItemOptions<T = any> = {
|
|
146
160
|
type?: PropType<T>;
|
|
147
161
|
required?: boolean;
|
|
@@ -154,13 +168,13 @@ export declare type ConstrProps<P = Record<string, any>> = {
|
|
|
154
168
|
[K in keyof P]: ConstrPropItem<P[K]>;
|
|
155
169
|
};
|
|
156
170
|
|
|
157
|
-
/**
|
|
171
|
+
/** Registration config. */
|
|
158
172
|
export declare type ConstrRegistration = {
|
|
159
173
|
flag?: boolean;
|
|
160
174
|
translate?: Record<string, string>;
|
|
161
175
|
};
|
|
162
176
|
|
|
163
|
-
/**
|
|
177
|
+
/** Setup interface for component init. */
|
|
164
178
|
export declare type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
|
|
165
179
|
name: string;
|
|
166
180
|
element: Ref<E | undefined>;
|
|
@@ -168,7 +182,7 @@ export declare type ConstrSetup<E extends Element, CLASSES extends ConstrClasses
|
|
|
168
182
|
styles: RefType<ConstrStyles>;
|
|
169
183
|
} & SETUP;
|
|
170
184
|
|
|
171
|
-
/** Style definitions
|
|
185
|
+
/** Style definitions. */
|
|
172
186
|
export declare type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
|
|
173
187
|
|
|
174
188
|
/** Individual style property. */
|
|
@@ -181,74 +195,74 @@ export declare type ConstrValue<T = any> = {
|
|
|
181
195
|
|
|
182
196
|
/** Class for date processing. */
|
|
183
197
|
export declare class DatetimeRef {
|
|
198
|
+
/**
|
|
199
|
+
* @param date Date to process
|
|
200
|
+
* @param type Format type
|
|
201
|
+
* @param code Locale code
|
|
202
|
+
*/
|
|
184
203
|
constructor(date: RefOrNormal<NumberOrStringOrDate>, type?: RefOrNormal<GeoDate>, code?: RefOrNormal<string>);
|
|
185
|
-
/** Get base date data. */
|
|
186
204
|
getItem(): Ref<NumberOrStringOrDate>;
|
|
187
|
-
/** Get Date object. */
|
|
188
205
|
getDate(): Ref<Date>;
|
|
189
|
-
/** Get base Datetime class instance. */
|
|
190
206
|
getDatetime(): Datetime;
|
|
191
|
-
/** Get hour format. */
|
|
192
207
|
getHoursType(): ComputedRef<GeoHours>;
|
|
193
|
-
/** Get first day of week code. */
|
|
194
208
|
getFirstDayCode(): ComputedRef<GeoFirstDay>;
|
|
195
|
-
/** Get year. */
|
|
196
209
|
getYear(): ComputedRef<number>;
|
|
197
|
-
/** Get zero-based month. */
|
|
198
210
|
getMonth(): ComputedRef<number>;
|
|
199
|
-
/** Get day of month. */
|
|
200
211
|
getDay(): ComputedRef<number>;
|
|
201
|
-
/** Get hour. */
|
|
202
212
|
getHour(): ComputedRef<number>;
|
|
203
|
-
/** Get minutes. */
|
|
204
213
|
getMinute(): ComputedRef<number>;
|
|
205
|
-
/** Get seconds. */
|
|
206
214
|
getSecond(): ComputedRef<number>;
|
|
207
|
-
/** Get last day of week. */
|
|
208
215
|
getMaxDay(): ComputedRef<number>;
|
|
209
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* Language-sensitive formatting.
|
|
218
|
+
* @param type Output format
|
|
219
|
+
* @param styleOptions Month representation/options
|
|
220
|
+
*/
|
|
210
221
|
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): ComputedRef<string>;
|
|
211
|
-
/**
|
|
222
|
+
/**
|
|
223
|
+
* Standard data output.
|
|
224
|
+
* @param timeZone Include timezone
|
|
225
|
+
*/
|
|
212
226
|
standard(timeZone?: boolean): ComputedRef<string>;
|
|
213
227
|
}
|
|
214
228
|
|
|
215
|
-
/**
|
|
229
|
+
/** Base design class. */
|
|
216
230
|
export declare abstract class DesignAbstract<T extends Record<string, any>, C extends Record<string, any>> {
|
|
217
231
|
constructor(props: T, callback?: ((event: C) => void) | undefined, changed?: string[]);
|
|
218
|
-
/**
|
|
232
|
+
/** Triggers update. */
|
|
219
233
|
make(compelled?: boolean): this;
|
|
220
|
-
/**
|
|
234
|
+
/** Triggers callback. */
|
|
221
235
|
makeCallback(compelled?: boolean): void;
|
|
222
236
|
}
|
|
223
237
|
|
|
224
|
-
/**
|
|
238
|
+
/** Async base design class. */
|
|
225
239
|
export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
|
|
226
240
|
make(compelled?: boolean): this;
|
|
227
241
|
makeCallback(compelled?: boolean): Promise<void>;
|
|
228
242
|
}
|
|
229
243
|
|
|
230
|
-
/**
|
|
244
|
+
/** Tracks edited values. */
|
|
231
245
|
export declare class DesignChanged<T extends Record<string, any>> {
|
|
232
246
|
constructor(props: T, watch?: string[]);
|
|
233
247
|
/** Check if specific property updated. */
|
|
234
248
|
is(name: string | string[]): boolean;
|
|
235
|
-
/** Check
|
|
249
|
+
/** Check for any changes. */
|
|
236
250
|
isChanged(): boolean;
|
|
237
|
-
/** Update
|
|
251
|
+
/** Update tracked values. */
|
|
238
252
|
update(): void;
|
|
239
253
|
}
|
|
240
254
|
|
|
241
255
|
export declare class DesignComp<COMP extends ConstrComponent, P extends ConstrItem> extends DesignComponents<COMP, P> {
|
|
242
256
|
}
|
|
243
257
|
|
|
244
|
-
/**
|
|
258
|
+
/** Manages connected components. */
|
|
245
259
|
export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
|
|
246
260
|
constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
|
|
247
261
|
/** Check component presence. */
|
|
248
262
|
is<K extends keyof COMP>(name: K): name is K;
|
|
249
263
|
/** Get component object. */
|
|
250
264
|
get<K extends keyof COMP>(name: K): COMP[K];
|
|
251
|
-
/** Get modified
|
|
265
|
+
/** Get modified props for child component. */
|
|
252
266
|
getModification<K extends keyof P>(index?: K & string | string, props?: P[K] | Record<string, any>): Record<string, any> | undefined;
|
|
253
267
|
/** Render component in array. */
|
|
254
268
|
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[];
|
|
@@ -258,30 +272,21 @@ export declare class DesignComponents<COMP extends ConstrComponent, P extends Co
|
|
|
258
272
|
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;
|
|
259
273
|
}
|
|
260
274
|
|
|
261
|
-
/**
|
|
275
|
+
/** Main constructor for functional components. */
|
|
262
276
|
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> {
|
|
263
277
|
protected constructor(name: string, props: Readonly<P>, options?: ConstrOptions<COMP, EMITS, P> | undefined);
|
|
264
|
-
protected init(): this;
|
|
265
|
-
/** Get class name. */
|
|
266
278
|
getName(): string;
|
|
267
|
-
/** Get design name. */
|
|
268
279
|
getDesign(): string;
|
|
269
|
-
/** Get sub-class name. */
|
|
270
280
|
getSubClass(name: string | string[]): string;
|
|
271
|
-
/** Get status-specific class name. */
|
|
272
281
|
getStatusClass(name: string | string[]): string;
|
|
273
|
-
/** Get style property name. */
|
|
274
282
|
getStyle(name: string | string[]): string;
|
|
275
|
-
/** Get extra parameters. */
|
|
276
283
|
getAttrs(): ConstrItem;
|
|
277
|
-
/** Expose public variables. */
|
|
278
284
|
expose(): ConstrExpose<E, EXPOSE>;
|
|
279
|
-
/** Vue setup render method. */
|
|
280
285
|
render(): () => VNode | (VNode | any)[] | undefined;
|
|
281
286
|
}
|
|
282
287
|
|
|
283
288
|
/**
|
|
284
|
-
* Vue plugin for
|
|
289
|
+
* Vue plugin for global services.
|
|
285
290
|
* @example
|
|
286
291
|
* ```typescript
|
|
287
292
|
* app.use(dxtFunctionalPlugin, { api: { url: '...' }, router })
|
|
@@ -291,59 +296,48 @@ export declare const dxtFunctionalPlugin: Plugin_2;
|
|
|
291
296
|
|
|
292
297
|
/** Global effect scope utility. */
|
|
293
298
|
export declare class EffectScopeGlobal {
|
|
294
|
-
/** Run function in global scope. */
|
|
295
299
|
static run<T>(fn: () => T): T | undefined;
|
|
296
300
|
}
|
|
297
301
|
|
|
298
|
-
/**
|
|
302
|
+
/** Event handler with reactive element. */
|
|
299
303
|
export declare class EventRef<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> extends EventItem<E, O, D> {
|
|
300
304
|
constructor(elementSelector?: RefOrNormal<ElementOrString<E> | undefined>, elementSelectorControl?: RefOrNormal<ElementOrString<HTMLElement>>, type?: string | string[], listener?: EventListenerDetail<O, D>, options?: EventOptions, detail?: D);
|
|
301
305
|
}
|
|
302
306
|
|
|
303
307
|
/**
|
|
304
|
-
*
|
|
305
|
-
* @remarks
|
|
306
|
-
* Use for API services, resource optimization, shared state, or SDK initialization.
|
|
308
|
+
* Managed singleton for state/API.
|
|
309
|
+
* @remarks Use for API clients, shared state, or SDKs.
|
|
307
310
|
* @example
|
|
308
311
|
* export const useUserApi = executeUseGlobal(() => useApiGet('/api/user'));
|
|
309
312
|
*/
|
|
310
313
|
export declare function executeUse<R, O extends any[], RI extends ExecuteUseReturn<R> = ExecuteUseReturn<R>>(callback: (...args: O) => R, type?: ExecuteUseType): ((...args: O) => RI) | (() => RI);
|
|
311
314
|
|
|
312
|
-
/** Creates
|
|
313
|
-
export declare function executeUseGlobal<R>(callback: () => R): (() =>
|
|
314
|
-
init(): Readonly<R>;
|
|
315
|
-
destroyExecute?(): void;
|
|
316
|
-
}>);
|
|
315
|
+
/** Creates global singleton. */
|
|
316
|
+
export declare function executeUseGlobal<R>(callback: () => R): (() => ExecuteUseReturn<R>);
|
|
317
317
|
|
|
318
|
-
/**
|
|
318
|
+
/** Inits global callbacks. */
|
|
319
319
|
export declare function executeUseGlobalInit(): void;
|
|
320
320
|
|
|
321
|
-
/** Creates
|
|
322
|
-
export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) =>
|
|
323
|
-
init(): Readonly<R>;
|
|
324
|
-
destroyExecute?(): void;
|
|
325
|
-
}>);
|
|
321
|
+
/** Creates local singleton in closure. */
|
|
322
|
+
export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => ExecuteUseReturn<R>);
|
|
326
323
|
|
|
327
|
-
/** Creates
|
|
328
|
-
export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) =>
|
|
329
|
-
init(): Readonly<R>;
|
|
330
|
-
destroyExecute?(): void;
|
|
331
|
-
}>);
|
|
324
|
+
/** Creates provide/inject singleton. */
|
|
325
|
+
export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => ExecuteUseReturn<R>);
|
|
332
326
|
|
|
333
|
-
/**
|
|
327
|
+
/** Factory return object. */
|
|
334
328
|
export declare type ExecuteUseReturn<R> = Readonly<R & {
|
|
335
329
|
init(): Readonly<R>;
|
|
336
330
|
destroyExecute?(): void;
|
|
337
331
|
}>;
|
|
338
332
|
|
|
339
|
-
/** Singleton
|
|
333
|
+
/** Singleton strategies. */
|
|
340
334
|
export declare enum ExecuteUseType {
|
|
341
335
|
global = "global",
|
|
342
336
|
provide = "provide",
|
|
343
337
|
local = "local"
|
|
344
338
|
}
|
|
345
339
|
|
|
346
|
-
/**
|
|
340
|
+
/** Plugin options interface. */
|
|
347
341
|
export declare interface FunctionalPluginOptions {
|
|
348
342
|
api?: ApiConfig;
|
|
349
343
|
translate?: TranslateConfig;
|
|
@@ -353,102 +347,69 @@ export declare interface FunctionalPluginOptions {
|
|
|
353
347
|
errorCauses?: ErrorCenterCauseList;
|
|
354
348
|
}
|
|
355
349
|
|
|
356
|
-
/**
|
|
350
|
+
/** Country/flag utility. */
|
|
357
351
|
export declare class GeoFlagRef {
|
|
358
352
|
constructor(code?: RefOrNormal<string>);
|
|
359
|
-
/** Get reactive country code. */
|
|
360
353
|
getCode(): Ref<string>;
|
|
361
|
-
/** Get country/flag info. */
|
|
362
354
|
get(code?: string): ComputedRef<GeoFlagItem | undefined>;
|
|
363
|
-
/** Get flag link. */
|
|
364
355
|
getFlag(code?: string): ComputedRef<string | undefined>;
|
|
365
|
-
/** Get list by country codes. */
|
|
366
356
|
getList(codes?: string[]): ComputedRef<GeoFlagItem[]>;
|
|
367
|
-
/** Get list in national language. */
|
|
368
357
|
getNational(codes?: string[]): ComputedRef<GeoFlagNational[]>;
|
|
369
358
|
}
|
|
370
359
|
|
|
371
|
-
/** Reactive
|
|
360
|
+
/** Reactive numbers/dates formatting. */
|
|
372
361
|
export declare class GeoIntlRef {
|
|
373
362
|
constructor(code?: RefOrNormal<string>);
|
|
374
|
-
/** Display names for languages/regions. */
|
|
375
363
|
display(value?: RefOrNormal<string>, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): ComputedRef<string>;
|
|
376
|
-
/** Language display name. */
|
|
377
364
|
languageName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
378
|
-
/** Region display name. */
|
|
379
365
|
countryName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
380
|
-
/** Number formatting. */
|
|
381
366
|
number(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
382
|
-
/** Decimal point symbol. */
|
|
383
367
|
decimal(): ComputedRef<string>;
|
|
384
|
-
/** Currency formatting. */
|
|
385
368
|
currency(value: RefOrNormal<NumberOrString>, currencyOptions?: RefOrNormal<string | Intl.NumberFormatOptions>, numberOnly?: boolean): ComputedRef<string>;
|
|
386
|
-
/** Currency symbol or code. */
|
|
387
369
|
currencySymbol(currency: RefOrNormal<string>, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): ComputedRef<string>;
|
|
388
|
-
/** Unit formatting. */
|
|
389
370
|
unit(value: RefOrNormal<NumberOrString>, unitOptions?: string | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
390
|
-
/** Formatted file size. */
|
|
391
371
|
sizeFile(value: RefOrNormal<NumberOrString>, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
392
|
-
/** Percentage formatting. */
|
|
393
372
|
percent(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
394
|
-
/** Percentage formatting (unit). */
|
|
395
373
|
percentBy100(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
396
|
-
/** Plural rule formatting. */
|
|
397
374
|
plural(value: RefOrNormal<NumberOrString>, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
398
|
-
/** Date/time formatting. */
|
|
399
375
|
date(value: RefOrNormal<NumberOrStringOrDate>, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): ComputedRef<string>;
|
|
400
|
-
/** Relative time formatting. */
|
|
401
376
|
relative(value: RefOrNormal<NumberOrStringOrDate>, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): ComputedRef<string>;
|
|
402
|
-
/** Relative time formatting with fallback limit. */
|
|
403
377
|
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>;
|
|
404
|
-
/** Relative time by specific unit. */
|
|
405
378
|
relativeByValue(value: RefOrNormal<NumberOrString>, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): ComputedRef<string>;
|
|
406
|
-
/** Month name. */
|
|
407
379
|
month(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['month']): ComputedRef<string>;
|
|
408
|
-
/** List of all months. */
|
|
409
380
|
months(style?: Intl.DateTimeFormatOptions['month']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
410
|
-
/** Weekday name. */
|
|
411
381
|
weekday(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<string>;
|
|
412
|
-
/** List of all weekdays. */
|
|
413
382
|
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
414
|
-
/** Time formatting. */
|
|
415
383
|
time(value: RefOrNormal<NumberOrStringOrDate>): ComputedRef<string>;
|
|
416
|
-
/** Locale-aware array sorting. */
|
|
417
384
|
sort<T>(data: RefOrNormal<T[]>, compareFn?: (a: T, b: T) => [string, string]): ComputedRef<T[]>;
|
|
418
385
|
}
|
|
419
386
|
|
|
420
|
-
/**
|
|
387
|
+
/** Global geographic data management. */
|
|
421
388
|
export declare class GeoRef {
|
|
422
|
-
/** Get full geo info. */
|
|
423
389
|
static get(): Ref<GeoItemFull>;
|
|
424
|
-
/** Get country code. */
|
|
425
390
|
static getCountry(): ComputedRef<string>;
|
|
426
|
-
/** Get language code. */
|
|
427
391
|
static getLanguage(): ComputedRef<string>;
|
|
428
|
-
/** Get standard locale string. */
|
|
429
392
|
static getStandard(): ComputedRef<string>;
|
|
430
|
-
/** Get first day of week. */
|
|
431
393
|
static getFirstDay(): ComputedRef<string>;
|
|
432
|
-
/** Set locale by code. */
|
|
433
394
|
static set(code: string): void;
|
|
434
395
|
}
|
|
435
396
|
|
|
436
|
-
/**
|
|
397
|
+
/** Generate subcomponent properties. */
|
|
437
398
|
export declare function getBind<T, R extends ItemList>(value: T | R | undefined | null, nameExtra?: ItemList | string, name?: string, except?: boolean): ConstrBind<R>;
|
|
438
399
|
|
|
439
|
-
/**
|
|
400
|
+
/** Reactive subcomponent properties. */
|
|
440
401
|
export declare function getBindRef<T, R extends ItemList>(value: RefOrNormal<T | R> | undefined, nameExtra?: RefOrNormal<ItemList> | string, name?: string): ComputedRef<R>;
|
|
441
402
|
|
|
442
403
|
/** Get class name from props. */
|
|
443
404
|
export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
|
|
444
405
|
|
|
445
|
-
/** Get
|
|
406
|
+
/** Get/gen render index. */
|
|
446
407
|
export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
|
|
447
408
|
|
|
448
|
-
/** Get API
|
|
409
|
+
/** Get API options. */
|
|
449
410
|
export declare const getOptions: (options?: ApiOptions) => RefOrNormal<ApiFetch>;
|
|
450
411
|
|
|
451
|
-
/** Unwrap ref
|
|
412
|
+
/** Unwrap ref value. */
|
|
452
413
|
export declare function getRef<T>(item: RefOrNormal<T>): T;
|
|
453
414
|
|
|
454
415
|
export declare type LazyItem = {
|
|
@@ -465,7 +426,7 @@ export declare type LazyItemByMargin = {
|
|
|
465
426
|
|
|
466
427
|
export declare type LazyList = Record<string, LazyItem>;
|
|
467
428
|
|
|
468
|
-
/**
|
|
429
|
+
/** Basic list item structure. */
|
|
469
430
|
export declare type ListDataBasic = {
|
|
470
431
|
label?: NumberOrString;
|
|
471
432
|
value?: any;
|
|
@@ -475,7 +436,7 @@ export declare type ListDataBasic = {
|
|
|
475
436
|
/** List items with state. */
|
|
476
437
|
export declare type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
|
|
477
438
|
|
|
478
|
-
/** List item
|
|
439
|
+
/** List item state properties. */
|
|
479
440
|
export declare type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
|
|
480
441
|
focus: boolean;
|
|
481
442
|
highlight?: string;
|
|
@@ -483,14 +444,14 @@ export declare type ListDataFullItem<Item extends ListDataBasic = ListDataBasic>
|
|
|
483
444
|
disabled?: boolean;
|
|
484
445
|
};
|
|
485
446
|
|
|
486
|
-
/**
|
|
447
|
+
/** Identified list item. */
|
|
487
448
|
export declare type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
|
|
488
449
|
parent?: string;
|
|
489
450
|
type: ListType;
|
|
490
451
|
index: string;
|
|
491
452
|
}>;
|
|
492
453
|
|
|
493
|
-
/** List data
|
|
454
|
+
/** List data management class. */
|
|
494
455
|
export declare class ListDataRef {
|
|
495
456
|
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);
|
|
496
457
|
readonly data: ComputedRef<ListList>;
|
|
@@ -527,10 +488,7 @@ export declare class ListDataRef {
|
|
|
527
488
|
getIndexByStep(index: string, step: number): ListDataItem | undefined;
|
|
528
489
|
getIndexNext(index: string): ListDataItem | undefined;
|
|
529
490
|
getIndexPrev(index: string): ListDataItem | undefined;
|
|
530
|
-
getItemByIndex(index?: string): {
|
|
531
|
-
key: number;
|
|
532
|
-
item: ListDataItem;
|
|
533
|
-
} | undefined;
|
|
491
|
+
getItemByIndex(index?: string): { key: number; item: ListDataItem; } | undefined;
|
|
534
492
|
getItemByKey(key: number): ListDataItem | undefined;
|
|
535
493
|
getFirstItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
536
494
|
getLastItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
@@ -538,45 +496,26 @@ export declare class ListDataRef {
|
|
|
538
496
|
}
|
|
539
497
|
|
|
540
498
|
export declare type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
|
|
541
|
-
|
|
542
499
|
export declare type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
|
|
543
|
-
|
|
544
500
|
export declare type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
|
|
545
|
-
|
|
546
501
|
export declare type ListName = string | number | undefined;
|
|
547
|
-
|
|
548
502
|
export declare type ListNames = ListName[];
|
|
549
|
-
|
|
550
503
|
export declare type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
|
|
551
|
-
|
|
552
504
|
export declare type ListSelectedItem = NumberOrStringOrBoolean;
|
|
553
|
-
|
|
554
505
|
export declare type ListSelectedList = ListSelectedItem | ListSelectedItem[];
|
|
555
|
-
|
|
556
506
|
export declare type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
557
507
|
|
|
558
|
-
/** Vue raw children union. */
|
|
559
508
|
export declare type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
|
|
509
|
+
export declare type RawSlots = { [name: string]: unknown; $stable?: boolean; };
|
|
560
510
|
|
|
561
|
-
/** Vue raw slots object. */
|
|
562
|
-
export declare type RawSlots = {
|
|
563
|
-
[name: string]: unknown;
|
|
564
|
-
$stable?: boolean;
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
/** Type supporting Ref or raw value. */
|
|
568
511
|
export declare type RefOrNormal<T> = RefType<T> | T;
|
|
569
|
-
|
|
570
|
-
/** Ref or ComputedRef union. */
|
|
571
512
|
export declare type RefType<T> = ComputedRef<T> | Ref<T>;
|
|
572
|
-
|
|
573
|
-
/** Optional Ref union. */
|
|
574
513
|
export declare type RefUndefined<T> = RefType<T | undefined>;
|
|
575
514
|
|
|
576
|
-
/** Render cached
|
|
515
|
+
/** Render cached/immutable data. */
|
|
577
516
|
export declare function render<T extends ItemList>(name: string | any, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
|
|
578
517
|
|
|
579
|
-
/** Router
|
|
518
|
+
/** Router utilities. */
|
|
580
519
|
export declare class RouterItemRef {
|
|
581
520
|
static get(): Router;
|
|
582
521
|
static getLink(name: string, params?: any, query?: any): string | undefined;
|
|
@@ -587,7 +526,7 @@ export declare class RouterItemRef {
|
|
|
587
526
|
static rawToHref(to?: string | RouteLocationRaw): ConstrHrefProps;
|
|
588
527
|
}
|
|
589
528
|
|
|
590
|
-
/**
|
|
529
|
+
/** Scrollbar width detector. */
|
|
591
530
|
export declare class ScrollbarWidthRef {
|
|
592
531
|
readonly item: Ref<boolean | undefined, boolean | undefined>;
|
|
593
532
|
readonly width: Ref<number, number>;
|
|
@@ -596,45 +535,41 @@ export declare class ScrollbarWidthRef {
|
|
|
596
535
|
}
|
|
597
536
|
|
|
598
537
|
export declare type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
|
|
599
|
-
|
|
600
538
|
export declare type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
|
|
601
539
|
|
|
602
|
-
/**
|
|
540
|
+
/** Global API conditions. */
|
|
603
541
|
export declare const setApiRefGlobalConditions: (conditions: RefType<any>) => void;
|
|
604
542
|
|
|
605
|
-
/** Update
|
|
543
|
+
/** Update reactive ref. */
|
|
606
544
|
export declare function setRef<T>(item: Ref<T>, value: T): void;
|
|
607
545
|
|
|
608
|
-
/** Shorthand for
|
|
546
|
+
/** Shorthand for translation. */
|
|
609
547
|
export declare const t: <T extends string[]>(names: T) => ShallowRef<TranslateList<T>>;
|
|
610
548
|
|
|
611
|
-
/**
|
|
549
|
+
/** Merge objects with class/style awareness. */
|
|
612
550
|
export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, value: ItemList): ConstrBind<R>;
|
|
613
|
-
|
|
614
|
-
/** Merges multiple objects preserving classes/styles. */
|
|
615
551
|
export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
|
|
616
552
|
|
|
617
|
-
/**
|
|
553
|
+
/** Ensure value is Ref. */
|
|
618
554
|
export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
|
|
619
555
|
|
|
620
556
|
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
621
557
|
|
|
622
|
-
/** API DELETE request
|
|
558
|
+
/** API DELETE request. */
|
|
623
559
|
export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
|
|
624
560
|
loading: Ref<boolean, boolean>;
|
|
625
561
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
626
562
|
};
|
|
627
563
|
|
|
628
|
-
/** API GET request
|
|
564
|
+
/** API GET request. */
|
|
629
565
|
export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
|
|
630
566
|
loading: Ref<boolean, boolean>;
|
|
631
567
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
632
568
|
};
|
|
633
569
|
|
|
634
570
|
/**
|
|
635
|
-
*
|
|
636
|
-
* @note
|
|
637
|
-
* @remarks Recommended for formatting values (prices, dates) but not technical IDs.
|
|
571
|
+
* Advanced API orchestration (GET, List, Search, Mutations).
|
|
572
|
+
* @note Best used with `executeUse`.
|
|
638
573
|
* @example
|
|
639
574
|
* const products = useApiManagementRef({ path: '/api/v1/products' }, { price: (v) => `${v}$` });
|
|
640
575
|
*/
|
|
@@ -660,19 +595,19 @@ export declare function useApiManagementRef<Return extends ApiManagementValue, F
|
|
|
660
595
|
sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
|
|
661
596
|
};
|
|
662
597
|
|
|
663
|
-
/** API POST request
|
|
598
|
+
/** API POST request. */
|
|
664
599
|
export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
|
|
665
600
|
loading: Ref<boolean, boolean>;
|
|
666
601
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
667
602
|
};
|
|
668
603
|
|
|
669
|
-
/** API PUT request
|
|
604
|
+
/** API PUT request. */
|
|
670
605
|
export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
|
|
671
606
|
loading: Ref<boolean, boolean>;
|
|
672
607
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
673
608
|
};
|
|
674
609
|
|
|
675
|
-
/**
|
|
610
|
+
/** useApiRef return interface. */
|
|
676
611
|
export declare interface UseApiRef<R> {
|
|
677
612
|
data: ComputedRef<ApiData<R> | undefined>;
|
|
678
613
|
item: Ref<ApiData<R> | undefined>;
|
|
@@ -692,31 +627,30 @@ export declare interface UseApiRef<R> {
|
|
|
692
627
|
abort(): void;
|
|
693
628
|
}
|
|
694
629
|
|
|
695
|
-
/** Reactive request handling
|
|
630
|
+
/** Reactive request handling. */
|
|
696
631
|
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, unmounted?: boolean, apiInstance?: ApiInstance): UseApiRef<R>;
|
|
697
632
|
|
|
698
|
-
/**
|
|
633
|
+
/** Basic API request composable. */
|
|
699
634
|
export declare function useApiRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(path?: RefOrNormal<string | undefined>, method?: ApiMethodItem, action?: (data: Return | undefined) => Promise<void> | void, transformation?: (data: T) => Return, toData?: boolean, options?: ApiOptions, apiInstance?: ApiInstance): {
|
|
700
635
|
loading: Ref<boolean, boolean>;
|
|
701
636
|
send(request?: Request): Promise<Return | undefined>;
|
|
702
637
|
};
|
|
703
638
|
|
|
704
|
-
/**
|
|
639
|
+
/** Sync data between tabs. */
|
|
705
640
|
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<BroadcastValueItem<T>>;
|
|
706
641
|
|
|
707
|
-
/**
|
|
642
|
+
/** Manage cookies reactively. */
|
|
708
643
|
export declare function useCookieRef<T>(name: string, defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): Ref<T | string | undefined>;
|
|
709
644
|
|
|
710
|
-
/** Reactive list formatting
|
|
645
|
+
/** Reactive list formatting. */
|
|
711
646
|
export declare function useFormattersRef<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp>(list: RefType<List | undefined>, options: Options): {
|
|
712
647
|
listFormat: ComputedRef<FormattersReturn<List, Options>>;
|
|
713
648
|
length: ComputedRef<number>;
|
|
714
649
|
};
|
|
715
650
|
|
|
716
|
-
/** Returns GeoIntlRef instance. */
|
|
717
651
|
export declare function useGeoIntlRef(): GeoIntlRef;
|
|
718
652
|
|
|
719
|
-
/** Reactive
|
|
653
|
+
/** Reactive hash management. */
|
|
720
654
|
export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
721
655
|
|
|
722
656
|
/** Track element appearance by margin. */
|
|
@@ -725,7 +659,7 @@ export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | und
|
|
|
725
659
|
readonly lazyItem: any;
|
|
726
660
|
};
|
|
727
661
|
|
|
728
|
-
/**
|
|
662
|
+
/** Element visibility tracking. */
|
|
729
663
|
export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
730
664
|
intersectionObserver: IntersectionObserver | undefined;
|
|
731
665
|
getItem(element: HTMLElement): LazyItem;
|
|
@@ -734,10 +668,9 @@ export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
|
734
668
|
disconnectLazy: () => void | undefined;
|
|
735
669
|
};
|
|
736
670
|
|
|
737
|
-
/** Returns loading status Ref. */
|
|
738
671
|
export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
|
|
739
672
|
|
|
740
|
-
/**
|
|
673
|
+
/** Global meta tag management. */
|
|
741
674
|
export declare const useMeta: () => Readonly<{
|
|
742
675
|
meta: Meta;
|
|
743
676
|
title: Ref<string, string>;
|
|
@@ -767,7 +700,7 @@ export declare const useMeta: () => Readonly<{
|
|
|
767
700
|
destroyExecute?(): void;
|
|
768
701
|
}>;
|
|
769
702
|
|
|
770
|
-
/** Router
|
|
703
|
+
/** Router-linked list. */
|
|
771
704
|
export declare const useRouterList: <T extends ListDataBasic>(list: RefType<ConstrBind<T>[] | undefined>, selected?: Ref<string> | string, hasTo?: boolean) => {
|
|
772
705
|
item: ComputedRef<T | undefined>;
|
|
773
706
|
selected: Ref<string, string>;
|
|
@@ -777,7 +710,7 @@ export declare const useRouterList: <T extends ListDataBasic>(list: RefType<Cons
|
|
|
777
710
|
toMain(): void;
|
|
778
711
|
};
|
|
779
712
|
|
|
780
|
-
/** Reactive search logic
|
|
713
|
+
/** Reactive search logic. */
|
|
781
714
|
export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns: K, value?: Ref<string>, options?: SearchOptions): {
|
|
782
715
|
isSearch: ComputedRef<boolean>;
|
|
783
716
|
search: Ref<string, string>;
|
|
@@ -786,27 +719,28 @@ export declare function useSearchRef<T extends SearchItem, K extends SearchColum
|
|
|
786
719
|
length: ComputedRef<number>;
|
|
787
720
|
};
|
|
788
721
|
|
|
789
|
-
/**
|
|
722
|
+
/** Search state with debounce. */
|
|
790
723
|
export declare function useSearchValueRef<T extends SearchItem, K extends SearchColumns<T>>(item: SearchList<T, K>, value?: Ref<string>): {
|
|
791
724
|
search: Ref<string, string>;
|
|
792
725
|
searchDelay: Ref<string, string>;
|
|
793
726
|
loading: Ref<boolean, boolean>;
|
|
794
727
|
};
|
|
795
728
|
|
|
796
|
-
/** Reactive session storage
|
|
729
|
+
/** Reactive session storage. */
|
|
797
730
|
export declare function useSessionRef<T>(name: string, defaultValue?: T | (() => T)): Ref<T | undefined>;
|
|
798
731
|
|
|
799
|
-
/** Reactive local storage
|
|
732
|
+
/** Reactive local storage. */
|
|
800
733
|
export declare function useStorageRef<T>(name: string, defaultValue?: T | (() => T), cache?: number): Ref<T | undefined>;
|
|
801
734
|
|
|
802
735
|
/**
|
|
803
|
-
*
|
|
736
|
+
* Reactive translation retrieval.
|
|
804
737
|
* @example
|
|
805
|
-
* const
|
|
738
|
+
* const tr = useTranslateRef(['home.title'] as const);
|
|
806
739
|
*/
|
|
807
740
|
export declare function useTranslateRef<T extends (string | string[])[]>(names: T, translateInstance?: TranslateInstance): ShallowRef<TranslateList<T>>;
|
|
808
741
|
|
|
809
742
|
export * from "@dxtmisha/functional-basic";
|
|
743
|
+
|
|
810
744
|
export { }
|
|
811
745
|
|
|
812
746
|
go!
|