@applica-software-guru/react-admin 1.0.36 → 1.0.38

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 (111) hide show
  1. package/.prettierrc +4 -4
  2. package/dist/components/MainCard.d.ts.map +1 -1
  3. package/dist/components/index.d.ts +1 -0
  4. package/dist/components/index.d.ts.map +1 -1
  5. package/dist/components/ra-forms/Edit.d.ts.map +1 -1
  6. package/dist/components/ra-forms/LongForm/{DispositionProps.d.ts → types.d.ts} +10 -4
  7. package/dist/components/ra-forms/LongForm/types.d.ts.map +1 -0
  8. package/dist/components/ra-forms/LongForm/useFormRootPath.d.ts +3 -3
  9. package/dist/components/ra-forms/LongForm/useFormRootPath.d.ts.map +1 -1
  10. package/dist/components/ra-inputs/AttachmentInput.d.ts +4 -1
  11. package/dist/components/ra-inputs/AttachmentInput.d.ts.map +1 -1
  12. package/dist/components/ra-inputs/LabeledInput.d.ts +2 -1
  13. package/dist/components/ra-inputs/LabeledInput.d.ts.map +1 -1
  14. package/dist/components/ra-inputs/SmartTextInput.d.ts.map +1 -1
  15. package/dist/contexts/ThemeConfigContext.d.ts.map +1 -1
  16. package/dist/hooks/useAppConfig.d.ts +3 -0
  17. package/dist/hooks/useAppConfig.d.ts.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/react-admin.cjs.js +49 -49
  20. package/dist/react-admin.es.js +7942 -7640
  21. package/dist/react-admin.umd.js +50 -50
  22. package/package.json +3 -2
  23. package/playground/src/.prettierrc +8 -0
  24. package/playground/src/App.js +21 -21
  25. package/playground/src/components/pages/CustomPage.jsx +4 -4
  26. package/playground/src/components/pages/index.jsx +2 -2
  27. package/playground/src/components/ra-forms/DeviceForm.js +7 -14
  28. package/playground/src/components/ra-forms/UserForm.js +10 -24
  29. package/playground/src/components/ra-forms/index.js +4 -5
  30. package/playground/src/components/ra-lists/DeviceList.js +8 -16
  31. package/playground/src/components/ra-lists/UserList.js +17 -40
  32. package/playground/src/components/ra-lists/index.js +4 -4
  33. package/playground/src/contexts/index.js +1 -1
  34. package/playground/src/{resource → entities}/device.js +6 -6
  35. package/playground/src/{resource → entities}/i18n-message.js +1 -2
  36. package/playground/src/entities/index.js +4 -0
  37. package/playground/src/{resource → entities}/notification.js +0 -2
  38. package/playground/src/menu.js +18 -9
  39. package/playground/src/theme.js +10 -2
  40. package/react-admin.code-workspace +9 -0
  41. package/src/components/ActionsMenu.tsx +91 -0
  42. package/src/components/MainCard.jsx +29 -32
  43. package/src/components/index.jsx +21 -33
  44. package/src/components/ra-buttons/CreateInDialogButton.tsx +261 -0
  45. package/src/components/ra-custom/ListItem.tsx +147 -0
  46. package/src/components/ra-custom/index.tsx +2 -0
  47. package/src/components/ra-fields/AttachmentField.tsx +88 -0
  48. package/src/components/ra-fields/BaseAttachmentField.tsx +82 -0
  49. package/src/components/ra-forms/Edit.jsx +12 -6
  50. package/src/components/ra-forms/FormHeader.tsx +63 -0
  51. package/src/components/ra-forms/LongForm/LongForm.tsx +59 -0
  52. package/src/components/ra-forms/LongForm/LongFormSidebar.tsx +44 -0
  53. package/src/components/ra-forms/LongForm/{LongFormTab.jsx → LongFormTab.tsx} +47 -46
  54. package/src/components/ra-forms/LongForm/LongFormTabs.tsx +72 -0
  55. package/src/components/ra-forms/LongForm/LongFormView.tsx +152 -0
  56. package/{dist/components/ra-forms/LongForm/index.d.ts → src/components/ra-forms/LongForm/index.tsx} +1 -2
  57. package/src/components/ra-forms/LongForm/types.ts +15 -0
  58. package/src/components/ra-forms/LongForm/useFormRootPath.ts +26 -0
  59. package/src/components/ra-forms/{SimpleForm.jsx → SimpleForm.tsx} +38 -27
  60. package/src/components/ra-inputs/AttachmentInput.jsx +42 -25
  61. package/src/components/ra-inputs/LabeledInput.jsx +27 -32
  62. package/src/components/ra-inputs/SelectInput.jsx +11 -11
  63. package/src/components/ra-inputs/SmartTextInput.jsx +22 -26
  64. package/src/components/ra-inputs/TextInput.jsx +9 -9
  65. package/src/contexts/AppConfigContext.tsx +67 -0
  66. package/src/contexts/ThemeConfigContext.jsx +25 -29
  67. package/src/index.jsx +13 -7
  68. package/src/utils/index.js +2 -2
  69. package/src/utils/lang.js +7 -7
  70. package/src/utils/time.js +7 -7
  71. package/dist/components/ActionsMenu.d.ts +0 -15
  72. package/dist/components/ActionsMenu.d.ts.map +0 -1
  73. package/dist/components/ra-buttons/CreateInDialogButton.d.ts +0 -37
  74. package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +0 -1
  75. package/dist/components/ra-fields/AttachmentField.d.ts +0 -28
  76. package/dist/components/ra-fields/AttachmentField.d.ts.map +0 -1
  77. package/dist/components/ra-fields/BaseAttachmentField.d.ts +0 -17
  78. package/dist/components/ra-fields/BaseAttachmentField.d.ts.map +0 -1
  79. package/dist/components/ra-forms/FormHeader.d.ts +0 -17
  80. package/dist/components/ra-forms/FormHeader.d.ts.map +0 -1
  81. package/dist/components/ra-forms/LongForm/DispositionProps.d.ts.map +0 -1
  82. package/dist/components/ra-forms/LongForm/LongForm.d.ts +0 -45
  83. package/dist/components/ra-forms/LongForm/LongForm.d.ts.map +0 -1
  84. package/dist/components/ra-forms/LongForm/LongFormHeader.d.ts +0 -20
  85. package/dist/components/ra-forms/LongForm/LongFormHeader.d.ts.map +0 -1
  86. package/dist/components/ra-forms/LongForm/LongFormTab.d.ts +0 -43
  87. package/dist/components/ra-forms/LongForm/LongFormTab.d.ts.map +0 -1
  88. package/dist/components/ra-forms/LongForm/LongFormTabs.d.ts +0 -21
  89. package/dist/components/ra-forms/LongForm/LongFormTabs.d.ts.map +0 -1
  90. package/dist/components/ra-forms/LongForm/LongFormView.d.ts +0 -29
  91. package/dist/components/ra-forms/LongForm/LongFormView.d.ts.map +0 -1
  92. package/dist/components/ra-forms/LongForm/index.d.ts.map +0 -1
  93. package/dist/components/ra-forms/SimpleForm.d.ts +0 -26
  94. package/dist/components/ra-forms/SimpleForm.d.ts.map +0 -1
  95. package/dist/contexts/AppConfigContext.d.ts +0 -22
  96. package/dist/contexts/AppConfigContext.d.ts.map +0 -1
  97. package/playground/src/resource/index.js +0 -4
  98. package/src/components/ActionsMenu.jsx +0 -77
  99. package/src/components/ra-buttons/CreateInDialogButton.jsx +0 -203
  100. package/src/components/ra-fields/AttachmentField.jsx +0 -82
  101. package/src/components/ra-fields/BaseAttachmentField.jsx +0 -72
  102. package/src/components/ra-forms/FormHeader.jsx +0 -42
  103. package/src/components/ra-forms/LongForm/DispositionProps.jsx +0 -10
  104. package/src/components/ra-forms/LongForm/LongForm.jsx +0 -38
  105. package/src/components/ra-forms/LongForm/LongFormHeader.jsx +0 -24
  106. package/src/components/ra-forms/LongForm/LongFormTabs.jsx +0 -63
  107. package/src/components/ra-forms/LongForm/LongFormView.jsx +0 -129
  108. package/src/components/ra-forms/LongForm/index.jsx +0 -2
  109. package/src/components/ra-forms/LongForm/useFormRootPath.jsx +0 -22
  110. package/src/contexts/AppConfigContext.jsx +0 -54
  111. /package/playground/src/{resource → entities}/user.js +0 -0
package/.prettierrc CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "semi": false,
3
- "tabWidth": 2,
4
- "printWidth": 100,
2
+ "bracketSpacing": true,
3
+ "printWidth": 140,
5
4
  "singleQuote": true,
6
5
  "trailingComma": "none",
7
- "bracketSpacing": true
6
+ "tabWidth": 2,
7
+ "useTabs": false
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MainCard.d.ts","sourceRoot":"","sources":["../../../src/components/MainCard.jsx"],"names":[],"mappings":";AAWA,sGA+EC"}
1
+ {"version":3,"file":"MainCard.d.ts","sourceRoot":"","sources":["../../../src/components/MainCard.jsx"],"names":[],"mappings":";AAWA,sGA2EE"}
@@ -5,6 +5,7 @@ export * from "./ra-fields";
5
5
  export * from "./ra-inputs";
6
6
  export * from "./ra-lists";
7
7
  export * from "./ra-forms";
8
+ export * from "./ra-custom";
8
9
  import MainIcon from './MainIcon';
9
10
  import ActionsMenu from './ActionsMenu';
10
11
  import Loadable from './Loadable';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.jsx"],"names":[],"mappings":";;;;;;;qBAMqB,YAAY;wBANT,eAAe;qBAElB,YAAY;mBACd,UAAU;mBAFV,UAAU;iBAGZ,QAAQ;qBACJ,YAAY;sBAIX,aAAa;oBACf,WAAW;4BAHH,eAAe;yBAClB,gBAAgB;sBAGnB,aAAa"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.jsx"],"names":[],"mappings":";;;;;;;;qBAMqB,YAAY;wBANT,eAAe;qBAElB,YAAY;mBACd,UAAU;mBAFV,UAAU;iBAGZ,QAAQ;qBACJ,YAAY;sBAIX,aAAa;oBACf,WAAW;4BAHH,eAAe;yBAClB,gBAAgB;sBAGnB,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"Edit.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-forms/Edit.jsx"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;;;;;;;;;4OAOG"}
1
+ {"version":3,"file":"Edit.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-forms/Edit.jsx"],"names":[],"mappings":";AAGA;;;;;;;;;;;;;;;;;;;;;;;4OAaI"}
@@ -1,10 +1,16 @@
1
- export default DispositionProps;
2
- declare const DispositionProps: PropTypes.Requireable<PropTypes.InferProps<{
1
+ import PropTypes from 'prop-types';
2
+ export type Disposition = {
3
+ xl?: number;
4
+ lg?: number;
5
+ md?: number;
6
+ sm?: number;
7
+ xs?: number;
8
+ };
9
+ export declare const DispositionProps: PropTypes.Requireable<PropTypes.InferProps<{
3
10
  xl: PropTypes.Requireable<number>;
4
11
  lg: PropTypes.Requireable<number>;
5
12
  md: PropTypes.Requireable<number>;
6
13
  sm: PropTypes.Requireable<number>;
7
14
  xs: PropTypes.Requireable<number>;
8
15
  }>>;
9
- import PropTypes from 'prop-types';
10
- //# sourceMappingURL=DispositionProps.d.ts.map
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/LongForm/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;;;GAM3B,CAAC"}
@@ -1,6 +1,6 @@
1
- export default useFormRootPath;
2
1
  /**
3
- * This hook infers the tabbed form root path from the current location.
2
+ * Restituisce il path di base del form in base ad una serie di specifici match di path che è possibile incontrare.
4
3
  */
5
- declare function useFormRootPath(): string;
4
+ declare const useFormRootPath: () => string;
5
+ export default useFormRootPath;
6
6
  //# sourceMappingURL=useFormRootPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFormRootPath.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/LongForm/useFormRootPath.jsx"],"names":[],"mappings":";AAEA;;GAEG;AACH,2CAcC"}
1
+ {"version":3,"file":"useFormRootPath.d.ts","sourceRoot":"","sources":["../../../../../src/components/ra-forms/LongForm/useFormRootPath.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,QAAA,MAAM,eAAe,QAAO,MAkB3B,CAAA;AAED,eAAe,eAAe,CAAA"}
@@ -1,12 +1,14 @@
1
1
  export default AttachmentInput;
2
- declare function AttachmentInput({ children, ...props }: {
2
+ declare function AttachmentInput({ children, disabled, ...props }: {
3
3
  [x: string]: any;
4
4
  children: any;
5
+ disabled: any;
5
6
  }): import("react/jsx-runtime").JSX.Element;
6
7
  declare namespace AttachmentInput {
7
8
  const propTypes: {
8
9
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
10
  multiple: PropTypes.Requireable<boolean>;
11
+ disabled: PropTypes.Requireable<boolean>;
10
12
  accept: PropTypes.Requireable<string>;
11
13
  className: PropTypes.Requireable<string>;
12
14
  id: PropTypes.Requireable<string>;
@@ -26,6 +28,7 @@ declare namespace AttachmentInput {
26
28
  namespace defaultProps {
27
29
  const children: import("react/jsx-runtime").JSX.Element;
28
30
  const multiple: boolean;
31
+ const disabled: boolean;
29
32
  }
30
33
  }
31
34
  import PropTypes from 'prop-types';
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/AttachmentInput.jsx"],"names":[],"mappings":";AAgCA;;;4CAWC;;;;;;;;;;;;;;;;;;;;;;;;;;sBAvCqB,YAAY"}
1
+ {"version":3,"file":"AttachmentInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/AttachmentInput.jsx"],"names":[],"mappings":";AAiDA;;;;4CASC;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAtDqB,YAAY"}
@@ -1,11 +1,12 @@
1
1
  export default LabeledInput;
2
- declare function LabeledInput({ label, children, display, helperText, sx, ...props }: {
2
+ declare function LabeledInput({ label, children, display, helperText, sx, addLabel, ...props }: {
3
3
  [x: string]: any;
4
4
  label: any;
5
5
  children: any;
6
6
  display: any;
7
7
  helperText: any;
8
8
  sx: any;
9
+ addLabel: any;
9
10
  }): import("react/jsx-runtime").JSX.Element;
10
11
  declare namespace LabeledInput {
11
12
  namespace propTypes {
@@ -1 +1 @@
1
- {"version":3,"file":"LabeledInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/LabeledInput.jsx"],"names":[],"mappings":";AAQA;;;;;;;4CAqDC;;;;;;;;;;;;;;;;;;sBA1DqB,YAAY"}
1
+ {"version":3,"file":"LabeledInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/LabeledInput.jsx"],"names":[],"mappings":";AAQA;;;;;;;;4CAgDC;;;;;;;;;;;;;;;;;;sBArDqB,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"SmartTextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/SmartTextInput.jsx"],"names":[],"mappings":";AAOA;;4CA6BC;;;;;;;;;;;;;;;;;;;;;;;sBAlCqB,YAAY"}
1
+ {"version":3,"file":"SmartTextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ra-inputs/SmartTextInput.jsx"],"names":[],"mappings":";AAMA;;4CA0BC;;;;;;;;;;;;;;;;;;;;;;;sBA9BqB,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeConfigContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/ThemeConfigContext.jsx"],"names":[],"mappings":"AA4FA;;4CAuCC;;;;;;AA5CD;IAlFE;;;;;;;OAOG;;IAGH;;;;;OAKG;;IAEH;;;;OAIG;;IAGH;;;;;OAKG;;IAEH;;;;;;OAMG;;IAGH;;;;;;;;;;;;OAYG;;IAGH;;;;;;OAMG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;GAIiD;sBAvFhC,YAAY"}
1
+ {"version":3,"file":"ThemeConfigContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/ThemeConfigContext.jsx"],"names":[],"mappings":"AA4FA;;4CAmCC;;;;;;AAxCD;IAlFE;;;;;;;OAOG;;IAGH;;;;;OAKG;;IAEH;;;;OAIG;;IAGH;;;;;OAKG;;IAEH;;;;;;OAMG;;IAGH;;;;;;;;;;;;OAYG;;IAGH;;;;;;OAMG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;GAIkD;sBAvFjC,YAAY"}
@@ -1,5 +1,8 @@
1
1
  export default useAppConfig;
2
2
  declare function useAppConfig(): {
3
3
  openDialogs: never[];
4
+ getCurrentDialog: () => null;
5
+ openDialog: (id: string, callback: () => void) => void;
6
+ closeDialog: (id: string, callback: () => void) => void;
4
7
  };
5
8
  //# sourceMappingURL=useAppConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAppConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAppConfig.jsx"],"names":[],"mappings":";AAGA;;EAAuD"}
1
+ {"version":3,"file":"useAppConfig.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAppConfig.jsx"],"names":[],"mappings":";AAGA;;;;;EAAuD"}
package/dist/index.d.ts CHANGED
@@ -4,5 +4,5 @@ export * from "./hooks";
4
4
  export * from "./components";
5
5
  export * from "./contexts";
6
6
  export * from "./utils";
7
- export { ArrayInput, ArrayInputContext, BooleanField, BulkDeleteWithConfirmButton, Button, ChipField, choices, Confirm, Create, CreateButton, CreateContextProvider, CustomRoutes, DeleteWithConfirmButton, DeleteWithUndoButton, EditButton, email, Form, HttpError, ListToolbar, maxLength, maxValue, minLength, minValue, number, Pagination, RecordContextProvider, ReferenceArrayField, ReferenceField, regex, required, Resource, ResourceContextProvider, SaveButton, SimpleFormIteratorContext, SimpleList, SingleFieldList, TopToolbar, useArrayInput, useAuthProvider, useDataProvider, useGetIdentity, useGetList, useGetMany, useGetManyReference, useGetOne, useListContext, useNotify, usePermissions, useRecordContext, useResourceContext, useResourceDefinition, useResourceDefinitions, useTranslate, useUnselect, useUnselectAll, useUpdateMany } from "react-admin";
7
+ export { ArrayInput, ArrayInputContext, BooleanField, BulkDeleteWithConfirmButton, Button, ChipField, choices, Confirm, Create, CreateButton, CreateContextProvider, CustomRoutes, DeleteWithConfirmButton, DeleteWithUndoButton, EditButton, EditContextProvider, FieldTitle, email, Form, HttpError, ListToolbar, maxLength, maxValue, minLength, minValue, number, Pagination, RecordContextProvider, ReferenceArrayField, ReferenceField, regex, required, Resource, ResourceContextProvider, SaveButton, SimpleFormIteratorContext, SimpleList, SingleFieldList, TopToolbar, UrlField, useArrayInput, useAuthProvider, useCreateController, useDataProvider, useEditContext, useGetIdentity, useGetList, useGetMany, useGetManyReference, useGetOne, useListContext, useNotify, usePermissions, useRecordContext, useRefresh, useResourceContext, useResourceDefinition, useResourceDefinitions, useTranslate, useUnselect, useUnselectAll, useUpdateMany } from "react-admin";
8
8
  //# sourceMappingURL=index.d.ts.map