@applica-software-guru/react-admin 1.1.89 → 1.1.91

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.
Files changed (38) hide show
  1. package/dist/components/ActionsMenu.d.ts +2 -1
  2. package/dist/components/ActionsMenu.d.ts.map +1 -1
  3. package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts +41 -0
  4. package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts.map +1 -0
  5. package/dist/components/ra-forms/TableForm/TableFormIteratorContext.d.ts +17 -0
  6. package/dist/components/ra-forms/TableForm/TableFormIteratorContext.d.ts.map +1 -0
  7. package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts +18 -0
  8. package/dist/components/ra-forms/TableForm/TableFormIteratorItem.d.ts.map +1 -0
  9. package/dist/components/ra-forms/TableForm/TableFormIteratorItemContext.d.ts +15 -0
  10. package/dist/components/ra-forms/TableForm/TableFormIteratorItemContext.d.ts.map +1 -0
  11. package/dist/components/ra-forms/TableForm/index.d.ts +7 -0
  12. package/dist/components/ra-forms/TableForm/index.d.ts.map +1 -0
  13. package/dist/components/ra-forms/TableForm/useTableFormIterator.d.ts +8 -0
  14. package/dist/components/ra-forms/TableForm/useTableFormIterator.d.ts.map +1 -0
  15. package/dist/components/ra-forms/index.d.ts +2 -1
  16. package/dist/components/ra-forms/index.d.ts.map +1 -1
  17. package/dist/react-admin.cjs.js +50 -50
  18. package/dist/react-admin.cjs.js.map +1 -1
  19. package/dist/react-admin.es.js +8344 -7903
  20. package/dist/react-admin.es.js.map +1 -1
  21. package/dist/react-admin.umd.js +51 -51
  22. package/dist/react-admin.umd.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/components/ActionsMenu.tsx +4 -3
  25. package/src/components/ra-forms/TableForm/TableFormIterator.tsx +245 -0
  26. package/src/components/ra-forms/TableForm/TableFormIteratorContext.ts +19 -0
  27. package/src/components/ra-forms/TableForm/TableFormIteratorItem.tsx +91 -0
  28. package/src/components/ra-forms/TableForm/TableFormIteratorItemContext.ts +17 -0
  29. package/src/components/ra-forms/TableForm/index.ts +7 -0
  30. package/src/components/ra-forms/TableForm/useTableFormIterator.ts +10 -0
  31. package/src/components/ra-forms/index.jsx +14 -1
  32. package/src/playground/components/ra-forms/UserForm.jsx +19 -1
  33. package/src/playground/components/ra-forms/index.jsx +0 -1
  34. package/src/playground/components/ra-lists/index.jsx +0 -1
  35. package/src/playground/entities/index.jsx +0 -1
  36. package/src/playground/menu.jsx +7 -0
  37. package/src/playground/components/ra-forms/OrderForm.jsx +0 -48
  38. package/src/playground/components/ra-lists/OrderList.jsx +0 -12
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  export type ActionsMenuProps = {
4
4
  children: React.ReactNode;
5
+ horizontal?: boolean;
5
6
  };
6
7
  /**
7
8
  * Consente di disegnare un menu di azioni raggruppate all'interno di un popover.
@@ -17,7 +18,7 @@ export type ActionsMenuProps = {
17
18
  * @returns {React.ReactElement}
18
19
  */
19
20
  declare const ActionsMenu: {
20
- ({ children }: ActionsMenuProps): React.ReactElement | null;
21
+ ({ horizontal, children }: ActionsMenuProps): React.ReactElement | null;
21
22
  propTypes: {
22
23
  children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
23
24
  sx: PropTypes.Requireable<object>;
@@ -1 +1 @@
1
- {"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAI/D,OAAO,SAAS,MAAM,YAAY,CAAC;AAuBnC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,WAAW;mBAAkB,gBAAgB,GAAG,MAAM,YAAY,GAAG,IAAI;;;;;;;;CAiC9E,CAAC;AAOF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAI/D,OAAO,SAAS,MAAM,YAAY,CAAC;AAuBnC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,WAAW;+BAAsC,gBAAgB,GAAG,MAAM,YAAY,GAAG,IAAI;;;;;;;;CAiClG,CAAC;AAOF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { SxProps } from '@mui/material';
3
+ import { RaRecord } from 'ra-core';
4
+ import PropTypes from 'prop-types';
5
+ import { UseFieldArrayReturn } from 'react-hook-form';
6
+ declare const StyledTableFormIterator: import("@emotion/styled").StyledComponent<Pick<Pick<TableFormIteratorProps, keyof TableFormIteratorProps> & Pick<PropTypes.InferProps<{
7
+ addButton: PropTypes.Requireable<PropTypes.ReactElementLike>;
8
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
+ className: PropTypes.Requireable<string>;
10
+ field: PropTypes.Requireable<object>;
11
+ fields: PropTypes.Requireable<any[]>;
12
+ fieldState: PropTypes.Requireable<object>;
13
+ formState: PropTypes.Requireable<object>;
14
+ record: PropTypes.Requireable<object>;
15
+ source: PropTypes.Requireable<string>;
16
+ label: PropTypes.Requireable<string>;
17
+ resource: PropTypes.Requireable<string>;
18
+ translate: PropTypes.Requireable<(...args: any[]) => any>;
19
+ disableAdd: PropTypes.Requireable<boolean>;
20
+ disableRemove: PropTypes.Requireable<NonNullable<boolean | ((...args: any[]) => any) | null | undefined>>;
21
+ TransitionProps: PropTypes.Requireable<PropTypes.InferProps<{}>>;
22
+ }>, "translate" | "TransitionProps" | "field" | "formState" | "fieldState"> & Pick<TableFormIteratorProps, "replace" | "meta" | "sx" | "move" | "remove" | "append" | "prepend" | "swap" | "insert" | "update" | "disableActions">, keyof TableFormIteratorProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
23
+ export interface TableFormIteratorProps extends Partial<UseFieldArrayReturn> {
24
+ addButton?: ReactElement;
25
+ children?: ReactNode;
26
+ className?: string;
27
+ disableAdd?: boolean;
28
+ disableActions?: boolean;
29
+ disableRemove?: boolean;
30
+ meta?: {
31
+ error?: any;
32
+ submitFailed?: boolean;
33
+ };
34
+ record?: RaRecord;
35
+ label?: string;
36
+ resource?: string;
37
+ source?: string;
38
+ sx?: SxProps;
39
+ }
40
+ export default StyledTableFormIterator;
41
+ //# sourceMappingURL=TableFormIterator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableFormIterator.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIterator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,YAAY,EAAE,SAAS,EAA0C,MAAM,OAAO,CAAC;AAElG,OAAO,EAIL,OAAO,EAQR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAkC,MAAM,SAAS,CAAC;AAInE,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAsKtD,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;sVAU1B,CAAC;AAyBJ,MAAM,WAAW,sBAAuB,SAAQ,OAAO,CAAC,mBAAmB,CAAC;IAC1E,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE;QAEL,KAAK,CAAC,EAAE,GAAG,CAAC;QACZ,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;IACF,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,OAAO,CAAC;CACd;AAED,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * A React context that provides access to a TableFormIterator data (the total number of items) and mutators (add, reorder and remove).
4
+ * Useful to create custom array input iterators.
5
+ * @see {TableFormIterator}
6
+ * @see {ArrayInput}
7
+ *
8
+ */
9
+ export declare const TableFormIteratorContext: import("react").Context<TableFormIteratorContextValue>;
10
+ export type TableFormIteratorContextValue = {
11
+ add: () => void;
12
+ remove: (index: number) => void;
13
+ reOrder: (index: number, newIndex: number) => void;
14
+ source: string;
15
+ total: number;
16
+ };
17
+ //# sourceMappingURL=TableFormIteratorContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableFormIteratorContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIteratorContext.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAEH,eAAO,MAAM,wBAAwB,wDAA0D,CAAC;AAEhG,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"}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { ReactElement, ReactNode } from 'react';
3
+ import { RaRecord } from 'ra-core';
4
+ export declare const TableFormIteratorItem: React.ForwardRefExoticComponent<TableFormIteratorItemProps & React.RefAttributes<unknown>>;
5
+ export type TableFormIteratorItemProps = {
6
+ children?: ReactNode;
7
+ disabled?: boolean;
8
+ disableRemove?: boolean;
9
+ disableActions?: boolean;
10
+ index: number;
11
+ member: string;
12
+ onRemoveField: (index: number) => void;
13
+ record: RaRecord;
14
+ removeButton?: ReactElement;
15
+ resource: string;
16
+ source: string;
17
+ };
18
+ //# sourceMappingURL=TableFormIteratorItem.d.ts.map
@@ -0,0 +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;AAMjG,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAInC,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"}
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * A React context that provides access to a TableFormIterator item meta (its index and the total number of items) and mutators (reorder and remove this remove).
4
+ * Useful to create custom array input iterators.
5
+ * @see {TableFormIterator}
6
+ * @see {ArrayInput}
7
+ */
8
+ export declare const TableFormIteratorItemContext: import("react").Context<TableFormIteratorItemContextValue>;
9
+ export type TableFormIteratorItemContextValue = {
10
+ index: number;
11
+ total: number;
12
+ remove: () => void;
13
+ reOrder: (newIndex: number) => void;
14
+ };
15
+ //# sourceMappingURL=TableFormIteratorItemContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableFormIteratorItemContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/TableFormIteratorItemContext.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,eAAO,MAAM,4BAA4B,4DAA8D,CAAC;AAExG,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"}
@@ -0,0 +1,7 @@
1
+ import TableFormIterator from './TableFormIterator';
2
+ export * from './TableFormIteratorContext';
3
+ export * from './TableFormIteratorItem';
4
+ export * from './TableFormIteratorItemContext';
5
+ export * from './useTableFormIterator';
6
+ export default TableFormIterator;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AAEvC,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A hook that provides access to a TableFormIterator data (the total number of items) and mutators (add, reorder and remove).
3
+ * Useful to create custom array input iterators.
4
+ * @see {TableFormIterator}
5
+ * @see {ArrayInput}
6
+ */
7
+ export declare const useTableFormIterator: () => import("./TableFormIteratorContext").TableFormIteratorContextValue;
8
+ //# sourceMappingURL=useTableFormIterator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableFormIterator.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/TableForm/useTableFormIterator.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,0EAA6C,CAAC"}
@@ -7,6 +7,7 @@ import LongForm from './LongForm';
7
7
  import SimpleForm from './SimpleForm';
8
8
  import SimpleFormIterator from './SimpleFormIterator';
9
9
  import TabbedForm from './TabbedForm';
10
+ import TableFormIterator from './TableForm';
10
11
  import Toolbar from './Toolbar';
11
- export { Create, CardForm, ChangePasswordForm, Edit, FormHeader, LongForm, SimpleForm, SimpleFormIterator, TabbedForm, Toolbar };
12
+ export { Create, CardForm, ChangePasswordForm, Edit, FormHeader, LongForm, SimpleForm, SimpleFormIterator, TabbedForm, TableFormIterator, Toolbar };
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-forms/index.jsx"],"names":[],"mappings":"mBAEmB,UAAU;qBAFR,YAAY;+BACF,sBAAsB;iBAEpC,QAAQ;uBACF,cAAc;qBAChB,YAAY;uBACV,cAAc;+BACN,sBAAsB;uBAC9B,cAAc;oBACjB,WAAW"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-forms/index.jsx"],"names":[],"mappings":"mBAEmB,UAAU;qBAFR,YAAY;+BACF,sBAAsB;iBAEpC,QAAQ;uBACF,cAAc;qBAChB,YAAY;uBACV,cAAc;+BACN,sBAAsB;uBAC9B,cAAc;8BACP,aAAa;oBACvB,WAAW"}