@applica-software-guru/react-admin 1.4.185 → 1.4.186

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 (89) hide show
  1. package/dist/components/ActionsMenu.d.ts +3 -16
  2. package/dist/components/ActionsMenu.d.ts.map +1 -1
  3. package/dist/components/MenuPopover/MenuPopover.d.ts.map +1 -1
  4. package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
  5. package/dist/components/ra-custom/ListItem.d.ts +3 -6
  6. package/dist/components/ra-custom/ListItem.d.ts.map +1 -1
  7. package/dist/components/ra-fields/BaseAttachmentField.d.ts.map +1 -1
  8. package/dist/components/ra-fields/DateField.d.ts.map +1 -1
  9. package/dist/components/ra-fields/EmailField.d.ts.map +1 -1
  10. package/dist/components/ra-fields/FileField.d.ts.map +1 -1
  11. package/dist/components/ra-fields/ImageField.d.ts.map +1 -1
  12. package/dist/components/ra-fields/ReferenceManyField.d.ts +0 -3
  13. package/dist/components/ra-fields/ReferenceManyField.d.ts.map +1 -1
  14. package/dist/components/ra-fields/TextField.d.ts.map +1 -1
  15. package/dist/components/ra-forms/CardForm.d.ts.map +1 -1
  16. package/dist/components/ra-forms/Create.d.ts.map +1 -1
  17. package/dist/components/ra-forms/Edit.d.ts +2 -24
  18. package/dist/components/ra-forms/Edit.d.ts.map +1 -1
  19. package/dist/components/ra-forms/Show.d.ts +2 -1
  20. package/dist/components/ra-forms/Show.d.ts.map +1 -1
  21. package/dist/components/ra-forms/SimpleForm.d.ts.map +1 -1
  22. package/dist/components/ra-forms/SimpleFormIterator.d.ts +1 -1
  23. package/dist/components/ra-forms/SimpleFormIterator.d.ts.map +1 -1
  24. package/dist/components/ra-forms/TabbedForm.d.ts.map +1 -1
  25. package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts +0 -3
  26. package/dist/components/ra-forms/TableForm/TableFormIterator.d.ts.map +1 -1
  27. package/dist/components/ra-forms/Toolbar.d.ts.map +1 -1
  28. package/dist/components/ra-forms/index.d.ts +1 -0
  29. package/dist/components/ra-forms/index.d.ts.map +1 -1
  30. package/dist/components/ra-inputs/ArrayInput.d.ts +2 -5
  31. package/dist/components/ra-inputs/ArrayInput.d.ts.map +1 -1
  32. package/dist/components/ra-inputs/AttachmentInput.d.ts +0 -3
  33. package/dist/components/ra-inputs/AttachmentInput.d.ts.map +1 -1
  34. package/dist/components/ra-inputs/BooleanInput.d.ts.map +1 -1
  35. package/dist/components/ra-inputs/DateInput.d.ts.map +1 -1
  36. package/dist/components/ra-inputs/DateTimeInput.d.ts.map +1 -1
  37. package/dist/components/ra-inputs/FileInput.d.ts.map +1 -1
  38. package/dist/components/ra-inputs/NumberInput.d.ts.map +1 -1
  39. package/dist/components/ra-inputs/SearchInput.d.ts.map +1 -1
  40. package/dist/components/ra-inputs/SelectArrayInput.d.ts.map +1 -1
  41. package/dist/components/ra-inputs/SelectInput.d.ts.map +1 -1
  42. package/dist/components/ra-inputs/TimeInput.d.ts.map +1 -1
  43. package/dist/components/ra-lists/List.d.ts.map +1 -1
  44. package/dist/hooks/useMemoizedObject.d.ts +3 -5
  45. package/dist/hooks/useMemoizedObject.d.ts.map +1 -1
  46. package/dist/react-admin.cjs.js +66 -66
  47. package/dist/react-admin.cjs.js.map +1 -1
  48. package/dist/react-admin.es.js +10373 -9954
  49. package/dist/react-admin.es.js.map +1 -1
  50. package/dist/react-admin.umd.js +67 -67
  51. package/dist/react-admin.umd.js.map +1 -1
  52. package/package.json +1 -1
  53. package/src/components/ActionsMenu.tsx +17 -19
  54. package/src/components/MenuPopover/MenuPopover.jsx +1 -0
  55. package/src/components/ra-buttons/CreateInDialogButton.tsx +6 -14
  56. package/src/components/ra-buttons/EditInDialogButton.tsx +1 -1
  57. package/src/components/ra-custom/ListItem.tsx +3 -6
  58. package/src/components/ra-fields/BaseAttachmentField.tsx +1 -6
  59. package/src/components/ra-fields/DateField.tsx +1 -4
  60. package/src/components/ra-fields/EmailField.tsx +1 -4
  61. package/src/components/ra-fields/FileField.tsx +1 -4
  62. package/src/components/ra-fields/ImageField.tsx +1 -4
  63. package/src/components/ra-fields/ReferenceManyField.tsx +1 -7
  64. package/src/components/ra-fields/TextField.tsx +1 -4
  65. package/src/components/ra-forms/CardForm.tsx +1 -4
  66. package/src/components/ra-forms/Create.tsx +2 -5
  67. package/src/components/ra-forms/Edit.tsx +8 -6
  68. package/src/components/ra-forms/LongForm/BaseForm.tsx +2 -2
  69. package/src/components/ra-forms/Show.tsx +18 -19
  70. package/src/components/ra-forms/SimpleForm.tsx +2 -5
  71. package/src/components/ra-forms/SimpleFormIterator.tsx +24 -26
  72. package/src/components/ra-forms/TabbedForm.tsx +1 -4
  73. package/src/components/ra-forms/TableForm/TableFormIterator.tsx +1 -7
  74. package/src/components/ra-forms/Toolbar.tsx +1 -4
  75. package/src/components/ra-forms/index.ts +1 -0
  76. package/src/components/ra-inputs/ArrayInput.tsx +3 -9
  77. package/src/components/ra-inputs/AttachmentInput.tsx +1 -7
  78. package/src/components/ra-inputs/BooleanInput.tsx +1 -4
  79. package/src/components/ra-inputs/DateInput.tsx +1 -4
  80. package/src/components/ra-inputs/DateTimeInput.tsx +1 -4
  81. package/src/components/ra-inputs/FileInput.tsx +1 -4
  82. package/src/components/ra-inputs/NumberInput.tsx +1 -4
  83. package/src/components/ra-inputs/SearchInput.tsx +1 -4
  84. package/src/components/ra-inputs/SelectArrayInput.tsx +1 -4
  85. package/src/components/ra-inputs/SelectInput.tsx +2 -5
  86. package/src/components/ra-inputs/TimeInput.tsx +1 -4
  87. package/src/components/ra-lists/List.tsx +1 -4
  88. package/src/hooks/useMemoizedObject.tsx +3 -5
  89. package/src/playground/types.ts +16 -18
@@ -6,10 +6,7 @@ import { useWatch } from 'react-hook-form';
6
6
  import LabeledInput from './LabeledInput';
7
7
  import React, { useMemo } from 'react';
8
8
 
9
- const StyledFileInput = styled(RaFileInput, {
10
- name: 'RaApplicaFileInput',
11
- slot: 'root'
12
- })(({ theme }) => ({
9
+ const StyledFileInput = styled(RaFileInput, { slot: 'root' })(({ theme }) => ({
13
10
  '& .previews': {},
14
11
  '& .previews>div': {
15
12
  marginTop: theme.spacing(1),
@@ -2,10 +2,7 @@ import { NumberInputProps, NumberInput as RaNumberInput } from 'react-admin';
2
2
  import { styled } from '@mui/material/styles';
3
3
  import LabeledInput from './LabeledInput';
4
4
 
5
- const StyledNumberInput = styled(RaNumberInput, {
6
- name: 'RaApplicaNumberInput',
7
- slot: 'root'
8
- })(({ label }) => ({
5
+ const StyledNumberInput = styled(RaNumberInput, { slot: 'root' })(({ label }) => ({
9
6
  '& legend': {
10
7
  width: label === false ? 0 : 'auto'
11
8
  }
@@ -1,10 +1,7 @@
1
1
  import { SearchInput as RaSearchInput, SearchInputProps } from 'react-admin';
2
2
  import { styled } from '@mui/material/styles';
3
3
 
4
- const StyledSearchInput = styled(RaSearchInput, {
5
- name: 'RaApplicaSearchInput',
6
- slot: 'root'
7
- })(() => ({}));
4
+ const StyledSearchInput = styled(RaSearchInput, { slot: 'root' })(() => ({}));
8
5
 
9
6
  export function SearchInput(props: SearchInputProps): JSX.Element {
10
7
  return <StyledSearchInput {...props} />;
@@ -2,10 +2,7 @@ import { SelectArrayInput as RaSelectArrayInput, SelectArrayInputProps } from 'r
2
2
  import { styled } from '@mui/material/styles';
3
3
  import LabeledInput from './LabeledInput';
4
4
 
5
- const StyledSelectArrayInput = styled(RaSelectArrayInput, {
6
- name: 'RaApplicaSelectArrayInput',
7
- slot: 'Root'
8
- })(({ label }) => ({
5
+ const StyledSelectArrayInput = styled(RaSelectArrayInput, { slot: 'Root' })(({ label }) => ({
9
6
  '& legend': {
10
7
  width: label === false ? 0 : 'auto'
11
8
  },
@@ -2,10 +2,7 @@ import { SelectInput as RaSelectInput, SelectInputProps as RaSelectInputProps }
2
2
  import { styled } from '@mui/material/styles';
3
3
  import LabeledInput, { LabeledInputProps } from './LabeledInput';
4
4
 
5
- const ApplicaStyledSelectInput = styled(RaSelectInput, {
6
- name: 'RaApplicaSelectArrayInput',
7
- slot: 'Root'
8
- })(({ label }) => ({
5
+ const StyledSelectInput = styled(RaSelectInput, { slot: 'Root' })(({ label }) => ({
9
6
  '& legend': {
10
7
  width: label === false || label === null ? 0 : 'auto'
11
8
  }
@@ -14,7 +11,7 @@ export type SelectInputProps = LabeledInputProps & RaSelectInputProps;
14
11
  export function SelectInput(props: SelectInputProps): JSX.Element {
15
12
  return (
16
13
  <LabeledInput {...props}>
17
- <ApplicaStyledSelectInput />
14
+ <StyledSelectInput />
18
15
  </LabeledInput>
19
16
  );
20
17
  }
@@ -17,10 +17,7 @@ function defaultParser(v: string): string {
17
17
  return v;
18
18
  }
19
19
 
20
- const StyledTimeInput = styled(RaTimeInput, {
21
- name: 'RaApplicaTimeInput',
22
- slot: 'root'
23
- })(({ label }) => ({
20
+ const StyledTimeInput = styled(RaTimeInput, { slot: 'root' })(({ label }) => ({
24
21
  '& legend': {
25
22
  width: label === false ? 0 : 'auto'
26
23
  }
@@ -88,10 +88,7 @@ const RaList = <RecordType extends RaRecord = any>({
88
88
 
89
89
  const defaultFilter = {};
90
90
 
91
- const StyledList = styled(RaList, {
92
- name: 'RaApplicaList',
93
- slot: 'root'
94
- })(({ theme }) => ({
91
+ const StyledList = styled(RaList, { slot: 'root' })(({ theme }) => ({
95
92
  '& .RaList-main': {
96
93
  overflowX: 'auto',
97
94
  '& .RaBulkActionsToolbar-toolbar': {
@@ -2,11 +2,9 @@ import _ from 'lodash';
2
2
  import { useEffect, useState } from 'react';
3
3
 
4
4
  /**
5
- * Questo hook memoizza in automatico un oggetto utilizzando il'equality check del suo valore come criterio di discriminazione.
6
- * NOTA BENE!!! L'equality check di un oggetto JS è un discorso estremamente complesso.
7
- * Pertanto questo hook va usato con estrema parsimonia, solo quando strettamente necessario e solo se si padroneggia a pieno il tema di cui sopra e le sue implicazioni nelle logiche di render condizionale di React
8
- * @param object
9
- * @returns
5
+ * This hook automatically memoizes an object using its value's equality check as a discrimination criterion.
6
+ * PLEASE NOTE!!! The equality check of a JS object is an extremely complex issue.
7
+ * Therefore, this hook should be used with extreme caution, only when strictly necessary and only if you fully master the topic above and its implications in the conditional rendering logic of React
10
8
  */
11
9
  function useMemoizedObject<T extends object>(object: T): T {
12
10
  if (!_.isPlainObject(object)) {
@@ -46,17 +46,15 @@ export type ApplicaDataProviderConfig = {
46
46
 
47
47
  export type ApplicaDataProviderInterface = DataProvider & {
48
48
  /**
49
- * Consente di ottenere l'url del servizio REST.
49
+ * Allows you to get the REST service URL.
50
50
  */
51
51
  getApiUrl(): string;
52
52
  /**
53
- * Consente di recuperare un singolo file dal server utilizzando eventuali
54
- * meccanismi di autenticazione associati al dataProvider (es. JWT passato mediante getHeaders).
53
+ * Allows you to retrieve a single file from the server using any mechanisms
54
+ * authentication associated with the dataProvider (e.g. JWT passed through getHeaders).
55
55
  *
56
- * @param {String} resource URL del file da recuperare
57
- * @returns {Promise} Restituisce una promise che contiene il file recuperato
58
- *
59
- * @example Simulazione del download di un file.
56
+ * @param resource Resource to request
57
+ * @example Simple download of a file
60
58
  * const attachment = await dataProvider.getFile(`/attachments/post/1/picture/1}`);
61
59
  * const link = document.createElement('a');
62
60
  * link.href = attachment;
@@ -66,29 +64,29 @@ export type ApplicaDataProviderInterface = DataProvider & {
66
64
  */
67
65
  getFile(resource: string): Promise<string>;
68
66
  /**
69
- * Consente di eseguire una chiamata GET generica al servizio REST.
70
- * La risposta del servizio deve contenere almeno 'responseCode' cosi come previsto da standard applica.
71
- * Response code deve essere uguale ad 'ok' se la chiamata ha avuto successo.
67
+ * Allows you to make a generic GET call to the REST service.
68
+ * The service response must contain at least 'responseCode' as expected by the applica standard.
69
+ * Response code must be equal to 'ok' if the call was successful.
72
70
  *
73
71
  * @example
74
- * // Esempio di chiamata: users?name=Roberto
72
+ * // Example: users?name=Roberto
75
73
  * const data = await dataProvider.get("users", { name: "Roberto" })
76
74
  *
77
75
  *
78
- * @param resource Risorsa da richiedere
79
- * @param params Parametri della query string da inserire
76
+ * @param resource Resource to request
77
+ * @param params Query string parameters to insert
80
78
  */
81
79
  get(resource: string, params: any): Promise<any>;
82
80
  /**
83
- * Consente di eseguire una chiamata POST generica al servizio REST.
84
- * La risposta del servizio deve contenere almeno 'responseCode' cosi come previsto da standard applica.
85
- * Response code deve essere uguale ad 'ok' se la chiamata ha avuto successo.
81
+ * Allows you to make a generic POST call to the REST service.
82
+ * The service response must contain at least 'responseCode' as expected by the applica standard.
83
+ * Response code must be equal to 'ok' if the call was successful.
86
84
  *
87
85
  * @example
88
86
  * const data = await dataProvider.post("users", { name: "Roberto" })
89
87
  *
90
- * @param resource Risorsa da richiedere
91
- * @param params Parametri della query string da inserire
88
+ * @param resource Resource to request
89
+ * @param params Query string parameters to insert
92
90
  */
93
91
  post(resource: string, params: any): Promise<any>;
94
92
  };