@applica-software-guru/react-admin 1.3.134 → 1.3.137
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/bitbucket-pipelines.yml +1 -1
- package/dist/components/ra-fields/ReferenceManyField.d.ts +57 -7
- package/dist/components/ra-fields/ReferenceManyField.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts.map +1 -1
- package/dist/components/ra-forms/TableForm/index.d.ts +0 -3
- package/dist/components/ra-forms/TableForm/index.d.ts.map +1 -1
- package/dist/components/ra-inputs/ReferenceManyInput.d.ts +4 -1
- package/dist/components/ra-inputs/ReferenceManyInput.d.ts.map +1 -1
- package/dist/{components/ra-forms/TableForm → contexts}/TableFormIteratorContext.d.ts +2 -1
- package/dist/contexts/TableFormIteratorContext.d.ts.map +1 -0
- package/dist/{components/ra-forms/TableForm → contexts}/TableFormIteratorItemContext.d.ts +2 -1
- package/dist/contexts/TableFormIteratorItemContext.d.ts.map +1 -0
- package/dist/contexts/index.d.ts +2 -0
- package/dist/contexts/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/{components/ra-forms/TableForm → hooks}/useTableFormIterator.d.ts +2 -1
- package/dist/hooks/useTableFormIterator.d.ts.map +1 -0
- package/dist/hooks/useTableFormIteratorItem.d.ts +9 -0
- package/dist/hooks/useTableFormIteratorItem.d.ts.map +1 -0
- package/dist/react-admin.cjs.js +49 -49
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +4375 -4361
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +54 -54
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-fields/ReferenceManyField.tsx +145 -0
- package/src/components/ra-forms/TableForm/TableFormIterator.tsx +1 -1
- package/src/components/ra-forms/TableForm/TableFormIteratorItem.tsx +3 -3
- package/src/components/ra-forms/TableForm/index.ts +0 -3
- package/src/{components/ra-forms/TableForm → contexts}/TableFormIteratorContext.ts +3 -1
- package/src/{components/ra-forms/TableForm → contexts}/TableFormIteratorItemContext.ts +3 -1
- package/src/contexts/index.jsx +2 -0
- package/src/hooks/index.jsx +13 -1
- package/src/{components/ra-forms/TableForm → hooks}/useTableFormIterator.ts +4 -2
- package/src/hooks/useTableFormIteratorItem.ts +12 -0
- package/dist/components/ra-forms/TableForm/TableFormIteratorContext.d.ts.map +0 -1
- package/dist/components/ra-forms/TableForm/TableFormIteratorItemContext.d.ts.map +0 -1
- package/dist/components/ra-forms/TableForm/useTableFormIterator.d.ts.map +0 -1
- package/src/components/ra-fields/ReferenceManyField.jsx +0 -80
package/bitbucket-pipelines.yml
CHANGED
|
@@ -1,8 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { ReferenceManyFieldProps as RaReferenceManyFieldProps } from 'react-admin';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export type StyledDivProps = {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export type ReferenceManyFieldProps = RaReferenceManyFieldProps & {
|
|
9
|
+
/**
|
|
10
|
+
* Default false, serve ad aggiungere un margine attorno al componente.
|
|
11
|
+
*/
|
|
12
|
+
margin?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Default false, serve ad aggiungere un bordo inferiore al componente.
|
|
15
|
+
*/
|
|
16
|
+
border?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Default undefined, serve ad aggiungere un padding superiore al componente per consentire
|
|
19
|
+
* la visualizzazione della toolbar delle bulk action buttons.
|
|
20
|
+
*/
|
|
21
|
+
bulkActionButtons?: boolean | any;
|
|
22
|
+
};
|
|
23
|
+
export type StyledRootProps = ReferenceManyFieldProps & {
|
|
24
|
+
theme?: any;
|
|
25
|
+
bulkActionButtons?: boolean | any;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Consente di gestire la visualizzazione di una lista di record correlati ad un record principale.
|
|
29
|
+
* Questo componente è una versione customizzata del componente ReferenceManyField di React-Admin.
|
|
30
|
+
*
|
|
31
|
+
* Se vuoi visualizzare record e non mostrare l'elenco delle azioni disponibili (bulk action buttons)
|
|
32
|
+
* puoi impostare la prop bulkActionButtons a false e, successivamente, se utilizzi un componente interno di tipo <Datagrid />
|
|
33
|
+
* devi impostare la stessa proprietà, bulkActionButtons, a false (in questo modo viene completamente eliminato il padding
|
|
34
|
+
* superiore del componente <Datagrid />).
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* import { ReferenceManyField, Datagrid } from '../..';
|
|
38
|
+
*
|
|
39
|
+
* const MyComponent = (props) => (
|
|
40
|
+
* <ReferenceManyField {...props} bulkActionButtons={false}>
|
|
41
|
+
* <Datagrid bulkActionButtons={false}>
|
|
42
|
+
* ...
|
|
43
|
+
* </Datagrid>
|
|
44
|
+
* </ReferenceManyField>
|
|
45
|
+
*
|
|
46
|
+
* @param props {ReferenceManyFieldProps}
|
|
47
|
+
* @returns {JSX.Element}
|
|
48
|
+
*/
|
|
49
|
+
declare const ReferenceManyField: {
|
|
50
|
+
(props: ReferenceManyFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
defaultProps: {
|
|
52
|
+
margin: boolean;
|
|
53
|
+
border: boolean;
|
|
54
|
+
};
|
|
55
|
+
propTypes: {
|
|
6
56
|
margin: PropTypes.Requireable<boolean>;
|
|
7
57
|
border: PropTypes.Requireable<boolean>;
|
|
8
58
|
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
@@ -22,6 +72,6 @@ declare namespace ReferenceManyField {
|
|
|
22
72
|
}>>>;
|
|
23
73
|
target: PropTypes.Validator<string>;
|
|
24
74
|
};
|
|
25
|
-
}
|
|
26
|
-
|
|
75
|
+
};
|
|
76
|
+
export default ReferenceManyField;
|
|
27
77
|
//# sourceMappingURL=ReferenceManyField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceManyField.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-fields/ReferenceManyField.
|
|
1
|
+
{"version":3,"file":"ReferenceManyField.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-fields/ReferenceManyField.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAA0D,uBAAuB,IAAI,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE3I,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,yBAAyB,GAAG;IAChE;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,uBAAuB,GAAG;IACtD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,iBAAiB,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC;CACnC,CAAC;AA2EF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,kBAAkB;YAAW,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;CAKzD,CAAC;AAaF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFormIteratorItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIteratorItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAY,YAAY,EAAE,SAAS,EAAyC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TableFormIteratorItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIteratorItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAY,YAAY,EAAE,SAAS,EAAyC,MAAM,OAAO,CAAC;AAKjG,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,eAAO,MAAM,qBAAqB,4FAgEhC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,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,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import TableFormIterator from './TableFormIterator';
|
|
2
|
-
export * from './TableFormIteratorContext';
|
|
3
2
|
export * from './TableFormIteratorItem';
|
|
4
|
-
export * from './TableFormIteratorItemContext';
|
|
5
|
-
export * from './useTableFormIterator';
|
|
6
3
|
export default TableFormIterator;
|
|
7
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,cAAc,yBAAyB,CAAC;AAExC,eAAe,iBAAiB,CAAC"}
|
|
@@ -30,7 +30,10 @@ declare namespace ReferenceManyInput {
|
|
|
30
30
|
order: PropTypes.Requireable<"ASC" | "DESC">;
|
|
31
31
|
}>>>;
|
|
32
32
|
};
|
|
33
|
-
const defaultProps:
|
|
33
|
+
const defaultProps: {
|
|
34
|
+
margin: boolean;
|
|
35
|
+
border: boolean;
|
|
36
|
+
};
|
|
34
37
|
}
|
|
35
38
|
import PropTypes from 'prop-types';
|
|
36
39
|
//# sourceMappingURL=ReferenceManyInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceManyInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/ReferenceManyInput.jsx"],"names":[],"mappings":";AAMA;;;;;;;4CAWC
|
|
1
|
+
{"version":3,"file":"ReferenceManyInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/ReferenceManyInput.jsx"],"names":[],"mappings":";AAMA;;;;;;;4CAWC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAdqB,YAAY"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @see {ArrayInput}
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
declare const TableFormIteratorContext: import("react").Context<TableFormIteratorContextValue>;
|
|
10
10
|
export type TableFormIteratorContextValue = {
|
|
11
11
|
add: () => void;
|
|
12
12
|
remove: (index: number) => void;
|
|
@@ -14,4 +14,5 @@ export type TableFormIteratorContextValue = {
|
|
|
14
14
|
source: string;
|
|
15
15
|
total: number;
|
|
16
16
|
};
|
|
17
|
+
export { TableFormIteratorContext };
|
|
17
18
|
//# sourceMappingURL=TableFormIteratorContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableFormIteratorContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/TableFormIteratorContext.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAEH,QAAA,MAAM,wBAAwB,wDAA0D,CAAC;AAEzF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
* @see {TableFormIterator}
|
|
6
6
|
* @see {ArrayInput}
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
declare const TableFormIteratorItemContext: import("react").Context<TableFormIteratorItemContextValue>;
|
|
9
9
|
export type TableFormIteratorItemContextValue = {
|
|
10
10
|
index: number;
|
|
11
11
|
total: number;
|
|
12
12
|
remove: () => void;
|
|
13
13
|
reOrder: (newIndex: number) => void;
|
|
14
14
|
};
|
|
15
|
+
export { TableFormIteratorItemContext };
|
|
15
16
|
//# sourceMappingURL=TableFormIteratorItemContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableFormIteratorItemContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/TableFormIteratorItemContext.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,QAAA,MAAM,4BAA4B,4DAA8D,CAAC;AAEjG,MAAM,MAAM,iCAAiC,GAAG;IAC9C,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,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
|
package/dist/contexts/index.d.ts
CHANGED
|
@@ -2,5 +2,7 @@ export { MenuPropTypes };
|
|
|
2
2
|
export * from "./ThemeConfigContext";
|
|
3
3
|
export * from "./MenuConfigContext";
|
|
4
4
|
export * from "./AppConfigContext";
|
|
5
|
+
export * from "./TableFormIteratorContext";
|
|
6
|
+
export * from "./TableFormIteratorItemContext";
|
|
5
7
|
import MenuPropTypes from './MenuPropTypes';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.jsx"],"names":[],"mappings":";;;;;;0BAA0B,iBAAiB"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -8,5 +8,7 @@ import useLocalStorage from './useLocalStorage';
|
|
|
8
8
|
import useThemeConfig from './useThemeConfig';
|
|
9
9
|
import useResourceTitle from './useResourceTitle';
|
|
10
10
|
import useMenuConfig from './useMenuConfig';
|
|
11
|
-
|
|
11
|
+
import useTableFormIterator from './useTableFormIterator';
|
|
12
|
+
import useTableFormIteratorItem from './useTableFormIteratorItem';
|
|
13
|
+
export { useAppConfig, useMenu, useBreadcrumbs, useLocalStorage, useThemeConfig, useResourceTitle, useMenuConfig, useTableFormIterator, useTableFormIteratorItem };
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.jsx"],"names":[],"mappings":";;;yBAAyB,gBAAgB;oBAGrB,WAAW;2BAFJ,kBAAkB;4BACjB,mBAAmB;2BAIpB,kBAAkB;6BADhB,oBAAoB;0BADvB,iBAAiB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.jsx"],"names":[],"mappings":";;;yBAAyB,gBAAgB;oBAGrB,WAAW;2BAFJ,kBAAkB;4BACjB,mBAAmB;2BAIpB,kBAAkB;6BADhB,oBAAoB;0BADvB,iBAAiB;iCAGV,wBAAwB;qCACpB,4BAA4B"}
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
* @see {TableFormIterator}
|
|
5
5
|
* @see {ArrayInput}
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
declare const useTableFormIterator: () => import("../contexts").TableFormIteratorContextValue;
|
|
8
|
+
export default useTableFormIterator;
|
|
8
9
|
//# sourceMappingURL=useTableFormIterator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableFormIterator.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableFormIterator.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,QAAA,MAAM,oBAAoB,2DAA6C,CAAC;AAExE,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A hook that provides access to a TableFormIterator item meta (its index and the total number of items) and mutators (reorder and remove this remove).
|
|
3
|
+
* Useful to create custom array input iterators.
|
|
4
|
+
* @see {TableFormIterator}
|
|
5
|
+
* @see {ArrayInput}
|
|
6
|
+
*/
|
|
7
|
+
declare const useTableFormIteratorItem: () => import("../contexts").TableFormIteratorItemContextValue;
|
|
8
|
+
export default useTableFormIteratorItem;
|
|
9
|
+
//# sourceMappingURL=useTableFormIteratorItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableFormIteratorItem.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableFormIteratorItem.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,QAAA,MAAM,wBAAwB,+DAAiD,CAAC;AAEhF,eAAe,wBAAwB,CAAC"}
|