@teamnovu/kit-vue-forms 0.0.6 → 0.0.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.
|
@@ -3,11 +3,11 @@ import { Paths, PickProps } from '../types/util.ts';
|
|
|
3
3
|
import { UseFieldOptions } from '../composables/useField.ts';
|
|
4
4
|
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
|
|
5
5
|
import { ValidationErrors, ErrorMessage } from '../index.js';
|
|
6
|
-
export interface FieldProps<
|
|
6
|
+
export interface FieldProps<TData extends object, TPath extends string> extends UseFieldOptions<PickProps<TData, TPath>, TPath> {
|
|
7
7
|
form: Form<TData>;
|
|
8
8
|
}
|
|
9
|
-
declare const _default: <TPath extends Paths<TData
|
|
10
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & FieldProps<
|
|
9
|
+
declare const _default: <TData extends object, TPath extends Paths<TData>>(__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
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & FieldProps<TData, TPath> & Partial<{}>> & PublicProps;
|
|
11
11
|
expose(exposed: ShallowUnwrapRef<{}>): void;
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: {
|
package/package.json
CHANGED
package/src/components/Field.vue
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
<script
|
|
6
6
|
setup lang="ts"
|
|
7
|
-
generic="TPath extends Paths<TData
|
|
7
|
+
generic="TData extends object, TPath extends Paths<TData>"
|
|
8
8
|
>
|
|
9
9
|
import type { Form } from '../types/form.ts'
|
|
10
10
|
import type { Paths, PickProps } from '../types/util.ts'
|
|
11
11
|
import type { UseFieldOptions } from '../composables/useField.ts'
|
|
12
12
|
|
|
13
|
-
export interface FieldProps<
|
|
13
|
+
export interface FieldProps<TData extends object, TPath extends string> extends UseFieldOptions<PickProps<TData, TPath>, TPath> {
|
|
14
14
|
form: Form<TData>
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const props = defineProps<FieldProps<
|
|
17
|
+
const props = defineProps<FieldProps<TData, TPath>>()
|
|
18
18
|
|
|
19
19
|
const field = props.form.defineField({
|
|
20
20
|
path: props.path,
|