@maif/react-forms 1.3.1-rc.6 → 1.3.1-rc.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/lib/index.d.ts +21 -12
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as yup from 'yup';
|
|
|
4
4
|
import { AnySchema, StringSchema, NumberSchema, ArraySchema, TestFunction } from 'yup';
|
|
5
5
|
import Reference from 'yup/lib/Reference';
|
|
6
6
|
import React$1 from 'react';
|
|
7
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
7
8
|
|
|
8
9
|
declare const type: {
|
|
9
10
|
readonly string: "string";
|
|
@@ -410,22 +411,30 @@ interface Informations {
|
|
|
410
411
|
index?: number;
|
|
411
412
|
}
|
|
412
413
|
|
|
413
|
-
declare
|
|
414
|
+
declare type FormProps = {
|
|
414
415
|
schema: Schema;
|
|
415
|
-
flow?:
|
|
416
|
-
value?: object
|
|
417
|
-
inputWrapper?: (
|
|
416
|
+
flow?: Array<string | FlowObject>;
|
|
417
|
+
value?: object;
|
|
418
|
+
inputWrapper?: (props: object) => JSX.Element;
|
|
418
419
|
onSubmit: (obj: {
|
|
419
420
|
[x: string]: any;
|
|
420
421
|
}) => void;
|
|
421
|
-
onError?: (
|
|
422
|
-
footer?: (
|
|
422
|
+
onError?: () => void;
|
|
423
|
+
footer?: (props: {
|
|
423
424
|
reset: () => void;
|
|
424
425
|
valid: () => void;
|
|
425
|
-
}) => JSX.Element
|
|
426
|
-
style?: object
|
|
427
|
-
className?: string
|
|
428
|
-
options?: Option
|
|
429
|
-
}
|
|
426
|
+
}) => JSX.Element;
|
|
427
|
+
style?: object;
|
|
428
|
+
className?: string;
|
|
429
|
+
options?: Option;
|
|
430
|
+
};
|
|
431
|
+
interface FormRef {
|
|
432
|
+
handleSubmit: () => void;
|
|
433
|
+
trigger: () => void;
|
|
434
|
+
methods: UseFormReturn & {
|
|
435
|
+
data: () => any;
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
declare const Form: React$1.ForwardRefExoticComponent<FormProps & React$1.RefAttributes<FormRef>>;
|
|
430
439
|
|
|
431
|
-
export { BooleanInput, CodeInput, Collapse, Form, Format, MarkdownInput, ObjectInput, SelectInput, SelectOption, SingleLineCode, Type, constraints_d as constraints, format, type };
|
|
440
|
+
export { BooleanInput, CodeInput, Collapse, Form, FormRef, Format, MarkdownInput, ObjectInput, SelectInput, SelectOption, SingleLineCode, Type, constraints_d as constraints, format, type };
|