aq-fe-framework 0.1.1005 → 0.1.1006

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.
@@ -212,7 +212,8 @@ function useMyReactMutation({
212
212
  mutationType = "create",
213
213
  enableDefaultSuccess = true,
214
214
  enableDefaultError = true,
215
- successNotification
215
+ successNotification,
216
+ autoInvalidate = true
216
217
  }) {
217
218
  const queryClient = useQueryClient();
218
219
  return useMutation(__spreadProps(__spreadValues({
@@ -232,6 +233,8 @@ function useMyReactMutation({
232
233
  message: successNotification || typeLabel_mutation[mutationType],
233
234
  color: "green"
234
235
  });
236
+ }
237
+ if (autoInvalidate) {
235
238
  queryClient.invalidateQueries();
236
239
  }
237
240
  (_a = options == null ? void 0 : options.onSuccess) == null ? void 0 : _a.call(options, data, variables, context);
@@ -27,14 +27,14 @@ import {
27
27
  import {
28
28
  createGenericStore
29
29
  } from "./chunk-BTITP4TN.mjs";
30
- import {
31
- const_object_colors,
32
- const_object_documentTypes
33
- } from "./chunk-OHAOJE5F.mjs";
34
30
  import {
35
31
  enumLabel_gender,
36
32
  enum_daysOfWeek
37
33
  } from "./chunk-J4WTZ3B4.mjs";
34
+ import {
35
+ const_object_colors,
36
+ const_object_documentTypes
37
+ } from "./chunk-OHAOJE5F.mjs";
38
38
  import {
39
39
  baseAxios_default,
40
40
  createBaseApi,
@@ -45,7 +45,7 @@ import {
45
45
  useMyReactMutation,
46
46
  useMyReactQuery,
47
47
  useQ_AQ_GetAQModule
48
- } from "./chunk-G33SBZHB.mjs";
48
+ } from "./chunk-KWZCXNJK.mjs";
49
49
  import {
50
50
  __objRest,
51
51
  __restKey,
@@ -3,7 +3,7 @@ import react__default, { ReactNode, ComponentProps } from 'react';
3
3
  import { t as type_action } from '../type_action-hMF6_2Mr.mjs';
4
4
  import { ActionIconProps, ButtonProps, useModalsStack, CheckboxProps, SelectProps, NumberFormatterProps, FieldsetProps, FileInputProps, NumberInputProps, TextareaProps, MantineSize, InputWrapperProps, TextInputProps, ContainerProps, FlexProps, GroupProps, TypographyStylesProviderProps, TabsProps, SkeletonProps } from '@mantine/core';
5
5
  import { AxiosResponse } from 'axios';
6
- import { M as MyApiResponse, a as MyReactMutationProps } from '../useMyReactMutation-D8XdiELk.mjs';
6
+ import { M as MyApiResponse, a as MyReactMutationProps } from '../useMyReactMutation-XkhMBQeB.mjs';
7
7
  import { type_mantineSize } from '../types/index.mjs';
8
8
  import { useDisclosure, useListState } from '@mantine/hooks';
9
9
  import { UseFormReturnType, useForm } from '@mantine/form';
@@ -69,15 +69,15 @@ import {
69
69
  useHeaderMegaMenuStore,
70
70
  useS_ButtonImport,
71
71
  useStore_BasicAppShell
72
- } from "../chunk-AZMLLQF5.mjs";
72
+ } from "../chunk-WRGTKT6A.mjs";
73
73
  import "../chunk-PKP6EDBO.mjs";
74
74
  import "../chunk-KGBXMHKR.mjs";
75
75
  import "../chunk-7ZI7IOEP.mjs";
76
76
  import "../chunk-LEFFCELO.mjs";
77
77
  import "../chunk-BTITP4TN.mjs";
78
- import "../chunk-OHAOJE5F.mjs";
79
78
  import "../chunk-J4WTZ3B4.mjs";
80
- import "../chunk-G33SBZHB.mjs";
79
+ import "../chunk-OHAOJE5F.mjs";
80
+ import "../chunk-KWZCXNJK.mjs";
81
81
  import "../chunk-WZ6PXGGC.mjs";
82
82
  import "../chunk-JD6AELXS.mjs";
83
83
  export {
@@ -8,7 +8,7 @@ import { UseReactToPrintOptions } from 'react-to-print';
8
8
  import { I as IAQFileDetail } from '../utils_file-JlhzjLGS.mjs';
9
9
  import { useDisclosure } from '@mantine/hooks';
10
10
  import { AxiosResponse } from 'axios';
11
- import { M as MyApiResponse, a as MyReactMutationProps } from '../useMyReactMutation-D8XdiELk.mjs';
11
+ import { M as MyApiResponse, a as MyReactMutationProps } from '../useMyReactMutation-XkhMBQeB.mjs';
12
12
  import { UseQueryResult, QueryKey, UseQueryOptions } from '@tanstack/react-query';
13
13
  import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
14
14
  import { TablerIcon } from '@tabler/icons-react';
@@ -31,15 +31,15 @@ import {
31
31
  MyStatsCard,
32
32
  MyTextInput2 as MyTextInput,
33
33
  MyWeeklySessionSchedulerPicker
34
- } from "../chunk-AZMLLQF5.mjs";
34
+ } from "../chunk-WRGTKT6A.mjs";
35
35
  import "../chunk-PKP6EDBO.mjs";
36
36
  import "../chunk-KGBXMHKR.mjs";
37
37
  import "../chunk-7ZI7IOEP.mjs";
38
38
  import "../chunk-LEFFCELO.mjs";
39
39
  import "../chunk-BTITP4TN.mjs";
40
- import "../chunk-OHAOJE5F.mjs";
41
40
  import "../chunk-J4WTZ3B4.mjs";
42
- import "../chunk-G33SBZHB.mjs";
41
+ import "../chunk-OHAOJE5F.mjs";
42
+ import "../chunk-KWZCXNJK.mjs";
43
43
  import "../chunk-WZ6PXGGC.mjs";
44
44
  import "../chunk-JD6AELXS.mjs";
45
45
  export {
@@ -6,8 +6,8 @@ import * as _mantine_hooks from '@mantine/hooks';
6
6
  import * as _mantine_form from '@mantine/form';
7
7
  import { FormValidateInput } from '@mantine/form';
8
8
  import { AxiosResponse, AxiosInstance } from 'axios';
9
- import { M as MyApiResponse, B as BaseApiType } from '../useMyReactMutation-D8XdiELk.mjs';
10
- export { I as IPagingParams, a as MyReactMutationProps, c as createBaseApi, u as useMyReactMutation } from '../useMyReactMutation-D8XdiELk.mjs';
9
+ import { M as MyApiResponse, B as BaseApiType } from '../useMyReactMutation-XkhMBQeB.mjs';
10
+ export { I as IPagingParams, a as MyReactMutationProps, c as createBaseApi, u as useMyReactMutation } from '../useMyReactMutation-XkhMBQeB.mjs';
11
11
  import * as next_dist_shared_lib_app_router_context_shared_runtime from 'next/dist/shared/lib/app-router-context.shared-runtime';
12
12
  import { I as IAQModule } from '../IAQModule-bW0dxQvX.mjs';
13
13
  import '../type_mutation-CCtnyeP3.mjs';
@@ -11,7 +11,7 @@ import {
11
11
  useMyReactQuery,
12
12
  useMyRouter,
13
13
  useQ_AQ_GetAQModule
14
- } from "../chunk-G33SBZHB.mjs";
14
+ } from "../chunk-KWZCXNJK.mjs";
15
15
  import "../chunk-WZ6PXGGC.mjs";
16
16
  import "../chunk-JD6AELXS.mjs";
17
17
  export {
@@ -103,15 +103,15 @@ import {
103
103
  MailTemplateDeleteButton,
104
104
  useS_moduleConfig,
105
105
  useStore_Authenticate
106
- } from "../chunk-AZMLLQF5.mjs";
106
+ } from "../chunk-WRGTKT6A.mjs";
107
107
  import "../chunk-PKP6EDBO.mjs";
108
108
  import "../chunk-KGBXMHKR.mjs";
109
109
  import "../chunk-7ZI7IOEP.mjs";
110
110
  import "../chunk-LEFFCELO.mjs";
111
111
  import "../chunk-BTITP4TN.mjs";
112
- import "../chunk-OHAOJE5F.mjs";
113
112
  import "../chunk-J4WTZ3B4.mjs";
114
- import "../chunk-G33SBZHB.mjs";
113
+ import "../chunk-OHAOJE5F.mjs";
114
+ import "../chunk-KWZCXNJK.mjs";
115
115
  import "../chunk-WZ6PXGGC.mjs";
116
116
  import "../chunk-JD6AELXS.mjs";
117
117
  export {
@@ -1,7 +1,7 @@
1
1
  import "../chunk-NMY3UEY5.mjs";
2
2
  import {
3
3
  MySelect
4
- } from "../chunk-AZMLLQF5.mjs";
4
+ } from "../chunk-WRGTKT6A.mjs";
5
5
  import "../chunk-PKP6EDBO.mjs";
6
6
  import "../chunk-KGBXMHKR.mjs";
7
7
  import {
@@ -9,12 +9,12 @@ import {
9
9
  } from "../chunk-7ZI7IOEP.mjs";
10
10
  import "../chunk-LEFFCELO.mjs";
11
11
  import "../chunk-BTITP4TN.mjs";
12
- import "../chunk-OHAOJE5F.mjs";
13
12
  import {
14
13
  enumLabel_gender,
15
14
  enum_gender
16
15
  } from "../chunk-J4WTZ3B4.mjs";
17
- import "../chunk-G33SBZHB.mjs";
16
+ import "../chunk-OHAOJE5F.mjs";
17
+ import "../chunk-KWZCXNJK.mjs";
18
18
  import "../chunk-WZ6PXGGC.mjs";
19
19
  import {
20
20
  __objRest,
@@ -45,7 +45,8 @@ interface MyReactMutationProps<IReq = void, IRes = void> {
45
45
  enableDefaultSuccess?: boolean;
46
46
  enableDefaultError?: boolean;
47
47
  successNotification?: string;
48
+ autoInvalidate?: boolean;
48
49
  }
49
- declare function useMyReactMutation<IReq = void, IRes = void>({ isPrototype, axiosFn, options, mutationType, enableDefaultSuccess, enableDefaultError, successNotification }: MyReactMutationProps<IReq, IRes>): _tanstack_react_query.UseMutationResult<IRes, Error, IReq, unknown>;
50
+ declare function useMyReactMutation<IReq = void, IRes = void>({ isPrototype, axiosFn, options, mutationType, enableDefaultSuccess, enableDefaultError, successNotification, autoInvalidate }: MyReactMutationProps<IReq, IRes>): _tanstack_react_query.UseMutationResult<IRes, Error, IReq, unknown>;
50
51
 
51
52
  export { type BaseApiType as B, type IPagingParams as I, type MyApiResponse as M, type MyReactMutationProps as a, createBaseApi as c, useMyReactMutation as u };
package/package.json CHANGED
@@ -54,7 +54,7 @@
54
54
  "types": "./dist/build-object/index.d.mts"
55
55
  }
56
56
  },
57
- "version": "0.1.1005",
57
+ "version": "0.1.1006",
58
58
  "private": false,
59
59
  "files": [
60
60
  "dist"