@effect-app/vue-components 4.0.0-beta.281 → 4.0.0-beta.283
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/types/components/OmegaForm/OmegaInputVuetify.vue.d.ts +6 -0
- package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +5 -9
- package/dist/types/components/OmegaForm/createUseFormWithCustomInput.d.ts +4 -2
- package/dist/types/components/OmegaForm/index.d.ts +1 -0
- package/dist/types/components/OmegaForm/types.d.ts +26 -3
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +4 -2
- package/dist/vue-components.es.js +9 -9
- package/dist/vue-components22.es.js +1 -0
- package/dist/vue-components30.es.js +23 -265
- package/dist/vue-components31.es.js +300 -0
- package/dist/vue-components33.es.js +7 -72
- package/dist/vue-components34.es.js +71 -3
- package/dist/vue-components35.es.js +4 -51
- package/dist/vue-components36.es.js +60 -4
- package/dist/vue-components37.es.js +4 -23
- package/dist/vue-components38.es.js +23 -4
- package/dist/vue-components39.es.js +3 -57
- package/dist/vue-components40.es.js +57 -3
- package/dist/vue-components41.es.js +4 -11
- package/dist/vue-components42.es.js +11 -21
- package/dist/vue-components43.es.js +22 -0
- package/dist/vue-components45.es.js +8 -3
- package/dist/vue-components46.es.js +3 -37
- package/dist/vue-components47.es.js +34 -23
- package/dist/vue-components48.es.js +23 -24
- package/dist/vue-components49.es.js +27 -6
- package/dist/vue-components50.es.js +6 -17
- package/dist/vue-components51.es.js +16 -34
- package/dist/vue-components52.es.js +34 -16
- package/dist/vue-components53.es.js +16 -19
- package/dist/vue-components54.es.js +10 -19
- package/dist/vue-components55.es.js +29 -6
- package/dist/vue-components56.es.js +6 -8
- package/dist/vue-components57.es.js +7 -36
- package/dist/vue-components58.es.js +37 -24
- package/dist/vue-components59.es.js +19 -122
- package/dist/vue-components60.es.js +126 -22
- package/dist/vue-components61.es.js +20 -17
- package/dist/vue-components62.es.js +18 -6
- package/dist/vue-components63.es.js +5 -15
- package/dist/vue-components64.es.js +18 -4
- package/dist/vue-components65.es.js +4 -28
- package/dist/vue-components66.es.js +28 -4
- package/dist/vue-components67.es.js +4 -42
- package/dist/vue-components68.es.js +38 -95
- package/dist/vue-components69.es.js +95 -27
- package/dist/vue-components70.es.js +35 -18
- package/dist/vue-components71.es.js +18 -47
- package/dist/vue-components72.es.js +48 -0
- package/package.json +4 -4
- package/src/components/OmegaForm/OmegaInput.vue +8 -1
- package/src/components/OmegaForm/OmegaInputVuetify.vue +49 -2
- package/src/components/OmegaForm/OmegaInternalInput.vue +16 -9
- package/src/components/OmegaForm/createUseFormWithCustomInput.ts +15 -14
- package/src/components/OmegaForm/index.ts +1 -0
- package/src/components/OmegaForm/types.ts +63 -21
- package/src/components/OmegaForm/useOmegaForm.ts +7 -6
- package/dist/vue-components32.es.js +0 -8
- package/dist/vue-components44.es.js +0 -9
|
@@ -51,6 +51,12 @@ declare const __VLS_export: <From extends Record<PropertyKey, any>, Name extends
|
|
|
51
51
|
id: string;
|
|
52
52
|
label: string;
|
|
53
53
|
}) => any;
|
|
54
|
+
} & {
|
|
55
|
+
label?: (props: {
|
|
56
|
+
required: boolean | undefined;
|
|
57
|
+
id: string;
|
|
58
|
+
label: string;
|
|
59
|
+
}) => any;
|
|
54
60
|
};
|
|
55
61
|
emit: {
|
|
56
62
|
(e: "focus", event: Event): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
|
-
import { type ComputedRef } from "vue";
|
|
2
|
+
import { type Component, type ComputedRef } from "vue";
|
|
3
3
|
import type { OmegaFieldInternalApi } from "./InputProps";
|
|
4
4
|
import type { MetaRecord, NestedKeyOf } from "./meta/types";
|
|
5
|
-
import type {
|
|
5
|
+
import type { TypeOverride } from "./types";
|
|
6
6
|
declare const __VLS_export: <From extends Record<PropertyKey, any>, Name extends DeepKeys<From>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
7
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
8
8
|
field: OmegaFieldInternalApi<From, Name>;
|
|
@@ -10,7 +10,6 @@ declare const __VLS_export: <From extends Record<PropertyKey, any>, Name extends
|
|
|
10
10
|
meta: MetaRecord<From>[NestedKeyOf<From>];
|
|
11
11
|
label: string;
|
|
12
12
|
type?: TypeOverride;
|
|
13
|
-
validators?: FieldValidators<From>;
|
|
14
13
|
required?: boolean;
|
|
15
14
|
inputClass?: string | null;
|
|
16
15
|
register: (field: ComputedRef<{
|
|
@@ -20,8 +19,9 @@ declare const __VLS_export: <From extends Record<PropertyKey, any>, Name extends
|
|
|
20
19
|
}>) => void;
|
|
21
20
|
options?: {
|
|
22
21
|
title: string;
|
|
23
|
-
value:
|
|
22
|
+
value: unknown;
|
|
24
23
|
}[];
|
|
24
|
+
inputs?: Record<string, Component>;
|
|
25
25
|
}> & (typeof globalThis extends {
|
|
26
26
|
__VLS_PROPS_FALLBACK: infer P;
|
|
27
27
|
} ? P : {});
|
|
@@ -44,11 +44,7 @@ declare const __VLS_export: <From extends Record<PropertyKey, any>, Name extends
|
|
|
44
44
|
inputClass: string | undefined | null;
|
|
45
45
|
}) => any;
|
|
46
46
|
} & {
|
|
47
|
-
label?: (props:
|
|
48
|
-
required: boolean | undefined;
|
|
49
|
-
id: string;
|
|
50
|
-
label: string;
|
|
51
|
-
}) => any;
|
|
47
|
+
label?: (props: any) => any;
|
|
52
48
|
};
|
|
53
49
|
emit: {};
|
|
54
50
|
}>) => import("vue").VNode & {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type Component } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import type { OmegaConfig } from "./types";
|
|
3
3
|
import { useOmegaForm } from "./useOmegaForm";
|
|
4
|
-
export declare const createUseFormWithCustomInput:
|
|
4
|
+
export declare const createUseFormWithCustomInput: (CustomInputComponent: Component) => <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, const Cfg extends OmegaConfig<To> = OmegaConfig<To>>(schema: Parameters<typeof useOmegaForm<From, To>>[0], tanstackFormOptions?: Parameters<typeof useOmegaForm<From, To>>[1], omegaConfig?: Cfg) => import("./types").OmegaFormReturn<From, To, import("./types").TypePropsFor<Cfg extends {
|
|
5
|
+
inputs?: infer I;
|
|
6
|
+
} ? I : {}>>;
|
|
@@ -11,6 +11,7 @@ export { makeStandardSchemaV1Hooks, toLocalizedStandardSchemaV1 } from "./valida
|
|
|
11
11
|
export { FormErrors, OmegaFormKey, useErrorLabel, useOmegaForm } from "./useOmegaForm";
|
|
12
12
|
export type { defaultValuesPriorityUnion, OF, OmegaConfig, OmegaFormReturn, Policies } from "./useOmegaForm";
|
|
13
13
|
export { type ExtractTagValue, type ExtractUnionBranch, type InputProps, type MergedInputProps, type TaggedUnionOption, type TaggedUnionOptionsArray, type TaggedUnionProps } from "./InputProps";
|
|
14
|
+
export type { VuetifyInputProps, VuetifyInputProps as OmegaRendererProps } from "./InputProps";
|
|
14
15
|
export { default as OmegaInput } from "./OmegaInput.vue";
|
|
15
16
|
export { default as OmegaVuetifyInput } from "./OmegaInternalInput.vue";
|
|
16
17
|
export { default as OmegaTaggedUnion } from "./OmegaTaggedUnion.vue";
|
|
@@ -5,7 +5,7 @@ import type { UnionToTuples } from "effect-app/utils";
|
|
|
5
5
|
import type { Fiber as EffectFiber } from "effect/Fiber";
|
|
6
6
|
import type * as Order from "effect/Order";
|
|
7
7
|
import type { Redacted } from "effect/Redacted";
|
|
8
|
-
import type { AllowedComponentProps, ComponentCustomProps, ComputedRef, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "vue";
|
|
8
|
+
import type { AllowedComponentProps, Component, ComponentCustomProps, ComputedRef, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "vue";
|
|
9
9
|
import type { MergedInputProps, OmegaFieldInternalApi, TaggedUnionOptionsArray } from "./InputProps";
|
|
10
10
|
import type { MetaRecord, NestedKeyOf } from "./meta/types";
|
|
11
11
|
import type { defaultValuesPriorityUnion as PersistencyPriority, Policies as PersistencyPolicies } from "./persistency";
|
|
@@ -24,6 +24,11 @@ export type BaseProps<From, TName extends FieldPath<From>> = {
|
|
|
24
24
|
*/
|
|
25
25
|
label?: string;
|
|
26
26
|
validators?: FieldValidators<From>;
|
|
27
|
+
/**
|
|
28
|
+
* Overrides the schema-derived `meta.required`.
|
|
29
|
+
* When omitted, requiredness is inferred from the schema.
|
|
30
|
+
*/
|
|
31
|
+
required?: boolean;
|
|
27
32
|
name: TName;
|
|
28
33
|
/**
|
|
29
34
|
* Optional class to apply to the input element.
|
|
@@ -44,12 +49,22 @@ export type DefaultTypeProps = {
|
|
|
44
49
|
value: unknown;
|
|
45
50
|
}[];
|
|
46
51
|
};
|
|
52
|
+
/** Registered `omegaConfig.inputs` keys as valid `type` values; `never` when nothing is registered. */
|
|
53
|
+
export type CustomTypeProps<TInputs> = string extends keyof TInputs ? never : keyof TInputs extends never ? never : {
|
|
54
|
+
type: keyof TInputs & string;
|
|
55
|
+
options?: {
|
|
56
|
+
title: string;
|
|
57
|
+
value: unknown;
|
|
58
|
+
}[];
|
|
59
|
+
};
|
|
60
|
+
/** `form.Input` `type`/`options`: built-ins plus types registered via `omegaConfig.inputs`. */
|
|
61
|
+
export type TypePropsFor<TInputs> = DefaultTypeProps | CustomTypeProps<TInputs>;
|
|
47
62
|
export type OmegaInputPropsBase<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, Name extends DeepKeys<From>> = {
|
|
48
63
|
form: OF<From, To> & {
|
|
49
64
|
meta: MetaRecord<From>;
|
|
50
65
|
i18nNamespace?: string;
|
|
51
66
|
};
|
|
52
|
-
} & BaseProps<From, Name
|
|
67
|
+
} & BaseProps<From, Name> & DefaultTypeProps;
|
|
53
68
|
export type OmegaInputProps<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, Name extends DeepKeys<From>, TypeProps = DefaultTypeProps> = {
|
|
54
69
|
form: OmegaFormReturn<From, To, TypeProps> & {
|
|
55
70
|
meta: MetaRecord<From>;
|
|
@@ -61,7 +76,8 @@ export type OmegaArrayProps<From extends Record<PropertyKey, any>, To extends Re
|
|
|
61
76
|
defaultItems?: DeepValue<From, DeepKeys<From>>;
|
|
62
77
|
items?: "please use `defaultItems` instead";
|
|
63
78
|
};
|
|
64
|
-
export
|
|
79
|
+
export declare const typeOverrides: readonly ["string", "text", "number", "select", "multiple", "boolean", "radio", "autocomplete", "autocompletemultiple", "switch", "range", "password", "email", "date", "tel", "url", "color", "time", "search"];
|
|
80
|
+
export type TypeOverride = typeof typeOverrides[number];
|
|
65
81
|
export interface OmegaError {
|
|
66
82
|
label: string;
|
|
67
83
|
inputId: string;
|
|
@@ -121,6 +137,12 @@ export type OmegaConfig<T> = {
|
|
|
121
137
|
*/
|
|
122
138
|
preventWindowExit?: "prevent" | "prevent-and-reset" | "nope";
|
|
123
139
|
input?: any;
|
|
140
|
+
/**
|
|
141
|
+
* Register a custom input component per `type` (new types or overrides). Each
|
|
142
|
+
* key becomes a valid `<form.Input type="...">` value; components receive the
|
|
143
|
+
* `OmegaRendererProps` contract (`{ inputProps, field, state }`).
|
|
144
|
+
*/
|
|
145
|
+
inputs?: Record<string, Component>;
|
|
124
146
|
/**
|
|
125
147
|
* Default values order is: Tanstack default values passed as second parameter to useOmegaForm, then persistency
|
|
126
148
|
* default values from querystring or local/session storage, then defaults from schema
|
|
@@ -133,6 +155,7 @@ export type OmegaConfig<T> = {
|
|
|
133
155
|
export interface OF<From, To> extends OmegaFormApi<From, To> {
|
|
134
156
|
meta: MetaRecord<From>;
|
|
135
157
|
unionMeta: Record<string, MetaRecord<From>>;
|
|
158
|
+
inputs?: Record<string, Component>;
|
|
136
159
|
clear: () => void;
|
|
137
160
|
/**
|
|
138
161
|
* Backfills the untouched children of any materialised nullable struct with
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as S from "effect-app/Schema";
|
|
2
2
|
import { type InjectionKey } from "vue";
|
|
3
|
-
import type {
|
|
3
|
+
import type { FormProps, OF, OmegaConfig, OmegaFormReturn, TypePropsFor } from "./types";
|
|
4
4
|
export { useErrorLabel } from "./errors";
|
|
5
5
|
export { FormErrors } from "./submit";
|
|
6
6
|
export type { defaultValuesPriorityUnion, OF, OmegaConfig, OmegaFormReturn, Policies } from "./types";
|
|
7
7
|
export declare const OmegaFormKey: InjectionKey<OF<any, any>>;
|
|
8
|
-
export declare const useOmegaForm: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>,
|
|
8
|
+
export declare const useOmegaForm: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, const Cfg extends OmegaConfig<To> = OmegaConfig<To>>(schema: S.Codec<To, From>, tanstackFormOptions?: NoInfer<FormProps<From, To>>, omegaConfig?: Cfg) => OmegaFormReturn<From, To, TypePropsFor<Cfg extends {
|
|
9
|
+
inputs?: infer I;
|
|
10
|
+
} ? I : {}>>;
|
|
@@ -9,15 +9,15 @@ import { toFormSchema as m } from "./vue-components16.es.js";
|
|
|
9
9
|
import { deepMerge as h } from "./vue-components18.es.js";
|
|
10
10
|
import { makeStandardSchemaV1Hooks as g, toLocalizedStandardSchemaV1 as _ } from "./vue-components19.es.js";
|
|
11
11
|
import { useErrorLabel as v } from "./vue-components20.es.js";
|
|
12
|
-
import y from "./vue-
|
|
13
|
-
import b from "./vue-
|
|
14
|
-
import x from "./vue-
|
|
15
|
-
import S from "./vue-
|
|
16
|
-
import { FormErrors as C } from "./vue-
|
|
17
|
-
import { OmegaFormKey as w, useOmegaForm as T } from "./vue-
|
|
18
|
-
import { createUseFormWithCustomInput as E } from "./vue-
|
|
19
|
-
import { duplicateSchema as D } from "./vue-
|
|
20
|
-
import { components_exports as O } from "./vue-
|
|
12
|
+
import y from "./vue-components35.es.js";
|
|
13
|
+
import b from "./vue-components37.es.js";
|
|
14
|
+
import x from "./vue-components39.es.js";
|
|
15
|
+
import S from "./vue-components41.es.js";
|
|
16
|
+
import { FormErrors as C } from "./vue-components68.es.js";
|
|
17
|
+
import { OmegaFormKey as w, useOmegaForm as T } from "./vue-components69.es.js";
|
|
18
|
+
import { createUseFormWithCustomInput as E } from "./vue-components70.es.js";
|
|
19
|
+
import { duplicateSchema as D } from "./vue-components71.es.js";
|
|
20
|
+
import { components_exports as O } from "./vue-components72.es.js";
|
|
21
21
|
//#region src/index.ts
|
|
22
22
|
function k(e) {
|
|
23
23
|
for (let t in O) if (Object.prototype.hasOwnProperty.call(O, t)) {
|
|
@@ -1,266 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
o.inputProps.type === "boolean" || o.inputProps.type === "switch" ? (u(), n(m(o.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), c({
|
|
24
|
-
key: 0,
|
|
25
|
-
id: o.inputProps.id,
|
|
26
|
-
name: o.field.name,
|
|
27
|
-
label: o.inputProps.label,
|
|
28
|
-
"error-messages": o.inputProps.errorMessages,
|
|
29
|
-
error: o.inputProps.error,
|
|
30
|
-
ripple: ""
|
|
31
|
-
}, _.$attrs, {
|
|
32
|
-
"model-value": o.state.value,
|
|
33
|
-
onChange: v[0] ||= (e) => o.field.handleChange(e.target.checked)
|
|
34
|
-
}), a({ _: 2 }, [_.$slots.label ? {
|
|
35
|
-
name: "label",
|
|
36
|
-
fn: g(() => [f(_.$slots, "label", l(s({
|
|
37
|
-
required: o.inputProps.required,
|
|
38
|
-
id: o.inputProps.id,
|
|
39
|
-
label: o.inputProps.label
|
|
40
|
-
})))]),
|
|
41
|
-
key: "0"
|
|
42
|
-
} : void 0]), 1040, [
|
|
43
|
-
"id",
|
|
44
|
-
"name",
|
|
45
|
-
"label",
|
|
46
|
-
"error-messages",
|
|
47
|
-
"error",
|
|
48
|
-
"model-value"
|
|
49
|
-
])) : r("", !0),
|
|
50
|
-
o.inputProps.type === "email" || o.inputProps.type === "string" || o.inputProps.type === "password" || o.inputProps.type === "date" ? (u(), n(y, c({
|
|
51
|
-
key: 1,
|
|
52
|
-
id: o.inputProps.id,
|
|
53
|
-
required: o.inputProps.required,
|
|
54
|
-
"min-length": o.inputProps.minLength,
|
|
55
|
-
"max-length": o.inputProps.maxLength,
|
|
56
|
-
type: h(e)(o.inputProps.type),
|
|
57
|
-
name: o.field.name,
|
|
58
|
-
label: o.inputProps.label,
|
|
59
|
-
"error-messages": o.inputProps.errorMessages,
|
|
60
|
-
error: o.inputProps.error
|
|
61
|
-
}, _.$attrs, {
|
|
62
|
-
"model-value": o.state.value,
|
|
63
|
-
"onUpdate:modelValue": v[1] ||= (e) => o.field.handleChange(e)
|
|
64
|
-
}), a({ _: 2 }, [_.$slots.label ? {
|
|
65
|
-
name: "label",
|
|
66
|
-
fn: g(() => [f(_.$slots, "label", l(s({
|
|
67
|
-
required: o.inputProps.required,
|
|
68
|
-
id: o.inputProps.id,
|
|
69
|
-
label: o.inputProps.label
|
|
70
|
-
})))]),
|
|
71
|
-
key: "0"
|
|
72
|
-
} : void 0]), 1040, [
|
|
73
|
-
"id",
|
|
74
|
-
"required",
|
|
75
|
-
"min-length",
|
|
76
|
-
"max-length",
|
|
77
|
-
"type",
|
|
78
|
-
"name",
|
|
79
|
-
"label",
|
|
80
|
-
"error-messages",
|
|
81
|
-
"error",
|
|
82
|
-
"model-value"
|
|
83
|
-
])) : r("", !0),
|
|
84
|
-
o.inputProps.type === "text" ? (u(), n(b, c({
|
|
85
|
-
key: 2,
|
|
86
|
-
id: o.inputProps.id,
|
|
87
|
-
required: o.inputProps.required,
|
|
88
|
-
"min-length": o.inputProps.minLength,
|
|
89
|
-
"max-length": o.inputProps.maxLength,
|
|
90
|
-
name: o.field.name,
|
|
91
|
-
label: o.inputProps.label,
|
|
92
|
-
"error-messages": o.inputProps.errorMessages,
|
|
93
|
-
error: o.inputProps.error
|
|
94
|
-
}, _.$attrs, {
|
|
95
|
-
"model-value": o.state.value,
|
|
96
|
-
"onUpdate:modelValue": v[2] ||= (e) => o.field.handleChange(e)
|
|
97
|
-
}), a({ _: 2 }, [_.$slots.label ? {
|
|
98
|
-
name: "label",
|
|
99
|
-
fn: g(() => [f(_.$slots, "label", l(s({
|
|
100
|
-
required: o.inputProps.required,
|
|
101
|
-
id: o.inputProps.id,
|
|
102
|
-
label: o.inputProps.label
|
|
103
|
-
})))]),
|
|
104
|
-
key: "0"
|
|
105
|
-
} : void 0]), 1040, [
|
|
106
|
-
"id",
|
|
107
|
-
"required",
|
|
108
|
-
"min-length",
|
|
109
|
-
"max-length",
|
|
110
|
-
"name",
|
|
111
|
-
"label",
|
|
112
|
-
"error-messages",
|
|
113
|
-
"error",
|
|
114
|
-
"model-value"
|
|
115
|
-
])) : r("", !0),
|
|
116
|
-
o.inputProps.type === "number" || o.inputProps.type === "range" ? (u(), n(m(o.inputProps.type === "range" ? "v-slider" : "v-text-field"), c({
|
|
117
|
-
key: 3,
|
|
118
|
-
id: o.inputProps.id,
|
|
119
|
-
required: o.inputProps.required,
|
|
120
|
-
min: o.inputProps.min,
|
|
121
|
-
max: o.inputProps.max,
|
|
122
|
-
type: o.inputProps.type,
|
|
123
|
-
name: o.field.name,
|
|
124
|
-
label: o.inputProps.label,
|
|
125
|
-
"error-messages": o.inputProps.errorMessages,
|
|
126
|
-
error: o.inputProps.error
|
|
127
|
-
}, _.$attrs, {
|
|
128
|
-
"model-value": o.state.value,
|
|
129
|
-
"onUpdate:modelValue": v[3] ||= (e) => {
|
|
130
|
-
e || e === 0 ? o.field.handleChange(Number(e)) : o.field.handleChange(void 0);
|
|
131
|
-
}
|
|
132
|
-
}), a({ _: 2 }, [_.$slots.label ? {
|
|
133
|
-
name: "label",
|
|
134
|
-
fn: g(() => [f(_.$slots, "label", l(s({
|
|
135
|
-
required: o.inputProps.required,
|
|
136
|
-
id: o.inputProps.id,
|
|
137
|
-
label: o.inputProps.label
|
|
138
|
-
})))]),
|
|
139
|
-
key: "0"
|
|
140
|
-
} : void 0]), 1040, [
|
|
141
|
-
"id",
|
|
142
|
-
"required",
|
|
143
|
-
"min",
|
|
144
|
-
"max",
|
|
145
|
-
"type",
|
|
146
|
-
"name",
|
|
147
|
-
"label",
|
|
148
|
-
"error-messages",
|
|
149
|
-
"error",
|
|
150
|
-
"model-value"
|
|
151
|
-
])) : r("", !0),
|
|
152
|
-
o.inputProps.type === "radio" ? (u(), n(S, c({
|
|
153
|
-
key: 4,
|
|
154
|
-
id: o.inputProps.id,
|
|
155
|
-
name: o.field.name,
|
|
156
|
-
label: o.inputProps.label,
|
|
157
|
-
"error-messages": o.inputProps.errorMessages,
|
|
158
|
-
error: o.inputProps.error
|
|
159
|
-
}, _.$attrs, {
|
|
160
|
-
"model-value": o.state.value,
|
|
161
|
-
"onUpdate:modelValue": v[4] ||= (e) => o.field.handleChange(e)
|
|
162
|
-
}), a({
|
|
163
|
-
default: g(() => [(u(!0), i(t, null, d(o.inputProps.options, (e) => (u(), n(x, {
|
|
164
|
-
key: e.value,
|
|
165
|
-
label: e.title,
|
|
166
|
-
value: e.value
|
|
167
|
-
}, null, 8, ["label", "value"]))), 128))]),
|
|
168
|
-
_: 2
|
|
169
|
-
}, [_.$slots.label ? {
|
|
170
|
-
name: "label",
|
|
171
|
-
fn: g(() => [f(_.$slots, "label", l(s({
|
|
172
|
-
required: o.inputProps.required,
|
|
173
|
-
id: o.inputProps.id,
|
|
174
|
-
label: o.inputProps.label
|
|
175
|
-
})))]),
|
|
176
|
-
key: "0"
|
|
177
|
-
} : void 0]), 1040, [
|
|
178
|
-
"id",
|
|
179
|
-
"name",
|
|
180
|
-
"label",
|
|
181
|
-
"error-messages",
|
|
182
|
-
"error",
|
|
183
|
-
"model-value"
|
|
184
|
-
])) : r("", !0),
|
|
185
|
-
o.inputProps.type === "select" || o.inputProps.type === "multiple" ? (u(), n(C, c({
|
|
186
|
-
key: 5,
|
|
187
|
-
id: o.inputProps.id,
|
|
188
|
-
clearable: o.inputProps.type === "select",
|
|
189
|
-
required: o.inputProps.required,
|
|
190
|
-
multiple: o.inputProps.type === "multiple",
|
|
191
|
-
chips: o.inputProps.type === "multiple",
|
|
192
|
-
name: o.field.name,
|
|
193
|
-
label: o.inputProps.label,
|
|
194
|
-
items: o.inputProps.options,
|
|
195
|
-
"error-messages": o.inputProps.errorMessages,
|
|
196
|
-
error: o.inputProps.error
|
|
197
|
-
}, _.$attrs, {
|
|
198
|
-
"model-value": o.state.value,
|
|
199
|
-
onClear: v[5] ||= (e) => o.field.handleChange(void 0),
|
|
200
|
-
"onUpdate:modelValue": o.field.handleChange
|
|
201
|
-
}), a({ _: 2 }, [_.$slots.label ? {
|
|
202
|
-
name: "label",
|
|
203
|
-
fn: g(() => [f(_.$slots, "label", l(s({
|
|
204
|
-
required: o.inputProps.required,
|
|
205
|
-
id: o.inputProps.id,
|
|
206
|
-
label: o.inputProps.label
|
|
207
|
-
})))]),
|
|
208
|
-
key: "0"
|
|
209
|
-
} : void 0]), 1040, [
|
|
210
|
-
"id",
|
|
211
|
-
"clearable",
|
|
212
|
-
"required",
|
|
213
|
-
"multiple",
|
|
214
|
-
"chips",
|
|
215
|
-
"name",
|
|
216
|
-
"label",
|
|
217
|
-
"items",
|
|
218
|
-
"error-messages",
|
|
219
|
-
"error",
|
|
220
|
-
"model-value",
|
|
221
|
-
"onUpdate:modelValue"
|
|
222
|
-
])) : r("", !0),
|
|
223
|
-
o.inputProps.type === "autocomplete" || o.inputProps.type === "autocompletemultiple" ? (u(), n(w, c({
|
|
224
|
-
key: 6,
|
|
225
|
-
id: o.inputProps.id,
|
|
226
|
-
clearable: o.inputProps.type === "autocomplete",
|
|
227
|
-
multiple: o.inputProps.type === "autocompletemultiple",
|
|
228
|
-
required: o.inputProps.required,
|
|
229
|
-
name: o.field.name,
|
|
230
|
-
label: o.inputProps.label,
|
|
231
|
-
items: o.inputProps.options,
|
|
232
|
-
"error-messages": o.inputProps.errorMessages,
|
|
233
|
-
error: o.inputProps.error,
|
|
234
|
-
chips: o.inputProps.type === "autocompletemultiple"
|
|
235
|
-
}, _.$attrs, {
|
|
236
|
-
"model-value": o.state.value,
|
|
237
|
-
onClear: v[6] ||= (e) => o.field.handleChange(void 0),
|
|
238
|
-
"onUpdate:modelValue": o.field.handleChange
|
|
239
|
-
}), a({ _: 2 }, [_.$slots.label ? {
|
|
240
|
-
name: "label",
|
|
241
|
-
fn: g(() => [f(_.$slots, "label", l(s({
|
|
242
|
-
required: o.inputProps.required,
|
|
243
|
-
id: o.inputProps.id,
|
|
244
|
-
label: o.inputProps.label
|
|
245
|
-
})))]),
|
|
246
|
-
key: "0"
|
|
247
|
-
} : void 0]), 1040, [
|
|
248
|
-
"id",
|
|
249
|
-
"clearable",
|
|
250
|
-
"multiple",
|
|
251
|
-
"required",
|
|
252
|
-
"name",
|
|
253
|
-
"label",
|
|
254
|
-
"items",
|
|
255
|
-
"error-messages",
|
|
256
|
-
"error",
|
|
257
|
-
"chips",
|
|
258
|
-
"model-value",
|
|
259
|
-
"onUpdate:modelValue"
|
|
260
|
-
])) : r("", !0)
|
|
261
|
-
], 32);
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
});
|
|
1
|
+
//#region src/components/OmegaForm/types.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"string",
|
|
4
|
+
"text",
|
|
5
|
+
"number",
|
|
6
|
+
"select",
|
|
7
|
+
"multiple",
|
|
8
|
+
"boolean",
|
|
9
|
+
"radio",
|
|
10
|
+
"autocomplete",
|
|
11
|
+
"autocompletemultiple",
|
|
12
|
+
"switch",
|
|
13
|
+
"range",
|
|
14
|
+
"password",
|
|
15
|
+
"email",
|
|
16
|
+
"date",
|
|
17
|
+
"tel",
|
|
18
|
+
"url",
|
|
19
|
+
"color",
|
|
20
|
+
"time",
|
|
21
|
+
"search"
|
|
22
|
+
];
|
|
265
23
|
//#endregion
|
|
266
|
-
export {
|
|
24
|
+
export { e as typeOverrides };
|