finform-react-builder 1.8.25 → 1.8.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/components/FinForm/inputs/FinEditableGrid.d.ts +3 -2
- package/dist/components/FinForm/inputs/FinListCards.d.ts +23 -0
- package/dist/components/FinForm/inputs/index.d.ts +1 -0
- package/dist/components/FinForm/types.d.ts +23 -4
- package/dist/index.es.js +4276 -4124
- package/dist/index.js +42 -42
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ import { default as React } from 'react';
|
|
|
2
2
|
export type GridColumn = {
|
|
3
3
|
key: string;
|
|
4
4
|
header: string;
|
|
5
|
-
type?: "text" | "number" | "select" | "checkbox";
|
|
6
|
-
width?: number | string;
|
|
5
|
+
type?: "text" | "number" | "select" | "checkbox" | "date" | "index";
|
|
6
|
+
width?: number | string | "auto";
|
|
7
7
|
options?: {
|
|
8
8
|
label: string;
|
|
9
9
|
value: any;
|
|
@@ -12,6 +12,7 @@ export type GridColumn = {
|
|
|
12
12
|
disabled?: boolean | ((row: any, index: number) => boolean);
|
|
13
13
|
value?: any | ((row: any, index: number) => any);
|
|
14
14
|
editable?: boolean;
|
|
15
|
+
indexFormat?: (index: number) => string;
|
|
15
16
|
helperText?: string;
|
|
16
17
|
required?: boolean;
|
|
17
18
|
minLength?: number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Control } from 'react-hook-form';
|
|
3
|
+
export interface ListCardItem {
|
|
4
|
+
id: string | number;
|
|
5
|
+
header?: string;
|
|
6
|
+
chipText?: string;
|
|
7
|
+
leftAction?: {
|
|
8
|
+
name: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
};
|
|
11
|
+
rightAction?: {
|
|
12
|
+
name: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface FinListCardsProps {
|
|
17
|
+
name: string;
|
|
18
|
+
control: Control<any>;
|
|
19
|
+
items: ListCardItem[];
|
|
20
|
+
sx?: any;
|
|
21
|
+
cardSx?: any;
|
|
22
|
+
}
|
|
23
|
+
export declare const FinListCards: React.FC<FinListCardsProps>;
|
|
@@ -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' | 'grid';
|
|
32
|
+
type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'select' | 'checkbox' | 'toggle' | 'radio' | 'switch' | 'autocomplete' | 'date' | 'textarea' | 'image' | 'title' | 'section' | 'component' | 'finuiHeader' | 'tabs' | 'grid' | 'listcards';
|
|
33
33
|
placeholder?: string;
|
|
34
34
|
labelPosition?: 'inner' | 'top' | 'none';
|
|
35
35
|
labelVariant?: 'caption' | 'body2' | 'subtitle2' | 'h6';
|
|
@@ -226,8 +226,8 @@ export interface GridField extends BaseField {
|
|
|
226
226
|
columns: Array<{
|
|
227
227
|
key: string;
|
|
228
228
|
header: string;
|
|
229
|
-
type?: 'text' | 'number' | 'select' | 'checkbox';
|
|
230
|
-
width?: number | string;
|
|
229
|
+
type?: 'text' | 'number' | 'select' | 'checkbox' | 'date' | 'index';
|
|
230
|
+
width?: number | string | 'auto';
|
|
231
231
|
options?: {
|
|
232
232
|
label: string;
|
|
233
233
|
value: any;
|
|
@@ -236,6 +236,7 @@ export interface GridField extends BaseField {
|
|
|
236
236
|
disabled?: boolean | ((row: any, index: number) => boolean);
|
|
237
237
|
value?: any | ((row: any, index: number) => any);
|
|
238
238
|
editable?: boolean;
|
|
239
|
+
indexFormat?: (index: number) => string;
|
|
239
240
|
helperText?: string;
|
|
240
241
|
required?: boolean;
|
|
241
242
|
minLength?: number;
|
|
@@ -279,7 +280,25 @@ export interface GridField extends BaseField {
|
|
|
279
280
|
emptySubtitle?: string;
|
|
280
281
|
emptyCardSx?: any;
|
|
281
282
|
}
|
|
282
|
-
export
|
|
283
|
+
export interface ListCardsField extends BaseField {
|
|
284
|
+
type: 'listcards';
|
|
285
|
+
items: Array<{
|
|
286
|
+
id: string | number;
|
|
287
|
+
header?: string;
|
|
288
|
+
chipText?: string;
|
|
289
|
+
leftAction?: {
|
|
290
|
+
name: string;
|
|
291
|
+
label?: string;
|
|
292
|
+
};
|
|
293
|
+
rightAction?: {
|
|
294
|
+
name: string;
|
|
295
|
+
label?: string;
|
|
296
|
+
};
|
|
297
|
+
}>;
|
|
298
|
+
sx?: any;
|
|
299
|
+
cardSx?: any;
|
|
300
|
+
}
|
|
301
|
+
export type FieldConfig = TextField | NumberField | SelectField | CheckboxField | ToggleField | RadioField | SwitchField | AutocompleteField | DateField | ImageField | TitleField | SectionField | ComponentField | FinUiHeaderField | TabsField | GridField | ListCardsField;
|
|
283
302
|
export interface FormButton {
|
|
284
303
|
text: string;
|
|
285
304
|
color?: string;
|