@effect-app/vue-components 1.1.1 → 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 +6 -4
- package/dist/types/components/OmegaForm/OmegaAutoGen.vue.d.ts +5 -4
- package/dist/types/components/OmegaForm/OmegaErrorsContext.d.ts +3 -3
- 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 +5 -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/types/components/OmegaForm/createUseFormWithCustomInput.d.ts +3 -0
- package/dist/types/components/OmegaForm/index.d.ts +2 -2
- package/dist/vue-components.es.js +13 -11
- package/dist/vue-components.es10.js +1 -1
- package/dist/vue-components.es11.js +1 -1
- package/dist/vue-components.es12.js +15 -15
- package/dist/vue-components.es13.js +36 -39
- package/dist/vue-components.es14.js +2 -2
- package/dist/vue-components.es15.js +5 -5
- package/dist/vue-components.es16.js +1 -1
- package/dist/vue-components.es17.js +1 -1
- package/dist/vue-components.es19.js +2 -135
- package/dist/vue-components.es2.js +14 -12
- package/dist/vue-components.es20.js +137 -0
- package/dist/vue-components.es22.js +42 -2
- package/dist/vue-components.es23.js +1 -1
- package/dist/vue-components.es24.js +2 -90
- package/dist/vue-components.es25.js +92 -0
- package/dist/vue-components.es27.js +7 -31
- package/dist/vue-components.es28.js +33 -0
- package/dist/vue-components.es30.js +4 -23
- package/dist/vue-components.es31.js +23 -5
- package/dist/vue-components.es32.js +5 -21
- package/dist/vue-components.es33.js +16 -25
- package/dist/vue-components.es34.js +23 -15
- package/dist/vue-components.es35.js +17 -7
- package/dist/vue-components.es36.js +12 -5
- package/dist/vue-components.es37.js +5 -19
- package/dist/vue-components.es38.js +19 -9
- package/dist/vue-components.es39.js +9 -31
- package/dist/vue-components.es4.js +42 -80
- package/dist/vue-components.es40.js +25 -42
- package/dist/vue-components.es41.js +38 -16
- package/dist/vue-components.es42.js +26 -11
- package/dist/vue-components.es43.js +11 -65
- package/dist/vue-components.es44.js +54 -45
- package/dist/vue-components.es45.js +54 -15
- package/dist/vue-components.es46.js +15 -31
- package/dist/vue-components.es47.js +30 -26
- package/dist/vue-components.es48.js +29 -42
- package/dist/vue-components.es49.js +42 -2
- package/dist/vue-components.es5.js +82 -42
- package/dist/vue-components.es50.js +2 -44
- package/dist/vue-components.es51.js +44 -2
- package/dist/vue-components.es52.js +4 -0
- package/dist/vue-components.es6.js +6 -6
- package/dist/vue-components.es7.js +3 -5
- package/dist/vue-components.es8.js +3 -3
- package/dist/vue-components.es9.js +30 -2
- package/package.json +15 -15
- package/src/components/OmegaForm/OmegaErrorsContext.ts +3 -3
- package/src/components/OmegaForm/OmegaInternalInput.vue +6 -3
- package/src/components/OmegaForm/createUseFormWithCustomInput.ts +53 -0
- package/src/components/OmegaForm/index.ts +2 -3
- package/src/components/OmegaForm/useOmegaForm.ts +2 -4
- package/dist/vue-components.es21.js +0 -44
- package/dist/vue-components.es26.js +0 -9
- package/dist/vue-components.es29.js +0 -6
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type DeepKeys, type DeepValue } from "@tanstack/vue-form";
|
|
2
2
|
import { type OmegaInputProps } from "./OmegaFormStuff";
|
|
3
|
-
declare const
|
|
4
|
-
|
|
3
|
+
declare const __VLS_export: <// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
|
|
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<Omit<OmegaInputProps<From, To>, "validators" | "options" | "label" | "type" | "items"> & {
|
|
5
6
|
defaultItems?: DeepValue<From, DeepKeys<From>>;
|
|
6
7
|
items?: "please use `defaultItems` instead";
|
|
7
|
-
}
|
|
8
|
-
expose(exposed:
|
|
8
|
+
}> & import("vue").PublicProps;
|
|
9
|
+
expose: (exposed: {}) => void;
|
|
9
10
|
attrs: any;
|
|
10
11
|
slots: {
|
|
11
12
|
'pre-array'?: (props: {
|
|
@@ -33,6 +34,7 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
33
34
|
}>) => import("vue").VNode & {
|
|
34
35
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
35
36
|
};
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
36
38
|
export default _default;
|
|
37
39
|
type __VLS_PrettifyLocal<T> = {
|
|
38
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];
|
|
@@ -3,7 +3,7 @@ import { type InjectionKey, type Ref } from "vue";
|
|
|
3
3
|
import { type OmegaError, type ShowErrorsOn } from "./OmegaFormStuff";
|
|
4
4
|
export declare const OmegaErrorsKey: InjectionKey<{
|
|
5
5
|
errors: Ref<readonly OmegaError[]>;
|
|
6
|
-
|
|
6
|
+
mapError: (error: OmegaError) => void;
|
|
7
7
|
removeError: (inputId: string) => void;
|
|
8
8
|
clearErrors: () => void;
|
|
9
9
|
showErrors: Ref<boolean>;
|
|
@@ -20,7 +20,7 @@ export declare function buildOmegaErrors(formSubmissionAttempts: Ref<number>, ge
|
|
|
20
20
|
readonly inputId: string;
|
|
21
21
|
readonly errors: readonly string[];
|
|
22
22
|
}[]>>;
|
|
23
|
-
|
|
23
|
+
mapError: (error: OmegaError) => void;
|
|
24
24
|
removeError: (inputId: string) => void;
|
|
25
25
|
clearErrors: () => void;
|
|
26
26
|
showErrors: import("vue").ComputedRef<boolean>;
|
|
@@ -29,7 +29,7 @@ export declare function buildOmegaErrors(formSubmissionAttempts: Ref<number>, ge
|
|
|
29
29
|
};
|
|
30
30
|
export declare function useOmegaErrors(): {
|
|
31
31
|
errors: Ref<readonly OmegaError[]>;
|
|
32
|
-
|
|
32
|
+
mapError: (error: OmegaError) => void;
|
|
33
33
|
removeError: (inputId: string) => void;
|
|
34
34
|
clearErrors: () => void;
|
|
35
35
|
showErrors: Ref<boolean>;
|
|
@@ -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,7 +1,8 @@
|
|
|
1
1
|
import { type OmegaInputPropsBase } from "./OmegaFormStuff";
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const __VLS_export: <// dprint ignore - somehow with 120 chars, this becomes a mess. should report it.
|
|
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<OmegaInputPropsBase<From, To>> & import("vue").PublicProps;
|
|
5
|
+
expose: (exposed: {}) => void;
|
|
5
6
|
attrs: any;
|
|
6
7
|
slots: {
|
|
7
8
|
default?: (props: {
|
|
@@ -29,6 +30,7 @@ declare const _default: <From extends Record<PropertyKey, any>, To extends Recor
|
|
|
29
30
|
}>) => import("vue").VNode & {
|
|
30
31
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
31
32
|
};
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
32
34
|
export default _default;
|
|
33
35
|
type __VLS_PrettifyLocal<T> = {
|
|
34
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>, "onBlur" | "onFocus"> & {
|
|
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];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type Component } from "vue";
|
|
2
|
+
import { useOmegaForm } from "./useOmegaForm";
|
|
3
|
+
export declare const createUseFormWithCustomInput: (CustomInputComponent: Component) => <From extends Record<PropertyKey, any>, To extends Record<PropertyKey, any>>(...args: Parameters<typeof useOmegaForm<From, To>>) => import("./useOmegaForm").OmegaFormReturn<From, To, import("./OmegaFormStuff").DefaultInputProps<From>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { default as OmegaInput } from "./OmegaInput.vue";
|
|
2
1
|
export * as OmegaErrorsContext from "./OmegaErrorsContext";
|
|
3
2
|
export * from "./OmegaFormStuff";
|
|
4
3
|
export { type OmegaFormReturn, useOmegaForm } from "./useOmegaForm";
|
|
4
|
+
export { default as OmegaInput } from "./OmegaInput.vue";
|
|
5
5
|
export { default as OmegaVuetifyInput } from "./OmegaInternalInput.vue";
|
|
6
6
|
export { getInputType } from "./OmegaFormStuff";
|
|
7
|
-
export {
|
|
7
|
+
export { createUseFormWithCustomInput } from "./createUseFormWithCustomInput";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as o from "./vue-components.es2.js";
|
|
2
|
-
import { getTransformationFrom as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
2
|
+
import { getTransformationFrom as s, provideIntl as u, useIntl as c, useIntlKey as i } from "./vue-components.es3.js";
|
|
3
|
+
import { default as x } from "./vue-components.es4.js";
|
|
4
|
+
import { default as I } from "./vue-components.es5.js";
|
|
5
5
|
import * as n from "./vue-components.es6.js";
|
|
6
6
|
import { useOmegaForm as y } from "./vue-components.es7.js";
|
|
7
|
-
import { createMeta as
|
|
7
|
+
import { createMeta as O, duplicateSchema as h, generateInputStandardSchemaFromFieldMeta as S, generateMetaFromSchema as b, getInputType as M, nullableInput as j } from "./vue-components.es8.js";
|
|
8
|
+
import { createUseFormWithCustomInput as T } from "./vue-components.es9.js";
|
|
8
9
|
function a(r) {
|
|
9
10
|
for (const e in o)
|
|
10
11
|
if (Object.prototype.hasOwnProperty.call(o, e)) {
|
|
@@ -15,18 +16,19 @@ function a(r) {
|
|
|
15
16
|
const m = { install: a };
|
|
16
17
|
export {
|
|
17
18
|
n as OmegaErrorsContext,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
x as OmegaInput,
|
|
20
|
+
I as OmegaVuetifyInput,
|
|
21
|
+
O as createMeta,
|
|
22
|
+
T as createUseFormWithCustomInput,
|
|
21
23
|
m as default,
|
|
22
24
|
h as duplicateSchema,
|
|
23
25
|
S as generateInputStandardSchemaFromFieldMeta,
|
|
24
26
|
b as generateMetaFromSchema,
|
|
25
27
|
M as getInputType,
|
|
26
|
-
|
|
28
|
+
s as getTransformationFrom,
|
|
27
29
|
j as nullableInput,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
u as provideIntl,
|
|
31
|
+
c as useIntl,
|
|
32
|
+
i as useIntlKey,
|
|
31
33
|
y as useOmegaForm
|
|
32
34
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Exit as c, Runtime as s } from "effect";
|
|
2
|
-
import { dual as n, isFunction as m } from "./vue-components.
|
|
2
|
+
import { dual as n, isFunction as m } from "./vue-components.es22.js";
|
|
3
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
4
|
n(2, (e, t) => u(e, { ...e, ...m(t) ? t(e) : t }));
|
|
5
5
|
const b = (e) => new Promise((t, r) => e.addObserver((o) => {
|
|
@@ -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,7 +1,7 @@
|
|
|
1
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.
|
|
2
|
+
import r from "./vue-components.es25.js";
|
|
3
3
|
|
|
4
|
-
import o from "./vue-components.
|
|
4
|
+
import o from "./vue-components.es27.js";
|
|
5
5
|
const m = /* @__PURE__ */ o(r, [["__scopeId", "data-v-193816ae"]]);
|
|
6
6
|
export {
|
|
7
7
|
m as default
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var n=document.createElement("style");if(n.appendChild(document.createTextNode("fieldset[data-v-
|
|
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-8d0c5c48]{display:contents}fieldset[disabled][data-v-8d0c5c48]>*{pointer-events:none}")),document.head.appendChild(n),window.customElements){const e=window.customElements.define;window.customElements.define=function(c,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-8d0c5c48]{display:contents}fieldset[disabled][data-v-8d0c5c48]>*{pointer-events:none}")),this.shadowRoot.appendChild(o)}},e.call(window.customElements,c,t)}}}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import o from "./vue-components.es28.js";
|
|
3
3
|
|
|
4
|
-
import m from "./vue-components.
|
|
5
|
-
const
|
|
4
|
+
import m from "./vue-components.es27.js";
|
|
5
|
+
const c = /* @__PURE__ */ m(o, [["__scopeId", "data-v-8d0c5c48"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
c as default
|
|
8
8
|
};
|