aq-fe-framework 0.1.510 → 0.1.511
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/dist/{chunk-KCYPNG4W.mjs → chunk-JYZUJKAM.mjs} +48 -43
- package/dist/{chunk-RVLIJK3A.mjs → chunk-TXRNH2ZM.mjs} +117 -87
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/core/index.d.mts +5 -1
- package/dist/core/index.mjs +2 -2
- package/dist/modules-features/index.mjs +2 -2
- package/package.json +1 -1
@@ -1500,7 +1500,7 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1500
1500
|
}
|
1501
1501
|
|
1502
1502
|
// src/components/DataDisplay/DataTable/MyDataTable.tsx
|
1503
|
-
import { Alert, Center as Center2, Portal, Text as Text6 } from "@mantine/core";
|
1503
|
+
import { Alert, Center as Center2, Group as Group8, Portal, Text as Text6 } from "@mantine/core";
|
1504
1504
|
import { IconBug } from "@tabler/icons-react";
|
1505
1505
|
import {
|
1506
1506
|
MantineReactTable,
|
@@ -1519,7 +1519,8 @@ function MyDataTable(_a) {
|
|
1519
1519
|
isLoading,
|
1520
1520
|
pagination,
|
1521
1521
|
idSelectionOne,
|
1522
|
-
setIdSelectionOne
|
1522
|
+
setIdSelectionOne,
|
1523
|
+
renderTopToolbarCustomActions
|
1523
1524
|
} = _b, rest = __objRest(_b, [
|
1524
1525
|
"rowActionSize",
|
1525
1526
|
"columns",
|
@@ -1529,7 +1530,8 @@ function MyDataTable(_a) {
|
|
1529
1530
|
"isLoading",
|
1530
1531
|
"pagination",
|
1531
1532
|
"idSelectionOne",
|
1532
|
-
"setIdSelectionOne"
|
1533
|
+
"setIdSelectionOne",
|
1534
|
+
"renderTopToolbarCustomActions"
|
1533
1535
|
]);
|
1534
1536
|
const { renderRowActions } = __spreadValues({}, rest);
|
1535
1537
|
const table = useMantineReactTable(__spreadValues({
|
@@ -1540,6 +1542,9 @@ function MyDataTable(_a) {
|
|
1540
1542
|
enableEditing: renderRowActions ? true : false,
|
1541
1543
|
positionActionsColumn: "last",
|
1542
1544
|
enableColumnResizing: true,
|
1545
|
+
renderTopToolbarCustomActions: ({ table: table2 }) => {
|
1546
|
+
return /* @__PURE__ */ jsx26(Group8, { children: renderTopToolbarCustomActions == null ? void 0 : renderTopToolbarCustomActions({ table: table2 }) });
|
1547
|
+
},
|
1543
1548
|
layoutMode: "semantic",
|
1544
1549
|
displayColumnDefOptions: {
|
1545
1550
|
"mrt-row-actions": {
|
@@ -1982,7 +1987,7 @@ function MyButtonRouterBack(_a) {
|
|
1982
1987
|
import {
|
1983
1988
|
ActionIcon as ActionIcon10,
|
1984
1989
|
Button as Button10,
|
1985
|
-
Group as
|
1990
|
+
Group as Group9,
|
1986
1991
|
LoadingOverlay,
|
1987
1992
|
Modal as Modal10,
|
1988
1993
|
Paper as Paper3,
|
@@ -2045,7 +2050,7 @@ function MyButtonViewPDF({
|
|
2045
2050
|
opened: disc[0],
|
2046
2051
|
onClose: disc[1].close,
|
2047
2052
|
size: modalSize,
|
2048
|
-
title: /* @__PURE__ */ jsxs20(
|
2053
|
+
title: /* @__PURE__ */ jsxs20(Group9, { children: [
|
2049
2054
|
/* @__PURE__ */ jsx34(Text7, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
2050
2055
|
fullScreen[0] ? /* @__PURE__ */ jsx34(
|
2051
2056
|
ActionIcon10,
|
@@ -6535,10 +6540,10 @@ function MyCalendar() {
|
|
6535
6540
|
}
|
6536
6541
|
|
6537
6542
|
// src/components/CenterFull/MyCenterFull.tsx
|
6538
|
-
import { Center as Center3, Group as
|
6543
|
+
import { Center as Center3, Group as Group10 } from "@mantine/core";
|
6539
6544
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
6540
6545
|
function MyCenterFull({ children }) {
|
6541
|
-
return /* @__PURE__ */ jsx36(Center3, { w: "100%", children: /* @__PURE__ */ jsx36(
|
6546
|
+
return /* @__PURE__ */ jsx36(Center3, { w: "100%", children: /* @__PURE__ */ jsx36(Group10, { children }) });
|
6542
6547
|
}
|
6543
6548
|
|
6544
6549
|
// src/components/Checkbox/MyCheckbox.tsx
|
@@ -6591,7 +6596,7 @@ function AQCard({
|
|
6591
6596
|
}
|
6592
6597
|
|
6593
6598
|
// src/components/DataDisplay/CardInformation/MyCardInformation.tsx
|
6594
|
-
import { Box as Box2, Flex as Flex3, Group as
|
6599
|
+
import { Box as Box2, Flex as Flex3, Group as Group11, Paper as Paper5, Text as Text10 } from "@mantine/core";
|
6595
6600
|
import { IconArrowDownRight, IconArrowUpRight } from "@tabler/icons-react";
|
6596
6601
|
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
6597
6602
|
function MyCardInformation({
|
@@ -6610,7 +6615,7 @@ function MyCardInformation({
|
|
6610
6615
|
p: "md",
|
6611
6616
|
radius: "md",
|
6612
6617
|
children: [
|
6613
|
-
/* @__PURE__ */ jsxs23(
|
6618
|
+
/* @__PURE__ */ jsxs23(Group11, { justify: "space-between", children: [
|
6614
6619
|
/* @__PURE__ */ jsxs23(Flex3, { direction: "column", children: [
|
6615
6620
|
/* @__PURE__ */ jsx40(
|
6616
6621
|
Text10,
|
@@ -6632,7 +6637,7 @@ function MyCardInformation({
|
|
6632
6637
|
/* @__PURE__ */ jsx40(Box2, { children: icon })
|
6633
6638
|
] }),
|
6634
6639
|
/* @__PURE__ */ jsxs23(
|
6635
|
-
|
6640
|
+
Group11,
|
6636
6641
|
{
|
6637
6642
|
mt: "5",
|
6638
6643
|
align: "flex-end",
|
@@ -6665,7 +6670,7 @@ function MyCardInformation({
|
|
6665
6670
|
]
|
6666
6671
|
}
|
6667
6672
|
),
|
6668
|
-
/* @__PURE__ */ jsxs23(
|
6673
|
+
/* @__PURE__ */ jsxs23(Group11, { justify: "space-between", children: [
|
6669
6674
|
/* @__PURE__ */ jsx40(Text10, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6670
6675
|
extraControl
|
6671
6676
|
] })
|
@@ -6676,10 +6681,10 @@ function MyCardInformation({
|
|
6676
6681
|
}
|
6677
6682
|
|
6678
6683
|
// src/components/DataDisplay/IconText/MyIconText.tsx
|
6679
|
-
import { Group as
|
6684
|
+
import { Group as Group12, Text as Text11 } from "@mantine/core";
|
6680
6685
|
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
6681
6686
|
function MyIconText({ icon: Icon, text }) {
|
6682
|
-
return /* @__PURE__ */ jsxs24(
|
6687
|
+
return /* @__PURE__ */ jsxs24(Group12, { wrap: "nowrap", gap: 10, mt: 3, children: [
|
6683
6688
|
Icon && /* @__PURE__ */ jsx41(Icon, { stroke: 1.5, size: 16 }),
|
6684
6689
|
/* @__PURE__ */ jsx41(Text11, { fz: "lg", c: "dimmed", children: text })
|
6685
6690
|
] });
|
@@ -6694,7 +6699,7 @@ function MyNumberFormatter(_a) {
|
|
6694
6699
|
}
|
6695
6700
|
|
6696
6701
|
// src/components/DataDisplay/StatCard/AQStatCard1.tsx
|
6697
|
-
import { Box as Box3, Button as Button12, Flex as Flex4, Group as
|
6702
|
+
import { Box as Box3, Button as Button12, Flex as Flex4, Group as Group13, Paper as Paper6, Text as Text12 } from "@mantine/core";
|
6698
6703
|
import { IconArrowDownRight as IconArrowDownRight2, IconArrowUpRight as IconArrowUpRight2 } from "@tabler/icons-react";
|
6699
6704
|
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
6700
6705
|
function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
@@ -6705,7 +6710,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6705
6710
|
p: "md",
|
6706
6711
|
radius: "md",
|
6707
6712
|
children: [
|
6708
|
-
/* @__PURE__ */ jsxs25(
|
6713
|
+
/* @__PURE__ */ jsxs25(Group13, { justify: "space-between", children: [
|
6709
6714
|
/* @__PURE__ */ jsxs25(Flex4, { direction: "column", children: [
|
6710
6715
|
/* @__PURE__ */ jsx43(
|
6711
6716
|
Text12,
|
@@ -6727,7 +6732,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6727
6732
|
/* @__PURE__ */ jsx43(Box3, { children: icons })
|
6728
6733
|
] }),
|
6729
6734
|
/* @__PURE__ */ jsxs25(
|
6730
|
-
|
6735
|
+
Group13,
|
6731
6736
|
{
|
6732
6737
|
mt: "5",
|
6733
6738
|
align: "flex-end",
|
@@ -6760,7 +6765,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6760
6765
|
]
|
6761
6766
|
}
|
6762
6767
|
),
|
6763
|
-
/* @__PURE__ */ jsxs25(
|
6768
|
+
/* @__PURE__ */ jsxs25(Group13, { justify: "space-between", children: [
|
6764
6769
|
/* @__PURE__ */ jsx43(Text12, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6765
6770
|
/* @__PURE__ */ jsx43(
|
6766
6771
|
Button12,
|
@@ -6778,7 +6783,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6778
6783
|
}
|
6779
6784
|
|
6780
6785
|
// src/components/DataDisplay/StatCard/AQStatCard2.tsx
|
6781
|
-
import { Box as Box4, Group as
|
6786
|
+
import { Box as Box4, Group as Group14, Paper as Paper7, Text as Text13 } from "@mantine/core";
|
6782
6787
|
import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
6783
6788
|
function AQStatCard2({
|
6784
6789
|
title,
|
@@ -6799,7 +6804,7 @@ function AQStatCard2({
|
|
6799
6804
|
onMouseEnter: (e4) => e4.currentTarget.style.transform = "translateY(-4px)",
|
6800
6805
|
onMouseLeave: (e4) => e4.currentTarget.style.transform = "translateY(0)",
|
6801
6806
|
children: [
|
6802
|
-
/* @__PURE__ */ jsxs26(
|
6807
|
+
/* @__PURE__ */ jsxs26(Group14, { justify: "space-between", align: "flex-start", children: [
|
6803
6808
|
/* @__PURE__ */ jsxs26(Box4, { children: [
|
6804
6809
|
/* @__PURE__ */ jsx44(MyFlexRow, { gap: 6, align: "end", children: /* @__PURE__ */ jsx44(
|
6805
6810
|
Text13,
|
@@ -6819,7 +6824,7 @@ function AQStatCard2({
|
|
6819
6824
|
] }),
|
6820
6825
|
/* @__PURE__ */ jsx44(Box4, { children: icons })
|
6821
6826
|
] }),
|
6822
|
-
/* @__PURE__ */ jsx44(
|
6827
|
+
/* @__PURE__ */ jsx44(Group14, { align: "flex-end", gap: "xs", children: /* @__PURE__ */ jsx44(
|
6823
6828
|
Text13,
|
6824
6829
|
{
|
6825
6830
|
fz: 35,
|
@@ -6921,7 +6926,7 @@ function MyDateInput(_a) {
|
|
6921
6926
|
// src/components/Inputs/Fieldset/MyFieldset.tsx
|
6922
6927
|
import {
|
6923
6928
|
Fieldset as Fieldset4,
|
6924
|
-
Group as
|
6929
|
+
Group as Group15,
|
6925
6930
|
Text as Text14,
|
6926
6931
|
useMantineColorScheme as useMantineColorScheme2
|
6927
6932
|
} from "@mantine/core";
|
@@ -6957,7 +6962,7 @@ function MyFieldset(_a) {
|
|
6957
6962
|
return /* @__PURE__ */ jsx46(
|
6958
6963
|
Fieldset4,
|
6959
6964
|
__spreadProps(__spreadValues({
|
6960
|
-
legend: customLegend != null ? customLegend : /* @__PURE__ */ jsx46(
|
6965
|
+
legend: customLegend != null ? customLegend : /* @__PURE__ */ jsx46(Group15, { gap: "xs", children: /* @__PURE__ */ jsxs27(Text14, { fw: 600, children: [
|
6961
6966
|
" ",
|
6962
6967
|
title,
|
6963
6968
|
" "
|
@@ -7218,7 +7223,7 @@ import {
|
|
7218
7223
|
AppShell,
|
7219
7224
|
Badge as Badge3,
|
7220
7225
|
Divider as Divider2,
|
7221
|
-
Group as
|
7226
|
+
Group as Group16,
|
7222
7227
|
Image as Image3,
|
7223
7228
|
NavLink,
|
7224
7229
|
ScrollArea as ScrollArea3,
|
@@ -7442,8 +7447,8 @@ function BasicAppShell({ children, menu, extraTopRight, title, logoutRedirect })
|
|
7442
7447
|
},
|
7443
7448
|
padding: "md",
|
7444
7449
|
children: [
|
7445
|
-
/* @__PURE__ */ jsx52(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs29(
|
7446
|
-
/* @__PURE__ */ jsxs29(
|
7450
|
+
/* @__PURE__ */ jsx52(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs29(Group16, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
|
7451
|
+
/* @__PURE__ */ jsxs29(Group16, { h: "100%", children: [
|
7447
7452
|
/* @__PURE__ */ jsx52(
|
7448
7453
|
Tooltip5,
|
7449
7454
|
{
|
@@ -7472,7 +7477,7 @@ function BasicAppShell({ children, menu, extraTopRight, title, logoutRedirect })
|
|
7472
7477
|
) })
|
7473
7478
|
] }),
|
7474
7479
|
/* @__PURE__ */ jsx52(
|
7475
|
-
|
7480
|
+
Group16,
|
7476
7481
|
{
|
7477
7482
|
style: {
|
7478
7483
|
position: "absolute",
|
@@ -7482,13 +7487,13 @@ function BasicAppShell({ children, menu, extraTopRight, title, logoutRedirect })
|
|
7482
7487
|
children: /* @__PURE__ */ jsx52(Text15, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
|
7483
7488
|
}
|
7484
7489
|
),
|
7485
|
-
/* @__PURE__ */ jsxs29(
|
7490
|
+
/* @__PURE__ */ jsxs29(Group16, { children: [
|
7486
7491
|
extraTopRight,
|
7487
7492
|
/* @__PURE__ */ jsx52(MySwitchTheme, {})
|
7488
7493
|
] })
|
7489
7494
|
] }) : (
|
7490
7495
|
// For mobile screens - simplified layout
|
7491
|
-
/* @__PURE__ */ jsxs29(
|
7496
|
+
/* @__PURE__ */ jsxs29(Group16, { h: "100%", px: "md", justify: "space-between", children: [
|
7492
7497
|
/* @__PURE__ */ jsx52(
|
7493
7498
|
ActionIcon11,
|
7494
7499
|
{
|
@@ -7500,7 +7505,7 @@ function BasicAppShell({ children, menu, extraTopRight, title, logoutRedirect })
|
|
7500
7505
|
}
|
7501
7506
|
),
|
7502
7507
|
/* @__PURE__ */ jsx52(Text15, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
|
7503
|
-
/* @__PURE__ */ jsxs29(
|
7508
|
+
/* @__PURE__ */ jsxs29(Group16, { children: [
|
7504
7509
|
extraTopRight,
|
7505
7510
|
/* @__PURE__ */ jsx52(MySwitchTheme, {})
|
7506
7511
|
] })
|
@@ -7605,7 +7610,7 @@ import {
|
|
7605
7610
|
Container as Container2,
|
7606
7611
|
Divider as Divider3,
|
7607
7612
|
Drawer,
|
7608
|
-
Group as
|
7613
|
+
Group as Group17,
|
7609
7614
|
Image as Image4,
|
7610
7615
|
ScrollArea as ScrollArea4,
|
7611
7616
|
Text as Text16,
|
@@ -7678,7 +7683,7 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7678
7683
|
const [linksOpened, { toggle: toggleLinks }] = useDisclosure11(false);
|
7679
7684
|
const HeaderMegaMenuStore = useHeaderMegaMenuStore();
|
7680
7685
|
const theme = useMantineTheme();
|
7681
|
-
const links = mockdata.map((item) => /* @__PURE__ */ jsx54(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs30(
|
7686
|
+
const links = mockdata.map((item) => /* @__PURE__ */ jsx54(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs30(Group17, { wrap: "nowrap", align: "flex-start", children: [
|
7682
7687
|
/* @__PURE__ */ jsx54(ThemeIcon, { size: 34, variant: "default", radius: "md", children: /* @__PURE__ */ jsx54(item.icon, { size: 22, color: theme.colors.blue[6] }) }),
|
7683
7688
|
/* @__PURE__ */ jsxs30("div", { children: [
|
7684
7689
|
/* @__PURE__ */ jsx54(Text16, { size: "sm", fw: 500, children: item.title }),
|
@@ -7686,12 +7691,12 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7686
7691
|
] })
|
7687
7692
|
] }) }, item.title));
|
7688
7693
|
return /* @__PURE__ */ jsxs30(Box5, { children: [
|
7689
|
-
/* @__PURE__ */ jsx54("header", { className: css_default.header, children: /* @__PURE__ */ jsxs30(
|
7690
|
-
/* @__PURE__ */ jsxs30(
|
7694
|
+
/* @__PURE__ */ jsx54("header", { className: css_default.header, children: /* @__PURE__ */ jsxs30(Group17, { justify: "space-between", h: "100%", children: [
|
7695
|
+
/* @__PURE__ */ jsxs30(Group17, { children: [
|
7691
7696
|
/* @__PURE__ */ jsx54(Image4, { src: "/imgs/0/IMG0LogoAQTech.png", h: 30, alt: "", w: "auto" }),
|
7692
|
-
/* @__PURE__ */ jsx54(
|
7697
|
+
/* @__PURE__ */ jsx54(Group17, { 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)) })
|
7693
7698
|
] }),
|
7694
|
-
/* @__PURE__ */ jsxs30(
|
7699
|
+
/* @__PURE__ */ jsxs30(Group17, { children: [
|
7695
7700
|
/* @__PURE__ */ jsx54(TextInput3, { placeholder: "T\xECm ki\u1EBFm", leftSection: /* @__PURE__ */ jsx54(IconSearch2, {}), radius: "xl", w: "250px" }),
|
7696
7701
|
/* @__PURE__ */ jsx54(MySwitchTheme, {})
|
7697
7702
|
] }),
|
@@ -7719,7 +7724,7 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7719
7724
|
}
|
7720
7725
|
|
7721
7726
|
// src/components/Layouts/PageContent/MyPageContent.tsx
|
7722
|
-
import { Badge as Badge4, Breadcrumbs, Container as Container3, Divider as Divider4, Group as
|
7727
|
+
import { Badge as Badge4, Breadcrumbs, Container as Container3, Divider as Divider4, Group as Group18, Text as Text17, Title } from "@mantine/core";
|
7723
7728
|
import { jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
|
7724
7729
|
var getStatusColor = (status) => {
|
7725
7730
|
switch (status) {
|
@@ -7731,8 +7736,8 @@ var getStatusColor = (status) => {
|
|
7731
7736
|
};
|
7732
7737
|
function PageTitle({ title, status, note }) {
|
7733
7738
|
const color = getStatusColor(status);
|
7734
|
-
return /* @__PURE__ */ jsx55(
|
7735
|
-
/* @__PURE__ */ jsxs31(
|
7739
|
+
return /* @__PURE__ */ jsx55(Group18, { children: /* @__PURE__ */ jsxs31(MyFlexColumn, { gap: 0, children: [
|
7740
|
+
/* @__PURE__ */ jsxs31(Group18, { align: "center", children: [
|
7736
7741
|
/* @__PURE__ */ jsx55(Title, { order: 3, children: title }),
|
7737
7742
|
status && /* @__PURE__ */ jsx55(
|
7738
7743
|
Badge4,
|
@@ -7759,8 +7764,8 @@ function MyPageContent({
|
|
7759
7764
|
const basicAppShellStore = useS_BasicAppShell();
|
7760
7765
|
const finalTitle = title || basicAppShellStore.state.title;
|
7761
7766
|
return /* @__PURE__ */ jsxs31(Container3, { p: 0, fluid: true, children: [
|
7762
|
-
/* @__PURE__ */ jsxs31(
|
7763
|
-
/* @__PURE__ */ jsxs31(
|
7767
|
+
/* @__PURE__ */ jsxs31(Group18, { justify: "space-between", children: [
|
7768
|
+
/* @__PURE__ */ jsxs31(Group18, { children: [
|
7764
7769
|
/* @__PURE__ */ jsx55(MyButtonRouterBack, {}),
|
7765
7770
|
/* @__PURE__ */ jsx55(
|
7766
7771
|
PageTitle,
|
@@ -7772,7 +7777,7 @@ function MyPageContent({
|
|
7772
7777
|
),
|
7773
7778
|
leftTopBar
|
7774
7779
|
] }),
|
7775
|
-
/* @__PURE__ */ jsxs31(
|
7780
|
+
/* @__PURE__ */ jsxs31(Group18, { p: "md", children: [
|
7776
7781
|
rightTopBar,
|
7777
7782
|
/* @__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)) })
|
7778
7783
|
] })
|
@@ -7799,7 +7804,7 @@ function MyTab(_a) {
|
|
7799
7804
|
}
|
7800
7805
|
|
7801
7806
|
// src/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx
|
7802
|
-
import { ActionIcon as ActionIcon12, Button as Button15, Fieldset as Fieldset5, Group as
|
7807
|
+
import { ActionIcon as ActionIcon12, Button as Button15, Fieldset as Fieldset5, Group as Group19, Modal as Modal11 } from "@mantine/core";
|
7803
7808
|
import { useDisclosure as useDisclosure12 } from "@mantine/hooks";
|
7804
7809
|
import { IconX as IconX2 } from "@tabler/icons-react";
|
7805
7810
|
import { jsx as jsx57, jsxs as jsxs33 } from "react/jsx-runtime";
|
@@ -7812,7 +7817,7 @@ function MyDataTableSelect(_a) {
|
|
7812
7817
|
MyDataTable,
|
7813
7818
|
__spreadValues({
|
7814
7819
|
renderTopToolbarCustomActions: ({ table }) => {
|
7815
|
-
return /* @__PURE__ */ jsxs33(
|
7820
|
+
return /* @__PURE__ */ jsxs33(Group19, { children: [
|
7816
7821
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table }),
|
7817
7822
|
/* @__PURE__ */ jsx57(Button15, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
|
7818
7823
|
] });
|
@@ -2,7 +2,7 @@ import {
|
|
2
2
|
MyDataTable,
|
3
3
|
MyFlexColumn,
|
4
4
|
MyFlexRow
|
5
|
-
} from "./chunk-
|
5
|
+
} from "./chunk-JYZUJKAM.mjs";
|
6
6
|
import {
|
7
7
|
const_object_colors
|
8
8
|
} from "./chunk-OMJJAHOC.mjs";
|
@@ -23,7 +23,7 @@ import {
|
|
23
23
|
} from "./chunk-FWCSY2DS.mjs";
|
24
24
|
|
25
25
|
// src/core/button/MyActionIcon.tsx
|
26
|
-
import { ActionIcon } from "@mantine/core";
|
26
|
+
import { ActionIcon, useMantineColorScheme } from "@mantine/core";
|
27
27
|
import {
|
28
28
|
IconDeviceFloppy,
|
29
29
|
IconEdit,
|
@@ -35,70 +35,71 @@ import {
|
|
35
35
|
IconX
|
36
36
|
} from "@tabler/icons-react";
|
37
37
|
import { jsx } from "react/jsx-runtime";
|
38
|
-
var
|
38
|
+
var getActionConfig = (colorScheme) => ({
|
39
39
|
default: {},
|
40
40
|
create: {
|
41
41
|
color: "indigo",
|
42
42
|
type: "submit",
|
43
|
-
|
43
|
+
children: /* @__PURE__ */ jsx(IconPlus, {})
|
44
44
|
},
|
45
45
|
createMultiple: {
|
46
46
|
color: "green",
|
47
47
|
type: "submit",
|
48
|
-
|
48
|
+
children: /* @__PURE__ */ jsx(IconPlus, {})
|
49
49
|
},
|
50
50
|
delete: {
|
51
51
|
color: "red",
|
52
|
-
|
52
|
+
children: /* @__PURE__ */ jsx(IconTrash, {})
|
53
53
|
},
|
54
54
|
update: {
|
55
55
|
color: "yellow",
|
56
56
|
type: "submit",
|
57
|
-
|
57
|
+
children: /* @__PURE__ */ jsx(IconEdit, {})
|
58
58
|
},
|
59
59
|
save: {
|
60
60
|
color: "blue",
|
61
61
|
type: "submit",
|
62
|
-
|
62
|
+
children: /* @__PURE__ */ jsx(IconDeviceFloppy, {})
|
63
63
|
},
|
64
64
|
import: {
|
65
65
|
color: "green.8",
|
66
|
-
|
66
|
+
children: /* @__PURE__ */ jsx(IconFileImport, {})
|
67
67
|
},
|
68
68
|
print: {
|
69
69
|
color: "orange.7",
|
70
|
-
|
70
|
+
children: /* @__PURE__ */ jsx(IconPrinter, {})
|
71
71
|
},
|
72
72
|
export: {
|
73
73
|
color: "green.8",
|
74
|
-
|
74
|
+
children: /* @__PURE__ */ jsx(IconFileExport, {})
|
75
75
|
},
|
76
76
|
cancel: {
|
77
77
|
color: "gray",
|
78
|
-
|
78
|
+
children: /* @__PURE__ */ jsx(IconX, {})
|
79
79
|
},
|
80
80
|
select: {},
|
81
81
|
check: {}
|
82
|
-
};
|
82
|
+
});
|
83
83
|
function MyActionIcon(_a) {
|
84
84
|
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
85
|
+
const { colorScheme } = useMantineColorScheme();
|
85
86
|
if (!actionType) {
|
86
87
|
return /* @__PURE__ */ jsx(ActionIcon, __spreadProps(__spreadValues({}, rest), { children }));
|
87
88
|
}
|
88
|
-
const config =
|
89
|
+
const config = actionType ? getActionConfig(colorScheme)[actionType] : {};
|
89
90
|
return /* @__PURE__ */ jsx(
|
90
91
|
ActionIcon,
|
91
92
|
__spreadProps(__spreadValues({
|
92
93
|
color: config.color,
|
93
94
|
type: config.type
|
94
95
|
}, rest), {
|
95
|
-
children: config.
|
96
|
+
children: config.children
|
96
97
|
})
|
97
98
|
);
|
98
99
|
}
|
99
100
|
|
100
101
|
// src/core/button/MyButton.tsx
|
101
|
-
import { Button, useMantineColorScheme } from "@mantine/core";
|
102
|
+
import { Button, useMantineColorScheme as useMantineColorScheme2 } from "@mantine/core";
|
102
103
|
import {
|
103
104
|
IconDeviceFloppy as IconDeviceFloppy2,
|
104
105
|
IconDownload,
|
@@ -110,80 +111,80 @@ import {
|
|
110
111
|
IconX as IconX2
|
111
112
|
} from "@tabler/icons-react";
|
112
113
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
114
|
+
var getActionConfig2 = (colorScheme) => ({
|
115
|
+
default: {
|
116
|
+
children: ""
|
117
|
+
},
|
118
|
+
create: {
|
119
|
+
color: colorScheme == "light" ? "blue" : "blue.3",
|
120
|
+
type: "submit",
|
121
|
+
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
122
|
+
children: "Th\xEAm"
|
123
|
+
},
|
124
|
+
createMultiple: {
|
125
|
+
color: "green",
|
126
|
+
type: "submit",
|
127
|
+
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
128
|
+
children: "Th\xEAm danh s\xE1ch"
|
129
|
+
},
|
130
|
+
delete: {
|
131
|
+
color: "red",
|
132
|
+
leftSection: /* @__PURE__ */ jsx2(IconTrash2, {}),
|
133
|
+
children: "X\xF3a"
|
134
|
+
},
|
135
|
+
update: {
|
136
|
+
color: "yellow",
|
137
|
+
type: "submit",
|
138
|
+
leftSection: /* @__PURE__ */ jsx2(IconEdit2, {}),
|
139
|
+
children: "Ch\u1EC9nh s\u1EEDa"
|
140
|
+
},
|
141
|
+
save: {
|
142
|
+
color: "blue",
|
143
|
+
type: "submit",
|
144
|
+
leftSection: /* @__PURE__ */ jsx2(IconDeviceFloppy2, {}),
|
145
|
+
children: "L\u01B0u"
|
146
|
+
},
|
147
|
+
import: {
|
148
|
+
color: colorScheme == "light" ? "green" : "green.3",
|
149
|
+
leftSection: /* @__PURE__ */ jsx2(IconUpload, {}),
|
150
|
+
children: "Import",
|
151
|
+
variant: "light"
|
152
|
+
},
|
153
|
+
export: {
|
154
|
+
color: colorScheme == "light" ? "violet" : "violet.3",
|
155
|
+
leftSection: /* @__PURE__ */ jsx2(IconDownload, {}),
|
156
|
+
children: "Export",
|
157
|
+
variant: "light"
|
158
|
+
},
|
159
|
+
print: {
|
160
|
+
color: "orange.7",
|
161
|
+
leftSection: /* @__PURE__ */ jsx2(IconPrinter2, {}),
|
162
|
+
children: "In"
|
163
|
+
},
|
164
|
+
cancel: {
|
165
|
+
color: "gray",
|
166
|
+
leftSection: /* @__PURE__ */ jsx2(IconX2, {}),
|
167
|
+
children: "H\u1EE7y thao t\xE1c"
|
168
|
+
},
|
169
|
+
select: {
|
170
|
+
children: "Ch\u1ECDn"
|
171
|
+
},
|
172
|
+
check: {
|
173
|
+
children: "Ch\u1ECDn"
|
174
|
+
}
|
175
|
+
});
|
113
176
|
function MyButton(_a) {
|
114
177
|
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
115
|
-
const { colorScheme } =
|
116
|
-
const actionConfig2 = {
|
117
|
-
default: {
|
118
|
-
children: ""
|
119
|
-
},
|
120
|
-
create: {
|
121
|
-
color: colorScheme == "light" ? "blue" : "blue.3",
|
122
|
-
type: "submit",
|
123
|
-
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
124
|
-
children: "Th\xEAm"
|
125
|
-
},
|
126
|
-
createMultiple: {
|
127
|
-
color: "green",
|
128
|
-
type: "submit",
|
129
|
-
leftSection: /* @__PURE__ */ jsx2(IconPlus2, {}),
|
130
|
-
children: "Th\xEAm danh s\xE1ch"
|
131
|
-
},
|
132
|
-
delete: {
|
133
|
-
color: "red",
|
134
|
-
leftSection: /* @__PURE__ */ jsx2(IconTrash2, {}),
|
135
|
-
children: "X\xF3a"
|
136
|
-
},
|
137
|
-
update: {
|
138
|
-
color: "yellow",
|
139
|
-
type: "submit",
|
140
|
-
leftSection: /* @__PURE__ */ jsx2(IconEdit2, {}),
|
141
|
-
children: "Ch\u1EC9nh s\u1EEDa"
|
142
|
-
},
|
143
|
-
save: {
|
144
|
-
color: "blue",
|
145
|
-
type: "submit",
|
146
|
-
leftSection: /* @__PURE__ */ jsx2(IconDeviceFloppy2, {}),
|
147
|
-
children: "L\u01B0u"
|
148
|
-
},
|
149
|
-
import: {
|
150
|
-
color: colorScheme == "light" ? "green" : "green.3",
|
151
|
-
leftSection: /* @__PURE__ */ jsx2(IconUpload, {}),
|
152
|
-
children: "Import",
|
153
|
-
variant: "light"
|
154
|
-
},
|
155
|
-
export: {
|
156
|
-
color: colorScheme == "light" ? "violet" : "violet.3",
|
157
|
-
leftSection: /* @__PURE__ */ jsx2(IconDownload, {}),
|
158
|
-
children: "Export",
|
159
|
-
variant: "light"
|
160
|
-
},
|
161
|
-
print: {
|
162
|
-
color: "orange.7",
|
163
|
-
leftSection: /* @__PURE__ */ jsx2(IconPrinter2, {}),
|
164
|
-
children: "In"
|
165
|
-
},
|
166
|
-
cancel: {
|
167
|
-
color: "gray",
|
168
|
-
leftSection: /* @__PURE__ */ jsx2(IconX2, {}),
|
169
|
-
children: "H\u1EE7y thao t\xE1c"
|
170
|
-
},
|
171
|
-
select: {
|
172
|
-
children: "Ch\u1ECDn"
|
173
|
-
},
|
174
|
-
check: {
|
175
|
-
children: "Ch\u1ECDn"
|
176
|
-
}
|
177
|
-
};
|
178
|
+
const { colorScheme } = useMantineColorScheme2();
|
178
179
|
if (!actionType) {
|
179
180
|
return /* @__PURE__ */ jsx2(Button, __spreadProps(__spreadValues({}, rest), { children }));
|
180
181
|
}
|
181
|
-
const config =
|
182
|
+
const config = actionType ? getActionConfig2(colorScheme)[actionType] : {};
|
182
183
|
return /* @__PURE__ */ jsx2(Button, __spreadValues(__spreadValues({}, config), rest));
|
183
184
|
}
|
184
185
|
|
185
186
|
// src/core/button/MyButtonCreateUpdate.tsx
|
186
|
-
import { ActionIcon as ActionIcon2, Button as Button2, Modal, ScrollArea, Space, useMantineColorScheme as
|
187
|
+
import { ActionIcon as ActionIcon2, Button as Button2, Modal, ScrollArea, Space, useMantineColorScheme as useMantineColorScheme3 } from "@mantine/core";
|
187
188
|
import { useDisclosure } from "@mantine/hooks";
|
188
189
|
import { IconEdit as IconEdit3, IconPlus as IconPlus3 } from "@tabler/icons-react";
|
189
190
|
import { useQueryClient } from "@tanstack/react-query";
|
@@ -215,7 +216,7 @@ function MyButtonCreateUpdate({
|
|
215
216
|
isUpdate = false,
|
216
217
|
scrollAreaAutosizeProps
|
217
218
|
}) {
|
218
|
-
const theme =
|
219
|
+
const theme = useMantineColorScheme3();
|
219
220
|
const defaultDisclosure = useDisclosure();
|
220
221
|
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
221
222
|
const queryClient = useQueryClient();
|
@@ -337,7 +338,17 @@ function MyButtonModal({
|
|
337
338
|
isActionIcon = false
|
338
339
|
}) {
|
339
340
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
340
|
-
isActionIcon ? /* @__PURE__ */ jsx6(
|
341
|
+
isActionIcon ? /* @__PURE__ */ jsx6(
|
342
|
+
MyActionIcon,
|
343
|
+
__spreadValues({
|
344
|
+
onClick: disclosure == null ? void 0 : disclosure[1].open
|
345
|
+
}, actionIconProps)
|
346
|
+
) : /* @__PURE__ */ jsx6(
|
347
|
+
MyButton,
|
348
|
+
__spreadValues({
|
349
|
+
onClick: disclosure == null ? void 0 : disclosure[1].open
|
350
|
+
}, buttonProps)
|
351
|
+
),
|
341
352
|
/* @__PURE__ */ jsx6(
|
342
353
|
Modal2,
|
343
354
|
__spreadProps(__spreadValues({
|
@@ -354,11 +365,30 @@ function MyButtonModal({
|
|
354
365
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
355
366
|
|
356
367
|
// src/core/button/MyButtonModalCreateUpdate.tsx
|
368
|
+
import { Stack } from "@mantine/core";
|
357
369
|
import { useDisclosure as useDisclosure3 } from "@mantine/hooks";
|
358
370
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
359
|
-
function MyButtonModalCreateUpdate(
|
371
|
+
function MyButtonModalCreateUpdate(_a) {
|
372
|
+
var _b = _a, {
|
373
|
+
children,
|
374
|
+
isUpdate
|
375
|
+
} = _b, rest = __objRest(_b, [
|
376
|
+
"children",
|
377
|
+
"isUpdate"
|
378
|
+
]);
|
360
379
|
const disc = useDisclosure3();
|
361
|
-
return /* @__PURE__ */ jsx8(
|
380
|
+
return /* @__PURE__ */ jsx8(
|
381
|
+
MyButtonModal,
|
382
|
+
__spreadProps(__spreadValues({
|
383
|
+
disclosure: disc,
|
384
|
+
modalProps: { title: "Chi ti\u1EBFt d\u1EEF li\u1EC7u" },
|
385
|
+
buttonProps: { actionType: "create" },
|
386
|
+
actionIconProps: { actionType: "update" },
|
387
|
+
isActionIcon: isUpdate
|
388
|
+
}, rest), {
|
389
|
+
children: /* @__PURE__ */ jsx8("form", { children: /* @__PURE__ */ jsx8(Stack, { children }) })
|
390
|
+
})
|
391
|
+
);
|
362
392
|
}
|
363
393
|
|
364
394
|
// src/core/button/MyButtonPrintPDF.tsx
|
@@ -470,10 +500,10 @@ function MyFlexIconTitle(props) {
|
|
470
500
|
}
|
471
501
|
|
472
502
|
// src/core/dataDisplay/MyInfoBox.tsx
|
473
|
-
import { Group, Paper, Stack, Text as Text2 } from "@mantine/core";
|
503
|
+
import { Group, Paper, Stack as Stack2, Text as Text2 } from "@mantine/core";
|
474
504
|
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
475
505
|
function MyInfoBox({ title, data, paperProps }) {
|
476
|
-
return /* @__PURE__ */ jsx13(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs6(
|
506
|
+
return /* @__PURE__ */ jsx13(Paper, __spreadProps(__spreadValues({ withBorder: true, shadow: "xs", radius: "md", p: "md", bg: const_object_colors.mantineBackgroundBlueLight }, paperProps), { children: /* @__PURE__ */ jsxs6(Stack2, { children: [
|
477
507
|
title && /* @__PURE__ */ jsx13(Text2, { fw: 600, size: "sm", children: title }),
|
478
508
|
data.map((item, index) => /* @__PURE__ */ jsxs6(Group, { justify: "space-between", children: [
|
479
509
|
/* @__PURE__ */ jsx13(Text2, { size: "sm", fw: 500, c: "dimmed", children: item.label }),
|
@@ -314,7 +314,7 @@ interface MyDataTableProps<TData extends MRT_RowData> extends MRT_TableOptions<T
|
|
314
314
|
idSelectionOne?: string;
|
315
315
|
setIdSelectionOne?: (value: string) => void;
|
316
316
|
}
|
317
|
-
declare function MyDataTable<TData extends MRT_RowData>({ rowActionSize, columns, data, setSelectedRow, isError, isLoading, pagination, idSelectionOne, setIdSelectionOne, ...rest }: MyDataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
317
|
+
declare function MyDataTable<TData extends MRT_RowData>({ rowActionSize, columns, data, setSelectedRow, isError, isLoading, pagination, idSelectionOne, setIdSelectionOne, renderTopToolbarCustomActions, ...rest }: MyDataTableProps<TData>): react_jsx_runtime.JSX.Element;
|
318
318
|
|
319
319
|
interface MyIconTextProps {
|
320
320
|
icon?: React.ElementType;
|
@@ -67,7 +67,7 @@ import {
|
|
67
67
|
useS_BasicAppShell,
|
68
68
|
useS_ButtonImport,
|
69
69
|
utils_layout_getItemsWithoutLinks
|
70
|
-
} from "../chunk-
|
70
|
+
} from "../chunk-JYZUJKAM.mjs";
|
71
71
|
import "../chunk-U62R2QKJ.mjs";
|
72
72
|
import "../chunk-5U2JSHSJ.mjs";
|
73
73
|
import "../chunk-OMJJAHOC.mjs";
|
package/dist/core/index.d.mts
CHANGED
@@ -64,8 +64,12 @@ interface MyButtonModalProps {
|
|
64
64
|
declare function MyButtonModal({ disclosure, children, buttonProps, actionIconProps, modalProps, isActionIcon }: MyButtonModalProps): react_jsx_runtime.JSX.Element;
|
65
65
|
|
66
66
|
interface MyButtonModalCreateUpdateProps extends Omit<MyButtonModalProps, "disclosure"> {
|
67
|
+
isUpdate?: boolean;
|
68
|
+
onSubmit?: () => void;
|
69
|
+
successMessage?: string;
|
70
|
+
errorMessage?: string;
|
67
71
|
}
|
68
|
-
declare function MyButtonModalCreateUpdate(
|
72
|
+
declare function MyButtonModalCreateUpdate({ children, isUpdate, ...rest }: MyButtonModalCreateUpdateProps): react_jsx_runtime.JSX.Element;
|
69
73
|
|
70
74
|
type PageSizeOption = "portrait" | "landscape" | "A4-landscape";
|
71
75
|
interface MyButtonPrintPDFProps {
|
package/dist/core/index.mjs
CHANGED
@@ -18,8 +18,8 @@ import {
|
|
18
18
|
MyStatsCard,
|
19
19
|
MyTextInput,
|
20
20
|
MyWeeklySessionSchedulerPicker
|
21
|
-
} from "../chunk-
|
22
|
-
import "../chunk-
|
21
|
+
} from "../chunk-TXRNH2ZM.mjs";
|
22
|
+
import "../chunk-JYZUJKAM.mjs";
|
23
23
|
import "../chunk-U62R2QKJ.mjs";
|
24
24
|
import "../chunk-5U2JSHSJ.mjs";
|
25
25
|
import "../chunk-GFEMKKFH.mjs";
|
@@ -16,7 +16,7 @@ import {
|
|
16
16
|
MyButton as MyButton2,
|
17
17
|
MyDataTableSelectOne,
|
18
18
|
MyTextInput as MyTextInput2
|
19
|
-
} from "../chunk-
|
19
|
+
} from "../chunk-TXRNH2ZM.mjs";
|
20
20
|
import {
|
21
21
|
F_authenticate_Logout,
|
22
22
|
MyActionIconDelete,
|
@@ -42,7 +42,7 @@ import {
|
|
42
42
|
groupToTwoLevels,
|
43
43
|
useS_authenticate,
|
44
44
|
utils_layout_getItemsWithoutLinks
|
45
|
-
} from "../chunk-
|
45
|
+
} from "../chunk-JYZUJKAM.mjs";
|
46
46
|
import {
|
47
47
|
createGenericStore
|
48
48
|
} from "../chunk-U62R2QKJ.mjs";
|