@bagelink/vue 1.10.5 → 1.10.7
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/form-flow/FormFlow.vue.d.ts +15 -5
- package/dist/form-flow/FormFlow.vue.d.ts.map +1 -1
- package/dist/index.cjs +38 -38
- package/dist/index.mjs +5705 -5703
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/form-flow/FormFlow.vue +27 -22
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { SchemaDefinition, FieldBuilder } from './form-flow';
|
|
2
|
+
export type FormState = 'idle' | 'submitting' | 'success' | 'error';
|
|
2
3
|
export interface Props<T extends Record<string, any> = Record<string, any>> {
|
|
3
4
|
schema: SchemaDefinition;
|
|
4
5
|
modelValue?: T;
|
|
5
6
|
components?: Record<string, any>;
|
|
6
7
|
/** External validation errors (from parent MultiStepForm) */
|
|
7
8
|
errors?: Record<string, string>;
|
|
9
|
+
/** Async submit handler — use @submit="fn" to bind. FormFlow awaits it and manages formState. */
|
|
10
|
+
onSubmit?: (data: T) => Promise<void> | void;
|
|
8
11
|
}
|
|
9
12
|
declare const _default: <T extends Record<string, 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<{
|
|
10
13
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
11
14
|
readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
12
|
-
|
|
13
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onSubmit" | "onUpdate:modelValue"> & Props<T> & Partial<{}>> & import('vue').PublicProps;
|
|
15
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & Props<T> & Partial<{}>> & import('vue').PublicProps;
|
|
14
16
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
15
17
|
validate: () => boolean;
|
|
16
|
-
|
|
18
|
+
submit: (event?: Event) => Promise<boolean>;
|
|
19
|
+
formState: import('vue').Ref<FormState, FormState>;
|
|
17
20
|
}>): void;
|
|
18
21
|
attrs: any;
|
|
19
22
|
slots: Partial<Record<`field:${string}`, (_: {
|
|
@@ -32,13 +35,20 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
32
35
|
}[];
|
|
33
36
|
}): any;
|
|
34
37
|
submit?(_: {
|
|
35
|
-
submit: (event?: Event) => boolean
|
|
38
|
+
submit: (event?: Event) => Promise<boolean>;
|
|
36
39
|
validate: () => boolean;
|
|
37
40
|
formData: any;
|
|
38
41
|
errors: Record<string, string>;
|
|
42
|
+
formState: FormState;
|
|
43
|
+
}): any;
|
|
44
|
+
success?(_: {
|
|
45
|
+
formData: any;
|
|
46
|
+
}): any;
|
|
47
|
+
error?(_: {
|
|
48
|
+
formData: any;
|
|
39
49
|
}): any;
|
|
40
50
|
};
|
|
41
|
-
emit: (
|
|
51
|
+
emit: (evt: "update:modelValue", value: T) => void;
|
|
42
52
|
}>) => import('vue').VNode & {
|
|
43
53
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
44
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFlow.vue.d.ts","sourceRoot":"","sources":["../../src/form-flow/FormFlow.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"FormFlow.vue.d.ts","sourceRoot":"","sources":["../../src/form-flow/FormFlow.vue"],"names":[],"mappings":"AAAA,OA2iBO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAuBjE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,CAAA;AAEnE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