aq-fe-framework 0.1.503 → 0.1.506

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.
@@ -1223,7 +1223,7 @@ function MyButtonDeleteList(_a) {
1223
1223
  }
1224
1224
 
1225
1225
  // src/components/Button/ButtonImport/MyButtonImport.tsx
1226
- import { Button as Button8, Modal as Modal8, useModalsStack as useModalsStack3 } from "@mantine/core";
1226
+ import { Button as Button7, Modal as Modal8, useModalsStack as useModalsStack3 } from "@mantine/core";
1227
1227
  import { IconFileImport as IconFileImport2 } from "@tabler/icons-react";
1228
1228
 
1229
1229
  // src/components/Combobox/Select/MySelect.tsx
@@ -1500,102 +1500,43 @@ function SelectFieldModal({ stack, onImport }) {
1500
1500
  }
1501
1501
 
1502
1502
  // src/components/DataDisplay/DataTable/MyDataTable.tsx
1503
- import { Alert, Button as Button6, Center as Center2, Group as Group8, Portal, Text as Text6 } from "@mantine/core";
1504
- import { IconBug, IconDownload as IconDownload3 } from "@tabler/icons-react";
1505
- import { download, generateCsv, mkConfig } from "export-to-csv";
1503
+ import { Alert, Center as Center2, Portal, Text as Text6 } from "@mantine/core";
1504
+ import { IconBug } from "@tabler/icons-react";
1506
1505
  import {
1507
1506
  MantineReactTable,
1508
1507
  useMantineReactTable
1509
1508
  } from "mantine-react-table";
1510
1509
  import { MRT_Localization_VI } from "mantine-react-table/locales/vi/index.cjs";
1511
1510
  import { useEffect as useEffect5 } from "react";
1512
- import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
1513
- function formatData(data, formats) {
1514
- return data.map((row) => {
1515
- const transformedRow = {};
1516
- Object.entries(row).forEach(([key, value]) => {
1517
- const formatFn = formats[key];
1518
- if (value instanceof Date) {
1519
- transformedRow[key] = formatFn ? formatFn(value.toISOString()) : value.toISOString();
1520
- } else if (value !== null && typeof value === "object") {
1521
- transformedRow[key] = formatFn ? formatFn(JSON.stringify(value)) : JSON.stringify(value);
1522
- } else {
1523
- transformedRow[key] = formatFn ? formatFn(value) : value;
1524
- }
1525
- });
1526
- return transformedRow;
1527
- });
1528
- }
1511
+ import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
1529
1512
  function MyDataTable(_a) {
1530
1513
  var _b = _a, {
1531
- formats = {},
1532
- exportAble = false,
1533
- csvConfigProps,
1534
1514
  rowActionSize,
1535
1515
  columns,
1536
1516
  data,
1537
- renderTopToolbarCustomActions,
1538
1517
  setSelectedRow,
1539
1518
  isError,
1540
1519
  isLoading,
1541
1520
  pagination,
1542
- initialState,
1543
- state: state
1521
+ idSelectionOne,
1522
+ setIdSelectionOne
1544
1523
  } = _b, rest = __objRest(_b, [
1545
- "formats",
1546
- "exportAble",
1547
- "csvConfigProps",
1548
1524
  "rowActionSize",
1549
1525
  "columns",
1550
1526
  "data",
1551
- "renderTopToolbarCustomActions",
1552
1527
  "setSelectedRow",
1553
1528
  "isError",
1554
1529
  "isLoading",
1555
1530
  "pagination",
1556
- "initialState",
1557
- // setPagination,
1558
- "state"
1531
+ "idSelectionOne",
1532
+ "setIdSelectionOne"
1559
1533
  ]);
1560
1534
  const { renderRowActions } = __spreadValues({}, rest);
1561
- const csvConfig = mkConfig(__spreadValues({
1562
- fieldSeparator: ",",
1563
- decimalSeparator: ".",
1564
- useKeysAsHeaders: (csvConfigProps == null ? void 0 : csvConfigProps.columnHeaders) ? false : true
1565
- }, csvConfigProps));
1566
- const handleExport = (rows) => {
1567
- if (rows.length == 0) {
1568
- const transformedData = formatData(data, formats);
1569
- const csv2 = generateCsv(csvConfig)(transformedData);
1570
- download(csvConfig)(csv2);
1571
- return;
1572
- }
1573
- const rowData = rows.map((row) => row.original);
1574
- const transformedRows = formatData(rowData, formats);
1575
- const csv = generateCsv(csvConfig)(transformedRows);
1576
- download(csvConfig)(csv);
1577
- };
1578
1535
  const table = useMantineReactTable(__spreadValues({
1579
1536
  columns,
1580
1537
  data,
1581
- renderTopToolbarCustomActions: ({ table: table2 }) => {
1582
- return /* @__PURE__ */ jsxs14(Group8, { children: [
1583
- renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table: table2 }),
1584
- exportAble && /* @__PURE__ */ jsx26(Fragment7, { children: /* @__PURE__ */ jsx26(
1585
- Button6,
1586
- {
1587
- color: "green.8",
1588
- onClick: () => handleExport(table2.getSelectedRowModel().rows),
1589
- leftSection: /* @__PURE__ */ jsx26(IconDownload3, {}),
1590
- variant: "filled",
1591
- children: "Export"
1592
- }
1593
- ) })
1594
- ] });
1595
- },
1596
1538
  manualPagination: pagination ? true : false,
1597
1539
  enableRowNumbers: true,
1598
- enableRowSelection: exportAble,
1599
1540
  enableEditing: renderRowActions ? true : false,
1600
1541
  positionActionsColumn: "last",
1601
1542
  enableColumnResizing: true,
@@ -1618,7 +1559,7 @@ function MyDataTable(_a) {
1618
1559
  modifiedWhen: false,
1619
1560
  modifiedFullName: false
1620
1561
  }
1621
- }, pagination ? {} : { pagination: { pageIndex: 0, pageSize: 30 } }), initialState),
1562
+ }, pagination ? {} : { pagination: { pageIndex: 0, pageSize: 30 } }), rest.initialState),
1622
1563
  mantineTableHeadCellProps: {
1623
1564
  style: {
1624
1565
  verticalAlign: "middle",
@@ -1639,19 +1580,27 @@ function MyDataTable(_a) {
1639
1580
  ] }),
1640
1581
  state: __spreadValues(__spreadValues({
1641
1582
  showSkeletons: isLoading
1642
- }, pagination ? { pagination } : {}), state),
1583
+ }, pagination ? { pagination } : {}), rest.state),
1643
1584
  mantineTableContainerProps: { style: { maxHeight: "65vh" } },
1644
- enableStickyHeader: true
1585
+ enableStickyHeader: true,
1586
+ mantineTableBodyRowProps: ({ row }) => __spreadValues({}, setIdSelectionOne ? {
1587
+ onClick: () => {
1588
+ setIdSelectionOne == null ? void 0 : setIdSelectionOne(row.original.id);
1589
+ },
1590
+ style: {
1591
+ cursor: "pointer",
1592
+ backgroundColor: row.original.id == idSelectionOne ? const_object_colors.mantineBackgroundTealLight : "transparent"
1593
+ }
1594
+ } : {})
1645
1595
  }, rest));
1646
1596
  useEffect5(() => {
1647
1597
  setSelectedRow && setSelectedRow(table.getSelectedRowModel().rows.map((row) => row.original));
1648
1598
  }, [table.getState().rowSelection]);
1649
- if (data == void 0) return;
1650
1599
  return /* @__PURE__ */ jsx26("main", { style: { position: "relative", zIndex: 1 }, children: table.getState().isFullScreen ? /* @__PURE__ */ jsx26(Portal, { children: /* @__PURE__ */ jsx26(MantineReactTable, { table }) }) : /* @__PURE__ */ jsx26(MantineReactTable, { table }) });
1651
1600
  }
1652
1601
 
1653
1602
  // src/components/Button/ButtonImport/SelectFileModal.tsx
1654
- import { Button as Button7, Fieldset as Fieldset2, FileInput as FileInput2, Modal as Modal7, NumberInput, Select as Select2, SimpleGrid as SimpleGrid2 } from "@mantine/core";
1603
+ import { Button as Button6, Fieldset as Fieldset2, FileInput as FileInput2, Modal as Modal7, NumberInput, Select as Select2, SimpleGrid as SimpleGrid2 } from "@mantine/core";
1655
1604
  import { IconArrowBigRight as IconArrowBigRight2, IconSquareRoundedX as IconSquareRoundedX2 } from "@tabler/icons-react";
1656
1605
  import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
1657
1606
  function SelectFileModal({ onExportStructure, stack }) {
@@ -1719,7 +1668,7 @@ function SelectFileModal({ onExportStructure, stack }) {
1719
1668
  ) }),
1720
1669
  /* @__PURE__ */ jsxs15(MyFlexEnd, { children: [
1721
1670
  /* @__PURE__ */ jsx27(
1722
- Button7,
1671
+ Button6,
1723
1672
  {
1724
1673
  color: "teal.8",
1725
1674
  onClick: onExportStructure,
@@ -1727,7 +1676,7 @@ function SelectFileModal({ onExportStructure, stack }) {
1727
1676
  }
1728
1677
  ),
1729
1678
  /* @__PURE__ */ jsx27(
1730
- Button7,
1679
+ Button6,
1731
1680
  {
1732
1681
  disabled: ((_a = store.state.data) == null ? void 0 : _a.length) == 0,
1733
1682
  color: "blue.8",
@@ -1737,7 +1686,7 @@ function SelectFileModal({ onExportStructure, stack }) {
1737
1686
  }
1738
1687
  ),
1739
1688
  /* @__PURE__ */ jsx27(
1740
- Button7,
1689
+ Button6,
1741
1690
  {
1742
1691
  color: "red.6",
1743
1692
  leftSection: /* @__PURE__ */ jsx27(IconSquareRoundedX2, {}),
@@ -1752,15 +1701,15 @@ function SelectFileModal({ onExportStructure, stack }) {
1752
1701
  }
1753
1702
 
1754
1703
  // src/components/Button/ButtonImport/MyButtonImport.tsx
1755
- import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
1704
+ import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
1756
1705
  function MyButtonImport({
1757
1706
  onExportStructure,
1758
1707
  onImport
1759
1708
  }) {
1760
1709
  const stack = useModalsStack3(["select-file-page", "select-field-page", "implement-page"]);
1761
1710
  const store = useS_ButtonImport();
1762
- return /* @__PURE__ */ jsxs16(Fragment8, { children: [
1763
- /* @__PURE__ */ jsx28(Button8, { color: "teal.8", onClick: () => stack.open("select-file-page"), leftSection: /* @__PURE__ */ jsx28(IconFileImport2, {}), title: "Import", children: "Import" }),
1711
+ return /* @__PURE__ */ jsxs16(Fragment7, { children: [
1712
+ /* @__PURE__ */ jsx28(Button7, { color: "teal.8", onClick: () => stack.open("select-file-page"), leftSection: /* @__PURE__ */ jsx28(IconFileImport2, {}), title: "Import", children: "Import" }),
1764
1713
  /* @__PURE__ */ jsxs16(Modal8.Stack, { children: [
1765
1714
  /* @__PURE__ */ jsx28(SelectFileModal, { stack, onExportStructure }),
1766
1715
  /* @__PURE__ */ jsx28(SelectFieldModal, { stack, onImport: () => onImport(store.getDataFinal()) })
@@ -1769,9 +1718,9 @@ function MyButtonImport({
1769
1718
  }
1770
1719
 
1771
1720
  // src/components/Button/ButtonModal/AQSelectTableByOpenModal.tsx
1772
- import { Button as Button9, Fieldset as Fieldset3, Modal as Modal9 } from "@mantine/core";
1721
+ import { Button as Button8, Fieldset as Fieldset3, Modal as Modal9 } from "@mantine/core";
1773
1722
  import { useDisclosure as useDisclosure9 } from "@mantine/hooks";
1774
- import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
1723
+ import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
1775
1724
  function AQSelectTableByOpenModal(_a) {
1776
1725
  var _b = _a, {
1777
1726
  setSelectedData,
@@ -1799,9 +1748,9 @@ function AQSelectTableByOpenModal(_a) {
1799
1748
  "closeAfterSelect"
1800
1749
  ]);
1801
1750
  const disclosure = useDisclosure9(false);
1802
- return /* @__PURE__ */ jsxs17(Fragment9, { children: [
1751
+ return /* @__PURE__ */ jsxs17(Fragment8, { children: [
1803
1752
  /* @__PURE__ */ jsx29(
1804
- Button9,
1753
+ Button8,
1805
1754
  __spreadProps(__spreadValues({
1806
1755
  onClick: disclosure[1].open
1807
1756
  }, rest), {
@@ -1820,7 +1769,7 @@ function AQSelectTableByOpenModal(_a) {
1820
1769
  MyDataTable,
1821
1770
  __spreadValues({
1822
1771
  renderTopToolbarCustomActions: ({ table }) => {
1823
- return /* @__PURE__ */ jsx29(Button9, { onClick: () => {
1772
+ return /* @__PURE__ */ jsx29(Button8, { onClick: () => {
1824
1773
  setSelectedData(table.getSelectedRowModel().rows.map((row) => row.original));
1825
1774
  closeAfterSelect && disclosure[1].close();
1826
1775
  }, children: "Ch\u1ECDn" });
@@ -1836,11 +1785,11 @@ function AQSelectTableByOpenModal(_a) {
1836
1785
  }
1837
1786
 
1838
1787
  // src/components/Button/ButtonPrintPDF/MyButtonPrintPDF.tsx
1839
- import { Button as Button10 } from "@mantine/core";
1788
+ import { Button as Button9 } from "@mantine/core";
1840
1789
  import { IconPrinter as IconPrinter2 } from "@tabler/icons-react";
1841
1790
  import { useRef as useRef2 } from "react";
1842
1791
  import { useReactToPrint } from "react-to-print";
1843
- import { Fragment as Fragment10, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
1792
+ import { Fragment as Fragment9, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
1844
1793
  function MyButtonPrintPDF(_a) {
1845
1794
  var _b = _a, { contentToPrint, children, autoPadding = true } = _b, rest = __objRest(_b, ["contentToPrint", "children", "autoPadding"]);
1846
1795
  const printRef = useRef2(null);
@@ -1854,9 +1803,9 @@ function MyButtonPrintPDF(_a) {
1854
1803
  if (!contentToPrint) return;
1855
1804
  handlePrint();
1856
1805
  }
1857
- return /* @__PURE__ */ jsxs18(Fragment10, { children: [
1806
+ return /* @__PURE__ */ jsxs18(Fragment9, { children: [
1858
1807
  /* @__PURE__ */ jsx30("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx30("div", { ref: printRef, style: { padding: autoPadding ? "2cm 2cm 2cm 3cm" : void 0, fontFamily: '"Times New Roman", Times, serif' }, children: contentToPrint }) }),
1859
- /* @__PURE__ */ jsx30(Button10, __spreadProps(__spreadValues({ color: "orange", onClick: handleClick, leftSection: /* @__PURE__ */ jsx30(IconPrinter2, {}) }, rest), { children }))
1808
+ /* @__PURE__ */ jsx30(Button9, __spreadProps(__spreadValues({ color: "orange", onClick: handleClick, leftSection: /* @__PURE__ */ jsx30(IconPrinter2, {}) }, rest), { children }))
1860
1809
  ] });
1861
1810
  }
1862
1811
 
@@ -2032,8 +1981,8 @@ function MyButtonRouterBack(_a) {
2032
1981
  // src/components/Button/ButtonViewPDF/MyButtonViewPDF.tsx
2033
1982
  import {
2034
1983
  ActionIcon as ActionIcon10,
2035
- Button as Button11,
2036
- Group as Group9,
1984
+ Button as Button10,
1985
+ Group as Group8,
2037
1986
  LoadingOverlay,
2038
1987
  Modal as Modal10,
2039
1988
  Paper as Paper3,
@@ -2044,7 +1993,7 @@ import { useDisclosure as useDisclosure10 } from "@mantine/hooks";
2044
1993
  import { IconLivePhoto as IconLivePhoto2, IconMaximize as IconMaximize3, IconMinimize as IconMinimize3 } from "@tabler/icons-react";
2045
1994
  import { useQuery } from "@tanstack/react-query";
2046
1995
  import { useState as useState8 } from "react";
2047
- import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
1996
+ import { Fragment as Fragment10, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
2048
1997
  function MyButtonViewPDF({
2049
1998
  id,
2050
1999
  modalSize = "80%",
@@ -2069,7 +2018,7 @@ function MyButtonViewPDF({
2069
2018
  },
2070
2019
  enabled: disc[0] == true
2071
2020
  });
2072
- return /* @__PURE__ */ jsxs20(Fragment11, { children: [
2021
+ return /* @__PURE__ */ jsxs20(Fragment10, { children: [
2073
2022
  /* @__PURE__ */ jsx34(Tooltip4, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: isActionIcon ? /* @__PURE__ */ jsx34(
2074
2023
  ActionIcon10,
2075
2024
  {
@@ -2079,7 +2028,7 @@ function MyButtonViewPDF({
2079
2028
  children: /* @__PURE__ */ jsx34(IconLivePhoto2, {})
2080
2029
  }
2081
2030
  ) : /* @__PURE__ */ jsx34(
2082
- Button11,
2031
+ Button10,
2083
2032
  {
2084
2033
  color: "cyan",
2085
2034
  onClick: () => {
@@ -2096,7 +2045,7 @@ function MyButtonViewPDF({
2096
2045
  opened: disc[0],
2097
2046
  onClose: disc[1].close,
2098
2047
  size: modalSize,
2099
- title: /* @__PURE__ */ jsxs20(Group9, { children: [
2048
+ title: /* @__PURE__ */ jsxs20(Group8, { children: [
2100
2049
  /* @__PURE__ */ jsx34(Text7, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
2101
2050
  fullScreen[0] ? /* @__PURE__ */ jsx34(
2102
2051
  ActionIcon10,
@@ -6586,10 +6535,10 @@ function MyCalendar() {
6586
6535
  }
6587
6536
 
6588
6537
  // src/components/CenterFull/MyCenterFull.tsx
6589
- import { Center as Center3, Group as Group10 } from "@mantine/core";
6538
+ import { Center as Center3, Group as Group9 } from "@mantine/core";
6590
6539
  import { jsx as jsx36 } from "react/jsx-runtime";
6591
6540
  function MyCenterFull({ children }) {
6592
- return /* @__PURE__ */ jsx36(Center3, { w: "100%", children: /* @__PURE__ */ jsx36(Group10, { children }) });
6541
+ return /* @__PURE__ */ jsx36(Center3, { w: "100%", children: /* @__PURE__ */ jsx36(Group9, { children }) });
6593
6542
  }
6594
6543
 
6595
6544
  // src/components/Checkbox/MyCheckbox.tsx
@@ -6642,7 +6591,7 @@ function AQCard({
6642
6591
  }
6643
6592
 
6644
6593
  // src/components/DataDisplay/CardInformation/MyCardInformation.tsx
6645
- import { Box as Box2, Flex as Flex3, Group as Group11, Paper as Paper5, Text as Text10 } from "@mantine/core";
6594
+ import { Box as Box2, Flex as Flex3, Group as Group10, Paper as Paper5, Text as Text10 } from "@mantine/core";
6646
6595
  import { IconArrowDownRight, IconArrowUpRight } from "@tabler/icons-react";
6647
6596
  import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
6648
6597
  function MyCardInformation({
@@ -6661,7 +6610,7 @@ function MyCardInformation({
6661
6610
  p: "md",
6662
6611
  radius: "md",
6663
6612
  children: [
6664
- /* @__PURE__ */ jsxs23(Group11, { justify: "space-between", children: [
6613
+ /* @__PURE__ */ jsxs23(Group10, { justify: "space-between", children: [
6665
6614
  /* @__PURE__ */ jsxs23(Flex3, { direction: "column", children: [
6666
6615
  /* @__PURE__ */ jsx40(
6667
6616
  Text10,
@@ -6683,7 +6632,7 @@ function MyCardInformation({
6683
6632
  /* @__PURE__ */ jsx40(Box2, { children: icon })
6684
6633
  ] }),
6685
6634
  /* @__PURE__ */ jsxs23(
6686
- Group11,
6635
+ Group10,
6687
6636
  {
6688
6637
  mt: "5",
6689
6638
  align: "flex-end",
@@ -6716,7 +6665,7 @@ function MyCardInformation({
6716
6665
  ]
6717
6666
  }
6718
6667
  ),
6719
- /* @__PURE__ */ jsxs23(Group11, { justify: "space-between", children: [
6668
+ /* @__PURE__ */ jsxs23(Group10, { justify: "space-between", children: [
6720
6669
  /* @__PURE__ */ jsx40(Text10, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
6721
6670
  extraControl
6722
6671
  ] })
@@ -6727,10 +6676,10 @@ function MyCardInformation({
6727
6676
  }
6728
6677
 
6729
6678
  // src/components/DataDisplay/IconText/MyIconText.tsx
6730
- import { Group as Group12, Text as Text11 } from "@mantine/core";
6679
+ import { Group as Group11, Text as Text11 } from "@mantine/core";
6731
6680
  import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
6732
6681
  function MyIconText({ icon: Icon, text }) {
6733
- return /* @__PURE__ */ jsxs24(Group12, { wrap: "nowrap", gap: 10, mt: 3, children: [
6682
+ return /* @__PURE__ */ jsxs24(Group11, { wrap: "nowrap", gap: 10, mt: 3, children: [
6734
6683
  Icon && /* @__PURE__ */ jsx41(Icon, { stroke: 1.5, size: 16 }),
6735
6684
  /* @__PURE__ */ jsx41(Text11, { fz: "lg", c: "dimmed", children: text })
6736
6685
  ] });
@@ -6745,18 +6694,18 @@ function MyNumberFormatter(_a) {
6745
6694
  }
6746
6695
 
6747
6696
  // src/components/DataDisplay/StatCard/AQStatCard1.tsx
6748
- import { Box as Box3, Button as Button13, Flex as Flex4, Group as Group13, Paper as Paper6, Text as Text12 } from "@mantine/core";
6697
+ import { Box as Box3, Button as Button12, Flex as Flex4, Group as Group12, Paper as Paper6, Text as Text12 } from "@mantine/core";
6749
6698
  import { IconArrowDownRight as IconArrowDownRight2, IconArrowUpRight as IconArrowUpRight2 } from "@tabler/icons-react";
6750
- import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
6699
+ import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
6751
6700
  function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
6752
- return /* @__PURE__ */ jsx43(Fragment12, { children: /* @__PURE__ */ jsxs25(
6701
+ return /* @__PURE__ */ jsx43(Fragment11, { children: /* @__PURE__ */ jsxs25(
6753
6702
  Paper6,
6754
6703
  {
6755
6704
  withBorder: true,
6756
6705
  p: "md",
6757
6706
  radius: "md",
6758
6707
  children: [
6759
- /* @__PURE__ */ jsxs25(Group13, { justify: "space-between", children: [
6708
+ /* @__PURE__ */ jsxs25(Group12, { justify: "space-between", children: [
6760
6709
  /* @__PURE__ */ jsxs25(Flex4, { direction: "column", children: [
6761
6710
  /* @__PURE__ */ jsx43(
6762
6711
  Text12,
@@ -6778,7 +6727,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
6778
6727
  /* @__PURE__ */ jsx43(Box3, { children: icons })
6779
6728
  ] }),
6780
6729
  /* @__PURE__ */ jsxs25(
6781
- Group13,
6730
+ Group12,
6782
6731
  {
6783
6732
  mt: "5",
6784
6733
  align: "flex-end",
@@ -6811,10 +6760,10 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
6811
6760
  ]
6812
6761
  }
6813
6762
  ),
6814
- /* @__PURE__ */ jsxs25(Group13, { justify: "space-between", children: [
6763
+ /* @__PURE__ */ jsxs25(Group12, { justify: "space-between", children: [
6815
6764
  /* @__PURE__ */ jsx43(Text12, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
6816
6765
  /* @__PURE__ */ jsx43(
6817
- Button13,
6766
+ Button12,
6818
6767
  {
6819
6768
  variant: "light",
6820
6769
  size: "xs",
@@ -6829,7 +6778,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
6829
6778
  }
6830
6779
 
6831
6780
  // src/components/DataDisplay/StatCard/AQStatCard2.tsx
6832
- import { Box as Box4, Group as Group14, Paper as Paper7, Text as Text13 } from "@mantine/core";
6781
+ import { Box as Box4, Group as Group13, Paper as Paper7, Text as Text13 } from "@mantine/core";
6833
6782
  import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
6834
6783
  function AQStatCard2({
6835
6784
  title,
@@ -6850,7 +6799,7 @@ function AQStatCard2({
6850
6799
  onMouseEnter: (e4) => e4.currentTarget.style.transform = "translateY(-4px)",
6851
6800
  onMouseLeave: (e4) => e4.currentTarget.style.transform = "translateY(0)",
6852
6801
  children: [
6853
- /* @__PURE__ */ jsxs26(Group14, { justify: "space-between", align: "flex-start", children: [
6802
+ /* @__PURE__ */ jsxs26(Group13, { justify: "space-between", align: "flex-start", children: [
6854
6803
  /* @__PURE__ */ jsxs26(Box4, { children: [
6855
6804
  /* @__PURE__ */ jsx44(MyFlexRow, { gap: 6, align: "end", children: /* @__PURE__ */ jsx44(
6856
6805
  Text13,
@@ -6870,7 +6819,7 @@ function AQStatCard2({
6870
6819
  ] }),
6871
6820
  /* @__PURE__ */ jsx44(Box4, { children: icons })
6872
6821
  ] }),
6873
- /* @__PURE__ */ jsx44(Group14, { align: "flex-end", gap: "xs", children: /* @__PURE__ */ jsx44(
6822
+ /* @__PURE__ */ jsx44(Group13, { align: "flex-end", gap: "xs", children: /* @__PURE__ */ jsx44(
6874
6823
  Text13,
6875
6824
  {
6876
6825
  fz: 35,
@@ -6972,7 +6921,7 @@ function MyDateInput(_a) {
6972
6921
  // src/components/Inputs/Fieldset/MyFieldset.tsx
6973
6922
  import {
6974
6923
  Fieldset as Fieldset4,
6975
- Group as Group15,
6924
+ Group as Group14,
6976
6925
  Text as Text14,
6977
6926
  useMantineColorScheme as useMantineColorScheme2
6978
6927
  } from "@mantine/core";
@@ -7008,7 +6957,7 @@ function MyFieldset(_a) {
7008
6957
  return /* @__PURE__ */ jsx46(
7009
6958
  Fieldset4,
7010
6959
  __spreadProps(__spreadValues({
7011
- legend: customLegend != null ? customLegend : /* @__PURE__ */ jsx46(Group15, { gap: "xs", children: /* @__PURE__ */ jsxs27(Text14, { fw: 600, children: [
6960
+ legend: customLegend != null ? customLegend : /* @__PURE__ */ jsx46(Group14, { gap: "xs", children: /* @__PURE__ */ jsxs27(Text14, { fw: 600, children: [
7012
6961
  " ",
7013
6962
  title,
7014
6963
  " "
@@ -7238,7 +7187,7 @@ function MyTextEditor(_a) {
7238
7187
  }
7239
7188
 
7240
7189
  // src/modules-features/authenticate/F_authenticate_Logout.tsx
7241
- import { Button as Button14 } from "@mantine/core";
7190
+ import { Button as Button13 } from "@mantine/core";
7242
7191
  import { IconLogout } from "@tabler/icons-react";
7243
7192
  import { useRouter as useRouter3 } from "next/navigation";
7244
7193
 
@@ -7257,7 +7206,7 @@ import { jsx as jsx51 } from "react/jsx-runtime";
7257
7206
  function F_authenticate_Logout({ redirectURL = "/auth/login" }) {
7258
7207
  const router = useRouter3();
7259
7208
  const S_Authenticate = useS_authenticate();
7260
- return /* @__PURE__ */ jsx51(Button14, { onClick: () => {
7209
+ return /* @__PURE__ */ jsx51(Button13, { onClick: () => {
7261
7210
  S_Authenticate.setProperty("token", "");
7262
7211
  router.replace(redirectURL);
7263
7212
  }, leftSection: /* @__PURE__ */ jsx51(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
@@ -7269,7 +7218,7 @@ import {
7269
7218
  AppShell,
7270
7219
  Badge as Badge3,
7271
7220
  Divider as Divider2,
7272
- Group as Group16,
7221
+ Group as Group15,
7273
7222
  Image as Image3,
7274
7223
  NavLink,
7275
7224
  ScrollArea as ScrollArea3,
@@ -7285,7 +7234,7 @@ import {
7285
7234
  import Link3 from "next/link";
7286
7235
  import { usePathname as usePathname2 } from "next/navigation";
7287
7236
  import { useEffect as useEffect9, useMemo as useMemo3, useState as useState10 } from "react";
7288
- import { Fragment as Fragment13, jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
7237
+ import { Fragment as Fragment12, jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
7289
7238
  function findBreadcrumbPath(items, currentPath, parents = []) {
7290
7239
  for (const item of items) {
7291
7240
  if (item.link === currentPath) {
@@ -7298,6 +7247,25 @@ function findBreadcrumbPath(items, currentPath, parents = []) {
7298
7247
  }
7299
7248
  return null;
7300
7249
  }
7250
+ function flattenMenuGroups(input) {
7251
+ return input.map((group) => {
7252
+ var _a;
7253
+ const flatLinks = [];
7254
+ (_a = group == null ? void 0 : group.links) == null ? void 0 : _a.forEach((link) => {
7255
+ if (link.links && Array.isArray(link.links)) {
7256
+ link.links.forEach((subLink) => {
7257
+ flatLinks.push(subLink);
7258
+ });
7259
+ } else {
7260
+ flatLinks.push(link);
7261
+ }
7262
+ });
7263
+ return {
7264
+ label: group.label,
7265
+ links: flatLinks
7266
+ };
7267
+ });
7268
+ }
7301
7269
  function getRightSection(status) {
7302
7270
  if (status === "Prototype")
7303
7271
  return /* @__PURE__ */ jsx52(Badge3, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "pink", circle: true, children: "P" });
@@ -7318,7 +7286,7 @@ function RenderNavLinks({
7318
7286
  const extractPathName = pathName.slice(index).replace("/", "");
7319
7287
  const segments = pathName.split("/").filter(Boolean);
7320
7288
  segments.pop();
7321
- return /* @__PURE__ */ jsx52(Fragment13, { children: items.map((item, index2) => /* @__PURE__ */ jsx52(
7289
+ return /* @__PURE__ */ jsx52(Fragment12, { children: items.map((item, index2) => /* @__PURE__ */ jsx52(
7322
7290
  NavLink,
7323
7291
  {
7324
7292
  active: extractPathName === item.link,
@@ -7474,8 +7442,8 @@ function BasicAppShell({ children, menu, extraTopRight, title, logoutRedirect })
7474
7442
  },
7475
7443
  padding: "md",
7476
7444
  children: [
7477
- /* @__PURE__ */ jsx52(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs29(Group16, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
7478
- /* @__PURE__ */ jsxs29(Group16, { h: "100%", children: [
7445
+ /* @__PURE__ */ jsx52(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs29(Group15, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
7446
+ /* @__PURE__ */ jsxs29(Group15, { h: "100%", children: [
7479
7447
  /* @__PURE__ */ jsx52(
7480
7448
  Tooltip5,
7481
7449
  {
@@ -7504,7 +7472,7 @@ function BasicAppShell({ children, menu, extraTopRight, title, logoutRedirect })
7504
7472
  ) })
7505
7473
  ] }),
7506
7474
  /* @__PURE__ */ jsx52(
7507
- Group16,
7475
+ Group15,
7508
7476
  {
7509
7477
  style: {
7510
7478
  position: "absolute",
@@ -7514,13 +7482,13 @@ function BasicAppShell({ children, menu, extraTopRight, title, logoutRedirect })
7514
7482
  children: /* @__PURE__ */ jsx52(Text15, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
7515
7483
  }
7516
7484
  ),
7517
- /* @__PURE__ */ jsxs29(Group16, { children: [
7485
+ /* @__PURE__ */ jsxs29(Group15, { children: [
7518
7486
  extraTopRight,
7519
7487
  /* @__PURE__ */ jsx52(MySwitchTheme, {})
7520
7488
  ] })
7521
7489
  ] }) : (
7522
7490
  // For mobile screens - simplified layout
7523
- /* @__PURE__ */ jsxs29(Group16, { h: "100%", px: "md", justify: "space-between", children: [
7491
+ /* @__PURE__ */ jsxs29(Group15, { h: "100%", px: "md", justify: "space-between", children: [
7524
7492
  /* @__PURE__ */ jsx52(
7525
7493
  ActionIcon11,
7526
7494
  {
@@ -7532,7 +7500,7 @@ function BasicAppShell({ children, menu, extraTopRight, title, logoutRedirect })
7532
7500
  }
7533
7501
  ),
7534
7502
  /* @__PURE__ */ jsx52(Text15, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
7535
- /* @__PURE__ */ jsxs29(Group16, { children: [
7503
+ /* @__PURE__ */ jsxs29(Group15, { children: [
7536
7504
  extraTopRight,
7537
7505
  /* @__PURE__ */ jsx52(MySwitchTheme, {})
7538
7506
  ] })
@@ -7633,11 +7601,11 @@ function MyContainer(_a) {
7633
7601
  import {
7634
7602
  Box as Box5,
7635
7603
  Burger,
7636
- Button as Button15,
7604
+ Button as Button14,
7637
7605
  Container as Container2,
7638
7606
  Divider as Divider3,
7639
7607
  Drawer,
7640
- Group as Group17,
7608
+ Group as Group16,
7641
7609
  Image as Image4,
7642
7610
  ScrollArea as ScrollArea4,
7643
7611
  Text as Text16,
@@ -7710,7 +7678,7 @@ function HeaderMegaMenu({ children, menus }) {
7710
7678
  const [linksOpened, { toggle: toggleLinks }] = useDisclosure11(false);
7711
7679
  const HeaderMegaMenuStore = useHeaderMegaMenuStore();
7712
7680
  const theme = useMantineTheme();
7713
- const links = mockdata.map((item) => /* @__PURE__ */ jsx54(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs30(Group17, { wrap: "nowrap", align: "flex-start", children: [
7681
+ const links = mockdata.map((item) => /* @__PURE__ */ jsx54(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs30(Group16, { wrap: "nowrap", align: "flex-start", children: [
7714
7682
  /* @__PURE__ */ jsx54(ThemeIcon, { size: 34, variant: "default", radius: "md", children: /* @__PURE__ */ jsx54(item.icon, { size: 22, color: theme.colors.blue[6] }) }),
7715
7683
  /* @__PURE__ */ jsxs30("div", { children: [
7716
7684
  /* @__PURE__ */ jsx54(Text16, { size: "sm", fw: 500, children: item.title }),
@@ -7718,12 +7686,12 @@ function HeaderMegaMenu({ children, menus }) {
7718
7686
  ] })
7719
7687
  ] }) }, item.title));
7720
7688
  return /* @__PURE__ */ jsxs30(Box5, { children: [
7721
- /* @__PURE__ */ jsx54("header", { className: css_default.header, children: /* @__PURE__ */ jsxs30(Group17, { justify: "space-between", h: "100%", children: [
7722
- /* @__PURE__ */ jsxs30(Group17, { children: [
7689
+ /* @__PURE__ */ jsx54("header", { className: css_default.header, children: /* @__PURE__ */ jsxs30(Group16, { justify: "space-between", h: "100%", children: [
7690
+ /* @__PURE__ */ jsxs30(Group16, { children: [
7723
7691
  /* @__PURE__ */ jsx54(Image4, { src: "/imgs/0/IMG0LogoAQTech.png", h: 30, alt: "", w: "auto" }),
7724
- /* @__PURE__ */ jsx54(Group17, { h: "100%", gap: 5, visibleFrom: "sm", children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx54(Button15, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) })
7692
+ /* @__PURE__ */ jsx54(Group16, { h: "100%", gap: 5, visibleFrom: "sm", children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx54(Button14, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) })
7725
7693
  ] }),
7726
- /* @__PURE__ */ jsxs30(Group17, { children: [
7694
+ /* @__PURE__ */ jsxs30(Group16, { children: [
7727
7695
  /* @__PURE__ */ jsx54(TextInput3, { placeholder: "T\xECm ki\u1EBFm", leftSection: /* @__PURE__ */ jsx54(IconSearch2, {}), radius: "xl", w: "250px" }),
7728
7696
  /* @__PURE__ */ jsx54(MySwitchTheme, {})
7729
7697
  ] }),
@@ -7742,7 +7710,7 @@ function HeaderMegaMenu({ children, menus }) {
7742
7710
  zIndex: 1e6,
7743
7711
  children: /* @__PURE__ */ jsxs30(ScrollArea4, { h: "calc(100vh - 80px", mx: "-md", children: [
7744
7712
  /* @__PURE__ */ jsx54(Divider3, { my: "sm" }),
7745
- /* @__PURE__ */ jsx54(MyFlexColumn, { h: "100%", gap: 0, children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx54(Button15, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) }),
7713
+ /* @__PURE__ */ jsx54(MyFlexColumn, { h: "100%", gap: 0, children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx54(Button14, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) }),
7746
7714
  /* @__PURE__ */ jsx54(Divider3, { my: "sm" })
7747
7715
  ] })
7748
7716
  }
@@ -7751,7 +7719,7 @@ function HeaderMegaMenu({ children, menus }) {
7751
7719
  }
7752
7720
 
7753
7721
  // src/components/Layouts/PageContent/MyPageContent.tsx
7754
- import { Badge as Badge4, Breadcrumbs, Container as Container3, Divider as Divider4, Group as Group18, Text as Text17, Title } from "@mantine/core";
7722
+ import { Badge as Badge4, Breadcrumbs, Container as Container3, Divider as Divider4, Group as Group17, Text as Text17, Title } from "@mantine/core";
7755
7723
  import { jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
7756
7724
  var getStatusColor = (status) => {
7757
7725
  switch (status) {
@@ -7763,8 +7731,8 @@ var getStatusColor = (status) => {
7763
7731
  };
7764
7732
  function PageTitle({ title, status, note }) {
7765
7733
  const color = getStatusColor(status);
7766
- return /* @__PURE__ */ jsx55(Group18, { children: /* @__PURE__ */ jsxs31(MyFlexColumn, { gap: 0, children: [
7767
- /* @__PURE__ */ jsxs31(Group18, { align: "center", children: [
7734
+ return /* @__PURE__ */ jsx55(Group17, { children: /* @__PURE__ */ jsxs31(MyFlexColumn, { gap: 0, children: [
7735
+ /* @__PURE__ */ jsxs31(Group17, { align: "center", children: [
7768
7736
  /* @__PURE__ */ jsx55(Title, { order: 3, children: title }),
7769
7737
  status && /* @__PURE__ */ jsx55(
7770
7738
  Badge4,
@@ -7791,8 +7759,8 @@ function MyPageContent({
7791
7759
  const basicAppShellStore = useS_BasicAppShell();
7792
7760
  const finalTitle = title || basicAppShellStore.state.title;
7793
7761
  return /* @__PURE__ */ jsxs31(Container3, { p: 0, fluid: true, children: [
7794
- /* @__PURE__ */ jsxs31(Group18, { justify: "space-between", children: [
7795
- /* @__PURE__ */ jsxs31(Group18, { children: [
7762
+ /* @__PURE__ */ jsxs31(Group17, { justify: "space-between", children: [
7763
+ /* @__PURE__ */ jsxs31(Group17, { children: [
7796
7764
  /* @__PURE__ */ jsx55(MyButtonRouterBack, {}),
7797
7765
  /* @__PURE__ */ jsx55(
7798
7766
  PageTitle,
@@ -7804,7 +7772,7 @@ function MyPageContent({
7804
7772
  ),
7805
7773
  leftTopBar
7806
7774
  ] }),
7807
- /* @__PURE__ */ jsxs31(Group18, { p: "md", children: [
7775
+ /* @__PURE__ */ jsxs31(Group17, { p: "md", children: [
7808
7776
  rightTopBar,
7809
7777
  /* @__PURE__ */ jsx55(Breadcrumbs, { separatorMargin: "7", children: (_a = basicAppShellStore.state.breadcrumb) == null ? void 0 : _a.map((item, idx) => /* @__PURE__ */ jsx55(Text17, { fw: "600", c: "blue", children: item }, idx)) })
7810
7778
  ] })
@@ -7831,7 +7799,7 @@ function MyTab(_a) {
7831
7799
  }
7832
7800
 
7833
7801
  // src/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx
7834
- import { ActionIcon as ActionIcon12, Button as Button16, Fieldset as Fieldset5, Group as Group19, Modal as Modal11 } from "@mantine/core";
7802
+ import { ActionIcon as ActionIcon12, Button as Button15, Fieldset as Fieldset5, Group as Group18, Modal as Modal11 } from "@mantine/core";
7835
7803
  import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
7836
7804
  import { IconX as IconX2 } from "@tabler/icons-react";
7837
7805
  import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
@@ -7844,9 +7812,9 @@ function MyDataTableSelect(_a) {
7844
7812
  MyDataTable,
7845
7813
  __spreadValues({
7846
7814
  renderTopToolbarCustomActions: ({ table }) => {
7847
- return /* @__PURE__ */ jsxs33(Group19, { children: [
7815
+ return /* @__PURE__ */ jsxs33(Group18, { children: [
7848
7816
  renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table }),
7849
- /* @__PURE__ */ jsx57(Button16, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
7817
+ /* @__PURE__ */ jsx57(Button15, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
7850
7818
  ] });
7851
7819
  },
7852
7820
  columns,
@@ -7860,7 +7828,7 @@ function MyDataTableSelect(_a) {
7860
7828
  MyDataTable,
7861
7829
  __spreadValues({
7862
7830
  renderTopToolbarCustomActions: ({ table }) => {
7863
- return /* @__PURE__ */ jsx57(Button16, { onClick: () => {
7831
+ return /* @__PURE__ */ jsx57(Button15, { onClick: () => {
7864
7832
  table.getSelectedRowModel().rows.map((item) => listState[1].append(item.original));
7865
7833
  disc[1].close();
7866
7834
  }, children: "Ch\u1ECDn" });
@@ -8011,6 +7979,7 @@ export {
8011
7979
  MyTextEditor,
8012
7980
  useS_authenticate,
8013
7981
  F_authenticate_Logout,
7982
+ flattenMenuGroups,
8014
7983
  BasicAppShell_transformMenuToEnum,
8015
7984
  BasicAppShell,
8016
7985
  groupToTwoLevels,