@dxtmisha/functional 1.14.4 → 1.15.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 +8 -1
- package/ai-description.md +22 -15
- package/ai-types.md +104 -36
- package/dist/library.js +242 -182
- package/dist/src/classes/ref/GeoUnitRef.d.ts +153 -0
- package/dist/src/composables/ref/useGeoUnitRef.d.ts +7 -0
- package/dist/src/library.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [1.
|
|
5
|
+
## [1.15.0] - 2026-07-02
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **GeoUnitRef**: Introduced a new reactive class wrapper `GeoUnitRef` that wraps the isomorphic `GeoUnit` class to support Vue 3 `Ref` values as input parameters, returning `ComputedRef<string>` values for all unit formatting methods.
|
|
9
|
+
- **useGeoUnitRef**: Added a new composable function `useGeoUnitRef()` to return a `GeoUnitRef` instance.
|
|
10
|
+
- **Tests**: Created comprehensive unit tests in `GeoUnitRef.test.ts` and `useGeoUnitRef.test.ts` to verify Vue reactivity integration.
|
|
11
|
+
|
|
12
|
+
## [1.14.5] - 2026-06-29
|
|
6
13
|
|
|
7
14
|
### Changed
|
|
8
15
|
- **GeoFlagRef**: Refactored constructor to default to `GeoRef.getLocation().value` dynamically and reactively, avoiding hard dependencies on the static `Geo.getLocation()` during SSR.
|
package/ai-description.md
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
Core Purpose
|
|
1
|
+
### Core Purpose
|
|
2
|
+
A high-level utility library designed for Vue 3 providing architectural abstractions for component design, reactive state management, sophisticated API orchestration with SSR support, and localized geographic/unit formatting.
|
|
2
3
|
|
|
3
|
-
Key Expositions
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
### Key Expositions
|
|
5
|
+
* **Design Architecture:** `DesignConstructorAbstract`, `DesignComponents`, and `DesignAbstract` provide a structured class-based inheritance model for building complex, reactive functional components with automatic lifecycle handling, style/class management, and slotted rendering.
|
|
6
|
+
* **API Orchestration:**
|
|
7
|
+
* `useApiRef`: Centralized reactive API request handler with built-in SSR, caching, transformation, validation (supporting `@effect/schema`), and error handling.
|
|
8
|
+
* `useApiManagementRef` / `useApiManagementAsyncRef`: High-level orchestration for CRUD operations (GET/POST/PUT/DELETE) with client-side searching, list formatting, and atomic mutation state management.
|
|
9
|
+
* Standard wrappers: `useApiGet`, `useApiPost`, `useApiPut`, `useApiDelete` for cleaner endpoint interaction.
|
|
10
|
+
* **Reactive Utilities:**
|
|
11
|
+
* `executeUse`: A factory for creating managed singletons (`global`, `provide`, `local`) to ensure unified state across component trees.
|
|
12
|
+
* `useTranslateRef`, `useStorageRef`, `useCookieRef`, `useSessionRef`: Reactive bridges to local persistence and internationalization.
|
|
13
|
+
* `computedAsync`, `computedEternity`: Advanced reactive primitives for asynchronous data flow and on-demand caching.
|
|
14
|
+
* **Data Formatting:** `GeoIntlRef`, `GeoUnitRef`, and `useFormattersRef` provide reactive, localized formatting for numbers, currencies, units (metric/imperial conversion), and dates.
|
|
15
|
+
* **List & Search Logic:** `ListDataRef` and `useSearchRef` manage complex hierarchical or flat data structures with optimized search and filtering capabilities.
|
|
9
16
|
|
|
10
|
-
Triggers for Studying ai-types.md
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
### Triggers for Studying ai-types.md
|
|
18
|
+
Mandatory to review `ai-types.md` when:
|
|
19
|
+
1. **System Integration:** You are implementing new API endpoints, configuring `dxtFunctionalPlugin`, or setting up global state providers (`executeUseProvide`).
|
|
20
|
+
2. **Schema Validation:** You are utilizing `validateResponseContract` or `validateRequestContract` and require the expected structure for `ApiDataValidation` or error storage interfaces.
|
|
21
|
+
3. **Component Construction:** You are extending `DesignConstructorAbstract` or implementing custom component modifications.
|
|
22
|
+
4. **Type Mapping:** You encounter complex generic constraints in the `useApiManagementRef` signature or `Constr` prefixed utility types (e.g., `ConstrBind`, `ConstrOptions`, `ConstrEmit`).
|
|
14
23
|
|
|
15
|
-
Integration Context
|
|
16
|
-
|
|
17
|
-
- Dependencies: Extends `vue`, `vue-router`, and relies heavily on `@dxtmisha/functional-basic` for underlying logic.
|
|
18
|
-
- Infrastructure: Designed to be initialized via `dxtFunctionalPlugin` for global services (API, Translate, Meta, Router). Requires environment-aware implementation for SSR/hydration sequences.
|
|
24
|
+
### Integration Context
|
|
25
|
+
The library acts as a foundational service layer in the system stack. It integrates directly with Vue 3's composition API, Vue Router for navigation, and `@dxtmisha/functional-basic` for core network and utility logic. It is intended to be used as a singleton-pattern service provider within an application's plugin system via `dxtFunctionalPlugin` to facilitate consistent SSR state hydration and global dependency injection.
|
package/ai-types.md
CHANGED
|
@@ -19,7 +19,6 @@ export declare abstract class DesignAbstract<T extends Record<string, any>, C ex
|
|
|
19
19
|
constructor(props: T, callback?: ((event: C) => void) | undefined, changed?: string[]);
|
|
20
20
|
make(compelled?: boolean): this;
|
|
21
21
|
makeCallback(compelled?: boolean): void;
|
|
22
|
-
protected abstract initEvent(): void;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
// File: src/classes/design/DesignAsyncAbstract.d.ts
|
|
@@ -27,7 +26,6 @@ import { DesignAbstract } from './DesignAbstract';
|
|
|
27
26
|
export declare abstract class DesignAsyncAbstract<T extends Record<string, any>, C extends Record<string, any>> extends DesignAbstract<T, C> {
|
|
28
27
|
make(compelled?: boolean): this;
|
|
29
28
|
makeCallback(compelled?: boolean): Promise<void>;
|
|
30
|
-
protected abstract initEvent(): Promise<void>;
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
// File: src/classes/design/DesignChanged.d.ts
|
|
@@ -49,7 +47,6 @@ import { ComputedRef, VNode } from 'vue';
|
|
|
49
47
|
import { RawChildren, RawSlots } from '../../types/refTypes';
|
|
50
48
|
import { ConstrComponent, ConstrComponentMod, ConstrItem } from '../../types/constructorTypes';
|
|
51
49
|
export declare class DesignComponents<COMP extends ConstrComponent, P extends ConstrItem> {
|
|
52
|
-
protected caching: Record<string, ComputedRef<any>>;
|
|
53
50
|
constructor(components?: COMP, modification?: ConstrComponentMod<P> | undefined);
|
|
54
51
|
is<K extends keyof COMP>(name: K): name is K;
|
|
55
52
|
get<K extends keyof COMP>(name: K): COMP[K];
|
|
@@ -62,20 +59,8 @@ export declare class DesignComponents<COMP extends ConstrComponent, P extends Co
|
|
|
62
59
|
// File: src/classes/design/DesignConstructorAbstract.d.ts
|
|
63
60
|
import { ComputedRef, ToRefs, VNode, Ref } from 'vue';
|
|
64
61
|
import { DesignComponents } from './DesignComponents';
|
|
65
|
-
import { ConstrClass, ConstrClassObject, ConstrComponent, ConstrEmit, ConstrExpose, ConstrItem, ConstrOptions, ConstrStyles } from '../../types/constructorTypes';
|
|
62
|
+
import { ConstrClass, ConstrClasses, ConstrClassObject, ConstrComponent, ConstrEmit, ConstrExpose, ConstrItem, ConstrOptions, ConstrStyles } from '../../types/constructorTypes';
|
|
66
63
|
export declare abstract class DesignConstructorAbstract<E extends Element, COMP extends ConstrComponent, EMITS extends ConstrItem, EXPOSE extends ConstrItem, SLOTS extends ConstrItem, CLASSES extends ConstrClasses, P extends ConstrItem> {
|
|
67
|
-
protected readonly props: Readonly<P>;
|
|
68
|
-
protected readonly options?: ConstrOptions<COMP, EMITS, P> | undefined;
|
|
69
|
-
protected readonly name: string[];
|
|
70
|
-
protected readonly element: Ref<E | undefined, E | undefined>;
|
|
71
|
-
protected readonly refs: ToRefs<P>;
|
|
72
|
-
protected readonly components: DesignComponents<COMP, P>;
|
|
73
|
-
protected readonly emits?: ConstrEmit<EMITS>;
|
|
74
|
-
protected readonly classes?: ComputedRef<CLASSES>;
|
|
75
|
-
protected readonly styles?: ComputedRef<ConstrStyles>;
|
|
76
|
-
protected attrs?: ConstrItem;
|
|
77
|
-
protected slots?: SLOTS;
|
|
78
|
-
protected dataExpose?: EXPOSE;
|
|
79
64
|
protected constructor(name: string, props: Readonly<P>, options?: ConstrOptions<COMP, EMITS, P> | undefined);
|
|
80
65
|
protected init(): this;
|
|
81
66
|
getName(): string;
|
|
@@ -86,10 +71,6 @@ export declare abstract class DesignConstructorAbstract<E extends Element, COMP
|
|
|
86
71
|
getAttrs(): ConstrItem;
|
|
87
72
|
expose(): ConstrExpose<E, EXPOSE>;
|
|
88
73
|
render(): () => VNode | (VNode | any)[] | undefined;
|
|
89
|
-
protected abstract initExpose(): EXPOSE;
|
|
90
|
-
protected abstract initClasses(): Partial<CLASSES>;
|
|
91
|
-
protected abstract initStyles(): ConstrStyles;
|
|
92
|
-
protected abstract initRender(): VNode | (VNode | any)[] | undefined;
|
|
93
74
|
protected initSlot<K extends keyof SLOTS>(name: K, children?: any[], props?: ConstrItem): VNode | undefined;
|
|
94
75
|
protected toClass(classes?: ConstrClass): ConstrClassObject;
|
|
95
76
|
protected toClassName<T extends ConstrItem>(classes?: ConstrItem): T;
|
|
@@ -131,7 +112,7 @@ export declare class EventRef<E extends ElementOrWindow, O extends Event, D exte
|
|
|
131
112
|
|
|
132
113
|
// File: src/classes/ref/GeoFlagRef.d.ts
|
|
133
114
|
import { ComputedRef } from 'vue';
|
|
134
|
-
import { GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
|
|
115
|
+
import { GeoFlag, GeoFlagItem, GeoFlagNational } from '@dxtmisha/functional-basic';
|
|
135
116
|
import { RefOrNormal } from '../../types/refTypes';
|
|
136
117
|
export declare class GeoFlagRef {
|
|
137
118
|
constructor(code?: RefOrNormal<string | undefined>);
|
|
@@ -191,9 +172,31 @@ export declare class GeoRef {
|
|
|
191
172
|
static setValueDefault(code?: string | (() => string)): void;
|
|
192
173
|
}
|
|
193
174
|
|
|
175
|
+
// File: src/classes/ref/GeoUnitRef.d.ts
|
|
176
|
+
import { ComputedRef, Ref } from 'vue';
|
|
177
|
+
import { GeoUnit, NumberOrString } from '@dxtmisha/functional-basic';
|
|
178
|
+
import { RefOrNormal } from '../../types/refTypes';
|
|
179
|
+
export declare class GeoUnitRef {
|
|
180
|
+
constructor(code?: RefOrNormal<string>);
|
|
181
|
+
getLocation(): ComputedRef<string>;
|
|
182
|
+
millimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
183
|
+
centimeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
184
|
+
meter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
185
|
+
kilometer(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
186
|
+
squareMeter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
187
|
+
hectare(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
188
|
+
gram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
189
|
+
kilogram(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
190
|
+
tonne(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
191
|
+
milliliter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
192
|
+
liter(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
193
|
+
celsius(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
194
|
+
kilometerPerHour(value: RefOrNormal<NumberOrString>, options?: Intl.NumberFormatOptions): ComputedRef<string>;
|
|
195
|
+
}
|
|
196
|
+
|
|
194
197
|
// File: src/classes/ref/ListDataRef.d.ts
|
|
195
198
|
import { RefOrNormal, RefType } from '../../types/refTypes';
|
|
196
|
-
import { ListDataFull, ListDataItem, ListList, ListNames, ListSelectedItem, ListSelectedList } from '../../types/listTypes';
|
|
199
|
+
import { ListDataFull, ListDataItem, ListList, ListListInput, ListNames, ListSelectedItem, ListSelectedList } from '../../types/listTypes';
|
|
197
200
|
import { ComputedRef } from 'vue';
|
|
198
201
|
export declare class ListDataRef {
|
|
199
202
|
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);
|
|
@@ -272,7 +275,8 @@ export declare function useApiAsyncRef<R, T = R>(path?: RefOrNormal<string | und
|
|
|
272
275
|
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
273
276
|
import { UseApiRequestSetup } from './useApiRequest';
|
|
274
277
|
import { Ref } from 'vue';
|
|
275
|
-
export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
278
|
+
export interface UseApiDeleteSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
279
|
+
}
|
|
276
280
|
export declare function useApiDelete<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiDeleteSetup<T, Request, Return>): {
|
|
277
281
|
loading: Ref<boolean, boolean>;
|
|
278
282
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
@@ -282,7 +286,8 @@ export declare function useApiDelete<T, Request extends ApiFetch['request'] = Ap
|
|
|
282
286
|
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
283
287
|
import { UseApiRequestSetup } from './useApiRequest';
|
|
284
288
|
import { Ref } from 'vue';
|
|
285
|
-
export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
289
|
+
export interface UseApiGetSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
290
|
+
}
|
|
286
291
|
export declare function useApiGet<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiGetSetup<T, Request, Return>): {
|
|
287
292
|
loading: Ref<boolean, boolean>;
|
|
288
293
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
@@ -354,7 +359,8 @@ export declare function useApiManagementRef<Return extends ApiManagementValue, F
|
|
|
354
359
|
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
355
360
|
import { UseApiRequestSetup } from './useApiRequest';
|
|
356
361
|
import { Ref } from 'vue';
|
|
357
|
-
export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
362
|
+
export interface UseApiPostSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
363
|
+
}
|
|
358
364
|
export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPostSetup<T, Request, Return>): {
|
|
359
365
|
loading: Ref<boolean, boolean>;
|
|
360
366
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
@@ -364,7 +370,8 @@ export declare function useApiPost<T, Request extends ApiFetch['request'] = ApiF
|
|
|
364
370
|
import { ApiData, ApiFetch } from '@dxtmisha/functional-basic';
|
|
365
371
|
import { UseApiRequestSetup } from './useApiRequest';
|
|
366
372
|
import { Ref } from 'vue';
|
|
367
|
-
export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
373
|
+
export interface UseApiPutSetup<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>> extends Omit<UseApiRequestSetup<T, Request, Return>, 'method'> {
|
|
374
|
+
}
|
|
368
375
|
export declare function useApiPut<T, Request extends ApiFetch['request'] = ApiFetch['request'], Return extends ApiData<T> = ApiData<T>>(setup: UseApiPutSetup<T, Request, Return>): {
|
|
369
376
|
loading: Ref<boolean, boolean>;
|
|
370
377
|
send(request?: Request | undefined): Promise<Return | undefined>;
|
|
@@ -422,7 +429,8 @@ export declare function useApiRequest<T, Request extends ApiFetch['request'] = A
|
|
|
422
429
|
|
|
423
430
|
// File: src/composables/ref/useBroadcastValueRef.d.ts
|
|
424
431
|
import { Ref } from 'vue';
|
|
425
|
-
|
|
432
|
+
type BroadcastValueItem<T> = T | string | undefined;
|
|
433
|
+
export declare function useBroadcastValueRef<T>(name: string, defaultValue?: T | string | (() => (T | string))): Ref<BroadcastValueItem<T>>;
|
|
426
434
|
|
|
427
435
|
// File: src/composables/ref/useCookieRef.d.ts
|
|
428
436
|
import { Ref } from 'vue';
|
|
@@ -442,12 +450,17 @@ export declare function useFormattersRef<Options extends FormattersOptionsList =
|
|
|
442
450
|
import { GeoIntlRef } from '../../classes/ref/GeoIntlRef';
|
|
443
451
|
export declare function useGeoIntlRef(): GeoIntlRef;
|
|
444
452
|
|
|
453
|
+
// File: src/composables/ref/useGeoUnitRef.d.ts
|
|
454
|
+
import { GeoUnitRef } from '../../classes/ref/GeoUnitRef';
|
|
455
|
+
export declare function useGeoUnitRef(): GeoUnitRef;
|
|
456
|
+
|
|
445
457
|
// File: src/composables/ref/useHashRef.d.ts
|
|
446
458
|
import { ShallowRef } from 'vue';
|
|
447
459
|
export declare function useHashRef<T>(name: string, defaultValue?: T | (() => T)): ShallowRef<T>;
|
|
448
460
|
|
|
449
461
|
// File: src/composables/ref/useLazyItemByMarginRef.d.ts
|
|
450
462
|
import { RefType } from '../../types/refTypes';
|
|
463
|
+
export type LazyItemByMargin = { rootMargin: string; item: any; };
|
|
451
464
|
export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | undefined>, rootMargin: string) => {
|
|
452
465
|
lazyItemStatus: any;
|
|
453
466
|
readonly lazyItem: any;
|
|
@@ -455,9 +468,16 @@ export declare const useLazyItemByMarginRef: (element: RefType<HTMLElement | und
|
|
|
455
468
|
|
|
456
469
|
// File: src/composables/ref/useLazyRef.d.ts
|
|
457
470
|
import { Ref, ShallowRef } from 'vue';
|
|
471
|
+
export type LazyItem = {
|
|
472
|
+
status: ShallowRef<boolean>;
|
|
473
|
+
ratio: ShallowRef<number>;
|
|
474
|
+
entry: ShallowRef<IntersectionObserverEntry | undefined>;
|
|
475
|
+
stopWatch: () => void;
|
|
476
|
+
};
|
|
477
|
+
export type LazyList = Record<string, LazyItem>;
|
|
458
478
|
export declare const useLazyRef: (options?: IntersectionObserverInit) => {
|
|
459
479
|
intersectionObserver: IntersectionObserver | undefined;
|
|
460
|
-
getItem(element: HTMLElement):
|
|
480
|
+
getItem(element: HTMLElement): LazyItem;
|
|
461
481
|
addLazyItem(element: Ref<HTMLElement | undefined>): ShallowRef<boolean, boolean>;
|
|
462
482
|
removeLazyItem: (element?: HTMLElement) => void;
|
|
463
483
|
disconnectLazy: () => void | undefined;
|
|
@@ -493,10 +513,33 @@ export declare const useMeta: () => Readonly<{
|
|
|
493
513
|
setRobots: (value: MetaRobots) => void;
|
|
494
514
|
setSiteName: (value: string) => void;
|
|
495
515
|
setSuffix: (suffix: string) => typeof MetaStatic;
|
|
496
|
-
}
|
|
497
|
-
init():
|
|
516
|
+
} & {
|
|
517
|
+
init(): Readonly<{
|
|
518
|
+
meta: typeof MetaStatic;
|
|
519
|
+
title: Ref<string, string>;
|
|
520
|
+
keyword: Ref<string, string>;
|
|
521
|
+
description: Ref<string, string>;
|
|
522
|
+
author: Ref<string, string>;
|
|
523
|
+
image: Ref<string, string>;
|
|
524
|
+
canonical: Ref<string, string>;
|
|
525
|
+
robots: Ref<MetaRobots, MetaRobots>;
|
|
526
|
+
siteName: Ref<string, string>;
|
|
527
|
+
getHtmlMeta: () => string;
|
|
528
|
+
sync: () => void;
|
|
529
|
+
update: () => void;
|
|
530
|
+
updateSsr: () => void;
|
|
531
|
+
setTitle: (value: string) => void;
|
|
532
|
+
setKeywords: (value: string) => void;
|
|
533
|
+
setDescription: (value: string) => void;
|
|
534
|
+
setAuthor: (value: string) => void;
|
|
535
|
+
setImage: (value: string) => void;
|
|
536
|
+
setCanonical: (value: string) => void;
|
|
537
|
+
setRobots: (value: MetaRobots) => void;
|
|
538
|
+
setSiteName: (value: string) => void;
|
|
539
|
+
setSuffix: (suffix: string) => typeof MetaStatic;
|
|
540
|
+
}>;
|
|
498
541
|
destroyExecute?(): void;
|
|
499
|
-
}
|
|
542
|
+
}>;
|
|
500
543
|
|
|
501
544
|
// File: src/composables/ref/useQueryRef.d.ts
|
|
502
545
|
import { ShallowRef } from 'vue';
|
|
@@ -685,6 +728,7 @@ export * from './classes/ref/EventRef';
|
|
|
685
728
|
export * from './classes/ref/GeoFlagRef';
|
|
686
729
|
export * from './classes/ref/GeoIntlRef';
|
|
687
730
|
export * from './classes/ref/GeoRef';
|
|
731
|
+
export * from './classes/ref/GeoUnitRef';
|
|
688
732
|
export * from './classes/ref/ListDataRef';
|
|
689
733
|
export * from './classes/ref/RouterItemRef';
|
|
690
734
|
export * from './classes/ref/ScrollbarWidthRef';
|
|
@@ -701,6 +745,7 @@ export * from './composables/ref/useBroadcastValueRef';
|
|
|
701
745
|
export * from './composables/ref/useCookieRef';
|
|
702
746
|
export * from './composables/ref/useFormattersRef';
|
|
703
747
|
export * from './composables/ref/useGeoIntlRef';
|
|
748
|
+
export * from './composables/ref/useGeoUnitRef';
|
|
704
749
|
export * from './composables/ref/useHashRef';
|
|
705
750
|
export * from './composables/ref/useLazyItemByMarginRef';
|
|
706
751
|
export * from './composables/ref/useLazyRef';
|
|
@@ -805,8 +850,17 @@ export type ConstrSetup<E extends Element, CLASSES extends ConstrClasses, SETUP
|
|
|
805
850
|
styles: RefType<ConstrStyles>;
|
|
806
851
|
} & SETUP;
|
|
807
852
|
export type ConstrRegistration = { flag?: boolean; translate?: Record<string, string>; };
|
|
808
|
-
export type ConstrBind<T> = T & Record<string, any> & {
|
|
809
|
-
|
|
853
|
+
export type ConstrBind<T> = T & Record<string, any> & {
|
|
854
|
+
key?: string;
|
|
855
|
+
class?: ConstrClass;
|
|
856
|
+
style?: ConstrStyles;
|
|
857
|
+
};
|
|
858
|
+
export type ConstrPropItemOptions<T = any> = {
|
|
859
|
+
type?: PropType<T>;
|
|
860
|
+
required?: boolean;
|
|
861
|
+
default?: any;
|
|
862
|
+
validator?(value: any, props: any): boolean;
|
|
863
|
+
};
|
|
810
864
|
export type ConstrPropItem<T = any> = ConstrPropItemOptions<T> | PropType<T>;
|
|
811
865
|
export type ConstrProps<P = Record<string, any>> = { [K in keyof P]: ConstrPropItem<P[K]>; };
|
|
812
866
|
export type ConstrHrefProps = { href?: string; };
|
|
@@ -815,11 +869,25 @@ export type ConstrHrefProps = { href?: string; };
|
|
|
815
869
|
import { NumberOrString, NumberOrStringOrBoolean } from '@dxtmisha/functional-basic';
|
|
816
870
|
import { ConstrBind } from './constructorTypes';
|
|
817
871
|
export type ListType = 'item' | 'space' | 'line' | 'subtitle' | 'html' | 'menu' | 'menu-group' | 'group';
|
|
818
|
-
export type ListDataBasic = {
|
|
819
|
-
|
|
872
|
+
export type ListDataBasic = {
|
|
873
|
+
label?: NumberOrString;
|
|
874
|
+
value?: any;
|
|
875
|
+
search?: string;
|
|
876
|
+
};
|
|
877
|
+
export type ListDataItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item & {
|
|
878
|
+
parent?: string;
|
|
879
|
+
type: ListType;
|
|
880
|
+
index: string;
|
|
881
|
+
disabled?: boolean;
|
|
882
|
+
}>;
|
|
820
883
|
export type ListList<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item>[];
|
|
821
884
|
export type ListRecord<Item extends ListDataBasic = ListDataBasic> = ListList<Item> | Record<string, any>;
|
|
822
|
-
export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
|
|
885
|
+
export type ListDataFullItem<Item extends ListDataBasic = ListDataBasic> = ListDataItem<Item> & {
|
|
886
|
+
focus: boolean;
|
|
887
|
+
highlight?: string;
|
|
888
|
+
selected: boolean;
|
|
889
|
+
disabled?: boolean;
|
|
890
|
+
};
|
|
823
891
|
export type ListDataFull<Item extends ListDataBasic = ListDataBasic> = ListDataFullItem<Item>[];
|
|
824
892
|
export type ListListInputItem<Item extends ListDataBasic = ListDataBasic> = ConstrBind<Item>;
|
|
825
893
|
export type ListListInput<Item extends ListDataBasic = ListDataBasic> = ListListInputItem<Item>[] | string[] | Record<string, ListListInputItem<Item>> | Record<string, string>;
|