Tracking de l'application VApp (IHM du jeu)

This commit is contained in:
2025-05-11 18:04:12 +02:00
commit 89e9db9b62
17763 changed files with 3718499 additions and 0 deletions

View File

@ -0,0 +1,60 @@
import { createVNode as _createVNode } from "vue";
// Composables
import { makeComponentProps } from "../../composables/component.mjs";
import { createForm, makeFormProps } from "../../composables/form.mjs";
import { forwardRefs } from "../../composables/forwardRefs.mjs"; // Utilities
import { ref } from 'vue';
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
export const makeVFormProps = propsFactory({
...makeComponentProps(),
...makeFormProps()
}, 'VForm');
export const VForm = genericComponent()({
name: 'VForm',
props: makeVFormProps(),
emits: {
'update:modelValue': val => true,
submit: e => true
},
setup(props, _ref) {
let {
slots,
emit
} = _ref;
const form = createForm(props);
const formRef = ref();
function onReset(e) {
e.preventDefault();
form.reset();
}
function onSubmit(_e) {
const e = _e;
const ready = form.validate();
e.then = ready.then.bind(ready);
e.catch = ready.catch.bind(ready);
e.finally = ready.finally.bind(ready);
emit('submit', e);
if (!e.defaultPrevented) {
ready.then(_ref2 => {
let {
valid
} = _ref2;
if (valid) {
formRef.value?.submit();
}
});
}
e.preventDefault();
}
useRender(() => _createVNode("form", {
"ref": formRef,
"class": ['v-form', props.class],
"style": props.style,
"novalidate": true,
"onReset": onReset,
"onSubmit": onSubmit
}, [slots.default?.(form)]));
return forwardRefs(form, formRef);
}
});
//# sourceMappingURL=VForm.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VForm.mjs","names":["makeComponentProps","createForm","makeFormProps","forwardRefs","ref","genericComponent","propsFactory","useRender","makeVFormProps","VForm","name","props","emits","val","submit","e","setup","_ref","slots","emit","form","formRef","onReset","preventDefault","reset","onSubmit","_e","ready","validate","then","bind","catch","finally","defaultPrevented","_ref2","valid","value","_createVNode","class","style","default"],"sources":["../../../src/components/VForm/VForm.tsx"],"sourcesContent":["// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { createForm, makeFormProps } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\n\n// Utilities\nimport { ref } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { SubmitEventPromise } from '@/composables/form'\n\nexport const makeVFormProps = propsFactory({\n ...makeComponentProps(),\n ...makeFormProps(),\n}, 'VForm')\n\ntype VFormSlots = {\n default: ReturnType<typeof createForm>\n}\n\nexport const VForm = genericComponent<VFormSlots>()({\n name: 'VForm',\n\n props: makeVFormProps(),\n\n emits: {\n 'update:modelValue': (val: boolean | null) => true,\n submit: (e: SubmitEventPromise) => true,\n },\n\n setup (props, { slots, emit }) {\n const form = createForm(props)\n const formRef = ref<HTMLFormElement>()\n\n function onReset (e: Event) {\n e.preventDefault()\n form.reset()\n }\n\n function onSubmit (_e: Event) {\n const e = _e as SubmitEventPromise\n\n const ready = form.validate()\n e.then = ready.then.bind(ready)\n e.catch = ready.catch.bind(ready)\n e.finally = ready.finally.bind(ready)\n\n emit('submit', e)\n\n if (!e.defaultPrevented) {\n ready.then(({ valid }) => {\n if (valid) {\n formRef.value?.submit()\n }\n })\n }\n\n e.preventDefault()\n }\n\n useRender(() => ((\n <form\n ref={ formRef }\n class={[\n 'v-form',\n props.class,\n ]}\n style={ props.style }\n novalidate\n onReset={ onReset }\n onSubmit={ onSubmit }\n >\n { slots.default?.(form) }\n </form>\n )))\n\n return forwardRefs(form, formRef)\n },\n})\n\nexport type VForm = InstanceType<typeof VForm>\n"],"mappings":";AAAA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,UAAU,EAAEC,aAAa;AAAA,SACzBC,WAAW,6CAEpB;AACA,SAASC,GAAG,QAAQ,KAAK;AAAA,SAChBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAGA,OAAO,MAAMC,cAAc,GAAGF,YAAY,CAAC;EACzC,GAAGN,kBAAkB,CAAC,CAAC;EACvB,GAAGE,aAAa,CAAC;AACnB,CAAC,EAAE,OAAO,CAAC;AAMX,OAAO,MAAMO,KAAK,GAAGJ,gBAAgB,CAAa,CAAC,CAAC;EAClDK,IAAI,EAAE,OAAO;EAEbC,KAAK,EAAEH,cAAc,CAAC,CAAC;EAEvBI,KAAK,EAAE;IACL,mBAAmB,EAAGC,GAAmB,IAAK,IAAI;IAClDC,MAAM,EAAGC,CAAqB,IAAK;EACrC,CAAC;EAEDC,KAAKA,CAAEL,KAAK,EAAAM,IAAA,EAAmB;IAAA,IAAjB;MAAEC,KAAK;MAAEC;IAAK,CAAC,GAAAF,IAAA;IAC3B,MAAMG,IAAI,GAAGnB,UAAU,CAACU,KAAK,CAAC;IAC9B,MAAMU,OAAO,GAAGjB,GAAG,CAAkB,CAAC;IAEtC,SAASkB,OAAOA,CAAEP,CAAQ,EAAE;MAC1BA,CAAC,CAACQ,cAAc,CAAC,CAAC;MAClBH,IAAI,CAACI,KAAK,CAAC,CAAC;IACd;IAEA,SAASC,QAAQA,CAAEC,EAAS,EAAE;MAC5B,MAAMX,CAAC,GAAGW,EAAwB;MAElC,MAAMC,KAAK,GAAGP,IAAI,CAACQ,QAAQ,CAAC,CAAC;MAC7Bb,CAAC,CAACc,IAAI,GAAGF,KAAK,CAACE,IAAI,CAACC,IAAI,CAACH,KAAK,CAAC;MAC/BZ,CAAC,CAACgB,KAAK,GAAGJ,KAAK,CAACI,KAAK,CAACD,IAAI,CAACH,KAAK,CAAC;MACjCZ,CAAC,CAACiB,OAAO,GAAGL,KAAK,CAACK,OAAO,CAACF,IAAI,CAACH,KAAK,CAAC;MAErCR,IAAI,CAAC,QAAQ,EAAEJ,CAAC,CAAC;MAEjB,IAAI,CAACA,CAAC,CAACkB,gBAAgB,EAAE;QACvBN,KAAK,CAACE,IAAI,CAACK,KAAA,IAAe;UAAA,IAAd;YAAEC;UAAM,CAAC,GAAAD,KAAA;UACnB,IAAIC,KAAK,EAAE;YACTd,OAAO,CAACe,KAAK,EAAEtB,MAAM,CAAC,CAAC;UACzB;QACF,CAAC,CAAC;MACJ;MAEAC,CAAC,CAACQ,cAAc,CAAC,CAAC;IACpB;IAEAhB,SAAS,CAAC,MAAA8B,YAAA;MAAA,OAEAhB,OAAO;MAAA,SACN,CACL,QAAQ,EACRV,KAAK,CAAC2B,KAAK,CACZ;MAAA,SACO3B,KAAK,CAAC4B,KAAK;MAAA;MAAA,WAETjB,OAAO;MAAA,YACNG;IAAQ,IAEjBP,KAAK,CAACsB,OAAO,GAAGpB,IAAI,CAAC,EAEzB,CAAC;IAEH,OAAOjB,WAAW,CAACiB,IAAI,EAAEC,OAAO,CAAC;EACnC;AACF,CAAC,CAAC"}

View File

@ -0,0 +1,775 @@
import * as vue from 'vue';
import { ComponentPropsOptions, ExtractPropTypes } from 'vue';
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
}
interface FieldValidationResult {
id: number | string;
errorMessages: string[];
}
interface FormValidationResult {
valid: boolean;
errors: FieldValidationResult[];
}
interface SubmitEventPromise extends SubmitEvent, Promise<FormValidationResult> {
}
declare const VForm: {
new (...args: any[]): vue.CreateComponentPublicInstance<{
style: vue.StyleValue;
disabled: boolean;
readonly: boolean;
modelValue: boolean | null;
validateOn: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
fastFail: boolean;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | {
default?: ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild);
'v-slots'?: {
default?: false | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} & {
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
}, {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
} & HTMLFormElement, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
'update:modelValue': (val: boolean | null) => true;
submit: (e: SubmitEventPromise) => true;
}, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
style: vue.StyleValue;
disabled: boolean;
readonly: boolean;
modelValue: boolean | null;
validateOn: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
fastFail: boolean;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | {
default?: ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild);
'v-slots'?: {
default?: false | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} & {
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
}, {
style: vue.StyleValue;
disabled: boolean;
readonly: boolean;
modelValue: boolean | null;
validateOn: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
fastFail: boolean;
}, true, {}, vue.SlotsType<Partial<{
default: (arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, {
style: vue.StyleValue;
disabled: boolean;
readonly: boolean;
modelValue: boolean | null;
validateOn: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
fastFail: boolean;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | {
default?: ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild);
'v-slots'?: {
default?: false | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} & {
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
}, {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
} & HTMLFormElement, {}, {}, {}, {
style: vue.StyleValue;
disabled: boolean;
readonly: boolean;
modelValue: boolean | null;
validateOn: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
fastFail: boolean;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & vue.ComponentOptionsBase<{
style: vue.StyleValue;
disabled: boolean;
readonly: boolean;
modelValue: boolean | null;
validateOn: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
fastFail: boolean;
} & {
class?: any;
} & {
$children?: vue.VNodeChild | {
default?: ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild);
'v-slots'?: {
default?: false | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} | undefined;
} & {
"v-slot:default"?: false | ((arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNodeChild) | undefined;
} & {
onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
"onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
}, {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
} & HTMLFormElement, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
'update:modelValue': (val: boolean | null) => true;
submit: (e: SubmitEventPromise) => true;
}, string, {
style: vue.StyleValue;
disabled: boolean;
readonly: boolean;
modelValue: boolean | null;
validateOn: "lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined;
fastFail: boolean;
}, {}, string, vue.SlotsType<Partial<{
default: (arg: {
errors: vue.Ref<{
id: string | number;
errorMessages: string[];
}[]>;
isDisabled: vue.ComputedRef<boolean>;
isReadonly: vue.ComputedRef<boolean>;
isValidating: vue.ShallowRef<boolean>;
isValid: vue.Ref<boolean | null> & {
readonly externalValue: boolean | null;
};
items: vue.Ref<{
id: string | number;
validate: () => Promise<string[]>;
reset: () => void;
resetValidation: () => void;
isValid: boolean | null;
errorMessages: string[];
}[]>;
validate: () => Promise<{
valid: boolean;
errors: {
id: string | number;
errorMessages: string[];
}[];
}>;
reset: () => void;
resetValidation: () => void;
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>[];
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
disabled: BooleanConstructor;
fastFail: BooleanConstructor;
readonly: BooleanConstructor;
modelValue: {
type: vue.PropType<boolean | null>;
default: null;
};
validateOn: {
type: vue.PropType<"lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined>;
default: string;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
}, vue.ExtractPropTypes<{
disabled: BooleanConstructor;
fastFail: BooleanConstructor;
readonly: BooleanConstructor;
modelValue: {
type: vue.PropType<boolean | null>;
default: null;
};
validateOn: {
type: vue.PropType<"lazy" | ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | undefined>;
default: string;
};
class: vue.PropType<any>;
style: {
type: vue.PropType<vue.StyleValue>;
default: null;
};
}>>;
type VForm = InstanceType<typeof VForm>;
export { VForm };

View File

@ -0,0 +1,2 @@
export { VForm } from "./VForm.mjs";
//# sourceMappingURL=index.mjs.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.mjs","names":["VForm"],"sources":["../../../src/components/VForm/index.ts"],"sourcesContent":["export { VForm } from './VForm'\n"],"mappings":"SAASA,KAAK"}