@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applica-software-guru/react-admin",
3
- "version": "1.3.157",
3
+ "version": "1.3.158",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -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
- const queryClient = new QueryClient({
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;