@aerogel/core 0.0.0-next.c3236837f7f8fc319a4a56022accb32757b3db89 → 0.0.0-next.c38a10cd5e81c5f04469ef79e59a53e6bfd3df55
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/dist/aerogel-core.d.ts +87 -78
- package/dist/aerogel-core.js +392 -349
- package/dist/aerogel-core.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/Input.vue +2 -2
- package/src/components/ui/TextArea.vue +2 -2
- package/src/forms/FormController.test.ts +3 -0
- package/src/forms/FormController.ts +21 -16
- package/src/forms/utils.ts +25 -0
- package/src/forms/validation.ts +31 -0
- package/src/index.css +1 -0
package/dist/aerogel-core.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ import { VNodeProps } from 'vue';
|
|
|
64
64
|
import { WatchOptions } from 'vue';
|
|
65
65
|
import { WatchStopHandle } from 'vue';
|
|
66
66
|
|
|
67
|
-
export declare const
|
|
67
|
+
export declare const __valueType: unique symbol;
|
|
68
68
|
|
|
69
69
|
declare const __VLS_component: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
70
70
|
|
|
@@ -85,9 +85,9 @@ declare const __VLS_component_16: DefineComponent< {}, {}, {}, {}, {}, Compon
|
|
|
85
85
|
declare const __VLS_component_17: DefineComponent<ButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
86
86
|
|
|
87
87
|
declare const __VLS_component_18: DefineComponent<__VLS_Props_6, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
88
|
-
"update:modelValue": (value:
|
|
88
|
+
"update:modelValue": (value: unknown) => any;
|
|
89
89
|
}, string, PublicProps, Readonly<__VLS_Props_6> & Readonly<{
|
|
90
|
-
"onUpdate:modelValue"?: ((value:
|
|
90
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
91
91
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
92
92
|
$inputRef: ({
|
|
93
93
|
$: ComponentInternalInstance;
|
|
@@ -96,9 +96,9 @@ $props: {
|
|
|
96
96
|
readonly name?: string | undefined;
|
|
97
97
|
readonly label?: string | undefined;
|
|
98
98
|
readonly description?: string | undefined;
|
|
99
|
-
readonly modelValue?:
|
|
99
|
+
readonly modelValue?: unknown;
|
|
100
100
|
readonly as?: string | undefined;
|
|
101
|
-
readonly "onUpdate:modelValue"?: ((value:
|
|
101
|
+
readonly "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
102
102
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
103
103
|
$attrs: {
|
|
104
104
|
[x: string]: unknown;
|
|
@@ -112,23 +112,23 @@ $slots: Readonly<{
|
|
|
112
112
|
$root: ComponentPublicInstance | null;
|
|
113
113
|
$parent: ComponentPublicInstance | null;
|
|
114
114
|
$host: Element | null;
|
|
115
|
-
$emit: (event: "update:modelValue", value:
|
|
115
|
+
$emit: (event: "update:modelValue", value: unknown) => void;
|
|
116
116
|
$el: any;
|
|
117
|
-
$options: ComponentOptionsBase<Readonly<InputProps<
|
|
117
|
+
$options: ComponentOptionsBase<Readonly<InputProps<unknown> & {
|
|
118
118
|
as?: string;
|
|
119
119
|
}> & Readonly<{
|
|
120
|
-
"onUpdate:modelValue"?: ((value:
|
|
120
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
121
121
|
}>, {
|
|
122
122
|
id: string;
|
|
123
123
|
name: ComputedRef<string | undefined>;
|
|
124
124
|
label: ComputedRef<string | undefined>;
|
|
125
125
|
description: ComputedRef<string | undefined>;
|
|
126
|
-
value: ComputedRef<
|
|
126
|
+
value: ComputedRef<unknown>;
|
|
127
127
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
128
128
|
required: ComputedRef<boolean | undefined>;
|
|
129
|
-
update(value:
|
|
129
|
+
update(value: unknown): void;
|
|
130
130
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
131
|
-
"update:modelValue": (value:
|
|
131
|
+
"update:modelValue": (value: unknown) => any;
|
|
132
132
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
133
133
|
beforeCreate?: (() => void) | (() => void)[];
|
|
134
134
|
created?: (() => void) | (() => void)[];
|
|
@@ -149,19 +149,19 @@ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info:
|
|
|
149
149
|
$forceUpdate: () => void;
|
|
150
150
|
$nextTick: typeof nextTick;
|
|
151
151
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
152
|
-
} & Readonly<{}> & Omit<Readonly<InputProps<
|
|
152
|
+
} & Readonly<{}> & Omit<Readonly<InputProps<unknown> & {
|
|
153
153
|
as?: string;
|
|
154
154
|
}> & Readonly<{
|
|
155
|
-
"onUpdate:modelValue"?: ((value:
|
|
155
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
156
156
|
}>, "id" | "value" | "name" | "description" | "errors" | "label" | "required" | "update"> & ShallowUnwrapRef< {
|
|
157
157
|
id: string;
|
|
158
158
|
name: ComputedRef<string | undefined>;
|
|
159
159
|
label: ComputedRef<string | undefined>;
|
|
160
160
|
description: ComputedRef<string | undefined>;
|
|
161
|
-
value: ComputedRef<
|
|
161
|
+
value: ComputedRef<unknown>;
|
|
162
162
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
163
163
|
required: ComputedRef<boolean | undefined>;
|
|
164
|
-
update(value:
|
|
164
|
+
update(value: unknown): void;
|
|
165
165
|
}> & {} & ComponentCustomProperties & {} & {
|
|
166
166
|
$slots: {
|
|
167
167
|
default?(_: {}): any;
|
|
@@ -218,14 +218,14 @@ id: string;
|
|
|
218
218
|
name: ComputedRef<string | undefined>;
|
|
219
219
|
label: ComputedRef<string | undefined>;
|
|
220
220
|
description: ComputedRef<string | undefined>;
|
|
221
|
-
value: ComputedRef<
|
|
221
|
+
value: ComputedRef<unknown>;
|
|
222
222
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
223
223
|
required: ComputedRef<boolean | undefined>;
|
|
224
|
-
update(value:
|
|
224
|
+
update(value: unknown): void;
|
|
225
225
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
226
|
-
"update:modelValue": (value:
|
|
226
|
+
"update:modelValue": (value: unknown) => any;
|
|
227
227
|
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
228
|
-
"onUpdate:modelValue"?: ((value:
|
|
228
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
229
229
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
230
230
|
|
|
231
231
|
declare const __VLS_component_30: DefineComponent<__VLS_Props_22, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_22> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -592,9 +592,9 @@ declare function __VLS_template_18(): {
|
|
|
592
592
|
readonly name?: string | undefined;
|
|
593
593
|
readonly label?: string | undefined;
|
|
594
594
|
readonly description?: string | undefined;
|
|
595
|
-
readonly modelValue?:
|
|
595
|
+
readonly modelValue?: unknown;
|
|
596
596
|
readonly as?: string | undefined;
|
|
597
|
-
readonly "onUpdate:modelValue"?: ((value:
|
|
597
|
+
readonly "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
598
598
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
599
599
|
$attrs: {
|
|
600
600
|
[x: string]: unknown;
|
|
@@ -608,23 +608,23 @@ declare function __VLS_template_18(): {
|
|
|
608
608
|
$root: ComponentPublicInstance | null;
|
|
609
609
|
$parent: ComponentPublicInstance | null;
|
|
610
610
|
$host: Element | null;
|
|
611
|
-
$emit: (event: "update:modelValue", value:
|
|
611
|
+
$emit: (event: "update:modelValue", value: unknown) => void;
|
|
612
612
|
$el: any;
|
|
613
|
-
$options: ComponentOptionsBase<Readonly<InputProps<
|
|
613
|
+
$options: ComponentOptionsBase<Readonly<InputProps<unknown> & {
|
|
614
614
|
as?: string;
|
|
615
615
|
}> & Readonly<{
|
|
616
|
-
"onUpdate:modelValue"?: ((value:
|
|
616
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
617
617
|
}>, {
|
|
618
618
|
id: string;
|
|
619
619
|
name: ComputedRef<string | undefined>;
|
|
620
620
|
label: ComputedRef<string | undefined>;
|
|
621
621
|
description: ComputedRef<string | undefined>;
|
|
622
|
-
value: ComputedRef<
|
|
622
|
+
value: ComputedRef<unknown>;
|
|
623
623
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
624
624
|
required: ComputedRef<boolean | undefined>;
|
|
625
|
-
update(value:
|
|
625
|
+
update(value: unknown): void;
|
|
626
626
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
627
|
-
"update:modelValue": (value:
|
|
627
|
+
"update:modelValue": (value: unknown) => any;
|
|
628
628
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
629
629
|
beforeCreate?: (() => void) | (() => void)[];
|
|
630
630
|
created?: (() => void) | (() => void)[];
|
|
@@ -645,19 +645,19 @@ declare function __VLS_template_18(): {
|
|
|
645
645
|
$forceUpdate: () => void;
|
|
646
646
|
$nextTick: typeof nextTick;
|
|
647
647
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
648
|
-
} & Readonly<{}> & Omit<Readonly<InputProps<
|
|
648
|
+
} & Readonly<{}> & Omit<Readonly<InputProps<unknown> & {
|
|
649
649
|
as?: string;
|
|
650
650
|
}> & Readonly<{
|
|
651
|
-
"onUpdate:modelValue"?: ((value:
|
|
651
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
652
652
|
}>, "id" | "value" | "name" | "description" | "errors" | "label" | "required" | "update"> & ShallowUnwrapRef< {
|
|
653
653
|
id: string;
|
|
654
654
|
name: ComputedRef<string | undefined>;
|
|
655
655
|
label: ComputedRef<string | undefined>;
|
|
656
656
|
description: ComputedRef<string | undefined>;
|
|
657
|
-
value: ComputedRef<
|
|
657
|
+
value: ComputedRef<unknown>;
|
|
658
658
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
659
659
|
required: ComputedRef<boolean | undefined>;
|
|
660
|
-
update(value:
|
|
660
|
+
update(value: unknown): void;
|
|
661
661
|
}> & {} & ComponentCustomProperties & {} & {
|
|
662
662
|
$slots: {
|
|
663
663
|
default?(_: {}): any;
|
|
@@ -1518,6 +1518,10 @@ export declare interface ElementSize {
|
|
|
1518
1518
|
height: number;
|
|
1519
1519
|
}
|
|
1520
1520
|
|
|
1521
|
+
export declare function enumInput<const T extends string>(values: T[], defaultValue?: T, options?: {
|
|
1522
|
+
rules?: string;
|
|
1523
|
+
}): FormFieldDefinition<'enum', string, T>;
|
|
1524
|
+
|
|
1521
1525
|
export declare type ErrorHandler = (error: ErrorSource) => boolean;
|
|
1522
1526
|
|
|
1523
1527
|
declare type ErrorHandler_2 = (error: ErrorSource) => string | undefined;
|
|
@@ -1679,7 +1683,7 @@ export declare class FormController<Fields extends FormFieldDefinitions = FormFi
|
|
|
1679
1683
|
}
|
|
1680
1684
|
|
|
1681
1685
|
declare type FormData_2<T> = {
|
|
1682
|
-
-readonly [k in keyof T]: T[k] extends FormFieldDefinition<infer TType, infer TRules, infer
|
|
1686
|
+
-readonly [k in keyof T]: T[k] extends FormFieldDefinition<infer TType, infer TRules, infer TValueType> ? TRules extends 'required' ? GetFormFieldValue<TType, TValueType> : GetFormFieldValue<TType, TValueType> | null : never;
|
|
1683
1687
|
};
|
|
1684
1688
|
export { FormData_2 as FormData }
|
|
1685
1689
|
|
|
@@ -1687,17 +1691,18 @@ export declare type FormErrors<T> = {
|
|
|
1687
1691
|
[k in keyof T]: string[] | null;
|
|
1688
1692
|
};
|
|
1689
1693
|
|
|
1690
|
-
export declare interface FormFieldDefinition<TType extends FormFieldType = FormFieldType, TRules extends string = string,
|
|
1694
|
+
export declare interface FormFieldDefinition<TType extends FormFieldType = FormFieldType, TRules extends string = string, TValueType = unknown> {
|
|
1691
1695
|
type: TType;
|
|
1692
1696
|
trim?: boolean;
|
|
1693
1697
|
default?: GetFormFieldValue<TType>;
|
|
1694
1698
|
rules?: TRules;
|
|
1695
|
-
[
|
|
1699
|
+
values?: TValueType[];
|
|
1700
|
+
[__valueType]?: TValueType;
|
|
1696
1701
|
}
|
|
1697
1702
|
|
|
1698
1703
|
export declare type FormFieldDefinitions = Record<string, FormFieldDefinition>;
|
|
1699
1704
|
|
|
1700
|
-
export declare type FormFieldType = 'string' | 'number' | 'boolean' | 'object' | 'date';
|
|
1705
|
+
export declare type FormFieldType = 'string' | 'enum' | 'number' | 'boolean' | 'object' | 'date';
|
|
1701
1706
|
|
|
1702
1707
|
export declare type FormFieldValidator<T = unknown> = (value: T) => string | string[] | undefined;
|
|
1703
1708
|
|
|
@@ -1707,7 +1712,7 @@ export declare function getCurrentLayout(): Layout;
|
|
|
1707
1712
|
|
|
1708
1713
|
export declare function getErrorMessage(error: ErrorSource): string;
|
|
1709
1714
|
|
|
1710
|
-
export declare type GetFormFieldValue<TType,
|
|
1715
|
+
export declare type GetFormFieldValue<TType, TValueType = unknown> = TType extends 'string' ? string : TType extends 'number' ? number : TType extends 'boolean' ? boolean : TType extends 'enum' ? TValueType : TType extends 'object' ? TValueType extends object ? TValueType : object : TType extends 'date' ? Date : never;
|
|
1711
1716
|
|
|
1712
1717
|
export declare function getMarkdownRouter(): MarkdownRouter | null;
|
|
1713
1718
|
|
|
@@ -1808,7 +1813,7 @@ export declare const HeadlessSelectValue: __VLS_WithTemplateSlots_14<typeof __VL
|
|
|
1808
1813
|
|
|
1809
1814
|
export declare const HeadlessSwitch: <T extends boolean = boolean>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal_3<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
1810
1815
|
props: __VLS_PrettifyLocal_3<Pick<Partial<{}> & Omit<{
|
|
1811
|
-
readonly "onUpdate:modelValue"?: ((value:
|
|
1816
|
+
readonly "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
1812
1817
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, "onUpdate:modelValue"> & (InputProps<T> & {
|
|
1813
1818
|
class?: HTMLAttributes["class"];
|
|
1814
1819
|
labelClass?: HTMLAttributes["class"];
|
|
@@ -1823,11 +1828,11 @@ export declare const HeadlessSwitch: <T extends boolean = boolean>(__VLS_props:
|
|
|
1823
1828
|
value: ComputedRef<boolean | undefined>;
|
|
1824
1829
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
1825
1830
|
required: ComputedRef<boolean | undefined>;
|
|
1826
|
-
update(value:
|
|
1831
|
+
update(value: unknown): void;
|
|
1827
1832
|
}>): void;
|
|
1828
1833
|
attrs: any;
|
|
1829
1834
|
slots: {};
|
|
1830
|
-
emit: (evt: "update:modelValue", value:
|
|
1835
|
+
emit: (evt: "update:modelValue", value: unknown) => void;
|
|
1831
1836
|
}>) => VNode & {
|
|
1832
1837
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
1833
1838
|
};
|
|
@@ -1841,9 +1846,9 @@ export declare function injectReactive<T extends object>(key: InjectionKey<T> |
|
|
|
1841
1846
|
export declare function injectReactiveOrFail<T extends object>(key: InjectionKey<T> | string, errorMessage?: string): UnwrapNestedRefs<T>;
|
|
1842
1847
|
|
|
1843
1848
|
export declare const Input: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1844
|
-
"update:modelValue": (value:
|
|
1849
|
+
"update:modelValue": (value: unknown) => any;
|
|
1845
1850
|
}, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{
|
|
1846
|
-
"onUpdate:modelValue"?: ((value:
|
|
1851
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
1847
1852
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
1848
1853
|
$inputRef: ({
|
|
1849
1854
|
$: ComponentInternalInstance;
|
|
@@ -1852,9 +1857,9 @@ $props: {
|
|
|
1852
1857
|
readonly name?: string | undefined;
|
|
1853
1858
|
readonly label?: string | undefined;
|
|
1854
1859
|
readonly description?: string | undefined;
|
|
1855
|
-
readonly modelValue?:
|
|
1860
|
+
readonly modelValue?: unknown;
|
|
1856
1861
|
readonly as?: string | undefined;
|
|
1857
|
-
readonly "onUpdate:modelValue"?: ((value:
|
|
1862
|
+
readonly "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
1858
1863
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1859
1864
|
$attrs: {
|
|
1860
1865
|
[x: string]: unknown;
|
|
@@ -1868,23 +1873,23 @@ $slots: Readonly<{
|
|
|
1868
1873
|
$root: ComponentPublicInstance | null;
|
|
1869
1874
|
$parent: ComponentPublicInstance | null;
|
|
1870
1875
|
$host: Element | null;
|
|
1871
|
-
$emit: (event: "update:modelValue", value:
|
|
1876
|
+
$emit: (event: "update:modelValue", value: unknown) => void;
|
|
1872
1877
|
$el: any;
|
|
1873
|
-
$options: ComponentOptionsBase<Readonly<InputProps<
|
|
1878
|
+
$options: ComponentOptionsBase<Readonly<InputProps<unknown> & {
|
|
1874
1879
|
as?: string;
|
|
1875
1880
|
}> & Readonly<{
|
|
1876
|
-
"onUpdate:modelValue"?: ((value:
|
|
1881
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
1877
1882
|
}>, {
|
|
1878
1883
|
id: string;
|
|
1879
1884
|
name: ComputedRef<string | undefined>;
|
|
1880
1885
|
label: ComputedRef<string | undefined>;
|
|
1881
1886
|
description: ComputedRef<string | undefined>;
|
|
1882
|
-
value: ComputedRef<
|
|
1887
|
+
value: ComputedRef<unknown>;
|
|
1883
1888
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
1884
1889
|
required: ComputedRef<boolean | undefined>;
|
|
1885
|
-
update(value:
|
|
1890
|
+
update(value: unknown): void;
|
|
1886
1891
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
1887
|
-
"update:modelValue": (value:
|
|
1892
|
+
"update:modelValue": (value: unknown) => any;
|
|
1888
1893
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
1889
1894
|
beforeCreate?: (() => void) | (() => void)[];
|
|
1890
1895
|
created?: (() => void) | (() => void)[];
|
|
@@ -1905,19 +1910,19 @@ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info:
|
|
|
1905
1910
|
$forceUpdate: () => void;
|
|
1906
1911
|
$nextTick: typeof nextTick;
|
|
1907
1912
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
1908
|
-
} & Readonly<{}> & Omit<Readonly<InputProps<
|
|
1913
|
+
} & Readonly<{}> & Omit<Readonly<InputProps<unknown> & {
|
|
1909
1914
|
as?: string;
|
|
1910
1915
|
}> & Readonly<{
|
|
1911
|
-
"onUpdate:modelValue"?: ((value:
|
|
1916
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
1912
1917
|
}>, "id" | "value" | "name" | "description" | "errors" | "label" | "required" | "update"> & ShallowUnwrapRef< {
|
|
1913
1918
|
id: string;
|
|
1914
1919
|
name: ComputedRef<string | undefined>;
|
|
1915
1920
|
label: ComputedRef<string | undefined>;
|
|
1916
1921
|
description: ComputedRef<string | undefined>;
|
|
1917
|
-
value: ComputedRef<
|
|
1922
|
+
value: ComputedRef<unknown>;
|
|
1918
1923
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
1919
1924
|
required: ComputedRef<boolean | undefined>;
|
|
1920
|
-
update(value:
|
|
1925
|
+
update(value: unknown): void;
|
|
1921
1926
|
}> & {} & ComponentCustomProperties & {} & {
|
|
1922
1927
|
$slots: {
|
|
1923
1928
|
default?(_: {}): any;
|
|
@@ -2179,6 +2184,8 @@ export declare function requiredBooleanInput(defaultValue?: boolean): FormFieldD
|
|
|
2179
2184
|
|
|
2180
2185
|
export declare function requiredDateInput(defaultValue?: Date): FormFieldDefinition<'date', 'required'>;
|
|
2181
2186
|
|
|
2187
|
+
export declare function requiredEnumInput<T extends string>(values: T[], defaultValue?: T): FormFieldDefinition<'enum', 'required', T>;
|
|
2188
|
+
|
|
2182
2189
|
export declare function requiredNumberInput(defaultValue?: number): FormFieldDefinition<'number', 'required'>;
|
|
2183
2190
|
|
|
2184
2191
|
export declare function requiredObjectInput<T extends object>(defaultValue?: T): FormFieldDefinition<'object', 'required', T>;
|
|
@@ -2332,9 +2339,9 @@ export declare type SubmitFormListener = () => unknown;
|
|
|
2332
2339
|
export declare const Switch: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
2333
2340
|
|
|
2334
2341
|
export declare const TextArea: DefineComponent<__VLS_Props_23, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2335
|
-
"update:modelValue": (value:
|
|
2342
|
+
"update:modelValue": (value: unknown) => any;
|
|
2336
2343
|
}, string, PublicProps, Readonly<__VLS_Props_23> & Readonly<{
|
|
2337
|
-
"onUpdate:modelValue"?: ((value:
|
|
2344
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
2338
2345
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
2339
2346
|
$inputRef: ({
|
|
2340
2347
|
$: ComponentInternalInstance;
|
|
@@ -2343,9 +2350,9 @@ $props: {
|
|
|
2343
2350
|
readonly name?: string | undefined;
|
|
2344
2351
|
readonly label?: string | undefined;
|
|
2345
2352
|
readonly description?: string | undefined;
|
|
2346
|
-
readonly modelValue?:
|
|
2353
|
+
readonly modelValue?: unknown;
|
|
2347
2354
|
readonly as?: string | undefined;
|
|
2348
|
-
readonly "onUpdate:modelValue"?: ((value:
|
|
2355
|
+
readonly "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
2349
2356
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
2350
2357
|
$attrs: {
|
|
2351
2358
|
[x: string]: unknown;
|
|
@@ -2359,23 +2366,23 @@ $slots: Readonly<{
|
|
|
2359
2366
|
$root: ComponentPublicInstance | null;
|
|
2360
2367
|
$parent: ComponentPublicInstance | null;
|
|
2361
2368
|
$host: Element | null;
|
|
2362
|
-
$emit: (event: "update:modelValue", value:
|
|
2369
|
+
$emit: (event: "update:modelValue", value: unknown) => void;
|
|
2363
2370
|
$el: any;
|
|
2364
|
-
$options: ComponentOptionsBase<Readonly<InputProps<
|
|
2371
|
+
$options: ComponentOptionsBase<Readonly<InputProps<unknown> & {
|
|
2365
2372
|
as?: string;
|
|
2366
2373
|
}> & Readonly<{
|
|
2367
|
-
"onUpdate:modelValue"?: ((value:
|
|
2374
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
2368
2375
|
}>, {
|
|
2369
2376
|
id: string;
|
|
2370
2377
|
name: ComputedRef<string | undefined>;
|
|
2371
2378
|
label: ComputedRef<string | undefined>;
|
|
2372
2379
|
description: ComputedRef<string | undefined>;
|
|
2373
|
-
value: ComputedRef<
|
|
2380
|
+
value: ComputedRef<unknown>;
|
|
2374
2381
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
2375
2382
|
required: ComputedRef<boolean | undefined>;
|
|
2376
|
-
update(value:
|
|
2383
|
+
update(value: unknown): void;
|
|
2377
2384
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2378
|
-
"update:modelValue": (value:
|
|
2385
|
+
"update:modelValue": (value: unknown) => any;
|
|
2379
2386
|
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
2380
2387
|
beforeCreate?: (() => void) | (() => void)[];
|
|
2381
2388
|
created?: (() => void) | (() => void)[];
|
|
@@ -2396,19 +2403,19 @@ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info:
|
|
|
2396
2403
|
$forceUpdate: () => void;
|
|
2397
2404
|
$nextTick: typeof nextTick;
|
|
2398
2405
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
|
|
2399
|
-
} & Readonly<{}> & Omit<Readonly<InputProps<
|
|
2406
|
+
} & Readonly<{}> & Omit<Readonly<InputProps<unknown> & {
|
|
2400
2407
|
as?: string;
|
|
2401
2408
|
}> & Readonly<{
|
|
2402
|
-
"onUpdate:modelValue"?: ((value:
|
|
2409
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
2403
2410
|
}>, "id" | "value" | "name" | "description" | "errors" | "label" | "required" | "update"> & ShallowUnwrapRef< {
|
|
2404
2411
|
id: string;
|
|
2405
2412
|
name: ComputedRef<string | undefined>;
|
|
2406
2413
|
label: ComputedRef<string | undefined>;
|
|
2407
2414
|
description: ComputedRef<string | undefined>;
|
|
2408
|
-
value: ComputedRef<
|
|
2415
|
+
value: ComputedRef<unknown>;
|
|
2409
2416
|
errors: Readonly<Ref<readonly string[] | null, readonly string[] | null>>;
|
|
2410
2417
|
required: ComputedRef<boolean | undefined>;
|
|
2411
|
-
update(value:
|
|
2418
|
+
update(value: unknown): void;
|
|
2412
2419
|
}> & {} & ComponentCustomProperties & {} & {
|
|
2413
2420
|
$slots: {
|
|
2414
2421
|
default?(_: {}): any;
|
|
@@ -2526,13 +2533,13 @@ export declare function useAlertModal(props: AlertModalProps): {
|
|
|
2526
2533
|
|
|
2527
2534
|
export declare function useConfirmModal(props: ConfirmModalProps): {
|
|
2528
2535
|
form: FormController< {
|
|
2529
|
-
[x: string]: FormFieldDefinition<"boolean", string,
|
|
2536
|
+
[x: string]: FormFieldDefinition<"boolean", string, unknown> | {
|
|
2530
2537
|
type: "boolean";
|
|
2531
2538
|
default: boolean | undefined;
|
|
2532
2539
|
required: string | undefined;
|
|
2533
2540
|
};
|
|
2534
2541
|
}> & FormData_2< {
|
|
2535
|
-
[x: string]: FormFieldDefinition<"boolean", string,
|
|
2542
|
+
[x: string]: FormFieldDefinition<"boolean", string, unknown> | {
|
|
2536
2543
|
type: "boolean";
|
|
2537
2544
|
default: boolean | undefined;
|
|
2538
2545
|
required: string | undefined;
|
|
@@ -2569,9 +2576,9 @@ export declare function useLoadingModal(props: LoadingModalProps): {
|
|
|
2569
2576
|
|
|
2570
2577
|
export declare function usePromptModal(props: PromptModalProps): {
|
|
2571
2578
|
form: FormController< {
|
|
2572
|
-
readonly draft: FormFieldDefinition<"string", "required",
|
|
2579
|
+
readonly draft: FormFieldDefinition<"string", "required", unknown>;
|
|
2573
2580
|
}> & FormData_2< {
|
|
2574
|
-
readonly draft: FormFieldDefinition<"string", "required",
|
|
2581
|
+
readonly draft: FormFieldDefinition<"string", "required", unknown>;
|
|
2575
2582
|
}>;
|
|
2576
2583
|
renderedTitle: ComputedRef<string>;
|
|
2577
2584
|
renderedMessage: ComputedRef<string | null>;
|
|
@@ -2581,6 +2588,8 @@ export declare function usePromptModal(props: PromptModalProps): {
|
|
|
2581
2588
|
|
|
2582
2589
|
export declare function validate(value: unknown, rule: string): string[];
|
|
2583
2590
|
|
|
2591
|
+
export declare function validateType(value: unknown, definition: FormFieldDefinition): string[];
|
|
2592
|
+
|
|
2584
2593
|
export declare const validators: Record<string, FormFieldValidator>;
|
|
2585
2594
|
|
|
2586
2595
|
export declare function variantClasses<T>(value: {
|
|
@@ -2696,13 +2705,6 @@ declare module '@aerogel/core' {
|
|
|
2696
2705
|
}
|
|
2697
2706
|
|
|
2698
2707
|
|
|
2699
|
-
declare module '@aerogel/core' {
|
|
2700
|
-
interface EventsPayload {
|
|
2701
|
-
'purge-storage': void;
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
2708
|
declare module '@aerogel/core' {
|
|
2707
2709
|
interface EventsPayload {
|
|
2708
2710
|
'close-modal': {
|
|
@@ -2719,3 +2721,10 @@ declare module '@aerogel/core' {
|
|
|
2719
2721
|
};
|
|
2720
2722
|
}
|
|
2721
2723
|
}
|
|
2724
|
+
|
|
2725
|
+
|
|
2726
|
+
declare module '@aerogel/core' {
|
|
2727
|
+
interface EventsPayload {
|
|
2728
|
+
'purge-storage': void;
|
|
2729
|
+
}
|
|
2730
|
+
}
|