@arudovwen/form-builder-react 1.2.2 → 1.2.4
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-builder.es.js +1590 -1512
- package/dist/form-builder.umd.js +47 -47
- package/package.json +1 -1
- package/types/components/elements/cascade-dropdown.d.ts +13 -0
- package/types/components/viewer/index.d.ts +3 -1
- package/types/pages/viewer/index.d.ts +3 -1
- package/types/utils/contants.d.ts +7 -0
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type CascadeDropdownProps = {
|
|
3
|
+
element: any;
|
|
4
|
+
validationData: {
|
|
5
|
+
register?: () => any;
|
|
6
|
+
trigger?: any;
|
|
7
|
+
setValue?: any;
|
|
8
|
+
watch?: () => Record<string, any>;
|
|
9
|
+
isReadOnly?: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
declare const CascadeDropdown: React.FC<CascadeDropdownProps>;
|
|
13
|
+
export default CascadeDropdown;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
export interface AnswerElement {
|
|
2
3
|
id: string;
|
|
3
4
|
value: any;
|
|
@@ -11,6 +12,7 @@ export interface FormRendererProps {
|
|
|
11
12
|
onSubmitData?: (data: any[]) => void;
|
|
12
13
|
isReadOnly?: boolean;
|
|
13
14
|
renderType?: RenderType;
|
|
15
|
+
children?: ReactNode;
|
|
14
16
|
}
|
|
15
|
-
declare const FormRenderer: ({ form_data, answerData, ignoreValidation, onSubmitData, isReadOnly, renderType, }: any) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const FormRenderer: ({ form_data, answerData, ignoreValidation, onSubmitData, isReadOnly, renderType, children, }: any) => import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export default FormRenderer;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
export interface RenderProps {
|
|
2
3
|
onSubmit?: (e: any) => void;
|
|
3
4
|
answerData?: any;
|
|
@@ -7,5 +8,6 @@ export interface RenderProps {
|
|
|
7
8
|
loading?: boolean;
|
|
8
9
|
config?: any;
|
|
9
10
|
renderType?: "multi" | "single";
|
|
11
|
+
children?: ReactNode;
|
|
10
12
|
}
|
|
11
|
-
export default function Viewer({ answerData, form_data, ignoreValidation, onSubmit, isReadOnly, loading, config, renderType }: RenderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default function Viewer({ answerData, form_data, ignoreValidation, onSubmit, isReadOnly, loading, config, renderType, children, }: RenderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -26,6 +26,7 @@ export interface ElementType {
|
|
|
26
26
|
label: string;
|
|
27
27
|
value: any;
|
|
28
28
|
id: string;
|
|
29
|
+
key?: string;
|
|
29
30
|
}>;
|
|
30
31
|
columns?: number;
|
|
31
32
|
gridId?: string;
|
|
@@ -44,6 +45,12 @@ export interface ElementType {
|
|
|
44
45
|
customClass?: string | null;
|
|
45
46
|
elementClass?: string;
|
|
46
47
|
dataColumns?: DataColumnType[];
|
|
48
|
+
options2?: Array<{
|
|
49
|
+
label: string;
|
|
50
|
+
value: any;
|
|
51
|
+
id: string;
|
|
52
|
+
key?: string;
|
|
53
|
+
}>;
|
|
47
54
|
}
|
|
48
55
|
export declare const Elements: ElementType[];
|
|
49
56
|
export declare const AllowValidationPrefix: string[];
|