aq-fe-framework 0.1.507 → 0.1.509

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-3DR5DBS6.mjs";
5
+ } from "./chunk-KCYPNG4W.mjs";
6
6
  import {
7
7
  const_object_colors
8
8
  } from "./chunk-OMJJAHOC.mjs";
@@ -306,6 +306,7 @@ interface MyDataTableProps<TData extends MRT_RowData> extends MRT_TableOptions<T
306
306
  setSelectedRow?: (data: TData[]) => void;
307
307
  isError?: boolean;
308
308
  isLoading?: boolean;
309
+ exportAble?: boolean;
309
310
  pagination?: {
310
311
  pageIndex: number;
311
312
  pageSize: number;
@@ -67,12 +67,12 @@ import {
67
67
  useS_BasicAppShell,
68
68
  useS_ButtonImport,
69
69
  utils_layout_getItemsWithoutLinks
70
- } from "../chunk-3DR5DBS6.mjs";
70
+ } from "../chunk-KCYPNG4W.mjs";
71
+ import "../chunk-U62R2QKJ.mjs";
71
72
  import "../chunk-5U2JSHSJ.mjs";
72
73
  import "../chunk-OMJJAHOC.mjs";
73
74
  import "../chunk-5IELATPH.mjs";
74
75
  import "../chunk-7ZCOFATU.mjs";
75
- import "../chunk-U62R2QKJ.mjs";
76
76
  import "../chunk-FWCSY2DS.mjs";
77
77
  export {
78
78
  AQButtonCreateByImportFile,
@@ -18,15 +18,15 @@ import {
18
18
  MyStatsCard,
19
19
  MyTextInput,
20
20
  MyWeeklySessionSchedulerPicker
21
- } from "../chunk-3EFZRJKN.mjs";
22
- import "../chunk-GFEMKKFH.mjs";
23
- import "../chunk-3DR5DBS6.mjs";
21
+ } from "../chunk-RVLIJK3A.mjs";
22
+ import "../chunk-KCYPNG4W.mjs";
23
+ import "../chunk-U62R2QKJ.mjs";
24
24
  import "../chunk-5U2JSHSJ.mjs";
25
+ import "../chunk-GFEMKKFH.mjs";
25
26
  import "../chunk-OMJJAHOC.mjs";
26
27
  import "../chunk-K6S7R6LU.mjs";
27
28
  import "../chunk-5IELATPH.mjs";
28
29
  import "../chunk-7ZCOFATU.mjs";
29
- import "../chunk-U62R2QKJ.mjs";
30
30
  import "../chunk-FWCSY2DS.mjs";
31
31
  export {
32
32
  MyActionIcon,
@@ -13,19 +13,16 @@ 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-3EFZRJKN.mjs";
20
- import {
21
- const_object_documentTypes
22
- } from "../chunk-GFEMKKFH.mjs";
19
+ } from "../chunk-RVLIJK3A.mjs";
23
20
  import {
24
21
  F_authenticate_Logout,
25
22
  MyActionIconDelete,
26
23
  MyActionIconUpdate,
27
24
  MyBoxesBackground,
28
- MyButton as MyButton2,
25
+ MyButton,
29
26
  MyButtonCreate,
30
27
  MyButtonModal,
31
28
  MyButtonViewPDF,
@@ -45,8 +42,14 @@ import {
45
42
  groupToTwoLevels,
46
43
  useS_authenticate,
47
44
  utils_layout_getItemsWithoutLinks
48
- } from "../chunk-3DR5DBS6.mjs";
45
+ } from "../chunk-KCYPNG4W.mjs";
46
+ import {
47
+ createGenericStore
48
+ } from "../chunk-U62R2QKJ.mjs";
49
49
  import "../chunk-5U2JSHSJ.mjs";
50
+ import {
51
+ const_object_documentTypes
52
+ } from "../chunk-GFEMKKFH.mjs";
50
53
  import {
51
54
  const_object_colors
52
55
  } from "../chunk-OMJJAHOC.mjs";
@@ -67,9 +70,6 @@ import {
67
70
  import {
68
71
  utils_notification_show
69
72
  } from "../chunk-7ZCOFATU.mjs";
70
- import {
71
- createGenericStore
72
- } from "../chunk-U62R2QKJ.mjs";
73
73
  import {
74
74
  __objRest,
75
75
  __spreadProps,
@@ -211,7 +211,7 @@ function Permission_SaveMenuPermission({
211
211
  }
212
212
  });
213
213
  return /* @__PURE__ */ jsx3(
214
- MyButton,
214
+ MyButton2,
215
215
  {
216
216
  onClick: () => {
217
217
  mutation.mutate((values == null ? void 0 : values.filter((item) => item.id != "0").map((item) => ({
@@ -229,38 +229,6 @@ function Permission_SaveMenuPermission({
229
229
  );
230
230
  }
231
231
 
232
- // src/data/menuData.ts
233
- var menuData = [
234
- {
235
- label: "Qu\u1EA3n l\xED h\u1EC7 th\u1ED1ng",
236
- links: [
237
- { pageId: 1, name: "Account management", label: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n", link: "accountManagement" },
238
- { pageId: 2, name: "Access control level", label: "Ph\xE2n quy\u1EC1n c\u1EA5p \u0111\u01A1n v\u1ECB", link: "accessControlLevel" },
239
- { pageId: 3, name: "Access control", label: "Ph\xE2n quy\u1EC1n s\u1EED d\u1EE5ng", link: "accessControl" },
240
- { pageId: 4, name: "Security regulations", label: "Quy \u0111\u1ECBnh an to\xE0n/ b\u1EA3o m\u1EADt th\xF4ng tin", link: "securityPolicyDocs" },
241
- { pageId: 5, name: "System updates", label: "Th\xF4ng tin x\xE2y d\u1EF1ng, c\u1EA3i ti\u1EBFn, b\u1EA3o tr\xEC h\u1EC7 th\u1ED1ng", link: "systemUpdateDocs" },
242
- { pageId: 6, name: "User guide", label: "T\xE0i li\u1EC7u h\u01B0\u1EDBng d\u1EABn s\u1EED d\u1EE5ng", link: "userGuideDocs" }
243
- ]
244
- },
245
- {
246
- label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh",
247
- links: [
248
- { pageId: 7, name: "Organizational regulations", label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", link: "organizationPolicyDocs" },
249
- { pageId: 8, name: "Workflow process", label: "Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", link: "workflowProcessDocs" },
250
- { pageId: 9, name: "Form templates", label: "T\xE0i li\u1EC7u bi\u1EC3u m\u1EABu", link: "formTemplateDocs" }
251
- ]
252
- },
253
- {
254
- label: "Danh m\u1EE5c h\u1EC7 th\u1ED1ng",
255
- links: [
256
- { pageId: 0, name: "Document categories", label: "Danh m\u1EE5c lo\u1EA1i v\u0103n b\u1EA3n", link: "documentCategories" },
257
- { pageId: 0, name: "mailConfig", label: "Danh m\u1EE5c c\u1EA5u h\xECnh mail", link: "mailConfig" },
258
- { pageId: 0, name: "pageContentConfig", label: "Danh m\u1EE5c Page Content", link: "pageContentConfig" },
259
- { pageId: 0, name: "moduleConfig", label: "C\u1EA5u h\xECnh th\xF4ng tin ch\u1EE7 qu\u1EA3n", link: "moduleConfig" }
260
- ]
261
- }
262
- ];
263
-
264
232
  // src/module/Permission/adapter/Permission_ViewCheckMenuPermission.tsx
265
233
  import { useEffect as useEffect2, useState } from "react";
266
234
 
@@ -383,7 +351,8 @@ function Permission_ViewCheckMenuPermission({
383
351
  value,
384
352
  onChange,
385
353
  roleOrUserId,
386
- isUserPermission
354
+ isUserPermission,
355
+ menuDataRoot
387
356
  }) {
388
357
  const rolePermissionQuery = useMyReactQuery({
389
358
  queryKey: ["rolePermissions", roleOrUserId],
@@ -430,7 +399,7 @@ function Permission_ViewCheckMenuPermission({
430
399
  }
431
400
  useEffect2(() => {
432
401
  if (!rolePermissionQuery.data) return;
433
- const flattenMenu = extractMenusWithRootGroupTitle(menuData);
402
+ const flattenMenu = extractMenusWithRootGroupTitle(menuDataRoot || []);
434
403
  const menuMerged = mergePermissionsType(flattenMenu, rolePermissionQuery.data);
435
404
  onChange == null ? void 0 : onChange(menuMerged);
436
405
  isLoadingState[1](false);
@@ -863,7 +832,7 @@ function F_accessControl_Save() {
863
832
  }
864
833
  disable[1](false);
865
834
  }, [store.state.rolePermissions]);
866
- return /* @__PURE__ */ jsx9(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
835
+ return /* @__PURE__ */ jsx9(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
867
836
  }
868
837
 
869
838
  // src/modules-features/admin/core/accessControl/old/F_accessControl.tsx
@@ -1022,6 +991,38 @@ var mockData = [
1022
991
  { id: 4, code: "ADMIN", name: "Admin" }
1023
992
  ];
1024
993
 
994
+ // src/data/menuData.ts
995
+ var menuData = [
996
+ {
997
+ label: "Qu\u1EA3n l\xED h\u1EC7 th\u1ED1ng",
998
+ links: [
999
+ { pageId: 1, name: "Account management", label: "Qu\u1EA3n l\xED t\xE0i kho\u1EA3n", link: "accountManagement" },
1000
+ { pageId: 2, name: "Access control level", label: "Ph\xE2n quy\u1EC1n c\u1EA5p \u0111\u01A1n v\u1ECB", link: "accessControlLevel" },
1001
+ { pageId: 3, name: "Access control", label: "Ph\xE2n quy\u1EC1n s\u1EED d\u1EE5ng", link: "accessControl" },
1002
+ { pageId: 4, name: "Security regulations", label: "Quy \u0111\u1ECBnh an to\xE0n/ b\u1EA3o m\u1EADt th\xF4ng tin", link: "securityPolicyDocs" },
1003
+ { pageId: 5, name: "System updates", label: "Th\xF4ng tin x\xE2y d\u1EF1ng, c\u1EA3i ti\u1EBFn, b\u1EA3o tr\xEC h\u1EC7 th\u1ED1ng", link: "systemUpdateDocs" },
1004
+ { pageId: 6, name: "User guide", label: "T\xE0i li\u1EC7u h\u01B0\u1EDBng d\u1EABn s\u1EED d\u1EE5ng", link: "userGuideDocs" }
1005
+ ]
1006
+ },
1007
+ {
1008
+ label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh",
1009
+ links: [
1010
+ { pageId: 7, name: "Organizational regulations", label: "V\u0103n b\u1EA3n - Quy \u0111\u1ECBnh t\u1ED5 ch\u1EE9c", link: "organizationPolicyDocs" },
1011
+ { pageId: 8, name: "Workflow process", label: "Quy tr\xECnh x\u1EED l\xFD c\xF4ng vi\u1EC7c", link: "workflowProcessDocs" },
1012
+ { pageId: 9, name: "Form templates", label: "T\xE0i li\u1EC7u bi\u1EC3u m\u1EABu", link: "formTemplateDocs" }
1013
+ ]
1014
+ },
1015
+ {
1016
+ label: "Danh m\u1EE5c h\u1EC7 th\u1ED1ng",
1017
+ links: [
1018
+ { pageId: 0, name: "Document categories", label: "Danh m\u1EE5c lo\u1EA1i v\u0103n b\u1EA3n", link: "documentCategories" },
1019
+ { pageId: 0, name: "mailConfig", label: "Danh m\u1EE5c c\u1EA5u h\xECnh mail", link: "mailConfig" },
1020
+ { pageId: 0, name: "pageContentConfig", label: "Danh m\u1EE5c Page Content", link: "pageContentConfig" },
1021
+ { pageId: 0, name: "moduleConfig", label: "C\u1EA5u h\xECnh th\xF4ng tin ch\u1EE7 qu\u1EA3n", link: "moduleConfig" }
1022
+ ]
1023
+ }
1024
+ ];
1025
+
1025
1026
  // src/modules-features/admin/core/accessControlLevel/old/F_accessControlLevel_ViewMenuPermissions.tsx
1026
1027
  import { Checkbox as Checkbox3, Flex as Flex3, ScrollArea as ScrollArea4, Table as Table3, Text as Text3 } from "@mantine/core";
1027
1028
  import { IconEdit as IconEdit2, IconEyeUp as IconEyeUp2, IconFileExport as IconFileExport3, IconPlus as IconPlus3, IconPrinter as IconPrinter3, IconTrash as IconTrash3 } from "@tabler/icons-react";
@@ -1285,7 +1286,7 @@ function F_accessControlLevel_Save() {
1285
1286
  }
1286
1287
  disable[1](false);
1287
1288
  }, [store.state.rolePermissions]);
1288
- return /* @__PURE__ */ jsx16(MyButton2, { disabled: disable[0], crudType: "save", onClick: handleSave });
1289
+ return /* @__PURE__ */ jsx16(MyButton, { disabled: disable[0], crudType: "save", onClick: handleSave });
1289
1290
  }
1290
1291
 
1291
1292
  // src/modules-features/admin/core/accessControlLevel/old/F_accessControlLevel.tsx
@@ -3056,7 +3057,7 @@ function F_core35923() {
3056
3057
  /* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Favicon (16px x 16px)" }) }),
3057
3058
  /* @__PURE__ */ jsx49(Grid5.Col, { span: { base: 12, md: 6 }, children: /* @__PURE__ */ jsx49(MyFileInput, { label: "Logo (330px x 115px)" }) })
3058
3059
  ] }),
3059
- /* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton2, { crudType: "save" }) })
3060
+ /* @__PURE__ */ jsx49(MyFlexEnd, { children: /* @__PURE__ */ jsx49(MyButton, { crudType: "save" }) })
3060
3061
  ] });
3061
3062
  }
3062
3063
 
@@ -4443,7 +4444,7 @@ function F_moduleConfig_Save({
4443
4444
  });
4444
4445
  }
4445
4446
  return /* @__PURE__ */ jsx83(
4446
- MyButton2,
4447
+ MyButton,
4447
4448
  {
4448
4449
  disabled: !form.isDirty(),
4449
4450
  crudType: "save",
@@ -4899,13 +4900,13 @@ import { useMemo as useMemo20 } from "react";
4899
4900
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_DeleteDescription.tsx
4900
4901
  import { jsx as jsx91 } from "react/jsx-runtime";
4901
4902
  function F_pageContentConfig_DeleteDescription() {
4902
- return /* @__PURE__ */ jsx91(MyButton, { actionType: "delete" });
4903
+ return /* @__PURE__ */ jsx91(MyButton2, { actionType: "delete" });
4903
4904
  }
4904
4905
 
4905
4906
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Export.tsx
4906
4907
  import { jsx as jsx92 } from "react/jsx-runtime";
4907
4908
  function F_pageContentConfig_Export() {
4908
- return /* @__PURE__ */ jsx92(MyButton, { actionType: "export" });
4909
+ return /* @__PURE__ */ jsx92(MyButton2, { actionType: "export" });
4909
4910
  }
4910
4911
 
4911
4912
  // src/modules-features/admin/core/pageContentConfig/F_pageContentConfig_Save.tsx
@@ -4917,7 +4918,7 @@ function F_pageContentConfig_Save({ menuValues }) {
4917
4918
  return service_pageContent.updateList([{ id: 1 }]);
4918
4919
  }
4919
4920
  });
4920
- return /* @__PURE__ */ jsx93(MyButton, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
4921
+ return /* @__PURE__ */ jsx93(MyButton2, { actionType: "save", onClick: () => updatePageConfigMutation.mutate({}) });
4921
4922
  }
4922
4923
 
4923
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.507",
45
+ "version": "0.1.509",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"
@@ -1,3 +1,6 @@
1
+ import {
2
+ createGenericStore
3
+ } from "./chunk-U62R2QKJ.mjs";
1
4
  import {
2
5
  utils_pdf_download
3
6
  } from "./chunk-5U2JSHSJ.mjs";
@@ -12,9 +15,6 @@ import {
12
15
  import {
13
16
  utils_notification_show
14
17
  } from "./chunk-7ZCOFATU.mjs";
15
- import {
16
- createGenericStore
17
- } from "./chunk-U62R2QKJ.mjs";
18
18
  import {
19
19
  __objRest,
20
20
  __spreadProps,