@effect-app/vue-components 1.0.0-next.21 → 1.0.0-next.4
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/OmegaAutoGen.vue.d.ts +2 -1
- package/dist/types/components/OmegaForm/OmegaFormStuff.d.ts +2 -14
- package/dist/types/components/OmegaForm/OmegaInput.vue.d.ts +2 -2
- package/dist/types/components/OmegaForm/index.d.ts +0 -2
- package/dist/types/components/OmegaForm/useOmegaForm.d.ts +33 -53
- package/dist/vue-components.es.js +15 -18
- package/dist/vue-components.es10.js +5 -10
- package/dist/vue-components.es11.js +54 -5
- package/dist/vue-components.es12.js +66 -49
- package/dist/vue-components.es13.js +6 -71
- package/dist/vue-components.es14.js +5 -5
- package/dist/vue-components.es15.js +3 -6
- package/dist/vue-components.es16.js +3 -3
- package/dist/vue-components.es17.js +42 -3
- package/dist/vue-components.es18.js +1 -1
- package/dist/vue-components.es19.js +2 -135
- package/dist/vue-components.es2.js +8 -11
- package/dist/vue-components.es22.js +7 -2
- package/dist/vue-components.es23.js +31 -2
- package/dist/vue-components.es25.js +91 -0
- package/dist/vue-components.es26.js +23 -7
- package/dist/vue-components.es27.js +5 -31
- package/dist/vue-components.es28.js +23 -0
- package/dist/vue-components.es29.js +30 -4
- package/dist/vue-components.es30.js +22 -11
- package/dist/vue-components.es31.js +9 -20
- package/dist/vue-components.es32.js +4 -4
- package/dist/vue-components.es33.js +19 -21
- package/dist/vue-components.es34.js +9 -30
- package/dist/vue-components.es35.js +25 -16
- package/dist/vue-components.es36.js +43 -7
- package/dist/vue-components.es37.js +26 -5
- package/dist/vue-components.es38.js +10 -18
- package/dist/vue-components.es39.js +2 -9
- package/dist/vue-components.es4.js +46 -81
- package/dist/vue-components.es40.js +60 -26
- package/dist/vue-components.es41.js +45 -37
- package/dist/vue-components.es42.js +17 -26
- package/dist/vue-components.es43.js +32 -64
- package/dist/vue-components.es44.js +28 -55
- package/dist/vue-components.es45.js +41 -16
- package/dist/vue-components.es46.js +114 -32
- package/dist/vue-components.es48.js +4 -42
- package/dist/vue-components.es5.js +29 -51
- package/dist/vue-components.es6.js +207 -27
- package/dist/vue-components.es7.js +326 -202
- package/dist/vue-components.es8.js +2 -350
- package/dist/vue-components.es9.js +10 -2
- package/package.json +2 -2
- package/src/components/OmegaForm/OmegaAutoGen.vue +5 -1
- package/src/components/OmegaForm/OmegaFormStuff.ts +1 -39
- package/src/components/OmegaForm/OmegaInput.vue +4 -5
- package/src/components/OmegaForm/OmegaInputVuetify.vue +2 -21
- package/src/components/OmegaForm/index.ts +0 -4
- package/src/components/OmegaForm/useOmegaForm.ts +40 -320
- package/dist/vue-components.es21.js +0 -44
- package/dist/vue-components.es47.js +0 -31
- /package/dist/{vue-components.es24.js → vue-components.es20.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
2
|
import { Order } from "effect-app";
|
|
3
|
-
import { type
|
|
3
|
+
import { type OmegaInputProps } from "./OmegaFormStuff";
|
|
4
|
+
export type OmegaAutoGenMeta<From extends Record<PropertyKey, string>, To extends Record<PropertyKey, string>> = Omit<OmegaInputProps<From, To>, "form">;
|
|
4
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<{
|
|
5
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
6
7
|
form: OmegaInputProps<From, To>["form"];
|
|
@@ -2,7 +2,7 @@ import { type Effect, S } from "effect-app";
|
|
|
2
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
3
|
import { type RuntimeFiber } from "effect/Fiber";
|
|
4
4
|
import { type OmegaFieldInternalApi } from "./InputProps";
|
|
5
|
-
import { type
|
|
5
|
+
import { type OmegaFormReturn } from "./useOmegaForm";
|
|
6
6
|
export type ShowErrorsOn = "onChange" | "onBlur" | "onSubmit";
|
|
7
7
|
export type DefaultInputProps<From> = {
|
|
8
8
|
label?: string;
|
|
@@ -13,13 +13,6 @@ export type DefaultInputProps<From> = {
|
|
|
13
13
|
}[];
|
|
14
14
|
type?: TypeOverride;
|
|
15
15
|
};
|
|
16
|
-
export type OmegaInputPropsBase<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>> = {
|
|
17
|
-
form: OF<From, To> & {
|
|
18
|
-
meta: MetaRecord<From>;
|
|
19
|
-
i18nNamespace?: string;
|
|
20
|
-
};
|
|
21
|
-
name: NestedKeyOf<From>;
|
|
22
|
-
} & DefaultInputProps<From>;
|
|
23
16
|
export type OmegaInputProps<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>, InputProps = DefaultInputProps<From>> = {
|
|
24
17
|
form: OmegaFormReturn<From, To, InputProps> & {
|
|
25
18
|
meta: MetaRecord<From>;
|
|
@@ -27,7 +20,7 @@ export type OmegaInputProps<From extends Record<PropertyKey, any>, To extends Re
|
|
|
27
20
|
};
|
|
28
21
|
name: NestedKeyOf<From>;
|
|
29
22
|
} & DefaultInputProps<From>;
|
|
30
|
-
export type TypeOverride = "string" | "text" | "number" | "select" | "multiple" | "boolean" | "
|
|
23
|
+
export type TypeOverride = "string" | "text" | "number" | "select" | "multiple" | "boolean" | "autocomplete" | "autocompletemultiple" | "switch" | "range" | "password" | "email";
|
|
31
24
|
export interface OmegaError {
|
|
32
25
|
label: string;
|
|
33
26
|
inputId: string;
|
|
@@ -120,8 +113,3 @@ export declare const generateInputStandardSchemaFromFieldMeta: (meta: FieldMeta)
|
|
|
120
113
|
export declare const nullableInput: <A, I, R>(schema: S.Schema<A, I, R>, defaultValue: () => A) => S.transform<import("effect/Schema").NullOr<S.Schema<A, I, R>> & {
|
|
121
114
|
withDefault: S.PropertySignature<":", A | null, never, ":", I | null, true, R>;
|
|
122
115
|
}, S.SchemaClass<A, A, never>>;
|
|
123
|
-
export type OmegaAutoGenMeta<From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>> = Omit<OmegaInputProps<From, To>, "form">;
|
|
124
|
-
declare const supportedInputs: readonly ["button", "checkbox", "color", "date", "email", "number", "password", "radio", "range", "search", "submit", "tel", "text", "time", "url"];
|
|
125
|
-
export type SupportedInputs = typeof supportedInputs[number];
|
|
126
|
-
export declare const getInputType: (input: string) => SupportedInputs;
|
|
127
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
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> &
|
|
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: {
|
|
@@ -2,6 +2,4 @@ import { default as OmegaInput } from "./OmegaInput.vue";
|
|
|
2
2
|
export * as OmegaErrorsContext from "./OmegaErrorsContext";
|
|
3
3
|
export * from "./OmegaFormStuff";
|
|
4
4
|
export { type OmegaFormReturn, useOmegaForm } from "./useOmegaForm";
|
|
5
|
-
export { default as OmegaVuetifyInput } from "./OmegaInternalInput.vue";
|
|
6
|
-
export { getInputType } from "./OmegaFormStuff";
|
|
7
5
|
export { OmegaInput };
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { type DeepKeys
|
|
2
|
-
import {
|
|
1
|
+
import { type DeepKeys } from "@tanstack/vue-form";
|
|
2
|
+
import { S } from "effect-app";
|
|
3
3
|
import { type InjectionKey } from "vue";
|
|
4
|
+
import { getOmegaStore } from "./getOmegaStore";
|
|
4
5
|
import { type InputProps } from "./InputProps";
|
|
5
|
-
import
|
|
6
|
+
import OmegaArray from "./OmegaArray.vue";
|
|
7
|
+
import OmegaAutoGen from "./OmegaAutoGen.vue";
|
|
8
|
+
import OmegaErrorsInternal from "./OmegaErrorsInternal.vue";
|
|
9
|
+
import { DefaultInputProps, type FilterItems, type FormProps, type MetaRecord, type NestedKeyOf, type OmegaFormApi, OmegaFormState, ShowErrorsOn } from "./OmegaFormStuff";
|
|
10
|
+
import OmegaForm from "./OmegaWrapper.vue";
|
|
6
11
|
type keysRule<T> = {
|
|
7
12
|
keys?: NestedKeyOf<T>[];
|
|
8
13
|
banKeys?: "You should only use one of banKeys or keys, not both, moron";
|
|
@@ -24,7 +29,7 @@ export type OmegaConfig<T> = {
|
|
|
24
29
|
} & keysRule<T>;
|
|
25
30
|
input?: any;
|
|
26
31
|
};
|
|
27
|
-
|
|
32
|
+
interface OF<From, To> extends OmegaFormApi<From, To> {
|
|
28
33
|
meta: MetaRecord<From>;
|
|
29
34
|
filterItems?: FilterItems;
|
|
30
35
|
clear: () => void;
|
|
@@ -49,82 +54,57 @@ export interface OmegaFormReturn<From extends Record<PropertyKey, any>, To exten
|
|
|
49
54
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
50
55
|
};
|
|
51
56
|
Errors: (__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<{
|
|
52
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}>> & import("vue").PublicProps;
|
|
57
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Omit<ReturnType<typeof OmegaErrorsInternal["props"]>, "errors" | "generalErrors" | "showErrors"> & Partial<{}>> & import("vue").PublicProps;
|
|
53
58
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
54
59
|
attrs: any;
|
|
55
|
-
slots: {
|
|
56
|
-
default: (props: {
|
|
57
|
-
errors: readonly OmegaError[];
|
|
58
|
-
showedGeneralErrors: string[];
|
|
59
|
-
}) => void;
|
|
60
|
-
};
|
|
60
|
+
slots: {};
|
|
61
61
|
emit: {};
|
|
62
62
|
}>) => import("vue").VNode & {
|
|
63
63
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
64
64
|
};
|
|
65
65
|
Array: (__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<{
|
|
66
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> &
|
|
67
|
-
defaultItems?: DeepValue<From, DeepKeys<From>>;
|
|
68
|
-
items?: "please use `defaultItems` instead";
|
|
69
|
-
}) & {}> & import("vue").PublicProps;
|
|
66
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Omit<ReturnType<typeof OmegaArray<From, To>>["props"], "form"> & Partial<{}>> & import("vue").PublicProps;
|
|
70
67
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
71
68
|
attrs: any;
|
|
72
69
|
slots: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}) => any;
|
|
77
|
-
} & {
|
|
78
|
-
default?: (props: {
|
|
79
|
-
subField: import("@tanstack/vue-form").FieldApi<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").StandardSchemaV1<From, To>, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, Record<string, any> | undefined>;
|
|
80
|
-
subState: import("@tanstack/vue-form").FieldState<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FieldAsyncValidateOrFn<From, DeepKeys<From>, DeepValue<From, DeepKeys<From>>> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").StandardSchemaV1<From, To>, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormValidateOrFn<From> | undefined, import("@tanstack/vue-form").FormAsyncValidateOrFn<From> | undefined>;
|
|
70
|
+
default(props: {
|
|
71
|
+
subField: any;
|
|
72
|
+
subState: any;
|
|
81
73
|
index: number;
|
|
82
|
-
field:
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
74
|
+
field: any;
|
|
75
|
+
}): void;
|
|
76
|
+
["pre-array"](props: {
|
|
77
|
+
field: any;
|
|
78
|
+
state: any;
|
|
79
|
+
}): void;
|
|
80
|
+
["post-array"](props: {
|
|
81
|
+
field: any;
|
|
82
|
+
state: any;
|
|
83
|
+
}): void;
|
|
84
|
+
field(props: {
|
|
85
|
+
field: any;
|
|
86
|
+
}): void;
|
|
93
87
|
};
|
|
94
88
|
emit: {};
|
|
95
89
|
}>) => import("vue").VNode & {
|
|
96
90
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
97
91
|
};
|
|
98
92
|
AutoGen: (__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<{
|
|
99
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
100
|
-
pick?: DeepKeys<From>[];
|
|
101
|
-
omit?: DeepKeys<From>[];
|
|
102
|
-
labelMap?: (key: DeepKeys<From>) => string | undefined;
|
|
103
|
-
filterMap?: <M extends OmegaAutoGenMeta<From, To>>(key: DeepKeys<From>, meta: M) => boolean | M;
|
|
104
|
-
order?: DeepKeys<From>[];
|
|
105
|
-
sort?: Order.Order<OmegaAutoGenMeta<From, To>>;
|
|
106
|
-
} & {}> & import("vue").PublicProps;
|
|
93
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Omit<ReturnType<typeof OmegaAutoGen<From, To>>["props"], "form"> & Partial<{}>> & import("vue").PublicProps;
|
|
107
94
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
108
95
|
attrs: any;
|
|
109
|
-
slots: {
|
|
110
|
-
default(props: {
|
|
111
|
-
child: OmegaAutoGenMeta<From, To>;
|
|
112
|
-
}): void;
|
|
113
|
-
};
|
|
96
|
+
slots: {};
|
|
114
97
|
emit: {};
|
|
115
98
|
}>) => import("vue").VNode & {
|
|
116
99
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
117
100
|
};
|
|
118
|
-
Form: <K extends keyof OmegaFormState<To, 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<{
|
|
119
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & {
|
|
120
|
-
disabled?: boolean;
|
|
121
|
-
subscribe?: K[];
|
|
122
|
-
} & {}> & import("vue").PublicProps;
|
|
101
|
+
Form: <K extends keyof OmegaFormState<To, From>, 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<{
|
|
102
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & ReturnType<typeof OmegaForm<From, To, K, Props>>["props"] & Partial<{}>> & import("vue").PublicProps;
|
|
123
103
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
124
104
|
attrs: any;
|
|
125
105
|
slots: {
|
|
126
106
|
default(props: {
|
|
127
|
-
subscribedValues:
|
|
107
|
+
subscribedValues: ReturnType<typeof getOmegaStore<To, From, K>>["value"];
|
|
128
108
|
}): void;
|
|
129
109
|
};
|
|
130
110
|
emit: {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as o from "./vue-components.es2.js";
|
|
2
|
-
import { getTransformationFrom as
|
|
2
|
+
import { getTransformationFrom as f, provideIntl as l, useIntl as s, useIntlKey as i } from "./vue-components.es3.js";
|
|
3
3
|
import { default as d } from "./vue-components.es4.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { createMeta as F, duplicateSchema as h, generateInputStandardSchemaFromFieldMeta as S, generateMetaFromSchema as b, getInputType as M, nullableInput as j } from "./vue-components.es8.js";
|
|
4
|
+
import * as n from "./vue-components.es5.js";
|
|
5
|
+
import { useOmegaForm as g } from "./vue-components.es6.js";
|
|
6
|
+
import { createMeta as y, duplicateSchema as F, generateInputStandardSchemaFromFieldMeta as O, generateMetaFromSchema as h, nullableInput as S } from "./vue-components.es7.js";
|
|
8
7
|
function a(r) {
|
|
9
8
|
for (const e in o)
|
|
10
9
|
if (Object.prototype.hasOwnProperty.call(o, e)) {
|
|
@@ -15,18 +14,16 @@ function a(r) {
|
|
|
15
14
|
const m = { install: a };
|
|
16
15
|
export {
|
|
17
16
|
n as OmegaErrorsContext,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
F as createMeta,
|
|
17
|
+
d as OmegaInput,
|
|
18
|
+
y as createMeta,
|
|
21
19
|
m as default,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
s as
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
y as useOmegaForm
|
|
20
|
+
F as duplicateSchema,
|
|
21
|
+
O as generateInputStandardSchemaFromFieldMeta,
|
|
22
|
+
h as generateMetaFromSchema,
|
|
23
|
+
f as getTransformationFrom,
|
|
24
|
+
S as nullableInput,
|
|
25
|
+
l as provideIntl,
|
|
26
|
+
s as useIntl,
|
|
27
|
+
i as useIntlKey,
|
|
28
|
+
g as useOmegaForm
|
|
32
29
|
};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const i = Symbol.for("clone-trait"), u = n(2, (e, t) => i in e ? e[i](t) : Object.setPrototypeOf(t, Object.getPrototypeOf(e)));
|
|
4
|
-
n(2, (e, t) => u(e, { ...e, ...m(t) ? t(e) : t }));
|
|
5
|
-
const b = (e) => new Promise((t, r) => e.addObserver((o) => {
|
|
6
|
-
c.isSuccess(o) ? t(o.value) : r(s.makeFiberFailure(o.cause));
|
|
7
|
-
}));
|
|
1
|
+
import { isFunction as c } from "./vue-components.es17.js";
|
|
2
|
+
const s = c, t = (o) => typeof o == "object" && o !== null, i = (o) => t(o) || s(o);
|
|
8
3
|
export {
|
|
9
|
-
|
|
10
|
-
i as
|
|
11
|
-
|
|
4
|
+
s as isFunction,
|
|
5
|
+
i as isObject,
|
|
6
|
+
t as isRecordOrArray
|
|
12
7
|
};
|
|
@@ -1,7 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as F, computed as d, onMounted as M, provide as P, createBlock as f, openBlock as m, resolveDynamicComponent as i, withCtx as c, renderSlot as o, createElementBlock as k, normalizeProps as s, guardReactiveProps as l, Fragment as A, renderList as b, mergeProps as B } from "vue";
|
|
2
|
+
const N = /* @__PURE__ */ F({
|
|
3
|
+
inheritAttrs: !1,
|
|
4
|
+
__name: "OmegaArray",
|
|
5
|
+
props: {
|
|
6
|
+
form: {},
|
|
7
|
+
name: {},
|
|
8
|
+
defaultItems: {},
|
|
9
|
+
items: {}
|
|
10
|
+
},
|
|
11
|
+
setup(g) {
|
|
12
|
+
const a = g, y = a.form.useStore((e) => e.values), u = d(() => {
|
|
13
|
+
const e = a.name.replace(/\[/g, ".").replace(/\]/g, "");
|
|
14
|
+
try {
|
|
15
|
+
return e.split(".").reduce((r, t) => r && r[t], y.value);
|
|
16
|
+
} catch (r) {
|
|
17
|
+
return console.error(r), [];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
M(async () => {
|
|
21
|
+
a.defaultItems && !u.value && a.form.setFieldValue(a.name, a.defaultItems);
|
|
22
|
+
});
|
|
23
|
+
const $ = d(() => (r) => {
|
|
24
|
+
const t = r.replace(/\[\d+\]/g, "");
|
|
25
|
+
return a.form.meta[t];
|
|
26
|
+
});
|
|
27
|
+
return P("getMetaFromArray", $), (e, r) => (m(), f(i(e.form.Field), { name: e.name }, {
|
|
28
|
+
default: c(({ field: t, state: p }) => [
|
|
29
|
+
o(e.$slots, "pre-array", s(l({ field: t, state: p }))),
|
|
30
|
+
(m(!0), k(A, null, b(u.value, (C, n) => (m(), f(i(e.form.Field), {
|
|
31
|
+
key: `${e.name}[${Number(n)}]`,
|
|
32
|
+
name: (
|
|
33
|
+
// eslint-disable-next-line
|
|
34
|
+
`${e.name}[${Number(n)}]`
|
|
35
|
+
)
|
|
36
|
+
}, {
|
|
37
|
+
default: c(({ field: v, state: h }) => [
|
|
38
|
+
o(e.$slots, "default", B({ ref_for: !0 }, {
|
|
39
|
+
subField: v,
|
|
40
|
+
subState: h,
|
|
41
|
+
index: Number(n),
|
|
42
|
+
field: t
|
|
43
|
+
}))
|
|
44
|
+
]),
|
|
45
|
+
_: 2
|
|
46
|
+
}, 1032, ["name"]))), 128)),
|
|
47
|
+
o(e.$slots, "post-array", s(l({ field: t, state: p }))),
|
|
48
|
+
o(e.$slots, "field", s(l({ field: t })))
|
|
49
|
+
]),
|
|
50
|
+
_: 3
|
|
51
|
+
}, 8, ["name"]));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
3
54
|
export {
|
|
4
|
-
|
|
5
|
-
i as isObject,
|
|
6
|
-
t as isRecordOrArray
|
|
55
|
+
N as default
|
|
7
56
|
};
|
|
@@ -1,56 +1,73 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
__name: "
|
|
1
|
+
import { defineComponent as _, computed as O, resolveComponent as j, createElementBlock as M, openBlock as E, Fragment as v, renderList as A, renderSlot as F, createVNode as I, mergeProps as g } from "vue";
|
|
2
|
+
import { Order as i, pipe as h, Array as l } from "effect-app";
|
|
3
|
+
const B = /* @__PURE__ */ _({
|
|
4
|
+
__name: "OmegaAutoGen",
|
|
5
5
|
props: {
|
|
6
6
|
form: {},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
pick: {},
|
|
8
|
+
omit: {},
|
|
9
|
+
labelMap: { type: Function },
|
|
10
|
+
filterMap: { type: Function },
|
|
11
|
+
order: {},
|
|
12
|
+
sort: {}
|
|
10
13
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
14
|
+
setup(p) {
|
|
15
|
+
const u = (e) => (r) => Object.fromEntries(
|
|
16
|
+
Object.entries(r).map(([t, n]) => [t, e(n, t)])
|
|
17
|
+
), m = (e) => (r) => Object.fromEntries(
|
|
18
|
+
Object.entries(r).filter(([t, n]) => e(n, t))
|
|
19
|
+
), a = (e) => (r) => Object.entries(r).reduce(
|
|
20
|
+
(t, [n, s]) => {
|
|
21
|
+
const c = e(s, n);
|
|
22
|
+
return c !== !1 && (t[n] = c), t;
|
|
23
|
+
},
|
|
24
|
+
{}
|
|
25
|
+
), o = p, f = (e, r) => {
|
|
26
|
+
const t = r?.indexOf(e) ?? -1;
|
|
27
|
+
return t === -1 ? Number.MAX_SAFE_INTEGER : t;
|
|
28
|
+
}, d = i.mapInput(
|
|
29
|
+
i.number,
|
|
30
|
+
(e) => f(e.name, o.order || [])
|
|
31
|
+
), b = O(
|
|
32
|
+
() => h(
|
|
33
|
+
o.form.meta,
|
|
34
|
+
// include / exclude
|
|
35
|
+
m(
|
|
36
|
+
(e, r) => o.pick ? o.pick.includes(r) && !o.omit?.includes(r) : !o.omit?.includes(r)
|
|
37
|
+
),
|
|
38
|
+
(e) => e,
|
|
39
|
+
// labelMap and adding name
|
|
40
|
+
u((e, r) => ({
|
|
41
|
+
name: r,
|
|
42
|
+
label: o.labelMap?.(r) || r,
|
|
43
|
+
...e
|
|
44
|
+
})),
|
|
45
|
+
// filterMap
|
|
46
|
+
o.filterMap ? a((e) => {
|
|
47
|
+
const r = o.filterMap?.(e.name, e);
|
|
48
|
+
return r === void 0 || r === !0 ? e : r;
|
|
49
|
+
}) : (e) => e,
|
|
50
|
+
// transform to array
|
|
51
|
+
(e) => Object.values(e),
|
|
52
|
+
// order
|
|
53
|
+
l.sort(d),
|
|
54
|
+
// sort
|
|
55
|
+
o.sort ? l.sort(o.sort) : (e) => e
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
return (e, r) => {
|
|
59
|
+
const t = j("form.Input");
|
|
60
|
+
return E(!0), M(v, null, A(b.value, ({ name: n, label: s, ...c }) => F(e.$slots, "default", {
|
|
61
|
+
child: { name: n, label: s, ...c }
|
|
62
|
+
}, () => [
|
|
63
|
+
I(t, g({
|
|
64
|
+
name: n,
|
|
65
|
+
label: s
|
|
66
|
+
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
67
|
+
])), 256);
|
|
68
|
+
};
|
|
52
69
|
}
|
|
53
70
|
});
|
|
54
71
|
export {
|
|
55
|
-
|
|
72
|
+
B as default
|
|
56
73
|
};
|
|
@@ -1,73 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
form: {},
|
|
7
|
-
pick: {},
|
|
8
|
-
omit: {},
|
|
9
|
-
labelMap: { type: Function },
|
|
10
|
-
filterMap: { type: Function },
|
|
11
|
-
order: {},
|
|
12
|
-
sort: {}
|
|
13
|
-
},
|
|
14
|
-
setup(p) {
|
|
15
|
-
const u = (e) => (r) => Object.fromEntries(
|
|
16
|
-
Object.entries(r).map(([t, n]) => [t, e(n, t)])
|
|
17
|
-
), m = (e) => (r) => Object.fromEntries(
|
|
18
|
-
Object.entries(r).filter(([t, n]) => e(n, t))
|
|
19
|
-
), a = (e) => (r) => Object.entries(r).reduce(
|
|
20
|
-
(t, [n, s]) => {
|
|
21
|
-
const c = e(s, n);
|
|
22
|
-
return c !== !1 && (t[n] = c), t;
|
|
23
|
-
},
|
|
24
|
-
{}
|
|
25
|
-
), o = p, f = (e, r) => {
|
|
26
|
-
const t = r?.indexOf(e) ?? -1;
|
|
27
|
-
return t === -1 ? Number.MAX_SAFE_INTEGER : t;
|
|
28
|
-
}, d = i.mapInput(
|
|
29
|
-
i.number,
|
|
30
|
-
(e) => f(e.name, o.order || [])
|
|
31
|
-
), b = O(
|
|
32
|
-
() => h(
|
|
33
|
-
o.form.meta,
|
|
34
|
-
// include / exclude
|
|
35
|
-
m(
|
|
36
|
-
(e, r) => o.pick ? o.pick.includes(r) && !o.omit?.includes(r) : !o.omit?.includes(r)
|
|
37
|
-
),
|
|
38
|
-
(e) => e,
|
|
39
|
-
// labelMap and adding name
|
|
40
|
-
u((e, r) => ({
|
|
41
|
-
name: r,
|
|
42
|
-
label: o.labelMap?.(r) || r,
|
|
43
|
-
...e
|
|
44
|
-
})),
|
|
45
|
-
// filterMap
|
|
46
|
-
o.filterMap ? a((e) => {
|
|
47
|
-
const r = o.filterMap?.(e.name, e);
|
|
48
|
-
return r === void 0 || r === !0 ? e : r;
|
|
49
|
-
}) : (e) => e,
|
|
50
|
-
// transform to array
|
|
51
|
-
(e) => Object.values(e),
|
|
52
|
-
// order
|
|
53
|
-
l.sort(d),
|
|
54
|
-
// sort
|
|
55
|
-
o.sort ? l.sort(o.sort) : (e) => e
|
|
56
|
-
)
|
|
57
|
-
);
|
|
58
|
-
return (e, r) => {
|
|
59
|
-
const t = j("form.Input");
|
|
60
|
-
return E(!0), M(v, null, A(b.value, ({ name: n, label: s, ...c }) => F(e.$slots, "default", {
|
|
61
|
-
child: { name: n, label: s, ...c }
|
|
62
|
-
}, () => [
|
|
63
|
-
I(t, g({
|
|
64
|
-
name: n,
|
|
65
|
-
label: s
|
|
66
|
-
}, { ref_for: !0 }, c), null, 16, ["name", "label"])
|
|
67
|
-
])), 256);
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
});
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");if(t.appendChild(document.createTextNode(".v-enter-from[data-v-193816ae],.v-leave-to[data-v-193816ae]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-193816ae],.v-leave-active[data-v-193816ae]{display:grid;transition:all .15s}.v-enter-to[data-v-193816ae],.v-leave-from[data-v-193816ae]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-193816ae]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-193816ae]{min-height:0}.error-list[data-v-193816ae]{list-style-position:inside}div.error-list[data-v-193816ae]{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-193816ae]{grid-template-columns:auto 1fr}.error-link[data-v-193816ae]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-193816ae]{grid-template-columns:1fr}.error-message[data-v-193816ae]{grid-column:1 / -1}}.error-item[data-v-193816ae]{display:contents}a[data-v-193816ae]{min-width:min-content}.error-link[data-v-193816ae]{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 e=window.customElements.define;window.customElements.define=function(n,a){const i=a.prototype.connectedCallback;return a.prototype.connectedCallback=function(){if(i&&i.call(this),this.shadowRoot){const r=document.createElement("style");r.appendChild(document.createTextNode(".v-enter-from[data-v-193816ae],.v-leave-to[data-v-193816ae]{max-height:0px;grid-template-rows:0fr;opacity:0}.v-enter-active[data-v-193816ae],.v-leave-active[data-v-193816ae]{display:grid;transition:all .15s}.v-enter-to[data-v-193816ae],.v-leave-from[data-v-193816ae]{grid-template-rows:1fr;max-height:50vh;opacity:1}.error-alert[data-v-193816ae]{transition-behavior:allow-discrete;display:grid;overflow:hidden;min-height:0}.error-alert>*[data-v-193816ae]{min-height:0}.error-list[data-v-193816ae]{list-style-position:inside}div.error-list[data-v-193816ae]{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-193816ae]{grid-template-columns:auto 1fr}.error-link[data-v-193816ae]{grid-column:1 / -1;justify-self:end}}@container (max-width: 17.75rem){div.error-list[data-v-193816ae]{grid-template-columns:1fr}.error-message[data-v-193816ae]{grid-column:1 / -1}}.error-item[data-v-193816ae]{display:contents}a[data-v-193816ae]{min-width:min-content}.error-link[data-v-193816ae]{align-items:center;color:inherit;display:inline-flex;flex-wrap:wrap;gap:.25em;padding-bottom:1em;text-decoration:none}")),this.shadowRoot.appendChild(r)}},e.call(window.customElements,n,a)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import r from "./vue-components.es20.js";
|
|
3
|
+
|
|
4
|
+
import o from "./vue-components.es22.js";
|
|
5
|
+
const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-193816ae"]]);
|
|
71
6
|
export {
|
|
72
|
-
|
|
7
|
+
m as default
|
|
73
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-440e1a59]{display:contents}fieldset[disabled][data-v-440e1a59]>*{pointer-events:none}")),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-440e1a59]{display:contents}fieldset[disabled][data-v-440e1a59]>*{pointer-events:none}")),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.es23.js";
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import m from "./vue-components.es22.js";
|
|
5
|
+
const e = /* @__PURE__ */ m(o, [["__scopeId", "data-v-440e1a59"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import m from "./vue-components.es26.js";
|
|
5
|
-
const e = /* @__PURE__ */ m(o, [["__scopeId", "data-v-440e1a59"]]);
|
|
1
|
+
import { TraceAPI as r } from "./vue-components.es37.js";
|
|
2
|
+
var t = r.getInstance();
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
t as trace
|
|
8
5
|
};
|