aq-fe-framework 0.1.512 → 0.1.513

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.
@@ -2,7 +2,7 @@ import {
2
2
  MyDataTable,
3
3
  MyFlexColumn,
4
4
  MyFlexRow
5
- } from "./chunk-4RT3JFPJ.mjs";
5
+ } from "./chunk-NQMVDLMU.mjs";
6
6
  import {
7
7
  const_object_colors
8
8
  } from "./chunk-OMJJAHOC.mjs";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  useMyReactMutation,
14
14
  useMyReactQuery
15
- } from "./chunk-GIBGEGLU.mjs";
15
+ } from "./chunk-LAVGCZ5I.mjs";
16
16
  import {
17
17
  utils_notification_show
18
18
  } from "./chunk-7ZCOFATU.mjs";
@@ -1,6 +1,3 @@
1
- import {
2
- enumLabel_mutationTypeNotification
3
- } from "./chunk-Z4DYBTYB.mjs";
4
1
  import {
5
2
  __spreadProps,
6
3
  __spreadValues
@@ -150,13 +147,21 @@ var useLoadAxiosConfig = ({
150
147
  // src/hooks/custom-hooks/useMutationAction.tsx
151
148
  import { useQueryClient } from "@tanstack/react-query";
152
149
 
150
+ // src/types/type_mutation.ts
151
+ var typeLabel_mutation = {
152
+ create: "T\u1EA1o th\xE0nh c\xF4ng!",
153
+ update: "C\u1EADp nh\u1EADt th\xE0nh c\xF4ng!",
154
+ delete: "X\xF3a th\xE0nh c\xF4ng!",
155
+ mutation: "Thao t\xE1c th\xE0nh c\xF4ng!"
156
+ };
157
+
153
158
  // src/hooks/custom-hooks/useMyReactMutation.ts
154
159
  import { notifications } from "@mantine/notifications";
155
160
  import { useMutation, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
156
161
  function useMyReactMutation({
157
162
  axiosFn,
158
163
  options,
159
- mutationType = "create" /* Create */
164
+ mutationType = "create"
160
165
  }) {
161
166
  const queryClient = useQueryClient2();
162
167
  return useMutation(__spreadValues({
@@ -167,7 +172,7 @@ function useMyReactMutation({
167
172
  },
168
173
  onSuccess: () => {
169
174
  notifications.show({
170
- message: enumLabel_mutationTypeNotification[mutationType],
175
+ message: typeLabel_mutation[mutationType],
171
176
  color: "green"
172
177
  });
173
178
  queryClient.invalidateQueries();
@@ -11,7 +11,7 @@ import {
11
11
  baseAxios_default,
12
12
  useMyReactMutation,
13
13
  useQ_AQ_GetAQModule
14
- } from "./chunk-GIBGEGLU.mjs";
14
+ } from "./chunk-LAVGCZ5I.mjs";
15
15
  import {
16
16
  utils_notification_show
17
17
  } from "./chunk-7ZCOFATU.mjs";
@@ -67,13 +67,12 @@ import {
67
67
  useS_BasicAppShell,
68
68
  useS_ButtonImport,
69
69
  utils_layout_getItemsWithoutLinks
70
- } from "../chunk-4RT3JFPJ.mjs";
70
+ } from "../chunk-NQMVDLMU.mjs";
71
71
  import "../chunk-U62R2QKJ.mjs";
72
72
  import "../chunk-5U2JSHSJ.mjs";
73
73
  import "../chunk-OMJJAHOC.mjs";
74
- import "../chunk-GIBGEGLU.mjs";
74
+ import "../chunk-LAVGCZ5I.mjs";
75
75
  import "../chunk-7ZCOFATU.mjs";
76
- import "../chunk-Z4DYBTYB.mjs";
77
76
  import "../chunk-FWCSY2DS.mjs";
78
77
  export {
79
78
  AQButtonCreateByImportFile,
@@ -18,16 +18,15 @@ import {
18
18
  MyStatsCard,
19
19
  MyTextInput,
20
20
  MyWeeklySessionSchedulerPicker
21
- } from "../chunk-H6JXSSOQ.mjs";
21
+ } from "../chunk-IIRXBT7L.mjs";
22
22
  import "../chunk-GFEMKKFH.mjs";
23
- import "../chunk-4RT3JFPJ.mjs";
23
+ import "../chunk-NQMVDLMU.mjs";
24
24
  import "../chunk-U62R2QKJ.mjs";
25
25
  import "../chunk-5U2JSHSJ.mjs";
26
26
  import "../chunk-OMJJAHOC.mjs";
27
27
  import "../chunk-K6S7R6LU.mjs";
28
- import "../chunk-GIBGEGLU.mjs";
28
+ import "../chunk-LAVGCZ5I.mjs";
29
29
  import "../chunk-7ZCOFATU.mjs";
30
- import "../chunk-Z4DYBTYB.mjs";
31
30
  import "../chunk-FWCSY2DS.mjs";
32
31
  export {
33
32
  MyActionIcon,
@@ -1,5 +1,3 @@
1
- export { a as enumLabel_mutationTypeNotification, e as enum_mutationType } from '../enum_mutationType-Dn5oi0sv.mjs';
2
-
3
1
  declare enum enum_daysOfWeek {
4
2
  "Thứ Hai" = 1,
5
3
  "Thứ Ba" = 2,
@@ -24,4 +22,11 @@ declare enum enum_gender {
24
22
  }
25
23
  declare const enumLabel_gender: Record<enum_gender, string>;
26
24
 
27
- export { enumLabel_gender, enum_daysOfWeek, enum_emailConfigModule, enum_gender };
25
+ declare enum enum_mutationType {
26
+ Create = "create",
27
+ Update = "update",
28
+ Delete = "delete"
29
+ }
30
+ declare const enumLabel_mutationTypeNotification: Record<enum_mutationType, string>;
31
+
32
+ export { enumLabel_gender, enumLabel_mutationTypeNotification, enum_daysOfWeek, enum_emailConfigModule, enum_gender, enum_mutationType };
@@ -4,10 +4,6 @@ import {
4
4
  import {
5
5
  enum_daysOfWeek
6
6
  } from "../chunk-K6S7R6LU.mjs";
7
- import {
8
- enumLabel_mutationTypeNotification,
9
- enum_mutationType
10
- } from "../chunk-Z4DYBTYB.mjs";
11
7
  import "../chunk-FWCSY2DS.mjs";
12
8
 
13
9
  // src/enum/enum_gender.ts
@@ -22,6 +18,19 @@ var enumLabel_gender = {
22
18
  [2 /* Female */]: "N\u1EEF",
23
19
  [3 /* Other */]: "Kh\xE1c"
24
20
  };
21
+
22
+ // src/enum/enum_mutationType.ts
23
+ var enum_mutationType = /* @__PURE__ */ ((enum_mutationType2) => {
24
+ enum_mutationType2["Create"] = "create";
25
+ enum_mutationType2["Update"] = "update";
26
+ enum_mutationType2["Delete"] = "delete";
27
+ return enum_mutationType2;
28
+ })(enum_mutationType || {});
29
+ var enumLabel_mutationTypeNotification = {
30
+ ["create" /* Create */]: "T\u1EA1o m\u1EDBi th\xE0nh c\xF4ng!",
31
+ ["update" /* Update */]: "C\u1EADp nh\u1EADt th\xE0nh c\xF4ng!",
32
+ ["delete" /* Delete */]: "Xo\xE1 th\xE0nh c\xF4ng!"
33
+ };
25
34
  export {
26
35
  enumLabel_gender,
27
36
  enumLabel_mutationTypeNotification,
@@ -5,7 +5,6 @@ import * as React from 'react';
5
5
  import { AxiosInstance, AxiosResponse } from 'axios';
6
6
  import * as _tanstack_react_query from '@tanstack/react-query';
7
7
  import { UseMutationOptions, QueryKey, UseQueryOptions } from '@tanstack/react-query';
8
- import { e as enum_mutationType } from '../enum_mutationType-Dn5oi0sv.mjs';
9
8
  import { I as IAQModule } from '../IAQModule-4U3n2emx.mjs';
10
9
  import '../IBaseEntity-ChMy9RzQ.mjs';
11
10
 
@@ -44,10 +43,12 @@ declare const useLoadAxiosConfig: ({ axiosInstance, url, }: {
44
43
  setFlag: React.Dispatch<React.SetStateAction<boolean>>;
45
44
  };
46
45
 
46
+ type type_mutation = "create" | "update" | "delete" | "mutation";
47
+
47
48
  interface MyReactMutationProps<IReq, IRes> {
48
49
  axiosFn: (values: IReq) => Promise<AxiosResponse<MyApiResponse<IRes>>>;
49
50
  options?: UseMutationOptions<IRes, Error, IReq>;
50
- mutationType?: enum_mutationType;
51
+ mutationType?: type_mutation;
51
52
  }
52
53
  declare function useMyReactMutation<IReq, IRes>({ axiosFn, options, mutationType }: MyReactMutationProps<IReq, IRes>): _tanstack_react_query.UseMutationResult<IRes, Error, IReq, unknown>;
53
54
 
@@ -7,9 +7,8 @@ import {
7
7
  useMyReactQuery,
8
8
  useMyRouter,
9
9
  useQ_AQ_GetAQModule
10
- } from "../chunk-GIBGEGLU.mjs";
10
+ } from "../chunk-LAVGCZ5I.mjs";
11
11
  import "../chunk-7ZCOFATU.mjs";
12
- import "../chunk-Z4DYBTYB.mjs";
13
12
  import "../chunk-FWCSY2DS.mjs";
14
13
  export {
15
14
  createBaseApi,
@@ -13,10 +13,10 @@ import {
13
13
  U0DateToDDMMYYYString
14
14
  } from "../chunk-EWDS5IOF.mjs";
15
15
  import {
16
- MyButton,
16
+ MyButton as MyButton2,
17
17
  MyDataTableSelectOne,
18
18
  MyTextInput as MyTextInput2
19
- } from "../chunk-H6JXSSOQ.mjs";
19
+ } from "../chunk-IIRXBT7L.mjs";
20
20
  import {
21
21
  const_object_documentTypes
22
22
  } from "../chunk-GFEMKKFH.mjs";
@@ -25,7 +25,7 @@ import {
25
25
  MyActionIconDelete,
26
26
  MyActionIconUpdate,
27
27
  MyBoxesBackground,
28
- MyButton as MyButton2,
28
+ MyButton,
29
29
  MyButtonCreate,
30
30
  MyButtonModal,
31
31
  MyButtonViewPDF,
@@ -45,7 +45,7 @@ import {
45
45
  groupToTwoLevels,
46
46
  useS_authenticate,
47
47
  utils_layout_getItemsWithoutLinks
48
- } from "../chunk-4RT3JFPJ.mjs";
48
+ } from "../chunk-NQMVDLMU.mjs";
49
49
  import {
50
50
  createGenericStore
51
51
  } from "../chunk-U62R2QKJ.mjs";
@@ -66,11 +66,10 @@ import {
66
66
  useMyRouter,
67
67
  useQ_AQ_GetAQModule,
68
68
  useQ_SkillCenter_GetAll
69
- } from "../chunk-GIBGEGLU.mjs";
69
+ } from "../chunk-LAVGCZ5I.mjs";
70
70
  import {
71
71
  utils_notification_show
72
72
  } from "../chunk-7ZCOFATU.mjs";
73
- import "../chunk-Z4DYBTYB.mjs";
74
73
  import {
75
74
  __objRest,
76
75
  __spreadProps,
@@ -212,7 +211,7 @@ function Permission_SaveMenuPermission({
212
211
  }
213
212
  });
214
213
  return /* @__PURE__ */ jsx3(
215
- MyButton,
214
+ MyButton2,
216
215
  {
217
216
  onClick: () => {
218
217
  mutation.mutate((values == null ? void 0 : values.filter((item) => item.id != "0").map((item) => ({
@@ -833,7 +832,7 @@ function F_accessControl_Save() {
833
832
  }
834
833
  disable[1](false);
835
834
  }, [store.state.rolePermissions]);
836
- return /* @__PURE__ */ jsx9(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
835
+ return /* @__PURE__ */ jsx9(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
837
836
  }
838
837
 
839
838
  // src/modules-features/admin/core/accessControl/old/F_accessControl.tsx
@@ -1287,7 +1286,7 @@ function F_accessControlLevel_Save() {
1287
1286
  }
1288
1287
  disable[1](false);
1289
1288
  }, [store.state.rolePermissions]);
1290
- return /* @__PURE__ */ jsx16(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
1289
+ return /* @__PURE__ */ jsx16(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
1291
1290
  }
1292
1291
 
1293
1292
  // src/modules-features/admin/core/accessControlLevel/old/F_accessControlLevel.tsx
@@ -3058,7 +3057,7 @@ function F_core35923() {
3058
3057
  /* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Favicon (16px x 16px)" }) }),
3059
3058
  /* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Logo (330px x 115px)" }) })
3060
3059
  ] }),
3061
- /* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton2, { crudType: "save" }) })
3060
+ /* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton, { crudType: "save" }) })
3062
3061
  ] });
3063
3062
  }
3064
3063
 
@@ -4445,7 +4444,7 @@ function F_moduleConfig_Save({
4445
4444
  });
4446
4445
  }
4447
4446
  return /* @__PURE__ */ jsx83(
4448
- MyButton2,
4447
+ MyButton,
4449
4448
  {
4450
4449
  disabled: !form.isDirty(),
4451
4450
  crudType: "save",
@@ -4901,13 +4900,13 @@ import { useMemo as useMemo20 } from "react";
4901
4900
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_DeleteDescription.tsx
4902
4901
  import { jsx as jsx91 } from "react/jsx-runtime";
4903
4902
  function F_pageContentConfig_DeleteDescription() {
4904
- return /* @__PURE__ */ jsx91(MyButton, { actionType: "delete" });
4903
+ return /* @__PURE__ */ jsx91(MyButton2, { actionType: "delete" });
4905
4904
  }
4906
4905
 
4907
4906
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Export.tsx
4908
4907
  import { jsx as jsx92 } from "react/jsx-runtime";
4909
4908
  function F_pageContentConfig_Export() {
4910
- return /* @__PURE__ */ jsx92(MyButton, { actionType: "export" });
4909
+ return /* @__PURE__ */ jsx92(MyButton2, { actionType: "export" });
4911
4910
  }
4912
4911
 
4913
4912
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Save.tsx
@@ -4919,7 +4918,7 @@ function F_pageContentConfig_Save({ menuValues }) {
4919
4918
  return service_pageContent.updateList([{ id: 1 }]);
4920
4919
  }
4921
4920
  });
4922
- return /* @__PURE__ */ jsx93(MyButton, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
4921
+ return /* @__PURE__ */ jsx93(MyButton2, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
4923
4922
  }
4924
4923
 
4925
4924
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_ReadMenu.tsx
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.512",
45
+ "version": "0.1.513",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"
@@ -1,17 +0,0 @@
1
- // src/enum/enum_mutationType.ts
2
- var enum_mutationType = /* @__PURE__ */ ((enum_mutationType2) => {
3
- enum_mutationType2["Create"] = "create";
4
- enum_mutationType2["Update"] = "update";
5
- enum_mutationType2["Delete"] = "delete";
6
- return enum_mutationType2;
7
- })(enum_mutationType || {});
8
- var enumLabel_mutationTypeNotification = {
9
- ["create" /* Create */]: "T\u1EA1o m\u1EDBi th\xE0nh c\xF4ng!",
10
- ["update" /* Update */]: "C\u1EADp nh\u1EADt th\xE0nh c\xF4ng!",
11
- ["delete" /* Delete */]: "Xo\xE1 th\xE0nh c\xF4ng!"
12
- };
13
-
14
- export {
15
- enum_mutationType,
16
- enumLabel_mutationTypeNotification
17
- };
@@ -1,8 +0,0 @@
1
- declare enum enum_mutationType {
2
- Create = "create",
3
- Update = "update",
4
- Delete = "delete"
5
- }
6
- declare const enumLabel_mutationTypeNotification: Record<enum_mutationType, string>;
7
-
8
- export { enumLabel_mutationTypeNotification as a, enum_mutationType as e };