@cfinnestad/react-form-builder 1.0.24 → 1.0.27
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Builder/Builder.d.ts +2 -0
- package/dist/cjs/types/components/Items/Items.d.ts +2 -0
- package/dist/cjs/types/components/Items/Subtypes/File/FileTypes.d.ts +4 -3
- package/dist/cjs/types/components/Render/Render.d.ts +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Builder/Builder.d.ts +2 -0
- package/dist/esm/types/components/Items/Items.d.ts +2 -0
- package/dist/esm/types/components/Items/Subtypes/File/FileTypes.d.ts +4 -3
- package/dist/esm/types/components/Render/Render.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ export declare const activeStyle: {
|
|
|
8
8
|
};
|
|
9
9
|
export declare const MAIN = "-Main-";
|
|
10
10
|
export declare const TYPES = "-Types-";
|
|
11
|
+
import { Accept } from "react-dropzone";
|
|
11
12
|
export type CollectionType = {
|
|
12
13
|
name: string;
|
|
13
14
|
items: AnyItem[];
|
|
@@ -38,6 +39,7 @@ export type BuilderUseOptions = {
|
|
|
38
39
|
[key: string]: any;
|
|
39
40
|
};
|
|
40
41
|
submitColors?: string[];
|
|
42
|
+
fileTypes?: Accept;
|
|
41
43
|
};
|
|
42
44
|
export type BuilderOptions = Options & {};
|
|
43
45
|
export type BuilderProps = {
|
|
@@ -3,6 +3,7 @@ import { ActionProps } from "../Actions";
|
|
|
3
3
|
import { SubmitButtonProps } from "./Submit";
|
|
4
4
|
import { Theme } from "@mui/material/styles";
|
|
5
5
|
import { ActiveType } from "../Builder/Builder";
|
|
6
|
+
import { Accept } from "react-dropzone";
|
|
6
7
|
export type AllowedSubtypes = {
|
|
7
8
|
[key: string]: AnyFieldType;
|
|
8
9
|
};
|
|
@@ -33,6 +34,7 @@ export type Options = {
|
|
|
33
34
|
[key: string]: any;
|
|
34
35
|
};
|
|
35
36
|
submitColors: string[];
|
|
37
|
+
fileTypes: Accept;
|
|
36
38
|
};
|
|
37
39
|
export type BaseItem = {
|
|
38
40
|
id: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Accept } from "react-dropzone";
|
|
2
|
+
import { Options } from "../../Items";
|
|
2
3
|
export declare const FileTypes: Accept;
|
|
3
|
-
export declare const getFilesTypes: (types: string[] | undefined) => Accept | undefined;
|
|
4
|
-
export declare const isValidType: (type: string) => boolean;
|
|
5
|
-
export declare const getExtensions: (fileTypes: string[]) => string[];
|
|
4
|
+
export declare const getFilesTypes: (types: string[] | undefined, options: Options) => Accept | undefined;
|
|
5
|
+
export declare const isValidType: (type: string, options: Options) => boolean;
|
|
6
|
+
export declare const getExtensions: (fileTypes: string[], options: Options) => string[];
|
|
@@ -3,6 +3,7 @@ import { AnyItem, Option, AllowedItems, AllowedSubtypes, Files } from "../Items"
|
|
|
3
3
|
import { ErrorType } from "../Errors/Errors";
|
|
4
4
|
import { Theme } from "@mui/material/styles";
|
|
5
5
|
import { SubmitButtonProps } from "../Items";
|
|
6
|
+
import { Accept } from "react-dropzone";
|
|
6
7
|
export type RenderProps = {
|
|
7
8
|
Items: AnyItem[];
|
|
8
9
|
SetItems?: Dispatch<SetStateAction<AnyItem[]>>;
|
|
@@ -27,6 +28,7 @@ export type RenderOptions = {
|
|
|
27
28
|
};
|
|
28
29
|
mode?: "build" | "edit" | "render";
|
|
29
30
|
submitColors?: string[];
|
|
31
|
+
fileTypes: Accept;
|
|
30
32
|
};
|
|
31
33
|
declare const Render: ({ Items, SetItems, Options }: RenderProps) => JSX.Element;
|
|
32
34
|
export declare const RenderedObject: (items: AnyItem[], files?: Files) => {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { JSX, FC, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { Theme } from '@mui/material/styles';
|
|
3
|
+
import { Accept } from 'react-dropzone';
|
|
3
4
|
|
|
4
5
|
declare const Transfer: ({ Items, Options }: ActionProps) => React.JSX.Element;
|
|
5
6
|
|
|
@@ -47,6 +48,7 @@ type Options = {
|
|
|
47
48
|
[key: string]: any;
|
|
48
49
|
};
|
|
49
50
|
submitColors: string[];
|
|
51
|
+
fileTypes: Accept;
|
|
50
52
|
};
|
|
51
53
|
type BaseItem = {
|
|
52
54
|
id: string;
|
|
@@ -485,6 +487,7 @@ type BuilderUseOptions = {
|
|
|
485
487
|
[key: string]: any;
|
|
486
488
|
};
|
|
487
489
|
submitColors?: string[];
|
|
490
|
+
fileTypes?: Accept;
|
|
488
491
|
};
|
|
489
492
|
type BuilderProps = {
|
|
490
493
|
AllowedItems?: AllowedItems;
|
|
@@ -521,6 +524,7 @@ type RenderOptions = {
|
|
|
521
524
|
};
|
|
522
525
|
mode?: "build" | "edit" | "render";
|
|
523
526
|
submitColors?: string[];
|
|
527
|
+
fileTypes: Accept;
|
|
524
528
|
};
|
|
525
529
|
declare const Render: ({ Items, SetItems, Options }: RenderProps) => JSX.Element;
|
|
526
530
|
declare const RenderedObject: (items: AnyItem[], files?: Files) => {};
|
package/package.json
CHANGED