@effect-app/vue-components 1.2.0 → 1.3.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/dist/types/components/OmegaForm/OmegaArray.vue.d.ts +5 -4
- package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +5 -4
- package/dist/types/components/OmegaForm/OmegaErrorsInternal.vue.d.ts +3 -2
- package/dist/types/components/OmegaForm/OmegaFormInput.vue.d.ts +5 -4
- package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +4 -3
- package/dist/types/components/OmegaForm/OmegaInputVuetify.vue.d.ts +8 -7
- package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +5 -4
- package/dist/types/components/OmegaForm/OmegaWrapper.vue.d.ts +5 -4
- package/dist/vue-components.es12.js +15 -15
- package/dist/vue-components.es13.js +36 -39
- package/dist/vue-components.es16.js +1 -1
- package/dist/vue-components.es17.js +1 -1
- package/dist/vue-components.es20.js +41 -41
- package/dist/vue-components.es25.js +41 -41
- package/dist/vue-components.es28.js +15 -15
- package/dist/vue-components.es31.js +22 -10
- package/dist/vue-components.es32.js +5 -23
- package/dist/vue-components.es33.js +21 -5
- package/dist/vue-components.es34.js +25 -16
- package/dist/vue-components.es35.js +15 -23
- package/dist/vue-components.es36.js +7 -17
- package/dist/vue-components.es37.js +5 -12
- package/dist/vue-components.es38.js +19 -5
- package/dist/vue-components.es39.js +9 -19
- package/dist/vue-components.es4.js +12 -12
- package/dist/vue-components.es40.js +31 -9
- package/dist/vue-components.es41.js +42 -25
- package/dist/vue-components.es42.js +16 -38
- package/dist/vue-components.es43.js +11 -26
- package/dist/vue-components.es44.js +1 -1
- package/dist/vue-components.es46.js +1 -1
- package/dist/vue-components.es48.js +3 -3
- package/dist/vue-components.es49.js +1 -1
- package/package.json +15 -15
- package/src/components/OmegaForm/OmegaArray.vue +4 -2
- package/src/components/OmegaForm/OmegaAutoGen.vue +4 -2
- package/src/components/OmegaForm/OmegaFormInput.vue +4 -2
- package/src/components/OmegaForm/OmegaInput.vue +4 -2
- package/src/components/OmegaForm/OmegaWrapper.vue +4 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type DeepKeys, type DeepValue } from "@tanstack/vue-form";
|
|
2
2
|
import { type OmegaInputProps } from "./OmegaFormStuff";
|
|
3
|
-
declare const
|
|
3
|
+
declare const __VLS_export: <// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
|
|
4
4
|
From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
-
props: __VLS_PrettifyLocal<
|
|
5
|
+
props: __VLS_PrettifyLocal<Omit<OmegaInputProps<From, To>, "validators" | "options" | "label" | "type" | "items"> & {
|
|
6
6
|
defaultItems?: DeepValue<From, DeepKeys<From>>;
|
|
7
7
|
items?: "please use `defaultItems` instead";
|
|
8
|
-
}
|
|
9
|
-
expose(exposed:
|
|
8
|
+
}> & import("vue").PublicProps;
|
|
9
|
+
expose: (exposed: {}) => void;
|
|
10
10
|
attrs: any;
|
|
11
11
|
slots: {
|
|
12
12
|
'pre-array'?: (props: {
|
|
@@ -34,6 +34,7 @@ From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__VL
|
|
|
34
34
|
}>) => import("vue").VNode & {
|
|
35
35
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
36
36
|
};
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
37
38
|
export default _default;
|
|
38
39
|
type __VLS_PrettifyLocal<T> = {
|
|
39
40
|
[K in keyof T as K]: T[K];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import { Order } from "effect-app";
|
|
3
3
|
import { type OmegaAutoGenMeta, type OmegaInputProps } from "./OmegaFormStuff";
|
|
4
|
-
declare const
|
|
5
|
-
props: __VLS_PrettifyLocal<
|
|
4
|
+
declare const __VLS_export: <From extends Record<PropertyKey, string>, To extends Record<PropertyKey, string>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<{
|
|
6
6
|
form: OmegaInputProps<From, To>["form"];
|
|
7
7
|
pick?: DeepKeys<From>[];
|
|
8
8
|
omit?: DeepKeys<From>[];
|
|
@@ -10,8 +10,8 @@ declare const _default: <From extends Record<PropertyKey, string>, To extends Re
|
|
|
10
10
|
filterMap?: <M extends OmegaAutoGenMeta<From, To>>(key: DeepKeys<From>, meta: M) => boolean | M;
|
|
11
11
|
order?: DeepKeys<From>[];
|
|
12
12
|
sort?: Order.Order<OmegaAutoGenMeta<From, To>>;
|
|
13
|
-
}
|
|
14
|
-
expose(exposed:
|
|
13
|
+
}> & import("vue").PublicProps;
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
15
|
attrs: any;
|
|
16
16
|
slots: {
|
|
17
17
|
default(props: {
|
|
@@ -22,6 +22,7 @@ declare const _default: <From extends Record<PropertyKey, string>, To extends Re
|
|
|
22
22
|
}>) => import("vue").VNode & {
|
|
23
23
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
24
24
|
};
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
25
26
|
export default _default;
|
|
26
27
|
type __VLS_PrettifyLocal<T> = {
|
|
27
28
|
[K in keyof T as K]: T[K];
|
|
@@ -12,8 +12,9 @@ declare var __VLS_6: {
|
|
|
12
12
|
type __VLS_Slots = {} & {
|
|
13
13
|
default?: (props: typeof __VLS_6) => any;
|
|
14
14
|
};
|
|
15
|
-
declare const
|
|
16
|
-
declare const
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
17
18
|
export default _default;
|
|
18
19
|
type __VLS_WithSlots<T, S> = T & {
|
|
19
20
|
new (): {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import type { InputProps } from "./InputProps";
|
|
3
3
|
import type { DefaultInputProps } from "./OmegaFormStuff";
|
|
4
|
-
declare const
|
|
5
|
-
props: __VLS_PrettifyLocal<
|
|
4
|
+
declare const __VLS_export: <From extends Record<PropertyKey, any>, To 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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<{
|
|
6
6
|
name: Name;
|
|
7
|
-
} & DefaultInputProps<From
|
|
8
|
-
expose(exposed:
|
|
7
|
+
} & DefaultInputProps<From>> & import("vue").PublicProps;
|
|
8
|
+
expose: (exposed: {}) => void;
|
|
9
9
|
attrs: any;
|
|
10
10
|
slots: {
|
|
11
11
|
default(props: InputProps<From, Name>): void;
|
|
@@ -14,6 +14,7 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
14
14
|
}>) => import("vue").VNode & {
|
|
15
15
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
16
16
|
};
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
17
18
|
export default _default;
|
|
18
19
|
type __VLS_PrettifyLocal<T> = {
|
|
19
20
|
[K in keyof T as K]: T[K];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type OmegaInputPropsBase } from "./OmegaFormStuff";
|
|
2
|
-
declare const
|
|
2
|
+
declare const __VLS_export: <// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
|
|
3
3
|
From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: __VLS_PrettifyLocal<
|
|
5
|
-
expose(exposed:
|
|
4
|
+
props: __VLS_PrettifyLocal<OmegaInputPropsBase<From, To>> & import("vue").PublicProps;
|
|
5
|
+
expose: (exposed: {}) => void;
|
|
6
6
|
attrs: any;
|
|
7
7
|
slots: {
|
|
8
8
|
default?: (props: {
|
|
@@ -30,6 +30,7 @@ From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(__VL
|
|
|
30
30
|
}>) => import("vue").VNode & {
|
|
31
31
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
32
32
|
};
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
33
34
|
export default _default;
|
|
34
35
|
type __VLS_PrettifyLocal<T> = {
|
|
35
36
|
[K in keyof T as K]: T[K];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import type { InputProps } from "./InputProps";
|
|
3
|
-
declare const
|
|
4
|
-
props: __VLS_PrettifyLocal<
|
|
5
|
-
readonly onBlur?: ((event: Event) => any) | undefined;
|
|
6
|
-
readonly onFocus?: ((event: Event) => any) | undefined;
|
|
7
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur"> & {
|
|
3
|
+
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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<{
|
|
8
5
|
inputProps: InputProps<From, Name>;
|
|
9
6
|
vuetifyValue: unknown;
|
|
10
|
-
} & {
|
|
11
|
-
|
|
7
|
+
} & {
|
|
8
|
+
onBlur?: ((event: Event) => any) | undefined;
|
|
9
|
+
onFocus?: ((event: Event) => any) | undefined;
|
|
10
|
+
}> & import("vue").PublicProps;
|
|
11
|
+
expose: (exposed: {}) => void;
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: {};
|
|
14
14
|
emit: {
|
|
@@ -18,6 +18,7 @@ declare const _default: <From extends Record<PropertyKey, any>, Name extends Dee
|
|
|
18
18
|
}>) => import("vue").VNode & {
|
|
19
19
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
20
|
};
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
21
22
|
export default _default;
|
|
22
23
|
type __VLS_PrettifyLocal<T> = {
|
|
23
24
|
[K in keyof T as K]: T[K];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import type { OmegaFieldInternalApi } from "./InputProps";
|
|
3
3
|
import type { FieldValidators, MetaRecord, NestedKeyOf, TypeOverride } from "./OmegaFormStuff";
|
|
4
|
-
declare const
|
|
5
|
-
props: __VLS_PrettifyLocal<
|
|
4
|
+
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_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<{
|
|
6
6
|
field: OmegaFieldInternalApi<From, Name>;
|
|
7
7
|
meta: MetaRecord<From>[NestedKeyOf<From>];
|
|
8
8
|
label: string;
|
|
@@ -12,8 +12,8 @@ declare const _default: <From extends Record<PropertyKey, any>, Name extends Dee
|
|
|
12
12
|
}[];
|
|
13
13
|
type?: TypeOverride;
|
|
14
14
|
validators?: FieldValidators<From>;
|
|
15
|
-
}
|
|
16
|
-
expose(exposed:
|
|
15
|
+
}> & import("vue").PublicProps;
|
|
16
|
+
expose: (exposed: {}) => void;
|
|
17
17
|
attrs: any;
|
|
18
18
|
slots: {
|
|
19
19
|
default?: (props: {
|
|
@@ -41,6 +41,7 @@ declare const _default: <From extends Record<PropertyKey, any>, Name extends Dee
|
|
|
41
41
|
}>) => import("vue").VNode & {
|
|
42
42
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
43
43
|
};
|
|
44
|
+
declare const _default: typeof __VLS_export;
|
|
44
45
|
export default _default;
|
|
45
46
|
type __VLS_PrettifyLocal<T> = {
|
|
46
47
|
[K in keyof T as K]: T[K];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type DefaultInputProps, type OmegaFormState } from "./OmegaFormStuff";
|
|
2
2
|
import { type OmegaFormReturn } from "./useOmegaForm";
|
|
3
|
-
declare const
|
|
4
|
-
props: __VLS_PrettifyLocal<
|
|
3
|
+
declare const __VLS_export: <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, K extends keyof OmegaFormState<From, To> = keyof OmegaFormState<From, To>, Props = DefaultInputProps<From>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<{
|
|
5
5
|
form: OmegaFormReturn<From, To, Props>;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
subscribe?: K[];
|
|
8
|
-
}
|
|
9
|
-
expose(exposed:
|
|
8
|
+
}> & import("vue").PublicProps;
|
|
9
|
+
expose: (exposed: {}) => void;
|
|
10
10
|
attrs: any;
|
|
11
11
|
slots: {
|
|
12
12
|
default(props: {
|
|
@@ -17,6 +17,7 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
17
17
|
}>) => import("vue").VNode & {
|
|
18
18
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
19
|
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
20
21
|
export default _default;
|
|
21
22
|
type __VLS_PrettifyLocal<T> = {
|
|
22
23
|
[K in keyof T as K]: T[K];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as F, computed as
|
|
1
|
+
import { defineComponent as F, computed as i, onMounted as M, provide as P, createBlock as c, openBlock as s, resolveDynamicComponent as p, withCtx as g, renderSlot as o, createElementBlock as k, normalizeProps as l, guardReactiveProps as u, Fragment as A, renderList as b, mergeProps as B } from "vue";
|
|
2
2
|
const N = /* @__PURE__ */ F({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "OmegaArray",
|
|
@@ -8,8 +8,8 @@ const N = /* @__PURE__ */ F({
|
|
|
8
8
|
defaultItems: {},
|
|
9
9
|
items: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const a =
|
|
11
|
+
setup(n) {
|
|
12
|
+
const a = n, y = a.form.useStore((e) => e.values), d = i(() => {
|
|
13
13
|
const e = a.name.replace(/\[/g, ".").replace(/\]/g, "");
|
|
14
14
|
try {
|
|
15
15
|
return e.split(".").reduce((r, t) => r && r[t], y.value);
|
|
@@ -18,34 +18,34 @@ const N = /* @__PURE__ */ F({
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
M(async () => {
|
|
21
|
-
a.defaultItems && !
|
|
21
|
+
a.defaultItems && !d.value && a.form.setFieldValue(a.name, a.defaultItems);
|
|
22
22
|
});
|
|
23
|
-
const $ =
|
|
23
|
+
const $ = i(() => (r) => {
|
|
24
24
|
const t = r.replace(/\[\d+\]/g, "");
|
|
25
25
|
return a.form.meta[t];
|
|
26
26
|
});
|
|
27
|
-
return P("getMetaFromArray", $), (e, r) => (
|
|
28
|
-
default:
|
|
29
|
-
o(e.$slots, "pre-array",
|
|
30
|
-
(
|
|
31
|
-
key: `${
|
|
27
|
+
return P("getMetaFromArray", $), (e, r) => (s(), c(p(n.form.Field), { name: n.name }, {
|
|
28
|
+
default: g(({ field: t, state: f }) => [
|
|
29
|
+
o(e.$slots, "pre-array", l(u({ field: t, state: f }))),
|
|
30
|
+
(s(!0), k(A, null, b(d.value, (C, m) => (s(), c(p(n.form.Field), {
|
|
31
|
+
key: `${n.name}[${Number(m)}]`,
|
|
32
32
|
name: (
|
|
33
33
|
// eslint-disable-next-line
|
|
34
|
-
`${
|
|
34
|
+
`${n.name}[${Number(m)}]`
|
|
35
35
|
)
|
|
36
36
|
}, {
|
|
37
|
-
default:
|
|
37
|
+
default: g(({ field: v, state: h }) => [
|
|
38
38
|
o(e.$slots, "default", B({ ref_for: !0 }, {
|
|
39
39
|
subField: v,
|
|
40
40
|
subState: h,
|
|
41
|
-
index: Number(
|
|
41
|
+
index: Number(m),
|
|
42
42
|
field: t
|
|
43
43
|
}))
|
|
44
44
|
]),
|
|
45
45
|
_: 2
|
|
46
46
|
}, 1032, ["name"]))), 128)),
|
|
47
|
-
o(e.$slots, "post-array",
|
|
48
|
-
o(e.$slots, "field",
|
|
47
|
+
o(e.$slots, "post-array", l(u({ field: t, state: f }))),
|
|
48
|
+
o(e.$slots, "field", l(u({ field: t })))
|
|
49
49
|
]),
|
|
50
50
|
_: 3
|
|
51
51
|
}, 8, ["name"]));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Order as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as O, computed as j, createElementBlock as M, openBlock as _, Fragment as E, renderList as A, renderSlot as F, createVNode as g, unref as h, mergeProps as k } from "vue";
|
|
2
|
+
import { Order as l, pipe as v, Array as u } from "effect-app";
|
|
3
|
+
const I = /* @__PURE__ */ O({
|
|
4
4
|
__name: "OmegaAutoGen",
|
|
5
5
|
props: {
|
|
6
6
|
form: {},
|
|
@@ -11,63 +11,60 @@ const B = /* @__PURE__ */ _({
|
|
|
11
11
|
order: {},
|
|
12
12
|
sort: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
Object.entries(r).map(([t,
|
|
17
|
-
),
|
|
18
|
-
Object.entries(r).filter(([t,
|
|
19
|
-
),
|
|
20
|
-
(t, [
|
|
21
|
-
const
|
|
22
|
-
return
|
|
14
|
+
setup(i) {
|
|
15
|
+
const p = (e) => (r) => Object.fromEntries(
|
|
16
|
+
Object.entries(r).map(([t, o]) => [t, e(o, t)])
|
|
17
|
+
), a = (e) => (r) => Object.fromEntries(
|
|
18
|
+
Object.entries(r).filter(([t, o]) => e(o, t))
|
|
19
|
+
), m = (e) => (r) => Object.entries(r).reduce(
|
|
20
|
+
(t, [o, c]) => {
|
|
21
|
+
const s = e(c, o);
|
|
22
|
+
return s !== !1 && (t[o] = s), t;
|
|
23
23
|
},
|
|
24
24
|
{}
|
|
25
|
-
),
|
|
25
|
+
), n = i, f = (e, r) => {
|
|
26
26
|
const t = r?.indexOf(e) ?? -1;
|
|
27
27
|
return t === -1 ? Number.MAX_SAFE_INTEGER : t;
|
|
28
|
-
}, d =
|
|
29
|
-
|
|
30
|
-
(e) => f(e.name,
|
|
31
|
-
), b =
|
|
32
|
-
() =>
|
|
33
|
-
|
|
28
|
+
}, d = l.mapInput(
|
|
29
|
+
l.number,
|
|
30
|
+
(e) => f(e.name, n.order || [])
|
|
31
|
+
), b = j(
|
|
32
|
+
() => v(
|
|
33
|
+
n.form.meta,
|
|
34
34
|
// include / exclude
|
|
35
|
-
|
|
36
|
-
(e, r) =>
|
|
35
|
+
a(
|
|
36
|
+
(e, r) => n.pick ? n.pick.includes(r) && !n.omit?.includes(r) : !n.omit?.includes(r)
|
|
37
37
|
),
|
|
38
38
|
(e) => e,
|
|
39
39
|
// labelMap and adding name
|
|
40
|
-
|
|
40
|
+
p((e, r) => ({
|
|
41
41
|
name: r,
|
|
42
|
-
label:
|
|
42
|
+
label: n.labelMap?.(r) || r,
|
|
43
43
|
...e
|
|
44
44
|
})),
|
|
45
45
|
// filterMap
|
|
46
|
-
|
|
47
|
-
const r =
|
|
46
|
+
n.filterMap ? m((e) => {
|
|
47
|
+
const r = n.filterMap?.(e.name, e);
|
|
48
48
|
return r === void 0 || r === !0 ? e : r;
|
|
49
49
|
}) : (e) => e,
|
|
50
50
|
// transform to array
|
|
51
51
|
(e) => Object.values(e),
|
|
52
52
|
// order
|
|
53
|
-
|
|
53
|
+
u.sort(d),
|
|
54
54
|
// sort
|
|
55
|
-
|
|
55
|
+
n.sort ? u.sort(n.sort) : (e) => e
|
|
56
56
|
)
|
|
57
57
|
);
|
|
58
|
-
return (e, r) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
67
|
-
])), 256);
|
|
68
|
-
};
|
|
58
|
+
return (e, r) => (_(!0), M(E, null, A(b.value, ({ name: t, label: o, ...c }) => F(e.$slots, "default", {
|
|
59
|
+
child: { name: t, label: o, ...c }
|
|
60
|
+
}, () => [
|
|
61
|
+
g(h(i.form).Input, k({
|
|
62
|
+
name: t,
|
|
63
|
+
label: o
|
|
64
|
+
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
65
|
+
])), 256));
|
|
69
66
|
}
|
|
70
67
|
});
|
|
71
68
|
export {
|
|
72
|
-
|
|
69
|
+
I as default
|
|
73
70
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, resolveComponent as o, createElementBlock as m, openBlock as r, createBlock as i, createCommentVNode as u, resolveDynamicComponent as d, mergeProps as a, unref as f, withCtx as h, Fragment as c, renderList as V } from "vue";
|
|
2
2
|
import { getInputType as C } from "./vue-components.es8.js";
|
|
3
|
-
const
|
|
3
|
+
const U = /* @__PURE__ */ b({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "OmegaInputVuetify",
|
|
6
6
|
props: {
|
|
@@ -8,15 +8,15 @@ const $ = /* @__PURE__ */ y({
|
|
|
8
8
|
vuetifyValue: {}
|
|
9
9
|
},
|
|
10
10
|
emits: ["focus", "blur"],
|
|
11
|
-
setup(
|
|
12
|
-
return (
|
|
13
|
-
const
|
|
14
|
-
return
|
|
11
|
+
setup(e) {
|
|
12
|
+
return (l, n) => {
|
|
13
|
+
const s = o("v-text-field"), P = o("v-textarea"), p = o("v-radio"), g = o("v-radio-group"), v = o("v-select"), y = o("v-autocomplete");
|
|
14
|
+
return r(), m("div", {
|
|
15
15
|
class: "omega-input",
|
|
16
|
-
onFocusout:
|
|
17
|
-
onFocusin:
|
|
16
|
+
onFocusout: n[4] || (n[4] = (t) => l.$emit("blur", t)),
|
|
17
|
+
onFocusin: n[5] || (n[5] = (t) => l.$emit("focus", t))
|
|
18
18
|
}, [
|
|
19
|
-
e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (
|
|
19
|
+
e.inputProps.type === "boolean" || e.inputProps.type === "switch" ? (r(), i(d(e.inputProps.type === "boolean" ? "v-checkbox" : "v-switch"), a({
|
|
20
20
|
key: 0,
|
|
21
21
|
id: e.inputProps.id,
|
|
22
22
|
name: e.inputProps.name,
|
|
@@ -24,26 +24,26 @@ const $ = /* @__PURE__ */ y({
|
|
|
24
24
|
"error-messages": e.inputProps.errorMessages,
|
|
25
25
|
error: e.inputProps.error,
|
|
26
26
|
ripple: ""
|
|
27
|
-
},
|
|
27
|
+
}, l.$attrs, {
|
|
28
28
|
"model-value": e.vuetifyValue,
|
|
29
|
-
onChange:
|
|
30
|
-
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) :
|
|
31
|
-
e.inputProps.type === "email" || e.inputProps.type === "string" || e.inputProps.type === "password" ? (
|
|
29
|
+
onChange: n[0] || (n[0] = (t) => e.inputProps.field.handleChange(t.target.checked))
|
|
30
|
+
}), null, 16, ["id", "name", "label", "error-messages", "error", "model-value"])) : u("", !0),
|
|
31
|
+
e.inputProps.type === "email" || e.inputProps.type === "string" || e.inputProps.type === "password" ? (r(), i(s, a({
|
|
32
32
|
key: 1,
|
|
33
33
|
id: e.inputProps.id,
|
|
34
34
|
required: e.inputProps.required,
|
|
35
35
|
"min-length": e.inputProps.minLength,
|
|
36
36
|
"max-length": e.inputProps.maxLength,
|
|
37
|
-
type:
|
|
37
|
+
type: f(C)(e.inputProps.type),
|
|
38
38
|
name: e.inputProps.name,
|
|
39
39
|
label: e.inputProps.label,
|
|
40
40
|
"error-messages": e.inputProps.errorMessages,
|
|
41
41
|
error: e.inputProps.error
|
|
42
|
-
},
|
|
42
|
+
}, l.$attrs, {
|
|
43
43
|
"model-value": e.vuetifyValue,
|
|
44
44
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
45
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) :
|
|
46
|
-
e.inputProps.type === "text" ? (
|
|
45
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "type", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : u("", !0),
|
|
46
|
+
e.inputProps.type === "text" ? (r(), i(P, a({
|
|
47
47
|
key: 2,
|
|
48
48
|
id: e.inputProps.id,
|
|
49
49
|
required: e.inputProps.required,
|
|
@@ -53,11 +53,11 @@ const $ = /* @__PURE__ */ y({
|
|
|
53
53
|
label: e.inputProps.label,
|
|
54
54
|
"error-messages": e.inputProps.errorMessages,
|
|
55
55
|
error: e.inputProps.error
|
|
56
|
-
},
|
|
56
|
+
}, l.$attrs, {
|
|
57
57
|
"model-value": e.vuetifyValue,
|
|
58
58
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
59
|
-
}), null, 16, ["id", "required", "min-length", "max-length", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) :
|
|
60
|
-
e.inputProps.type === "number" || e.inputProps.type === "range" ? (
|
|
59
|
+
}), null, 16, ["id", "required", "min-length", "max-length", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : u("", !0),
|
|
60
|
+
e.inputProps.type === "number" || e.inputProps.type === "range" ? (r(), i(d(e.inputProps.type === "range" ? "v-slider" : "v-text-field"), a({
|
|
61
61
|
key: 3,
|
|
62
62
|
id: e.inputProps.id,
|
|
63
63
|
required: e.inputProps.required,
|
|
@@ -68,33 +68,33 @@ const $ = /* @__PURE__ */ y({
|
|
|
68
68
|
label: e.inputProps.label,
|
|
69
69
|
"error-messages": e.inputProps.errorMessages,
|
|
70
70
|
error: e.inputProps.error
|
|
71
|
-
},
|
|
71
|
+
}, l.$attrs, {
|
|
72
72
|
"model-value": e.vuetifyValue,
|
|
73
|
-
"onUpdate:modelValue":
|
|
74
|
-
|
|
73
|
+
"onUpdate:modelValue": n[1] || (n[1] = (t) => {
|
|
74
|
+
t || t === 0 ? e.inputProps.field.handleChange(Number(t)) : e.inputProps.field.handleChange(void 0);
|
|
75
75
|
})
|
|
76
|
-
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) :
|
|
77
|
-
e.inputProps.type === "radio" ? (
|
|
76
|
+
}), null, 16, ["id", "required", "min", "max", "type", "name", "label", "error-messages", "error", "model-value"])) : u("", !0),
|
|
77
|
+
e.inputProps.type === "radio" ? (r(), i(g, a({
|
|
78
78
|
key: 4,
|
|
79
79
|
id: e.inputProps.id,
|
|
80
80
|
name: e.inputProps.name,
|
|
81
81
|
label: e.inputProps.label,
|
|
82
82
|
"error-messages": e.inputProps.errorMessages,
|
|
83
83
|
error: e.inputProps.error
|
|
84
|
-
},
|
|
84
|
+
}, l.$attrs, {
|
|
85
85
|
"model-value": e.vuetifyValue,
|
|
86
86
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
87
87
|
}), {
|
|
88
|
-
default:
|
|
89
|
-
(
|
|
90
|
-
key:
|
|
91
|
-
label:
|
|
92
|
-
value:
|
|
88
|
+
default: h(() => [
|
|
89
|
+
(r(!0), m(c, null, V(e.inputProps.options, (t) => (r(), i(p, {
|
|
90
|
+
key: t.value,
|
|
91
|
+
label: t.title,
|
|
92
|
+
value: t.value
|
|
93
93
|
}, null, 8, ["label", "value"]))), 128))
|
|
94
94
|
]),
|
|
95
95
|
_: 1
|
|
96
|
-
}, 16, ["id", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) :
|
|
97
|
-
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (
|
|
96
|
+
}, 16, ["id", "name", "label", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : u("", !0),
|
|
97
|
+
e.inputProps.type === "select" || e.inputProps.type === "multiple" ? (r(), i(v, a({
|
|
98
98
|
key: 5,
|
|
99
99
|
id: e.inputProps.id,
|
|
100
100
|
clearable: e.inputProps.type === "select",
|
|
@@ -106,12 +106,12 @@ const $ = /* @__PURE__ */ y({
|
|
|
106
106
|
items: e.inputProps.options,
|
|
107
107
|
"error-messages": e.inputProps.errorMessages,
|
|
108
108
|
error: e.inputProps.error
|
|
109
|
-
},
|
|
109
|
+
}, l.$attrs, {
|
|
110
110
|
"model-value": e.vuetifyValue,
|
|
111
|
-
onClear:
|
|
111
|
+
onClear: n[2] || (n[2] = (t) => e.inputProps.field.handleChange(void 0)),
|
|
112
112
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
113
|
-
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) :
|
|
114
|
-
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (
|
|
113
|
+
}), null, 16, ["id", "clearable", "required", "multiple", "chips", "name", "label", "items", "error-messages", "error", "model-value", "onUpdate:modelValue"])) : u("", !0),
|
|
114
|
+
e.inputProps.type === "autocomplete" || e.inputProps.type === "autocompletemultiple" ? (r(), i(y, a({
|
|
115
115
|
key: 6,
|
|
116
116
|
id: e.inputProps.id,
|
|
117
117
|
clearable: e.inputProps.type === "autocomplete",
|
|
@@ -123,15 +123,15 @@ const $ = /* @__PURE__ */ y({
|
|
|
123
123
|
"error-messages": e.inputProps.errorMessages,
|
|
124
124
|
error: e.inputProps.error,
|
|
125
125
|
chips: e.inputProps.type === "autocompletemultiple"
|
|
126
|
-
},
|
|
126
|
+
}, l.$attrs, {
|
|
127
127
|
"model-value": e.vuetifyValue,
|
|
128
|
-
onClear:
|
|
128
|
+
onClear: n[3] || (n[3] = (t) => e.inputProps.field.handleChange(void 0)),
|
|
129
129
|
"onUpdate:modelValue": e.inputProps.field.handleChange
|
|
130
|
-
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) :
|
|
130
|
+
}), null, 16, ["id", "clearable", "multiple", "required", "name", "label", "items", "error-messages", "error", "chips", "model-value", "onUpdate:modelValue"])) : u("", !0)
|
|
131
131
|
], 32);
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
export {
|
|
136
|
-
|
|
136
|
+
U as default
|
|
137
137
|
};
|