@dxtmisha/functional 1.11.12 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/ai-description.txt +5 -1
- package/ai-types.txt +455 -213
- package/dist/library.js +55 -22
- package/dist/src/composables/ref/useApiDelete.d.ts +11 -16
- package/dist/src/composables/ref/useApiGet.d.ts +11 -16
- package/dist/src/composables/ref/useApiPost.d.ts +11 -16
- package/dist/src/composables/ref/useApiPut.d.ts +11 -16
- package/dist/src/composables/ref/useApiRequest.d.ts +85 -15
- package/dist/src/functions/dxtFunctionalPlugin.d.ts +6 -1
- package/dist/src/types/apiTypes.d.ts +5 -1
- package/package.json +1 -1
package/ai-types.txt
CHANGED
|
@@ -15,363 +15,418 @@ The following is the content of "exports" from package.json:
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// File: src/classes/design/DesignAbstract.d.ts
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Base constructor class.
|
|
20
|
+
*/
|
|
19
21
|
export declare abstract class DesignAbstract<T extends Record<string, any>, C extends Record<string, any>> {
|
|
20
22
|
/**
|
|
23
|
+
* Constructor
|
|
21
24
|
* @param props base data
|
|
22
|
-
* @param callback callback
|
|
23
|
-
* @param changed
|
|
25
|
+
* @param callback change callback
|
|
26
|
+
* @param changed tracking data
|
|
24
27
|
*/
|
|
25
28
|
constructor(props: T, callback?: ((event: C) => void) | undefined, changed?: string[]);
|
|
26
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Executes callback.
|
|
31
|
+
* @param compelled forces update
|
|
32
|
+
*/
|
|
27
33
|
make(compelled?: boolean): this;
|
|
28
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Executes callback.
|
|
36
|
+
* @param compelled forces update
|
|
37
|
+
*/
|
|
29
38
|
makeCallback(compelled?: boolean): void;
|
|
39
|
+
/**
|
|
40
|
+
* Called when input values change.
|
|
41
|
+
*/
|
|
42
|
+
protected abstract initEvent(): void;
|
|
30
43
|
}
|
|
31
44
|
// File: src/classes/design/DesignAsyncAbstract.d.ts
|
|
32
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Base constructor class.
|
|
47
|
+
*/
|
|
33
48
|
export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
|
|
34
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Executes callback.
|
|
51
|
+
* @param compelled forces update
|
|
52
|
+
*/
|
|
35
53
|
make(compelled?: boolean): this;
|
|
36
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Executes callback.
|
|
56
|
+
* @param compelled forces update
|
|
57
|
+
*/
|
|
37
58
|
makeCallback(compelled?: boolean): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Called when input values change.
|
|
61
|
+
*/
|
|
62
|
+
protected abstract initEvent(): Promise<void>;
|
|
38
63
|
}
|
|
39
64
|
// File: src/classes/design/DesignChanged.d.ts
|
|
40
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Checks edited values.
|
|
67
|
+
*/
|
|
41
68
|
export declare class DesignChanged<T extends Record<string, any>> {
|
|
42
69
|
/**
|
|
70
|
+
* Constructor
|
|
43
71
|
* @param props base data
|
|
44
|
-
* @param watch data
|
|
72
|
+
* @param watch tracking data
|
|
45
73
|
*/
|
|
46
74
|
constructor(props: T, watch?: string[]);
|
|
47
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Checks if updated.
|
|
77
|
+
* @param name property name
|
|
78
|
+
*/
|
|
48
79
|
is(name: string | string[]): boolean;
|
|
49
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Checks for changes.
|
|
82
|
+
*/
|
|
50
83
|
isChanged(): boolean;
|
|
51
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Updates values.
|
|
86
|
+
*/
|
|
52
87
|
update(): void;
|
|
53
88
|
}
|
|
54
89
|
// File: src/classes/design/DesignComp.d.ts
|
|
55
90
|
export declare class DesignComp<COMP extends ConstrComponent, P extends ConstrItem> extends DesignComponents<COMP, P> {
|
|
56
91
|
}
|
|
57
92
|
// File: src/classes/design/DesignComponents.d.ts
|
|
58
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Class for connected components.
|
|
95
|
+
*/
|
|
59
96
|
export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
|
|
60
97
|
/**
|
|
61
|
-
*
|
|
62
|
-
* @param
|
|
98
|
+
* Constructor
|
|
99
|
+
* @param components list of components
|
|
100
|
+
* @param modification modification data
|
|
63
101
|
*/
|
|
64
102
|
constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
|
|
65
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Checks component presence.
|
|
105
|
+
* @param name component name
|
|
106
|
+
*/
|
|
66
107
|
is<K extends keyof COMP>(name: K): name is K;
|
|
67
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Gets component object.
|
|
110
|
+
* @param name component name
|
|
111
|
+
*/
|
|
68
112
|
get<K extends keyof COMP>(name: K): COMP[K];
|
|
69
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* Returns modified input data.
|
|
115
|
+
* @param index name
|
|
116
|
+
* @param props basic data
|
|
117
|
+
*/
|
|
70
118
|
getModification<K extends keyof P>(index?: K & string | string, props?: P[K] | Record<string, any>): Record<string, any> | undefined;
|
|
71
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Renders component as array.
|
|
121
|
+
* @param name component name
|
|
122
|
+
* @param props component props
|
|
123
|
+
* @param children sub-elements
|
|
124
|
+
* @param index key name
|
|
125
|
+
*/
|
|
72
126
|
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[];
|
|
73
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* Renders single component.
|
|
129
|
+
* @param name component name
|
|
130
|
+
* @param props component props
|
|
131
|
+
* @param children sub-elements
|
|
132
|
+
* @param index key name
|
|
133
|
+
*/
|
|
74
134
|
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;
|
|
75
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* Adds rendered component to array.
|
|
137
|
+
* @param item target array
|
|
138
|
+
* @param name component name
|
|
139
|
+
* @param props component props
|
|
140
|
+
* @param children sub-elements
|
|
141
|
+
* @param index key name
|
|
142
|
+
*/
|
|
76
143
|
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;
|
|
77
144
|
}
|
|
78
145
|
// File: src/classes/design/DesignConstructorAbstract.d.ts
|
|
79
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* Class for functional components.
|
|
148
|
+
*/
|
|
80
149
|
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> {
|
|
81
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Gets class name.
|
|
152
|
+
*/
|
|
82
153
|
getName(): string;
|
|
83
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Gets design name.
|
|
156
|
+
*/
|
|
84
157
|
getDesign(): string;
|
|
85
|
-
/**
|
|
158
|
+
/**
|
|
159
|
+
* Gets subclass name.
|
|
160
|
+
* @param name class levels
|
|
161
|
+
*/
|
|
86
162
|
getSubClass(name: string | string[]): string;
|
|
87
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* Gets status class name.
|
|
165
|
+
* @param name class levels
|
|
166
|
+
*/
|
|
88
167
|
getStatusClass(name: string | string[]): string;
|
|
89
|
-
/**
|
|
168
|
+
/**
|
|
169
|
+
* Gets style property name.
|
|
170
|
+
* @param name class levels
|
|
171
|
+
*/
|
|
90
172
|
getStyle(name: string | string[]): string;
|
|
91
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* Gets attributes.
|
|
175
|
+
*/
|
|
92
176
|
getAttrs(): ConstrItem;
|
|
93
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* External variables list.
|
|
179
|
+
*/
|
|
94
180
|
expose(): ConstrExpose<E, EXPOSE>;
|
|
95
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* Render method.
|
|
183
|
+
*/
|
|
96
184
|
render(): () => VNode | (VNode | any)[] | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* Initializes expose properties.
|
|
187
|
+
*/
|
|
188
|
+
protected abstract initExpose(): EXPOSE;
|
|
189
|
+
/**
|
|
190
|
+
* Refines class list.
|
|
191
|
+
*/
|
|
192
|
+
protected abstract initClasses(): Partial<CLASSES>;
|
|
193
|
+
/**
|
|
194
|
+
* Refines style list.
|
|
195
|
+
*/
|
|
196
|
+
protected abstract initStyles(): ConstrStyles;
|
|
197
|
+
/**
|
|
198
|
+
* Rendering logic.
|
|
199
|
+
*/
|
|
200
|
+
protected abstract initRender(): VNode | (VNode | any)[] | undefined;
|
|
97
201
|
}
|
|
98
202
|
// File: src/classes/ref/DatetimeRef.d.ts
|
|
99
|
-
/**
|
|
203
|
+
/**
|
|
204
|
+
* Date utility class.
|
|
205
|
+
*/
|
|
100
206
|
export declare class DatetimeRef {
|
|
101
207
|
/**
|
|
102
|
-
*
|
|
103
|
-
* @param
|
|
104
|
-
* @param
|
|
208
|
+
* Constructor
|
|
209
|
+
* @param date input date
|
|
210
|
+
* @param type date format
|
|
211
|
+
* @param code locale code
|
|
105
212
|
*/
|
|
106
213
|
constructor(date: RefOrNormal<NumberOrStringOrDate>, type?: RefOrNormal<GeoDate>, code?: RefOrNormal<string>);
|
|
107
|
-
/** Returns basic date data. */
|
|
108
214
|
getItem(): Ref<NumberOrStringOrDate>;
|
|
109
|
-
/** Returns Date object. */
|
|
110
215
|
getDate(): Ref<Date>;
|
|
111
|
-
/** Get base Datetime class object. */
|
|
112
216
|
getDatetime(): Datetime;
|
|
113
|
-
/** Returns hours format. */
|
|
114
217
|
getHoursType(): ComputedRef<GeoHours>;
|
|
115
|
-
/** Returns first day of week code. */
|
|
116
218
|
getFirstDayCode(): ComputedRef<GeoFirstDay>;
|
|
117
|
-
/** Get year local time. */
|
|
118
219
|
getYear(): ComputedRef<number>;
|
|
119
|
-
/** Get month local time (zero-based). */
|
|
120
220
|
getMonth(): ComputedRef<number>;
|
|
121
|
-
/** Get day of month local time. */
|
|
122
221
|
getDay(): ComputedRef<number>;
|
|
123
|
-
/** Get hour local time. */
|
|
124
222
|
getHour(): ComputedRef<number>;
|
|
125
|
-
/** Get minutes local time. */
|
|
126
223
|
getMinute(): ComputedRef<number>;
|
|
127
|
-
/** Get seconds local time. */
|
|
128
224
|
getSecond(): ComputedRef<number>;
|
|
129
|
-
/** Get last day of week. */
|
|
130
225
|
getMaxDay(): ComputedRef<number>;
|
|
131
|
-
/**
|
|
226
|
+
/**
|
|
227
|
+
* Locale formatting.
|
|
228
|
+
* @param type format type
|
|
229
|
+
* @param styleOptions month representation
|
|
230
|
+
*/
|
|
132
231
|
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): ComputedRef<string>;
|
|
133
|
-
/**
|
|
232
|
+
/**
|
|
233
|
+
* Standard output.
|
|
234
|
+
* @param timeZone include timezone
|
|
235
|
+
*/
|
|
134
236
|
standard(timeZone?: boolean): ComputedRef<string>;
|
|
135
237
|
}
|
|
136
238
|
// File: src/classes/ref/EffectScopeGlobal.d.ts
|
|
137
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* Global effect scope.
|
|
241
|
+
*/
|
|
138
242
|
export declare class EffectScopeGlobal {
|
|
139
|
-
/**
|
|
243
|
+
/**
|
|
244
|
+
* Run function in global scope.
|
|
245
|
+
*/
|
|
140
246
|
static run<T>(fn: () => T): T | undefined;
|
|
141
247
|
}
|
|
142
248
|
// File: src/classes/ref/EventRef.d.ts
|
|
143
|
-
/**
|
|
249
|
+
/**
|
|
250
|
+
* Event handling class (Ref).
|
|
251
|
+
*/
|
|
144
252
|
export declare class EventRef<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> extends EventItem<E, O, D> {
|
|
145
|
-
/**
|
|
146
|
-
* @param elementSelector element
|
|
147
|
-
* @param elementSelectorControl control element
|
|
148
|
-
* @param type type
|
|
149
|
-
* @param listener event listener
|
|
150
|
-
* @param options characteristics
|
|
151
|
-
* @param detail event-dependent value
|
|
152
|
-
*/
|
|
153
253
|
constructor(elementSelector?: RefOrNormal<ElementOrString<E> | undefined>, elementSelectorControl?: RefOrNormal<ElementOrString<HTMLElement>>, type?: string | string[], listener?: EventListenerDetail<O, D>, options?: EventOptions, detail?: D);
|
|
154
254
|
}
|
|
155
255
|
// File: src/classes/ref/GeoFlagRef.d.ts
|
|
156
|
-
/**
|
|
256
|
+
/**
|
|
257
|
+
* Flag utility class.
|
|
258
|
+
*/
|
|
157
259
|
export declare class GeoFlagRef {
|
|
158
|
-
/**
|
|
260
|
+
/**
|
|
261
|
+
* Constructor
|
|
262
|
+
* @param code locale code
|
|
263
|
+
*/
|
|
159
264
|
constructor(code?: RefOrNormal<string>);
|
|
160
|
-
/** Get reactive object with country code. */
|
|
161
265
|
getCode(): Ref<string>;
|
|
162
|
-
/** Get country and flag info. @param code country code */
|
|
163
266
|
get(code?: string): ComputedRef<GeoFlagItem | undefined>;
|
|
164
|
-
/** Get flag link. @param code country code */
|
|
165
267
|
getFlag(code?: string): ComputedRef<string | undefined>;
|
|
166
|
-
/** Get countries list by codes. @param codes country codes */
|
|
167
268
|
getList(codes?: string[]): ComputedRef<GeoFlagItem[]>;
|
|
168
|
-
/** Get countries list by codes in national language. @param codes country codes */
|
|
169
269
|
getNational(codes?: string[]): ComputedRef<GeoFlagNational[]>;
|
|
170
270
|
}
|
|
171
271
|
// File: src/classes/ref/GeoIntlRef.d.ts
|
|
172
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* Formatting for numbers and dates.
|
|
274
|
+
*/
|
|
173
275
|
export declare class GeoIntlRef {
|
|
174
|
-
/** @param code country code/language */
|
|
175
276
|
constructor(code?: RefOrNormal<string>);
|
|
176
|
-
/** Translation of display names. */
|
|
177
277
|
display(value?: RefOrNormal<string>, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): ComputedRef<string>;
|
|
178
|
-
/** Get language display name. */
|
|
179
278
|
languageName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
180
|
-
/** Get region display name. */
|
|
181
279
|
countryName(value?: RefOrNormal<string>, style?: Intl.RelativeTimeFormatStyle): ComputedRef<string>;
|
|
182
|
-
/** Number formatting. */
|
|
183
280
|
number(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
184
|
-
/** Decimal point symbol. */
|
|
185
281
|
decimal(): ComputedRef<string>;
|
|
186
|
-
/** Currency formatting. */
|
|
187
282
|
currency(value: RefOrNormal<NumberOrString>, currencyOptions?: RefOrNormal<string | Intl.NumberFormatOptions>, numberOnly?: boolean): ComputedRef<string>;
|
|
188
|
-
/** Get currency symbol or code. */
|
|
189
283
|
currencySymbol(currency: RefOrNormal<string>, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): ComputedRef<string>;
|
|
190
|
-
/** Unit formatting. */
|
|
191
284
|
unit(value: RefOrNormal<NumberOrString>, unitOptions?: string | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
192
|
-
/** Formatted file size. */
|
|
193
285
|
sizeFile(value: RefOrNormal<NumberOrString>, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): ComputedRef<string>;
|
|
194
|
-
/** Number as percentage. */
|
|
195
286
|
percent(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
196
|
-
/** Number as percentage (unit). */
|
|
197
287
|
percentBy100(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
198
|
-
/** Plural formatting. */
|
|
199
288
|
plural(value: RefOrNormal<NumberOrString>, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
200
|
-
/** Date and time formatting. */
|
|
201
289
|
date(value: RefOrNormal<NumberOrStringOrDate>, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): ComputedRef<string>;
|
|
202
|
-
/** Relative time formatting. */
|
|
203
290
|
relative(value: RefOrNormal<NumberOrStringOrDate>, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): ComputedRef<string>;
|
|
204
|
-
/** Relative time formatting with limit. */
|
|
205
291
|
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>;
|
|
206
|
-
/** Formatted relative value. */
|
|
207
292
|
relativeByValue(value: RefOrNormal<NumberOrString>, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): ComputedRef<string>;
|
|
208
|
-
/** Month names. */
|
|
209
293
|
month(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['month']): ComputedRef<string>;
|
|
210
|
-
/** List of months. */
|
|
211
294
|
months(style?: Intl.DateTimeFormatOptions['month']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
212
|
-
/** Weekday names. */
|
|
213
295
|
weekday(value?: RefOrNormal<NumberOrStringOrDate>, style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<string>;
|
|
214
|
-
/** List of weekdays. */
|
|
215
296
|
weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ComputedRef<ItemValue<number | undefined>[]>;
|
|
216
|
-
/** Time formatting. */
|
|
217
297
|
time(value: RefOrNormal<NumberOrStringOrDate>): ComputedRef<string>;
|
|
218
|
-
/** Sort strings. */
|
|
219
298
|
sort<T>(data: RefOrNormal<T[]>, compareFn?: (a: T, b: T) => [string, string]): ComputedRef<T[]>;
|
|
220
299
|
}
|
|
221
300
|
// File: src/classes/ref/GeoRef.d.ts
|
|
222
|
-
/**
|
|
301
|
+
/**
|
|
302
|
+
* Geographic data class.
|
|
303
|
+
*/
|
|
223
304
|
export declare class GeoRef {
|
|
224
|
-
/** Full geographic info. */
|
|
225
305
|
static get(): Ref<GeoItemFull>;
|
|
226
|
-
/** Current country code. */
|
|
227
306
|
static getCountry(): ComputedRef<string>;
|
|
228
|
-
/** Current language code. */
|
|
229
307
|
static getLanguage(): ComputedRef<string>;
|
|
230
|
-
/** Full standard locale format. */
|
|
231
308
|
static getStandard(): ComputedRef<string>;
|
|
232
|
-
/** First day of the week. */
|
|
233
309
|
static getFirstDay(): ComputedRef<string>;
|
|
234
|
-
/**
|
|
310
|
+
/**
|
|
311
|
+
* Changes data by code.
|
|
312
|
+
* @param code locale/country code
|
|
313
|
+
*/
|
|
235
314
|
static set(code: string): void;
|
|
236
315
|
}
|
|
237
316
|
// File: src/classes/ref/ListDataRef.d.ts
|
|
238
|
-
/**
|
|
317
|
+
/**
|
|
318
|
+
* List data management.
|
|
319
|
+
*/
|
|
239
320
|
export declare class ListDataRef {
|
|
240
321
|
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);
|
|
241
|
-
/** List for forming a list. */
|
|
242
322
|
readonly data: ComputedRef<ListList>;
|
|
243
|
-
/** Simplified list for quick loading. */
|
|
244
323
|
readonly liteData: ComputedRef<ListList>;
|
|
245
|
-
/** List with all additional state data. */
|
|
246
324
|
readonly fullData: ComputedRef<ListDataFull>;
|
|
247
|
-
/** Flat map of all entries. */
|
|
248
325
|
readonly map: ComputedRef<ListList>;
|
|
249
|
-
/** List consisting only of items. */
|
|
250
326
|
readonly mapItems: ComputedRef<ListList>;
|
|
251
|
-
/** List of values for selection. */
|
|
252
327
|
readonly items: ComputedRef<ListList>;
|
|
253
|
-
/** First found search index. */
|
|
254
328
|
readonly highlightFirstItem: ComputedRef<number>;
|
|
255
|
-
/** Is any item selected. */
|
|
256
329
|
readonly isSelected: ComputedRef<boolean>;
|
|
257
|
-
/** Is minimum selection reached. */
|
|
258
330
|
readonly isSelectedMin: ComputedRef<boolean>;
|
|
259
|
-
/** Is maximum selection reached. */
|
|
260
331
|
readonly isSelectedMax: ComputedRef<boolean>;
|
|
261
|
-
/** Selected items on map. */
|
|
262
332
|
readonly selectedList: ComputedRef<ListList>;
|
|
263
|
-
/** Selected items in current group. */
|
|
264
333
|
readonly selectedListInGroup: ComputedRef<ListList>;
|
|
265
|
-
/** Selected labels on map. */
|
|
266
334
|
readonly selectedNames: ComputedRef<ListNames>;
|
|
267
|
-
/** Selected values on map. */
|
|
268
335
|
readonly selectedValues: ComputedRef<any[]>;
|
|
269
|
-
/** Is lite mode active. */
|
|
270
336
|
isLite(): boolean;
|
|
271
|
-
/** Is element in focus. */
|
|
272
337
|
isFocus(): boolean;
|
|
273
|
-
/** Is there a search result highlight. */
|
|
274
338
|
isHighlight(): boolean;
|
|
275
|
-
/** Is highlighting active. */
|
|
276
339
|
isHighlightActive(): boolean;
|
|
277
|
-
/** Count of records in current list. */
|
|
278
340
|
getLength(): number;
|
|
279
|
-
/** Total available records in map. */
|
|
280
341
|
getLengthByMap(): number;
|
|
281
|
-
/** Total available records (items). */
|
|
282
342
|
getLengthByItems(): number;
|
|
283
|
-
/** Get focus identifier. */
|
|
284
343
|
getFocus(): ListSelectedItem | undefined;
|
|
285
|
-
/** Get item in focus. */
|
|
286
344
|
getFocusItem(): ListDataItem | undefined;
|
|
287
|
-
/** Get highlight text. */
|
|
288
345
|
getHighlight(): string | undefined;
|
|
289
|
-
/** Get minimum highlight length. */
|
|
290
346
|
getHighlightLengthStart(): number;
|
|
291
|
-
/** Get selected identifiers. */
|
|
292
347
|
getSelected(): ListSelectedList | undefined;
|
|
293
|
-
/** Get item by relative step from selected. */
|
|
294
348
|
getSelectedByStep(step: number): ListSelectedItem | undefined;
|
|
295
|
-
/** Get next item from selected. */
|
|
296
349
|
getSelectedNext(): ListSelectedItem | undefined;
|
|
297
|
-
/** Get previous item from selected. */
|
|
298
350
|
getSelectedPrev(): ListSelectedItem | undefined;
|
|
299
|
-
/** Get item by step from item. */
|
|
300
351
|
getItemByStep(item: ListDataItem, step: number): ListDataItem | undefined;
|
|
301
|
-
/** Get next item. */
|
|
302
352
|
getItemNext(item: ListDataItem): ListDataItem | undefined;
|
|
303
|
-
/** Get previous item. */
|
|
304
353
|
getItemPrev(item: ListDataItem): ListDataItem | undefined;
|
|
305
|
-
/** Get item by step from index. */
|
|
306
354
|
getIndexByStep(index: string, step: number): ListDataItem | undefined;
|
|
307
|
-
/** Get next item from index. */
|
|
308
355
|
getIndexNext(index: string): ListDataItem | undefined;
|
|
309
|
-
/** Get previous item from index. */
|
|
310
356
|
getIndexPrev(index: string): ListDataItem | undefined;
|
|
311
|
-
/** Get item by index. */
|
|
312
357
|
getItemByIndex(index?: string): {
|
|
313
358
|
key: number;
|
|
314
359
|
item: ListDataItem;
|
|
315
360
|
} | undefined;
|
|
316
|
-
/** Get item by key. */
|
|
317
361
|
getItemByKey(key: number): ListDataItem | undefined;
|
|
318
|
-
/** Get first item by parent ID. */
|
|
319
362
|
getFirstItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
320
|
-
/** Get last item by parent ID. */
|
|
321
363
|
getLastItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
322
|
-
/** Get sublist object. */
|
|
323
364
|
getSubList(item: ListDataItem): ListDataRef;
|
|
324
365
|
}
|
|
325
366
|
// File: src/classes/ref/RouterItemRef.d.ts
|
|
326
|
-
/**
|
|
367
|
+
/**
|
|
368
|
+
* Router management.
|
|
369
|
+
*/
|
|
327
370
|
export declare class RouterItemRef {
|
|
328
|
-
/** Get router instance. */
|
|
329
371
|
static get(): Router;
|
|
330
|
-
/** Get link string by name. */
|
|
331
372
|
static getLink(name: string, params?: any, query?: any): string | undefined;
|
|
332
|
-
/** Get href props by name. */
|
|
333
373
|
static getHref(name?: string, params?: any, query?: any): ConstrHrefProps;
|
|
334
|
-
/** Change site path. */
|
|
335
374
|
static push(to: string | RouteLocationRaw): void;
|
|
336
|
-
/** Set router instance. */
|
|
337
375
|
static set(router: Router): void;
|
|
338
|
-
/** Set router instance once. */
|
|
339
376
|
static setOneTime(router: Router): void;
|
|
340
|
-
/** Convert raw location to href. */
|
|
341
377
|
static rawToHref(to?: string | RouteLocationRaw): ConstrHrefProps;
|
|
342
378
|
}
|
|
343
379
|
// File: src/classes/ref/ScrollbarWidthRef.d.ts
|
|
344
|
-
/**
|
|
380
|
+
/**
|
|
381
|
+
* Reactive scroll width.
|
|
382
|
+
*/
|
|
345
383
|
export declare class ScrollbarWidthRef {
|
|
346
384
|
readonly item: Ref<boolean | undefined, boolean | undefined>;
|
|
347
385
|
readonly width: Ref<number, number>;
|
|
348
386
|
constructor();
|
|
349
|
-
/** Is scroll width defined. */
|
|
350
387
|
readonly is: ComputedRef<boolean>;
|
|
351
388
|
}
|
|
352
389
|
// File: src/composables/ref/useApiAsyncRef.d.ts
|
|
353
|
-
/**
|
|
354
|
-
|
|
390
|
+
/**
|
|
391
|
+
* Async API composable with SSR support.
|
|
392
|
+
* Use for server-side pre-fetching.
|
|
393
|
+
* @example
|
|
394
|
+
* ```typescript
|
|
395
|
+
* const { data, loading } = useApiAsyncRef('/users/1', { method: 'GET' })
|
|
396
|
+
* ```
|
|
397
|
+
*/
|
|
398
|
+
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>;
|
|
355
399
|
// File: src/composables/ref/useApiDelete.d.ts
|
|
356
|
-
|
|
357
|
-
|
|
400
|
+
export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* API DELETE request.
|
|
404
|
+
*/
|
|
405
|
+
export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiDeleteSetup<T, Request, Return>): {
|
|
358
406
|
loading: Ref<boolean, boolean>;
|
|
359
407
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
360
408
|
};
|
|
361
409
|
// File: src/composables/ref/useApiGet.d.ts
|
|
362
|
-
|
|
363
|
-
|
|
410
|
+
export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* API GET request.
|
|
414
|
+
*/
|
|
415
|
+
export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiGetSetup<T, Request, Return>): {
|
|
364
416
|
loading: Ref<boolean, boolean>;
|
|
365
417
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
366
418
|
};
|
|
367
419
|
// File: src/composables/ref/useApiManagementAsyncRef.d.ts
|
|
368
|
-
/**
|
|
420
|
+
/**
|
|
421
|
+
* Async API management with SSR support.
|
|
422
|
+
*/
|
|
369
423
|
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): {
|
|
370
424
|
isValid: ComputedRef<boolean>;
|
|
371
425
|
isResponseContractValid: ComputedRef<boolean>;
|
|
372
426
|
responseValidationResult: ComputedRef< ApiDataValidation | undefined>;
|
|
373
427
|
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
374
428
|
readonly data: ComputedRef< ApiData<Return> | undefined>;
|
|
429
|
+
errorItem: ComputedRef< ApiErrorItem | undefined>;
|
|
375
430
|
readonly length: ComputedRef<number>;
|
|
376
431
|
lengthData: ComputedRef<number>;
|
|
377
432
|
starting: ComputedRef<boolean>;
|
|
@@ -382,7 +437,7 @@ export declare function useApiManagementAsyncRef<Return extends ApiManagementVal
|
|
|
382
437
|
loadingPut: Ref<boolean, boolean> | undefined;
|
|
383
438
|
loadingDelete: Ref<boolean, boolean> | undefined;
|
|
384
439
|
isSearch: ComputedRef<boolean> | undefined;
|
|
385
|
-
search: Ref<string
|
|
440
|
+
search: Ref<string>;
|
|
386
441
|
init: () => void;
|
|
387
442
|
initSsr: () => void;
|
|
388
443
|
reset: () => Promise<void>;
|
|
@@ -393,9 +448,9 @@ export declare function useApiManagementAsyncRef<Return extends ApiManagementVal
|
|
|
393
448
|
};
|
|
394
449
|
// File: src/composables/ref/useApiManagementRef.d.ts
|
|
395
450
|
/**
|
|
396
|
-
*
|
|
397
|
-
* @note
|
|
398
|
-
* @remarks Recommended for values
|
|
451
|
+
* Orchestrates API loading, formatting, searching, and mutations.
|
|
452
|
+
* @note Pair with `executeUse` for centralized state.
|
|
453
|
+
* @remarks Recommended for display values; not technical IDs.
|
|
399
454
|
* @example
|
|
400
455
|
* const products = useApiManagementRef({ path: '/api/v1/products' }, { price: (v) => `${v} USD` });
|
|
401
456
|
*/
|
|
@@ -405,6 +460,7 @@ export declare function useApiManagementRef<Return extends ApiManagementValue, F
|
|
|
405
460
|
responseValidationResult: ComputedRef< ApiDataValidation | undefined>;
|
|
406
461
|
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
407
462
|
readonly data: ComputedRef<ApiData<Return> | undefined>;
|
|
463
|
+
errorItem: ComputedRef< ApiErrorItem | undefined>;
|
|
408
464
|
readonly length: ComputedRef<number>;
|
|
409
465
|
lengthData: ComputedRef<number>;
|
|
410
466
|
starting: ComputedRef<boolean>;
|
|
@@ -415,7 +471,7 @@ export declare function useApiManagementRef<Return extends ApiManagementValue, F
|
|
|
415
471
|
loadingPut: Ref<boolean, boolean> | undefined;
|
|
416
472
|
loadingDelete: Ref<boolean, boolean> | undefined;
|
|
417
473
|
isSearch: ComputedRef<boolean> | undefined;
|
|
418
|
-
search: Ref<string
|
|
474
|
+
search: Ref<string>;
|
|
419
475
|
init: () => void;
|
|
420
476
|
initSsr: () => void;
|
|
421
477
|
reset: () => Promise<void>;
|
|
@@ -425,14 +481,22 @@ export declare function useApiManagementRef<Return extends ApiManagementValue, F
|
|
|
425
481
|
sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
|
|
426
482
|
};
|
|
427
483
|
// File: src/composables/ref/useApiPost.d.ts
|
|
428
|
-
|
|
429
|
-
|
|
484
|
+
export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* API POST request wrapper.
|
|
488
|
+
*/
|
|
489
|
+
export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPostSetup<T, Request, Return>): {
|
|
430
490
|
loading: Ref<boolean, boolean>;
|
|
431
491
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
432
492
|
};
|
|
433
493
|
// File: src/composables/ref/useApiPut.d.ts
|
|
434
|
-
|
|
435
|
-
|
|
494
|
+
export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* API PUT request wrapper.
|
|
498
|
+
*/
|
|
499
|
+
export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPutSetup<T, Request, Return>): {
|
|
436
500
|
loading: Ref<boolean, boolean>;
|
|
437
501
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
438
502
|
};
|
|
@@ -440,6 +504,7 @@ export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFe
|
|
|
440
504
|
export interface UseApiRef<R> {
|
|
441
505
|
data: ComputedRef<ApiData<R> | undefined>;
|
|
442
506
|
item: Ref<ApiData<R> | undefined>;
|
|
507
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
443
508
|
isResponseContractValid: ComputedRef<boolean>;
|
|
444
509
|
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
445
510
|
length: ComputedRef<number>;
|
|
@@ -456,41 +521,72 @@ export interface UseApiRef<R> {
|
|
|
456
521
|
stop(): void;
|
|
457
522
|
abort(): void;
|
|
458
523
|
}
|
|
459
|
-
/**
|
|
460
|
-
|
|
461
|
-
|
|
524
|
+
/**
|
|
525
|
+
* API request composable handling SSR, reactivity, and validation.
|
|
526
|
+
* @example
|
|
527
|
+
* ```typescript
|
|
528
|
+
* const { data, loading } = useApiRef('/users/1', { method: 'GET' })
|
|
529
|
+
* ```
|
|
530
|
+
*/
|
|
531
|
+
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>;
|
|
462
532
|
export declare const setApiRefGlobalConditions: (conditions: RefType<any>) => void;
|
|
463
533
|
// File: src/composables/ref/useApiRequest.d.ts
|
|
464
|
-
|
|
465
|
-
|
|
534
|
+
export interface UseApiRequestSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> {
|
|
535
|
+
path?: RefOrNormal<string | undefined>;
|
|
536
|
+
method?: ApiMethodItem;
|
|
537
|
+
action?: (data: Return | undefined) => Promise<void> | void;
|
|
538
|
+
transformation?: (data: T) => Return;
|
|
539
|
+
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
540
|
+
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
541
|
+
errorContract?: ApiErrorStorageList;
|
|
542
|
+
toData?: boolean;
|
|
543
|
+
options?: ApiOptions;
|
|
544
|
+
apiInstance?: ApiInstance;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Core API request handler.
|
|
548
|
+
*/
|
|
549
|
+
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>): {
|
|
466
550
|
loading: Ref<boolean, boolean>;
|
|
467
551
|
send(request?: Request): Promise<Return | undefined>;
|
|
468
552
|
};
|
|
469
553
|
// File: src/composables/ref/useBroadcastValueRef.d.ts
|
|
470
554
|
type BroadcastValueItem<T> = T | string | undefined;
|
|
471
|
-
/**
|
|
555
|
+
/**
|
|
556
|
+
* Reactive data sync between tabs.
|
|
557
|
+
*/
|
|
472
558
|
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<BroadcastValueItem<T>>;
|
|
473
559
|
// File: src/composables/ref/useCookieRef.d.ts
|
|
474
|
-
/**
|
|
560
|
+
/**
|
|
561
|
+
* Reactive cookie management.
|
|
562
|
+
*/
|
|
475
563
|
export declare function useCookieRef<T>(name: string, defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): Ref<T | string | undefined>;
|
|
476
564
|
// File: src/composables/ref/useFormattersRef.d.ts
|
|
477
|
-
/**
|
|
565
|
+
/**
|
|
566
|
+
* Reactive list formatting.
|
|
567
|
+
*/
|
|
478
568
|
export declare function useFormattersRef<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp>(list: RefType<List | undefined>, options: Options): {
|
|
479
569
|
listFormat: ComputedRef<FormattersReturn<List, Options>>;
|
|
480
570
|
length: ComputedRef<number>;
|
|
481
571
|
};
|
|
482
572
|
// File: src/composables/ref/useGeoIntlRef.d.ts
|
|
483
|
-
/**
|
|
573
|
+
/**
|
|
574
|
+
* Returns data formatting class.
|
|
575
|
+
*/
|
|
484
576
|
export declare function useGeoIntlRef(): GeoIntlRef;
|
|
485
577
|
// File: src/composables/ref/useHashRef.d.ts
|
|
486
|
-
/**
|
|
578
|
+
/**
|
|
579
|
+
* Reactive hash management.
|
|
580
|
+
*/
|
|
487
581
|
export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
488
582
|
// File: src/composables/ref/useLazyItemByMarginRef.d.ts
|
|
489
583
|
export type LazyItemByMargin = {
|
|
490
584
|
rootMargin: string;
|
|
491
585
|
item: any;
|
|
492
586
|
};
|
|
493
|
-
/**
|
|
587
|
+
/**
|
|
588
|
+
* Tracks element screen appearance by margin.
|
|
589
|
+
*/
|
|
494
590
|
export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin: string) => {
|
|
495
591
|
lazyItemStatus: any;
|
|
496
592
|
readonly lazyItem: any;
|
|
@@ -503,7 +599,9 @@ export type LazyItem = {
|
|
|
503
599
|
stopWatch: () => void;
|
|
504
600
|
};
|
|
505
601
|
export type LazyList = Record<string, LazyItem>;
|
|
506
|
-
/**
|
|
602
|
+
/**
|
|
603
|
+
* Tracks element screen appearance.
|
|
604
|
+
*/
|
|
507
605
|
export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
508
606
|
intersectionObserver: IntersectionObserver | undefined;
|
|
509
607
|
getItem(element: HTMLElement): LazyItem;
|
|
@@ -512,10 +610,14 @@ export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
|
512
610
|
disconnectLazy: () => void | undefined;
|
|
513
611
|
};
|
|
514
612
|
// File: src/composables/ref/useLoadingRef.d.ts
|
|
515
|
-
/**
|
|
613
|
+
/**
|
|
614
|
+
* Returns loading status.
|
|
615
|
+
*/
|
|
516
616
|
export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
|
|
517
617
|
// File: src/composables/ref/useMeta.d.ts
|
|
518
|
-
/**
|
|
618
|
+
/**
|
|
619
|
+
* Meta tags management with DOM sync.
|
|
620
|
+
*/
|
|
519
621
|
export declare const useMeta: () => Readonly<{
|
|
520
622
|
meta: typeof MetaStatic;
|
|
521
623
|
title: Ref<string, string>;
|
|
@@ -567,7 +669,9 @@ export declare const useMeta: () => Readonly<{
|
|
|
567
669
|
destroyExecute?(): void;
|
|
568
670
|
}>;
|
|
569
671
|
// File: src/composables/ref/useRouterList.d.ts
|
|
570
|
-
/**
|
|
672
|
+
/**
|
|
673
|
+
* Router link list management.
|
|
674
|
+
*/
|
|
571
675
|
export declare const useRouterList: <T extends ListDataBasic>(list: RefType<ConstrBind<T>[] | undefined>, selected?: Ref<string> | string, hasTo?: boolean) => {
|
|
572
676
|
item: ComputedRef<T | undefined>;
|
|
573
677
|
selected: Ref<string, string>;
|
|
@@ -577,7 +681,9 @@ export declare const useRouterList: <T extends ListDataBasic>(list: RefType<Cons
|
|
|
577
681
|
toMain(): void;
|
|
578
682
|
};
|
|
579
683
|
// File: src/composables/ref/useSearchRef.d.ts
|
|
580
|
-
/**
|
|
684
|
+
/**
|
|
685
|
+
* Search logic handler.
|
|
686
|
+
*/
|
|
581
687
|
export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns: K, value?: Ref<string>, options?: SearchOptions): {
|
|
582
688
|
isSearch: ComputedRef<boolean>;
|
|
583
689
|
search: Ref<string, string>;
|
|
@@ -586,41 +692,59 @@ export declare function useSearchRef<T extends SearchItem, K extends SearchColum
|
|
|
586
692
|
length: ComputedRef<number>;
|
|
587
693
|
};
|
|
588
694
|
// File: src/composables/ref/useSearchValueRef.d.ts
|
|
589
|
-
/**
|
|
695
|
+
/**
|
|
696
|
+
* Search value state and delay handler.
|
|
697
|
+
*/
|
|
590
698
|
export declare function useSearchValueRef<T extends SearchItem, K extends SearchColumns<T>>(item: SearchList<T, K>, value?: Ref<string>): {
|
|
591
699
|
search: Ref<string, string>;
|
|
592
700
|
searchDelay: Ref<string, string>;
|
|
593
701
|
loading: Ref<boolean, boolean>;
|
|
594
702
|
};
|
|
595
703
|
// File: src/composables/ref/useSessionRef.d.ts
|
|
596
|
-
/**
|
|
704
|
+
/**
|
|
705
|
+
* Reactive session storage management.
|
|
706
|
+
*/
|
|
597
707
|
export declare function useSessionRef<T>(name: string, defaultValue?: T | (() => T)): Ref<T | undefined>;
|
|
598
708
|
// File: src/composables/ref/useStorageRef.d.ts
|
|
599
|
-
/**
|
|
709
|
+
/**
|
|
710
|
+
* Reactive local storage management.
|
|
711
|
+
*/
|
|
600
712
|
export declare function useStorageRef<T>(name: string, defaultValue?: T | (() => T), cache?: number): Ref<T | undefined>;
|
|
601
713
|
// File: src/composables/ref/useTranslateRef.d.ts
|
|
602
714
|
/**
|
|
603
|
-
*
|
|
715
|
+
* Reactive translation getter.
|
|
716
|
+
* Use `as const` for key inference.
|
|
604
717
|
* @example
|
|
605
718
|
* const translations = useTranslateRef(['home.title'] as const);
|
|
606
719
|
*/
|
|
607
720
|
export declare function useTranslateRef<T extends (string | string[])[]>(names: T, translateInstance?: TranslateInstance): ShallowRef<TranslateList<T>>;
|
|
608
|
-
/**
|
|
721
|
+
/**
|
|
722
|
+
* useTranslateRef shorthand.
|
|
723
|
+
*/
|
|
609
724
|
export declare const t: <T extends string[]>(names: T) => ShallowRef<TranslateList<T>>;
|
|
610
725
|
// File: src/flags.d.ts
|
|
611
726
|
export declare const uiMakeFlags: () => void;
|
|
612
727
|
// File: src/functions/basic.d.ts
|
|
613
728
|
export * from '@dxtmisha/functional-basic';
|
|
614
729
|
// File: src/functions/computedAsync.d.ts
|
|
615
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* Async computed property.
|
|
732
|
+
*/
|
|
616
733
|
export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, initialState?: (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
|
|
617
734
|
// File: src/functions/computedByLanguage.d.ts
|
|
618
|
-
/**
|
|
735
|
+
/**
|
|
736
|
+
* Computed property dependent on current language.
|
|
737
|
+
*/
|
|
619
738
|
export declare function computedByLanguage<T, R extends (T | undefined) = T | undefined>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
|
|
620
739
|
// File: src/functions/computedEternity.d.ts
|
|
621
|
-
/**
|
|
740
|
+
/**
|
|
741
|
+
* On-demand cached computed property.
|
|
742
|
+
*/
|
|
622
743
|
export declare function computedEternity<T>(getter: () => Promise<T> | T, initialState?: (() => T) | T): Ref<T, T>;
|
|
623
744
|
// File: src/functions/dxtFunctionalPlugin.d.ts
|
|
745
|
+
/**
|
|
746
|
+
* Functional plugin options.
|
|
747
|
+
*/
|
|
624
748
|
export interface FunctionalPluginOptions {
|
|
625
749
|
api?: ApiConfig;
|
|
626
750
|
translate?: TranslateConfig;
|
|
@@ -628,27 +752,39 @@ export interface FunctionalPluginOptions {
|
|
|
628
752
|
icons?: IconsConfig;
|
|
629
753
|
router?: Router;
|
|
630
754
|
errorCauses?: ErrorCenterCauseList;
|
|
755
|
+
errorHandlers?: ErrorCenterHandlerList;
|
|
631
756
|
}
|
|
632
|
-
/**
|
|
757
|
+
/**
|
|
758
|
+
* Vue plugin for services initialization.
|
|
759
|
+
*/
|
|
633
760
|
export declare const dxtFunctionalPlugin: Plugin;
|
|
634
761
|
// File: src/functions/executeUse.d.ts
|
|
762
|
+
/**
|
|
763
|
+
* Singleton initialization strategies.
|
|
764
|
+
*/
|
|
635
765
|
export declare enum ExecuteUseType {
|
|
636
766
|
global = "global",
|
|
637
767
|
provide = "provide",
|
|
638
768
|
local = "local"
|
|
639
769
|
}
|
|
770
|
+
/**
|
|
771
|
+
* Managed singleton return type.
|
|
772
|
+
*/
|
|
640
773
|
export type ExecuteUseReturn<R> = Readonly<R & {
|
|
641
774
|
init(): Readonly<R>;
|
|
642
775
|
destroyExecute?(): void;
|
|
643
776
|
}>;
|
|
644
777
|
/**
|
|
645
|
-
*
|
|
646
|
-
* @remarks
|
|
778
|
+
* Creates a managed singleton.
|
|
779
|
+
* @remarks
|
|
780
|
+
* Useful for API services, resource optimization, and shared state.
|
|
647
781
|
* @example
|
|
648
782
|
* export const useUserApi = executeUseGlobal(() => useApiGet('/api/user'));
|
|
649
783
|
*/
|
|
650
784
|
export declare function executeUse<R, O extends any[], RI extends ExecuteUseReturn<R> = ExecuteUseReturn<R>>(callback: (...args: O) => R, type?: ExecuteUseType): ((...args: O) => RI) | (() => RI);
|
|
651
|
-
/**
|
|
785
|
+
/**
|
|
786
|
+
* Global singleton.
|
|
787
|
+
*/
|
|
652
788
|
export declare function executeUseGlobal<R>(callback: () => R): (() => Readonly<R & {
|
|
653
789
|
init(): Readonly<R>;
|
|
654
790
|
destroyExecute?(): void;
|
|
@@ -656,7 +792,9 @@ export declare function executeUseGlobal<R>(callback: () => R): (() => Readonly<
|
|
|
656
792
|
init(): Readonly<R>;
|
|
657
793
|
destroyExecute?(): void;
|
|
658
794
|
}>);
|
|
659
|
-
/**
|
|
795
|
+
/**
|
|
796
|
+
* Component-scoped singleton.
|
|
797
|
+
*/
|
|
660
798
|
export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
|
|
661
799
|
init(): Readonly<R>;
|
|
662
800
|
destroyExecute?(): void;
|
|
@@ -664,7 +802,9 @@ export declare function executeUseProvide<R, O extends any[]>(callback: (...args
|
|
|
664
802
|
init(): Readonly<R>;
|
|
665
803
|
destroyExecute?(): void;
|
|
666
804
|
}>);
|
|
667
|
-
/**
|
|
805
|
+
/**
|
|
806
|
+
* Local singleton.
|
|
807
|
+
*/
|
|
668
808
|
export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
|
|
669
809
|
init(): Readonly<R>;
|
|
670
810
|
destroyExecute?(): void;
|
|
@@ -672,43 +812,71 @@ export declare function executeUseLocal<R, O extends any[]>(callback: (...args:
|
|
|
672
812
|
init(): Readonly<R>;
|
|
673
813
|
destroyExecute?(): void;
|
|
674
814
|
}>);
|
|
675
|
-
/** Initializes all global callbacks. */
|
|
676
815
|
export declare function executeUseGlobalInit(): void;
|
|
677
816
|
// File: src/functions/getInject.d.ts
|
|
678
|
-
/**
|
|
817
|
+
/**
|
|
818
|
+
* Get injected value.
|
|
819
|
+
*/
|
|
679
820
|
export declare function getInject<T>(name: string): T | undefined;
|
|
680
821
|
// File: src/functions/getOptions.d.ts
|
|
681
|
-
/**
|
|
822
|
+
/**
|
|
823
|
+
* Request options getter.
|
|
824
|
+
*/
|
|
682
825
|
export declare const getOptions: (options?: ApiOptions) => RefOrNormal<ApiFetch>;
|
|
826
|
+
// File: src/functions/ref/getApiErrorRef.d.ts
|
|
827
|
+
/**
|
|
828
|
+
* API error item getter.
|
|
829
|
+
*/
|
|
830
|
+
export declare function getApiErrorRef<R>(data: RefType<ApiData<R> | undefined>): ComputedRef<ApiErrorItem | undefined>;
|
|
683
831
|
// File: src/functions/ref/getBindRef.d.ts
|
|
684
|
-
/**
|
|
832
|
+
/**
|
|
833
|
+
* Generates subcomponent props.
|
|
834
|
+
*/
|
|
685
835
|
export declare function getBindRef<T, R extends ItemList>(value: RefOrNormal<T | R> | undefined, nameExtra?: RefOrNormal<ItemList> | string, name?: string): ComputedRef<R>;
|
|
686
836
|
// File: src/functions/ref/getRef.d.ts
|
|
687
|
-
/**
|
|
837
|
+
/**
|
|
838
|
+
* Returns raw value from Ref or normal variable.
|
|
839
|
+
*/
|
|
688
840
|
export declare function getRef<T>(item: RefOrNormal<T>): T;
|
|
689
841
|
// File: src/functions/ref/render.d.ts
|
|
690
|
-
/**
|
|
842
|
+
/**
|
|
843
|
+
* Cached render data.
|
|
844
|
+
*/
|
|
691
845
|
export declare function render<T extends ItemList>(name: string | any, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
|
|
692
846
|
// File: src/functions/ref/setRef.d.ts
|
|
693
|
-
/**
|
|
847
|
+
/**
|
|
848
|
+
* Updates Ref value.
|
|
849
|
+
*/
|
|
694
850
|
export declare function setRef<T>(item: Ref<T>, value: T): void;
|
|
695
851
|
// File: src/functions/ref/toRefItem.d.ts
|
|
696
|
-
/**
|
|
852
|
+
/**
|
|
853
|
+
* Wraps value in Ref if not reactive.
|
|
854
|
+
*/
|
|
697
855
|
export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
|
|
698
856
|
// File: src/functions/render/getBind.d.ts
|
|
699
|
-
/**
|
|
857
|
+
/**
|
|
858
|
+
* Generates subcomponent props.
|
|
859
|
+
*/
|
|
700
860
|
export declare function getBind<T, R extends ItemList>(value: T | R | undefined | null, nameExtra?: ItemList | string, name?: string, except?: boolean): ConstrBind<R>;
|
|
701
861
|
// File: src/functions/render/getClassName.d.ts
|
|
702
|
-
/**
|
|
862
|
+
/**
|
|
863
|
+
* Gets class name from property.
|
|
864
|
+
*/
|
|
703
865
|
export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
|
|
704
866
|
// File: src/functions/render/getIndexForRender.d.ts
|
|
705
|
-
/**
|
|
867
|
+
/**
|
|
868
|
+
* Generates render key.
|
|
869
|
+
*/
|
|
706
870
|
export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
|
|
707
871
|
// File: src/functions/toBind.d.ts
|
|
708
|
-
/**
|
|
872
|
+
/**
|
|
873
|
+
* Merges props including classes and styles.
|
|
874
|
+
*/
|
|
709
875
|
export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, value: ItemList): ConstrBind<R>;
|
|
710
876
|
// File: src/functions/toBinds.d.ts
|
|
711
|
-
/**
|
|
877
|
+
/**
|
|
878
|
+
* Merges multiple props objects.
|
|
879
|
+
*/
|
|
712
880
|
export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
|
|
713
881
|
// File: src/library.d.ts
|
|
714
882
|
export * from './classes/design/DesignAbstract';
|
|
@@ -758,6 +926,7 @@ export * from './functions/dxtFunctionalPlugin';
|
|
|
758
926
|
export * from './functions/executeUse';
|
|
759
927
|
export * from './functions/getInject';
|
|
760
928
|
export * from './functions/getOptions';
|
|
929
|
+
export * from './functions/ref/getApiErrorRef';
|
|
761
930
|
export * from './functions/ref/getBindRef';
|
|
762
931
|
export * from './functions/ref/getRef';
|
|
763
932
|
export * from './functions/ref/render';
|
|
@@ -776,9 +945,13 @@ export * from './types/searchTypes';
|
|
|
776
945
|
// File: src/types/apiTypes.d.ts
|
|
777
946
|
/** Options for api requests */
|
|
778
947
|
export type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
|
|
779
|
-
/**
|
|
948
|
+
/**
|
|
949
|
+
* Base API management values.
|
|
950
|
+
*/
|
|
780
951
|
export type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
|
|
781
|
-
/**
|
|
952
|
+
/**
|
|
953
|
+
* Main GET config for API management.
|
|
954
|
+
*/
|
|
782
955
|
export type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
783
956
|
path?: RefOrNormal<string | undefined>;
|
|
784
957
|
options?: ApiOptions;
|
|
@@ -786,49 +959,81 @@ export type ApiManagementGet<Return extends ApiManagementValue, Type extends Api
|
|
|
786
959
|
conditions?: RefType<boolean>;
|
|
787
960
|
transformation?: (data: Type, isResponseContractValid?: ApiDataValidation) => ApiData<Return>;
|
|
788
961
|
validateResponseContract?: (data: Type) => ApiDataValidation;
|
|
962
|
+
errorContract?: ApiErrorStorageList;
|
|
789
963
|
typeData?: ((data: Return) => boolean) | any;
|
|
790
964
|
unmounted?: boolean;
|
|
791
965
|
skeleton?: () => Return;
|
|
792
966
|
};
|
|
793
|
-
/**
|
|
967
|
+
/**
|
|
968
|
+
* Client-side search config.
|
|
969
|
+
*/
|
|
794
970
|
export type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
|
|
795
971
|
columns: K;
|
|
796
972
|
value?: Ref<string>;
|
|
797
973
|
options?: SearchOptions;
|
|
798
974
|
};
|
|
799
|
-
/**
|
|
800
|
-
|
|
975
|
+
/**
|
|
976
|
+
* Mutation request config.
|
|
977
|
+
*/
|
|
978
|
+
export type ApiManagementRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> = {
|
|
801
979
|
path?: RefOrNormal<string | undefined>;
|
|
802
980
|
action?: (data: Return | undefined) => Promise<void> | void;
|
|
803
981
|
transformation?: (data: T) => Return;
|
|
982
|
+
validateRequestContract?: (data: Request) => ApiDataValidation & Return;
|
|
983
|
+
validateResponseContract?: (data: T) => ApiDataValidation & Return;
|
|
984
|
+
errorContract?: ApiErrorStorageList;
|
|
804
985
|
toData?: boolean;
|
|
805
986
|
options?: ApiOptions;
|
|
806
987
|
};
|
|
807
988
|
// File: src/types/constructorTypes.d.ts
|
|
989
|
+
/** Generic record for constructor items */
|
|
808
990
|
export type ConstrItem = Record<string, any>;
|
|
991
|
+
/** Constructor value wrapper */
|
|
809
992
|
export type ConstrValue<T = any> = {
|
|
810
993
|
value?: T;
|
|
811
994
|
};
|
|
995
|
+
/** Generic record for components */
|
|
812
996
|
export type ConstrComponent = Record<string, any>;
|
|
997
|
+
/**
|
|
998
|
+
* Component modification type.
|
|
999
|
+
*/
|
|
813
1000
|
export type ConstrComponentMod<P extends ConstrItem> = ConstrItem | {
|
|
814
1001
|
[K in keyof P]?: RefOrNormal<P[K]>;
|
|
815
1002
|
};
|
|
816
1003
|
export type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & {
|
|
817
1004
|
elementHtml?: ComputedRef<E | undefined>;
|
|
818
1005
|
};
|
|
1006
|
+
/** Utility type to convert union to intersection */
|
|
819
1007
|
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
1008
|
+
/** Extract emit item */
|
|
820
1009
|
export type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
|
|
1010
|
+
/**
|
|
1011
|
+
* Constructor emit signatures.
|
|
1012
|
+
*/
|
|
821
1013
|
export type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{
|
|
822
1014
|
[K in keyof T]: (evt: K, ...args: T[K]) => void;
|
|
823
1015
|
}>>;
|
|
1016
|
+
/** Object type for CSS classes */
|
|
824
1017
|
export type ConstrClassObject = Record<string, boolean | undefined>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Constructor class formats.
|
|
1020
|
+
*/
|
|
825
1021
|
export type ConstrClass = string | (string | ConstrClass | Undefined)[] | ConstrClassObject;
|
|
1022
|
+
/** Map class names to definitions */
|
|
826
1023
|
export type ConstrClassList = Record<string, ConstrClass>;
|
|
1024
|
+
/** Constructor classes structure */
|
|
827
1025
|
export type ConstrClasses = {
|
|
828
1026
|
main: ConstrClass;
|
|
829
1027
|
} & ConstrClassList;
|
|
1028
|
+
/** Individual style property type */
|
|
830
1029
|
export type ConstrStylesItem = string | null;
|
|
1030
|
+
/**
|
|
1031
|
+
* Constructor styles structure.
|
|
1032
|
+
*/
|
|
831
1033
|
export type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
|
|
1034
|
+
/**
|
|
1035
|
+
* Constructor options.
|
|
1036
|
+
*/
|
|
832
1037
|
export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
833
1038
|
components?: COMP;
|
|
834
1039
|
compMod?: ConstrComponentMod<P>;
|
|
@@ -836,71 +1041,108 @@ export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem
|
|
|
836
1041
|
classes?: RefType<ConstrClasses>;
|
|
837
1042
|
styles?: RefType<ConstrStyles>;
|
|
838
1043
|
};
|
|
1044
|
+
/**
|
|
1045
|
+
* Constructor setup.
|
|
1046
|
+
*/
|
|
839
1047
|
export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
|
|
840
1048
|
name: string;
|
|
841
1049
|
element: Ref<E | undefined>;
|
|
842
1050
|
classes: RefType<CLASSES>;
|
|
843
1051
|
styles: RefType<ConstrStyles>;
|
|
844
1052
|
} & SETUP;
|
|
1053
|
+
/** Registration config */
|
|
845
1054
|
export type ConstrRegistration = {
|
|
846
1055
|
flag?: boolean;
|
|
847
1056
|
translate?: Record<string, string>;
|
|
848
1057
|
};
|
|
1058
|
+
/**
|
|
1059
|
+
* Component bind with class/style.
|
|
1060
|
+
*/
|
|
849
1061
|
export type ConstrBind<T> = T & Record<string, any> & {
|
|
850
1062
|
key?: string;
|
|
851
1063
|
class?: ConstrClass;
|
|
852
1064
|
style?: ConstrStyles;
|
|
853
1065
|
};
|
|
1066
|
+
/** Vue prop definition options */
|
|
854
1067
|
export type ConstrPropItemOptions<T = any> = {
|
|
855
1068
|
type?: PropType<T>;
|
|
856
1069
|
required?: boolean;
|
|
857
1070
|
default?: any;
|
|
858
1071
|
validator?(value: any, props: any): boolean;
|
|
859
1072
|
};
|
|
1073
|
+
/** Constructor prop element */
|
|
860
1074
|
export type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
|
|
1075
|
+
/** Component prop definitions */
|
|
861
1076
|
export type ConstrProps<P = Record<string, any>> = {
|
|
862
1077
|
[K in keyof P]: ConstrPropItem<P[K]>;
|
|
863
1078
|
};
|
|
1079
|
+
/** Link properties */
|
|
864
1080
|
export type ConstrHrefProps = {
|
|
865
1081
|
href?: string;
|
|
866
1082
|
};
|
|
867
1083
|
// File: src/types/listTypes.d.ts
|
|
1084
|
+
/** List item types */
|
|
868
1085
|
export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
1086
|
+
/** Basic list item structure */
|
|
869
1087
|
export type ListDataBasic = {
|
|
870
1088
|
label?: NumberOrString;
|
|
871
1089
|
value?: any;
|
|
872
1090
|
search?: string;
|
|
873
1091
|
};
|
|
1092
|
+
/** Extended list item */
|
|
874
1093
|
export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
|
|
875
1094
|
parent?: string;
|
|
876
1095
|
type: ListType;
|
|
877
1096
|
index: string;
|
|
878
1097
|
disabled?: boolean;
|
|
879
1098
|
}>;
|
|
1099
|
+
/** Array of data items */
|
|
880
1100
|
export type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
|
|
1101
|
+
/** Data list record structure */
|
|
881
1102
|
export type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
|
|
1103
|
+
/**
|
|
1104
|
+
* List item with reactive state.
|
|
1105
|
+
*/
|
|
882
1106
|
export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
|
|
883
1107
|
focus: boolean;
|
|
884
1108
|
highlight?: string;
|
|
885
1109
|
selected: boolean;
|
|
886
1110
|
disabled?: boolean;
|
|
887
1111
|
};
|
|
1112
|
+
/** State-aware list items array */
|
|
888
1113
|
export type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
|
|
1114
|
+
/** Entry for list creation */
|
|
889
1115
|
export type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
|
|
1116
|
+
/**
|
|
1117
|
+
* List input formats.
|
|
1118
|
+
*/
|
|
890
1119
|
export type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
|
|
1120
|
+
/** Single selection identifier */
|
|
891
1121
|
export type ListSelectedItem = NumberOrStringOrBoolean;
|
|
1122
|
+
/** Multiple selection items */
|
|
892
1123
|
export type ListSelectedList = ListSelectedItem | ListSelectedItem[];
|
|
1124
|
+
/** Selected label */
|
|
893
1125
|
export type ListName = string | number | undefined;
|
|
1126
|
+
/** Selected names list */
|
|
894
1127
|
export type ListNames = ListName[];
|
|
895
1128
|
// File: src/types/refTypes.d.ts
|
|
1129
|
+
/** Vue reactive ref or computed */
|
|
896
1130
|
export type RefType<T> = ComputedRef<T> | Ref<T>;
|
|
1131
|
+
/** Optional reactive ref or computed */
|
|
897
1132
|
export type RefUndefined<T> = RefType<T | undefined>;
|
|
1133
|
+
/** Reactive ref or raw value */
|
|
898
1134
|
export type RefOrNormal<T> = RefType<T> | T;
|
|
1135
|
+
/** Raw Vue children content */
|
|
899
1136
|
export type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
|
|
1137
|
+
/**
|
|
1138
|
+
* Raw Vue slots structure.
|
|
1139
|
+
*/
|
|
900
1140
|
export type RawSlots = {
|
|
901
1141
|
[name: string]: unknown;
|
|
902
1142
|
$stable?: boolean;
|
|
903
1143
|
};
|
|
904
1144
|
// File: src/types/searchTypes.d.ts
|
|
1145
|
+
/** Reactive search list data */
|
|
905
1146
|
export type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
|
|
1147
|
+
/** Search list input formats */
|
|
906
1148
|
export type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
|