@cfinnestad/react-form-builder 1.0.9 → 1.0.11
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 +25 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Builder/Builder.d.ts +1 -0
- package/dist/cjs/types/components/Items/Items.d.ts +2 -1
- package/dist/cjs/types/components/Items/Submit/Submit.d.ts +1 -1
- package/dist/cjs/types/components/Render/Render.d.ts +1 -0
- package/dist/cjs/types/components/Render/StoriesSubmit.d.ts +1 -1
- package/dist/esm/index.js +25 -25
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Builder/Builder.d.ts +1 -0
- package/dist/esm/types/components/Items/Items.d.ts +2 -1
- package/dist/esm/types/components/Items/Submit/Submit.d.ts +1 -1
- package/dist/esm/types/components/Render/Render.d.ts +1 -0
- package/dist/esm/types/components/Render/StoriesSubmit.d.ts +1 -1
- package/dist/index.d.ts +5 -2
- package/package.json +4 -4
|
@@ -32,12 +32,12 @@ export type Options = {
|
|
|
32
32
|
custom?: {
|
|
33
33
|
[key: string]: any;
|
|
34
34
|
};
|
|
35
|
+
submitColors: string[];
|
|
35
36
|
};
|
|
36
37
|
export type BaseItem = {
|
|
37
38
|
id: string;
|
|
38
39
|
type: string;
|
|
39
40
|
filter?: FilterType;
|
|
40
|
-
ClassName?: string;
|
|
41
41
|
custom?: {
|
|
42
42
|
[key: string]: any;
|
|
43
43
|
};
|
|
@@ -122,6 +122,7 @@ export type SubmitItem = BaseItem & {
|
|
|
122
122
|
type: 'Submit';
|
|
123
123
|
submitElementName?: string;
|
|
124
124
|
label?: string;
|
|
125
|
+
color?: string;
|
|
125
126
|
};
|
|
126
127
|
export type GroupItem = NamedItem & {
|
|
127
128
|
type: 'Group';
|
|
@@ -4,7 +4,7 @@ export type SubmitButtonProps = {
|
|
|
4
4
|
items: AnyItem[];
|
|
5
5
|
options: Options;
|
|
6
6
|
label?: string;
|
|
7
|
-
|
|
7
|
+
color: string;
|
|
8
8
|
};
|
|
9
9
|
export type SubmitButtonElement = (props: SubmitButtonProps) => JSX.Element;
|
|
10
10
|
declare const Submit: ({ item, items, options }: SubmitProps) => JSX.Element;
|
|
@@ -26,6 +26,7 @@ export type RenderOptions = {
|
|
|
26
26
|
[key: string]: any;
|
|
27
27
|
};
|
|
28
28
|
mode?: "build" | "edit" | "render";
|
|
29
|
+
submitColors?: string[];
|
|
29
30
|
};
|
|
30
31
|
declare const Render: ({ Items, SetItems, Options }: RenderProps) => JSX.Element;
|
|
31
32
|
export declare const RenderedObject: (items: AnyItem[]) => {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SubmitButtonProps } from "../Items";
|
|
3
|
-
export declare const Submit: ({ items, options,
|
|
3
|
+
export declare const Submit: ({ items, options, color }: SubmitButtonProps) => React.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ type SubmitButtonProps = {
|
|
|
13
13
|
items: AnyItem[];
|
|
14
14
|
options: Options;
|
|
15
15
|
label?: string;
|
|
16
|
-
|
|
16
|
+
color: string;
|
|
17
17
|
};
|
|
18
18
|
type SubmitButtonElement = (props: SubmitButtonProps) => JSX.Element;
|
|
19
19
|
|
|
@@ -46,12 +46,12 @@ type Options = {
|
|
|
46
46
|
custom?: {
|
|
47
47
|
[key: string]: any;
|
|
48
48
|
};
|
|
49
|
+
submitColors: string[];
|
|
49
50
|
};
|
|
50
51
|
type BaseItem = {
|
|
51
52
|
id: string;
|
|
52
53
|
type: string;
|
|
53
54
|
filter?: FilterType;
|
|
54
|
-
ClassName?: string;
|
|
55
55
|
custom?: {
|
|
56
56
|
[key: string]: any;
|
|
57
57
|
};
|
|
@@ -136,6 +136,7 @@ type SubmitItem = BaseItem & {
|
|
|
136
136
|
type: 'Submit';
|
|
137
137
|
submitElementName?: string;
|
|
138
138
|
label?: string;
|
|
139
|
+
color?: string;
|
|
139
140
|
};
|
|
140
141
|
type GroupItem = NamedItem & {
|
|
141
142
|
type: 'Group';
|
|
@@ -458,6 +459,7 @@ type BuilderUseOptions = {
|
|
|
458
459
|
custom?: {
|
|
459
460
|
[key: string]: any;
|
|
460
461
|
};
|
|
462
|
+
submitColors?: string[];
|
|
461
463
|
};
|
|
462
464
|
type BuilderProps = {
|
|
463
465
|
AllowedItems?: AllowedItems;
|
|
@@ -493,6 +495,7 @@ type RenderOptions = {
|
|
|
493
495
|
[key: string]: any;
|
|
494
496
|
};
|
|
495
497
|
mode?: "build" | "edit" | "render";
|
|
498
|
+
submitColors?: string[];
|
|
496
499
|
};
|
|
497
500
|
declare const Render: ({ Items, SetItems, Options }: RenderProps) => JSX.Element;
|
|
498
501
|
declare const RenderedObject: (items: AnyItem[]) => {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfinnestad/react-form-builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "FormBuilder and FormRender Component library for building and gathering custom form data",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"rollup": "rollup -c",
|
|
@@ -82,6 +82,8 @@
|
|
|
82
82
|
"@mui/icons-material": "^5.11.16",
|
|
83
83
|
"@mui/material": "^5.12.3",
|
|
84
84
|
"@mui/x-date-pickers": "^5.0.20",
|
|
85
|
+
"@react-buddy/ide-toolbox": "^2.4.0",
|
|
86
|
+
"@react-buddy/palette-mui": "^5.0.1",
|
|
85
87
|
"@tinymce/tinymce-react": "^4.3.0",
|
|
86
88
|
"country-flag-icons": "^1.5.7",
|
|
87
89
|
"dayjs": "^1.11.8",
|
|
@@ -92,9 +94,7 @@
|
|
|
92
94
|
"react-copy-to-clipboard": "^5.1.0",
|
|
93
95
|
"styled-components": "^5.3.10",
|
|
94
96
|
"tinymce": "^6.6.0",
|
|
95
|
-
"uuidv4": "^6.2.13"
|
|
96
|
-
"@react-buddy/ide-toolbox": "^2.4.0",
|
|
97
|
-
"@react-buddy/palette-mui": "^5.0.1"
|
|
97
|
+
"uuidv4": "^6.2.13"
|
|
98
98
|
},
|
|
99
99
|
"main": "dist/cjs/index.js",
|
|
100
100
|
"module": "dist/esm/index.js",
|