@dxtmisha/functional 1.13.1 → 1.13.3
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 +16 -0
- package/ai-description.txt +8 -3
- package/ai-types.txt +247 -521
- package/dist/library.js +4 -1
- package/dist/src/classes/ref/GeoRef.d.ts +7 -0
- package/dist/src/functions/dxtFunctionalPlugin.d.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.13.2] - 2026-06-05
|
|
6
|
+
|
|
7
|
+
### Changed / Improved
|
|
8
|
+
- **Maintenance**: Version bumped to `1.13.2` to synchronize package updates across the workspace.
|
|
9
|
+
|
|
10
|
+
## [1.13.1] - 2026-06-02
|
|
11
|
+
|
|
12
|
+
### Changed / Improved
|
|
13
|
+
- **Maintenance**: Version bumped to `1.13.1` to align with monorepo release updates.
|
|
14
|
+
|
|
15
|
+
## [1.13.0] - 2026-05-29
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **refTypes**: Added `RefOrNormalOrFunction` union type representing references, normal values, or functions returning them.
|
|
19
|
+
- **Functions**: Introduced `executeFunctionRef` utility function to safely execute functions or unwrap reference values in a single call.
|
|
20
|
+
|
|
5
21
|
## [1.12.3] - 2026-05-25
|
|
6
22
|
|
|
7
23
|
### Changed / Improved
|
package/ai-description.txt
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
This library is a
|
|
1
|
+
Core Purpose: This library is a comprehensive Vue 3 framework for reactive application architecture. It provides high-level abstractions for API orchestration (fetching, mutation, SSR, schema validation), state management (singletons, reactive storage, session/cookie handling), component design (base classes for rendering and lifecycle management), and localization/internationalization (geo-data, formatting, date management).
|
|
2
2
|
|
|
3
|
-
Study this
|
|
3
|
+
Usage Scenarios: Study this API when building complex, data-intensive Vue 3 applications requiring:
|
|
4
|
+
1. Centralized, reactive API management (GET/POST/PUT/DELETE) with built-in SSR support, caching, and automatic response contract validation.
|
|
5
|
+
2. Unified component architecture using base design classes for consistent styling, rendering, and lifecycle event management.
|
|
6
|
+
3. Complex list handling, client-side searching, and advanced data formatting (Intl, currency, dates).
|
|
7
|
+
4. Cross-tab communication or persistent reactive state storage (localStorage, sessionStorage, cookies).
|
|
8
|
+
5. Global service configuration (meta tags, translation, icons, API settings) via Vue plugins.
|
|
4
9
|
|
|
5
|
-
The library
|
|
10
|
+
Integration Context: The library acts as a core infrastructure layer. It is built on top of Vue 3's Composition API and `vue-router`. It relies heavily on `@dxtmisha/functional-basic` for underlying logic. It should be treated as the primary service and utility layer that replaces manual store management (like Pinia) and repetitive API/lifecycle boilerplate by providing standardized patterns (e.g., `executeUse` for singletons) for shared state and service orchestration.
|
package/ai-types.txt
CHANGED
|
@@ -15,201 +15,91 @@ The following is the content of "exports" from package.json:
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// File: src/classes/design/DesignAbstract.d.ts
|
|
18
|
-
/**
|
|
19
|
-
* Base constructor class.
|
|
20
|
-
*/
|
|
21
18
|
export declare abstract class DesignAbstract<T extends Record<string, any>, C extends Record<string, any>> {
|
|
22
|
-
/**
|
|
23
|
-
* Constructor
|
|
24
|
-
* @param props base data
|
|
25
|
-
* @param callback change callback
|
|
26
|
-
* @param changed tracking data
|
|
27
|
-
*/
|
|
28
19
|
constructor(props: T, callback?: ((event: C) => void) | undefined, changed?: string[]);
|
|
29
|
-
/**
|
|
30
|
-
* Executes callback.
|
|
31
|
-
* @param compelled forces update
|
|
32
|
-
*/
|
|
33
20
|
make(compelled?: boolean): this;
|
|
34
|
-
/**
|
|
35
|
-
* Executes callback.
|
|
36
|
-
* @param compelled forces update
|
|
37
|
-
*/
|
|
38
21
|
makeCallback(compelled?: boolean): void;
|
|
39
|
-
/**
|
|
40
|
-
* Called when input values change.
|
|
41
|
-
*/
|
|
42
|
-
protected abstract initEvent(): void;
|
|
43
22
|
}
|
|
23
|
+
|
|
44
24
|
// File: src/classes/design/DesignAsyncAbstract.d.ts
|
|
45
|
-
|
|
46
|
-
* Base constructor class.
|
|
47
|
-
*/
|
|
25
|
+
import { DesignAbstract } from './DesignAbstract';
|
|
48
26
|
export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
|
|
49
|
-
/**
|
|
50
|
-
* Executes callback.
|
|
51
|
-
* @param compelled forces update
|
|
52
|
-
*/
|
|
53
27
|
make(compelled?: boolean): this;
|
|
54
|
-
/**
|
|
55
|
-
* Executes callback.
|
|
56
|
-
* @param compelled forces update
|
|
57
|
-
*/
|
|
58
28
|
makeCallback(compelled?: boolean): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Called when input values change.
|
|
61
|
-
*/
|
|
62
|
-
protected abstract initEvent(): Promise<void>;
|
|
63
29
|
}
|
|
30
|
+
|
|
64
31
|
// File: src/classes/design/DesignChanged.d.ts
|
|
65
|
-
/**
|
|
66
|
-
* Checks edited values.
|
|
67
|
-
*/
|
|
68
32
|
export declare class DesignChanged<T extends Record<string, any>> {
|
|
69
|
-
/**
|
|
70
|
-
* Constructor
|
|
71
|
-
* @param props base data
|
|
72
|
-
* @param watch tracking data
|
|
73
|
-
*/
|
|
74
33
|
constructor(props: T, watch?: string[]);
|
|
75
|
-
/**
|
|
76
|
-
* Checks if updated.
|
|
77
|
-
* @param name property name
|
|
78
|
-
*/
|
|
79
34
|
is(name: string | string[]): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Checks for changes.
|
|
82
|
-
*/
|
|
83
35
|
isChanged(): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Updates values.
|
|
86
|
-
*/
|
|
87
36
|
update(): void;
|
|
88
37
|
}
|
|
38
|
+
|
|
89
39
|
// File: src/classes/design/DesignComp.d.ts
|
|
40
|
+
import { DesignComponents } from './DesignComponents';
|
|
41
|
+
import { ConstrComponent, ConstrItem } from '../../types/constructorTypes';
|
|
90
42
|
export declare class DesignComp<COMP extends ConstrComponent, P extends ConstrItem> extends DesignComponents<COMP, P> {
|
|
91
43
|
}
|
|
44
|
+
|
|
92
45
|
// File: src/classes/design/DesignComponents.d.ts
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
46
|
+
import { ComputedRef, VNode } from 'vue';
|
|
47
|
+
import { RawChildren, RawSlots } from '../../types/refTypes';
|
|
48
|
+
import { ConstrComponent, ConstrComponentMod, ConstrItem } from '../../types/constructorTypes';
|
|
96
49
|
export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
|
|
97
|
-
|
|
98
|
-
* Constructor
|
|
99
|
-
* @param components list of components
|
|
100
|
-
* @param modification modification data
|
|
101
|
-
*/
|
|
50
|
+
protected caching: Record<string, ComputedRef<any>>;
|
|
102
51
|
constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
|
|
103
|
-
/**
|
|
104
|
-
* Checks component presence.
|
|
105
|
-
* @param name component name
|
|
106
|
-
*/
|
|
107
52
|
is<K extends keyof COMP>(name: K): name is K;
|
|
108
|
-
/**
|
|
109
|
-
* Gets component object.
|
|
110
|
-
* @param name component name
|
|
111
|
-
*/
|
|
112
53
|
get<K extends keyof COMP>(name: K): COMP[K];
|
|
113
|
-
/**
|
|
114
|
-
* Returns modified input data.
|
|
115
|
-
* @param index name
|
|
116
|
-
* @param props basic data
|
|
117
|
-
*/
|
|
118
54
|
getModification<K extends keyof P>(index?: K & string | string, props?: P[K] | Record<string, any>): Record<string, any> | undefined;
|
|
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
|
-
*/
|
|
126
55
|
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[];
|
|
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
|
-
*/
|
|
134
56
|
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;
|
|
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
|
-
*/
|
|
143
57
|
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;
|
|
144
58
|
}
|
|
59
|
+
|
|
145
60
|
// File: src/classes/design/DesignConstructorAbstract.d.ts
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
61
|
+
import { ComputedRef, ToRefs, VNode, Ref } from 'vue';
|
|
62
|
+
import { DesignComponents } from './DesignComponents';
|
|
63
|
+
import { ConstrClass, ConstrClasses, ConstrClassObject, ConstrComponent, ConstrEmit, ConstrExpose, ConstrItem, ConstrOptions, ConstrStyles } from '../../types/constructorTypes';
|
|
149
64
|
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> {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
65
|
+
protected readonly props: Readonly<P>;
|
|
66
|
+
protected readonly options?: ConstrOptions<COMP, EMITS, P> | undefined;
|
|
67
|
+
protected readonly name: string[];
|
|
68
|
+
protected readonly element: Ref<E | undefined, E | undefined>;
|
|
69
|
+
protected readonly refs: ToRefs<P>;
|
|
70
|
+
protected readonly components: DesignComponents<COMP, P>;
|
|
71
|
+
protected readonly emits?: ConstrEmit<EMITS>;
|
|
72
|
+
protected readonly classes?: ComputedRef<CLASSES>;
|
|
73
|
+
protected classesSub?: ComputedRef<Partial<CLASSES>>;
|
|
74
|
+
protected readonly styles?: ComputedRef<ConstrStyles>;
|
|
75
|
+
protected stylesSub?: ComputedRef<ConstrStyles>;
|
|
76
|
+
protected attrs?: ConstrItem;
|
|
77
|
+
protected slots?: SLOTS;
|
|
78
|
+
protected dataExpose?: EXPOSE;
|
|
79
|
+
protected constructor(name: string, props: Readonly<P>, options?: ConstrOptions<COMP, EMITS, P> | undefined);
|
|
80
|
+
protected init(): this;
|
|
153
81
|
getName(): string;
|
|
154
|
-
/**
|
|
155
|
-
* Gets design name.
|
|
156
|
-
*/
|
|
157
82
|
getDesign(): string;
|
|
158
|
-
/**
|
|
159
|
-
* Gets subclass name.
|
|
160
|
-
* @param name class levels
|
|
161
|
-
*/
|
|
162
83
|
getSubClass(name: string | string[]): string;
|
|
163
|
-
/**
|
|
164
|
-
* Gets status class name.
|
|
165
|
-
* @param name class levels
|
|
166
|
-
*/
|
|
167
84
|
getStatusClass(name: string | string[]): string;
|
|
168
|
-
/**
|
|
169
|
-
* Gets style property name.
|
|
170
|
-
* @param name class levels
|
|
171
|
-
*/
|
|
172
85
|
getStyle(name: string | string[]): string;
|
|
173
|
-
/**
|
|
174
|
-
* Gets attributes.
|
|
175
|
-
*/
|
|
176
86
|
getAttrs(): ConstrItem;
|
|
177
|
-
/**
|
|
178
|
-
* External variables list.
|
|
179
|
-
*/
|
|
180
87
|
expose(): ConstrExpose<E, EXPOSE>;
|
|
181
|
-
/**
|
|
182
|
-
* Render method.
|
|
183
|
-
*/
|
|
184
88
|
render(): () => VNode | (VNode | any)[] | undefined;
|
|
185
|
-
/**
|
|
186
|
-
* Initializes expose properties.
|
|
187
|
-
*/
|
|
188
89
|
protected abstract initExpose(): EXPOSE;
|
|
189
|
-
/**
|
|
190
|
-
* Refines class list.
|
|
191
|
-
*/
|
|
192
90
|
protected abstract initClasses(): Partial<CLASSES>;
|
|
193
|
-
/**
|
|
194
|
-
* Refines style list.
|
|
195
|
-
*/
|
|
196
91
|
protected abstract initStyles(): ConstrStyles;
|
|
197
|
-
/**
|
|
198
|
-
* Rendering logic.
|
|
199
|
-
*/
|
|
200
92
|
protected abstract initRender(): VNode | (VNode | any)[] | undefined;
|
|
93
|
+
protected initSlot<K extends keyof SLOTS>(name: K, children?: any[], props?: ConstrItem): VNode | undefined;
|
|
94
|
+
protected toClass(classes?: ConstrClass): ConstrClassObject;
|
|
95
|
+
protected toClassName<T extends ConstrItem>(classes?: ConstrItem): T;
|
|
201
96
|
}
|
|
97
|
+
|
|
202
98
|
// File: src/classes/ref/DatetimeRef.d.ts
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
99
|
+
import { ComputedRef, Ref } from 'vue';
|
|
100
|
+
import { Datetime, GeoDate, GeoFirstDay, GeoHours, NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
101
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
206
102
|
export declare class DatetimeRef {
|
|
207
|
-
/**
|
|
208
|
-
* Constructor
|
|
209
|
-
* @param date input date
|
|
210
|
-
* @param type date format
|
|
211
|
-
* @param code locale code
|
|
212
|
-
*/
|
|
213
103
|
constructor(date: RefOrNormal<NumberOrStringOrDate>, type?: RefOrNormal<GeoDate>, code?: RefOrNormal<string>);
|
|
214
104
|
getItem(): Ref<NumberOrStringOrDate>;
|
|
215
105
|
getDate(): Ref<Date>;
|
|
@@ -223,55 +113,39 @@ export declare class DatetimeRef {
|
|
|
223
113
|
getMinute(): ComputedRef<number>;
|
|
224
114
|
getSecond(): ComputedRef<number>;
|
|
225
115
|
getMaxDay(): ComputedRef<number>;
|
|
226
|
-
/**
|
|
227
|
-
* Locale formatting.
|
|
228
|
-
* @param type format type
|
|
229
|
-
* @param styleOptions month representation
|
|
230
|
-
*/
|
|
231
116
|
locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): ComputedRef<string>;
|
|
232
|
-
/**
|
|
233
|
-
* Standard output.
|
|
234
|
-
* @param timeZone include timezone
|
|
235
|
-
*/
|
|
236
117
|
standard(timeZone?: boolean): ComputedRef<string>;
|
|
237
118
|
}
|
|
119
|
+
|
|
238
120
|
// File: src/classes/ref/EffectScopeGlobal.d.ts
|
|
239
|
-
/**
|
|
240
|
-
* Global effect scope.
|
|
241
|
-
*/
|
|
242
121
|
export declare class EffectScopeGlobal {
|
|
243
|
-
/**
|
|
244
|
-
* Run function in global scope.
|
|
245
|
-
*/
|
|
246
122
|
static run<T>(fn: () => T): T | undefined;
|
|
247
123
|
}
|
|
124
|
+
|
|
248
125
|
// File: src/classes/ref/EventRef.d.ts
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
*/
|
|
126
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
127
|
+
import { ElementOrString, ElementOrWindow, EventItem, EventListenerDetail, EventOptions } from '@dxtmisha/functional-basic';
|
|
252
128
|
export declare class EventRef<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> extends EventItem<E, O, D> {
|
|
253
129
|
constructor(elementSelector?: RefOrNormal<ElementOrString<E> | undefined>, elementSelectorControl?: RefOrNormal<ElementOrString<HTMLElement>>, type?: string | string[], listener?: EventListenerDetail<O, D>, options?: EventOptions, detail?: D);
|
|
254
130
|
}
|
|
131
|
+
|
|
255
132
|
// File: src/classes/ref/GeoFlagRef.d.ts
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
133
|
+
import { ComputedRef } from 'vue';
|
|
134
|
+
import { GeoFlag, GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
|
|
135
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
259
136
|
export declare class GeoFlagRef {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
get(code?: string): ComputedRef<GeoFlagItem | undefined>;
|
|
267
|
-
getFlag(code?: string): ComputedRef<string | undefined>;
|
|
268
|
-
getList(codes?: string[]): ComputedRef<GeoFlagItem[]>;
|
|
269
|
-
getNational(codes?: string[]): ComputedRef<GeoFlagNational[]>;
|
|
137
|
+
constructor(code?: RefOrNormal<string | undefined>);
|
|
138
|
+
getCode(): string;
|
|
139
|
+
get(code?: RefOrNormal<string>): ComputedRef<GeoFlagItem | undefined>;
|
|
140
|
+
getFlag(code?: RefOrNormal<string>): ComputedRef<string | undefined>;
|
|
141
|
+
getList(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagItem[]>;
|
|
142
|
+
getNational(codes?: RefOrNormal<string[] | undefined>): ComputedRef<GeoFlagNational[]>;
|
|
270
143
|
}
|
|
144
|
+
|
|
271
145
|
// File: src/classes/ref/GeoIntlRef.d.ts
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
146
|
+
import { ComputedRef } from 'vue';
|
|
147
|
+
import { GeoDate, ItemValue, NumberOrString, NumberOrStringOrDate } from '@dxtmisha/functional-basic';
|
|
148
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
275
149
|
export declare class GeoIntlRef {
|
|
276
150
|
constructor(code?: RefOrNormal<string>);
|
|
277
151
|
display(value?: RefOrNormal<string>, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): ComputedRef<string>;
|
|
@@ -297,26 +171,23 @@ export declare class GeoIntlRef {
|
|
|
297
171
|
time(value: RefOrNormal<NumberOrStringOrDate>): ComputedRef<string>;
|
|
298
172
|
sort<T>(data: RefOrNormal<T[]>, compareFn?: (a: T, b: T) => [string, string]): ComputedRef<T[]>;
|
|
299
173
|
}
|
|
174
|
+
|
|
300
175
|
// File: src/classes/ref/GeoRef.d.ts
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
*/
|
|
176
|
+
import { ComputedRef, Ref } from 'vue';
|
|
177
|
+
import { GeoItemFull } from '@dxtmisha/functional-basic';
|
|
304
178
|
export declare class GeoRef {
|
|
305
179
|
static get(): Ref<GeoItemFull>;
|
|
306
180
|
static getCountry(): ComputedRef<string>;
|
|
307
181
|
static getLanguage(): ComputedRef<string>;
|
|
308
182
|
static getStandard(): ComputedRef<string>;
|
|
309
183
|
static getFirstDay(): ComputedRef<string>;
|
|
310
|
-
/**
|
|
311
|
-
* Changes data by code.
|
|
312
|
-
* @param code locale/country code
|
|
313
|
-
*/
|
|
314
184
|
static set(code: string): void;
|
|
315
185
|
}
|
|
186
|
+
|
|
316
187
|
// File: src/classes/ref/ListDataRef.d.ts
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
188
|
+
import { RefOrNormal, RefType } from '../../types/refTypes';
|
|
189
|
+
import { ListDataFull, ListDataItem, ListList, ListListInput, ListNames, ListSelectedItem, ListSelectedList } from '../../types/listTypes';
|
|
190
|
+
import { ComputedRef } from 'vue';
|
|
320
191
|
export declare class ListDataRef {
|
|
321
192
|
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);
|
|
322
193
|
readonly data: ComputedRef<ListList>;
|
|
@@ -354,19 +225,16 @@ export declare class ListDataRef {
|
|
|
354
225
|
getIndexByStep(index: string, step: number): ListDataItem | undefined;
|
|
355
226
|
getIndexNext(index: string): ListDataItem | undefined;
|
|
356
227
|
getIndexPrev(index: string): ListDataItem | undefined;
|
|
357
|
-
getItemByIndex(index?: string): {
|
|
358
|
-
key: number;
|
|
359
|
-
item: ListDataItem;
|
|
360
|
-
} | undefined;
|
|
228
|
+
getItemByIndex(index?: string): { key: number; item: ListDataItem; } | undefined;
|
|
361
229
|
getItemByKey(key: number): ListDataItem | undefined;
|
|
362
230
|
getFirstItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
363
231
|
getLastItemByParent(parent: string | undefined): ListDataItem | undefined;
|
|
364
232
|
getSubList(item: ListDataItem): ListDataRef;
|
|
365
233
|
}
|
|
234
|
+
|
|
366
235
|
// File: src/classes/ref/RouterItemRef.d.ts
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
*/
|
|
236
|
+
import { RouteLocationRaw, Router } from 'vue-router';
|
|
237
|
+
import { ConstrHrefProps } from '../../types/constructorTypes';
|
|
370
238
|
export declare class RouterItemRef {
|
|
371
239
|
static get(): Router;
|
|
372
240
|
static getLink(name: string, params?: any, query?: any): string | undefined;
|
|
@@ -376,57 +244,56 @@ export declare class RouterItemRef {
|
|
|
376
244
|
static setOneTime(router: Router): void;
|
|
377
245
|
static rawToHref(to?: string | RouteLocationRaw): ConstrHrefProps;
|
|
378
246
|
}
|
|
247
|
+
|
|
379
248
|
// File: src/classes/ref/ScrollbarWidthRef.d.ts
|
|
380
|
-
|
|
381
|
-
* Reactive scroll width.
|
|
382
|
-
*/
|
|
249
|
+
import { Ref, ComputedRef } from 'vue';
|
|
383
250
|
export declare class ScrollbarWidthRef {
|
|
384
251
|
readonly item: Ref<boolean | undefined, boolean | undefined>;
|
|
385
252
|
readonly width: Ref<number, number>;
|
|
386
253
|
constructor();
|
|
387
254
|
readonly is: ComputedRef<boolean>;
|
|
388
255
|
}
|
|
256
|
+
|
|
389
257
|
// File: src/composables/ref/useApiAsyncRef.d.ts
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
* ```typescript
|
|
395
|
-
* const { data, loading } = useApiAsyncRef('/users/1', { method: 'GET' })
|
|
396
|
-
* ```
|
|
397
|
-
*/
|
|
258
|
+
import { ApiInstance, ApiData, ApiDataValidation, ApiErrorStorageList } from '@dxtmisha/functional-basic';
|
|
259
|
+
import { UseApiRef } from './useApiRef';
|
|
260
|
+
import { RefOrNormal, RefType } from '../../types/refTypes';
|
|
261
|
+
import { ApiOptions } from '../../types/apiTypes';
|
|
398
262
|
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>;
|
|
263
|
+
|
|
399
264
|
// File: src/composables/ref/useApiDelete.d.ts
|
|
265
|
+
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
266
|
+
import { UseApiRequestSetup } from './useApiRequest';
|
|
267
|
+
import { Ref } from 'vue';
|
|
400
268
|
export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
401
269
|
}
|
|
402
|
-
/**
|
|
403
|
-
* API DELETE request.
|
|
404
|
-
*/
|
|
405
270
|
export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiDeleteSetup<T, Request, Return>): {
|
|
406
271
|
loading: Ref<boolean, boolean>;
|
|
407
272
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
408
273
|
};
|
|
274
|
+
|
|
409
275
|
// File: src/composables/ref/useApiGet.d.ts
|
|
276
|
+
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
277
|
+
import { UseApiRequestSetup } from './useApiRequest';
|
|
278
|
+
import { Ref } from 'vue';
|
|
410
279
|
export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
411
280
|
}
|
|
412
|
-
/**
|
|
413
|
-
* API GET request.
|
|
414
|
-
*/
|
|
415
281
|
export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiGetSetup<T, Request, Return>): {
|
|
416
282
|
loading: Ref<boolean, boolean>;
|
|
417
283
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
418
284
|
};
|
|
285
|
+
|
|
419
286
|
// File: src/composables/ref/useApiManagementAsyncRef.d.ts
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
287
|
+
import { ApiInstance, ArrayToItem, FormattersListColumns, FormattersOptionsList, SearchColumns, ApiDataValidation, SearchFormatList, ApiData, ApiErrorItem, ApiFetch } from '@dxtmisha/functional-basic';
|
|
288
|
+
import { ApiManagementGet, ApiManagementRequest, ApiManagementSearch, ApiManagementValue } from '../../types/apiTypes';
|
|
289
|
+
import { ComputedRef, Ref } from 'vue';
|
|
423
290
|
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): {
|
|
424
291
|
isValid: ComputedRef<boolean>;
|
|
425
292
|
isResponseContractValid: ComputedRef<boolean>;
|
|
426
|
-
responseValidationResult: ComputedRef<
|
|
293
|
+
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
427
294
|
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
428
|
-
readonly data: ComputedRef<
|
|
429
|
-
errorItem: ComputedRef<
|
|
295
|
+
readonly data: ComputedRef<ApiData<Return> | undefined>;
|
|
296
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
430
297
|
readonly length: ComputedRef<number>;
|
|
431
298
|
lengthData: ComputedRef<number>;
|
|
432
299
|
starting: ComputedRef<boolean>;
|
|
@@ -442,25 +309,22 @@ export declare function useApiManagementAsyncRef<Return extends ApiManagementVal
|
|
|
442
309
|
initSsr: () => void;
|
|
443
310
|
reset: () => Promise<void>;
|
|
444
311
|
abort: () => void;
|
|
445
|
-
sendPost: (request?: ApiFetch["request"]) => Promise<
|
|
446
|
-
sendPut: (request?: ApiFetch["request"]) => Promise<
|
|
447
|
-
sendDelete: (request?: ApiFetch["request"]) => Promise<
|
|
312
|
+
sendPost: (request?: ApiFetch["request"]) => Promise<ApiData<Post> | undefined>;
|
|
313
|
+
sendPut: (request?: ApiFetch["request"]) => Promise<ApiData<Put> | undefined>;
|
|
314
|
+
sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
|
|
448
315
|
};
|
|
316
|
+
|
|
449
317
|
// File: src/composables/ref/useApiManagementRef.d.ts
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
* @remarks Recommended for display values; not technical IDs.
|
|
454
|
-
* @example
|
|
455
|
-
* const products = useApiManagementRef({ path: '/api/v1/products' }, { price: (v) => `${v} USD` });
|
|
456
|
-
*/
|
|
318
|
+
import { Ref, ComputedRef } from 'vue';
|
|
319
|
+
import { FormattersOptionsList, ApiData, ApiInstance, ArrayToItem, SearchColumns, SearchFormatList, FormattersListColumns, ApiFetch, ApiDataValidation, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
320
|
+
import { ApiManagementGet, ApiManagementRequest, ApiManagementSearch, ApiManagementValue } from '../../types/apiTypes';
|
|
457
321
|
export declare function useApiManagementRef<Return extends ApiManagementValue, FormattersOptions extends FormattersOptionsList, Post extends Record<string, any>, Put extends Record<string, any>, Delete extends Record<string, any>, Type extends ApiManagementValue = Return, Item extends ArrayToItem<Return> = ArrayToItem<Return>, ItemFormatters extends FormattersListColumns<Item, FormattersOptions>[number] = FormattersListColumns<Item, FormattersOptions>[number], Columns extends SearchColumns<ItemFormatters> = []>(propsGet: ApiManagementGet<Return, Type>, formattersOptions?: FormattersOptions, searchOptions?: ApiManagementSearch<Item, Columns>, postRequest?: ApiManagementRequest<Post>, putRequest?: ApiManagementRequest<Put>, deleteRequest?: ApiManagementRequest<Delete>, action?: () => Promise<void> | void, apiInstance?: ApiInstance): {
|
|
458
322
|
isValid: ComputedRef<boolean>;
|
|
459
323
|
isResponseContractValid: ComputedRef<boolean>;
|
|
460
|
-
responseValidationResult: ComputedRef<
|
|
324
|
+
responseValidationResult: ComputedRef<ApiDataValidation | undefined>;
|
|
461
325
|
list: ComputedRef<SearchFormatList<ItemFormatters, Columns>>;
|
|
462
326
|
readonly data: ComputedRef<ApiData<Return> | undefined>;
|
|
463
|
-
errorItem: ComputedRef<
|
|
327
|
+
errorItem: ComputedRef<ApiErrorItem | undefined>;
|
|
464
328
|
readonly length: ComputedRef<number>;
|
|
465
329
|
lengthData: ComputedRef<number>;
|
|
466
330
|
starting: ComputedRef<boolean>;
|
|
@@ -480,27 +344,34 @@ export declare function useApiManagementRef<Return extends ApiManagementValue, F
|
|
|
480
344
|
sendPut: (request?: ApiFetch["request"]) => Promise<ApiData<Put> | undefined>;
|
|
481
345
|
sendDelete: (request?: ApiFetch["request"]) => Promise<ApiData<Delete> | undefined>;
|
|
482
346
|
};
|
|
347
|
+
|
|
483
348
|
// File: src/composables/ref/useApiPost.d.ts
|
|
349
|
+
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
350
|
+
import { UseApiRequestSetup } from './useApiRequest';
|
|
351
|
+
import { Ref } from 'vue';
|
|
484
352
|
export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
485
353
|
}
|
|
486
|
-
/**
|
|
487
|
-
* API POST request wrapper.
|
|
488
|
-
*/
|
|
489
354
|
export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPostSetup<T, Request, Return>): {
|
|
490
355
|
loading: Ref<boolean, boolean>;
|
|
491
356
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
492
357
|
};
|
|
358
|
+
|
|
493
359
|
// File: src/composables/ref/useApiPut.d.ts
|
|
360
|
+
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
361
|
+
import { UseApiRequestSetup } from './useApiRequest';
|
|
362
|
+
import { Ref } from 'vue';
|
|
494
363
|
export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
495
364
|
}
|
|
496
|
-
/**
|
|
497
|
-
* API PUT request wrapper.
|
|
498
|
-
*/
|
|
499
365
|
export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPutSetup<T, Request, Return>): {
|
|
500
366
|
loading: Ref<boolean, boolean>;
|
|
501
367
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
502
368
|
};
|
|
369
|
+
|
|
503
370
|
// File: src/composables/ref/useApiRef.d.ts
|
|
371
|
+
import { ComputedRef, Ref } from 'vue';
|
|
372
|
+
import { ApiInstance, ApiData, ApiDataValidation, ApiErrorStorageList, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
373
|
+
import { ApiOptions } from '../../types/apiTypes';
|
|
374
|
+
import { RefOrNormal, RefType } from '../../types/refTypes';
|
|
504
375
|
export interface UseApiRef<R> {
|
|
505
376
|
data: ComputedRef<ApiData<R> | undefined>;
|
|
506
377
|
item: Ref<ApiData<R> | undefined>;
|
|
@@ -521,16 +392,14 @@ export interface UseApiRef<R> {
|
|
|
521
392
|
stop(): void;
|
|
522
393
|
abort(): void;
|
|
523
394
|
}
|
|
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
395
|
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>;
|
|
532
396
|
export declare const setApiRefGlobalConditions: (conditions: RefType<any>) => void;
|
|
397
|
+
|
|
533
398
|
// File: src/composables/ref/useApiRequest.d.ts
|
|
399
|
+
import { ApiInstance, ApiMethodItem, ApiData, ApiFetch, ApiErrorStorageList, ApiDataValidation } from '@dxtmisha/functional-basic';
|
|
400
|
+
import { ApiOptions } from '../../types/apiTypes';
|
|
401
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
402
|
+
import { Ref } from 'vue';
|
|
534
403
|
export interface UseApiRequestSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> {
|
|
535
404
|
path?: RefOrNormal<string | undefined>;
|
|
536
405
|
method?: ApiMethodItem;
|
|
@@ -543,81 +412,61 @@ export interface UseApiRequestSetup<T, Request extends ApiFetch['request'] = Api
|
|
|
543
412
|
options?: ApiOptions;
|
|
544
413
|
apiInstance?: ApiInstance;
|
|
545
414
|
}
|
|
546
|
-
/**
|
|
547
|
-
* Core API request handler.
|
|
548
|
-
*/
|
|
549
415
|
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>): {
|
|
550
416
|
loading: Ref<boolean, boolean>;
|
|
551
417
|
send(request?: Request): Promise<Return | undefined>;
|
|
552
418
|
};
|
|
419
|
+
|
|
553
420
|
// File: src/composables/ref/useBroadcastValueRef.d.ts
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
*/
|
|
558
|
-
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<BroadcastValueItem<T>>;
|
|
421
|
+
import { Ref } from 'vue';
|
|
422
|
+
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<T | string | undefined>;
|
|
423
|
+
|
|
559
424
|
// File: src/composables/ref/useCookieRef.d.ts
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
*/
|
|
425
|
+
import { Ref } from 'vue';
|
|
426
|
+
import { CookieOptions } from '@dxtmisha/functional-basic';
|
|
563
427
|
export declare function useCookieRef<T>(name: string, defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): Ref<T | string | undefined>;
|
|
428
|
+
|
|
564
429
|
// File: src/composables/ref/useFormattersRef.d.ts
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
430
|
+
import { FormattersListProp, FormattersOptionsList, FormattersReturn } from '@dxtmisha/functional-basic';
|
|
431
|
+
import { RefType } from '../../types/refTypes';
|
|
432
|
+
import { ComputedRef } from 'vue';
|
|
568
433
|
export declare function useFormattersRef<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp>(list: RefType<List | undefined>, options: Options): {
|
|
569
434
|
listFormat: ComputedRef<FormattersReturn<List, Options>>;
|
|
570
435
|
length: ComputedRef<number>;
|
|
571
436
|
};
|
|
437
|
+
|
|
572
438
|
// File: src/composables/ref/useGeoIntlRef.d.ts
|
|
573
|
-
|
|
574
|
-
* Returns data formatting class.
|
|
575
|
-
*/
|
|
439
|
+
import { GeoIntlRef } from '../../classes/ref/GeoIntlRef';
|
|
576
440
|
export declare function useGeoIntlRef(): GeoIntlRef;
|
|
441
|
+
|
|
577
442
|
// File: src/composables/ref/useHashRef.d.ts
|
|
578
|
-
|
|
579
|
-
* Reactive hash management.
|
|
580
|
-
*/
|
|
443
|
+
import { ShallowRef } from 'vue';
|
|
581
444
|
export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
445
|
+
|
|
582
446
|
// File: src/composables/ref/useLazyItemByMarginRef.d.ts
|
|
583
|
-
|
|
584
|
-
rootMargin: string;
|
|
585
|
-
item: any;
|
|
586
|
-
};
|
|
587
|
-
/**
|
|
588
|
-
* Tracks element screen appearance by margin.
|
|
589
|
-
*/
|
|
447
|
+
import { RefType } from '../../types/refTypes';
|
|
590
448
|
export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin: string) => {
|
|
591
449
|
lazyItemStatus: any;
|
|
592
450
|
readonly lazyItem: any;
|
|
593
451
|
};
|
|
452
|
+
|
|
594
453
|
// File: src/composables/ref/useLazyRef.d.ts
|
|
595
|
-
|
|
596
|
-
status: ShallowRef<boolean>;
|
|
597
|
-
ratio: ShallowRef<number>;
|
|
598
|
-
entry: ShallowRef<IntersectionObserverEntry | undefined>;
|
|
599
|
-
stopWatch: () => void;
|
|
600
|
-
};
|
|
601
|
-
export type LazyList = Record<string, LazyItem>;
|
|
602
|
-
/**
|
|
603
|
-
* Tracks element screen appearance.
|
|
604
|
-
*/
|
|
454
|
+
import { Ref, ShallowRef } from 'vue';
|
|
605
455
|
export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
606
456
|
intersectionObserver: IntersectionObserver | undefined;
|
|
607
|
-
getItem(element: HTMLElement):
|
|
457
|
+
getItem(element: HTMLElement): any;
|
|
608
458
|
addLazyItem(element: Ref<HTMLElement | undefined>): ShallowRef<boolean, boolean>;
|
|
609
459
|
removeLazyItem: (element?: HTMLElement) => void;
|
|
610
460
|
disconnectLazy: () => void | undefined;
|
|
611
461
|
};
|
|
462
|
+
|
|
612
463
|
// File: src/composables/ref/useLoadingRef.d.ts
|
|
613
|
-
|
|
614
|
-
* Returns loading status.
|
|
615
|
-
*/
|
|
464
|
+
import { ShallowRef } from 'vue';
|
|
616
465
|
export declare function useLoadingRef(): ShallowRef<boolean, boolean>;
|
|
466
|
+
|
|
617
467
|
// File: src/composables/ref/useMeta.d.ts
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
*/
|
|
468
|
+
import { MetaRobots, MetaStatic } from '@dxtmisha/functional-basic';
|
|
469
|
+
import { Ref } from 'vue';
|
|
621
470
|
export declare const useMeta: () => Readonly<{
|
|
622
471
|
meta: typeof MetaStatic;
|
|
623
472
|
title: Ref<string, string>;
|
|
@@ -641,7 +490,7 @@ export declare const useMeta: () => Readonly<{
|
|
|
641
490
|
setRobots: (value: MetaRobots) => void;
|
|
642
491
|
setSiteName: (value: string) => void;
|
|
643
492
|
setSuffix: (suffix: string) => typeof MetaStatic;
|
|
644
|
-
} & {
|
|
493
|
+
}> & {
|
|
645
494
|
init(): Readonly<{
|
|
646
495
|
meta: typeof MetaStatic;
|
|
647
496
|
title: Ref<string, string>;
|
|
@@ -668,10 +517,13 @@ export declare const useMeta: () => Readonly<{
|
|
|
668
517
|
}>;
|
|
669
518
|
destroyExecute?(): void;
|
|
670
519
|
}>;
|
|
520
|
+
|
|
671
521
|
// File: src/composables/ref/useRouterList.d.ts
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
522
|
+
import { Ref, ComputedRef } from 'vue';
|
|
523
|
+
import { NumberOrString } from '@dxtmisha/functional-basic';
|
|
524
|
+
import { ConstrBind } from '../../types/constructorTypes';
|
|
525
|
+
import { ListDataBasic } from '../../types/listTypes';
|
|
526
|
+
import { RefType } from '../../types/refTypes';
|
|
675
527
|
export declare const useRouterList: <T extends ListDataBasic>(list: RefType<ConstrBind<T>[] | undefined>, selected?: Ref<string> | string, hasTo?: boolean) => {
|
|
676
528
|
item: ComputedRef<T | undefined>;
|
|
677
529
|
selected: Ref<string, string>;
|
|
@@ -680,10 +532,11 @@ export declare const useRouterList: <T extends ListDataBasic>(list: RefType<Cons
|
|
|
680
532
|
to: (name?: string) => void;
|
|
681
533
|
toMain(): void;
|
|
682
534
|
};
|
|
535
|
+
|
|
683
536
|
// File: src/composables/ref/useSearchRef.d.ts
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
537
|
+
import { Ref, ComputedRef } from 'vue';
|
|
538
|
+
import { SearchColumns, SearchFormatList, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
539
|
+
import { SearchListInput } from '../../types/searchTypes';
|
|
687
540
|
export declare function useSearchRef<T extends SearchItem, K extends SearchColumns<T>>(list: SearchListInput<T>, columns: K, value?: Ref<string>, options?: SearchOptions): {
|
|
688
541
|
isSearch: ComputedRef<boolean>;
|
|
689
542
|
search: Ref<string, string>;
|
|
@@ -691,60 +544,52 @@ export declare function useSearchRef<T extends SearchItem, K extends SearchColum
|
|
|
691
544
|
listSearch: ComputedRef<SearchFormatList<T, K>>;
|
|
692
545
|
length: ComputedRef<number>;
|
|
693
546
|
};
|
|
547
|
+
|
|
694
548
|
// File: src/composables/ref/useSearchValueRef.d.ts
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
*/
|
|
549
|
+
import { Ref } from 'vue';
|
|
550
|
+
import { SearchList, SearchColumns, SearchItem } from '@dxtmisha/functional-basic';
|
|
698
551
|
export declare function useSearchValueRef<T extends SearchItem, K extends SearchColumns<T>>(item: SearchList<T, K>, value?: Ref<string>): {
|
|
699
552
|
search: Ref<string, string>;
|
|
700
553
|
searchDelay: Ref<string, string>;
|
|
701
554
|
loading: Ref<boolean, boolean>;
|
|
702
555
|
};
|
|
556
|
+
|
|
703
557
|
// File: src/composables/ref/useSessionRef.d.ts
|
|
704
|
-
|
|
705
|
-
* Reactive session storage management.
|
|
706
|
-
*/
|
|
558
|
+
import { Ref } from 'vue';
|
|
707
559
|
export declare function useSessionRef<T>(name: string, defaultValue?: T | (() => T)): Ref<T | undefined>;
|
|
560
|
+
|
|
708
561
|
// File: src/composables/ref/useStorageRef.d.ts
|
|
709
|
-
|
|
710
|
-
* Reactive local storage management.
|
|
711
|
-
*/
|
|
562
|
+
import { Ref } from 'vue';
|
|
712
563
|
export declare function useStorageRef<T>(name: string, defaultValue?: T | (() => T), cache?: number): Ref<T | undefined>;
|
|
564
|
+
|
|
713
565
|
// File: src/composables/ref/useTranslateRef.d.ts
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
* Use `as const` for key inference.
|
|
717
|
-
* @example
|
|
718
|
-
* const translations = useTranslateRef(['home.title'] as const);
|
|
719
|
-
*/
|
|
566
|
+
import { ShallowRef } from 'vue';
|
|
567
|
+
import { TranslateInstance, TranslateList } from '@dxtmisha/functional-basic';
|
|
720
568
|
export declare function useTranslateRef<T extends (string | string[])[]>(names: T, translateInstance?: TranslateInstance): ShallowRef<TranslateList<T>>;
|
|
721
|
-
/**
|
|
722
|
-
* useTranslateRef shorthand.
|
|
723
|
-
*/
|
|
724
569
|
export declare const t: <T extends string[]>(names: T) => ShallowRef<TranslateList<T>>;
|
|
570
|
+
|
|
725
571
|
// File: src/flags.d.ts
|
|
726
572
|
export declare const uiMakeFlags: () => void;
|
|
573
|
+
|
|
727
574
|
// File: src/functions/basic.d.ts
|
|
728
575
|
export * from '@dxtmisha/functional-basic';
|
|
576
|
+
|
|
729
577
|
// File: src/functions/computedAsync.d.ts
|
|
730
|
-
|
|
731
|
-
* Async computed property.
|
|
732
|
-
*/
|
|
578
|
+
import { ComputedRef, DebuggerOptions } from 'vue';
|
|
733
579
|
export declare function computedAsync<R>(getter: (() => Promise<R>) | (() => R) | R, initialState?: (() => R) | R, ignore?: R, debugOptions?: DebuggerOptions): ComputedRef<R | undefined>;
|
|
580
|
+
|
|
734
581
|
// File: src/functions/computedByLanguage.d.ts
|
|
735
|
-
|
|
736
|
-
* Computed property dependent on current language.
|
|
737
|
-
*/
|
|
582
|
+
import { ComputedGetter, ComputedRef, DebuggerOptions } from 'vue';
|
|
738
583
|
export declare function computedByLanguage<T, R extends (T | undefined) = T | undefined>(getter: ComputedGetter<R>, getterNone?: R | (() => R), conditions?: () => boolean, debugOptions?: DebuggerOptions): ComputedRef<R>;
|
|
584
|
+
|
|
739
585
|
// File: src/functions/computedEternity.d.ts
|
|
740
|
-
|
|
741
|
-
* On-demand cached computed property.
|
|
742
|
-
*/
|
|
586
|
+
import { Ref } from 'vue';
|
|
743
587
|
export declare function computedEternity<T>(getter: () => Promise<T> | T, initialState?: (() => T) | T): Ref<T, T>;
|
|
588
|
+
|
|
744
589
|
// File: src/functions/dxtFunctionalPlugin.d.ts
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
590
|
+
import { Plugin } from 'vue';
|
|
591
|
+
import { ApiConfig, ErrorCenterCauseList, ErrorCenterHandlerList, IconsConfig, TranslateConfig } from '@dxtmisha/functional-basic';
|
|
592
|
+
import { Router } from 'vue-router';
|
|
748
593
|
export interface FunctionalPluginOptions {
|
|
749
594
|
api?: ApiConfig;
|
|
750
595
|
translate?: TranslateConfig;
|
|
@@ -754,130 +599,91 @@ export interface FunctionalPluginOptions {
|
|
|
754
599
|
errorCauses?: ErrorCenterCauseList;
|
|
755
600
|
errorHandlers?: ErrorCenterHandlerList;
|
|
756
601
|
}
|
|
757
|
-
/**
|
|
758
|
-
* Vue plugin for services initialization.
|
|
759
|
-
*/
|
|
760
602
|
export declare const dxtFunctionalPlugin: Plugin;
|
|
603
|
+
|
|
761
604
|
// File: src/functions/executeUse.d.ts
|
|
762
|
-
/**
|
|
763
|
-
* Singleton initialization strategies.
|
|
764
|
-
*/
|
|
765
605
|
export declare enum ExecuteUseType {
|
|
766
606
|
global = "global",
|
|
767
607
|
provide = "provide",
|
|
768
608
|
local = "local"
|
|
769
609
|
}
|
|
770
|
-
/**
|
|
771
|
-
* Managed singleton return type.
|
|
772
|
-
*/
|
|
773
610
|
export type ExecuteUseReturn<R> = Readonly<R & {
|
|
774
611
|
init(): Readonly<R>;
|
|
775
612
|
destroyExecute?(): void;
|
|
776
613
|
}>;
|
|
777
|
-
/**
|
|
778
|
-
* Creates a managed singleton.
|
|
779
|
-
* @remarks
|
|
780
|
-
* Useful for API services, resource optimization, and shared state.
|
|
781
|
-
* @example
|
|
782
|
-
* export const useUserApi = executeUseGlobal(() => useApiGet('/api/user'));
|
|
783
|
-
*/
|
|
784
614
|
export declare function executeUse<R, O extends any[], RI extends ExecuteUseReturn<R> = ExecuteUseReturn<R>>(callback: (...args: O) => R, type?: ExecuteUseType): ((...args: O) => RI) | (() => RI);
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
export declare function executeUseGlobal<R>(callback: () => R): (() => Readonly<R & {
|
|
789
|
-
init(): Readonly<R>;
|
|
790
|
-
destroyExecute?(): void;
|
|
791
|
-
}>) | (() => Readonly<R & {
|
|
792
|
-
init(): Readonly<R>;
|
|
793
|
-
destroyExecute?(): void;
|
|
794
|
-
}>);
|
|
795
|
-
/**
|
|
796
|
-
* Component-scoped singleton.
|
|
797
|
-
*/
|
|
798
|
-
export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
|
|
799
|
-
init(): Readonly<R>;
|
|
800
|
-
destroyExecute?(): void;
|
|
801
|
-
}>) | (() => Readonly<R & {
|
|
802
|
-
init(): Readonly<R>;
|
|
803
|
-
destroyExecute?(): void;
|
|
804
|
-
}>);
|
|
805
|
-
/**
|
|
806
|
-
* Local singleton.
|
|
807
|
-
*/
|
|
808
|
-
export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): ((...args: O) => Readonly<R & {
|
|
809
|
-
init(): Readonly<R>;
|
|
810
|
-
destroyExecute?(): void;
|
|
811
|
-
}>) | (() => Readonly<R & {
|
|
812
|
-
init(): Readonly<R>;
|
|
813
|
-
destroyExecute?(): void;
|
|
814
|
-
}>);
|
|
615
|
+
export declare function executeUseGlobal<R>(callback: () => R): any;
|
|
616
|
+
export declare function executeUseProvide<R, O extends any[]>(callback: (...args: O) => R): any;
|
|
617
|
+
export declare function executeUseLocal<R, O extends any[]>(callback: (...args: O) => R): any;
|
|
815
618
|
export declare function executeUseGlobalInit(): void;
|
|
619
|
+
|
|
816
620
|
// File: src/functions/getInject.d.ts
|
|
817
|
-
/**
|
|
818
|
-
* Get injected value.
|
|
819
|
-
*/
|
|
820
621
|
export declare function getInject<T>(name: string): T | undefined;
|
|
622
|
+
|
|
821
623
|
// File: src/functions/getOptions.d.ts
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
624
|
+
import { ApiFetch } from '@dxtmisha/functional-basic';
|
|
625
|
+
import { ApiOptions } from '../types/apiTypes';
|
|
626
|
+
import { RefOrNormal } from '../types/refTypes';
|
|
825
627
|
export declare const getOptions: (options?: ApiOptions) => RefOrNormal<ApiFetch>;
|
|
628
|
+
|
|
629
|
+
// File: src/functions/ref/executeFunctionRef.d.ts
|
|
630
|
+
import { RefOrNormalOrFunction } from '../../types/refTypes';
|
|
631
|
+
export declare function executeFunctionRef<T>(data: RefOrNormalOrFunction<T>): T;
|
|
632
|
+
|
|
826
633
|
// File: src/functions/ref/getApiErrorRef.d.ts
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
634
|
+
import { ComputedRef } from 'vue';
|
|
635
|
+
import { ApiData, ApiErrorItem } from '@dxtmisha/functional-basic';
|
|
636
|
+
import { RefType } from '../../types/refTypes';
|
|
830
637
|
export declare function getApiErrorRef<R>(data: RefType<ApiData<R> | undefined>): ComputedRef<ApiErrorItem | undefined>;
|
|
638
|
+
|
|
831
639
|
// File: src/functions/ref/getBindRef.d.ts
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
640
|
+
import { ComputedRef } from 'vue';
|
|
641
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
642
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
835
643
|
export declare function getBindRef<T, R extends ItemList>(value: RefOrNormal<T | R> | undefined, nameExtra?: RefOrNormal<ItemList> | string, name?: string): ComputedRef<R>;
|
|
644
|
+
|
|
836
645
|
// File: src/functions/ref/getRef.d.ts
|
|
837
|
-
|
|
838
|
-
* Returns raw value from Ref or normal variable.
|
|
839
|
-
*/
|
|
646
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
840
647
|
export declare function getRef<T>(item: RefOrNormal<T>): T;
|
|
648
|
+
|
|
841
649
|
// File: src/functions/ref/render.d.ts
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
650
|
+
import { VNode } from 'vue';
|
|
651
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
652
|
+
import { RawChildren, RawSlots } from '../../types/refTypes';
|
|
845
653
|
export declare function render<T extends ItemList>(name: string | any, props?: T, children?: RawChildren | RawSlots, index?: string): VNode;
|
|
654
|
+
|
|
846
655
|
// File: src/functions/ref/setRef.d.ts
|
|
847
|
-
|
|
848
|
-
* Updates Ref value.
|
|
849
|
-
*/
|
|
656
|
+
import { Ref } from 'vue';
|
|
850
657
|
export declare function setRef<T>(item: Ref<T>, value: T): void;
|
|
658
|
+
|
|
851
659
|
// File: src/functions/ref/toRefItem.d.ts
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
*/
|
|
660
|
+
import { Ref } from 'vue';
|
|
661
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
855
662
|
export declare function toRefItem<T>(item: RefOrNormal<T>): Ref<T>;
|
|
663
|
+
|
|
856
664
|
// File: src/functions/render/getBind.d.ts
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
*/
|
|
665
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
666
|
+
import { ConstrBind } from '../../types/constructorTypes';
|
|
860
667
|
export declare function getBind<T, R extends ItemList>(value: T | R | undefined | null, nameExtra?: ItemList | string, name?: string, except?: boolean): ConstrBind<R>;
|
|
668
|
+
|
|
861
669
|
// File: src/functions/render/getClassName.d.ts
|
|
862
|
-
|
|
863
|
-
* Gets class name from property.
|
|
864
|
-
*/
|
|
670
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
865
671
|
export declare function getClassName<T extends ItemList>(props?: T): string | undefined;
|
|
672
|
+
|
|
866
673
|
// File: src/functions/render/getIndexForRender.d.ts
|
|
867
|
-
|
|
868
|
-
* Generates render key.
|
|
869
|
-
*/
|
|
674
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
870
675
|
export declare function getIndexForRender<T extends ItemList>(name: string | any, props?: T, index?: string): string | undefined;
|
|
676
|
+
|
|
871
677
|
// File: src/functions/toBind.d.ts
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
*/
|
|
678
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
679
|
+
import { ConstrBind } from '../types/constructorTypes';
|
|
875
680
|
export declare function toBind<R extends ItemList = ItemList>(extra: ItemList, value: ItemList): ConstrBind<R>;
|
|
681
|
+
|
|
876
682
|
// File: src/functions/toBinds.d.ts
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
*/
|
|
683
|
+
import { ItemList } from '@dxtmisha/functional-basic';
|
|
684
|
+
import { ConstrBind } from '../types/constructorTypes';
|
|
880
685
|
export declare function toBinds<R extends ItemList = ItemList>(...values: (ItemList | undefined)[]): ConstrBind<R>;
|
|
686
|
+
|
|
881
687
|
// File: src/library.d.ts
|
|
882
688
|
export * from './classes/design/DesignAbstract';
|
|
883
689
|
export * from './classes/design/DesignAsyncAbstract';
|
|
@@ -926,6 +732,7 @@ export * from './functions/dxtFunctionalPlugin';
|
|
|
926
732
|
export * from './functions/executeUse';
|
|
927
733
|
export * from './functions/getInject';
|
|
928
734
|
export * from './functions/getOptions';
|
|
735
|
+
export * from './functions/ref/executeFunctionRef';
|
|
929
736
|
export * from './functions/ref/getApiErrorRef';
|
|
930
737
|
export * from './functions/ref/getBindRef';
|
|
931
738
|
export * from './functions/ref/getRef';
|
|
@@ -942,16 +749,13 @@ export * from './types/constructorTypes';
|
|
|
942
749
|
export * from './types/listTypes';
|
|
943
750
|
export * from './types/refTypes';
|
|
944
751
|
export * from './types/searchTypes';
|
|
752
|
+
|
|
945
753
|
// File: src/types/apiTypes.d.ts
|
|
946
|
-
|
|
754
|
+
import { ApiData, ApiDataValidation, ApiDefaultValue, ApiErrorStorageList, ApiFetch, ApiMethodItem, SearchColumns, SearchItem, SearchOptions } from '@dxtmisha/functional-basic';
|
|
755
|
+
import { RefOrNormal, RefType } from './refTypes';
|
|
756
|
+
import { Ref } from 'vue';
|
|
947
757
|
export type ApiOptions = ApiMethodItem | RefOrNormal<ApiFetch>;
|
|
948
|
-
/**
|
|
949
|
-
* Base API management values.
|
|
950
|
-
*/
|
|
951
758
|
export type ApiManagementValue = ApiDefaultValue | ApiDefaultValue[];
|
|
952
|
-
/**
|
|
953
|
-
* Main GET config for API management.
|
|
954
|
-
*/
|
|
955
759
|
export type ApiManagementGet<Return extends ApiManagementValue, Type extends ApiManagementValue = Return> = {
|
|
956
760
|
path?: RefOrNormal<string | undefined>;
|
|
957
761
|
options?: ApiOptions;
|
|
@@ -964,17 +768,11 @@ export type ApiManagementGet<Return extends ApiManagementValue, Type extends Api
|
|
|
964
768
|
unmounted?: boolean;
|
|
965
769
|
skeleton?: () => Return;
|
|
966
770
|
};
|
|
967
|
-
/**
|
|
968
|
-
* Client-side search config.
|
|
969
|
-
*/
|
|
970
771
|
export type ApiManagementSearch<T extends SearchItem, K extends SearchColumns<T>> = {
|
|
971
772
|
columns: K;
|
|
972
773
|
value?: Ref<string>;
|
|
973
774
|
options?: SearchOptions;
|
|
974
775
|
};
|
|
975
|
-
/**
|
|
976
|
-
* Mutation request config.
|
|
977
|
-
*/
|
|
978
776
|
export type ApiManagementRequest<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> = {
|
|
979
777
|
path?: RefOrNormal<string | undefined>;
|
|
980
778
|
action?: (data: Return | undefined) => Promise<void> | void;
|
|
@@ -985,55 +783,25 @@ export type ApiManagementRequest<T, Request extends ApiFetch['request'] = ApiFet
|
|
|
985
783
|
toData?: boolean;
|
|
986
784
|
options?: ApiOptions;
|
|
987
785
|
};
|
|
786
|
+
|
|
988
787
|
// File: src/types/constructorTypes.d.ts
|
|
989
|
-
|
|
788
|
+
import { Ref, PropType, ComputedRef } from 'vue';
|
|
789
|
+
import { Undefined } from '@dxtmisha/functional-basic';
|
|
790
|
+
import { RefOrNormal, RefType } from './refTypes';
|
|
990
791
|
export type ConstrItem = Record<string, any>;
|
|
991
|
-
|
|
992
|
-
export type ConstrValue<T = any> = {
|
|
993
|
-
value?: T;
|
|
994
|
-
};
|
|
995
|
-
/** Generic record for components */
|
|
792
|
+
export type ConstrValue<T = any> = { value?: T; };
|
|
996
793
|
export type ConstrComponent = Record<string, any>;
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
*/
|
|
1000
|
-
export type ConstrComponentMod<P extends ConstrItem> = ConstrItem | {
|
|
1001
|
-
[K in keyof P]?: RefOrNormal<P[K]>;
|
|
1002
|
-
};
|
|
1003
|
-
export type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & {
|
|
1004
|
-
elementHtml?: ComputedRef<E | undefined>;
|
|
1005
|
-
};
|
|
1006
|
-
/** Utility type to convert union to intersection */
|
|
794
|
+
export type ConstrComponentMod<P extends ConstrItem> = ConstrItem | { [K in keyof P]?: RefOrNormal<P[K]>; };
|
|
795
|
+
export type ConstrExpose<E extends Element, EXPOSE extends ConstrItem> = EXPOSE & { elementHtml?: ComputedRef<E | undefined>; };
|
|
1007
796
|
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
1008
|
-
/** Extract emit item */
|
|
1009
797
|
export type ConstrEmitItem<T extends ConstrItem> = T[keyof T];
|
|
1010
|
-
|
|
1011
|
-
* Constructor emit signatures.
|
|
1012
|
-
*/
|
|
1013
|
-
export type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{
|
|
1014
|
-
[K in keyof T]: (evt: K, ...args: T[K]) => void;
|
|
1015
|
-
}>>;
|
|
1016
|
-
/** Object type for CSS classes */
|
|
798
|
+
export type ConstrEmit<T extends ConstrItem = ConstrItem> = UnionToIntersection<ConstrEmitItem<{ [K in keyof T]: (evt: K, ...args: T[K]) => void; }>>;
|
|
1017
799
|
export type ConstrClassObject = Record<string, boolean | undefined>;
|
|
1018
|
-
/**
|
|
1019
|
-
* Constructor class formats.
|
|
1020
|
-
*/
|
|
1021
800
|
export type ConstrClass = string | (string | ConstrClass | Undefined)[] | ConstrClassObject;
|
|
1022
|
-
/** Map class names to definitions */
|
|
1023
801
|
export type ConstrClassList = Record<string, ConstrClass>;
|
|
1024
|
-
|
|
1025
|
-
export type ConstrClasses = {
|
|
1026
|
-
main: ConstrClass;
|
|
1027
|
-
} & ConstrClassList;
|
|
1028
|
-
/** Individual style property type */
|
|
802
|
+
export type ConstrClasses = { main: ConstrClass; } & ConstrClassList;
|
|
1029
803
|
export type ConstrStylesItem = string | null;
|
|
1030
|
-
/**
|
|
1031
|
-
* Constructor styles structure.
|
|
1032
|
-
*/
|
|
1033
804
|
export type ConstrStyles = Record<string, ConstrStylesItem> | ConstrStyles[];
|
|
1034
|
-
/**
|
|
1035
|
-
* Constructor options.
|
|
1036
|
-
*/
|
|
1037
805
|
export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem, P extends ConstrItem> = {
|
|
1038
806
|
components?: COMP;
|
|
1039
807
|
compMod?: ConstrComponentMod<P>;
|
|
@@ -1041,108 +809,66 @@ export type ConstrOptions<COMP extends ConstrComponent, EMITS extends ConstrItem
|
|
|
1041
809
|
classes?: RefType<ConstrClasses>;
|
|
1042
810
|
styles?: RefType<ConstrStyles>;
|
|
1043
811
|
};
|
|
1044
|
-
/**
|
|
1045
|
-
* Constructor setup.
|
|
1046
|
-
*/
|
|
1047
812
|
export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP extends ConstrItem> = {
|
|
1048
813
|
name: string;
|
|
1049
814
|
element: Ref<E | undefined>;
|
|
1050
815
|
classes: RefType<CLASSES>;
|
|
1051
816
|
styles: RefType<ConstrStyles>;
|
|
1052
817
|
} & SETUP;
|
|
1053
|
-
|
|
1054
|
-
export type ConstrRegistration = {
|
|
1055
|
-
flag?: boolean;
|
|
1056
|
-
translate?: Record<string, string>;
|
|
1057
|
-
};
|
|
1058
|
-
/**
|
|
1059
|
-
* Component bind with class/style.
|
|
1060
|
-
*/
|
|
818
|
+
export type ConstrRegistration = { flag?: boolean; translate?: Record<string, string>; };
|
|
1061
819
|
export type ConstrBind<T> = T & Record<string, any> & {
|
|
1062
820
|
key?: string;
|
|
1063
821
|
class?: ConstrClass;
|
|
1064
822
|
style?: ConstrStyles;
|
|
1065
823
|
};
|
|
1066
|
-
/** Vue prop definition options */
|
|
1067
824
|
export type ConstrPropItemOptions<T = any> = {
|
|
1068
825
|
type?: PropType<T>;
|
|
1069
826
|
required?: boolean;
|
|
1070
827
|
default?: any;
|
|
1071
828
|
validator?(value: any, props: any): boolean;
|
|
1072
829
|
};
|
|
1073
|
-
/** Constructor prop element */
|
|
1074
830
|
export type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
|
|
1075
|
-
|
|
1076
|
-
export type
|
|
1077
|
-
|
|
1078
|
-
};
|
|
1079
|
-
/** Link properties */
|
|
1080
|
-
export type ConstrHrefProps = {
|
|
1081
|
-
href?: string;
|
|
1082
|
-
};
|
|
831
|
+
export type ConstrProps<P = Record<string, any>> = { [K in keyof P]: ConstrPropItem<P[K]>; };
|
|
832
|
+
export type ConstrHrefProps = { href?: string; };
|
|
833
|
+
|
|
1083
834
|
// File: src/types/listTypes.d.ts
|
|
1084
|
-
|
|
835
|
+
import { NumberOrString, NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
|
|
836
|
+
import { ConstrBind } from './constructorTypes';
|
|
1085
837
|
export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
1086
|
-
|
|
1087
|
-
export type ListDataBasic = {
|
|
1088
|
-
label?: NumberOrString;
|
|
1089
|
-
value?: any;
|
|
1090
|
-
search?: string;
|
|
1091
|
-
};
|
|
1092
|
-
/** Extended list item */
|
|
838
|
+
export type ListDataBasic = { label?: NumberOrString; value?: any; search?: string; };
|
|
1093
839
|
export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
|
|
1094
840
|
parent?: string;
|
|
1095
841
|
type: ListType;
|
|
1096
842
|
index: string;
|
|
1097
843
|
disabled?: boolean;
|
|
1098
844
|
}>;
|
|
1099
|
-
/** Array of data items */
|
|
1100
845
|
export type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
|
|
1101
|
-
/** Data list record structure */
|
|
1102
846
|
export type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
|
|
1103
|
-
/**
|
|
1104
|
-
* List item with reactive state.
|
|
1105
|
-
*/
|
|
1106
847
|
export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
|
|
1107
848
|
focus: boolean;
|
|
1108
849
|
highlight?: string;
|
|
1109
850
|
selected: boolean;
|
|
1110
851
|
disabled?: boolean;
|
|
1111
852
|
};
|
|
1112
|
-
/** State-aware list items array */
|
|
1113
853
|
export type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
|
|
1114
|
-
/** Entry for list creation */
|
|
1115
854
|
export type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
|
|
1116
|
-
/**
|
|
1117
|
-
* List input formats.
|
|
1118
|
-
*/
|
|
1119
855
|
export type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
|
|
1120
|
-
/** Single selection identifier */
|
|
1121
856
|
export type ListSelectedItem = NumberOrStringOrBoolean;
|
|
1122
|
-
/** Multiple selection items */
|
|
1123
857
|
export type ListSelectedList = ListSelectedItem | ListSelectedItem[];
|
|
1124
|
-
/** Selected label */
|
|
1125
858
|
export type ListName = string | number | undefined;
|
|
1126
|
-
/** Selected names list */
|
|
1127
859
|
export type ListNames = ListName[];
|
|
860
|
+
|
|
1128
861
|
// File: src/types/refTypes.d.ts
|
|
1129
|
-
|
|
862
|
+
import { ComputedRef, Ref, VNode, VNodeArrayChildren } from 'vue';
|
|
1130
863
|
export type RefType<T> = ComputedRef<T> | Ref<T>;
|
|
1131
|
-
/** Optional reactive ref or computed */
|
|
1132
864
|
export type RefUndefined<T> = RefType<T | undefined>;
|
|
1133
|
-
/** Reactive ref or raw value */
|
|
1134
865
|
export type RefOrNormal<T> = RefType<T> | T;
|
|
1135
|
-
|
|
866
|
+
export type RefOrNormalOrFunction<T> = RefOrNormal<T> | (() => RefOrNormal<T>);
|
|
1136
867
|
export type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any);
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
*/
|
|
1140
|
-
export type RawSlots = {
|
|
1141
|
-
[name: string]: unknown;
|
|
1142
|
-
$stable?: boolean;
|
|
1143
|
-
};
|
|
868
|
+
export type RawSlots = { [name: string]: unknown; $stable?: boolean; };
|
|
869
|
+
|
|
1144
870
|
// File: src/types/searchTypes.d.ts
|
|
1145
|
-
|
|
871
|
+
import { RefOrNormal } from './refTypes';
|
|
872
|
+
import { SearchItem, SearchListValue } from '@dxtmisha/functional-basic';
|
|
1146
873
|
export type SearchListValueRef<T extends SearchItem> = RefOrNormal<SearchListValue<T>>;
|
|
1147
|
-
/** Search list input formats */
|
|
1148
874
|
export type SearchListInput<T extends SearchItem> = SearchListValueRef<T> | (() => SearchListValueRef<T>);
|
package/dist/library.js
CHANGED
|
@@ -371,6 +371,9 @@ var Oe = class {
|
|
|
371
371
|
static set(e) {
|
|
372
372
|
u.set(e, !0), this.get().value = u.getItem();
|
|
373
373
|
}
|
|
374
|
+
static setValueDefault(e) {
|
|
375
|
+
u.setValueDefault(e), this.get().value = u.getItem();
|
|
376
|
+
}
|
|
374
377
|
};
|
|
375
378
|
J = Y, H(Y, "country", I(() => J.get().value.country)), H(Y, "language", I(() => J.get().value.language)), H(Y, "standard", I(() => J.get().value.standard)), H(Y, "firstDay", I(() => J.get().value.firstDay));
|
|
376
379
|
//#endregion
|
|
@@ -1306,7 +1309,7 @@ function Dt(e, t) {
|
|
|
1306
1309
|
//#endregion
|
|
1307
1310
|
//#region src/functions/dxtFunctionalPlugin.ts
|
|
1308
1311
|
var Ot = { install(t, n = {}) {
|
|
1309
|
-
if (n.api && e.setConfig(n.api), n.translate && b.setConfig(n.translate), n.icons && m.setConfig(n.icons), n.metaSuffix && _t().setSuffix(n.metaSuffix), n.router) X.set(n.router);
|
|
1312
|
+
if (n.api && e.setConfig(n.api), n.translate && b.setConfig(n.translate), n.location && Y.setValueDefault(n.location), n.icons && m.setConfig(n.icons), n.metaSuffix && _t().setSuffix(n.metaSuffix), n.router) X.set(n.router);
|
|
1310
1313
|
else {
|
|
1311
1314
|
let e = t.config.globalProperties.$router;
|
|
1312
1315
|
e && X.set(e);
|
|
@@ -55,4 +55,11 @@ export declare class GeoRef {
|
|
|
55
55
|
* код страны, полный вид язык-страна или один из них
|
|
56
56
|
*/
|
|
57
57
|
static set(code: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Sets the default value for the country code.
|
|
60
|
+
*
|
|
61
|
+
* Устанавливает значение по умолчанию для кода страны.
|
|
62
|
+
* @param code default code value / значение кода по умолчанию
|
|
63
|
+
*/
|
|
64
|
+
static setValueDefault(code?: string): void;
|
|
58
65
|
}
|
|
@@ -16,6 +16,11 @@ export interface FunctionalPluginOptions {
|
|
|
16
16
|
* Конфигурация для сервиса переводов
|
|
17
17
|
*/
|
|
18
18
|
translate?: TranslateConfig;
|
|
19
|
+
/**
|
|
20
|
+
* Default geographical location or language code /
|
|
21
|
+
* Код географического местоположения или языка по умолчанию
|
|
22
|
+
*/
|
|
23
|
+
location?: string;
|
|
19
24
|
/**
|
|
20
25
|
* Suffix to be appended to all page titles /
|
|
21
26
|
* Суффикс, который будет добавляться ко всем заголовкам страниц
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A comprehensive library of utilities, base classes, and Vue 3 composables for reactive web development. Extends @dxtmisha/functional-basic with Composition API.",
|
|
7
7
|
"keywords": [
|