finform-react-builder 1.8.22 → 1.8.23
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.
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type GridColumn = {
|
|
3
|
+
key: string;
|
|
4
|
+
header: string;
|
|
5
|
+
type?: "text" | "number" | "select" | "checkbox";
|
|
6
|
+
width?: number | string;
|
|
7
|
+
options?: {
|
|
8
|
+
label: string;
|
|
9
|
+
value: any;
|
|
10
|
+
}[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
disabled?: boolean | ((row: any, index: number) => boolean);
|
|
13
|
+
};
|
|
14
|
+
export interface FinEditableGridProps {
|
|
15
|
+
name: string;
|
|
16
|
+
columns: GridColumn[];
|
|
17
|
+
initialRow: Record<string, any>;
|
|
18
|
+
addLabel?: string;
|
|
19
|
+
rowDeletable?: boolean;
|
|
20
|
+
control: any;
|
|
21
|
+
sx?: any;
|
|
22
|
+
addActions?: {
|
|
23
|
+
label: string;
|
|
24
|
+
template: Record<string, any>;
|
|
25
|
+
}[];
|
|
26
|
+
emptyTitle?: string;
|
|
27
|
+
emptySubtitle?: string;
|
|
28
|
+
emptyCardSx?: any;
|
|
29
|
+
}
|
|
30
|
+
export declare const FinEditableGrid: React.FC<FinEditableGridProps>;
|
|
31
|
+
export default FinEditableGrid;
|
|
@@ -29,7 +29,7 @@ export interface BaseField {
|
|
|
29
29
|
title?: string;
|
|
30
30
|
name: string;
|
|
31
31
|
label: string;
|
|
32
|
-
type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'select' | 'checkbox' | 'toggle' | 'radio' | 'switch' | 'autocomplete' | 'date' | 'textarea' | 'image' | 'title' | 'section' | 'component' | 'finuiHeader' | 'tabs';
|
|
32
|
+
type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'select' | 'checkbox' | 'toggle' | 'radio' | 'switch' | 'autocomplete' | 'date' | 'textarea' | 'image' | 'title' | 'section' | 'component' | 'finuiHeader' | 'tabs' | 'grid';
|
|
33
33
|
placeholder?: string;
|
|
34
34
|
labelPosition?: 'inner' | 'top' | 'none';
|
|
35
35
|
labelVariant?: 'caption' | 'body2' | 'subtitle2' | 'h6';
|
|
@@ -220,7 +220,32 @@ export interface TabsField extends BaseField {
|
|
|
220
220
|
defaultValue?: any;
|
|
221
221
|
tabSx?: any;
|
|
222
222
|
}
|
|
223
|
-
export
|
|
223
|
+
export interface GridField extends BaseField {
|
|
224
|
+
type: 'grid';
|
|
225
|
+
initialRow: Record<string, any>;
|
|
226
|
+
columns: Array<{
|
|
227
|
+
key: string;
|
|
228
|
+
header: string;
|
|
229
|
+
type?: 'text' | 'number' | 'select' | 'checkbox';
|
|
230
|
+
width?: number | string;
|
|
231
|
+
options?: {
|
|
232
|
+
label: string;
|
|
233
|
+
value: any;
|
|
234
|
+
}[];
|
|
235
|
+
placeholder?: string;
|
|
236
|
+
disabled?: boolean | ((row: any, index: number) => boolean);
|
|
237
|
+
}>;
|
|
238
|
+
addLabel?: string;
|
|
239
|
+
rowDeletable?: boolean;
|
|
240
|
+
addActions?: {
|
|
241
|
+
label: string;
|
|
242
|
+
template: Record<string, any>;
|
|
243
|
+
}[];
|
|
244
|
+
emptyTitle?: string;
|
|
245
|
+
emptySubtitle?: string;
|
|
246
|
+
emptyCardSx?: any;
|
|
247
|
+
}
|
|
248
|
+
export type FieldConfig = TextField | NumberField | SelectField | CheckboxField | ToggleField | RadioField | SwitchField | AutocompleteField | DateField | ImageField | TitleField | SectionField | ComponentField | FinUiHeaderField | TabsField | GridField;
|
|
224
249
|
export interface FormButton {
|
|
225
250
|
text: string;
|
|
226
251
|
color?: string;
|