@effect-app/vue-components 0.15.23 → 0.15.24
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/InputProps.d.ts +3 -3
- package/dist/types/components/OmegaForm/OmegaArray.vue.d.ts +4 -4
- package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +4 -4
- package/dist/types/components/OmegaForm/OmegaErrors.vue.d.ts +2 -2
- package/dist/types/components/OmegaForm/OmegaErrorsContext.d.ts +1 -1
- package/dist/types/components/OmegaForm/OmegaFormInput.vue.d.ts +4 -4
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +4 -4
- package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +2 -2
- package/dist/types/components/OmegaForm/OmegaInputVuetify.vue.d.ts +3 -3
- package/dist/types/components/OmegaForm/OmegaInternalInput.vue.d.ts +4 -4
- package/dist/types/components/OmegaForm/OmegaWrapper.vue.d.ts +2 -2
- package/dist/types/components/OmegaForm/getOmegaStore.d.ts +1 -1
- package/dist/types/components/OmegaForm/index.d.ts +7 -7
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +3 -3
- package/dist/vue-components.es.js +6 -6
- package/dist/vue-components.es10.js +1 -3
- package/dist/vue-components.es11.js +5 -5
- package/dist/vue-components.es12.js +5 -5
- package/dist/vue-components.es13.js +2 -111
- package/dist/vue-components.es14.js +4 -0
- package/dist/vue-components.es15.js +88 -7
- package/dist/vue-components.es17.js +7 -2
- package/dist/vue-components.es18.js +2 -89
- package/dist/vue-components.es2.js +12 -12
- package/dist/vue-components.es20.js +111 -2
- package/dist/vue-components.es23.js +11 -90
- package/dist/vue-components.es24.js +90 -11
- package/dist/vue-components.es26.js +1 -1
- package/dist/vue-components.es4.js +39 -38
- package/dist/vue-components.es5.js +66 -28
- package/dist/vue-components.es6.js +28 -66
- package/dist/vue-components.es7.js +39 -40
- package/dist/vue-components.es9.js +7 -9
- package/package.json +20 -17
- package/src/components/OmegaForm/InputProps.ts +23 -35
- package/src/components/OmegaForm/OmegaArray.vue +24 -14
- package/src/components/OmegaForm/OmegaAutoGen.vue +38 -30
- package/src/components/OmegaForm/OmegaErrors.vue +25 -14
- package/src/components/OmegaForm/OmegaErrorsContext.ts +5 -13
- package/src/components/OmegaForm/OmegaFormInput.vue +17 -10
- package/src/components/OmegaForm/OmegaFormStuff.ts +141 -136
- package/src/components/OmegaForm/OmegaInput.vue +13 -10
- package/src/components/OmegaForm/OmegaInputVuetify.vue +18 -15
- package/src/components/OmegaForm/OmegaInternalInput.vue +34 -34
- package/src/components/OmegaForm/OmegaWrapper.vue +60 -58
- package/src/components/OmegaForm/getOmegaStore.ts +6 -7
- package/src/components/OmegaForm/index.ts +7 -7
- package/src/components/OmegaForm/useOmegaForm.ts +74 -76
- package/src/utils/index.ts +2 -2
- package/dist/vue-components.es16.js +0 -4
- /package/dist/{vue-components.es21.js → vue-components.es19.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type OmegaFieldInternalApi<From extends Record<PropertyKey, any>, TName extends DeepKeys<From>> = FieldApi<From, TName, DeepValue<From, TName>, FieldValidateOrFn<From, TName, DeepValue<From, TName>> | undefined, StandardSchemaV1<DeepValue<From, TName>, unknown> | FieldValidateFn<From, TName>, StandardSchemaV1<DeepValue<From, TName>, unknown> | FieldValidateAsyncFn<From, TName>, FieldValidateOrFn<From, TName, DeepValue<From, TName>>, FieldAsyncValidateOrFn<From, TName, DeepValue<From, TName>>, FieldValidateOrFn<From, TName, DeepValue<From, TName>> | undefined, FieldAsyncValidateOrFn<From, TName, DeepValue<From, TName>> | undefined, FormValidateOrFn<From> | undefined, FormValidateOrFn<From> | undefined, any, // FormAsyncValidateOrFn<From>,
|
|
3
|
-
// FormAsyncValidateOrFn<From>,
|
|
1
|
+
import type { DeepKeys, DeepValue, FieldApi, FieldAsyncValidateOrFn, FieldValidateAsyncFn, FieldValidateFn, FieldValidateOrFn, FormAsyncValidateOrFn, FormValidateOrFn, StandardSchemaV1 } from "@tanstack/vue-form";
|
|
2
|
+
export type OmegaFieldInternalApi<From extends Record<PropertyKey, any>, TName extends DeepKeys<From>> = FieldApi<From, TName, DeepValue<From, TName>, FieldValidateOrFn<From, TName, DeepValue<From, TName>> | undefined, StandardSchemaV1<DeepValue<From, TName>, unknown> | FieldValidateFn<From, TName>, StandardSchemaV1<DeepValue<From, TName>, unknown> | FieldValidateAsyncFn<From, TName>, FieldValidateOrFn<From, TName, DeepValue<From, TName>>, FieldAsyncValidateOrFn<From, TName, DeepValue<From, TName>>, FieldValidateOrFn<From, TName, DeepValue<From, TName>> | undefined, FieldAsyncValidateOrFn<From, TName, DeepValue<From, TName>> | undefined, FormValidateOrFn<From> | undefined, FormValidateOrFn<From> | undefined, any, // FormAsyncValidateOrFn<From>,
|
|
3
|
+
// FormAsyncValidateOrFn<From>,
|
|
4
4
|
FormValidateOrFn<From> | undefined, FormAsyncValidateOrFn<From> | undefined, FormValidateOrFn<From> | undefined, FormAsyncValidateOrFn<From> | undefined, FormAsyncValidateOrFn<From> | undefined, FormAsyncValidateOrFn<From> | undefined>;
|
|
5
5
|
export type InputProps<From extends Record<PropertyKey, any>, TName extends DeepKeys<From>> = {
|
|
6
6
|
id: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { type DeepKeys, type DeepValue } from "@tanstack/vue-form";
|
|
1
2
|
import { type OmegaInputProps } from "./OmegaFormStuff";
|
|
2
|
-
import { type DeepValue, type DeepKeys } from "@tanstack/vue-form";
|
|
3
3
|
declare const _default: <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<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & (Omit<OmegaInputProps<From, To>, "label" | "type" | "
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & (Omit<OmegaInputProps<From, To>, "label" | "type" | "options" | "validators" | "items"> & {
|
|
5
5
|
defaultItems?: DeepValue<To, DeepKeys<To>>;
|
|
6
6
|
items?: "please use `defaultItems` instead";
|
|
7
|
-
}) &
|
|
7
|
+
}) & {}> & import("vue").PublicProps;
|
|
8
8
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
9
9
|
attrs: any;
|
|
10
10
|
slots: {
|
|
@@ -35,5 +35,5 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
35
35
|
};
|
|
36
36
|
export default _default;
|
|
37
37
|
type __VLS_PrettifyLocal<T> = {
|
|
38
|
-
[K in keyof T]: T[K];
|
|
38
|
+
[K in keyof T as K]: T[K];
|
|
39
39
|
} & {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import { Order } from "effect-app";
|
|
3
|
-
import {
|
|
3
|
+
import { type OmegaInputProps } from "./OmegaFormStuff";
|
|
4
4
|
export type OmegaAutoGenMeta<From extends Record<PropertyKey, string>, To extends Record<PropertyKey, string>> = Omit<OmegaInputProps<From, To>, "form">;
|
|
5
5
|
declare const _default: <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<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
@@ -11,7 +11,7 @@ declare const _default: <From extends Record<PropertyKey, string>, To extends Re
|
|
|
11
11
|
filterMap?: <M extends OmegaAutoGenMeta<From, To>>(key: DeepKeys<From>, meta: M) => boolean | M;
|
|
12
12
|
order?: DeepKeys<From>[];
|
|
13
13
|
sort?: Order.Order<OmegaAutoGenMeta<From, To>>;
|
|
14
|
-
} &
|
|
14
|
+
} & {}> & import("vue").PublicProps;
|
|
15
15
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
16
16
|
attrs: any;
|
|
17
17
|
slots: {
|
|
@@ -25,5 +25,5 @@ declare const _default: <From extends Record<PropertyKey, string>, To extends Re
|
|
|
25
25
|
};
|
|
26
26
|
export default _default;
|
|
27
27
|
type __VLS_PrettifyLocal<T> = {
|
|
28
|
-
[K in keyof T]: T[K];
|
|
28
|
+
[K in keyof T as K]: T[K];
|
|
29
29
|
} & {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare var
|
|
1
|
+
declare var __VLS_6: {
|
|
2
2
|
errors: readonly import("./OmegaFormStuff").OmegaError[];
|
|
3
3
|
showedGeneralErrors: string[];
|
|
4
4
|
};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
9
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { StandardSchemaV1Issue } from "@tanstack/vue-form";
|
|
1
2
|
import { type InjectionKey, type Ref } from "vue";
|
|
2
3
|
import { type OmegaError, type ShowErrorsOn } from "./OmegaFormStuff";
|
|
3
|
-
import type { StandardSchemaV1Issue } from "@tanstack/vue-form";
|
|
4
4
|
export declare const OmegaErrorsKey: InjectionKey<{
|
|
5
5
|
errors: Ref<readonly OmegaError[]>;
|
|
6
6
|
addError: (error: OmegaError) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import type { InputProps } from "./InputProps";
|
|
3
|
-
import {
|
|
3
|
+
import type { FieldValidators, TypeOverride } from "./OmegaFormStuff";
|
|
4
4
|
declare const _default: <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
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
6
6
|
name: Name;
|
|
@@ -11,7 +11,7 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
11
11
|
value: string;
|
|
12
12
|
}[];
|
|
13
13
|
type?: TypeOverride;
|
|
14
|
-
} &
|
|
14
|
+
} & {}> & import("vue").PublicProps;
|
|
15
15
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
16
16
|
attrs: any;
|
|
17
17
|
slots: {
|
|
@@ -23,5 +23,5 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
23
23
|
};
|
|
24
24
|
export default _default;
|
|
25
25
|
type __VLS_PrettifyLocal<T> = {
|
|
26
|
-
[K in keyof T]: T[K];
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
27
|
} & {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { type Effect, S } from "effect-app";
|
|
2
|
+
import { type DeepKeys, type FieldAsyncValidateOrFn, type FieldValidateOrFn, type FormApi, type FormAsyncValidateOrFn, type FormOptions, type FormState, type FormValidateOrFn, type StandardSchemaV1, type VueFormApi } from "@tanstack/vue-form";
|
|
3
|
+
import { type OmegaFieldInternalApi } from "./InputProps";
|
|
4
|
+
import { type OmegaFormReturn } from "./useOmegaForm";
|
|
5
5
|
export type ShowErrorsOn = "onChange" | "onBlur" | "onSubmit";
|
|
6
6
|
export type OmegaInputProps<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>> = {
|
|
7
7
|
form: OmegaFormReturn<From, To> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type OmegaInputProps } from "./OmegaFormStuff";
|
|
2
2
|
declare const _default: <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<{
|
|
3
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & OmegaInputProps<From, To> &
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & OmegaInputProps<From, To> & {}> & import("vue").PublicProps;
|
|
4
4
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
5
5
|
attrs: any;
|
|
6
6
|
slots: {
|
|
@@ -31,5 +31,5 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
31
31
|
};
|
|
32
32
|
export default _default;
|
|
33
33
|
type __VLS_PrettifyLocal<T> = {
|
|
34
|
-
[K in keyof T]: T[K];
|
|
34
|
+
[K in keyof T as K]: T[K];
|
|
35
35
|
} & {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeepKeys } from "@tanstack/vue-form";
|
|
1
|
+
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import type { InputProps } from "./InputProps";
|
|
3
3
|
declare const _default: <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
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
@@ -7,7 +7,7 @@ declare const _default: <From extends Record<PropertyKey, any>, Name extends Dee
|
|
|
7
7
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onFocus"> & {
|
|
8
8
|
inputProps: InputProps<From, Name>;
|
|
9
9
|
vuetifyValue: unknown;
|
|
10
|
-
} &
|
|
10
|
+
} & {}> & import("vue").PublicProps;
|
|
11
11
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: {};
|
|
@@ -20,5 +20,5 @@ declare const _default: <From extends Record<PropertyKey, any>, Name extends Dee
|
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
22
22
|
type __VLS_PrettifyLocal<T> = {
|
|
23
|
-
[K in keyof T]: T[K];
|
|
23
|
+
[K in keyof T as K]: T[K];
|
|
24
24
|
} & {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DeepKeys } from "@tanstack/vue-form";
|
|
2
|
-
import type { FieldValidators, MetaRecord, NestedKeyOf, TypeOverride } from "./OmegaFormStuff";
|
|
1
|
+
import { type DeepKeys } from "@tanstack/vue-form";
|
|
3
2
|
import type { OmegaFieldInternalApi } from "./InputProps";
|
|
3
|
+
import type { FieldValidators, MetaRecord, NestedKeyOf, TypeOverride } from "./OmegaFormStuff";
|
|
4
4
|
declare const _default: <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
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
6
6
|
field: OmegaFieldInternalApi<From, Name>;
|
|
@@ -12,7 +12,7 @@ declare const _default: <From extends Record<PropertyKey, any>, Name extends Dee
|
|
|
12
12
|
}[];
|
|
13
13
|
type?: TypeOverride;
|
|
14
14
|
validators?: FieldValidators<From>;
|
|
15
|
-
} &
|
|
15
|
+
} & {}> & import("vue").PublicProps;
|
|
16
16
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
17
17
|
attrs: any;
|
|
18
18
|
slots: {
|
|
@@ -43,5 +43,5 @@ declare const _default: <From extends Record<PropertyKey, any>, Name extends Dee
|
|
|
43
43
|
};
|
|
44
44
|
export default _default;
|
|
45
45
|
type __VLS_PrettifyLocal<T> = {
|
|
46
|
-
[K in keyof T]: T[K];
|
|
46
|
+
[K in keyof T as K]: T[K];
|
|
47
47
|
} & {};
|
|
@@ -18,7 +18,7 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
18
18
|
} | {
|
|
19
19
|
form?: undefined;
|
|
20
20
|
schema: S.Schema<To, From, never>;
|
|
21
|
-
}))) &
|
|
21
|
+
}))) & {}> & import("vue").PublicProps;
|
|
22
22
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
23
23
|
attrs: any;
|
|
24
24
|
slots: {
|
|
@@ -37,5 +37,5 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
37
37
|
};
|
|
38
38
|
export default _default;
|
|
39
39
|
type __VLS_PrettifyLocal<T> = {
|
|
40
|
-
[K in keyof T]: T[K];
|
|
40
|
+
[K in keyof T as K]: T[K];
|
|
41
41
|
} & {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
-
import type {
|
|
2
|
+
import type { OmegaFormApi, OmegaFormState } from "./OmegaFormStuff";
|
|
3
3
|
export declare function getOmegaStore<To, From, K extends keyof OmegaFormState<To, From> = keyof OmegaFormState<To, From>>(form: OmegaFormApi<To, From>, subscribe?: K[]): Ref<K[] extends undefined[] ? Record<string, never> : Pick<OmegaFormState<To, From>, K>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { default as OmegaForm } from "./OmegaWrapper.vue";
|
|
2
|
-
import { default as OmegaInput } from "./OmegaInput.vue";
|
|
3
|
-
import { default as OmegaFormInput } from "./OmegaFormInput.vue";
|
|
4
|
-
import { default as OmegaErrors } from "./OmegaErrors.vue";
|
|
5
|
-
import { default as OmegaAutoGen } from "./OmegaAutoGen.vue";
|
|
6
1
|
import { default as OmegaArray } from "./OmegaArray.vue";
|
|
2
|
+
import { default as OmegaAutoGen } from "./OmegaAutoGen.vue";
|
|
3
|
+
import { default as OmegaErrors } from "./OmegaErrors.vue";
|
|
4
|
+
import { default as OmegaFormInput } from "./OmegaFormInput.vue";
|
|
5
|
+
import { default as OmegaInput } from "./OmegaInput.vue";
|
|
6
|
+
import { default as OmegaForm } from "./OmegaWrapper.vue";
|
|
7
7
|
export * as OmegaErrorsContext from "./OmegaErrorsContext";
|
|
8
8
|
export * from "./OmegaFormStuff";
|
|
9
|
-
export { useOmegaForm, type OmegaFormReturn } from "./useOmegaForm";
|
|
10
9
|
export { default } from "./OmegaWrapper.vue";
|
|
11
|
-
export {
|
|
10
|
+
export { type OmegaFormReturn, useOmegaForm } from "./useOmegaForm";
|
|
11
|
+
export { OmegaArray, OmegaAutoGen, OmegaErrors, OmegaForm, OmegaFormInput, OmegaInput };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DeepKeys } from "@tanstack/vue-form";
|
|
1
|
+
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import { S } from "effect-app";
|
|
3
|
-
import { type NestedKeyOf, type FilterItems, type FormProps, type MetaRecord, type OmegaFormApi, TypeOverride, FieldValidators } from "./OmegaFormStuff";
|
|
4
3
|
import { type InjectionKey } from "vue";
|
|
5
|
-
import { InputProps } from "./InputProps";
|
|
4
|
+
import { type InputProps } from "./InputProps";
|
|
5
|
+
import { type FieldValidators, type FilterItems, type FormProps, type MetaRecord, type NestedKeyOf, type OmegaFormApi, type TypeOverride } from "./OmegaFormStuff";
|
|
6
6
|
type keysRule<T> = {
|
|
7
7
|
keys?: NestedKeyOf<T>[];
|
|
8
8
|
banKeys?: "You should only use one of banKeys or keys, not both, moron";
|
|
@@ -18,13 +18,13 @@ function a(r) {
|
|
|
18
18
|
}
|
|
19
19
|
const n = { install: a };
|
|
20
20
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
c as OmegaArray,
|
|
22
|
+
x as OmegaAutoGen,
|
|
23
|
+
k as OmegaErrors,
|
|
24
24
|
m as OmegaErrorsContext,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
w as OmegaForm,
|
|
26
|
+
g as OmegaFormInput,
|
|
27
|
+
F as OmegaInput,
|
|
28
28
|
S as createMeta,
|
|
29
29
|
n as default,
|
|
30
30
|
b as duplicateSchema,
|
|
@@ -226,9 +226,7 @@ const _ = n.NonEmptyArray(n.String), N = (e) => n.AST.isUnion(e) && e.types.find
|
|
|
226
226
|
c.liftPredicate((p) => p._tag === "Refinement" && "filter" in p),
|
|
227
227
|
c.flatMap((p) => n.AST.getJSONSchemaAnnotation(p)),
|
|
228
228
|
c.filter((p) => "items" in p),
|
|
229
|
-
c.filterMap(
|
|
230
|
-
({ items: p }) => n.decodeUnknownOption(_)(p)
|
|
231
|
-
),
|
|
229
|
+
c.filterMap(({ items: p }) => n.decodeUnknownOption(_)(p)),
|
|
232
230
|
c.zipWith(
|
|
233
231
|
n.AST.getMessageAnnotation(e.ast),
|
|
234
232
|
(p, o) => ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import o from "./vue-components.
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");if(t.appendChild(document.createTextNode(".v-enter-from[data-v-3007fa74],.v-leave-to[data-v-3007fa74]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-3007fa74],.v-leave-active[data-v-3007fa74]{display:grid;transition:all .15s}.v-enter-to[data-v-3007fa74],.v-leave-from[data-v-3007fa74]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-3007fa74]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-3007fa74]{min-height:0}.error-list[data-v-3007fa74]{list-style-position:inside}div.error-list[data-v-3007fa74]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-3007fa74]{grid-template-columns:auto 1fr}.error-link[data-v-3007fa74]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-3007fa74]{grid-template-columns:1fr}.error-message[data-v-3007fa74]{grid-column:1 / -1}}.error-item[data-v-3007fa74]{display:contents}a[data-v-3007fa74]{min-width:min-content}.error-link[data-v-3007fa74]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),document.head.appendChild(t),window.customElements){const a=window.customElements.define;window.customElements.define=function(n,e){const i=e.prototype.connectedCallback;return e.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const r=document.createElement("style");r.appendChild(document.createTextNode(".v-enter-from[data-v-3007fa74],.v-leave-to[data-v-3007fa74]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-3007fa74],.v-leave-active[data-v-3007fa74]{display:grid;transition:all .15s}.v-enter-to[data-v-3007fa74],.v-leave-from[data-v-3007fa74]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-3007fa74]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-3007fa74]{min-height:0}.error-list[data-v-3007fa74]{list-style-position:inside}div.error-list[data-v-3007fa74]{container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;gap:1.5em;align-items:start}@container (max-width: 27.125rem){div.error-list[data-v-3007fa74]{grid-template-columns:auto 1fr}.error-link[data-v-3007fa74]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-3007fa74]{grid-template-columns:1fr}.error-message[data-v-3007fa74]{grid-column:1 / -1}}.error-item[data-v-3007fa74]{display:contents}a[data-v-3007fa74]{min-width:min-content}.error-link[data-v-3007fa74]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(r)}},a.call(window.customElements,n,e)}}}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
import o from "./vue-components.es15.js";
|
|
3
3
|
|
|
4
|
-
import r from "./vue-components.
|
|
5
|
-
const
|
|
4
|
+
import r from "./vue-components.es17.js";
|
|
5
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3007fa74"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
f as default
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import o from "./vue-components.
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-fd69dadb]{display:contents}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(i,t){const d=t.prototype.connectedCallback;return t.prototype.connectedCallback=function(){if(d&&d.call(this),this.shadowRoot){const o=document.createElement("style");o.appendChild(document.createTextNode("fieldset[data-v-fd69dadb]{display:contents}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,i,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import o from "./vue-components.es20.js";
|
|
3
3
|
|
|
4
|
-
import r from "./vue-components.
|
|
5
|
-
const
|
|
4
|
+
import r from "./vue-components.es17.js";
|
|
5
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fd69dadb"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
|
@@ -1,113 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useStore as g } from "@tanstack/vue-form";
|
|
3
|
-
import { getOmegaStore as B } from "./vue-components.es24.js";
|
|
4
|
-
import { provideOmegaErrors as C } from "./vue-components.es8.js";
|
|
5
|
-
import { useOmegaForm as I } from "./vue-components.es9.js";
|
|
6
|
-
const $ = ["disabled"], N = /* @__PURE__ */ w({
|
|
7
|
-
__name: "OmegaWrapper",
|
|
8
|
-
props: {
|
|
9
|
-
omegaConfig: {},
|
|
10
|
-
subscribe: {},
|
|
11
|
-
showErrorsOn: {},
|
|
12
|
-
defaultValues: {},
|
|
13
|
-
defaultState: {},
|
|
14
|
-
asyncAlways: { type: Boolean },
|
|
15
|
-
asyncDebounceMs: {},
|
|
16
|
-
validators: {},
|
|
17
|
-
onSubmitMeta: {},
|
|
18
|
-
onSubmitInvalid: { type: Function },
|
|
19
|
-
transform: {},
|
|
20
|
-
onSubmit: { type: Function },
|
|
21
|
-
form: {},
|
|
22
|
-
schema: {}
|
|
23
|
-
},
|
|
24
|
-
setup(O) {
|
|
25
|
-
const o = O, m = f(() => {
|
|
26
|
-
if (!(o.form || !o.schema))
|
|
27
|
-
return I(o.schema, o, o.omegaConfig);
|
|
28
|
-
}), t = f(() => o.form ?? m.value);
|
|
29
|
-
E(() => {
|
|
30
|
-
if (!o.form) return;
|
|
31
|
-
const e = Object.keys(o.form.options || {}), s = /* @__PURE__ */ new Set([
|
|
32
|
-
"omegaConfig",
|
|
33
|
-
"subscribe",
|
|
34
|
-
"showErrorsOn",
|
|
35
|
-
"asyncAlways",
|
|
36
|
-
"form",
|
|
37
|
-
"schema"
|
|
38
|
-
]), i = Object.fromEntries(
|
|
39
|
-
Object.entries(o).filter(
|
|
40
|
-
([a, u]) => !s.has(a) && u !== void 0
|
|
41
|
-
)
|
|
42
|
-
), r = Object.keys(i), n = e.filter(
|
|
43
|
-
(a) => r.includes(a) && i[a] !== void 0
|
|
44
|
-
);
|
|
45
|
-
n.length > 0 && console.warn(
|
|
46
|
-
`[OmegaWrapper] Overlapping keys found between form options and filtered props:
|
|
47
|
-
${n.join(
|
|
48
|
-
`,
|
|
49
|
-
`
|
|
50
|
-
)}.
|
|
51
|
-
Props will overwrite existing form options. This might indicate a configuration issue.`
|
|
52
|
-
);
|
|
53
|
-
const S = {
|
|
54
|
-
...t.value.options,
|
|
55
|
-
...i
|
|
56
|
-
};
|
|
57
|
-
t.value.options = Object.fromEntries(
|
|
58
|
-
// TODO
|
|
59
|
-
Object.entries(S).filter(
|
|
60
|
-
([a, u]) => u !== void 0
|
|
61
|
-
)
|
|
62
|
-
);
|
|
63
|
-
});
|
|
64
|
-
const h = g(
|
|
65
|
-
t.value.store,
|
|
66
|
-
(e) => e.isSubmitting
|
|
67
|
-
), d = B(
|
|
68
|
-
t.value,
|
|
69
|
-
o.subscribe
|
|
70
|
-
), y = g(
|
|
71
|
-
t.value.store,
|
|
72
|
-
(e) => e.submissionAttempts
|
|
73
|
-
), l = f(() => t.value.useStore((e) => e.errors));
|
|
74
|
-
return j(
|
|
75
|
-
() => [t.value.filterItems, l.value.value],
|
|
76
|
-
() => {
|
|
77
|
-
const e = t.value.filterItems, s = l.value.value;
|
|
78
|
-
return e ? s ? (Object.values(s).filter(
|
|
79
|
-
(r) => !!r
|
|
80
|
-
).flatMap(
|
|
81
|
-
(r) => Object.values(r).flat().map((n) => n.message)
|
|
82
|
-
).some((r) => r === e.message) && e.items.forEach((r) => {
|
|
83
|
-
const n = t.value.getFieldMeta(r);
|
|
84
|
-
n && t.value.setFieldMeta(r, {
|
|
85
|
-
...n,
|
|
86
|
-
errorMap: {
|
|
87
|
-
onSubmit: [
|
|
88
|
-
{ path: [r], message: e.message }
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}), {}) : {} : {};
|
|
93
|
-
}
|
|
94
|
-
), C(y, l.value, o.showErrorsOn), (e, s) => (b(), v("form", {
|
|
95
|
-
novalidate: "",
|
|
96
|
-
onSubmit: s[0] || (s[0] = F((i) => t.value.handleSubmit(), ["prevent", "stop"]))
|
|
97
|
-
}, [
|
|
98
|
-
M("fieldset", { disabled: c(h) }, [
|
|
99
|
-
o.form ? (b(), v(V, { key: 0 }, [
|
|
100
|
-
p(e.$slots, "externalForm", { subscribedValues: c(d) }, void 0, !0),
|
|
101
|
-
p(e.$slots, "default", {}, void 0, !0)
|
|
102
|
-
], 64)) : m.value ? p(e.$slots, "internalForm", {
|
|
103
|
-
key: 1,
|
|
104
|
-
form: m.value,
|
|
105
|
-
subscribedValues: c(d)
|
|
106
|
-
}, void 0, !0) : k("", !0)
|
|
107
|
-
], 8, $)
|
|
108
|
-
], 32));
|
|
109
|
-
}
|
|
110
|
-
});
|
|
1
|
+
import f from "./vue-components.es4.js";
|
|
111
2
|
export {
|
|
112
|
-
|
|
3
|
+
f as default
|
|
113
4
|
};
|
|
@@ -1,9 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { defineComponent as E, getCurrentInstance as C, computed as x, createBlock as o, openBlock as r, Transition as B, withCtx as n, createElementBlock as d, createCommentVNode as b, unref as e, renderSlot as w, normalizeProps as I, guardReactiveProps as V, resolveDynamicComponent as a, normalizeClass as N, createElementVNode as u, toDisplayString as c, Fragment as v, renderList as g, createTextVNode as k } from "vue";
|
|
2
|
+
import { mdiLink as O } from "@mdi/js";
|
|
3
|
+
import { useIntl as z } from "./vue-components.es3.js";
|
|
4
|
+
import { useOmegaErrors as D } from "./vue-components.es8.js";
|
|
5
|
+
const G = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "error-alert"
|
|
8
|
+
}, L = { class: "text-h6 mb-3" }, M = { class: "font-weight-medium" }, P = { class: "error-message" }, S = ["href"], T = { key: 1 }, H = /* @__PURE__ */ E({
|
|
9
|
+
__name: "OmegaErrors",
|
|
10
|
+
setup($) {
|
|
11
|
+
const m = C()?.appContext.components.VAlert, { errors: s, generalErrors: p, showErrors: y } = D(), { trans: _ } = z(), f = x(() => p.value ? p.value.filter(
|
|
12
|
+
(i) => !!i
|
|
13
|
+
).flatMap(
|
|
14
|
+
(i) => Object.values(i).filter((l) => !!l).flatMap(
|
|
15
|
+
(l) => l.filter(
|
|
16
|
+
(t) => !!t?.message
|
|
17
|
+
).map((t) => t.message)
|
|
18
|
+
)
|
|
19
|
+
) : []);
|
|
20
|
+
return (i, l) => (r(), o(B, null, {
|
|
21
|
+
default: n(() => [
|
|
22
|
+
e(y) && (e(s).length || f.value.length) ? (r(), d("div", G, [
|
|
23
|
+
w(i.$slots, "default", I(V({ errors: e(s), showedGeneralErrors: f.value })), () => [
|
|
24
|
+
(r(), o(a(e(m) ? "v-alert" : "div"), {
|
|
25
|
+
class: N([e(m) ? "mb-4" : "error-alert-content", "mb-4"]),
|
|
26
|
+
type: "error",
|
|
27
|
+
variant: "tonal",
|
|
28
|
+
role: "alert",
|
|
29
|
+
"aria-live": "polite"
|
|
30
|
+
}, {
|
|
31
|
+
default: n(() => [
|
|
32
|
+
u("div", L, c(e(_)("form.includes_error")) + ": ", 1),
|
|
33
|
+
e(s).length ? (r(), o(a(e(s).length > 1 ? "ul" : "div"), {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "error-list"
|
|
36
|
+
}, {
|
|
37
|
+
default: n(() => [
|
|
38
|
+
(r(!0), d(v, null, g(e(s), (t) => (r(), o(a(e(s).length > 1 ? "li" : "div"), {
|
|
39
|
+
key: t.inputId,
|
|
40
|
+
class: "error-item"
|
|
41
|
+
}, {
|
|
42
|
+
default: n(() => [
|
|
43
|
+
u("div", M, c(t.label), 1),
|
|
44
|
+
u("div", P, [
|
|
45
|
+
(r(), o(a(t.errors.length > 1 ? "ul" : "div"), { class: "error-list" }, {
|
|
46
|
+
default: n(() => [
|
|
47
|
+
(r(!0), d(v, null, g(t.errors, (h) => (r(), o(a(t.errors.length > 1 ? "li" : "span"), { key: h }, {
|
|
48
|
+
default: n(() => [
|
|
49
|
+
k(c(h), 1)
|
|
50
|
+
]),
|
|
51
|
+
_: 2
|
|
52
|
+
}, 1024))), 128))
|
|
53
|
+
]),
|
|
54
|
+
_: 2
|
|
55
|
+
}, 1024))
|
|
56
|
+
]),
|
|
57
|
+
u("a", {
|
|
58
|
+
href: `#${t.inputId}`,
|
|
59
|
+
class: "error-link"
|
|
60
|
+
}, [
|
|
61
|
+
(r(), o(a(e(m) ? "v-icon" : "i"), {
|
|
62
|
+
icon: e(O),
|
|
63
|
+
"aria-hidden": "true"
|
|
64
|
+
}, {
|
|
65
|
+
default: n(() => [...l[0] || (l[0] = [
|
|
66
|
+
u("i", null, "🔗", -1)
|
|
67
|
+
])]),
|
|
68
|
+
_: 1
|
|
69
|
+
}, 8, ["icon"])),
|
|
70
|
+
k(" " + c(e(_)("form.fix_input")), 1)
|
|
71
|
+
], 8, S)
|
|
72
|
+
]),
|
|
73
|
+
_: 2
|
|
74
|
+
}, 1024))), 128))
|
|
75
|
+
]),
|
|
76
|
+
_: 1
|
|
77
|
+
})) : (r(), d("span", T, c(f.value[0]), 1))
|
|
78
|
+
]),
|
|
79
|
+
_: 1
|
|
80
|
+
}, 8, ["class"]))
|
|
81
|
+
], !0)
|
|
82
|
+
])) : b("", !0)
|
|
83
|
+
]),
|
|
84
|
+
_: 3
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
});
|
|
7
88
|
export {
|
|
8
|
-
|
|
89
|
+
H as default
|
|
9
90
|
};
|