@applica-software-guru/react-admin 1.5.261 → 1.5.263
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/ra-forms/TableForm/AddTableRow.d.ts +4 -0
- package/dist/components/ra-forms/TableForm/AddTableRow.d.ts.map +1 -0
- package/dist/components/ra-forms/TableForm/CreateButton.d.ts +12 -0
- package/dist/components/ra-forms/TableForm/CreateButton.d.ts.map +1 -0
- package/dist/components/ra-forms/TableForm/EditButton.d.ts +3 -0
- package/dist/components/ra-forms/TableForm/EditButton.d.ts.map +1 -0
- package/dist/components/ra-forms/TableForm/Field.d.ts +8 -0
- package/dist/components/ra-forms/TableForm/Field.d.ts.map +1 -0
- package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts +97 -5
- package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts +5 -2
- package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/TableFormIteratorItemContext.d.ts +1 -0
- package/dist/components/ra-forms/TableForm/TableFormIteratorItemContext.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/index.d.ts +4 -0
- package/dist/components/ra-forms/TableForm/index.d.ts.map +1 -1
- package/dist/components/ra-inputs/DateInput.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +52 -52
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +8158 -8164
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +51 -51
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-forms/TableForm/AddTableRow.tsx +34 -0
- package/src/components/ra-forms/TableForm/CreateButton.tsx +58 -0
- package/src/components/ra-forms/TableForm/EditButton.tsx +42 -0
- package/src/components/ra-forms/TableForm/Field.tsx +23 -0
- package/src/components/ra-forms/TableForm/TableFormIterator.tsx +131 -62
- package/src/components/ra-forms/TableForm/TableFormIteratorItem.tsx +37 -7
- package/src/components/ra-forms/TableForm/TableFormIteratorItemContext.ts +1 -0
- package/src/components/ra-forms/TableForm/index.ts +4 -0
- package/src/components/ra-inputs/DateInput.tsx +21 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddTableRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/AddTableRow.tsx"],"names":[],"mappings":";AAIA,iBAAS,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,CAAC,OAAO,CA2B5C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CreateButtonProps {
|
|
3
|
+
label: string;
|
|
4
|
+
disableAdd?: boolean;
|
|
5
|
+
inset?: boolean;
|
|
6
|
+
source?: string;
|
|
7
|
+
template?: any;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function CreateButton(props: CreateButtonProps): JSX.Element;
|
|
11
|
+
export { CreateButton };
|
|
12
|
+
//# sourceMappingURL=CreateButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/CreateButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAwC3D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/EditButton.tsx"],"names":[],"mappings":"AAKA,iBAAS,UAAU,CAAC,KAAK,EAAE,GAAG,2CAkC7B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,UAAU;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAOD,iBAAS,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAMnE;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Field } from './Field';
|
|
2
|
+
import { CreateButton } from './CreateButton';
|
|
3
|
+
import { EditButton } from './EditButton';
|
|
1
4
|
import { SxProps } from '@mui/material';
|
|
2
5
|
import { RaRecord } from 'ra-core';
|
|
3
6
|
import { ReactElement, ReactNode } from 'react';
|
|
@@ -10,11 +13,23 @@ interface TableFormIteratorProps extends Partial<UseFieldArrayReturn> {
|
|
|
10
13
|
disableAdd?: boolean;
|
|
11
14
|
disableRemove?: boolean;
|
|
12
15
|
enableClearAll?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Adding the template prop will allow to set a default value for the new row.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <Grid container>
|
|
21
|
+
* <Grid item xs={12}>
|
|
22
|
+
* <ArrayInput label={false} source="descriptor.fields">
|
|
23
|
+
* <TableFormIterator template={{ property: 'FIELD' }} label="Property catalog">
|
|
24
|
+
* <TextInput label="Name" source={'name'} validate={required()} />
|
|
25
|
+
* <TextInput source={'denomination'} helperText={false} />
|
|
26
|
+
* <SelectInput choices={FieldTypes} source={'type'} helperText={false} />
|
|
27
|
+
* </TableFormIterator>
|
|
28
|
+
* </ArrayInput>
|
|
29
|
+
* </Grid>
|
|
30
|
+
* </Grid>
|
|
31
|
+
*/
|
|
13
32
|
template?: object;
|
|
14
|
-
meta?: {
|
|
15
|
-
error?: any;
|
|
16
|
-
submitFailed?: boolean;
|
|
17
|
-
};
|
|
18
33
|
record?: RaRecord;
|
|
19
34
|
label?: string | boolean;
|
|
20
35
|
resource?: string;
|
|
@@ -23,6 +38,83 @@ interface TableFormIteratorProps extends Partial<UseFieldArrayReturn> {
|
|
|
23
38
|
empty: ReactNode | string;
|
|
24
39
|
inset?: boolean;
|
|
25
40
|
}
|
|
26
|
-
|
|
41
|
+
type ITableForm = typeof TableFormIterator & {
|
|
42
|
+
/**
|
|
43
|
+
* TableFormiterator allows to insert an addButton which will render the default btn and open a dialog with the form fields passed as children.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* <Grid container>
|
|
47
|
+
* <Grid item xs={12}>
|
|
48
|
+
* <ArrayInput label={false} source="descriptor.fields">
|
|
49
|
+
* <TableFormIterator
|
|
50
|
+
* addButton={<TableFormIterator.CreateButton>
|
|
51
|
+
* <TextInput label="Name" source={'name'} validate={required()} />
|
|
52
|
+
* <SelectInput choices={FieldTypes} source={'type'} helperText={false} />
|
|
53
|
+
* </TableFormIterator.CreateButton>}
|
|
54
|
+
* label="Property catalog">
|
|
55
|
+
* <TextInput label="Name" source={'name'} validate={required()} />
|
|
56
|
+
* <TextInput label="Denomination" source={'denomination'} helperText={false} />
|
|
57
|
+
* <SelectInput choices={FieldTypes} source={'type'} helperText={false} />
|
|
58
|
+
* </TableFormIterator>
|
|
59
|
+
* </ArrayInput>
|
|
60
|
+
* </Grid>
|
|
61
|
+
* </Grid>
|
|
62
|
+
*/
|
|
63
|
+
CreateButton: typeof CreateButton;
|
|
64
|
+
/**
|
|
65
|
+
* TableFormiterator allows a child EditButton which will render an edit button in the ActionsMenu of each row.
|
|
66
|
+
* The EditButton will open a dialog with the form fields passed as children.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* <Grid container>
|
|
70
|
+
* <Grid item xs={12}>
|
|
71
|
+
* <ArrayInput label={false} source="descriptor.fields">
|
|
72
|
+
* <TableFormIterator label="Property catalog">
|
|
73
|
+
*
|
|
74
|
+
* <TableFormIterator.EditButton>
|
|
75
|
+
* <TextInput label="Name" source={'name'} validate={required()} />
|
|
76
|
+
* <SelectInput choices={FieldTypes} source={'type'} helperText={false} />
|
|
77
|
+
* </TableFormIterator.EditButton>
|
|
78
|
+
*
|
|
79
|
+
* <TextInput label="Name" source={'name'} validate={required()} />
|
|
80
|
+
* <TextInput label="Denomination" source={'denomination'} helperText={false} />
|
|
81
|
+
* <SelectInput choices={FieldTypes} source={'type'} helperText={false} />
|
|
82
|
+
* </TableFormIterator>
|
|
83
|
+
* </ArrayInput>
|
|
84
|
+
* </Grid>
|
|
85
|
+
* </Grid>
|
|
86
|
+
*/
|
|
87
|
+
EditButton: typeof EditButton;
|
|
88
|
+
/**
|
|
89
|
+
* TableFormiterator allows a child Field which will render a read-only field in the Table with a custom record context.
|
|
90
|
+
* The record context will overwritthe by getValues() of useFormContext() hook.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* <Grid container>
|
|
94
|
+
* <Grid item xs={12}>
|
|
95
|
+
* <ArrayInput label={false} source="descriptor.fields">
|
|
96
|
+
* <TableFormIterator label="Property catalog">
|
|
97
|
+
*
|
|
98
|
+
* <TableFormIterator.EditButton>
|
|
99
|
+
* <TextInput label="Name" source={'name'} validate={required()} />
|
|
100
|
+
* <SelectInput choices={FieldTypes} source={'type'} helperText={false} />
|
|
101
|
+
* </TableFormIterator.EditButton>
|
|
102
|
+
*
|
|
103
|
+
* <TableFormIterator.Field source="name">
|
|
104
|
+
* <TextField />
|
|
105
|
+
* </TableFormIterator.Field>
|
|
106
|
+
* <TableFormIterator.Field source="type">
|
|
107
|
+
* <TextField />
|
|
108
|
+
* </TableFormIterator.Field>
|
|
109
|
+
* {...}
|
|
110
|
+
* </TableFormIterator>
|
|
111
|
+
* </ArrayInput>
|
|
112
|
+
* </Grid>
|
|
113
|
+
* </Grid>
|
|
114
|
+
*/
|
|
115
|
+
Field: typeof Field;
|
|
116
|
+
};
|
|
117
|
+
declare const DefaultTableForm: ITableForm;
|
|
118
|
+
export { DefaultTableForm as TableFormIterator };
|
|
27
119
|
export type { TableFormIteratorProps };
|
|
28
120
|
//# sourceMappingURL=TableFormIterator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFormIterator.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIterator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableFormIterator.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIterator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAEL,OAAO,EAQR,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAoB,QAAQ,EAAmC,MAAM,SAAS,CAAC;AAEtF,OAAO,EAAY,YAAY,EAAE,SAAS,EAA0C,MAAM,OAAO,CAAC;AAElG,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAyOtE,QAAA,MAAM,iBAAiB,2LAapB,CAAC;AAEJ,UAAU,sBAAuB,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IACnE,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,KAAK,UAAU,GAAG,OAAO,iBAAiB,GAAG;IAC3C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,YAAY,EAAE,OAAO,YAAY,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,EAAE,OAAO,UAAU,CAAC;IAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,gBAAgB,YAAkC,CAAC;AAMzD,OAAO,EAAE,gBAAgB,IAAI,iBAAiB,EAAE,CAAC;AACjD,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RaRecord } from 'ra-core';
|
|
2
2
|
import { ReactElement, ReactNode } from 'react';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
declare const TableFormIteratorItem: React.ForwardRefExoticComponent<TableFormIteratorItemProps & React.RefAttributes<unknown>>;
|
|
5
|
+
type TableFormIteratorItemProps = {
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
disableRemove?: boolean;
|
|
@@ -11,7 +11,10 @@ export type TableFormIteratorItemProps = {
|
|
|
11
11
|
onRemoveField: (index: number) => void;
|
|
12
12
|
record: RaRecord;
|
|
13
13
|
removeButton?: ReactElement;
|
|
14
|
+
editAction?: ReactElement;
|
|
14
15
|
resource: string;
|
|
15
16
|
source: string;
|
|
16
17
|
};
|
|
18
|
+
export { TableFormIteratorItem };
|
|
19
|
+
export type { TableFormIteratorItemProps };
|
|
17
20
|
//# sourceMappingURL=TableFormIteratorItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFormIteratorItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIteratorItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableFormIteratorItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIteratorItem.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAY,YAAY,EAAE,SAAS,EAAyC,MAAM,OAAO,CAAC;AACjG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,qBAAqB,4FA2FzB,CAAC;AAEH,KAAK,0BAA0B,GAAG;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,MAAM,EAAE,QAAQ,CAAC;IACjB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,YAAY,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFormIteratorItemContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIteratorItemContext.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,QAAA,MAAM,4BAA4B,4DAA8D,CAAC;AAEjG,KAAK,iCAAiC,GAAG;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF;;;;;GAKG;AACH,iBAAS,wBAAwB,IAAI,iCAAiC,CAErE;AAED,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,CAAC;AAClE,YAAY,EAAE,iCAAiC,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"TableFormIteratorItemContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIteratorItemContext.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,QAAA,MAAM,4BAA4B,4DAA8D,CAAC;AAEjG,KAAK,iCAAiC,GAAG;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF;;;;;GAKG;AACH,iBAAS,wBAAwB,IAAI,iCAAiC,CAErE;AAED,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,CAAC;AAClE,YAAY,EAAE,iCAAiC,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/DateInput.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/DateInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,cAAc,EAA4B,MAAM,aAAa,CAAC;AAUvE,iBAAS,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAuBrD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
|