@cfinnestad/react-form-builder 1.0.25 → 1.0.28

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.
@@ -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) => {};