index.d.mts 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918
  1. import * as vue from 'vue';
  2. import { ComponentPropsOptions, ExtractPropTypes, PropType } from 'vue';
  3. interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
  4. filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
  5. }
  6. type ClassValue = any;
  7. type EventProp<T extends any[] = any[], F = (...args: T) => void> = F;
  8. declare const EventProp: <T extends any[] = any[]>() => PropType<EventProp<T>>;
  9. type ValidationResult = string | boolean;
  10. type ValidationRule = ValidationResult | PromiseLike<ValidationResult> | ((value: any) => ValidationResult) | ((value: any) => PromiseLike<ValidationResult>);
  11. type ValidateOnValue = 'blur' | 'input' | 'submit' | 'invalid-input';
  12. type ValidateOn = ValidateOnValue | `${ValidateOnValue} lazy` | `${ValidateOnValue} eager` | `lazy ${ValidateOnValue}` | `eager ${ValidateOnValue}` | 'lazy' | 'eager';
  13. interface ValidationProps {
  14. disabled: boolean | null;
  15. error: boolean;
  16. errorMessages: string | readonly string[] | null;
  17. focused: boolean;
  18. maxErrors: string | number;
  19. name: string | undefined;
  20. label: string | undefined;
  21. readonly: boolean | null;
  22. rules: readonly ValidationRule[];
  23. modelValue: any;
  24. 'onUpdate:modelValue': EventProp | undefined;
  25. validateOn?: ValidateOn;
  26. validationValue: any;
  27. }
  28. interface FieldValidationResult {
  29. id: number | string;
  30. errorMessages: string[];
  31. }
  32. interface FormValidationResult {
  33. valid: boolean;
  34. errors: FieldValidationResult[];
  35. }
  36. interface SubmitEventPromise extends SubmitEvent, Promise<FormValidationResult> {
  37. }
  38. interface FormProps {
  39. disabled: boolean;
  40. fastFail: boolean;
  41. readonly: boolean;
  42. modelValue: boolean | null;
  43. 'onUpdate:modelValue': EventProp<[boolean | null]> | undefined;
  44. validateOn: ValidationProps['validateOn'];
  45. }
  46. declare const VForm: {
  47. new (...args: any[]): vue.CreateComponentPublicInstance<{
  48. style: vue.StyleValue;
  49. disabled: boolean;
  50. readonly: boolean;
  51. modelValue: boolean | null;
  52. validateOn: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
  53. fastFail: boolean;
  54. } & {
  55. class?: any;
  56. } & {
  57. $children?: vue.VNodeChild | {
  58. default?: ((arg: {
  59. errors: vue.Ref<{
  60. id: number | string;
  61. errorMessages: string[];
  62. }[]>;
  63. isDisabled: vue.ComputedRef<boolean>;
  64. isReadonly: vue.ComputedRef<boolean>;
  65. isValidating: vue.ShallowRef<boolean>;
  66. isValid: vue.Ref<boolean | null> & {
  67. readonly externalValue: boolean | null;
  68. };
  69. items: vue.Ref<{
  70. id: number | string;
  71. validate: () => Promise<string[]>;
  72. reset: () => Promise<void>;
  73. resetValidation: () => Promise<void>;
  74. vm: vue.Raw<vue.ComponentInternalInstance>;
  75. isValid: boolean | null;
  76. errorMessages: string[];
  77. }[]>;
  78. validate: () => Promise<{
  79. valid: boolean;
  80. errors: {
  81. id: number | string;
  82. errorMessages: string[];
  83. }[];
  84. }>;
  85. reset: () => void;
  86. resetValidation: () => void;
  87. }) => vue.VNodeChild) | undefined;
  88. } | ((arg: {
  89. errors: vue.Ref<{
  90. id: number | string;
  91. errorMessages: string[];
  92. }[]>;
  93. isDisabled: vue.ComputedRef<boolean>;
  94. isReadonly: vue.ComputedRef<boolean>;
  95. isValidating: vue.ShallowRef<boolean>;
  96. isValid: vue.Ref<boolean | null> & {
  97. readonly externalValue: boolean | null;
  98. };
  99. items: vue.Ref<{
  100. id: number | string;
  101. validate: () => Promise<string[]>;
  102. reset: () => Promise<void>;
  103. resetValidation: () => Promise<void>;
  104. vm: vue.Raw<vue.ComponentInternalInstance>;
  105. isValid: boolean | null;
  106. errorMessages: string[];
  107. }[]>;
  108. validate: () => Promise<{
  109. valid: boolean;
  110. errors: {
  111. id: number | string;
  112. errorMessages: string[];
  113. }[];
  114. }>;
  115. reset: () => void;
  116. resetValidation: () => void;
  117. }) => vue.VNodeChild);
  118. 'v-slots'?: {
  119. default?: false | ((arg: {
  120. errors: vue.Ref<{
  121. id: number | string;
  122. errorMessages: string[];
  123. }[]>;
  124. isDisabled: vue.ComputedRef<boolean>;
  125. isReadonly: vue.ComputedRef<boolean>;
  126. isValidating: vue.ShallowRef<boolean>;
  127. isValid: vue.Ref<boolean | null> & {
  128. readonly externalValue: boolean | null;
  129. };
  130. items: vue.Ref<{
  131. id: number | string;
  132. validate: () => Promise<string[]>;
  133. reset: () => Promise<void>;
  134. resetValidation: () => Promise<void>;
  135. vm: vue.Raw<vue.ComponentInternalInstance>;
  136. isValid: boolean | null;
  137. errorMessages: string[];
  138. }[]>;
  139. validate: () => Promise<{
  140. valid: boolean;
  141. errors: {
  142. id: number | string;
  143. errorMessages: string[];
  144. }[];
  145. }>;
  146. reset: () => void;
  147. resetValidation: () => void;
  148. }) => vue.VNodeChild) | undefined;
  149. } | undefined;
  150. } & {
  151. "v-slot:default"?: false | ((arg: {
  152. errors: vue.Ref<{
  153. id: number | string;
  154. errorMessages: string[];
  155. }[]>;
  156. isDisabled: vue.ComputedRef<boolean>;
  157. isReadonly: vue.ComputedRef<boolean>;
  158. isValidating: vue.ShallowRef<boolean>;
  159. isValid: vue.Ref<boolean | null> & {
  160. readonly externalValue: boolean | null;
  161. };
  162. items: vue.Ref<{
  163. id: number | string;
  164. validate: () => Promise<string[]>;
  165. reset: () => Promise<void>;
  166. resetValidation: () => Promise<void>;
  167. vm: vue.Raw<vue.ComponentInternalInstance>;
  168. isValid: boolean | null;
  169. errorMessages: string[];
  170. }[]>;
  171. validate: () => Promise<{
  172. valid: boolean;
  173. errors: {
  174. id: number | string;
  175. errorMessages: string[];
  176. }[];
  177. }>;
  178. reset: () => void;
  179. resetValidation: () => void;
  180. }) => vue.VNodeChild) | undefined;
  181. } & {
  182. onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
  183. "onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
  184. }, {
  185. errors: vue.Ref<{
  186. id: number | string;
  187. errorMessages: string[];
  188. }[]>;
  189. isDisabled: vue.ComputedRef<boolean>;
  190. isReadonly: vue.ComputedRef<boolean>;
  191. isValidating: vue.ShallowRef<boolean>;
  192. isValid: vue.Ref<boolean | null> & {
  193. readonly externalValue: boolean | null;
  194. };
  195. items: vue.Ref<{
  196. id: number | string;
  197. validate: () => Promise<string[]>;
  198. reset: () => Promise<void>;
  199. resetValidation: () => Promise<void>;
  200. vm: vue.Raw<vue.ComponentInternalInstance>;
  201. isValid: boolean | null;
  202. errorMessages: string[];
  203. }[]>;
  204. validate: () => Promise<{
  205. valid: boolean;
  206. errors: {
  207. id: number | string;
  208. errorMessages: string[];
  209. }[];
  210. }>;
  211. reset: () => void;
  212. resetValidation: () => void;
  213. } & HTMLFormElement & {
  214. _allExposed: {
  215. errors: vue.Ref<{
  216. id: number | string;
  217. errorMessages: string[];
  218. }[]>;
  219. isDisabled: vue.ComputedRef<boolean>;
  220. isReadonly: vue.ComputedRef<boolean>;
  221. isValidating: vue.ShallowRef<boolean>;
  222. isValid: vue.Ref<boolean | null> & {
  223. readonly externalValue: boolean | null;
  224. };
  225. items: vue.Ref<{
  226. id: number | string;
  227. validate: () => Promise<string[]>;
  228. reset: () => Promise<void>;
  229. resetValidation: () => Promise<void>;
  230. vm: vue.Raw<vue.ComponentInternalInstance>;
  231. isValid: boolean | null;
  232. errorMessages: string[];
  233. }[]>;
  234. validate: () => Promise<{
  235. valid: boolean;
  236. errors: {
  237. id: number | string;
  238. errorMessages: string[];
  239. }[];
  240. }>;
  241. reset: () => void;
  242. resetValidation: () => void;
  243. };
  244. }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
  245. 'update:modelValue': (val: boolean | null) => true;
  246. submit: (e: SubmitEventPromise) => true;
  247. }, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
  248. style: vue.StyleValue;
  249. disabled: boolean;
  250. readonly: boolean;
  251. modelValue: boolean | null;
  252. validateOn: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
  253. fastFail: boolean;
  254. } & {
  255. class?: any;
  256. } & {
  257. $children?: vue.VNodeChild | {
  258. default?: ((arg: {
  259. errors: vue.Ref<{
  260. id: number | string;
  261. errorMessages: string[];
  262. }[]>;
  263. isDisabled: vue.ComputedRef<boolean>;
  264. isReadonly: vue.ComputedRef<boolean>;
  265. isValidating: vue.ShallowRef<boolean>;
  266. isValid: vue.Ref<boolean | null> & {
  267. readonly externalValue: boolean | null;
  268. };
  269. items: vue.Ref<{
  270. id: number | string;
  271. validate: () => Promise<string[]>;
  272. reset: () => Promise<void>;
  273. resetValidation: () => Promise<void>;
  274. vm: vue.Raw<vue.ComponentInternalInstance>;
  275. isValid: boolean | null;
  276. errorMessages: string[];
  277. }[]>;
  278. validate: () => Promise<{
  279. valid: boolean;
  280. errors: {
  281. id: number | string;
  282. errorMessages: string[];
  283. }[];
  284. }>;
  285. reset: () => void;
  286. resetValidation: () => void;
  287. }) => vue.VNodeChild) | undefined;
  288. } | ((arg: {
  289. errors: vue.Ref<{
  290. id: number | string;
  291. errorMessages: string[];
  292. }[]>;
  293. isDisabled: vue.ComputedRef<boolean>;
  294. isReadonly: vue.ComputedRef<boolean>;
  295. isValidating: vue.ShallowRef<boolean>;
  296. isValid: vue.Ref<boolean | null> & {
  297. readonly externalValue: boolean | null;
  298. };
  299. items: vue.Ref<{
  300. id: number | string;
  301. validate: () => Promise<string[]>;
  302. reset: () => Promise<void>;
  303. resetValidation: () => Promise<void>;
  304. vm: vue.Raw<vue.ComponentInternalInstance>;
  305. isValid: boolean | null;
  306. errorMessages: string[];
  307. }[]>;
  308. validate: () => Promise<{
  309. valid: boolean;
  310. errors: {
  311. id: number | string;
  312. errorMessages: string[];
  313. }[];
  314. }>;
  315. reset: () => void;
  316. resetValidation: () => void;
  317. }) => vue.VNodeChild);
  318. 'v-slots'?: {
  319. default?: false | ((arg: {
  320. errors: vue.Ref<{
  321. id: number | string;
  322. errorMessages: string[];
  323. }[]>;
  324. isDisabled: vue.ComputedRef<boolean>;
  325. isReadonly: vue.ComputedRef<boolean>;
  326. isValidating: vue.ShallowRef<boolean>;
  327. isValid: vue.Ref<boolean | null> & {
  328. readonly externalValue: boolean | null;
  329. };
  330. items: vue.Ref<{
  331. id: number | string;
  332. validate: () => Promise<string[]>;
  333. reset: () => Promise<void>;
  334. resetValidation: () => Promise<void>;
  335. vm: vue.Raw<vue.ComponentInternalInstance>;
  336. isValid: boolean | null;
  337. errorMessages: string[];
  338. }[]>;
  339. validate: () => Promise<{
  340. valid: boolean;
  341. errors: {
  342. id: number | string;
  343. errorMessages: string[];
  344. }[];
  345. }>;
  346. reset: () => void;
  347. resetValidation: () => void;
  348. }) => vue.VNodeChild) | undefined;
  349. } | undefined;
  350. } & {
  351. "v-slot:default"?: false | ((arg: {
  352. errors: vue.Ref<{
  353. id: number | string;
  354. errorMessages: string[];
  355. }[]>;
  356. isDisabled: vue.ComputedRef<boolean>;
  357. isReadonly: vue.ComputedRef<boolean>;
  358. isValidating: vue.ShallowRef<boolean>;
  359. isValid: vue.Ref<boolean | null> & {
  360. readonly externalValue: boolean | null;
  361. };
  362. items: vue.Ref<{
  363. id: number | string;
  364. validate: () => Promise<string[]>;
  365. reset: () => Promise<void>;
  366. resetValidation: () => Promise<void>;
  367. vm: vue.Raw<vue.ComponentInternalInstance>;
  368. isValid: boolean | null;
  369. errorMessages: string[];
  370. }[]>;
  371. validate: () => Promise<{
  372. valid: boolean;
  373. errors: {
  374. id: number | string;
  375. errorMessages: string[];
  376. }[];
  377. }>;
  378. reset: () => void;
  379. resetValidation: () => void;
  380. }) => vue.VNodeChild) | undefined;
  381. } & {
  382. onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
  383. "onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
  384. }, {
  385. style: vue.StyleValue;
  386. disabled: boolean;
  387. readonly: boolean;
  388. modelValue: boolean | null;
  389. validateOn: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
  390. fastFail: boolean;
  391. }, true, {}, vue.SlotsType<Partial<{
  392. default: (arg: {
  393. errors: vue.Ref<{
  394. id: number | string;
  395. errorMessages: string[];
  396. }[]>;
  397. isDisabled: vue.ComputedRef<boolean>;
  398. isReadonly: vue.ComputedRef<boolean>;
  399. isValidating: vue.ShallowRef<boolean>;
  400. isValid: vue.Ref<boolean | null> & {
  401. readonly externalValue: boolean | null;
  402. };
  403. items: vue.Ref<{
  404. id: number | string;
  405. validate: () => Promise<string[]>;
  406. reset: () => Promise<void>;
  407. resetValidation: () => Promise<void>;
  408. vm: vue.Raw<vue.ComponentInternalInstance>;
  409. isValid: boolean | null;
  410. errorMessages: string[];
  411. }[]>;
  412. validate: () => Promise<{
  413. valid: boolean;
  414. errors: {
  415. id: number | string;
  416. errorMessages: string[];
  417. }[];
  418. }>;
  419. reset: () => void;
  420. resetValidation: () => void;
  421. }) => vue.VNode[];
  422. }>>, {
  423. P: {};
  424. B: {};
  425. D: {};
  426. C: {};
  427. M: {};
  428. Defaults: {};
  429. }, {
  430. style: vue.StyleValue;
  431. disabled: boolean;
  432. readonly: boolean;
  433. modelValue: boolean | null;
  434. validateOn: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
  435. fastFail: boolean;
  436. } & {
  437. class?: any;
  438. } & {
  439. $children?: vue.VNodeChild | {
  440. default?: ((arg: {
  441. errors: vue.Ref<{
  442. id: number | string;
  443. errorMessages: string[];
  444. }[]>;
  445. isDisabled: vue.ComputedRef<boolean>;
  446. isReadonly: vue.ComputedRef<boolean>;
  447. isValidating: vue.ShallowRef<boolean>;
  448. isValid: vue.Ref<boolean | null> & {
  449. readonly externalValue: boolean | null;
  450. };
  451. items: vue.Ref<{
  452. id: number | string;
  453. validate: () => Promise<string[]>;
  454. reset: () => Promise<void>;
  455. resetValidation: () => Promise<void>;
  456. vm: vue.Raw<vue.ComponentInternalInstance>;
  457. isValid: boolean | null;
  458. errorMessages: string[];
  459. }[]>;
  460. validate: () => Promise<{
  461. valid: boolean;
  462. errors: {
  463. id: number | string;
  464. errorMessages: string[];
  465. }[];
  466. }>;
  467. reset: () => void;
  468. resetValidation: () => void;
  469. }) => vue.VNodeChild) | undefined;
  470. } | ((arg: {
  471. errors: vue.Ref<{
  472. id: number | string;
  473. errorMessages: string[];
  474. }[]>;
  475. isDisabled: vue.ComputedRef<boolean>;
  476. isReadonly: vue.ComputedRef<boolean>;
  477. isValidating: vue.ShallowRef<boolean>;
  478. isValid: vue.Ref<boolean | null> & {
  479. readonly externalValue: boolean | null;
  480. };
  481. items: vue.Ref<{
  482. id: number | string;
  483. validate: () => Promise<string[]>;
  484. reset: () => Promise<void>;
  485. resetValidation: () => Promise<void>;
  486. vm: vue.Raw<vue.ComponentInternalInstance>;
  487. isValid: boolean | null;
  488. errorMessages: string[];
  489. }[]>;
  490. validate: () => Promise<{
  491. valid: boolean;
  492. errors: {
  493. id: number | string;
  494. errorMessages: string[];
  495. }[];
  496. }>;
  497. reset: () => void;
  498. resetValidation: () => void;
  499. }) => vue.VNodeChild);
  500. 'v-slots'?: {
  501. default?: false | ((arg: {
  502. errors: vue.Ref<{
  503. id: number | string;
  504. errorMessages: string[];
  505. }[]>;
  506. isDisabled: vue.ComputedRef<boolean>;
  507. isReadonly: vue.ComputedRef<boolean>;
  508. isValidating: vue.ShallowRef<boolean>;
  509. isValid: vue.Ref<boolean | null> & {
  510. readonly externalValue: boolean | null;
  511. };
  512. items: vue.Ref<{
  513. id: number | string;
  514. validate: () => Promise<string[]>;
  515. reset: () => Promise<void>;
  516. resetValidation: () => Promise<void>;
  517. vm: vue.Raw<vue.ComponentInternalInstance>;
  518. isValid: boolean | null;
  519. errorMessages: string[];
  520. }[]>;
  521. validate: () => Promise<{
  522. valid: boolean;
  523. errors: {
  524. id: number | string;
  525. errorMessages: string[];
  526. }[];
  527. }>;
  528. reset: () => void;
  529. resetValidation: () => void;
  530. }) => vue.VNodeChild) | undefined;
  531. } | undefined;
  532. } & {
  533. "v-slot:default"?: false | ((arg: {
  534. errors: vue.Ref<{
  535. id: number | string;
  536. errorMessages: string[];
  537. }[]>;
  538. isDisabled: vue.ComputedRef<boolean>;
  539. isReadonly: vue.ComputedRef<boolean>;
  540. isValidating: vue.ShallowRef<boolean>;
  541. isValid: vue.Ref<boolean | null> & {
  542. readonly externalValue: boolean | null;
  543. };
  544. items: vue.Ref<{
  545. id: number | string;
  546. validate: () => Promise<string[]>;
  547. reset: () => Promise<void>;
  548. resetValidation: () => Promise<void>;
  549. vm: vue.Raw<vue.ComponentInternalInstance>;
  550. isValid: boolean | null;
  551. errorMessages: string[];
  552. }[]>;
  553. validate: () => Promise<{
  554. valid: boolean;
  555. errors: {
  556. id: number | string;
  557. errorMessages: string[];
  558. }[];
  559. }>;
  560. reset: () => void;
  561. resetValidation: () => void;
  562. }) => vue.VNodeChild) | undefined;
  563. } & {
  564. onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
  565. "onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
  566. }, {
  567. errors: vue.Ref<{
  568. id: number | string;
  569. errorMessages: string[];
  570. }[]>;
  571. isDisabled: vue.ComputedRef<boolean>;
  572. isReadonly: vue.ComputedRef<boolean>;
  573. isValidating: vue.ShallowRef<boolean>;
  574. isValid: vue.Ref<boolean | null> & {
  575. readonly externalValue: boolean | null;
  576. };
  577. items: vue.Ref<{
  578. id: number | string;
  579. validate: () => Promise<string[]>;
  580. reset: () => Promise<void>;
  581. resetValidation: () => Promise<void>;
  582. vm: vue.Raw<vue.ComponentInternalInstance>;
  583. isValid: boolean | null;
  584. errorMessages: string[];
  585. }[]>;
  586. validate: () => Promise<{
  587. valid: boolean;
  588. errors: {
  589. id: number | string;
  590. errorMessages: string[];
  591. }[];
  592. }>;
  593. reset: () => void;
  594. resetValidation: () => void;
  595. } & HTMLFormElement & {
  596. _allExposed: {
  597. errors: vue.Ref<{
  598. id: number | string;
  599. errorMessages: string[];
  600. }[]>;
  601. isDisabled: vue.ComputedRef<boolean>;
  602. isReadonly: vue.ComputedRef<boolean>;
  603. isValidating: vue.ShallowRef<boolean>;
  604. isValid: vue.Ref<boolean | null> & {
  605. readonly externalValue: boolean | null;
  606. };
  607. items: vue.Ref<{
  608. id: number | string;
  609. validate: () => Promise<string[]>;
  610. reset: () => Promise<void>;
  611. resetValidation: () => Promise<void>;
  612. vm: vue.Raw<vue.ComponentInternalInstance>;
  613. isValid: boolean | null;
  614. errorMessages: string[];
  615. }[]>;
  616. validate: () => Promise<{
  617. valid: boolean;
  618. errors: {
  619. id: number | string;
  620. errorMessages: string[];
  621. }[];
  622. }>;
  623. reset: () => void;
  624. resetValidation: () => void;
  625. };
  626. }, {}, {}, {}, {
  627. style: vue.StyleValue;
  628. disabled: boolean;
  629. readonly: boolean;
  630. modelValue: boolean | null;
  631. validateOn: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
  632. fastFail: boolean;
  633. }>;
  634. __isFragment?: never;
  635. __isTeleport?: never;
  636. __isSuspense?: never;
  637. } & vue.ComponentOptionsBase<{
  638. style: vue.StyleValue;
  639. disabled: boolean;
  640. readonly: boolean;
  641. modelValue: boolean | null;
  642. validateOn: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
  643. fastFail: boolean;
  644. } & {
  645. class?: any;
  646. } & {
  647. $children?: vue.VNodeChild | {
  648. default?: ((arg: {
  649. errors: vue.Ref<{
  650. id: number | string;
  651. errorMessages: string[];
  652. }[]>;
  653. isDisabled: vue.ComputedRef<boolean>;
  654. isReadonly: vue.ComputedRef<boolean>;
  655. isValidating: vue.ShallowRef<boolean>;
  656. isValid: vue.Ref<boolean | null> & {
  657. readonly externalValue: boolean | null;
  658. };
  659. items: vue.Ref<{
  660. id: number | string;
  661. validate: () => Promise<string[]>;
  662. reset: () => Promise<void>;
  663. resetValidation: () => Promise<void>;
  664. vm: vue.Raw<vue.ComponentInternalInstance>;
  665. isValid: boolean | null;
  666. errorMessages: string[];
  667. }[]>;
  668. validate: () => Promise<{
  669. valid: boolean;
  670. errors: {
  671. id: number | string;
  672. errorMessages: string[];
  673. }[];
  674. }>;
  675. reset: () => void;
  676. resetValidation: () => void;
  677. }) => vue.VNodeChild) | undefined;
  678. } | ((arg: {
  679. errors: vue.Ref<{
  680. id: number | string;
  681. errorMessages: string[];
  682. }[]>;
  683. isDisabled: vue.ComputedRef<boolean>;
  684. isReadonly: vue.ComputedRef<boolean>;
  685. isValidating: vue.ShallowRef<boolean>;
  686. isValid: vue.Ref<boolean | null> & {
  687. readonly externalValue: boolean | null;
  688. };
  689. items: vue.Ref<{
  690. id: number | string;
  691. validate: () => Promise<string[]>;
  692. reset: () => Promise<void>;
  693. resetValidation: () => Promise<void>;
  694. vm: vue.Raw<vue.ComponentInternalInstance>;
  695. isValid: boolean | null;
  696. errorMessages: string[];
  697. }[]>;
  698. validate: () => Promise<{
  699. valid: boolean;
  700. errors: {
  701. id: number | string;
  702. errorMessages: string[];
  703. }[];
  704. }>;
  705. reset: () => void;
  706. resetValidation: () => void;
  707. }) => vue.VNodeChild);
  708. 'v-slots'?: {
  709. default?: false | ((arg: {
  710. errors: vue.Ref<{
  711. id: number | string;
  712. errorMessages: string[];
  713. }[]>;
  714. isDisabled: vue.ComputedRef<boolean>;
  715. isReadonly: vue.ComputedRef<boolean>;
  716. isValidating: vue.ShallowRef<boolean>;
  717. isValid: vue.Ref<boolean | null> & {
  718. readonly externalValue: boolean | null;
  719. };
  720. items: vue.Ref<{
  721. id: number | string;
  722. validate: () => Promise<string[]>;
  723. reset: () => Promise<void>;
  724. resetValidation: () => Promise<void>;
  725. vm: vue.Raw<vue.ComponentInternalInstance>;
  726. isValid: boolean | null;
  727. errorMessages: string[];
  728. }[]>;
  729. validate: () => Promise<{
  730. valid: boolean;
  731. errors: {
  732. id: number | string;
  733. errorMessages: string[];
  734. }[];
  735. }>;
  736. reset: () => void;
  737. resetValidation: () => void;
  738. }) => vue.VNodeChild) | undefined;
  739. } | undefined;
  740. } & {
  741. "v-slot:default"?: false | ((arg: {
  742. errors: vue.Ref<{
  743. id: number | string;
  744. errorMessages: string[];
  745. }[]>;
  746. isDisabled: vue.ComputedRef<boolean>;
  747. isReadonly: vue.ComputedRef<boolean>;
  748. isValidating: vue.ShallowRef<boolean>;
  749. isValid: vue.Ref<boolean | null> & {
  750. readonly externalValue: boolean | null;
  751. };
  752. items: vue.Ref<{
  753. id: number | string;
  754. validate: () => Promise<string[]>;
  755. reset: () => Promise<void>;
  756. resetValidation: () => Promise<void>;
  757. vm: vue.Raw<vue.ComponentInternalInstance>;
  758. isValid: boolean | null;
  759. errorMessages: string[];
  760. }[]>;
  761. validate: () => Promise<{
  762. valid: boolean;
  763. errors: {
  764. id: number | string;
  765. errorMessages: string[];
  766. }[];
  767. }>;
  768. reset: () => void;
  769. resetValidation: () => void;
  770. }) => vue.VNodeChild) | undefined;
  771. } & {
  772. onSubmit?: ((e: SubmitEventPromise) => any) | undefined;
  773. "onUpdate:modelValue"?: ((val: boolean | null) => any) | undefined;
  774. }, {
  775. errors: vue.Ref<{
  776. id: number | string;
  777. errorMessages: string[];
  778. }[]>;
  779. isDisabled: vue.ComputedRef<boolean>;
  780. isReadonly: vue.ComputedRef<boolean>;
  781. isValidating: vue.ShallowRef<boolean>;
  782. isValid: vue.Ref<boolean | null> & {
  783. readonly externalValue: boolean | null;
  784. };
  785. items: vue.Ref<{
  786. id: number | string;
  787. validate: () => Promise<string[]>;
  788. reset: () => Promise<void>;
  789. resetValidation: () => Promise<void>;
  790. vm: vue.Raw<vue.ComponentInternalInstance>;
  791. isValid: boolean | null;
  792. errorMessages: string[];
  793. }[]>;
  794. validate: () => Promise<{
  795. valid: boolean;
  796. errors: {
  797. id: number | string;
  798. errorMessages: string[];
  799. }[];
  800. }>;
  801. reset: () => void;
  802. resetValidation: () => void;
  803. } & HTMLFormElement & {
  804. _allExposed: {
  805. errors: vue.Ref<{
  806. id: number | string;
  807. errorMessages: string[];
  808. }[]>;
  809. isDisabled: vue.ComputedRef<boolean>;
  810. isReadonly: vue.ComputedRef<boolean>;
  811. isValidating: vue.ShallowRef<boolean>;
  812. isValid: vue.Ref<boolean | null> & {
  813. readonly externalValue: boolean | null;
  814. };
  815. items: vue.Ref<{
  816. id: number | string;
  817. validate: () => Promise<string[]>;
  818. reset: () => Promise<void>;
  819. resetValidation: () => Promise<void>;
  820. vm: vue.Raw<vue.ComponentInternalInstance>;
  821. isValid: boolean | null;
  822. errorMessages: string[];
  823. }[]>;
  824. validate: () => Promise<{
  825. valid: boolean;
  826. errors: {
  827. id: number | string;
  828. errorMessages: string[];
  829. }[];
  830. }>;
  831. reset: () => void;
  832. resetValidation: () => void;
  833. };
  834. }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
  835. 'update:modelValue': (val: boolean | null) => true;
  836. submit: (e: SubmitEventPromise) => true;
  837. }, string, {
  838. style: vue.StyleValue;
  839. disabled: boolean;
  840. readonly: boolean;
  841. modelValue: boolean | null;
  842. validateOn: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
  843. fastFail: boolean;
  844. }, {}, string, vue.SlotsType<Partial<{
  845. default: (arg: {
  846. errors: vue.Ref<{
  847. id: number | string;
  848. errorMessages: string[];
  849. }[]>;
  850. isDisabled: vue.ComputedRef<boolean>;
  851. isReadonly: vue.ComputedRef<boolean>;
  852. isValidating: vue.ShallowRef<boolean>;
  853. isValid: vue.Ref<boolean | null> & {
  854. readonly externalValue: boolean | null;
  855. };
  856. items: vue.Ref<{
  857. id: number | string;
  858. validate: () => Promise<string[]>;
  859. reset: () => Promise<void>;
  860. resetValidation: () => Promise<void>;
  861. vm: vue.Raw<vue.ComponentInternalInstance>;
  862. isValid: boolean | null;
  863. errorMessages: string[];
  864. }[]>;
  865. validate: () => Promise<{
  866. valid: boolean;
  867. errors: {
  868. id: number | string;
  869. errorMessages: string[];
  870. }[];
  871. }>;
  872. reset: () => void;
  873. resetValidation: () => void;
  874. }) => vue.VNode[];
  875. }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
  876. disabled: BooleanConstructor;
  877. fastFail: BooleanConstructor;
  878. readonly: BooleanConstructor;
  879. modelValue: {
  880. type: vue.PropType<boolean | null>;
  881. default: null;
  882. };
  883. validateOn: {
  884. type: vue.PropType<FormProps["validateOn"]>;
  885. default: string;
  886. };
  887. class: vue.PropType<ClassValue>;
  888. style: {
  889. type: vue.PropType<vue.StyleValue>;
  890. default: null;
  891. };
  892. }, vue.ExtractPropTypes<{
  893. disabled: BooleanConstructor;
  894. fastFail: BooleanConstructor;
  895. readonly: BooleanConstructor;
  896. modelValue: {
  897. type: vue.PropType<boolean | null>;
  898. default: null;
  899. };
  900. validateOn: {
  901. type: vue.PropType<FormProps["validateOn"]>;
  902. default: string;
  903. };
  904. class: vue.PropType<ClassValue>;
  905. style: {
  906. type: vue.PropType<vue.StyleValue>;
  907. default: null;
  908. };
  909. }>>;
  910. type VForm = InstanceType<typeof VForm>;
  911. export { VForm };