@applica-software-guru/react-admin 1.3.157 → 1.3.158
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/ApplicaAdmin.d.ts +7 -1
- package/dist/ApplicaAdmin.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +23 -23
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +497 -494
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +23 -23
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/ApplicaAdmin.tsx +11 -3
package/package.json
CHANGED
package/src/ApplicaAdmin.tsx
CHANGED
|
@@ -10,7 +10,8 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import { QueryClient } from 'react-query';
|
|
11
11
|
import { ThemeCustomization } from './themes';
|
|
12
12
|
import { IErrorEventHandler } from './dev/ErrorEventHandler';
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
const defaultQueryClient = new QueryClient({
|
|
14
15
|
defaultOptions: {
|
|
15
16
|
queries: {
|
|
16
17
|
refetchOnWindowFocus: false
|
|
@@ -130,6 +131,10 @@ export type ApplicaAdminProps = AdminProps & {
|
|
|
130
131
|
* </CustomRoutes>
|
|
131
132
|
*/
|
|
132
133
|
enablePasswordRecover: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* L'instanza di QueryClient da utilizzare nell'applicazione
|
|
136
|
+
*/
|
|
137
|
+
queryClient: QueryClient;
|
|
133
138
|
};
|
|
134
139
|
|
|
135
140
|
/**
|
|
@@ -158,6 +163,7 @@ const ApplicaAdmin = ({
|
|
|
158
163
|
enableNotification,
|
|
159
164
|
enableRegistration,
|
|
160
165
|
enablePasswordRecover,
|
|
166
|
+
queryClient,
|
|
161
167
|
...props
|
|
162
168
|
}: ApplicaAdminProps) => {
|
|
163
169
|
useErrorEventCatcher({
|
|
@@ -267,7 +273,8 @@ ApplicaAdmin.defaultProps = {
|
|
|
267
273
|
enableNotification: false,
|
|
268
274
|
enableRegistration: false,
|
|
269
275
|
enableForgotPassword: false,
|
|
270
|
-
loginPage: <LoginPage version="0.0.0" name="Applica" redirectTo="/"
|
|
276
|
+
loginPage: <LoginPage version="0.0.0" name="Applica" redirectTo="/" />,
|
|
277
|
+
queryClient: defaultQueryClient
|
|
271
278
|
};
|
|
272
279
|
|
|
273
280
|
ApplicaAdmin.propTypes = {
|
|
@@ -286,7 +293,8 @@ ApplicaAdmin.propTypes = {
|
|
|
286
293
|
notification: PropTypes.string,
|
|
287
294
|
enableNotification: PropTypes.bool,
|
|
288
295
|
enableRegistration: PropTypes.bool,
|
|
289
|
-
enableForgotPassword: PropTypes.bool
|
|
296
|
+
enableForgotPassword: PropTypes.bool,
|
|
297
|
+
queryClient: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
290
298
|
};
|
|
291
299
|
|
|
292
300
|
export default ApplicaAdmin;
|