@cfinnestad/react-form-builder 1.0.43 → 1.0.46
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 +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Old/Button.d.ts +28 -28
- package/dist/cjs/types/Old/Header.d.ts +12 -12
- package/dist/cjs/types/Old/Page.d.ts +3 -3
- package/dist/cjs/types/Old/Page.stories.d.ts +13 -13
- package/dist/cjs/types/components/Items/Items.d.ts +5 -0
- package/dist/cjs/types/components/Items/SetItem.d.ts +3 -3
- package/dist/cjs/types/components/Items/ShowItems.d.ts +10 -10
- package/dist/cjs/types/components/Items/Subtypes/Boolean/BooleanField.d.ts +4 -4
- package/dist/cjs/types/components/Items/Subtypes/Checkbox/CheckboxField.d.ts +4 -4
- package/dist/cjs/types/components/Items/Subtypes/Email/Email.d.ts +4 -4
- package/dist/cjs/types/components/Items/Subtypes/Radio/RadioField.d.ts +4 -4
- package/dist/cjs/types/components/Items/Subtypes/Select/Select.d.ts +4 -4
- package/dist/cjs/types/components/Items/Subtypes/Text/Text.d.ts +4 -4
- package/dist/cjs/types/components/Render/Render.d.ts +2 -1
- package/dist/cjs/types/components/Template/Template.d.ts +9 -9
- package/dist/cjs/types/components/Template/index.d.ts +1 -1
- package/dist/cjs/types/components/UpdateItem/UpdateItem.d.ts +9 -9
- package/dist/cjs/types/components/UpdateItem/index.d.ts +1 -1
- package/dist/cjs/types/src/components/Actions/Actions.d.ts +10 -10
- package/dist/cjs/types/src/components/Actions/Clear/Clear.d.ts +3 -3
- package/dist/cjs/types/src/components/Actions/Save/Save.d.ts +3 -3
- package/dist/cjs/types/src/components/Actions/Transfer/Transfer.d.ts +3 -3
- package/dist/cjs/types/src/components/Builder/Builder.d.ts +22 -22
- package/dist/cjs/types/src/components/Builder/Builder.stories.d.ts +22 -22
- package/dist/cjs/types/src/components/Builder/index.d.ts +1 -1
- package/dist/cjs/types/src/components/Items/DefaultItems.d.ts +7 -7
- package/dist/cjs/types/src/components/Items/Field/Field.d.ts +4 -4
- package/dist/cjs/types/src/components/Items/Group/Group.d.ts +3 -3
- package/dist/cjs/types/src/components/Items/Hidden/Hidden.d.ts +3 -3
- package/dist/cjs/types/src/components/Items/Html/Html.d.ts +3 -3
- package/dist/cjs/types/src/components/Items/Items.d.ts +141 -141
- package/dist/cjs/types/src/components/Items/SetItem.d.ts +3 -3
- package/dist/cjs/types/src/components/Items/ShowItems.d.ts +6 -6
- package/dist/cjs/types/src/components/Items/ShowTypes.d.ts +6 -6
- package/dist/cjs/types/src/components/Items/Subtypes/DefaultSubTypes.d.ts +6 -6
- package/dist/cjs/types/src/components/Items/Subtypes/Text/Text.d.ts +4 -4
- package/dist/cjs/types/src/components/UpdateItem/UpdateItem.d.ts +9 -9
- package/dist/cjs/types/src/components/index.d.ts +1 -1
- package/dist/cjs/types/src/index.d.ts +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Old/Button.d.ts +28 -28
- package/dist/esm/types/Old/Header.d.ts +12 -12
- package/dist/esm/types/Old/Page.d.ts +3 -3
- package/dist/esm/types/Old/Page.stories.d.ts +13 -13
- package/dist/esm/types/components/Items/Items.d.ts +5 -0
- package/dist/esm/types/components/Items/SetItem.d.ts +3 -3
- package/dist/esm/types/components/Items/ShowItems.d.ts +10 -10
- package/dist/esm/types/components/Items/Subtypes/Boolean/BooleanField.d.ts +4 -4
- package/dist/esm/types/components/Items/Subtypes/Checkbox/CheckboxField.d.ts +4 -4
- package/dist/esm/types/components/Items/Subtypes/Email/Email.d.ts +4 -4
- package/dist/esm/types/components/Items/Subtypes/Radio/RadioField.d.ts +4 -4
- package/dist/esm/types/components/Items/Subtypes/Select/Select.d.ts +4 -4
- package/dist/esm/types/components/Items/Subtypes/Text/Text.d.ts +4 -4
- package/dist/esm/types/components/Render/Render.d.ts +2 -1
- package/dist/esm/types/components/Template/Template.d.ts +9 -9
- package/dist/esm/types/components/Template/index.d.ts +1 -1
- package/dist/esm/types/components/UpdateItem/UpdateItem.d.ts +9 -9
- package/dist/esm/types/components/UpdateItem/index.d.ts +1 -1
- package/dist/esm/types/src/components/Actions/Actions.d.ts +10 -10
- package/dist/esm/types/src/components/Actions/Clear/Clear.d.ts +3 -3
- package/dist/esm/types/src/components/Actions/Save/Save.d.ts +3 -3
- package/dist/esm/types/src/components/Actions/Transfer/Transfer.d.ts +3 -3
- package/dist/esm/types/src/components/Builder/Builder.d.ts +22 -22
- package/dist/esm/types/src/components/Builder/Builder.stories.d.ts +22 -22
- package/dist/esm/types/src/components/Builder/index.d.ts +1 -1
- package/dist/esm/types/src/components/Items/DefaultItems.d.ts +7 -7
- package/dist/esm/types/src/components/Items/Field/Field.d.ts +4 -4
- package/dist/esm/types/src/components/Items/Group/Group.d.ts +3 -3
- package/dist/esm/types/src/components/Items/Hidden/Hidden.d.ts +3 -3
- package/dist/esm/types/src/components/Items/Html/Html.d.ts +3 -3
- package/dist/esm/types/src/components/Items/Items.d.ts +141 -141
- package/dist/esm/types/src/components/Items/SetItem.d.ts +3 -3
- package/dist/esm/types/src/components/Items/ShowItems.d.ts +6 -6
- package/dist/esm/types/src/components/Items/ShowTypes.d.ts +6 -6
- package/dist/esm/types/src/components/Items/Subtypes/DefaultSubTypes.d.ts +6 -6
- package/dist/esm/types/src/components/Items/Subtypes/Text/Text.d.ts +4 -4
- package/dist/esm/types/src/components/UpdateItem/UpdateItem.d.ts +9 -9
- package/dist/esm/types/src/components/index.d.ts +1 -1
- package/dist/esm/types/src/index.d.ts +1 -1
- package/dist/index.d.ts +7 -1
- package/package.json +106 -106
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import './button.css';
|
|
2
|
-
interface ButtonProps {
|
|
3
|
-
/**
|
|
4
|
-
* Is this the principal call to action on the page?
|
|
5
|
-
*/
|
|
6
|
-
primary?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* What background color to use
|
|
9
|
-
*/
|
|
10
|
-
backgroundColor?: string;
|
|
11
|
-
/**
|
|
12
|
-
* How large should the button be?
|
|
13
|
-
*/
|
|
14
|
-
size?: 'small' | 'medium' | 'large';
|
|
15
|
-
/**
|
|
16
|
-
* Button contents
|
|
17
|
-
*/
|
|
18
|
-
label: string;
|
|
19
|
-
/**
|
|
20
|
-
* Optional click handler
|
|
21
|
-
*/
|
|
22
|
-
onClick?: () => void;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Primary UI component for user interaction
|
|
26
|
-
*/
|
|
27
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => JSX.Element;
|
|
28
|
-
export {};
|
|
1
|
+
import './button.css';
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* Is this the principal call to action on the page?
|
|
5
|
+
*/
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* What background color to use
|
|
9
|
+
*/
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
/**
|
|
12
|
+
* How large should the button be?
|
|
13
|
+
*/
|
|
14
|
+
size?: 'small' | 'medium' | 'large';
|
|
15
|
+
/**
|
|
16
|
+
* Button contents
|
|
17
|
+
*/
|
|
18
|
+
label: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional click handler
|
|
21
|
+
*/
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Primary UI component for user interaction
|
|
26
|
+
*/
|
|
27
|
+
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import './header.css';
|
|
2
|
-
type User = {
|
|
3
|
-
name: string;
|
|
4
|
-
};
|
|
5
|
-
interface HeaderProps {
|
|
6
|
-
user?: User;
|
|
7
|
-
onLogin: () => void;
|
|
8
|
-
onLogout: () => void;
|
|
9
|
-
onCreateAccount: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => JSX.Element;
|
|
12
|
-
export {};
|
|
1
|
+
import './header.css';
|
|
2
|
+
type User = {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
interface HeaderProps {
|
|
6
|
+
user?: User;
|
|
7
|
+
onLogin: () => void;
|
|
8
|
+
onLogout: () => void;
|
|
9
|
+
onCreateAccount: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './page.css';
|
|
3
|
-
export declare const Page: React.FC;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './page.css';
|
|
3
|
+
export declare const Page: React.FC;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from '@storybook/react';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: import("react").FC<{}>;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const LoggedOut: Story;
|
|
13
|
-
export declare const LoggedIn: Story;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<{}>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const LoggedOut: Story;
|
|
13
|
+
export declare const LoggedIn: Story;
|
|
@@ -4,6 +4,10 @@ import { SubmitButtonProps } from "./Submit";
|
|
|
4
4
|
import { Theme } from "@mui/material/styles";
|
|
5
5
|
import { ActiveType, ModalProps } from "../Builder/Builder";
|
|
6
6
|
import { Accept } from "react-dropzone";
|
|
7
|
+
export type EventItem = {
|
|
8
|
+
eventName: string;
|
|
9
|
+
callback: (eventName: string, fieldName: string) => void;
|
|
10
|
+
};
|
|
7
11
|
export type AllowedSubtypes = {
|
|
8
12
|
[key: string]: AnyFieldType;
|
|
9
13
|
};
|
|
@@ -35,6 +39,7 @@ export type Options = {
|
|
|
35
39
|
};
|
|
36
40
|
submitColors: string[];
|
|
37
41
|
fileTypes: Accept;
|
|
42
|
+
eventList: EventItem[];
|
|
38
43
|
};
|
|
39
44
|
export type BaseItem = {
|
|
40
45
|
id: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AnyItem } from "./Items";
|
|
2
|
-
declare const SetItem: (item: AnyItem, items: AnyItem[]) => AnyItem[];
|
|
3
|
-
export default SetItem;
|
|
1
|
+
import { AnyItem } from "./Items";
|
|
2
|
+
declare const SetItem: (item: AnyItem, items: AnyItem[]) => AnyItem[];
|
|
3
|
+
export default SetItem;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { AnyItem } from "./Items";
|
|
3
|
-
import { Options } from "../Builder/Builder";
|
|
4
|
-
type ShowItemsProps = {
|
|
5
|
-
Items: AnyItem[];
|
|
6
|
-
Options: Options;
|
|
7
|
-
type: string;
|
|
8
|
-
};
|
|
9
|
-
declare const ShowItems: ({ Items, Options, type }: ShowItemsProps) => React.JSX.Element;
|
|
10
|
-
export default ShowItems;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AnyItem } from "./Items";
|
|
3
|
+
import { Options } from "../Builder/Builder";
|
|
4
|
+
type ShowItemsProps = {
|
|
5
|
+
Items: AnyItem[];
|
|
6
|
+
Options: Options;
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
declare const ShowItems: ({ Items, Options, type }: ShowItemsProps) => React.JSX.Element;
|
|
10
|
+
export default ShowItems;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FieldProps } from "../../Items";
|
|
3
|
-
declare const BooleanField: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
-
export default BooleanField;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FieldProps } from "../../Items";
|
|
3
|
+
declare const BooleanField: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
+
export default BooleanField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FieldProps } from "../../Items";
|
|
3
|
-
declare const CheckboxField: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
-
export default CheckboxField;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FieldProps } from "../../Items";
|
|
3
|
+
declare const CheckboxField: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
+
export default CheckboxField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FieldProps } from "../../Items";
|
|
3
|
-
declare const Email: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
-
export default Email;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FieldProps } from "../../Items";
|
|
3
|
+
declare const Email: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
+
export default Email;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FieldProps } from "../../Items";
|
|
3
|
-
declare const RadioField: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
-
export default RadioField;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FieldProps } from "../../Items";
|
|
3
|
+
declare const RadioField: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
+
export default RadioField;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FieldProps } from '../../Items';
|
|
3
|
-
declare function SelectST(fieldProps: FieldProps): React.JSX.Element;
|
|
4
|
-
export default SelectST;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldProps } from '../../Items';
|
|
3
|
+
declare function SelectST(fieldProps: FieldProps): React.JSX.Element;
|
|
4
|
+
export default SelectST;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FieldProps } from "../../Items";
|
|
3
|
-
declare const Text: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
-
export default Text;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FieldProps } from "../../Items";
|
|
3
|
+
declare const Text: (fieldProps: FieldProps) => React.JSX.Element;
|
|
4
|
+
export default Text;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction, JSX } from 'react';
|
|
2
|
-
import { AnyItem, Option, AllowedItems, AllowedSubtypes, Files } from "../Items";
|
|
2
|
+
import { AnyItem, Option, AllowedItems, AllowedSubtypes, Files, EventItem } from "../Items";
|
|
3
3
|
import { ErrorType } from "../Errors/Errors";
|
|
4
4
|
import { Theme } from "@mui/material/styles";
|
|
5
5
|
import { SubmitButtonProps } from "../Items";
|
|
@@ -29,6 +29,7 @@ export type RenderOptions = {
|
|
|
29
29
|
mode?: "build" | "edit" | "render";
|
|
30
30
|
submitColors?: string[];
|
|
31
31
|
fileTypes?: Accept;
|
|
32
|
+
eventList?: EventItem[];
|
|
32
33
|
};
|
|
33
34
|
declare const Render: ({ Items, SetItems, Options }: RenderProps) => JSX.Element;
|
|
34
35
|
export declare const RenderedObject: (items: AnyItem[], files?: Files, allItems?: AnyItem[]) => {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnyItem } from "../Items";
|
|
3
|
-
type TemplateProps = {
|
|
4
|
-
name: string;
|
|
5
|
-
items: AnyItem[];
|
|
6
|
-
addItems: (items: AnyItem[]) => void;
|
|
7
|
-
};
|
|
8
|
-
declare const Template: ({ name, items, addItems }: TemplateProps) => React.JSX.Element;
|
|
9
|
-
export default Template;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnyItem } from "../Items";
|
|
3
|
+
type TemplateProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
items: AnyItem[];
|
|
6
|
+
addItems: (items: AnyItem[]) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const Template: ({ name, items, addItems }: TemplateProps) => React.JSX.Element;
|
|
9
|
+
export default Template;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './Template';
|
|
1
|
+
export { default } from './Template';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from "react";
|
|
2
|
-
import { AnyItem } from "../Items";
|
|
3
|
-
type UpdateItemProps = {
|
|
4
|
-
Item: AnyItem;
|
|
5
|
-
Items: AnyItem[];
|
|
6
|
-
SetItems: Dispatch<SetStateAction<AnyItem[]>>;
|
|
7
|
-
};
|
|
8
|
-
declare const UpdateItem: ({ Item, Items, SetItems }: UpdateItemProps) => void;
|
|
9
|
-
export default UpdateItem;
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { AnyItem } from "../Items";
|
|
3
|
+
type UpdateItemProps = {
|
|
4
|
+
Item: AnyItem;
|
|
5
|
+
Items: AnyItem[];
|
|
6
|
+
SetItems: Dispatch<SetStateAction<AnyItem[]>>;
|
|
7
|
+
};
|
|
8
|
+
declare const UpdateItem: ({ Item, Items, SetItems }: UpdateItemProps) => void;
|
|
9
|
+
export default UpdateItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './UpdateItem';
|
|
1
|
+
export { default } from './UpdateItem';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from "react";
|
|
2
|
-
import { AnyItem } from "../Items/Items";
|
|
3
|
-
import { Options } from "../Builder/Builder";
|
|
4
|
-
export interface ActionProps {
|
|
5
|
-
Items: AnyItem[];
|
|
6
|
-
Options: Options;
|
|
7
|
-
SetItems: Dispatch<SetStateAction<AnyItem[]>>;
|
|
8
|
-
}
|
|
9
|
-
declare const Actions: (ActionProps: ActionProps) => JSX.Element;
|
|
10
|
-
export default Actions;
|
|
1
|
+
import { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { AnyItem } from "../Items/Items";
|
|
3
|
+
import { Options } from "../Builder/Builder";
|
|
4
|
+
export interface ActionProps {
|
|
5
|
+
Items: AnyItem[];
|
|
6
|
+
Options: Options;
|
|
7
|
+
SetItems: Dispatch<SetStateAction<AnyItem[]>>;
|
|
8
|
+
}
|
|
9
|
+
declare const Actions: (ActionProps: ActionProps) => JSX.Element;
|
|
10
|
+
export default Actions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionProps } from "../Actions";
|
|
2
|
-
declare const Clear: ({ SetItems }: ActionProps) => JSX.Element;
|
|
3
|
-
export default Clear;
|
|
1
|
+
import { ActionProps } from "../Actions";
|
|
2
|
+
declare const Clear: ({ SetItems }: ActionProps) => JSX.Element;
|
|
3
|
+
export default Clear;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionProps } from '../Actions';
|
|
2
|
-
declare const Save: ({ Items, Options }: ActionProps) => JSX.Element;
|
|
3
|
-
export default Save;
|
|
1
|
+
import { ActionProps } from '../Actions';
|
|
2
|
+
declare const Save: ({ Items, Options }: ActionProps) => JSX.Element;
|
|
3
|
+
export default Save;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionProps } from "../Actions";
|
|
2
|
-
export declare const Transfer: ({ Items, SetItems }: ActionProps) => JSX.Element;
|
|
3
|
-
export default Transfer;
|
|
1
|
+
import { ActionProps } from "../Actions";
|
|
2
|
+
export declare const Transfer: ({ Items, SetItems }: ActionProps) => JSX.Element;
|
|
3
|
+
export default Transfer;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { ActionProps } from "../Actions/Actions";
|
|
3
|
-
import { AllowedItems } from "../Items/DefaultItems";
|
|
4
|
-
import { AnyItem } from "../Items/Items";
|
|
5
|
-
import { AllowedSubtypes } from "../Items/Subtypes/DefaultSubTypes";
|
|
6
|
-
export type Options = {
|
|
7
|
-
Actions?: FC<ActionProps>[];
|
|
8
|
-
ActionsAppend?: FC<ActionProps>[];
|
|
9
|
-
AllowedItems?: AllowedItems;
|
|
10
|
-
AdditionalItems?: AllowedItems;
|
|
11
|
-
AllowedSubtypes?: AllowedSubtypes;
|
|
12
|
-
AdditionalSubtypes?: AllowedSubtypes;
|
|
13
|
-
onSave?: (Items: AnyItem[]) => void;
|
|
14
|
-
_SetItem?: (Item: AnyItem) => void;
|
|
15
|
-
_AddItem?: (Item: AnyItem, index: number, groupId?: string) => void;
|
|
16
|
-
};
|
|
17
|
-
export type BuilderProps = {
|
|
18
|
-
Items?: AnyItem[];
|
|
19
|
-
Options?: Options;
|
|
20
|
-
};
|
|
21
|
-
declare const Builder: ({ Items, Options }: BuilderProps) => JSX.Element;
|
|
22
|
-
export default Builder;
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { ActionProps } from "../Actions/Actions";
|
|
3
|
+
import { AllowedItems } from "../Items/DefaultItems";
|
|
4
|
+
import { AnyItem } from "../Items/Items";
|
|
5
|
+
import { AllowedSubtypes } from "../Items/Subtypes/DefaultSubTypes";
|
|
6
|
+
export type Options = {
|
|
7
|
+
Actions?: FC<ActionProps>[];
|
|
8
|
+
ActionsAppend?: FC<ActionProps>[];
|
|
9
|
+
AllowedItems?: AllowedItems;
|
|
10
|
+
AdditionalItems?: AllowedItems;
|
|
11
|
+
AllowedSubtypes?: AllowedSubtypes;
|
|
12
|
+
AdditionalSubtypes?: AllowedSubtypes;
|
|
13
|
+
onSave?: (Items: AnyItem[]) => void;
|
|
14
|
+
_SetItem?: (Item: AnyItem) => void;
|
|
15
|
+
_AddItem?: (Item: AnyItem, index: number, groupId?: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export type BuilderProps = {
|
|
18
|
+
Items?: AnyItem[];
|
|
19
|
+
Options?: Options;
|
|
20
|
+
};
|
|
21
|
+
declare const Builder: ({ Items, Options }: BuilderProps) => JSX.Element;
|
|
22
|
+
export default Builder;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ Items, Options }: import("./Builder").BuilderProps) => JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
argTypes: {
|
|
7
|
-
Items: {
|
|
8
|
-
id: string;
|
|
9
|
-
type: string;
|
|
10
|
-
name: string;
|
|
11
|
-
required: boolean;
|
|
12
|
-
label: string;
|
|
13
|
-
deprecated: boolean;
|
|
14
|
-
subtype: {
|
|
15
|
-
subtype: string;
|
|
16
|
-
};
|
|
17
|
-
}[];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export default meta;
|
|
21
|
-
type Story = StoryObj<typeof meta>;
|
|
22
|
-
export declare const Primary: Story;
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ Items, Options }: import("./Builder").BuilderProps) => JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
argTypes: {
|
|
7
|
+
Items: {
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
name: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
label: string;
|
|
13
|
+
deprecated: boolean;
|
|
14
|
+
subtype: {
|
|
15
|
+
subtype: string;
|
|
16
|
+
};
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const Primary: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './Builder';
|
|
1
|
+
export { default } from './Builder';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ItemType } from "./Items";
|
|
2
|
-
import { AllowedSubtypes } from "./Subtypes/DefaultSubTypes";
|
|
3
|
-
export type AllowedItems = {
|
|
4
|
-
[key: string]: ItemType;
|
|
5
|
-
};
|
|
6
|
-
declare const DefaultItems: (allowedSubtypes: AllowedSubtypes) => AllowedItems;
|
|
7
|
-
export default DefaultItems;
|
|
1
|
+
import { ItemType } from "./Items";
|
|
2
|
+
import { AllowedSubtypes } from "./Subtypes/DefaultSubTypes";
|
|
3
|
+
export type AllowedItems = {
|
|
4
|
+
[key: string]: ItemType;
|
|
5
|
+
};
|
|
6
|
+
declare const DefaultItems: (allowedSubtypes: AllowedSubtypes) => AllowedItems;
|
|
7
|
+
export default DefaultItems;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldProps } from "../Items";
|
|
2
|
-
export declare const edit: () => JSX.Element;
|
|
3
|
-
declare const Field: (fieldProps: FieldProps) => JSX.Element;
|
|
4
|
-
export default Field;
|
|
1
|
+
import { FieldProps } from "../Items";
|
|
2
|
+
export declare const edit: () => JSX.Element;
|
|
3
|
+
declare const Field: (fieldProps: FieldProps) => JSX.Element;
|
|
4
|
+
export default Field;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ItemProps } from "../Items";
|
|
2
|
-
declare const Group: ({}: ItemProps) => JSX.Element;
|
|
3
|
-
export default Group;
|
|
1
|
+
import { ItemProps } from "../Items";
|
|
2
|
+
declare const Group: ({}: ItemProps) => JSX.Element;
|
|
3
|
+
export default Group;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FieldProps } from "../Items";
|
|
2
|
-
declare const Hidden: (fieldProps: FieldProps) => JSX.Element;
|
|
3
|
-
export default Hidden;
|
|
1
|
+
import { FieldProps } from "../Items";
|
|
2
|
+
declare const Hidden: (fieldProps: FieldProps) => JSX.Element;
|
|
3
|
+
export default Hidden;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FieldProps } from "../Items";
|
|
2
|
-
declare const Html: ({}: FieldProps) => JSX.Element;
|
|
3
|
-
export default Html;
|
|
1
|
+
import { FieldProps } from "../Items";
|
|
2
|
+
declare const Html: ({}: FieldProps) => JSX.Element;
|
|
3
|
+
export default Html;
|