aq-fe-framework 0.1.279 → 0.1.281
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-EIPT2DZW.mjs → chunk-6OYVVLKC.mjs} +853 -717
- package/dist/components/Layouts/HeaderMegaMenu/css.module.css +50 -50
- package/dist/components/index.d.mts +38 -19
- package/dist/components/index.mjs +9 -3
- package/dist/hooks/index.d.mts +1 -1
- package/dist/modules-features/authenticate/F_authenticate_Login/css.module.css +4 -4
- package/dist/modules-features/index.mjs +1 -55
- package/dist/providers/mantine.module.css +21 -21
- package/package.json +153 -153
@@ -130,8 +130,8 @@ import { ActionIcon } from "@mantine/core";
|
|
130
130
|
import { IconDeviceFloppy, IconEdit, IconPlus, IconTrash } from "@tabler/icons-react";
|
131
131
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
132
132
|
function MyActionIcon(_a) {
|
133
|
-
var _b = _a, { children, crudType
|
134
|
-
if (crudType
|
133
|
+
var _b = _a, { children, crudType } = _b, rest = __objRest(_b, ["children", "crudType"]);
|
134
|
+
if (!crudType) {
|
135
135
|
return /* @__PURE__ */ jsx4(ActionIcon, __spreadProps(__spreadValues({ color: "indigo" }, rest), { children }));
|
136
136
|
}
|
137
137
|
if (crudType == "create") {
|
@@ -235,8 +235,8 @@ import { Button as Button2 } from "@mantine/core";
|
|
235
235
|
import { IconDeviceFloppy as IconDeviceFloppy2, IconEdit as IconEdit2, IconFileExport, IconFileImport, IconPlus as IconPlus2, IconPrinter, IconTrash as IconTrash2, IconX } from "@tabler/icons-react";
|
236
236
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
237
237
|
function MyButton(_a) {
|
238
|
-
var _b = _a, { children, crudType
|
239
|
-
if (crudType
|
238
|
+
var _b = _a, { children, crudType } = _b, rest = __objRest(_b, ["children", "crudType"]);
|
239
|
+
if (!crudType) {
|
240
240
|
return /* @__PURE__ */ jsx8(Button2, __spreadProps(__spreadValues({ color: "indigo" }, rest), { children }));
|
241
241
|
}
|
242
242
|
if (crudType == "create") {
|
@@ -284,7 +284,7 @@ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs3 } from "react/jsx-run
|
|
284
284
|
function MyActionIconModal(_a) {
|
285
285
|
var _b = _a, {
|
286
286
|
fullScreen = false,
|
287
|
-
crudType
|
287
|
+
crudType,
|
288
288
|
disclosure,
|
289
289
|
modalSize,
|
290
290
|
title,
|
@@ -299,7 +299,7 @@ function MyActionIconModal(_a) {
|
|
299
299
|
"children",
|
300
300
|
"icon"
|
301
301
|
]);
|
302
|
-
if (crudType
|
302
|
+
if (!crudType) {
|
303
303
|
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
304
304
|
/* @__PURE__ */ jsx9(ActionIcon3, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, rest), { children: icon })),
|
305
305
|
/* @__PURE__ */ jsx9(
|
@@ -806,6 +806,168 @@ function MyAnchorViewPDF({ label, pdfLink }) {
|
|
806
806
|
] });
|
807
807
|
}
|
808
808
|
|
809
|
+
// src/components/Buttons/Button/CoreActionIcon.tsx
|
810
|
+
import { ActionIcon as ActionIcon9 } from "@mantine/core";
|
811
|
+
import {
|
812
|
+
IconDeviceFloppy as IconDeviceFloppy3,
|
813
|
+
IconEdit as IconEdit4,
|
814
|
+
IconFileExport as IconFileExport2,
|
815
|
+
IconFileImport as IconFileImport2,
|
816
|
+
IconPlus as IconPlus4,
|
817
|
+
IconPrinter as IconPrinter2,
|
818
|
+
IconTrash as IconTrash4,
|
819
|
+
IconX as IconX2
|
820
|
+
} from "@tabler/icons-react";
|
821
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
822
|
+
var actionConfig = {
|
823
|
+
create: {
|
824
|
+
color: "indigo",
|
825
|
+
type: "submit",
|
826
|
+
icon: /* @__PURE__ */ jsx18(IconPlus4, {})
|
827
|
+
},
|
828
|
+
createMultiple: {
|
829
|
+
color: "green",
|
830
|
+
type: "submit",
|
831
|
+
icon: /* @__PURE__ */ jsx18(IconPlus4, {})
|
832
|
+
},
|
833
|
+
delete: {
|
834
|
+
color: "red",
|
835
|
+
icon: /* @__PURE__ */ jsx18(IconTrash4, {})
|
836
|
+
},
|
837
|
+
update: {
|
838
|
+
color: "yellow",
|
839
|
+
type: "submit",
|
840
|
+
icon: /* @__PURE__ */ jsx18(IconEdit4, {})
|
841
|
+
},
|
842
|
+
save: {
|
843
|
+
color: "blue",
|
844
|
+
type: "submit",
|
845
|
+
icon: /* @__PURE__ */ jsx18(IconDeviceFloppy3, {})
|
846
|
+
},
|
847
|
+
import: {
|
848
|
+
color: "green.8",
|
849
|
+
icon: /* @__PURE__ */ jsx18(IconFileImport2, {})
|
850
|
+
},
|
851
|
+
print: {
|
852
|
+
color: "orange.7",
|
853
|
+
icon: /* @__PURE__ */ jsx18(IconPrinter2, {})
|
854
|
+
},
|
855
|
+
export: {
|
856
|
+
color: "green.8",
|
857
|
+
icon: /* @__PURE__ */ jsx18(IconFileExport2, {})
|
858
|
+
},
|
859
|
+
cancel: {
|
860
|
+
color: "gray",
|
861
|
+
icon: /* @__PURE__ */ jsx18(IconX2, {})
|
862
|
+
},
|
863
|
+
select: {},
|
864
|
+
check: {}
|
865
|
+
};
|
866
|
+
function CoreActionIcon(_a) {
|
867
|
+
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
868
|
+
if (!actionType) {
|
869
|
+
return /* @__PURE__ */ jsx18(ActionIcon9, __spreadProps(__spreadValues({}, rest), { children }));
|
870
|
+
}
|
871
|
+
const config2 = actionConfig[actionType];
|
872
|
+
return /* @__PURE__ */ jsx18(
|
873
|
+
ActionIcon9,
|
874
|
+
__spreadProps(__spreadValues({
|
875
|
+
color: config2.color,
|
876
|
+
type: config2.type
|
877
|
+
}, rest), {
|
878
|
+
children: config2.icon
|
879
|
+
})
|
880
|
+
);
|
881
|
+
}
|
882
|
+
|
883
|
+
// src/components/Buttons/Button/CoreButton.tsx
|
884
|
+
import { Button as Button4 } from "@mantine/core";
|
885
|
+
import {
|
886
|
+
IconDeviceFloppy as IconDeviceFloppy4,
|
887
|
+
IconEdit as IconEdit5,
|
888
|
+
IconFileExport as IconFileExport3,
|
889
|
+
IconFileImport as IconFileImport3,
|
890
|
+
IconPlus as IconPlus5,
|
891
|
+
IconPrinter as IconPrinter3,
|
892
|
+
IconTrash as IconTrash5,
|
893
|
+
IconX as IconX3
|
894
|
+
} from "@tabler/icons-react";
|
895
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
896
|
+
var actionConfig2 = {
|
897
|
+
create: {
|
898
|
+
color: "indigo",
|
899
|
+
type: "submit",
|
900
|
+
icon: /* @__PURE__ */ jsx19(IconPlus5, {}),
|
901
|
+
defaultText: "L\u01B0u"
|
902
|
+
},
|
903
|
+
createMultiple: {
|
904
|
+
color: "green",
|
905
|
+
type: "submit",
|
906
|
+
icon: /* @__PURE__ */ jsx19(IconPlus5, {}),
|
907
|
+
defaultText: "Th\xEAm danh s\xE1ch"
|
908
|
+
},
|
909
|
+
delete: {
|
910
|
+
color: "red",
|
911
|
+
icon: /* @__PURE__ */ jsx19(IconTrash5, {}),
|
912
|
+
defaultText: "X\xF3a"
|
913
|
+
},
|
914
|
+
update: {
|
915
|
+
color: "yellow",
|
916
|
+
type: "submit",
|
917
|
+
icon: /* @__PURE__ */ jsx19(IconEdit5, {}),
|
918
|
+
defaultText: "Ch\u1EC9nh s\u1EEDa"
|
919
|
+
},
|
920
|
+
save: {
|
921
|
+
color: "blue",
|
922
|
+
type: "submit",
|
923
|
+
icon: /* @__PURE__ */ jsx19(IconDeviceFloppy4, {}),
|
924
|
+
defaultText: "L\u01B0u"
|
925
|
+
},
|
926
|
+
import: {
|
927
|
+
color: "green.8",
|
928
|
+
icon: /* @__PURE__ */ jsx19(IconFileImport3, {}),
|
929
|
+
defaultText: "Import"
|
930
|
+
},
|
931
|
+
print: {
|
932
|
+
color: "orange.7",
|
933
|
+
icon: /* @__PURE__ */ jsx19(IconPrinter3, {}),
|
934
|
+
defaultText: "In"
|
935
|
+
},
|
936
|
+
export: {
|
937
|
+
color: "green.8",
|
938
|
+
icon: /* @__PURE__ */ jsx19(IconFileExport3, {}),
|
939
|
+
defaultText: "Export"
|
940
|
+
},
|
941
|
+
cancel: {
|
942
|
+
color: "gray",
|
943
|
+
icon: /* @__PURE__ */ jsx19(IconX3, {}),
|
944
|
+
defaultText: "H\u1EE7y thao t\xE1c"
|
945
|
+
},
|
946
|
+
select: {
|
947
|
+
defaultText: "Ch\u1ECDn"
|
948
|
+
},
|
949
|
+
check: {
|
950
|
+
defaultText: "Ch\u1ECDn"
|
951
|
+
}
|
952
|
+
};
|
953
|
+
function CoreButton(_a) {
|
954
|
+
var _b = _a, { children, actionType } = _b, rest = __objRest(_b, ["children", "actionType"]);
|
955
|
+
if (!actionType) {
|
956
|
+
return /* @__PURE__ */ jsx19(Button4, __spreadProps(__spreadValues({}, rest), { children }));
|
957
|
+
}
|
958
|
+
const config2 = actionConfig2[actionType];
|
959
|
+
return /* @__PURE__ */ jsx19(
|
960
|
+
Button4,
|
961
|
+
__spreadProps(__spreadValues({
|
962
|
+
color: config2.color,
|
963
|
+
type: config2.type,
|
964
|
+
leftSection: config2.icon
|
965
|
+
}, rest), {
|
966
|
+
children: children != null ? children : config2.defaultText
|
967
|
+
})
|
968
|
+
);
|
969
|
+
}
|
970
|
+
|
809
971
|
// src/components/Buttons/ButtonCRUD/AQButtonCreateByImportFile.tsx
|
810
972
|
import { FileInput } from "@mantine/core";
|
811
973
|
import { useDisclosure as useDisclosure6 } from "@mantine/hooks";
|
@@ -814,13 +976,13 @@ import { useMutation, useQueryClient as useQueryClient3 } from "@tanstack/react-
|
|
814
976
|
import * as XLSX from "xlsx";
|
815
977
|
|
816
978
|
// src/components/Buttons/ButtonModal/MyButtonModal.tsx
|
817
|
-
import { Button as
|
818
|
-
import { IconEdit as
|
819
|
-
import { Fragment as Fragment6, jsx as
|
979
|
+
import { Button as Button5, Modal as Modal5 } from "@mantine/core";
|
980
|
+
import { IconEdit as IconEdit6, IconPlus as IconPlus6, IconTrash as IconTrash6 } from "@tabler/icons-react";
|
981
|
+
import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
820
982
|
function MyButtonModal(_a) {
|
821
983
|
var _b = _a, {
|
822
984
|
fullScreen = false,
|
823
|
-
crudType
|
985
|
+
crudType,
|
824
986
|
disclosure,
|
825
987
|
modalSize,
|
826
988
|
title,
|
@@ -838,10 +1000,10 @@ function MyButtonModal(_a) {
|
|
838
1000
|
"objectName"
|
839
1001
|
]);
|
840
1002
|
const objectNameLower = objectName == null ? void 0 : objectName.toLowerCase();
|
841
|
-
if (crudType
|
1003
|
+
if (!crudType) {
|
842
1004
|
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
843
|
-
/* @__PURE__ */
|
844
|
-
/* @__PURE__ */
|
1005
|
+
/* @__PURE__ */ jsx20(Button5, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, rest), { children: label })),
|
1006
|
+
/* @__PURE__ */ jsx20(
|
845
1007
|
Modal5,
|
846
1008
|
{
|
847
1009
|
fullScreen,
|
@@ -849,15 +1011,15 @@ function MyButtonModal(_a) {
|
|
849
1011
|
title,
|
850
1012
|
opened: disclosure == null ? void 0 : disclosure[0],
|
851
1013
|
onClose: disclosure[1].close,
|
852
|
-
children: /* @__PURE__ */
|
1014
|
+
children: /* @__PURE__ */ jsx20(MyFlexColumn, { children })
|
853
1015
|
}
|
854
1016
|
)
|
855
1017
|
] });
|
856
1018
|
}
|
857
1019
|
if (crudType == "create") {
|
858
1020
|
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
859
|
-
/* @__PURE__ */
|
860
|
-
/* @__PURE__ */
|
1021
|
+
/* @__PURE__ */ jsx20(Button5, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, leftSection: /* @__PURE__ */ jsx20(IconPlus6, {}) }, rest), { children: label ? label : `Th\xEAm` })),
|
1022
|
+
/* @__PURE__ */ jsx20(
|
861
1023
|
Modal5,
|
862
1024
|
{
|
863
1025
|
fullScreen,
|
@@ -865,15 +1027,15 @@ function MyButtonModal(_a) {
|
|
865
1027
|
title: title ? title : `T\u1EA1o ${objectNameLower} m\u1EDBi`,
|
866
1028
|
opened: disclosure == null ? void 0 : disclosure[0],
|
867
1029
|
onClose: disclosure[1].close,
|
868
|
-
children: /* @__PURE__ */
|
1030
|
+
children: /* @__PURE__ */ jsx20(MyFlexColumn, { children })
|
869
1031
|
}
|
870
1032
|
)
|
871
1033
|
] });
|
872
1034
|
}
|
873
1035
|
if (crudType == "createMultiple") {
|
874
1036
|
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
875
|
-
/* @__PURE__ */
|
876
|
-
/* @__PURE__ */
|
1037
|
+
/* @__PURE__ */ jsx20(Button5, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "green", leftSection: /* @__PURE__ */ jsx20(IconPlus6, {}) }, rest), { children: label ? label : `Import ${objectNameLower}` })),
|
1038
|
+
/* @__PURE__ */ jsx20(
|
877
1039
|
Modal5,
|
878
1040
|
{
|
879
1041
|
fullScreen,
|
@@ -881,15 +1043,15 @@ function MyButtonModal(_a) {
|
|
881
1043
|
title: title ? title : `Th\xEAm danh s\xE1ch ${objectNameLower}`,
|
882
1044
|
opened: disclosure == null ? void 0 : disclosure[0],
|
883
1045
|
onClose: disclosure[1].close,
|
884
|
-
children: /* @__PURE__ */
|
1046
|
+
children: /* @__PURE__ */ jsx20(MyFlexColumn, { children })
|
885
1047
|
}
|
886
1048
|
)
|
887
1049
|
] });
|
888
1050
|
}
|
889
1051
|
if (crudType == "update") {
|
890
1052
|
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
891
|
-
/* @__PURE__ */
|
892
|
-
/* @__PURE__ */
|
1053
|
+
/* @__PURE__ */ jsx20(Button5, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "yellow", leftSection: /* @__PURE__ */ jsx20(IconEdit6, {}) }, rest), { children: label ? label : `Ch\u1EC9nh s\u1EEDa ${objectNameLower}` })),
|
1054
|
+
/* @__PURE__ */ jsx20(
|
893
1055
|
Modal5,
|
894
1056
|
{
|
895
1057
|
fullScreen,
|
@@ -897,15 +1059,15 @@ function MyButtonModal(_a) {
|
|
897
1059
|
title: title ? title : `Ch\u1EC9nh s\u1EEDa ${objectNameLower}`,
|
898
1060
|
opened: disclosure == null ? void 0 : disclosure[0],
|
899
1061
|
onClose: disclosure[1].close,
|
900
|
-
children: /* @__PURE__ */
|
1062
|
+
children: /* @__PURE__ */ jsx20(MyFlexColumn, { children })
|
901
1063
|
}
|
902
1064
|
)
|
903
1065
|
] });
|
904
1066
|
}
|
905
1067
|
if (crudType == "delete") {
|
906
1068
|
return /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
907
|
-
/* @__PURE__ */
|
908
|
-
/* @__PURE__ */
|
1069
|
+
/* @__PURE__ */ jsx20(Button5, __spreadProps(__spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "red", leftSection: /* @__PURE__ */ jsx20(IconTrash6, {}) }, rest), { children: label ? label : `X\xF3a ${objectNameLower}` })),
|
1070
|
+
/* @__PURE__ */ jsx20(
|
909
1071
|
Modal5,
|
910
1072
|
{
|
911
1073
|
fullScreen,
|
@@ -913,7 +1075,7 @@ function MyButtonModal(_a) {
|
|
913
1075
|
title: title ? title : `X\xF3a ${objectNameLower}`,
|
914
1076
|
opened: disclosure == null ? void 0 : disclosure[0],
|
915
1077
|
onClose: disclosure[1].close,
|
916
|
-
children: /* @__PURE__ */
|
1078
|
+
children: /* @__PURE__ */ jsx20(MyFlexColumn, { children })
|
917
1079
|
}
|
918
1080
|
)
|
919
1081
|
] });
|
@@ -921,7 +1083,7 @@ function MyButtonModal(_a) {
|
|
921
1083
|
}
|
922
1084
|
|
923
1085
|
// src/components/Buttons/ButtonCRUD/AQButtonCreateByImportFile.tsx
|
924
|
-
import { jsx as
|
1086
|
+
import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
925
1087
|
function AQButtonCreateByImportFile(_a) {
|
926
1088
|
var _b = _a, {
|
927
1089
|
form,
|
@@ -970,12 +1132,12 @@ function AQButtonCreateByImportFile(_a) {
|
|
970
1132
|
};
|
971
1133
|
reader.readAsArrayBuffer(file);
|
972
1134
|
};
|
973
|
-
return /* @__PURE__ */
|
1135
|
+
return /* @__PURE__ */ jsx21(MyButtonModal, __spreadProps(__spreadValues({ disclosure: disc, crudType: "createMultiple" }, rest), { children: /* @__PURE__ */ jsx21("form", { onSubmit: form.onSubmit((values) => {
|
974
1136
|
}), children: /* @__PURE__ */ jsxs10(MyFlexColumn, { children: [
|
975
|
-
/* @__PURE__ */
|
1137
|
+
/* @__PURE__ */ jsx21(
|
976
1138
|
FileInput,
|
977
1139
|
{
|
978
|
-
leftSection: /* @__PURE__ */
|
1140
|
+
leftSection: /* @__PURE__ */ jsx21(IconFileTypeXls, {}),
|
979
1141
|
accept: ".xlsx",
|
980
1142
|
description: "\u0110\u1ECBnh d\u1EA1ng h\u1EE3p l\u1EC7: .xlsx",
|
981
1143
|
label: "Ch\u1ECDn file",
|
@@ -984,15 +1146,15 @@ function AQButtonCreateByImportFile(_a) {
|
|
984
1146
|
placeholder: "Ch\u1ECDn file"
|
985
1147
|
}
|
986
1148
|
),
|
987
|
-
/* @__PURE__ */
|
1149
|
+
/* @__PURE__ */ jsx21(MyButton, { type: "submit", crudType: "createMultiple" })
|
988
1150
|
] }) }) }));
|
989
1151
|
}
|
990
1152
|
|
991
1153
|
// src/components/Buttons/ButtonCRUD/AQButtonExportData.tsx
|
992
|
-
import { Button as
|
1154
|
+
import { Button as Button6 } from "@mantine/core";
|
993
1155
|
import { IconDownload as IconDownload2 } from "@tabler/icons-react";
|
994
1156
|
import * as XLSX2 from "xlsx";
|
995
|
-
import { jsx as
|
1157
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
996
1158
|
function AQButtonExportData({
|
997
1159
|
isAllData,
|
998
1160
|
objectName,
|
@@ -1018,8 +1180,8 @@ function AQButtonExportData({
|
|
1018
1180
|
XLSX2.utils.book_append_sheet(workbook, worksheet, "Exported Data");
|
1019
1181
|
XLSX2.writeFile(workbook, `${objectName}.xlsx`);
|
1020
1182
|
};
|
1021
|
-
return /* @__PURE__ */
|
1022
|
-
|
1183
|
+
return /* @__PURE__ */ jsx22(
|
1184
|
+
Button6,
|
1023
1185
|
{
|
1024
1186
|
disabled: data.length === 0,
|
1025
1187
|
variant: "filled",
|
@@ -1028,16 +1190,95 @@ function AQButtonExportData({
|
|
1028
1190
|
event.preventDefault();
|
1029
1191
|
handleExport();
|
1030
1192
|
},
|
1031
|
-
leftSection: /* @__PURE__ */
|
1193
|
+
leftSection: /* @__PURE__ */ jsx22(IconDownload2, {}),
|
1032
1194
|
children: "Export"
|
1033
1195
|
}
|
1034
1196
|
);
|
1035
1197
|
}
|
1036
1198
|
|
1037
|
-
// src/components/Buttons/ButtonCRUD/
|
1199
|
+
// src/components/Buttons/ButtonCRUD/CoreButtonCreateUpdate.tsx
|
1038
1200
|
import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
|
1039
1201
|
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
1040
|
-
import {
|
1202
|
+
import { ActionIcon as ActionIcon10, Button as Button7, Modal as Modal6 } from "@mantine/core";
|
1203
|
+
import { IconEdit as IconEdit7, IconPlus as IconPlus7 } from "@tabler/icons-react";
|
1204
|
+
import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
|
1205
|
+
function CoreButtonCreateUpdate({
|
1206
|
+
modalProps,
|
1207
|
+
actionIconProps,
|
1208
|
+
buttonProps,
|
1209
|
+
form,
|
1210
|
+
onSubmit,
|
1211
|
+
onSuccess,
|
1212
|
+
onError,
|
1213
|
+
closeModalWhenSubmit = true,
|
1214
|
+
resetFormWhenSubmit = true,
|
1215
|
+
children,
|
1216
|
+
disclosure: externalDisclosure,
|
1217
|
+
isCreate = true
|
1218
|
+
}) {
|
1219
|
+
const defaultDisclosure = useDisclosure7();
|
1220
|
+
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
1221
|
+
const queryClient = useQueryClient4();
|
1222
|
+
const mutation = useMyReactMutation({
|
1223
|
+
axiosFn: (values) => onSubmit(values),
|
1224
|
+
options: __spreadValues(__spreadValues({
|
1225
|
+
onSuccess: () => {
|
1226
|
+
queryClient.invalidateQueries();
|
1227
|
+
utils_notification_show({ crudType: "create" });
|
1228
|
+
disclosure[1].close();
|
1229
|
+
if (closeModalWhenSubmit) disclosure[1].close();
|
1230
|
+
if (resetFormWhenSubmit) form.reset();
|
1231
|
+
}
|
1232
|
+
}, onSuccess && {
|
1233
|
+
onSuccess: () => {
|
1234
|
+
onSuccess();
|
1235
|
+
}
|
1236
|
+
}), onError && {
|
1237
|
+
onError: () => {
|
1238
|
+
onError();
|
1239
|
+
}
|
1240
|
+
})
|
1241
|
+
});
|
1242
|
+
return /* @__PURE__ */ jsxs11(Fragment7, { children: [
|
1243
|
+
isCreate ? /* @__PURE__ */ jsx23(
|
1244
|
+
Button7,
|
1245
|
+
__spreadProps(__spreadValues({
|
1246
|
+
onClick: disclosure[1].open,
|
1247
|
+
leftSection: /* @__PURE__ */ jsx23(IconPlus7, {})
|
1248
|
+
}, buttonProps), {
|
1249
|
+
children: "Th\xEAm"
|
1250
|
+
})
|
1251
|
+
) : /* @__PURE__ */ jsx23(
|
1252
|
+
ActionIcon10,
|
1253
|
+
__spreadProps(__spreadValues({
|
1254
|
+
color: "yellow",
|
1255
|
+
onClick: disclosure[1].open
|
1256
|
+
}, actionIconProps), {
|
1257
|
+
children: /* @__PURE__ */ jsx23(IconEdit7, {})
|
1258
|
+
})
|
1259
|
+
),
|
1260
|
+
/* @__PURE__ */ jsx23(
|
1261
|
+
Modal6,
|
1262
|
+
__spreadProps(__spreadValues({
|
1263
|
+
title: isCreate ? "Th\xEAm d\u1EEF li\u1EC7u" : "S\u1EEDa d\u1EEF li\u1EC7u",
|
1264
|
+
opened: disclosure[0],
|
1265
|
+
onClose: disclosure[1].close
|
1266
|
+
}, modalProps), {
|
1267
|
+
children: /* @__PURE__ */ jsx23("form", { onSubmit: form.onSubmit((values) => {
|
1268
|
+
mutation.mutate(values);
|
1269
|
+
}), children: /* @__PURE__ */ jsxs11(MyFlexColumn, { children: [
|
1270
|
+
children,
|
1271
|
+
/* @__PURE__ */ jsx23(Button7, { children: "L\u01B0u" })
|
1272
|
+
] }) })
|
1273
|
+
})
|
1274
|
+
)
|
1275
|
+
] });
|
1276
|
+
}
|
1277
|
+
|
1278
|
+
// src/components/Buttons/ButtonCRUD/MyButtonCreate.tsx
|
1279
|
+
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
1280
|
+
import { useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
1281
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
1041
1282
|
function MyButtonCreate(_a) {
|
1042
1283
|
var _b = _a, {
|
1043
1284
|
form,
|
@@ -1058,9 +1299,9 @@ function MyButtonCreate(_a) {
|
|
1058
1299
|
"children",
|
1059
1300
|
"disclosure"
|
1060
1301
|
]);
|
1061
|
-
const defaultDisclosure =
|
1302
|
+
const defaultDisclosure = useDisclosure8();
|
1062
1303
|
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
1063
|
-
const queryClient =
|
1304
|
+
const queryClient = useQueryClient5();
|
1064
1305
|
const mutation = useMyReactMutation({
|
1065
1306
|
axiosFn: (values) => {
|
1066
1307
|
const result = onSubmit(values);
|
@@ -1101,83 +1342,20 @@ function MyButtonCreate(_a) {
|
|
1101
1342
|
}
|
1102
1343
|
})
|
1103
1344
|
});
|
1104
|
-
return /* @__PURE__ */
|
1345
|
+
return /* @__PURE__ */ jsx24(MyButtonModal, __spreadProps(__spreadValues({ disclosure, crudType: "create" }, rest), { children: /* @__PURE__ */ jsx24("form", { onSubmit: form.onSubmit((values) => {
|
1105
1346
|
mutation.mutate(values);
|
1106
|
-
}), children: /* @__PURE__ */
|
1347
|
+
}), children: /* @__PURE__ */ jsxs12(MyFlexColumn, { children: [
|
1107
1348
|
children,
|
1108
|
-
/* @__PURE__ */
|
1349
|
+
/* @__PURE__ */ jsx24(MyButton, { type: "submit", crudType: "save" })
|
1109
1350
|
] }) }) }));
|
1110
1351
|
}
|
1111
1352
|
|
1112
|
-
// src/components/Buttons/ButtonCRUD/MyButtonCreateUpdate.tsx
|
1113
|
-
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
1114
|
-
import { useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
1115
|
-
import { ActionIcon as ActionIcon9, Button as Button5, Modal as Modal6 } from "@mantine/core";
|
1116
|
-
import { IconEdit as IconEdit5, IconPlus as IconPlus5 } from "@tabler/icons-react";
|
1117
|
-
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
1118
|
-
function MyButtonCreateUpdate({
|
1119
|
-
modalProps,
|
1120
|
-
actionIconProps,
|
1121
|
-
buttonProps,
|
1122
|
-
form,
|
1123
|
-
onSubmit,
|
1124
|
-
onSuccess,
|
1125
|
-
onError,
|
1126
|
-
closeModalWhenSubmit = true,
|
1127
|
-
resetFormWhenSubmit = true,
|
1128
|
-
children,
|
1129
|
-
disclosure: externalDisclosure,
|
1130
|
-
isCreate = true
|
1131
|
-
}) {
|
1132
|
-
const defaultDisclosure = useDisclosure8();
|
1133
|
-
const disclosure = externalDisclosure != null ? externalDisclosure : defaultDisclosure;
|
1134
|
-
const queryClient = useQueryClient5();
|
1135
|
-
const mutation = useMyReactMutation({
|
1136
|
-
axiosFn: (values) => onSubmit(values),
|
1137
|
-
options: __spreadValues(__spreadValues({
|
1138
|
-
onSuccess: () => {
|
1139
|
-
queryClient.invalidateQueries();
|
1140
|
-
utils_notification_show({ crudType: "create" });
|
1141
|
-
disclosure[1].close();
|
1142
|
-
if (closeModalWhenSubmit) disclosure[1].close();
|
1143
|
-
if (resetFormWhenSubmit) form.reset();
|
1144
|
-
}
|
1145
|
-
}, onSuccess && {
|
1146
|
-
onSuccess: () => {
|
1147
|
-
onSuccess();
|
1148
|
-
}
|
1149
|
-
}), onError && {
|
1150
|
-
onError: () => {
|
1151
|
-
onError();
|
1152
|
-
}
|
1153
|
-
})
|
1154
|
-
});
|
1155
|
-
return /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
1156
|
-
isCreate ? /* @__PURE__ */ jsx22(Button5, __spreadValues({ onClick: disclosure[1].open, children: "Th\xEAm", leftSection: /* @__PURE__ */ jsx22(IconPlus5, {}) }, buttonProps)) : /* @__PURE__ */ jsx22(ActionIcon9, __spreadValues({ color: "yellow", onClick: disclosure[1].open, children: /* @__PURE__ */ jsx22(IconEdit5, {}) }, actionIconProps)),
|
1157
|
-
/* @__PURE__ */ jsx22(
|
1158
|
-
Modal6,
|
1159
|
-
__spreadProps(__spreadValues({
|
1160
|
-
title: isCreate ? "Th\xEAm d\u1EEF li\u1EC7u" : "S\u1EEDa d\u1EEF li\u1EC7u",
|
1161
|
-
opened: disclosure[0],
|
1162
|
-
onClose: disclosure[1].close
|
1163
|
-
}, modalProps), {
|
1164
|
-
children: /* @__PURE__ */ jsx22("form", { onSubmit: form.onSubmit((values) => {
|
1165
|
-
mutation.mutate(values);
|
1166
|
-
}), children: /* @__PURE__ */ jsxs12(MyFlexColumn, { children: [
|
1167
|
-
children,
|
1168
|
-
/* @__PURE__ */ jsx22(Button5, { children: "L\u01B0u" })
|
1169
|
-
] }) })
|
1170
|
-
})
|
1171
|
-
)
|
1172
|
-
] });
|
1173
|
-
}
|
1174
|
-
|
1175
1353
|
// src/components/Buttons/ButtonCRUD/MyButtonDeleteList.tsx
|
1176
1354
|
import { Group as Group5, Highlight as Highlight2 } from "@mantine/core";
|
1177
1355
|
import { useDisclosure as useDisclosure9 } from "@mantine/hooks";
|
1178
1356
|
import { useMutation as useMutation2, useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
1179
1357
|
import { useState as useState7 } from "react";
|
1180
|
-
import { jsx as
|
1358
|
+
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
1181
1359
|
function MyButtonDeleteList(_a) {
|
1182
1360
|
var _b = _a, {
|
1183
1361
|
onSubmit,
|
@@ -1224,7 +1402,7 @@ function MyButtonDeleteList(_a) {
|
|
1224
1402
|
disabled: contextData == void 0 || contextData.length == 0
|
1225
1403
|
}, rest), {
|
1226
1404
|
children: [
|
1227
|
-
/* @__PURE__ */
|
1405
|
+
/* @__PURE__ */ jsx25(
|
1228
1406
|
Highlight2,
|
1229
1407
|
{
|
1230
1408
|
highlight: contextData || [],
|
@@ -1238,7 +1416,7 @@ function MyButtonDeleteList(_a) {
|
|
1238
1416
|
}
|
1239
1417
|
),
|
1240
1418
|
/* @__PURE__ */ jsxs13(Group5, { grow: true, children: [
|
1241
|
-
/* @__PURE__ */
|
1419
|
+
/* @__PURE__ */ jsx25(
|
1242
1420
|
MyButton,
|
1243
1421
|
{
|
1244
1422
|
crudType: "delete",
|
@@ -1246,7 +1424,7 @@ function MyButtonDeleteList(_a) {
|
|
1246
1424
|
loading: loadingState[0]
|
1247
1425
|
}
|
1248
1426
|
),
|
1249
|
-
/* @__PURE__ */
|
1427
|
+
/* @__PURE__ */ jsx25(
|
1250
1428
|
MyButton,
|
1251
1429
|
{
|
1252
1430
|
crudType: "cancel",
|
@@ -1260,27 +1438,27 @@ function MyButtonDeleteList(_a) {
|
|
1260
1438
|
}
|
1261
1439
|
|
1262
1440
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1263
|
-
import { Button as
|
1264
|
-
import { IconFileImport as
|
1441
|
+
import { Button as Button11, Modal as Modal9, useModalsStack as useModalsStack3 } from "@mantine/core";
|
1442
|
+
import { IconFileImport as IconFileImport4 } from "@tabler/icons-react";
|
1265
1443
|
|
1266
1444
|
// src/components/Combobox/Select/MySelect.tsx
|
1267
1445
|
import { Select } from "@mantine/core";
|
1268
|
-
import { jsx as
|
1446
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
1269
1447
|
function MySelect(_a) {
|
1270
1448
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
1271
|
-
return /* @__PURE__ */
|
1449
|
+
return /* @__PURE__ */ jsx26(Select, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
1272
1450
|
}
|
1273
1451
|
|
1274
1452
|
// src/components/Layouts/FlexEnd/MyFlexEnd.tsx
|
1275
1453
|
import { Group as Group6 } from "@mantine/core";
|
1276
|
-
import { jsx as
|
1454
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
1277
1455
|
function MyFlexEnd(_a) {
|
1278
1456
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
1279
|
-
return /* @__PURE__ */
|
1457
|
+
return /* @__PURE__ */ jsx27(Group6, __spreadProps(__spreadValues({ justify: "end", mt: "md" }, rest), { children }));
|
1280
1458
|
}
|
1281
1459
|
|
1282
1460
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1283
|
-
import { Button as
|
1461
|
+
import { Button as Button8, Divider, Fieldset, Group as Group7, Modal as Modal7, SimpleGrid, Space as Space2, Table } from "@mantine/core";
|
1284
1462
|
import { IconArrowBackUp, IconArrowBigLeft, IconArrowBigRight, IconSquareRoundedX } from "@tabler/icons-react";
|
1285
1463
|
|
1286
1464
|
// src/components/Buttons/ButtonImport/useS_ButtonImport.ts
|
@@ -1434,7 +1612,7 @@ function useS_ButtonImport() {
|
|
1434
1612
|
}
|
1435
1613
|
|
1436
1614
|
// src/components/Buttons/ButtonImport/SelectFieldModal.tsx
|
1437
|
-
import { jsx as
|
1615
|
+
import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
|
1438
1616
|
function SelectFieldModal({ stack, onImport }) {
|
1439
1617
|
var _a, _b;
|
1440
1618
|
const store = useS_ButtonImport();
|
@@ -1442,91 +1620,91 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1442
1620
|
/* @__PURE__ */ jsxs14(SimpleGrid, { cols: { base: 1, lg: 2 }, children: [
|
1443
1621
|
/* @__PURE__ */ jsxs14(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin", children: [
|
1444
1622
|
/* @__PURE__ */ jsxs14(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1445
|
-
/* @__PURE__ */
|
1446
|
-
/* @__PURE__ */
|
1447
|
-
/* @__PURE__ */
|
1623
|
+
/* @__PURE__ */ jsx28(Table.Thead, { bg: "cyan", children: /* @__PURE__ */ jsxs14(Table.Tr, { children: [
|
1624
|
+
/* @__PURE__ */ jsx28(Table.Th, { children: "M\xE3 field" }),
|
1625
|
+
/* @__PURE__ */ jsx28(Table.Th, { children: "T\xEAn field" })
|
1448
1626
|
] }) }),
|
1449
|
-
/* @__PURE__ */
|
1627
|
+
/* @__PURE__ */ jsx28(Table.Tbody, { children: (_a = store.state.fieldConfig) == null ? void 0 : _a.filter((item) => item.isSelected == false || item.isSelected == void 0).map((item, idx) => /* @__PURE__ */ jsxs14(
|
1450
1628
|
Table.Tr,
|
1451
1629
|
{
|
1452
1630
|
style: { cursor: "pointer" },
|
1453
1631
|
children: [
|
1454
|
-
/* @__PURE__ */
|
1455
|
-
/* @__PURE__ */
|
1632
|
+
/* @__PURE__ */ jsx28(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldKey.toString() }),
|
1633
|
+
/* @__PURE__ */ jsx28(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), true), children: item.fieldName })
|
1456
1634
|
]
|
1457
1635
|
},
|
1458
1636
|
idx
|
1459
1637
|
)) })
|
1460
1638
|
] }),
|
1461
|
-
/* @__PURE__ */
|
1462
|
-
/* @__PURE__ */
|
1463
|
-
|
1639
|
+
/* @__PURE__ */ jsx28(Space2, {}),
|
1640
|
+
/* @__PURE__ */ jsx28(Group7, { children: /* @__PURE__ */ jsx28(
|
1641
|
+
Button8,
|
1464
1642
|
{
|
1465
1643
|
onClick: () => {
|
1466
1644
|
store.changeAllSelected(true);
|
1467
1645
|
},
|
1468
|
-
leftSection: /* @__PURE__ */
|
1646
|
+
leftSection: /* @__PURE__ */ jsx28(IconArrowBigRight, {}),
|
1469
1647
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3"
|
1470
1648
|
}
|
1471
1649
|
) })
|
1472
1650
|
] }),
|
1473
1651
|
/* @__PURE__ */ jsxs14(Fieldset, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin \u0111\u01B0\u1EE3c ch\u1ECDn", children: [
|
1474
1652
|
/* @__PURE__ */ jsxs14(Table, { stickyHeader: true, stickyHeaderOffset: 60, children: [
|
1475
|
-
/* @__PURE__ */
|
1476
|
-
/* @__PURE__ */
|
1477
|
-
/* @__PURE__ */
|
1478
|
-
/* @__PURE__ */
|
1653
|
+
/* @__PURE__ */ jsx28(Table.Thead, { children: /* @__PURE__ */ jsxs14(Table.Tr, { children: [
|
1654
|
+
/* @__PURE__ */ jsx28(Table.Th, { children: "M\xE3 field" }),
|
1655
|
+
/* @__PURE__ */ jsx28(Table.Th, { children: "T\xEAn field" }),
|
1656
|
+
/* @__PURE__ */ jsx28(Table.Th, { children: "C\u1ED9t map" })
|
1479
1657
|
] }) }),
|
1480
|
-
/* @__PURE__ */
|
1658
|
+
/* @__PURE__ */ jsx28(Table.Tbody, { children: (_b = store.state.fieldConfig) == null ? void 0 : _b.filter((item) => item.isSelected == true).map((item, idx) => /* @__PURE__ */ jsxs14(
|
1481
1659
|
Table.Tr,
|
1482
1660
|
{
|
1483
1661
|
style: { cursor: "pointer" },
|
1484
1662
|
children: [
|
1485
|
-
/* @__PURE__ */
|
1486
|
-
/* @__PURE__ */
|
1487
|
-
/* @__PURE__ */
|
1663
|
+
/* @__PURE__ */ jsx28(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldKey.toString() }),
|
1664
|
+
/* @__PURE__ */ jsx28(Table.Td, { onClick: () => store.changeSelected(item.fieldKey.toString(), false), children: item.fieldName }),
|
1665
|
+
/* @__PURE__ */ jsx28(Table.Td, { children: /* @__PURE__ */ jsx28(MySelect, { data: store.state.title, value: item.fieldToMap, onChange: (e4) => store.setFieldToMap(item.fieldKey.toString(), e4) }) })
|
1488
1666
|
]
|
1489
1667
|
},
|
1490
1668
|
idx
|
1491
1669
|
)) })
|
1492
1670
|
] }),
|
1493
|
-
/* @__PURE__ */
|
1494
|
-
/* @__PURE__ */
|
1495
|
-
|
1671
|
+
/* @__PURE__ */ jsx28(Space2, {}),
|
1672
|
+
/* @__PURE__ */ jsx28(
|
1673
|
+
Button8,
|
1496
1674
|
{
|
1497
1675
|
onClick: () => {
|
1498
1676
|
store.changeAllSelected(false);
|
1499
1677
|
},
|
1500
|
-
leftSection: /* @__PURE__ */
|
1678
|
+
leftSection: /* @__PURE__ */ jsx28(IconArrowBigLeft, {}),
|
1501
1679
|
children: "Chuy\u1EC3n t\u1EA5t c\u1EA3 v\u1EC1"
|
1502
1680
|
}
|
1503
1681
|
)
|
1504
1682
|
] })
|
1505
1683
|
] }),
|
1506
|
-
/* @__PURE__ */
|
1684
|
+
/* @__PURE__ */ jsx28(Divider, {}),
|
1507
1685
|
/* @__PURE__ */ jsxs14(MyFlexEnd, { children: [
|
1508
|
-
/* @__PURE__ */
|
1509
|
-
|
1686
|
+
/* @__PURE__ */ jsx28(
|
1687
|
+
Button8,
|
1510
1688
|
{
|
1511
|
-
leftSection: /* @__PURE__ */
|
1689
|
+
leftSection: /* @__PURE__ */ jsx28(IconArrowBackUp, {}),
|
1512
1690
|
onClick: () => stack.close("select-field-page"),
|
1513
1691
|
color: "gray.7",
|
1514
1692
|
children: "Quay l\u1EA1i"
|
1515
1693
|
}
|
1516
1694
|
),
|
1517
|
-
/* @__PURE__ */
|
1518
|
-
|
1695
|
+
/* @__PURE__ */ jsx28(
|
1696
|
+
Button8,
|
1519
1697
|
{
|
1520
1698
|
color: "blue.8",
|
1521
|
-
leftSection: /* @__PURE__ */
|
1699
|
+
leftSection: /* @__PURE__ */ jsx28(IconArrowBigRight, {}),
|
1522
1700
|
onClick: onImport,
|
1523
1701
|
children: "Ti\u1EBFp t\u1EE5c / Import"
|
1524
1702
|
}
|
1525
1703
|
),
|
1526
|
-
/* @__PURE__ */
|
1527
|
-
|
1704
|
+
/* @__PURE__ */ jsx28(
|
1705
|
+
Button8,
|
1528
1706
|
{
|
1529
|
-
leftSection: /* @__PURE__ */
|
1707
|
+
leftSection: /* @__PURE__ */ jsx28(IconSquareRoundedX, {}),
|
1530
1708
|
onClick: () => stack.closeAll(),
|
1531
1709
|
color: "red.6",
|
1532
1710
|
children: "\u0110\xF3ng"
|
@@ -1537,7 +1715,7 @@ function SelectFieldModal({ stack, onImport }) {
|
|
1537
1715
|
}
|
1538
1716
|
|
1539
1717
|
// src/components/DataDisplay/DataTable/MyDataTable.tsx
|
1540
|
-
import { Alert, Button as
|
1718
|
+
import { Alert, Button as Button9, Group as Group8, Portal } from "@mantine/core";
|
1541
1719
|
import { IconBug, IconDownload as IconDownload3, IconInfoCircle } from "@tabler/icons-react";
|
1542
1720
|
import { download, generateCsv, mkConfig } from "export-to-csv";
|
1543
1721
|
import {
|
@@ -1546,7 +1724,7 @@ import {
|
|
1546
1724
|
} from "mantine-react-table";
|
1547
1725
|
import { MRT_Localization_VI } from "mantine-react-table/locales/vi/index.cjs";
|
1548
1726
|
import { useEffect as useEffect5 } from "react";
|
1549
|
-
import { Fragment as Fragment8, jsx as
|
1727
|
+
import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
1550
1728
|
function formatData(data, formats) {
|
1551
1729
|
return data.map((row) => {
|
1552
1730
|
const transformedRow = {};
|
@@ -1611,12 +1789,12 @@ function MyDataTable(_a) {
|
|
1611
1789
|
renderTopToolbarCustomActions: ({ table: table2 }) => {
|
1612
1790
|
return /* @__PURE__ */ jsxs15(Group8, { children: [
|
1613
1791
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table: table2 }),
|
1614
|
-
exportAble && /* @__PURE__ */
|
1615
|
-
|
1792
|
+
exportAble && /* @__PURE__ */ jsx29(Fragment8, { children: /* @__PURE__ */ jsx29(
|
1793
|
+
Button9,
|
1616
1794
|
{
|
1617
1795
|
color: "green.8",
|
1618
1796
|
onClick: () => handleExport(table2.getSelectedRowModel().rows),
|
1619
|
-
leftSection: /* @__PURE__ */
|
1797
|
+
leftSection: /* @__PURE__ */ jsx29(IconDownload3, {}),
|
1620
1798
|
variant: "filled",
|
1621
1799
|
children: "Export"
|
1622
1800
|
}
|
@@ -1663,7 +1841,7 @@ function MyDataTable(_a) {
|
|
1663
1841
|
}
|
1664
1842
|
},
|
1665
1843
|
localization: MRT_Localization_VI,
|
1666
|
-
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */
|
1844
|
+
renderEmptyRowsFallback: () => isError ? /* @__PURE__ */ jsx29(Alert, { icon: /* @__PURE__ */ jsx29(IconBug, {}), color: "red", title: "C\xF3 l\u1ED7i x\u1EA3y ra!", m: "md" }) : /* @__PURE__ */ jsx29(Alert, { icon: /* @__PURE__ */ jsx29(IconInfoCircle, {}), color: "gray", title: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u!", m: "md" }),
|
1667
1845
|
state: {
|
1668
1846
|
showSkeletons: isLoading
|
1669
1847
|
},
|
@@ -1674,13 +1852,13 @@ function MyDataTable(_a) {
|
|
1674
1852
|
setSelectedRow && setSelectedRow(table.getSelectedRowModel().rows.map((row) => row.original));
|
1675
1853
|
}, [table.getState().rowSelection]);
|
1676
1854
|
if (data == void 0) return;
|
1677
|
-
return /* @__PURE__ */
|
1855
|
+
return /* @__PURE__ */ jsx29("main", { style: { position: "relative", zIndex: 1 }, children: table.getState().isFullScreen ? /* @__PURE__ */ jsx29(Portal, { children: /* @__PURE__ */ jsx29(MantineReactTable, { table }) }) : /* @__PURE__ */ jsx29(MantineReactTable, { table }) });
|
1678
1856
|
}
|
1679
1857
|
|
1680
1858
|
// src/components/Buttons/ButtonImport/SelectFileModal.tsx
|
1681
|
-
import { Button as
|
1859
|
+
import { Button as Button10, Fieldset as Fieldset2, FileInput as FileInput2, Modal as Modal8, NumberInput, Select as Select2, SimpleGrid as SimpleGrid2 } from "@mantine/core";
|
1682
1860
|
import { IconArrowBigRight as IconArrowBigRight2, IconSquareRoundedX as IconSquareRoundedX2 } from "@tabler/icons-react";
|
1683
|
-
import { jsx as
|
1861
|
+
import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
1684
1862
|
function SelectFileModal({ onExportStructure, stack }) {
|
1685
1863
|
var _a;
|
1686
1864
|
const store = useS_ButtonImport();
|
@@ -1691,7 +1869,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1691
1869
|
fullScreen: true
|
1692
1870
|
}, stack.register("select-file-page")), {
|
1693
1871
|
children: [
|
1694
|
-
/* @__PURE__ */
|
1872
|
+
/* @__PURE__ */ jsx30(
|
1695
1873
|
FileInput2,
|
1696
1874
|
{
|
1697
1875
|
value: store.state.file,
|
@@ -1702,7 +1880,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1702
1880
|
}
|
1703
1881
|
),
|
1704
1882
|
/* @__PURE__ */ jsxs16(SimpleGrid2, { cols: { base: 1, md: 2, lg: 2, xl: 4 }, children: [
|
1705
|
-
/* @__PURE__ */
|
1883
|
+
/* @__PURE__ */ jsx30(
|
1706
1884
|
NumberInput,
|
1707
1885
|
{
|
1708
1886
|
label: "D\xF2ng ti\xEAu \u0111\u1EC1 b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1710,7 +1888,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1710
1888
|
onChange: (e4) => store.setProperty("startTitleIndex", e4)
|
1711
1889
|
}
|
1712
1890
|
),
|
1713
|
-
/* @__PURE__ */
|
1891
|
+
/* @__PURE__ */ jsx30(
|
1714
1892
|
NumberInput,
|
1715
1893
|
{
|
1716
1894
|
label: "D\xF2ng d\u1EEF li\u1EC7u b\u1EAFt \u0111\u1EA7u t\u1EEB",
|
@@ -1718,7 +1896,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1718
1896
|
onChange: (e4) => store.setProperty("startDataIndex", e4)
|
1719
1897
|
}
|
1720
1898
|
),
|
1721
|
-
/* @__PURE__ */
|
1899
|
+
/* @__PURE__ */ jsx30(
|
1722
1900
|
Select2,
|
1723
1901
|
{
|
1724
1902
|
readOnly: true,
|
@@ -1727,7 +1905,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1727
1905
|
defaultValue: "100.000"
|
1728
1906
|
}
|
1729
1907
|
),
|
1730
|
-
/* @__PURE__ */
|
1908
|
+
/* @__PURE__ */ jsx30(
|
1731
1909
|
Select2,
|
1732
1910
|
{
|
1733
1911
|
readOnly: true,
|
@@ -1737,7 +1915,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1737
1915
|
}
|
1738
1916
|
)
|
1739
1917
|
] }),
|
1740
|
-
/* @__PURE__ */
|
1918
|
+
/* @__PURE__ */ jsx30(Fieldset2, { legend: "Danh s\xE1ch tr\u01B0\u1EDDng th\xF4ng tin trong file d\u1EEF li\u1EC7u", children: store.state.data && /* @__PURE__ */ jsx30(
|
1741
1919
|
MyDataTable,
|
1742
1920
|
{
|
1743
1921
|
columns: store.columns,
|
@@ -1745,29 +1923,29 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1745
1923
|
}
|
1746
1924
|
) }),
|
1747
1925
|
/* @__PURE__ */ jsxs16(MyFlexEnd, { children: [
|
1748
|
-
/* @__PURE__ */
|
1749
|
-
|
1926
|
+
/* @__PURE__ */ jsx30(
|
1927
|
+
Button10,
|
1750
1928
|
{
|
1751
1929
|
color: "teal.8",
|
1752
1930
|
onClick: onExportStructure,
|
1753
1931
|
children: "Xu\u1EA5t file c\u1EA5u tr\xFAc"
|
1754
1932
|
}
|
1755
1933
|
),
|
1756
|
-
/* @__PURE__ */
|
1757
|
-
|
1934
|
+
/* @__PURE__ */ jsx30(
|
1935
|
+
Button10,
|
1758
1936
|
{
|
1759
1937
|
disabled: ((_a = store.state.data) == null ? void 0 : _a.length) == 0,
|
1760
1938
|
color: "blue.8",
|
1761
|
-
leftSection: /* @__PURE__ */
|
1939
|
+
leftSection: /* @__PURE__ */ jsx30(IconArrowBigRight2, {}),
|
1762
1940
|
onClick: () => stack.open("select-field-page"),
|
1763
1941
|
children: "Ti\u1EBFp t\u1EE5c"
|
1764
1942
|
}
|
1765
1943
|
),
|
1766
|
-
/* @__PURE__ */
|
1767
|
-
|
1944
|
+
/* @__PURE__ */ jsx30(
|
1945
|
+
Button10,
|
1768
1946
|
{
|
1769
1947
|
color: "red.6",
|
1770
|
-
leftSection: /* @__PURE__ */
|
1948
|
+
leftSection: /* @__PURE__ */ jsx30(IconSquareRoundedX2, {}),
|
1771
1949
|
onClick: stack.closeAll,
|
1772
1950
|
children: "\u0110\xF3ng"
|
1773
1951
|
}
|
@@ -1779,7 +1957,7 @@ function SelectFileModal({ onExportStructure, stack }) {
|
|
1779
1957
|
}
|
1780
1958
|
|
1781
1959
|
// src/components/Buttons/ButtonImport/MyButtonImport.tsx
|
1782
|
-
import { Fragment as Fragment9, jsx as
|
1960
|
+
import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
1783
1961
|
function MyButtonImport({
|
1784
1962
|
onExportStructure,
|
1785
1963
|
onImport
|
@@ -1787,18 +1965,18 @@ function MyButtonImport({
|
|
1787
1965
|
const stack = useModalsStack3(["select-file-page", "select-field-page", "implement-page"]);
|
1788
1966
|
const store = useS_ButtonImport();
|
1789
1967
|
return /* @__PURE__ */ jsxs17(Fragment9, { children: [
|
1790
|
-
/* @__PURE__ */
|
1968
|
+
/* @__PURE__ */ jsx31(Button11, { color: "teal.8", onClick: () => stack.open("select-file-page"), leftSection: /* @__PURE__ */ jsx31(IconFileImport4, {}), title: "Import", children: "Import" }),
|
1791
1969
|
/* @__PURE__ */ jsxs17(Modal9.Stack, { children: [
|
1792
|
-
/* @__PURE__ */
|
1793
|
-
/* @__PURE__ */
|
1970
|
+
/* @__PURE__ */ jsx31(SelectFileModal, { stack, onExportStructure }),
|
1971
|
+
/* @__PURE__ */ jsx31(SelectFieldModal, { stack, onImport: () => onImport(store.getDataFinal()) })
|
1794
1972
|
] })
|
1795
1973
|
] });
|
1796
1974
|
}
|
1797
1975
|
|
1798
1976
|
// src/components/Buttons/ButtonModal/AQSelectTableByOpenModal.tsx
|
1799
|
-
import { Button as
|
1977
|
+
import { Button as Button12, Fieldset as Fieldset3, Modal as Modal10 } from "@mantine/core";
|
1800
1978
|
import { useDisclosure as useDisclosure10 } from "@mantine/hooks";
|
1801
|
-
import { Fragment as Fragment10, jsx as
|
1979
|
+
import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
1802
1980
|
function AQSelectTableByOpenModal(_a) {
|
1803
1981
|
var _b = _a, {
|
1804
1982
|
setSelectedData,
|
@@ -1827,15 +2005,15 @@ function AQSelectTableByOpenModal(_a) {
|
|
1827
2005
|
]);
|
1828
2006
|
const disclosure = useDisclosure10(false);
|
1829
2007
|
return /* @__PURE__ */ jsxs18(Fragment10, { children: [
|
1830
|
-
/* @__PURE__ */
|
1831
|
-
|
2008
|
+
/* @__PURE__ */ jsx32(
|
2009
|
+
Button12,
|
1832
2010
|
__spreadProps(__spreadValues({
|
1833
2011
|
onClick: disclosure[1].open
|
1834
2012
|
}, rest), {
|
1835
2013
|
children: label ? label : `Ch\u1ECDn t\u1EEB danh s\xE1ch`
|
1836
2014
|
})
|
1837
2015
|
),
|
1838
|
-
/* @__PURE__ */
|
2016
|
+
/* @__PURE__ */ jsx32(
|
1839
2017
|
Modal10,
|
1840
2018
|
{
|
1841
2019
|
fullScreen,
|
@@ -1843,11 +2021,11 @@ function AQSelectTableByOpenModal(_a) {
|
|
1843
2021
|
title,
|
1844
2022
|
opened: disclosure == null ? void 0 : disclosure[0],
|
1845
2023
|
onClose: disclosure[1].close,
|
1846
|
-
children: /* @__PURE__ */
|
2024
|
+
children: /* @__PURE__ */ jsx32(MyFlexColumn, { children: /* @__PURE__ */ jsx32(Fieldset3, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: /* @__PURE__ */ jsx32(
|
1847
2025
|
MyDataTable,
|
1848
2026
|
__spreadValues({
|
1849
2027
|
renderTopToolbarCustomActions: ({ table }) => {
|
1850
|
-
return /* @__PURE__ */
|
2028
|
+
return /* @__PURE__ */ jsx32(Button12, { onClick: () => {
|
1851
2029
|
setSelectedData(table.getSelectedRowModel().rows.map((row) => row.original));
|
1852
2030
|
closeAfterSelect && disclosure[1].close();
|
1853
2031
|
}, children: "Ch\u1ECDn" });
|
@@ -1862,12 +2040,35 @@ function AQSelectTableByOpenModal(_a) {
|
|
1862
2040
|
] });
|
1863
2041
|
}
|
1864
2042
|
|
2043
|
+
// src/components/Buttons/ButtonModal/CoreButtonModal.tsx
|
2044
|
+
import { Button as Button13, Modal as Modal11 } from "@mantine/core";
|
2045
|
+
import { Fragment as Fragment11, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
2046
|
+
function CoreButtonModal({
|
2047
|
+
disclosure,
|
2048
|
+
children,
|
2049
|
+
buttonProps,
|
2050
|
+
modalProps
|
2051
|
+
}) {
|
2052
|
+
return /* @__PURE__ */ jsxs19(Fragment11, { children: [
|
2053
|
+
/* @__PURE__ */ jsx33(Button13, __spreadValues({ onClick: disclosure == null ? void 0 : disclosure[1].open, color: "indigo" }, buttonProps)),
|
2054
|
+
/* @__PURE__ */ jsx33(
|
2055
|
+
Modal11,
|
2056
|
+
__spreadProps(__spreadValues({
|
2057
|
+
opened: disclosure == null ? void 0 : disclosure[0],
|
2058
|
+
onClose: disclosure[1].close
|
2059
|
+
}, modalProps), {
|
2060
|
+
children: /* @__PURE__ */ jsx33(MyFlexColumn, { children })
|
2061
|
+
})
|
2062
|
+
)
|
2063
|
+
] });
|
2064
|
+
}
|
2065
|
+
|
1865
2066
|
// src/components/Buttons/ButtonPrintPDF/MyButtonPrintPDF.tsx
|
1866
2067
|
import { useRef as useRef2 } from "react";
|
1867
|
-
import { Button as
|
1868
|
-
import { IconPrinter as
|
2068
|
+
import { Button as Button14 } from "@mantine/core";
|
2069
|
+
import { IconPrinter as IconPrinter4 } from "@tabler/icons-react";
|
1869
2070
|
import { useReactToPrint } from "react-to-print";
|
1870
|
-
import { Fragment as
|
2071
|
+
import { Fragment as Fragment12, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
1871
2072
|
function MyButtonPrintPDF(_a) {
|
1872
2073
|
var _b = _a, { contentToPrint, children } = _b, rest = __objRest(_b, ["contentToPrint", "children"]);
|
1873
2074
|
const printRef = useRef2(null);
|
@@ -1881,16 +2082,16 @@ function MyButtonPrintPDF(_a) {
|
|
1881
2082
|
if (!contentToPrint) return;
|
1882
2083
|
handlePrint();
|
1883
2084
|
}
|
1884
|
-
return /* @__PURE__ */
|
1885
|
-
/* @__PURE__ */
|
1886
|
-
/* @__PURE__ */
|
2085
|
+
return /* @__PURE__ */ jsxs20(Fragment12, { children: [
|
2086
|
+
/* @__PURE__ */ jsx34("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx34("div", { ref: printRef, children: contentToPrint }) }),
|
2087
|
+
/* @__PURE__ */ jsx34(Button14, __spreadProps(__spreadValues({ color: "orange", onClick: handleClick, leftSection: /* @__PURE__ */ jsx34(IconPrinter4, {}) }, rest), { children }))
|
1887
2088
|
] });
|
1888
2089
|
}
|
1889
2090
|
|
1890
2091
|
// src/components/Layouts/HtmlWrapper/MyHtmlWrapper.tsx
|
1891
2092
|
import { ScrollArea, TypographyStylesProvider } from "@mantine/core";
|
1892
2093
|
import pako from "pako";
|
1893
|
-
import { jsx as
|
2094
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
1894
2095
|
function MyHtmlWrapper(_a) {
|
1895
2096
|
var _b = _a, { html, mah, zip = false } = _b, rest = __objRest(_b, ["html", "mah", "zip"]);
|
1896
2097
|
const extractHtmlFromZip = () => {
|
@@ -1899,7 +2100,7 @@ function MyHtmlWrapper(_a) {
|
|
1899
2100
|
const cleanedHtml = decompressedData == null ? void 0 : decompressedData.replaceAll(" font-family:'Times New Roman'; font-size:1em;", "");
|
1900
2101
|
return cleanedHtml.replaceAll(" font-family:'Times New Roman'; font-size:1em;", "");
|
1901
2102
|
};
|
1902
|
-
return /* @__PURE__ */
|
2103
|
+
return /* @__PURE__ */ jsx35(ScrollArea.Autosize, { mah, children: /* @__PURE__ */ jsx35(TypographyStylesProvider, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsx35(
|
1903
2104
|
"div",
|
1904
2105
|
{
|
1905
2106
|
dangerouslySetInnerHTML: {
|
@@ -1911,7 +2112,7 @@ function MyHtmlWrapper(_a) {
|
|
1911
2112
|
|
1912
2113
|
// src/components/Buttons/ButtonPrintPDFTable/MyButtonPrintTablePDF.tsx
|
1913
2114
|
import { Box, Table as Table2 } from "@mantine/core";
|
1914
|
-
import { jsx as
|
2115
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
1915
2116
|
function MyButtonPrintTablePDF(_a) {
|
1916
2117
|
var _b = _a, {
|
1917
2118
|
printConfig,
|
@@ -1937,8 +2138,8 @@ function MyButtonPrintTablePDF(_a) {
|
|
1937
2138
|
};
|
1938
2139
|
const rows = data == null ? void 0 : data.map((item, index) => {
|
1939
2140
|
if (!(printConfig == null ? void 0 : printConfig.fields)) return null;
|
1940
|
-
return /* @__PURE__ */
|
1941
|
-
printConfig.showRowNumbers && /* @__PURE__ */
|
2141
|
+
return /* @__PURE__ */ jsxs21(Table2.Tr, { children: [
|
2142
|
+
printConfig.showRowNumbers && /* @__PURE__ */ jsx36(Table2.Td, { ta: "center", px: "xs", style: { border: "1px solid lightgray" }, children: index + 1 }),
|
1942
2143
|
printConfig.fields.map((field) => {
|
1943
2144
|
let value = item[field.fieldName];
|
1944
2145
|
if (field.formatFunction) {
|
@@ -1948,30 +2149,30 @@ function MyButtonPrintTablePDF(_a) {
|
|
1948
2149
|
}
|
1949
2150
|
const alignment = field.isCenter === false ? "left" : "center";
|
1950
2151
|
if (typeof value === "string" && (value.includes("<") || value.includes("<"))) {
|
1951
|
-
return /* @__PURE__ */
|
2152
|
+
return /* @__PURE__ */ jsx36(
|
1952
2153
|
Table2.Td,
|
1953
2154
|
{
|
1954
2155
|
px: "xs",
|
1955
2156
|
ta: alignment,
|
1956
2157
|
style: { border: "1px solid lightgray" },
|
1957
|
-
children: /* @__PURE__ */
|
2158
|
+
children: /* @__PURE__ */ jsx36(MyHtmlWrapper, { html: value })
|
1958
2159
|
},
|
1959
2160
|
field.fieldName
|
1960
2161
|
);
|
1961
2162
|
}
|
1962
2163
|
if (value === "true" || value === "false") {
|
1963
|
-
return /* @__PURE__ */
|
2164
|
+
return /* @__PURE__ */ jsx36(
|
1964
2165
|
Table2.Td,
|
1965
2166
|
{
|
1966
2167
|
ta: alignment,
|
1967
2168
|
px: "xs",
|
1968
2169
|
style: { border: "1px solid lightgray" },
|
1969
|
-
children: /* @__PURE__ */
|
2170
|
+
children: /* @__PURE__ */ jsx36("input", { type: "checkbox", checked: value === "true", readOnly: true })
|
1970
2171
|
},
|
1971
2172
|
field.fieldName
|
1972
2173
|
);
|
1973
2174
|
}
|
1974
|
-
return /* @__PURE__ */
|
2175
|
+
return /* @__PURE__ */ jsx36(
|
1975
2176
|
Table2.Td,
|
1976
2177
|
{
|
1977
2178
|
ta: alignment,
|
@@ -1995,18 +2196,18 @@ function MyButtonPrintTablePDF(_a) {
|
|
1995
2196
|
minute: "2-digit"
|
1996
2197
|
});
|
1997
2198
|
const tableTitle = (printConfig == null ? void 0 : printConfig.title) || "B\u1EA3ng d\u1EEF li\u1EC7u";
|
1998
|
-
return /* @__PURE__ */
|
1999
|
-
/* @__PURE__ */
|
2199
|
+
return /* @__PURE__ */ jsxs21(Box, { p: "lg", children: [
|
2200
|
+
/* @__PURE__ */ jsxs21("div", { style: { textAlign: "center", marginTop: "10px", fontStyle: "italic", color: "#666" }, children: [
|
2000
2201
|
"Ng\xE0y in: ",
|
2001
2202
|
formattedDate
|
2002
2203
|
] }),
|
2003
|
-
/* @__PURE__ */
|
2004
|
-
/* @__PURE__ */
|
2005
|
-
/* @__PURE__ */
|
2006
|
-
printConfig.showRowNumbers && /* @__PURE__ */
|
2204
|
+
/* @__PURE__ */ jsx36("h2", { style: { textAlign: "center", fontSize: "24px", fontWeight: "bold", marginBottom: "20px" }, children: tableTitle }),
|
2205
|
+
/* @__PURE__ */ jsxs21(Table2, { withColumnBorders: true, highlightOnHover: true, style: { border: "1px solid lightgray" }, children: [
|
2206
|
+
/* @__PURE__ */ jsx36(Table2.Thead, { children: /* @__PURE__ */ jsxs21(Table2.Tr, { children: [
|
2207
|
+
printConfig.showRowNumbers && /* @__PURE__ */ jsx36(Table2.Th, { style: { border: "1px solid lightgray" }, w: "10%", ta: "center", px: "xs", children: "STT" }),
|
2007
2208
|
printConfig.fields.map((field) => {
|
2008
2209
|
const alignment = field.isCenter === false ? "left" : "center";
|
2009
|
-
return /* @__PURE__ */
|
2210
|
+
return /* @__PURE__ */ jsx36(
|
2010
2211
|
Table2.Th,
|
2011
2212
|
{
|
2012
2213
|
style: { border: "1px solid lightgray" },
|
@@ -2018,11 +2219,11 @@ function MyButtonPrintTablePDF(_a) {
|
|
2018
2219
|
);
|
2019
2220
|
})
|
2020
2221
|
] }) }),
|
2021
|
-
/* @__PURE__ */
|
2222
|
+
/* @__PURE__ */ jsx36(Table2.Tbody, { children: rows })
|
2022
2223
|
] })
|
2023
2224
|
] });
|
2024
2225
|
};
|
2025
|
-
return /* @__PURE__ */
|
2226
|
+
return /* @__PURE__ */ jsx36(
|
2026
2227
|
MyButtonPrintPDF,
|
2027
2228
|
__spreadValues({
|
2028
2229
|
contentToPrint: renderContent()
|
@@ -2031,15 +2232,15 @@ function MyButtonPrintTablePDF(_a) {
|
|
2031
2232
|
}
|
2032
2233
|
|
2033
2234
|
// src/components/Buttons/ButtonRouterBack/MyButtonRouterBack.tsx
|
2034
|
-
import { ActionIcon as
|
2235
|
+
import { ActionIcon as ActionIcon11 } from "@mantine/core";
|
2035
2236
|
import { IconArrowBack } from "@tabler/icons-react";
|
2036
2237
|
import { useRouter as useRouter2 } from "next/navigation";
|
2037
|
-
import { jsx as
|
2238
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
2038
2239
|
function MyButtonRouterBack(_a) {
|
2039
2240
|
var _b = _a, { url, label } = _b, rest = __objRest(_b, ["url", "label"]);
|
2040
2241
|
const router = useRouter2();
|
2041
|
-
return /* @__PURE__ */
|
2042
|
-
|
2242
|
+
return /* @__PURE__ */ jsx37(
|
2243
|
+
ActionIcon11,
|
2043
2244
|
__spreadProps(__spreadValues({
|
2044
2245
|
size: "xl",
|
2045
2246
|
variant: "light",
|
@@ -2051,18 +2252,18 @@ function MyButtonRouterBack(_a) {
|
|
2051
2252
|
router.back();
|
2052
2253
|
}
|
2053
2254
|
}, rest), {
|
2054
|
-
children: /* @__PURE__ */
|
2255
|
+
children: /* @__PURE__ */ jsx37(IconArrowBack, { stroke: 2 })
|
2055
2256
|
})
|
2056
2257
|
);
|
2057
2258
|
}
|
2058
2259
|
|
2059
2260
|
// src/components/Buttons/ButtonViewPDF/MyButtonViewPDF.tsx
|
2060
2261
|
import {
|
2061
|
-
ActionIcon as
|
2062
|
-
Button as
|
2262
|
+
ActionIcon as ActionIcon12,
|
2263
|
+
Button as Button15,
|
2063
2264
|
Group as Group9,
|
2064
2265
|
LoadingOverlay,
|
2065
|
-
Modal as
|
2266
|
+
Modal as Modal12,
|
2066
2267
|
Paper as Paper3,
|
2067
2268
|
Text as Text6,
|
2068
2269
|
Tooltip as Tooltip4
|
@@ -2071,7 +2272,7 @@ import { useDisclosure as useDisclosure11 } from "@mantine/hooks";
|
|
2071
2272
|
import { IconLivePhoto as IconLivePhoto2, IconMaximize as IconMaximize3, IconMinimize as IconMinimize3 } from "@tabler/icons-react";
|
2072
2273
|
import { useQuery } from "@tanstack/react-query";
|
2073
2274
|
import { useState as useState8 } from "react";
|
2074
|
-
import { Fragment as
|
2275
|
+
import { Fragment as Fragment13, jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
2075
2276
|
function MyButtonViewPDF({
|
2076
2277
|
id,
|
2077
2278
|
modalSize = "80%",
|
@@ -2096,57 +2297,57 @@ function MyButtonViewPDF({
|
|
2096
2297
|
},
|
2097
2298
|
enabled: disc[0] == true
|
2098
2299
|
});
|
2099
|
-
return /* @__PURE__ */
|
2100
|
-
/* @__PURE__ */
|
2101
|
-
|
2300
|
+
return /* @__PURE__ */ jsxs22(Fragment13, { children: [
|
2301
|
+
/* @__PURE__ */ jsx38(Tooltip4, { label: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp", children: isActionIcon ? /* @__PURE__ */ jsx38(
|
2302
|
+
ActionIcon12,
|
2102
2303
|
{
|
2103
2304
|
onClick: () => {
|
2104
2305
|
disc[1].open();
|
2105
2306
|
},
|
2106
|
-
children: /* @__PURE__ */
|
2307
|
+
children: /* @__PURE__ */ jsx38(IconLivePhoto2, {})
|
2107
2308
|
}
|
2108
|
-
) : /* @__PURE__ */
|
2109
|
-
|
2309
|
+
) : /* @__PURE__ */ jsx38(
|
2310
|
+
Button15,
|
2110
2311
|
{
|
2111
2312
|
color: "cyan",
|
2112
2313
|
onClick: () => {
|
2113
2314
|
disc[1].open();
|
2114
2315
|
},
|
2115
|
-
leftSection: /* @__PURE__ */
|
2316
|
+
leftSection: /* @__PURE__ */ jsx38(IconLivePhoto2, {}),
|
2116
2317
|
children: label
|
2117
2318
|
}
|
2118
2319
|
) }),
|
2119
|
-
/* @__PURE__ */
|
2120
|
-
|
2320
|
+
/* @__PURE__ */ jsx38(
|
2321
|
+
Modal12,
|
2121
2322
|
{
|
2122
2323
|
fullScreen: fullScreen[0],
|
2123
2324
|
opened: disc[0],
|
2124
2325
|
onClose: disc[1].close,
|
2125
2326
|
size: modalSize,
|
2126
|
-
title: /* @__PURE__ */
|
2127
|
-
/* @__PURE__ */
|
2128
|
-
fullScreen[0] ? /* @__PURE__ */
|
2129
|
-
|
2327
|
+
title: /* @__PURE__ */ jsxs22(Group9, { children: [
|
2328
|
+
/* @__PURE__ */ jsx38(Text6, { children: "Xem t\xE0i li\u1EC7u tr\u1EF1c ti\u1EBFp" }),
|
2329
|
+
fullScreen[0] ? /* @__PURE__ */ jsx38(
|
2330
|
+
ActionIcon12,
|
2130
2331
|
{
|
2131
2332
|
onClick: () => {
|
2132
2333
|
fullScreen[1](false);
|
2133
2334
|
hSize[1]("80vh");
|
2134
2335
|
},
|
2135
|
-
children: /* @__PURE__ */
|
2336
|
+
children: /* @__PURE__ */ jsx38(IconMinimize3, {})
|
2136
2337
|
}
|
2137
|
-
) : /* @__PURE__ */
|
2138
|
-
|
2338
|
+
) : /* @__PURE__ */ jsx38(
|
2339
|
+
ActionIcon12,
|
2139
2340
|
{
|
2140
2341
|
onClick: () => {
|
2141
2342
|
fullScreen[1](true);
|
2142
2343
|
hSize[1]("90vh");
|
2143
2344
|
},
|
2144
|
-
children: /* @__PURE__ */
|
2345
|
+
children: /* @__PURE__ */ jsx38(IconMaximize3, {})
|
2145
2346
|
}
|
2146
2347
|
)
|
2147
2348
|
] }),
|
2148
|
-
children: /* @__PURE__ */
|
2149
|
-
/* @__PURE__ */
|
2349
|
+
children: /* @__PURE__ */ jsxs22(Paper3, { h: hSize[0], p: "lg", pos: "relative", children: [
|
2350
|
+
/* @__PURE__ */ jsx38(
|
2150
2351
|
LoadingOverlay,
|
2151
2352
|
{
|
2152
2353
|
visible: query.isLoading,
|
@@ -2154,14 +2355,14 @@ function MyButtonViewPDF({
|
|
2154
2355
|
overlayProps: { radius: "sm", blur: 2 }
|
2155
2356
|
}
|
2156
2357
|
),
|
2157
|
-
query.data ? /* @__PURE__ */
|
2358
|
+
query.data ? /* @__PURE__ */ jsx38(
|
2158
2359
|
"iframe",
|
2159
2360
|
{
|
2160
2361
|
src: `data:application/pdf;base64, ${filePath ? (_a = query.data) == null ? void 0 : _a.fileBase64String : (_c = (_b = query.data) == null ? void 0 : _b.fileDetail) == null ? void 0 : _c.fileBase64String}`,
|
2161
2362
|
width: "100%",
|
2162
2363
|
height: "100%"
|
2163
2364
|
}
|
2164
|
-
) : /* @__PURE__ */
|
2365
|
+
) : /* @__PURE__ */ jsx38("iframe", { src, width: "100%", height: "100%" })
|
2165
2366
|
] })
|
2166
2367
|
}
|
2167
2368
|
)
|
@@ -2183,8 +2384,8 @@ var s;
|
|
2183
2384
|
var a;
|
2184
2385
|
var h;
|
2185
2386
|
var p = {};
|
2186
|
-
var
|
2187
|
-
var
|
2387
|
+
var y = [];
|
2388
|
+
var v = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
2188
2389
|
var w = Array.isArray;
|
2189
2390
|
function d(n3, l4) {
|
2190
2391
|
for (var u5 in l4) n3[u5] = l4[u5];
|
@@ -2196,7 +2397,7 @@ function g(n3) {
|
|
2196
2397
|
function _(l4, u5, t4) {
|
2197
2398
|
var i5, r4, o4, e4 = {};
|
2198
2399
|
for (o4 in u5) "key" == o4 ? i5 = u5[o4] : "ref" == o4 ? r4 = u5[o4] : e4[o4] = u5[o4];
|
2199
|
-
if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), "function" == typeof l4 && null != l4.defaultProps) for (o4 in l4.defaultProps)
|
2400
|
+
if (arguments.length > 2 && (e4.children = arguments.length > 3 ? n.call(arguments, 2) : t4), "function" == typeof l4 && null != l4.defaultProps) for (o4 in l4.defaultProps) null == e4[o4] && (e4[o4] = l4.defaultProps[o4]);
|
2200
2401
|
return m(l4, e4, i5, r4, null);
|
2201
2402
|
}
|
2202
2403
|
function m(n3, t4, i5, r4, o4) {
|
@@ -2232,14 +2433,14 @@ function $() {
|
|
2232
2433
|
$.__r = 0;
|
2233
2434
|
}
|
2234
2435
|
function I(n3, l4, u5, t4, i5, r4, o4, e4, f5, c4, s4) {
|
2235
|
-
var
|
2236
|
-
for (f5 = P(u5, l4, _5, f5, m4),
|
2436
|
+
var a5, h4, v5, w5, d5, g6, _5 = t4 && t4.__k || y, m4 = l4.length;
|
2437
|
+
for (f5 = P(u5, l4, _5, f5, m4), a5 = 0; a5 < m4; a5++) null != (v5 = u5.__k[a5]) && (h4 = -1 == v5.__i ? p : _5[v5.__i] || p, v5.__i = a5, g6 = O(n3, v5, h4, i5, r4, o4, e4, f5, c4, s4), w5 = v5.__e, v5.ref && h4.ref != v5.ref && (h4.ref && q(h4.ref, null, v5), s4.push(v5.ref, v5.__c || w5, v5)), null == d5 && null != w5 && (d5 = w5), 4 & v5.__u || h4.__k === v5.__k ? f5 = A(v5, f5, n3) : "function" == typeof v5.type && void 0 !== g6 ? f5 = g6 : w5 && (f5 = w5.nextSibling), v5.__u &= -7);
|
2237
2438
|
return u5.__e = d5, f5;
|
2238
2439
|
}
|
2239
2440
|
function P(n3, l4, u5, t4, i5) {
|
2240
|
-
var r4, o4, e4, f5, c4, s4 = u5.length,
|
2241
|
-
for (n3.__k = new Array(i5), r4 = 0; r4 < i5; r4++) null != (o4 = l4[r4]) && "boolean" != typeof o4 && "function" != typeof o4 ? (f5 = r4 +
|
2242
|
-
if (
|
2441
|
+
var r4, o4, e4, f5, c4, s4 = u5.length, a5 = s4, h4 = 0;
|
2442
|
+
for (n3.__k = new Array(i5), r4 = 0; r4 < i5; r4++) null != (o4 = l4[r4]) && "boolean" != typeof o4 && "function" != typeof o4 ? (f5 = r4 + h4, (o4 = n3.__k[r4] = "string" == typeof o4 || "number" == typeof o4 || "bigint" == typeof o4 || o4.constructor == String ? m(null, o4, null, null, null) : w(o4) ? m(k, { children: o4 }, null, null, null) : null == o4.constructor && o4.__b > 0 ? m(o4.type, o4.props, o4.key, o4.ref ? o4.ref : null, o4.__v) : o4).__ = n3, o4.__b = n3.__b + 1, e4 = null, -1 != (c4 = o4.__i = L(o4, u5, f5, a5)) && (a5--, (e4 = u5[c4]) && (e4.__u |= 2)), null == e4 || null == e4.__v ? (-1 == c4 && (i5 > s4 ? h4-- : i5 < s4 && h4++), "function" != typeof o4.type && (o4.__u |= 4)) : c4 != f5 && (c4 == f5 - 1 ? h4-- : c4 == f5 + 1 ? h4++ : (c4 > f5 ? h4-- : h4++, o4.__u |= 4))) : n3.__k[r4] = null;
|
2443
|
+
if (a5) for (r4 = 0; r4 < s4; r4++) null != (e4 = u5[r4]) && 0 == (2 & e4.__u) && (e4.__e == t4 && (t4 = S(e4)), B(e4, e4));
|
2243
2444
|
return t4;
|
2244
2445
|
}
|
2245
2446
|
function A(n3, l4, u5) {
|
@@ -2275,16 +2476,16 @@ function L(n3, l4, u5, t4) {
|
|
2275
2476
|
return -1;
|
2276
2477
|
}
|
2277
2478
|
function T(n3, l4, u5) {
|
2278
|
-
"-" == l4[0] ? n3.setProperty(l4, null == u5 ? "" : u5) : n3[l4] = null == u5 ? "" : "number" != typeof u5 ||
|
2479
|
+
"-" == l4[0] ? n3.setProperty(l4, null == u5 ? "" : u5) : n3[l4] = null == u5 ? "" : "number" != typeof u5 || v.test(l4) ? u5 : u5 + "px";
|
2279
2480
|
}
|
2280
2481
|
function j(n3, l4, u5, t4, i5) {
|
2281
|
-
var r4
|
2482
|
+
var r4;
|
2282
2483
|
n: if ("style" == l4) if ("string" == typeof u5) n3.style.cssText = u5;
|
2283
2484
|
else {
|
2284
2485
|
if ("string" == typeof t4 && (n3.style.cssText = t4 = ""), t4) for (l4 in t4) u5 && l4 in u5 || T(n3.style, l4, "");
|
2285
2486
|
if (u5) for (l4 in u5) t4 && u5[l4] == t4[l4] || T(n3.style, l4, u5[l4]);
|
2286
2487
|
}
|
2287
|
-
else if ("o" == l4[0] && "n" == l4[1]) r4 = l4 != (l4 = l4.replace(f, "$1")),
|
2488
|
+
else if ("o" == l4[0] && "n" == l4[1]) r4 = l4 != (l4 = l4.replace(f, "$1")), l4 = l4.toLowerCase() in n3 || "onFocusOut" == l4 || "onFocusIn" == l4 ? l4.toLowerCase().slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + r4] = u5, u5 ? t4 ? u5.u = t4.u : (u5.u = c, n3.addEventListener(l4, r4 ? a : s, r4)) : n3.removeEventListener(l4, r4 ? a : s, r4);
|
2288
2489
|
else {
|
2289
2490
|
if ("http://www.w3.org/2000/svg" == i5) l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
2290
2491
|
else if ("width" != l4 && "height" != l4 && "href" != l4 && "list" != l4 && "form" != l4 && "tabIndex" != l4 && "download" != l4 && "rowSpan" != l4 && "colSpan" != l4 && "role" != l4 && "popover" != l4 && l4 in n3) try {
|
@@ -2306,40 +2507,40 @@ function F(n3) {
|
|
2306
2507
|
};
|
2307
2508
|
}
|
2308
2509
|
function O(n3, u5, t4, i5, r4, o4, e4, f5, c4, s4) {
|
2309
|
-
var
|
2510
|
+
var a5, h4, p5, y5, v5, _5, m4, b4, S2, C3, M2, $3, P4, A5, H3, L2, T4, j4 = u5.type;
|
2310
2511
|
if (null != u5.constructor) return null;
|
2311
|
-
128 & t4.__u && (c4 = !!(32 & t4.__u), o4 = [f5 = u5.__e = t4.__e]), (
|
2512
|
+
128 & t4.__u && (c4 = !!(32 & t4.__u), o4 = [f5 = u5.__e = t4.__e]), (a5 = l.__b) && a5(u5);
|
2312
2513
|
n: if ("function" == typeof j4) try {
|
2313
|
-
if (b4 = u5.props, S2 = "prototype" in j4 && j4.prototype.render, C3 = (
|
2514
|
+
if (b4 = u5.props, S2 = "prototype" in j4 && j4.prototype.render, C3 = (a5 = j4.contextType) && i5[a5.__c], M2 = a5 ? C3 ? C3.props.value : a5.__ : i5, t4.__c ? m4 = (h4 = u5.__c = t4.__c).__ = h4.__E : (S2 ? u5.__c = h4 = new j4(b4, M2) : (u5.__c = h4 = new x(b4, M2), h4.constructor = j4, h4.render = D), C3 && C3.sub(h4), h4.props = b4, h4.state || (h4.state = {}), h4.context = M2, h4.__n = i5, p5 = h4.__d = true, h4.__h = [], h4._sb = []), S2 && null == h4.__s && (h4.__s = h4.state), S2 && null != j4.getDerivedStateFromProps && (h4.__s == h4.state && (h4.__s = d({}, h4.__s)), d(h4.__s, j4.getDerivedStateFromProps(b4, h4.__s))), y5 = h4.props, v5 = h4.state, h4.__v = u5, p5) S2 && null == j4.getDerivedStateFromProps && null != h4.componentWillMount && h4.componentWillMount(), S2 && null != h4.componentDidMount && h4.__h.push(h4.componentDidMount);
|
2314
2515
|
else {
|
2315
|
-
if (S2 && null == j4.getDerivedStateFromProps && b4 !==
|
2316
|
-
for (u5.__v != t4.__v && (
|
2516
|
+
if (S2 && null == j4.getDerivedStateFromProps && b4 !== y5 && null != h4.componentWillReceiveProps && h4.componentWillReceiveProps(b4, M2), !h4.__e && null != h4.shouldComponentUpdate && false === h4.shouldComponentUpdate(b4, h4.__s, M2) || u5.__v == t4.__v) {
|
2517
|
+
for (u5.__v != t4.__v && (h4.props = b4, h4.state = h4.__s, h4.__d = false), u5.__e = t4.__e, u5.__k = t4.__k, u5.__k.some(function(n4) {
|
2317
2518
|
n4 && (n4.__ = u5);
|
2318
|
-
}), $3 = 0; $3 <
|
2319
|
-
|
2519
|
+
}), $3 = 0; $3 < h4._sb.length; $3++) h4.__h.push(h4._sb[$3]);
|
2520
|
+
h4._sb = [], h4.__h.length && e4.push(h4);
|
2320
2521
|
break n;
|
2321
2522
|
}
|
2322
|
-
null !=
|
2323
|
-
|
2523
|
+
null != h4.componentWillUpdate && h4.componentWillUpdate(b4, h4.__s, M2), S2 && null != h4.componentDidUpdate && h4.__h.push(function() {
|
2524
|
+
h4.componentDidUpdate(y5, v5, _5);
|
2324
2525
|
});
|
2325
2526
|
}
|
2326
|
-
if (
|
2327
|
-
for (
|
2328
|
-
|
2527
|
+
if (h4.context = M2, h4.props = b4, h4.__P = n3, h4.__e = false, P4 = l.__r, A5 = 0, S2) {
|
2528
|
+
for (h4.state = h4.__s, h4.__d = false, P4 && P4(u5), a5 = h4.render(h4.props, h4.state, h4.context), H3 = 0; H3 < h4._sb.length; H3++) h4.__h.push(h4._sb[H3]);
|
2529
|
+
h4._sb = [];
|
2329
2530
|
} else do {
|
2330
|
-
|
2331
|
-
} while (
|
2332
|
-
|
2531
|
+
h4.__d = false, P4 && P4(u5), a5 = h4.render(h4.props, h4.state, h4.context), h4.state = h4.__s;
|
2532
|
+
} while (h4.__d && ++A5 < 25);
|
2533
|
+
h4.state = h4.__s, null != h4.getChildContext && (i5 = d(d({}, i5), h4.getChildContext())), S2 && !p5 && null != h4.getSnapshotBeforeUpdate && (_5 = h4.getSnapshotBeforeUpdate(y5, v5)), L2 = a5, null != a5 && a5.type === k && null == a5.key && (L2 = N(a5.props.children)), f5 = I(n3, w(L2) ? L2 : [L2], u5, t4, i5, r4, o4, e4, f5, c4, s4), h4.base = u5.__e, u5.__u &= -161, h4.__h.length && e4.push(h4), m4 && (h4.__E = h4.__ = null);
|
2333
2534
|
} catch (n4) {
|
2334
2535
|
if (u5.__v = null, c4 || null != o4) if (n4.then) {
|
2335
2536
|
for (u5.__u |= c4 ? 160 : 128; f5 && 8 == f5.nodeType && f5.nextSibling; ) f5 = f5.nextSibling;
|
2336
2537
|
o4[o4.indexOf(f5)] = null, u5.__e = f5;
|
2337
|
-
} else for (
|
2538
|
+
} else for (T4 = o4.length; T4--; ) g(o4[T4]);
|
2338
2539
|
else u5.__e = t4.__e, u5.__k = t4.__k;
|
2339
2540
|
l.__e(n4, u5, t4);
|
2340
2541
|
}
|
2341
2542
|
else null == o4 && u5.__v == t4.__v ? (u5.__k = t4.__k, u5.__e = t4.__e) : f5 = u5.__e = V(t4.__e, u5, t4, i5, r4, o4, e4, c4, s4);
|
2342
|
-
return (
|
2543
|
+
return (a5 = l.diffed) && a5(u5), 128 & u5.__u ? void 0 : f5;
|
2343
2544
|
}
|
2344
2545
|
function z(n3, u5, t4) {
|
2345
2546
|
for (var i5 = 0; i5 < t4.length; i5++) q(t4[i5], t4[++i5], t4[++i5]);
|
@@ -2357,10 +2558,10 @@ function N(n3) {
|
|
2357
2558
|
return "object" != typeof n3 || null == n3 || n3.__b && n3.__b > 0 ? n3 : w(n3) ? n3.map(N) : d({}, n3);
|
2358
2559
|
}
|
2359
2560
|
function V(u5, t4, i5, r4, o4, e4, f5, c4, s4) {
|
2360
|
-
var
|
2561
|
+
var a5, h4, y5, v5, d5, _5, m4, b4 = i5.props, k4 = t4.props, x3 = t4.type;
|
2361
2562
|
if ("svg" == x3 ? o4 = "http://www.w3.org/2000/svg" : "math" == x3 ? o4 = "http://www.w3.org/1998/Math/MathML" : o4 || (o4 = "http://www.w3.org/1999/xhtml"), null != e4) {
|
2362
|
-
for (
|
2363
|
-
u5 = d5, e4[
|
2563
|
+
for (a5 = 0; a5 < e4.length; a5++) if ((d5 = e4[a5]) && "setAttribute" in d5 == !!x3 && (x3 ? d5.localName == x3 : 3 == d5.nodeType)) {
|
2564
|
+
u5 = d5, e4[a5] = null;
|
2364
2565
|
break;
|
2365
2566
|
}
|
2366
2567
|
}
|
@@ -2370,17 +2571,17 @@ function V(u5, t4, i5, r4, o4, e4, f5, c4, s4) {
|
|
2370
2571
|
}
|
2371
2572
|
if (null == x3) b4 === k4 || c4 && u5.data == k4 || (u5.data = k4);
|
2372
2573
|
else {
|
2373
|
-
if (e4 = e4 && n.call(u5.childNodes), b4 = i5.props || p, !c4 && null != e4) for (b4 = {},
|
2374
|
-
for (
|
2375
|
-
else if ("dangerouslySetInnerHTML" ==
|
2376
|
-
else if (!(
|
2377
|
-
if ("value" ==
|
2378
|
-
j(u5,
|
2574
|
+
if (e4 = e4 && n.call(u5.childNodes), b4 = i5.props || p, !c4 && null != e4) for (b4 = {}, a5 = 0; a5 < u5.attributes.length; a5++) b4[(d5 = u5.attributes[a5]).name] = d5.value;
|
2575
|
+
for (a5 in b4) if (d5 = b4[a5], "children" == a5) ;
|
2576
|
+
else if ("dangerouslySetInnerHTML" == a5) y5 = d5;
|
2577
|
+
else if (!(a5 in k4)) {
|
2578
|
+
if ("value" == a5 && "defaultValue" in k4 || "checked" == a5 && "defaultChecked" in k4) continue;
|
2579
|
+
j(u5, a5, null, d5, o4);
|
2379
2580
|
}
|
2380
|
-
for (
|
2381
|
-
if (
|
2382
|
-
else if (
|
2383
|
-
c4 || (
|
2581
|
+
for (a5 in k4) d5 = k4[a5], "children" == a5 ? v5 = d5 : "dangerouslySetInnerHTML" == a5 ? h4 = d5 : "value" == a5 ? _5 = d5 : "checked" == a5 ? m4 = d5 : c4 && "function" != typeof d5 || b4[a5] === d5 || j(u5, a5, d5, b4[a5], o4);
|
2582
|
+
if (h4) c4 || y5 && (h4.__html == y5.__html || h4.__html == u5.innerHTML) || (u5.innerHTML = h4.__html), t4.__k = [];
|
2583
|
+
else if (y5 && (u5.innerHTML = ""), I("template" == t4.type ? u5.content : u5, w(v5) ? v5 : [v5], t4, i5, r4, "foreignObject" == x3 ? "http://www.w3.org/1999/xhtml" : o4, e4, f5, e4 ? e4[0] : i5.__k && S(i5, 0), c4, s4), null != e4) for (a5 = e4.length; a5--; ) g(e4[a5]);
|
2584
|
+
c4 || (a5 = "value", "progress" == x3 && null == _5 ? u5.removeAttribute("value") : null != _5 && (_5 !== u5[a5] || "progress" == x3 && !_5 || "option" == x3 && _5 != b4[a5]) && j(u5, a5, _5, b4[a5], o4), a5 = "checked", null != m4 && m4 != u5[a5] && j(u5, a5, m4, b4[a5], o4));
|
2384
2585
|
}
|
2385
2586
|
return u5;
|
2386
2587
|
}
|
@@ -2437,7 +2638,7 @@ function K(n3) {
|
|
2437
2638
|
return n4.children(l5);
|
2438
2639
|
}).contextType = l4, l4;
|
2439
2640
|
}
|
2440
|
-
n =
|
2641
|
+
n = y.slice, l = { __e: function(n3, l4, u5, t4) {
|
2441
2642
|
for (var i5, r4, o4; l4 = l4.__; ) if ((i5 = l4.__c) && !i5.__) try {
|
2442
2643
|
if ((r4 = i5.constructor) && null != r4.getDerivedStateFromError && (i5.setState(r4.getDerivedStateFromError(n3)), o4 = i5.__d), null != i5.componentDidCatch && (i5.componentDidCatch(n3, t4 || {}), o4 = i5.__d), o4) return i5.__E = i5;
|
2443
2644
|
} catch (l5) {
|
@@ -2460,10 +2661,10 @@ var f2 = 0;
|
|
2460
2661
|
var i2 = Array.isArray;
|
2461
2662
|
function u2(e4, t4, n3, o4, i5, u5) {
|
2462
2663
|
t4 || (t4 = {});
|
2463
|
-
var
|
2464
|
-
if ("ref" in p5) for (c4 in p5 = {}, t4) "ref" == c4 ?
|
2465
|
-
var l4 = { type: e4, props: p5, key: n3, ref:
|
2466
|
-
if ("function" == typeof e4 && (
|
2664
|
+
var a5, c4, p5 = t4;
|
2665
|
+
if ("ref" in p5) for (c4 in p5 = {}, t4) "ref" == c4 ? a5 = t4[c4] : p5[c4] = t4[c4];
|
2666
|
+
var l4 = { type: e4, props: p5, key: n3, ref: a5, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f2, __i: -1, __u: 0, __source: i5, __self: u5 };
|
2667
|
+
if ("function" == typeof e4 && (a5 = e4.defaultProps)) for (c4 in a5) void 0 === p5[c4] && (p5[c4] = a5[c4]);
|
2467
2668
|
return l.vnode && l.vnode(l4), l4;
|
2468
2669
|
}
|
2469
2670
|
|
@@ -2590,7 +2791,7 @@ var k2 = "function" == typeof requestAnimationFrame;
|
|
2590
2791
|
function w2(n3) {
|
2591
2792
|
var t4, r4 = function() {
|
2592
2793
|
clearTimeout(u5), k2 && cancelAnimationFrame(t4), setTimeout(n3);
|
2593
|
-
}, u5 = setTimeout(r4,
|
2794
|
+
}, u5 = setTimeout(r4, 100);
|
2594
2795
|
k2 && (t4 = requestAnimationFrame(r4));
|
2595
2796
|
}
|
2596
2797
|
function z2(n3) {
|
@@ -2668,10 +2869,10 @@ l.unmount = function(n3) {
|
|
2668
2869
|
var e4 = t4.__c, r4 = this;
|
2669
2870
|
null == r4.o && (r4.o = []), r4.o.push(e4);
|
2670
2871
|
var u5 = j3(r4.__v), o4 = false, i5 = function() {
|
2671
|
-
o4 || (o4 = true, e4.__R = null, u5 ? u5(
|
2872
|
+
o4 || (o4 = true, e4.__R = null, u5 ? u5(c4) : c4());
|
2672
2873
|
};
|
2673
2874
|
e4.__R = i5;
|
2674
|
-
var
|
2875
|
+
var c4 = function() {
|
2675
2876
|
if (!--r4.__u) {
|
2676
2877
|
if (r4.state.__a) {
|
2677
2878
|
var n4 = r4.state.__a;
|
@@ -2749,8 +2950,8 @@ function on() {
|
|
2749
2950
|
l.event = function(n3) {
|
2750
2951
|
return en && (n3 = en(n3)), n3.persist = rn, n3.isPropagationStopped = un, n3.isDefaultPrevented = on, n3.nativeEvent = n3;
|
2751
2952
|
};
|
2752
|
-
var
|
2753
|
-
var
|
2953
|
+
var cn2;
|
2954
|
+
var ln = { enumerable: false, configurable: true, get: function() {
|
2754
2955
|
return this.class;
|
2755
2956
|
} };
|
2756
2957
|
var fn = l.vnode;
|
@@ -2758,28 +2959,28 @@ l.vnode = function(n3) {
|
|
2758
2959
|
"string" == typeof n3.type && function(n4) {
|
2759
2960
|
var t4 = n4.props, e4 = n4.type, u5 = {}, o4 = -1 === e4.indexOf("-");
|
2760
2961
|
for (var i5 in t4) {
|
2761
|
-
var
|
2762
|
-
if (!("value" === i5 && "defaultValue" in t4 && null ==
|
2763
|
-
var
|
2764
|
-
"defaultValue" === i5 && "value" in t4 && null == t4.value ? i5 = "value" : "download" === i5 && true ===
|
2962
|
+
var c4 = t4[i5];
|
2963
|
+
if (!("value" === i5 && "defaultValue" in t4 && null == c4 || Q && "children" === i5 && "noscript" === e4 || "class" === i5 || "className" === i5)) {
|
2964
|
+
var l4 = i5.toLowerCase();
|
2965
|
+
"defaultValue" === i5 && "value" in t4 && null == t4.value ? i5 = "value" : "download" === i5 && true === c4 ? c4 = "" : "translate" === l4 && "no" === c4 ? c4 = false : "o" === l4[0] && "n" === l4[1] ? "ondoubleclick" === l4 ? i5 = "ondblclick" : "onchange" !== l4 || "input" !== e4 && "textarea" !== e4 || X(t4.type) ? "onfocus" === l4 ? i5 = "onfocusin" : "onblur" === l4 ? i5 = "onfocusout" : J2.test(i5) && (i5 = l4) : l4 = i5 = "oninput" : o4 && G2.test(i5) ? i5 = i5.replace(K2, "-$&").toLowerCase() : null === c4 && (c4 = void 0), "oninput" === l4 && u5[i5 = l4] && (i5 = "oninputCapture"), u5[i5] = c4;
|
2765
2966
|
}
|
2766
2967
|
}
|
2767
2968
|
"select" == e4 && u5.multiple && Array.isArray(u5.value) && (u5.value = H(t4.children).forEach(function(n5) {
|
2768
2969
|
n5.props.selected = -1 != u5.value.indexOf(n5.props.value);
|
2769
2970
|
})), "select" == e4 && null != u5.defaultValue && (u5.value = H(t4.children).forEach(function(n5) {
|
2770
2971
|
n5.props.selected = u5.multiple ? -1 != u5.defaultValue.indexOf(n5.props.value) : u5.defaultValue == n5.props.value;
|
2771
|
-
})), t4.class && !t4.className ? (u5.class = t4.class, Object.defineProperty(u5, "className",
|
2972
|
+
})), t4.class && !t4.className ? (u5.class = t4.class, Object.defineProperty(u5, "className", ln)) : (t4.className && !t4.class || t4.class && t4.className) && (u5.class = u5.className = t4.className), n4.props = u5;
|
2772
2973
|
}(n3), n3.$$typeof = q3, fn && fn(n3);
|
2773
2974
|
};
|
2774
2975
|
var an = l.__r;
|
2775
2976
|
l.__r = function(n3) {
|
2776
|
-
an && an(n3),
|
2977
|
+
an && an(n3), cn2 = n3.__c;
|
2777
2978
|
};
|
2778
2979
|
var sn = l.diffed;
|
2779
2980
|
l.diffed = function(n3) {
|
2780
2981
|
sn && sn(n3);
|
2781
2982
|
var t4 = n3.props, e4 = n3.__e;
|
2782
|
-
null != e4 && "textarea" === n3.type && "value" in t4 && t4.value !== e4.value && (e4.value = null == t4.value ? "" : t4.value),
|
2983
|
+
null != e4 && "textarea" === n3.type && "value" in t4 && t4.value !== e4.value && (e4.value = null == t4.value ? "" : t4.value), cn2 = null;
|
2783
2984
|
};
|
2784
2985
|
|
2785
2986
|
// node_modules/@preact/signals-core/dist/signals-core.mjs
|
@@ -2824,15 +3025,6 @@ function o3(i5) {
|
|
2824
3025
|
}
|
2825
3026
|
var n2;
|
2826
3027
|
var s3;
|
2827
|
-
function h3(i5) {
|
2828
|
-
const t4 = n2;
|
2829
|
-
n2 = void 0;
|
2830
|
-
try {
|
2831
|
-
return i5();
|
2832
|
-
} finally {
|
2833
|
-
n2 = t4;
|
2834
|
-
}
|
2835
|
-
}
|
2836
3028
|
var r3 = 0;
|
2837
3029
|
var f4 = 0;
|
2838
3030
|
var e3 = 0;
|
@@ -2859,28 +3051,21 @@ function c3(i5) {
|
|
2859
3051
|
return t4;
|
2860
3052
|
}
|
2861
3053
|
}
|
2862
|
-
function u4(i5
|
3054
|
+
function u4(i5) {
|
2863
3055
|
this.v = i5;
|
2864
3056
|
this.i = 0;
|
2865
3057
|
this.n = void 0;
|
2866
3058
|
this.t = void 0;
|
2867
|
-
this.W = null == t4 ? void 0 : t4.watched;
|
2868
|
-
this.Z = null == t4 ? void 0 : t4.unwatched;
|
2869
3059
|
}
|
2870
3060
|
u4.prototype.brand = i4;
|
2871
3061
|
u4.prototype.h = function() {
|
2872
3062
|
return true;
|
2873
3063
|
};
|
2874
3064
|
u4.prototype.S = function(i5) {
|
2875
|
-
|
2876
|
-
|
2877
|
-
|
3065
|
+
if (this.t !== i5 && void 0 === i5.e) {
|
3066
|
+
i5.x = this.t;
|
3067
|
+
if (void 0 !== this.t) this.t.e = i5;
|
2878
3068
|
this.t = i5;
|
2879
|
-
if (void 0 !== t4) t4.e = i5;
|
2880
|
-
else h3(() => {
|
2881
|
-
var i6;
|
2882
|
-
null == (i6 = this.W) || i6.call(this);
|
2883
|
-
});
|
2884
3069
|
}
|
2885
3070
|
};
|
2886
3071
|
u4.prototype.U = function(i5) {
|
@@ -2894,13 +3079,7 @@ u4.prototype.U = function(i5) {
|
|
2894
3079
|
o4.e = t4;
|
2895
3080
|
i5.x = void 0;
|
2896
3081
|
}
|
2897
|
-
if (i5 === this.t)
|
2898
|
-
this.t = o4;
|
2899
|
-
if (void 0 === o4) h3(() => {
|
2900
|
-
var i6;
|
2901
|
-
null == (i6 = this.Z) || i6.call(this);
|
2902
|
-
});
|
2903
|
-
}
|
3082
|
+
if (i5 === this.t) this.t = o4;
|
2904
3083
|
}
|
2905
3084
|
};
|
2906
3085
|
u4.prototype.subscribe = function(i5) {
|
@@ -2950,8 +3129,8 @@ Object.defineProperty(u4.prototype, "value", { get() {
|
|
2950
3129
|
}
|
2951
3130
|
}
|
2952
3131
|
} });
|
2953
|
-
function d3(i5
|
2954
|
-
return new u4(i5
|
3132
|
+
function d3(i5) {
|
3133
|
+
return new u4(i5);
|
2955
3134
|
}
|
2956
3135
|
function v3(i5) {
|
2957
3136
|
for (let t4 = i5.s; void 0 !== t4; t4 = t4.n) if (t4.S.i !== t4.i || !t4.S.h() || t4.S.i !== t4.i) return true;
|
@@ -2984,17 +3163,14 @@ function y3(i5) {
|
|
2984
3163
|
}
|
2985
3164
|
i5.s = t4;
|
2986
3165
|
}
|
2987
|
-
function a3(i5
|
3166
|
+
function a3(i5) {
|
2988
3167
|
u4.call(this, void 0);
|
2989
3168
|
this.x = i5;
|
2990
3169
|
this.s = void 0;
|
2991
3170
|
this.g = e3 - 1;
|
2992
3171
|
this.f = 4;
|
2993
|
-
this.W = null == t4 ? void 0 : t4.watched;
|
2994
|
-
this.Z = null == t4 ? void 0 : t4.unwatched;
|
2995
3172
|
}
|
2996
|
-
a3.prototype = new u4()
|
2997
|
-
a3.prototype.h = function() {
|
3173
|
+
(a3.prototype = new u4()).h = function() {
|
2998
3174
|
this.f &= -3;
|
2999
3175
|
if (1 & this.f) return false;
|
3000
3176
|
if (32 == (36 & this.f)) return true;
|
@@ -3056,8 +3232,8 @@ Object.defineProperty(a3.prototype, "value", { get() {
|
|
3056
3232
|
if (16 & this.f) throw this.v;
|
3057
3233
|
return this.v;
|
3058
3234
|
} });
|
3059
|
-
function w3(i5
|
3060
|
-
return new a3(i5
|
3235
|
+
function w3(i5) {
|
3236
|
+
return new a3(i5);
|
3061
3237
|
}
|
3062
3238
|
function _3(i5) {
|
3063
3239
|
const o4 = i5.u;
|
@@ -3145,54 +3321,54 @@ function E3(i5) {
|
|
3145
3321
|
}
|
3146
3322
|
|
3147
3323
|
// node_modules/@preact/signals/dist/signals.mjs
|
3148
|
-
var
|
3324
|
+
var a4;
|
3325
|
+
var h3;
|
3149
3326
|
var d4;
|
3150
|
-
var p4;
|
3327
|
+
var p4 = [];
|
3151
3328
|
var m3 = [];
|
3152
|
-
var _4 = [];
|
3153
3329
|
E3(function() {
|
3154
|
-
|
3330
|
+
a4 = this.N;
|
3155
3331
|
})();
|
3156
|
-
function
|
3332
|
+
function _4(t4, e4) {
|
3157
3333
|
l[t4] = e4.bind(null, l[t4] || (() => {
|
3158
3334
|
}));
|
3159
3335
|
}
|
3160
|
-
function
|
3161
|
-
if (
|
3162
|
-
|
3336
|
+
function v4(t4) {
|
3337
|
+
if (d4) d4();
|
3338
|
+
d4 = t4 && t4.S();
|
3163
3339
|
}
|
3164
|
-
function
|
3340
|
+
function g5({ data: t4 }) {
|
3165
3341
|
const i5 = useSignal(t4);
|
3166
3342
|
i5.value = t4;
|
3167
|
-
const [
|
3168
|
-
let t5 = this,
|
3169
|
-
while (
|
3170
|
-
|
3343
|
+
const [o4, r4] = T2(() => {
|
3344
|
+
let t5 = this, n3 = this.__v;
|
3345
|
+
while (n3 = n3.__) if (n3.__c) {
|
3346
|
+
n3.__c.__$f |= 4;
|
3171
3347
|
break;
|
3172
3348
|
}
|
3173
|
-
const
|
3349
|
+
const o5 = w3(() => {
|
3174
3350
|
let t6 = i5.value.value;
|
3175
3351
|
return 0 === t6 ? 0 : true === t6 ? "" : t6 || "";
|
3176
|
-
}),
|
3177
|
-
this.N =
|
3178
|
-
if (
|
3179
|
-
const i6 =
|
3352
|
+
}), r5 = w3(() => !Array.isArray(o5.value) && !t(o5.value)), s4 = E3(function() {
|
3353
|
+
this.N = F4;
|
3354
|
+
if (r5.value) {
|
3355
|
+
const i6 = o5.value;
|
3180
3356
|
if (t5.__v && t5.__v.__e && 3 === t5.__v.__e.nodeType) t5.__v.__e.data = i6;
|
3181
3357
|
}
|
3182
|
-
}),
|
3358
|
+
}), c4 = this.__$u.d;
|
3183
3359
|
this.__$u.d = function() {
|
3184
|
-
|
3185
|
-
|
3360
|
+
s4();
|
3361
|
+
c4.call(this);
|
3186
3362
|
};
|
3187
|
-
return [
|
3363
|
+
return [r5, o5];
|
3188
3364
|
}, []);
|
3189
|
-
return
|
3365
|
+
return o4.value ? r4.peek() : r4.value;
|
3190
3366
|
}
|
3191
|
-
|
3192
|
-
Object.defineProperties(u4.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value:
|
3367
|
+
g5.displayName = "_st";
|
3368
|
+
Object.defineProperties(u4.prototype, { constructor: { configurable: true, value: void 0 }, type: { configurable: true, value: g5 }, props: { configurable: true, get() {
|
3193
3369
|
return { data: this };
|
3194
3370
|
} }, __b: { configurable: true, value: 1 } });
|
3195
|
-
|
3371
|
+
_4("__b", (t4, i5) => {
|
3196
3372
|
if ("string" == typeof i5.type) {
|
3197
3373
|
let t5, e4 = i5.props;
|
3198
3374
|
for (let n3 in e4) {
|
@@ -3207,38 +3383,36 @@ v4("__b", (t4, i5) => {
|
|
3207
3383
|
}
|
3208
3384
|
t4(i5);
|
3209
3385
|
});
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
}();
|
3228
|
-
}
|
3229
|
-
d4 = e4;
|
3230
|
-
g5(t5);
|
3386
|
+
_4("__r", (t4, i5) => {
|
3387
|
+
v4();
|
3388
|
+
let e4, n3 = i5.__c;
|
3389
|
+
if (n3) {
|
3390
|
+
n3.__$f &= -2;
|
3391
|
+
e4 = n3.__$u;
|
3392
|
+
if (void 0 === e4) n3.__$u = e4 = function(t5) {
|
3393
|
+
let i6;
|
3394
|
+
E3(function() {
|
3395
|
+
i6 = this;
|
3396
|
+
});
|
3397
|
+
i6.c = () => {
|
3398
|
+
n3.__$f |= 1;
|
3399
|
+
n3.setState({});
|
3400
|
+
};
|
3401
|
+
return i6;
|
3402
|
+
}();
|
3231
3403
|
}
|
3404
|
+
h3 = n3;
|
3405
|
+
v4(e4);
|
3232
3406
|
t4(i5);
|
3233
3407
|
});
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3408
|
+
_4("__e", (t4, i5, e4, n3) => {
|
3409
|
+
v4();
|
3410
|
+
h3 = void 0;
|
3237
3411
|
t4(i5, e4, n3);
|
3238
3412
|
});
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3413
|
+
_4("diffed", (t4, i5) => {
|
3414
|
+
v4();
|
3415
|
+
h3 = void 0;
|
3242
3416
|
let e4;
|
3243
3417
|
if ("string" == typeof i5.type && (e4 = i5.__e)) {
|
3244
3418
|
let t5 = i5.__np, n3 = i5.props;
|
@@ -3256,24 +3430,24 @@ v4("diffed", (t4, i5) => {
|
|
3256
3430
|
e4.U = i6;
|
3257
3431
|
}
|
3258
3432
|
for (let o4 in t5) {
|
3259
|
-
let
|
3260
|
-
if (void 0 ===
|
3261
|
-
|
3262
|
-
i6[o4] =
|
3263
|
-
} else
|
3433
|
+
let r4 = i6[o4], f5 = t5[o4];
|
3434
|
+
if (void 0 === r4) {
|
3435
|
+
r4 = b3(e4, o4, f5, n3);
|
3436
|
+
i6[o4] = r4;
|
3437
|
+
} else r4.o(f5, n3);
|
3264
3438
|
}
|
3265
3439
|
}
|
3266
3440
|
}
|
3267
3441
|
t4(i5);
|
3268
3442
|
});
|
3269
|
-
function
|
3270
|
-
const o4 = i5 in t4 && void 0 === t4.ownerSVGElement,
|
3443
|
+
function b3(t4, i5, e4, n3) {
|
3444
|
+
const o4 = i5 in t4 && void 0 === t4.ownerSVGElement, r4 = d3(e4);
|
3271
3445
|
return { o: (t5, i6) => {
|
3272
|
-
|
3446
|
+
r4.value = t5;
|
3273
3447
|
n3 = i6;
|
3274
3448
|
}, d: E3(function() {
|
3275
|
-
this.N =
|
3276
|
-
const e5 =
|
3449
|
+
this.N = F4;
|
3450
|
+
const e5 = r4.value.value;
|
3277
3451
|
if (n3[i5] !== e5) {
|
3278
3452
|
n3[i5] = e5;
|
3279
3453
|
if (o4) t4[i5] = e5;
|
@@ -3282,7 +3456,7 @@ function y4(t4, i5, e4, n3) {
|
|
3282
3456
|
}
|
3283
3457
|
}) };
|
3284
3458
|
}
|
3285
|
-
|
3459
|
+
_4("unmount", (t4, i5) => {
|
3286
3460
|
if ("string" == typeof i5.type) {
|
3287
3461
|
let t5 = i5.__e;
|
3288
3462
|
if (t5) {
|
@@ -3307,7 +3481,7 @@ v4("unmount", (t4, i5) => {
|
|
3307
3481
|
}
|
3308
3482
|
t4(i5);
|
3309
3483
|
});
|
3310
|
-
|
3484
|
+
_4("__h", (t4, i5, e4, n3) => {
|
3311
3485
|
if (n3 < 3 || 9 === n3) i5.__$f |= 2;
|
3312
3486
|
t4(i5, e4, n3);
|
3313
3487
|
});
|
@@ -3326,44 +3500,44 @@ x.prototype.shouldComponentUpdate = function(t4, i5) {
|
|
3326
3500
|
for (let i6 in this.props) if (!(i6 in t4)) return true;
|
3327
3501
|
return false;
|
3328
3502
|
};
|
3329
|
-
function useSignal(t4
|
3330
|
-
return T2(() => d3(t4
|
3503
|
+
function useSignal(t4) {
|
3504
|
+
return T2(() => d3(t4), []);
|
3331
3505
|
}
|
3332
|
-
var
|
3506
|
+
var y4 = "undefined" == typeof requestAnimationFrame ? setTimeout : function(t4) {
|
3333
3507
|
const i5 = () => {
|
3334
3508
|
clearTimeout(e4);
|
3335
3509
|
cancelAnimationFrame(n3);
|
3336
3510
|
t4();
|
3337
|
-
}, e4 = setTimeout(i5,
|
3511
|
+
}, e4 = setTimeout(i5, 100), n3 = requestAnimationFrame(i5);
|
3338
3512
|
};
|
3339
|
-
var
|
3513
|
+
var k3 = (t4) => {
|
3340
3514
|
queueMicrotask(() => {
|
3341
3515
|
queueMicrotask(t4);
|
3342
3516
|
});
|
3343
3517
|
};
|
3344
|
-
function
|
3518
|
+
function q4() {
|
3345
3519
|
o3(() => {
|
3346
3520
|
let t4;
|
3347
|
-
while (t4 =
|
3521
|
+
while (t4 = p4.shift()) a4.call(t4);
|
3348
3522
|
});
|
3349
3523
|
}
|
3350
|
-
function
|
3351
|
-
if (1 ===
|
3524
|
+
function A4() {
|
3525
|
+
if (1 === p4.push(this)) (l.requestAnimationFrame || y4)(q4);
|
3352
3526
|
}
|
3353
|
-
function
|
3527
|
+
function w4() {
|
3354
3528
|
o3(() => {
|
3355
3529
|
let t4;
|
3356
|
-
while (t4 =
|
3530
|
+
while (t4 = m3.shift()) a4.call(t4);
|
3357
3531
|
});
|
3358
3532
|
}
|
3359
|
-
function
|
3360
|
-
if (1 ===
|
3533
|
+
function F4() {
|
3534
|
+
if (1 === m3.push(this)) (l.requestAnimationFrame || k3)(w4);
|
3361
3535
|
}
|
3362
3536
|
function useSignalEffect(t4) {
|
3363
3537
|
const i5 = A2(t4);
|
3364
3538
|
i5.current = t4;
|
3365
3539
|
y2(() => E3(function() {
|
3366
|
-
this.N =
|
3540
|
+
this.N = A4;
|
3367
3541
|
return i5.current();
|
3368
3542
|
}), []);
|
3369
3543
|
}
|
@@ -4197,27 +4371,27 @@ function TimeGridEvent({ calendarEvent, dayBoundariesDateTime, isCopy, setMouseD
|
|
4197
4371
|
__html: ((_c = calendarEvent._customContent) === null || _c === void 0 ? void 0 : _c.timeGrid) || ""
|
4198
4372
|
} }), $app.config.plugins.resize && !((_d = calendarEvent._options) === null || _d === void 0 ? void 0 : _d.disableResize) && u2("div", { className: "sx__time-grid-event-resize-handle", onMouseDown: startResize })] }) }), eventCopy && u2(TimeGridEvent, { calendarEvent: eventCopy, isCopy: true, setMouseDown, dayBoundariesDateTime })] });
|
4199
4373
|
}
|
4200
|
-
var sortEventsByStartAndEnd = (
|
4201
|
-
if (
|
4202
|
-
if (
|
4374
|
+
var sortEventsByStartAndEnd = (a5, b4) => {
|
4375
|
+
if (a5.start === b4.start) {
|
4376
|
+
if (a5.end < b4.end)
|
4203
4377
|
return 1;
|
4204
|
-
if (
|
4378
|
+
if (a5.end > b4.end)
|
4205
4379
|
return -1;
|
4206
4380
|
return 0;
|
4207
4381
|
}
|
4208
|
-
if (
|
4382
|
+
if (a5.start < b4.start)
|
4209
4383
|
return -1;
|
4210
|
-
if (
|
4384
|
+
if (a5.start > b4.start)
|
4211
4385
|
return 1;
|
4212
4386
|
return 0;
|
4213
4387
|
};
|
4214
|
-
var sortEventsForMonthGrid = (
|
4215
|
-
const aStartDate = dateFromDateTime(
|
4388
|
+
var sortEventsForMonthGrid = (a5, b4) => {
|
4389
|
+
const aStartDate = dateFromDateTime(a5.start);
|
4216
4390
|
const bStartDate = dateFromDateTime(b4.start);
|
4217
|
-
const aEndDate = dateFromDateTime(
|
4391
|
+
const aEndDate = dateFromDateTime(a5.end);
|
4218
4392
|
const bEndDate = dateFromDateTime(b4.end);
|
4219
4393
|
if (aStartDate === bStartDate && aEndDate === bEndDate) {
|
4220
|
-
if (
|
4394
|
+
if (a5.start < b4.start)
|
4221
4395
|
return -1;
|
4222
4396
|
}
|
4223
4397
|
if (aStartDate === bStartDate) {
|
@@ -4233,33 +4407,22 @@ var sortEventsForMonthGrid = (a4, b4) => {
|
|
4233
4407
|
return 1;
|
4234
4408
|
return 0;
|
4235
4409
|
};
|
4236
|
-
var isEvent0Minutes = (e4) => {
|
4237
|
-
return (e4 === null || e4 === void 0 ? void 0 : e4.start) === (e4 === null || e4 === void 0 ? void 0 : e4.end) && DateFormats.DATE_TIME_STRING.test((e4 === null || e4 === void 0 ? void 0 : e4.start) || "");
|
4238
|
-
};
|
4239
|
-
var areEvents0MinutesAndConcurrent = (e1, e22) => {
|
4240
|
-
return isEvent0Minutes(e1) && isEvent0Minutes(e22) && (e1 === null || e1 === void 0 ? void 0 : e1.start) === (e22 === null || e22 === void 0 ? void 0 : e22.start);
|
4241
|
-
};
|
4242
4410
|
var handleEventConcurrency = (sortedEvents, concurrentEventsCache = [], currentIndex = 0) => {
|
4243
4411
|
for (let i5 = currentIndex; i5 < sortedEvents.length; i5++) {
|
4244
4412
|
const event = sortedEvents[i5];
|
4245
4413
|
const nextEvent = sortedEvents[i5 + 1];
|
4246
|
-
|
4247
|
-
if (concurrentEventsCache.length && (!nextEvent || concurrentEventsCache.every((e4) => e4.end <= nextEvent.start) && !areBothEventsZeroMinutes)) {
|
4414
|
+
if (concurrentEventsCache.length && (!nextEvent || concurrentEventsCache.every((e4) => e4.end <= nextEvent.start))) {
|
4248
4415
|
concurrentEventsCache.push(event);
|
4249
4416
|
for (let ii = 0; ii < concurrentEventsCache.length; ii++) {
|
4250
4417
|
const currentEvent = concurrentEventsCache[ii];
|
4251
4418
|
const NpreviousConcurrentEvents = concurrentEventsCache.filter((cachedEvent, index) => {
|
4252
4419
|
if (cachedEvent === currentEvent || index > ii)
|
4253
4420
|
return false;
|
4254
|
-
if (areEvents0MinutesAndConcurrent(cachedEvent, currentEvent))
|
4255
|
-
return true;
|
4256
4421
|
return cachedEvent.start <= currentEvent.start && cachedEvent.end > currentEvent.start;
|
4257
4422
|
}).length;
|
4258
4423
|
const NupcomingConcurrentEvents = concurrentEventsCache.filter((cachedEvent, index) => {
|
4259
4424
|
if (cachedEvent === currentEvent || index < ii)
|
4260
4425
|
return false;
|
4261
|
-
if (areEvents0MinutesAndConcurrent(cachedEvent, currentEvent))
|
4262
|
-
return true;
|
4263
4426
|
return cachedEvent.start < currentEvent.end && cachedEvent.end >= currentEvent.start;
|
4264
4427
|
}).length;
|
4265
4428
|
currentEvent._totalConcurrentEvents = NpreviousConcurrentEvents + NupcomingConcurrentEvents + 1;
|
@@ -4267,12 +4430,12 @@ var handleEventConcurrency = (sortedEvents, concurrentEventsCache = [], currentI
|
|
4267
4430
|
let maxOverlappingEvents = 0;
|
4268
4431
|
const timePoints = [];
|
4269
4432
|
concurrentEventsCache.forEach((cachedEvent) => {
|
4270
|
-
if (cachedEvent.end > currentEvent.start && cachedEvent.start < currentEvent.end
|
4433
|
+
if (cachedEvent.end > currentEvent.start && cachedEvent.start < currentEvent.end) {
|
4271
4434
|
timePoints.push({ time: cachedEvent.start, type: "start" });
|
4272
4435
|
timePoints.push({ time: cachedEvent.end, type: "end" });
|
4273
4436
|
}
|
4274
4437
|
});
|
4275
|
-
timePoints.sort((
|
4438
|
+
timePoints.sort((a5, b4) => a5.time.localeCompare(b4.time) || (a5.type === "end" ? -1 : 1));
|
4276
4439
|
let currentOverlap = 0;
|
4277
4440
|
timePoints.forEach((point) => {
|
4278
4441
|
if (point.type === "start") {
|
@@ -4287,7 +4450,7 @@ var handleEventConcurrency = (sortedEvents, concurrentEventsCache = [], currentI
|
|
4287
4450
|
concurrentEventsCache = [];
|
4288
4451
|
return handleEventConcurrency(sortedEvents, concurrentEventsCache, i5 + 1);
|
4289
4452
|
}
|
4290
|
-
if (nextEvent && event.end > nextEvent.start || concurrentEventsCache.some((e4) => e4.end > event.start)
|
4453
|
+
if (nextEvent && event.end > nextEvent.start || concurrentEventsCache.some((e4) => e4.end > event.start)) {
|
4291
4454
|
concurrentEventsCache.push(event);
|
4292
4455
|
return handleEventConcurrency(sortedEvents, concurrentEventsCache, i5 + 1);
|
4293
4456
|
}
|
@@ -5999,39 +6162,6 @@ var timePickerRoRO = {
|
|
5999
6162
|
"Select time": "Selecta\u021Bi ora"
|
6000
6163
|
};
|
6001
6164
|
var roRO = __spreadValues(__spreadValues(__spreadValues({}, datePickerRoRO), calendarRoRO), timePickerRoRO);
|
6002
|
-
var datePickerFaIR = {
|
6003
|
-
Date: "\u062A\u0627\u0631\u06CC\u062E",
|
6004
|
-
"MM/DD/YYYY": "MM/DD/YYYY",
|
6005
|
-
"Next month": "\u0645\u0627\u0647 \u0628\u0639\u062F",
|
6006
|
-
"Previous month": "\u0645\u0627\u0647 \u0642\u0628\u0644",
|
6007
|
-
"Choose Date": "\u0627\u0646\u062A\u062E\u0627\u0628 \u062A\u0627\u0631\u06CC\u062E"
|
6008
|
-
};
|
6009
|
-
var calendarFaIR = {
|
6010
|
-
Today: "\u0627\u0645\u0631\u0648\u0632",
|
6011
|
-
Month: "\u0645\u0627\u0647",
|
6012
|
-
Week: "\u0647\u0641\u062A\u0647",
|
6013
|
-
Day: "\u0631\u0648\u0632",
|
6014
|
-
"Select View": "\u0627\u0646\u062A\u062E\u0627\u0628 \u0646\u0645\u0627",
|
6015
|
-
events: "\u0631\u0648\u06CC\u062F\u0627\u062F\u0647\u0627",
|
6016
|
-
event: "\u0631\u0648\u06CC\u062F\u0627\u062F",
|
6017
|
-
"No events": "\u0631\u0648\u06CC\u062F\u0627\u062F\u06CC \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F",
|
6018
|
-
"Next period": "\u062F\u0648\u0631\u0647 \u0628\u0639\u062F\u06CC",
|
6019
|
-
"Previous period": "\u062F\u0648\u0631\u0647 \u0642\u0628\u0644\u06CC",
|
6020
|
-
to: "\u062A\u0627",
|
6021
|
-
"Full day- and multiple day events": "\u0631\u0648\u06CC\u062F\u0627\u062F\u0647\u0627\u06CC \u062A\u0645\u0627\u0645 \u0631\u0648\u0632 \u0648 \u0686\u0646\u062F \u0631\u0648\u0632\u0647",
|
6022
|
-
"Link to {{n}} more events on {{date}}": "\u0644\u06CC\u0646\u06A9 \u0628\u0647 {{n}} \u0631\u0648\u06CC\u062F\u0627\u062F \u0628\u06CC\u0634\u062A\u0631 \u062F\u0631 \u062A\u0627\u0631\u06CC\u062E {{date}}",
|
6023
|
-
"Link to 1 more event on {{date}}": "\u0644\u06CC\u0646\u06A9 \u0628\u0647 1 \u0631\u0648\u06CC\u062F\u0627\u062F \u0628\u06CC\u0634\u062A\u0631 \u062F\u0631 \u062A\u0627\u0631\u06CC\u062E {{date}}",
|
6024
|
-
CW: "\u0647\u0641\u062A\u0647 {{week}}"
|
6025
|
-
};
|
6026
|
-
var timePickerFaIR = {
|
6027
|
-
Time: "\u0632\u0645\u0627\u0646",
|
6028
|
-
AM: "\u0642.\u0638",
|
6029
|
-
PM: "\u0628.\u0638",
|
6030
|
-
Cancel: "\u0644\u063A\u0648",
|
6031
|
-
OK: "\u062A\u0627\u06CC\u06CC\u062F",
|
6032
|
-
"Select time": "\u0627\u0646\u062A\u062E\u0627\u0628 \u0632\u0645\u0627\u0646"
|
6033
|
-
};
|
6034
|
-
var faIR = __spreadValues(__spreadValues(__spreadValues({}, datePickerFaIR), calendarFaIR), timePickerFaIR);
|
6035
6165
|
var datePickerHeIL = {
|
6036
6166
|
Date: "\u05EA\u05B7\u05D0\u05B2\u05E8\u05B4\u05D9\u05DA",
|
6037
6167
|
"MM/DD/YYYY": "MM/DD/YYYY",
|
@@ -6433,7 +6563,10 @@ function MonthAgendaDay({ day, isActive, setActiveDate }) {
|
|
6433
6563
|
};
|
6434
6564
|
const isBeforeMinDate = !!($app.config.minDate.value && day.date < $app.config.minDate.value);
|
6435
6565
|
const isPastMaxDate = !!($app.config.maxDate.value && day.date > $app.config.maxDate.value);
|
6436
|
-
return u2("button", { type: "button", className: dayClasses.join(" "), onClick: (e4) => handleClick(e4, $app.config.callbacks.onClickAgendaDate), onDblClick: (e4) => handleClick(e4, $app.config.callbacks.onDoubleClickAgendaDate), disabled: isBeforeMinDate || isPastMaxDate, "aria-label": getLocalizedDate(day.date, $app.config.locale.value), tabIndex: hasFocus(day) ? 0 : -1, "data-agenda-focus": hasFocus(day) ? "true" : void 0, onKeyDown: handleKeyDown, children: [u2("div", { children: jsDate.getDate() }), u2("div", { className: "sx__month-agenda-day__event-icons", children: day.events.slice(0, 3).map((event) => u2("div", { style: {
|
6566
|
+
return u2("button", { type: "button", className: dayClasses.join(" "), onClick: (e4) => handleClick(e4, $app.config.callbacks.onClickAgendaDate), onDblClick: (e4) => handleClick(e4, $app.config.callbacks.onDoubleClickAgendaDate), disabled: isBeforeMinDate || isPastMaxDate, "aria-label": getLocalizedDate(day.date, $app.config.locale.value), tabIndex: hasFocus(day) ? 0 : -1, "data-agenda-focus": hasFocus(day) ? "true" : void 0, onKeyDown: handleKeyDown, children: [u2("div", { children: jsDate.getDate() }), u2("div", { className: "sx__month-agenda-day__event-icons", children: day.events.slice(0, 3).map((event) => u2("div", { style: {
|
6567
|
+
backgroundColor: `var(--sx-color-${event._color})`,
|
6568
|
+
filter: `brightness(1.6)`
|
6569
|
+
}, className: "sx__month-agenda-day__event-icon" })) })] });
|
6437
6570
|
}
|
6438
6571
|
function MonthAgendaWeek({ week, setActiveDate, activeDate }) {
|
6439
6572
|
const $app = x2(AppContext);
|
@@ -6584,7 +6717,7 @@ import { ScheduleXCalendar, useNextCalendarApp } from "@schedule-x/react";
|
|
6584
6717
|
import { Paper as Paper4, Text as Text7 } from "@mantine/core";
|
6585
6718
|
import "@schedule-x/theme-default/dist/index.css";
|
6586
6719
|
import { useEffect as useEffect6 } from "react";
|
6587
|
-
import { jsx as
|
6720
|
+
import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
6588
6721
|
function MyCalendar() {
|
6589
6722
|
const plugins = [createEventsServicePlugin(), createEventModalPlugin()];
|
6590
6723
|
const calendar = useNextCalendarApp({
|
@@ -6658,16 +6791,16 @@ function MyCalendar() {
|
|
6658
6791
|
useEffect6(() => {
|
6659
6792
|
calendar == null ? void 0 : calendar.events.getAll();
|
6660
6793
|
}, []);
|
6661
|
-
return /* @__PURE__ */
|
6794
|
+
return /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39(ScheduleXCalendar, { calendarApp: calendar, customComponents: {
|
6662
6795
|
timeGridEvent: ({ calendarEvent }) => {
|
6663
6796
|
console.log(calendarEvent);
|
6664
|
-
return /* @__PURE__ */
|
6665
|
-
/* @__PURE__ */
|
6797
|
+
return /* @__PURE__ */ jsx39(Paper4, { h: "100%", bg: calendarEvent.laLichThi ? "violet.2" : "blue.2", p: 4, children: /* @__PURE__ */ jsxs23(MyFlexColumn, { gap: 1, children: [
|
6798
|
+
/* @__PURE__ */ jsxs23(Text7, { size: "sm", fw: "bold", children: [
|
6666
6799
|
calendarEvent.laLichThi ? "(Thi) " : "(H\u1ECDc) ",
|
6667
6800
|
calendarEvent.title
|
6668
6801
|
] }),
|
6669
|
-
calendarEvent.laLichThi == false && /* @__PURE__ */
|
6670
|
-
/* @__PURE__ */
|
6802
|
+
calendarEvent.laLichThi == false && /* @__PURE__ */ jsx39(Text7, { size: "sm", children: calendarEvent.giangvien }),
|
6803
|
+
/* @__PURE__ */ jsx39(Text7, { size: "sm", children: calendarEvent.location })
|
6671
6804
|
] }) });
|
6672
6805
|
}
|
6673
6806
|
// eventModal: ({ calendarEvent }) => {
|
@@ -6682,31 +6815,31 @@ function MyCalendar() {
|
|
6682
6815
|
|
6683
6816
|
// src/components/CenterFull/MyCenterFull.tsx
|
6684
6817
|
import { Center as Center2, Group as Group10 } from "@mantine/core";
|
6685
|
-
import { jsx as
|
6818
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
6686
6819
|
function MyCenterFull({ children }) {
|
6687
|
-
return /* @__PURE__ */
|
6820
|
+
return /* @__PURE__ */ jsx40(Center2, { w: "100%", children: /* @__PURE__ */ jsx40(Group10, { children }) });
|
6688
6821
|
}
|
6689
6822
|
|
6690
6823
|
// src/components/Checkbox/MyCheckbox.tsx
|
6691
6824
|
import { Checkbox as Checkbox2 } from "@mantine/core";
|
6692
|
-
import { jsx as
|
6825
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
6693
6826
|
function MyCheckbox(_a) {
|
6694
6827
|
var rest = __objRest(_a, []);
|
6695
|
-
return /* @__PURE__ */
|
6828
|
+
return /* @__PURE__ */ jsx41(Checkbox2, __spreadValues({}, rest));
|
6696
6829
|
}
|
6697
6830
|
|
6698
6831
|
// src/components/Layouts/FlexRow/MyFlexRow.tsx
|
6699
6832
|
import { Flex as Flex2 } from "@mantine/core";
|
6700
|
-
import { jsx as
|
6833
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
6701
6834
|
function MyFlexRow(_a) {
|
6702
6835
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
6703
|
-
return /* @__PURE__ */
|
6836
|
+
return /* @__PURE__ */ jsx42(Flex2, __spreadProps(__spreadValues({ gap: "md", align: "center" }, rest), { children }));
|
6704
6837
|
}
|
6705
6838
|
|
6706
6839
|
// src/components/DataDisplay/Card/AQCard.tsx
|
6707
6840
|
import { Badge as Badge2, Card, Center as Center3, Image, Text as Text8 } from "@mantine/core";
|
6708
6841
|
import Link from "next/link";
|
6709
|
-
import { jsx as
|
6842
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
6710
6843
|
function AQCard({
|
6711
6844
|
imgSrc = "https://raw.githubusercontent.com/mantinedev/mantine/master/.demo/images/bg-8.png",
|
6712
6845
|
title,
|
@@ -6716,8 +6849,8 @@ function AQCard({
|
|
6716
6849
|
status,
|
6717
6850
|
href = ""
|
6718
6851
|
}) {
|
6719
|
-
return /* @__PURE__ */
|
6720
|
-
/* @__PURE__ */
|
6852
|
+
return /* @__PURE__ */ jsxs24(Card, { shadow: "sm", padding: "lg", radius: "md", withBorder: true, component: Link, href, children: [
|
6853
|
+
/* @__PURE__ */ jsx43(Card.Section, { children: /* @__PURE__ */ jsx43(Center3, { children: /* @__PURE__ */ jsx43(
|
6721
6854
|
Image,
|
6722
6855
|
{
|
6723
6856
|
src: imgSrc,
|
@@ -6727,11 +6860,11 @@ function AQCard({
|
|
6727
6860
|
alt: "Norway"
|
6728
6861
|
}
|
6729
6862
|
) }) }),
|
6730
|
-
/* @__PURE__ */
|
6731
|
-
/* @__PURE__ */
|
6732
|
-
status && /* @__PURE__ */
|
6863
|
+
/* @__PURE__ */ jsxs24(MyFlexRow, { justify: "space-between", mt: "md", mb: "xs", children: [
|
6864
|
+
/* @__PURE__ */ jsx43(Text8, { fw: 500, children: title }),
|
6865
|
+
status && /* @__PURE__ */ jsx43(Badge2, { color: "violet.5", w: "150px", children: status })
|
6733
6866
|
] }),
|
6734
|
-
/* @__PURE__ */
|
6867
|
+
/* @__PURE__ */ jsx43(Text8, { size: "sm", c: "dimmed", lineClamp: 2, children: description }),
|
6735
6868
|
children
|
6736
6869
|
] });
|
6737
6870
|
}
|
@@ -6739,7 +6872,7 @@ function AQCard({
|
|
6739
6872
|
// src/components/DataDisplay/CardInformation/MyCardInformation.tsx
|
6740
6873
|
import { Box as Box2, Flex as Flex3, Group as Group11, Paper as Paper5, Text as Text9 } from "@mantine/core";
|
6741
6874
|
import { IconArrowDownRight, IconArrowUpRight } from "@tabler/icons-react";
|
6742
|
-
import { jsx as
|
6875
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
6743
6876
|
function MyCardInformation({
|
6744
6877
|
title,
|
6745
6878
|
value,
|
@@ -6749,16 +6882,16 @@ function MyCardInformation({
|
|
6749
6882
|
diff = 0,
|
6750
6883
|
extraControl
|
6751
6884
|
}) {
|
6752
|
-
return /* @__PURE__ */
|
6885
|
+
return /* @__PURE__ */ jsxs25(
|
6753
6886
|
Paper5,
|
6754
6887
|
{
|
6755
6888
|
withBorder: true,
|
6756
6889
|
p: "md",
|
6757
6890
|
radius: "md",
|
6758
6891
|
children: [
|
6759
|
-
/* @__PURE__ */
|
6760
|
-
/* @__PURE__ */
|
6761
|
-
/* @__PURE__ */
|
6892
|
+
/* @__PURE__ */ jsxs25(Group11, { justify: "space-between", children: [
|
6893
|
+
/* @__PURE__ */ jsxs25(Flex3, { direction: "column", children: [
|
6894
|
+
/* @__PURE__ */ jsx44(
|
6762
6895
|
Text9,
|
6763
6896
|
{
|
6764
6897
|
tt: "uppercase",
|
@@ -6767,24 +6900,24 @@ function MyCardInformation({
|
|
6767
6900
|
children: title
|
6768
6901
|
}
|
6769
6902
|
),
|
6770
|
-
unit == "" ? /* @__PURE__ */
|
6903
|
+
unit == "" ? /* @__PURE__ */ jsxs25(Text9, { size: "xs", style: { visibility: "hidden" }, children: [
|
6771
6904
|
"\u0110\u01A1n v\u1ECB: ",
|
6772
|
-
/* @__PURE__ */
|
6773
|
-
] }) : /* @__PURE__ */
|
6905
|
+
/* @__PURE__ */ jsx44("strong", { children: unit })
|
6906
|
+
] }) : /* @__PURE__ */ jsxs25(Text9, { size: "xs", children: [
|
6774
6907
|
"\u0110\u01A1n v\u1ECB: ",
|
6775
|
-
/* @__PURE__ */
|
6908
|
+
/* @__PURE__ */ jsx44("strong", { children: unit })
|
6776
6909
|
] })
|
6777
6910
|
] }),
|
6778
|
-
/* @__PURE__ */
|
6911
|
+
/* @__PURE__ */ jsx44(Box2, { children: icon })
|
6779
6912
|
] }),
|
6780
|
-
/* @__PURE__ */
|
6913
|
+
/* @__PURE__ */ jsxs25(
|
6781
6914
|
Group11,
|
6782
6915
|
{
|
6783
6916
|
mt: "5",
|
6784
6917
|
align: "flex-end",
|
6785
6918
|
gap: "xs",
|
6786
6919
|
children: [
|
6787
|
-
/* @__PURE__ */
|
6920
|
+
/* @__PURE__ */ jsx44(
|
6788
6921
|
Text9,
|
6789
6922
|
{
|
6790
6923
|
fw: 700,
|
@@ -6792,7 +6925,7 @@ function MyCardInformation({
|
|
6792
6925
|
children: value
|
6793
6926
|
}
|
6794
6927
|
),
|
6795
|
-
/* @__PURE__ */
|
6928
|
+
/* @__PURE__ */ jsxs25(
|
6796
6929
|
Text9,
|
6797
6930
|
{
|
6798
6931
|
mb: "2",
|
@@ -6800,19 +6933,19 @@ function MyCardInformation({
|
|
6800
6933
|
fz: "h2",
|
6801
6934
|
fw: 500,
|
6802
6935
|
children: [
|
6803
|
-
/* @__PURE__ */
|
6936
|
+
/* @__PURE__ */ jsxs25("span", { children: [
|
6804
6937
|
diff,
|
6805
6938
|
"%"
|
6806
6939
|
] }),
|
6807
|
-
diff > 0 ? /* @__PURE__ */
|
6940
|
+
diff > 0 ? /* @__PURE__ */ jsx44(IconArrowUpRight, {}) : /* @__PURE__ */ jsx44(IconArrowDownRight, {})
|
6808
6941
|
]
|
6809
6942
|
}
|
6810
6943
|
)
|
6811
6944
|
]
|
6812
6945
|
}
|
6813
6946
|
),
|
6814
|
-
/* @__PURE__ */
|
6815
|
-
/* @__PURE__ */
|
6947
|
+
/* @__PURE__ */ jsxs25(Group11, { justify: "space-between", children: [
|
6948
|
+
/* @__PURE__ */ jsx44(Text9, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
6816
6949
|
extraControl
|
6817
6950
|
] })
|
6818
6951
|
]
|
@@ -6823,50 +6956,50 @@ function MyCardInformation({
|
|
6823
6956
|
|
6824
6957
|
// src/components/DataDisplay/IconText/MyIconText.tsx
|
6825
6958
|
import { Group as Group12, Text as Text10 } from "@mantine/core";
|
6826
|
-
import { jsx as
|
6959
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
6827
6960
|
function MyIconText({ icon: Icon, text }) {
|
6828
|
-
return /* @__PURE__ */
|
6829
|
-
Icon && /* @__PURE__ */
|
6830
|
-
/* @__PURE__ */
|
6961
|
+
return /* @__PURE__ */ jsxs26(Group12, { wrap: "nowrap", gap: 10, mt: 3, children: [
|
6962
|
+
Icon && /* @__PURE__ */ jsx45(Icon, { stroke: 1.5, size: 16 }),
|
6963
|
+
/* @__PURE__ */ jsx45(Text10, { fz: "lg", c: "dimmed", children: text })
|
6831
6964
|
] });
|
6832
6965
|
}
|
6833
6966
|
|
6834
6967
|
// src/components/DataDisplay/KeyLabel/MyKeyLabel.tsx
|
6835
6968
|
import { Group as Group13, Text as Text11 } from "@mantine/core";
|
6836
|
-
import { jsx as
|
6969
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
6837
6970
|
function MyKeyLabel({ keyLabel, label }) {
|
6838
|
-
return /* @__PURE__ */
|
6839
|
-
/* @__PURE__ */
|
6971
|
+
return /* @__PURE__ */ jsxs27(Group13, { gap: 5, children: [
|
6972
|
+
/* @__PURE__ */ jsxs27(Text11, { fw: "bold", children: [
|
6840
6973
|
keyLabel,
|
6841
6974
|
":"
|
6842
6975
|
] }),
|
6843
|
-
/* @__PURE__ */
|
6976
|
+
/* @__PURE__ */ jsx46(Text11, { children: label })
|
6844
6977
|
] });
|
6845
6978
|
}
|
6846
6979
|
|
6847
6980
|
// src/components/DataDisplay/NumberFormatter/MyNumberFormatter.tsx
|
6848
6981
|
import { NumberFormatter } from "@mantine/core";
|
6849
|
-
import { jsx as
|
6982
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
6850
6983
|
function MyNumberFormatter(_a) {
|
6851
6984
|
var rest = __objRest(_a, []);
|
6852
|
-
return /* @__PURE__ */
|
6985
|
+
return /* @__PURE__ */ jsx47(NumberFormatter, __spreadValues({ thousandSeparator: true, suffix: " VN\u0110" }, rest));
|
6853
6986
|
}
|
6854
6987
|
|
6855
6988
|
// src/components/DataDisplay/StatCard/AQStatCard1.tsx
|
6856
|
-
import { Box as Box3, Button as
|
6989
|
+
import { Box as Box3, Button as Button17, Flex as Flex4, Group as Group14, Paper as Paper6, Text as Text12 } from "@mantine/core";
|
6857
6990
|
import { IconArrowDownRight as IconArrowDownRight2, IconArrowUpRight as IconArrowUpRight2 } from "@tabler/icons-react";
|
6858
|
-
import { Fragment as
|
6991
|
+
import { Fragment as Fragment14, jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
6859
6992
|
function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
6860
|
-
return /* @__PURE__ */
|
6993
|
+
return /* @__PURE__ */ jsx48(Fragment14, { children: /* @__PURE__ */ jsxs28(
|
6861
6994
|
Paper6,
|
6862
6995
|
{
|
6863
6996
|
withBorder: true,
|
6864
6997
|
p: "md",
|
6865
6998
|
radius: "md",
|
6866
6999
|
children: [
|
6867
|
-
/* @__PURE__ */
|
6868
|
-
/* @__PURE__ */
|
6869
|
-
/* @__PURE__ */
|
7000
|
+
/* @__PURE__ */ jsxs28(Group14, { justify: "space-between", children: [
|
7001
|
+
/* @__PURE__ */ jsxs28(Flex4, { direction: "column", children: [
|
7002
|
+
/* @__PURE__ */ jsx48(
|
6870
7003
|
Text12,
|
6871
7004
|
{
|
6872
7005
|
tt: "uppercase",
|
@@ -6875,24 +7008,24 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6875
7008
|
children: title
|
6876
7009
|
}
|
6877
7010
|
),
|
6878
|
-
unit == "" ? /* @__PURE__ */
|
7011
|
+
unit == "" ? /* @__PURE__ */ jsxs28(Text12, { size: "xs", style: { visibility: "hidden" }, children: [
|
6879
7012
|
"\u0110\u01A1n v\u1ECB: ",
|
6880
|
-
/* @__PURE__ */
|
6881
|
-
] }) : /* @__PURE__ */
|
7013
|
+
/* @__PURE__ */ jsx48("strong", { children: unit })
|
7014
|
+
] }) : /* @__PURE__ */ jsxs28(Text12, { size: "xs", children: [
|
6882
7015
|
"\u0110\u01A1n v\u1ECB: ",
|
6883
|
-
/* @__PURE__ */
|
7016
|
+
/* @__PURE__ */ jsx48("strong", { children: unit })
|
6884
7017
|
] })
|
6885
7018
|
] }),
|
6886
|
-
/* @__PURE__ */
|
7019
|
+
/* @__PURE__ */ jsx48(Box3, { children: icons })
|
6887
7020
|
] }),
|
6888
|
-
/* @__PURE__ */
|
7021
|
+
/* @__PURE__ */ jsxs28(
|
6889
7022
|
Group14,
|
6890
7023
|
{
|
6891
7024
|
mt: "5",
|
6892
7025
|
align: "flex-end",
|
6893
7026
|
gap: "xs",
|
6894
7027
|
children: [
|
6895
|
-
/* @__PURE__ */
|
7028
|
+
/* @__PURE__ */ jsx48(
|
6896
7029
|
Text12,
|
6897
7030
|
{
|
6898
7031
|
fw: 700,
|
@@ -6900,7 +7033,7 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6900
7033
|
children: value
|
6901
7034
|
}
|
6902
7035
|
),
|
6903
|
-
/* @__PURE__ */
|
7036
|
+
/* @__PURE__ */ jsxs28(
|
6904
7037
|
Text12,
|
6905
7038
|
{
|
6906
7039
|
mb: "2",
|
@@ -6908,21 +7041,21 @@ function AQStatCard1({ title, value, unit = "", description, icons, diff }) {
|
|
6908
7041
|
fz: "h2",
|
6909
7042
|
fw: 500,
|
6910
7043
|
children: [
|
6911
|
-
/* @__PURE__ */
|
7044
|
+
/* @__PURE__ */ jsxs28("span", { children: [
|
6912
7045
|
diff,
|
6913
7046
|
"%"
|
6914
7047
|
] }),
|
6915
|
-
diff > 0 ? /* @__PURE__ */
|
7048
|
+
diff > 0 ? /* @__PURE__ */ jsx48(IconArrowUpRight2, {}) : /* @__PURE__ */ jsx48(IconArrowDownRight2, {})
|
6916
7049
|
]
|
6917
7050
|
}
|
6918
7051
|
)
|
6919
7052
|
]
|
6920
7053
|
}
|
6921
7054
|
),
|
6922
|
-
/* @__PURE__ */
|
6923
|
-
/* @__PURE__ */
|
6924
|
-
/* @__PURE__ */
|
6925
|
-
|
7055
|
+
/* @__PURE__ */ jsxs28(Group14, { justify: "space-between", children: [
|
7056
|
+
/* @__PURE__ */ jsx48(Text12, { tt: "uppercase", fz: "xs", c: "dimmed", children: description }),
|
7057
|
+
/* @__PURE__ */ jsx48(
|
7058
|
+
Button17,
|
6926
7059
|
{
|
6927
7060
|
variant: "light",
|
6928
7061
|
size: "xs",
|
@@ -7012,15 +7145,15 @@ function FaviconSetter() {
|
|
7012
7145
|
|
7013
7146
|
// src/components/Inputs/DateInput/MyDateInput.tsx
|
7014
7147
|
import { DateInput } from "@mantine/dates";
|
7015
|
-
import { jsx as
|
7148
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
7016
7149
|
function MyDateInput(_a) {
|
7017
7150
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
7018
|
-
return /* @__PURE__ */
|
7151
|
+
return /* @__PURE__ */ jsx49(DateInput, __spreadValues({ label, placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
7019
7152
|
}
|
7020
7153
|
|
7021
7154
|
// src/components/Inputs/DayOfWeekPicker/MyDayOfWeekPicker.tsx
|
7022
7155
|
import { Badge as Badge3, Group as Group15, Text as Text13 } from "@mantine/core";
|
7023
|
-
import { jsx as
|
7156
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
7024
7157
|
var days = Object.entries(enum_daysOfWeek).filter(([key]) => isNaN(Number(key))).map(([label, value]) => ({ label, value }));
|
7025
7158
|
function MyDayOfWeekPicker({ value = [], onChange }) {
|
7026
7159
|
const toggle = (val) => {
|
@@ -7028,9 +7161,9 @@ function MyDayOfWeekPicker({ value = [], onChange }) {
|
|
7028
7161
|
const newValue = value.includes(val) ? value.filter((v5) => v5 !== val) : [...value, val];
|
7029
7162
|
onChange(newValue);
|
7030
7163
|
};
|
7031
|
-
return /* @__PURE__ */
|
7032
|
-
/* @__PURE__ */
|
7033
|
-
/* @__PURE__ */
|
7164
|
+
return /* @__PURE__ */ jsxs29(MyFlexRow, { align: "center", children: [
|
7165
|
+
/* @__PURE__ */ jsx50(Text13, { children: "Danh s\xE1ch th\u1EE9: " }),
|
7166
|
+
/* @__PURE__ */ jsx50(Group15, { gap: "xs", children: days.map((d5) => /* @__PURE__ */ jsx50(
|
7034
7167
|
Badge3,
|
7035
7168
|
{
|
7036
7169
|
variant: value.includes(d5.value) ? "filled" : "outline",
|
@@ -7053,7 +7186,7 @@ import {
|
|
7053
7186
|
Text as Text14,
|
7054
7187
|
useMantineColorScheme as useMantineColorScheme2
|
7055
7188
|
} from "@mantine/core";
|
7056
|
-
import { jsx as
|
7189
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
7057
7190
|
function MyFieldset(_a) {
|
7058
7191
|
var _b = _a, {
|
7059
7192
|
children,
|
@@ -7082,10 +7215,10 @@ function MyFieldset(_a) {
|
|
7082
7215
|
const mergedStyles = typeof styles === "function" ? styles : __spreadProps(__spreadValues({}, styles), {
|
7083
7216
|
legend: __spreadValues(__spreadValues({}, defaultLegendStyles), styles == null ? void 0 : styles.legend)
|
7084
7217
|
});
|
7085
|
-
return /* @__PURE__ */
|
7218
|
+
return /* @__PURE__ */ jsx51(
|
7086
7219
|
Fieldset4,
|
7087
7220
|
__spreadProps(__spreadValues({
|
7088
|
-
legend: customLegend != null ? customLegend : /* @__PURE__ */
|
7221
|
+
legend: customLegend != null ? customLegend : /* @__PURE__ */ jsx51(Group16, { gap: "xs", children: /* @__PURE__ */ jsxs30(Text14, { fw: 600, children: [
|
7089
7222
|
" ",
|
7090
7223
|
title,
|
7091
7224
|
" "
|
@@ -7100,13 +7233,13 @@ function MyFieldset(_a) {
|
|
7100
7233
|
// src/components/Inputs/FileInput/MyFileInput.tsx
|
7101
7234
|
import { FileInput as FileInput3 } from "@mantine/core";
|
7102
7235
|
import { IconFile } from "@tabler/icons-react";
|
7103
|
-
import { jsx as
|
7236
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
7104
7237
|
function MyFileInput(_a) {
|
7105
7238
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
7106
|
-
return /* @__PURE__ */
|
7239
|
+
return /* @__PURE__ */ jsx52(
|
7107
7240
|
FileInput3,
|
7108
7241
|
__spreadValues({
|
7109
|
-
rightSection: /* @__PURE__ */
|
7242
|
+
rightSection: /* @__PURE__ */ jsx52(IconFile, {}),
|
7110
7243
|
label,
|
7111
7244
|
placeholder: label ? `Ch\u1ECDn ${label == null ? void 0 : label.toLowerCase()}` : ""
|
7112
7245
|
}, rest)
|
@@ -7115,10 +7248,10 @@ function MyFileInput(_a) {
|
|
7115
7248
|
|
7116
7249
|
// src/components/Inputs/NumberInput/MyNumberInput.tsx
|
7117
7250
|
import { NumberInput as NumberInput2 } from "@mantine/core";
|
7118
|
-
import { jsx as
|
7251
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
7119
7252
|
function MyNumberInput(_a) {
|
7120
7253
|
var _b = _a, { minValue, label } = _b, rest = __objRest(_b, ["minValue", "label"]);
|
7121
|
-
return /* @__PURE__ */
|
7254
|
+
return /* @__PURE__ */ jsx53(
|
7122
7255
|
NumberInput2,
|
7123
7256
|
__spreadValues({
|
7124
7257
|
label,
|
@@ -7130,10 +7263,10 @@ function MyNumberInput(_a) {
|
|
7130
7263
|
|
7131
7264
|
// src/components/Inputs/TextArea/MyTextArea.tsx
|
7132
7265
|
import { Textarea } from "@mantine/core";
|
7133
|
-
import { jsx as
|
7266
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
7134
7267
|
function MyTextArea(_a) {
|
7135
7268
|
var _b = _a, { label } = _b, rest = __objRest(_b, ["label"]);
|
7136
|
-
return /* @__PURE__ */
|
7269
|
+
return /* @__PURE__ */ jsx54(Textarea, __spreadValues({ label, placeholder: label ? `Nh\u1EADp ${label == null ? void 0 : label.toLowerCase()}` : "" }, rest));
|
7137
7270
|
}
|
7138
7271
|
|
7139
7272
|
// src/components/Inputs/TextEditor/MyTextEditor.tsx
|
@@ -7149,7 +7282,7 @@ import Underline from "@tiptap/extension-underline";
|
|
7149
7282
|
import { useEditor } from "@tiptap/react";
|
7150
7283
|
import StarterKit from "@tiptap/starter-kit";
|
7151
7284
|
import { useEffect as useEffect8, useState as useState9 } from "react";
|
7152
|
-
import { jsx as
|
7285
|
+
import { jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
|
7153
7286
|
function MyTextEditor(_a) {
|
7154
7287
|
var _b = _a, {
|
7155
7288
|
autoHiddenToolBar = false,
|
@@ -7255,43 +7388,43 @@ function MyTextEditor(_a) {
|
|
7255
7388
|
editor.commands.setContent(value);
|
7256
7389
|
}
|
7257
7390
|
}, [value, editor]);
|
7258
|
-
return /* @__PURE__ */
|
7259
|
-
/* @__PURE__ */
|
7260
|
-
/* @__PURE__ */
|
7261
|
-
/* @__PURE__ */
|
7262
|
-
/* @__PURE__ */
|
7263
|
-
/* @__PURE__ */
|
7264
|
-
/* @__PURE__ */
|
7265
|
-
/* @__PURE__ */
|
7266
|
-
/* @__PURE__ */
|
7267
|
-
/* @__PURE__ */
|
7391
|
+
return /* @__PURE__ */ jsx55(Input.Wrapper, __spreadProps(__spreadValues({ label, flex: 1, error, withAsterisk }, inputWrapperProps), { children: /* @__PURE__ */ jsxs31(RichTextEditor, __spreadProps(__spreadValues({ editor, style: { border: error && "1px solid #e03131" } }, richTextEditorProps), { children: [
|
7392
|
+
/* @__PURE__ */ jsxs31(RichTextEditor.Toolbar, { hidden: hiddenToolBar, sticky: true, stickyOffset: 60, children: [
|
7393
|
+
/* @__PURE__ */ jsxs31(RichTextEditor.ControlsGroup, { children: [
|
7394
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Bold, {}),
|
7395
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Italic, {}),
|
7396
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Underline, {}),
|
7397
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Strikethrough, {}),
|
7398
|
+
/* @__PURE__ */ jsx55(RichTextEditor.ClearFormatting, {}),
|
7399
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Highlight, {}),
|
7400
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Code, {})
|
7268
7401
|
] }),
|
7269
|
-
/* @__PURE__ */
|
7270
|
-
/* @__PURE__ */
|
7271
|
-
/* @__PURE__ */
|
7272
|
-
/* @__PURE__ */
|
7273
|
-
/* @__PURE__ */
|
7402
|
+
/* @__PURE__ */ jsxs31(RichTextEditor.ControlsGroup, { children: [
|
7403
|
+
/* @__PURE__ */ jsx55(RichTextEditor.H1, {}),
|
7404
|
+
/* @__PURE__ */ jsx55(RichTextEditor.H2, {}),
|
7405
|
+
/* @__PURE__ */ jsx55(RichTextEditor.H3, {}),
|
7406
|
+
/* @__PURE__ */ jsx55(RichTextEditor.H4, {})
|
7274
7407
|
] }),
|
7275
|
-
/* @__PURE__ */
|
7276
|
-
/* @__PURE__ */
|
7277
|
-
/* @__PURE__ */
|
7278
|
-
/* @__PURE__ */
|
7279
|
-
/* @__PURE__ */
|
7280
|
-
/* @__PURE__ */
|
7281
|
-
/* @__PURE__ */
|
7408
|
+
/* @__PURE__ */ jsxs31(RichTextEditor.ControlsGroup, { children: [
|
7409
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Blockquote, {}),
|
7410
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Hr, {}),
|
7411
|
+
/* @__PURE__ */ jsx55(RichTextEditor.BulletList, {}),
|
7412
|
+
/* @__PURE__ */ jsx55(RichTextEditor.OrderedList, {}),
|
7413
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Subscript, {}),
|
7414
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Superscript, {})
|
7282
7415
|
] }),
|
7283
|
-
/* @__PURE__ */
|
7284
|
-
/* @__PURE__ */
|
7285
|
-
/* @__PURE__ */
|
7416
|
+
/* @__PURE__ */ jsxs31(RichTextEditor.ControlsGroup, { children: [
|
7417
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Link, {}),
|
7418
|
+
/* @__PURE__ */ jsx55(RichTextEditor.Unlink, {})
|
7286
7419
|
] }),
|
7287
|
-
/* @__PURE__ */
|
7288
|
-
/* @__PURE__ */
|
7289
|
-
/* @__PURE__ */
|
7290
|
-
/* @__PURE__ */
|
7291
|
-
/* @__PURE__ */
|
7420
|
+
/* @__PURE__ */ jsxs31(RichTextEditor.ControlsGroup, { children: [
|
7421
|
+
/* @__PURE__ */ jsx55(RichTextEditor.AlignLeft, {}),
|
7422
|
+
/* @__PURE__ */ jsx55(RichTextEditor.AlignCenter, {}),
|
7423
|
+
/* @__PURE__ */ jsx55(RichTextEditor.AlignJustify, {}),
|
7424
|
+
/* @__PURE__ */ jsx55(RichTextEditor.AlignRight, {})
|
7292
7425
|
] })
|
7293
7426
|
] }),
|
7294
|
-
/* @__PURE__ */
|
7427
|
+
/* @__PURE__ */ jsx55(
|
7295
7428
|
ScrollArea2.Autosize,
|
7296
7429
|
{
|
7297
7430
|
onMouseDown: () => {
|
@@ -7306,7 +7439,7 @@ function MyTextEditor(_a) {
|
|
7306
7439
|
setHiddenToolBar(false);
|
7307
7440
|
},
|
7308
7441
|
style: { cursor: "text", maxHeight: "400px" },
|
7309
|
-
children: /* @__PURE__ */
|
7442
|
+
children: /* @__PURE__ */ jsx55(RichTextEditor.Content, { mih: contentHeight })
|
7310
7443
|
}
|
7311
7444
|
)
|
7312
7445
|
] })) }));
|
@@ -7314,7 +7447,7 @@ function MyTextEditor(_a) {
|
|
7314
7447
|
|
7315
7448
|
// src/components/Inputs/WeeklySessionSchedulerPicker/MyWeeklySessionSchedulerPicker.tsx
|
7316
7449
|
import {
|
7317
|
-
Button as
|
7450
|
+
Button as Button18,
|
7318
7451
|
Center as Center4,
|
7319
7452
|
Divider as Divider2,
|
7320
7453
|
Group as Group17,
|
@@ -7323,9 +7456,9 @@ import {
|
|
7323
7456
|
ScrollArea as ScrollArea3,
|
7324
7457
|
Text as Text15
|
7325
7458
|
} from "@mantine/core";
|
7326
|
-
import { IconPlus as
|
7459
|
+
import { IconPlus as IconPlus8, IconTrash as IconTrash7 } from "@tabler/icons-react";
|
7327
7460
|
import { useState as useState10 } from "react";
|
7328
|
-
import { jsx as
|
7461
|
+
import { jsx as jsx56, jsxs as jsxs32 } from "react/jsx-runtime";
|
7329
7462
|
function MyWeeklySessionSchedulerPicker({
|
7330
7463
|
value = [],
|
7331
7464
|
onChange
|
@@ -7356,52 +7489,52 @@ function MyWeeklySessionSchedulerPicker({
|
|
7356
7489
|
return acc;
|
7357
7490
|
}, {});
|
7358
7491
|
const getLabel = (day) => enum_daysOfWeek[day] || `Day ${day}`;
|
7359
|
-
return /* @__PURE__ */
|
7360
|
-
/* @__PURE__ */
|
7492
|
+
return /* @__PURE__ */ jsx56(Paper7, { w: "100%", p: "md", children: /* @__PURE__ */ jsxs32(MyFlexColumn, { children: [
|
7493
|
+
/* @__PURE__ */ jsx56(Center4, { children: /* @__PURE__ */ jsx56(
|
7361
7494
|
MyDayOfWeekPicker,
|
7362
7495
|
{
|
7363
7496
|
value: selectedDays,
|
7364
7497
|
onChange: (days2) => {
|
7365
|
-
const sorted = [...days2].sort((
|
7498
|
+
const sorted = [...days2].sort((a5, b4) => a5 - b4);
|
7366
7499
|
setSelectedDays(sorted);
|
7367
7500
|
}
|
7368
7501
|
}
|
7369
7502
|
) }),
|
7370
|
-
/* @__PURE__ */
|
7371
|
-
/* @__PURE__ */
|
7503
|
+
/* @__PURE__ */ jsx56(Divider2, { my: "xs" }),
|
7504
|
+
/* @__PURE__ */ jsx56(Center4, { children: /* @__PURE__ */ jsx56(ScrollArea3.Autosize, { h: "40vh", children: /* @__PURE__ */ jsx56(MyFlexColumn, { w: { base: "100%", sm: "70%" }, children: selectedDays.map((dayOfWeek) => {
|
7372
7505
|
var _a;
|
7373
|
-
return /* @__PURE__ */
|
7506
|
+
return /* @__PURE__ */ jsxs32(
|
7374
7507
|
Paper7,
|
7375
7508
|
{
|
7376
7509
|
w: "100%",
|
7377
7510
|
p: "md",
|
7378
7511
|
bg: const_object_colors.mantineBackgroundBlueLight,
|
7379
7512
|
children: [
|
7380
|
-
/* @__PURE__ */
|
7381
|
-
/* @__PURE__ */
|
7382
|
-
/* @__PURE__ */
|
7383
|
-
|
7513
|
+
/* @__PURE__ */ jsxs32(Group17, { gap: "apart", children: [
|
7514
|
+
/* @__PURE__ */ jsx56(Text15, { w: "70px", fw: 500, children: getLabel(dayOfWeek) }),
|
7515
|
+
/* @__PURE__ */ jsx56(
|
7516
|
+
Button18,
|
7384
7517
|
{
|
7385
7518
|
color: "teal.5",
|
7386
|
-
leftSection: /* @__PURE__ */
|
7519
|
+
leftSection: /* @__PURE__ */ jsx56(IconPlus8, { size: 14 }),
|
7387
7520
|
onClick: () => handleAddSession(dayOfWeek),
|
7388
7521
|
children: "Th\xEAm bu\u1ED5i"
|
7389
7522
|
}
|
7390
7523
|
)
|
7391
7524
|
] }),
|
7392
|
-
/* @__PURE__ */
|
7525
|
+
/* @__PURE__ */ jsx56(Divider2, { my: "sm" }),
|
7393
7526
|
(_a = grouped[dayOfWeek]) == null ? void 0 : _a.map((item, indexInDay) => {
|
7394
7527
|
const globalIndex = value.findIndex(
|
7395
7528
|
(v5) => v5 === item
|
7396
7529
|
);
|
7397
|
-
return /* @__PURE__ */
|
7530
|
+
return /* @__PURE__ */ jsxs32(
|
7398
7531
|
Group17,
|
7399
7532
|
{
|
7400
7533
|
mt: "xs",
|
7401
7534
|
gap: "xs",
|
7402
7535
|
align: "flex-end",
|
7403
7536
|
children: [
|
7404
|
-
/* @__PURE__ */
|
7537
|
+
/* @__PURE__ */ jsx56(
|
7405
7538
|
NumberInput3,
|
7406
7539
|
{
|
7407
7540
|
label: "Ti\u1EBFt b\u1EAFt \u0111\u1EA7u",
|
@@ -7413,7 +7546,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7413
7546
|
)
|
7414
7547
|
}
|
7415
7548
|
),
|
7416
|
-
/* @__PURE__ */
|
7549
|
+
/* @__PURE__ */ jsx56(
|
7417
7550
|
NumberInput3,
|
7418
7551
|
{
|
7419
7552
|
label: "S\u1ED1 ti\u1EBFt",
|
@@ -7425,7 +7558,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7425
7558
|
)
|
7426
7559
|
}
|
7427
7560
|
),
|
7428
|
-
/* @__PURE__ */
|
7561
|
+
/* @__PURE__ */ jsx56(
|
7429
7562
|
NumberInput3,
|
7430
7563
|
{
|
7431
7564
|
label: "S\u1ED1 ph\xFAt ",
|
@@ -7434,13 +7567,13 @@ function MyWeeklySessionSchedulerPicker({
|
|
7434
7567
|
value: item.durationMinutes
|
7435
7568
|
}
|
7436
7569
|
),
|
7437
|
-
/* @__PURE__ */
|
7438
|
-
|
7570
|
+
/* @__PURE__ */ jsx56(
|
7571
|
+
Button18,
|
7439
7572
|
{
|
7440
7573
|
variant: "light",
|
7441
7574
|
color: "red",
|
7442
7575
|
onClick: () => handleRemove(globalIndex),
|
7443
|
-
leftSection: /* @__PURE__ */
|
7576
|
+
leftSection: /* @__PURE__ */ jsx56(IconTrash7, { size: 14 }),
|
7444
7577
|
children: "X\xF3a bu\u1ED5i"
|
7445
7578
|
}
|
7446
7579
|
)
|
@@ -7458,7 +7591,7 @@ function MyWeeklySessionSchedulerPicker({
|
|
7458
7591
|
}
|
7459
7592
|
|
7460
7593
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
7461
|
-
import { Button as
|
7594
|
+
import { Button as Button19 } from "@mantine/core";
|
7462
7595
|
import { IconLogout } from "@tabler/icons-react";
|
7463
7596
|
import { useRouter as useRouter3 } from "next/navigation";
|
7464
7597
|
|
@@ -7473,19 +7606,19 @@ function useS_authenticate() {
|
|
7473
7606
|
}
|
7474
7607
|
|
7475
7608
|
// src/modules-features/authenticate/F_authenticate_Logout.tsx
|
7476
|
-
import { jsx as
|
7609
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
7477
7610
|
function F_authenticate_Logout({ redirectURL = "/auth/login" }) {
|
7478
7611
|
const router = useRouter3();
|
7479
7612
|
const S_Authenticate = useS_authenticate();
|
7480
|
-
return /* @__PURE__ */
|
7613
|
+
return /* @__PURE__ */ jsx57(Button19, { onClick: () => {
|
7481
7614
|
S_Authenticate.setProperty("token", "");
|
7482
7615
|
router.replace(redirectURL);
|
7483
|
-
}, leftSection: /* @__PURE__ */
|
7616
|
+
}, leftSection: /* @__PURE__ */ jsx57(IconLogout, {}), fullWidth: true, justify: "start", variant: "subtle", children: "\u0110\u0103ng xu\u1EA5t" });
|
7484
7617
|
}
|
7485
7618
|
|
7486
7619
|
// src/components/Layouts/BasicAppShell/BasicAppShell.tsx
|
7487
7620
|
import {
|
7488
|
-
ActionIcon as
|
7621
|
+
ActionIcon as ActionIcon13,
|
7489
7622
|
AppShell,
|
7490
7623
|
Badge as Badge4,
|
7491
7624
|
Divider as Divider3,
|
@@ -7505,7 +7638,7 @@ import {
|
|
7505
7638
|
import Link3 from "next/link";
|
7506
7639
|
import { usePathname as usePathname2 } from "next/navigation";
|
7507
7640
|
import { useEffect as useEffect9, useMemo as useMemo3, useState as useState11 } from "react";
|
7508
|
-
import { Fragment as
|
7641
|
+
import { Fragment as Fragment15, jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
|
7509
7642
|
function findBreadcrumbPath(items, currentPath, parents = []) {
|
7510
7643
|
for (const item of items) {
|
7511
7644
|
if (item.link === currentPath) {
|
@@ -7520,13 +7653,13 @@ function findBreadcrumbPath(items, currentPath, parents = []) {
|
|
7520
7653
|
}
|
7521
7654
|
function getRightSection(status) {
|
7522
7655
|
if (status === "Prototype")
|
7523
|
-
return /* @__PURE__ */
|
7656
|
+
return /* @__PURE__ */ jsx58(Badge4, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "pink", circle: true, children: "P" });
|
7524
7657
|
if (status === "New")
|
7525
|
-
return /* @__PURE__ */
|
7658
|
+
return /* @__PURE__ */ jsx58(Badge4, { styles: { root: { cursor: "pointer" } }, radius: "xs", circle: true, children: "N" });
|
7526
7659
|
if (status === "Menu")
|
7527
|
-
return /* @__PURE__ */
|
7660
|
+
return /* @__PURE__ */ jsx58(Badge4, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "gray", circle: true, children: "M" });
|
7528
7661
|
if (status === "Change")
|
7529
|
-
return /* @__PURE__ */
|
7662
|
+
return /* @__PURE__ */ jsx58(Badge4, { styles: { root: { cursor: "pointer" } }, radius: "xs", color: "green", circle: true, children: "C" });
|
7530
7663
|
return null;
|
7531
7664
|
}
|
7532
7665
|
function RenderNavLinks({
|
@@ -7534,14 +7667,14 @@ function RenderNavLinks({
|
|
7534
7667
|
}) {
|
7535
7668
|
const basicAppShellStore = useS_BasicAppShell();
|
7536
7669
|
const pathName = usePathname2();
|
7537
|
-
return /* @__PURE__ */
|
7670
|
+
return /* @__PURE__ */ jsx58(Fragment15, { children: items.map((item, index) => /* @__PURE__ */ jsx58(
|
7538
7671
|
NavLink,
|
7539
7672
|
{
|
7540
7673
|
active: item.link === pathName.split("/")[2],
|
7541
7674
|
component: Link3,
|
7542
7675
|
opened: basicAppShellStore.state.groupMenuOpenId.includes(item.label),
|
7543
7676
|
href: `/${pathName.split("/")[1]}/${item.link}` || "#",
|
7544
|
-
label: /* @__PURE__ */
|
7677
|
+
label: /* @__PURE__ */ jsxs33(MyFlexRow, { justify: "space-between", children: [
|
7545
7678
|
item.label,
|
7546
7679
|
" ",
|
7547
7680
|
getRightSection(item.status)
|
@@ -7553,7 +7686,7 @@ function RenderNavLinks({
|
|
7553
7686
|
return;
|
7554
7687
|
}
|
7555
7688
|
},
|
7556
|
-
children: item.links && /* @__PURE__ */
|
7689
|
+
children: item.links && /* @__PURE__ */ jsx58(RenderNavLinks, { items: item.links })
|
7557
7690
|
},
|
7558
7691
|
index
|
7559
7692
|
)) });
|
@@ -7599,9 +7732,9 @@ function validateMenuItems(items) {
|
|
7599
7732
|
return true;
|
7600
7733
|
}
|
7601
7734
|
function sortMenuItemsByPageId(items) {
|
7602
|
-
return items.sort((
|
7735
|
+
return items.sort((a5, b4) => {
|
7603
7736
|
var _a, _b;
|
7604
|
-
return ((_a =
|
7737
|
+
return ((_a = a5.pageId) != null ? _a : 0) - ((_b = b4.pageId) != null ? _b : 0);
|
7605
7738
|
});
|
7606
7739
|
}
|
7607
7740
|
function BasicAppShell_transformMenuToEnum(prefixProjectName, menu) {
|
@@ -7676,7 +7809,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7676
7809
|
basicAppShellStore.setProperty("note", linkItem == null ? void 0 : linkItem.note);
|
7677
7810
|
basicAppShellStore.setProperty("status", linkItem == null ? void 0 : linkItem.status);
|
7678
7811
|
}, [pathName]);
|
7679
|
-
return /* @__PURE__ */
|
7812
|
+
return /* @__PURE__ */ jsxs33(
|
7680
7813
|
AppShell,
|
7681
7814
|
{
|
7682
7815
|
header: { height: 60 },
|
@@ -7690,36 +7823,36 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7690
7823
|
},
|
7691
7824
|
padding: "md",
|
7692
7825
|
children: [
|
7693
|
-
/* @__PURE__ */
|
7694
|
-
/* @__PURE__ */
|
7695
|
-
/* @__PURE__ */
|
7826
|
+
/* @__PURE__ */ jsx58(AppShell.Header, { children: media ? /* @__PURE__ */ jsxs33(Group18, { h: "100%", px: "md", justify: "space-between", align: "center", children: [
|
7827
|
+
/* @__PURE__ */ jsxs33(Group18, { h: "100%", children: [
|
7828
|
+
/* @__PURE__ */ jsx58(
|
7696
7829
|
Tooltip5,
|
7697
7830
|
{
|
7698
7831
|
label: basicAppShellStore.state.opened ? "\u1EA8n thanh menu" : "Hi\u1EC7n thanh menu",
|
7699
|
-
children: /* @__PURE__ */
|
7700
|
-
|
7832
|
+
children: /* @__PURE__ */ jsx58(
|
7833
|
+
ActionIcon13,
|
7701
7834
|
{
|
7702
7835
|
size: "lg",
|
7703
7836
|
radius: "md",
|
7704
7837
|
variant: "default",
|
7705
7838
|
onClick: basicAppShellStore.toggle,
|
7706
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7839
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx58(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx58(IconLayoutSidebarLeftCollapse, {})
|
7707
7840
|
}
|
7708
7841
|
)
|
7709
7842
|
}
|
7710
7843
|
),
|
7711
|
-
/* @__PURE__ */
|
7712
|
-
|
7844
|
+
/* @__PURE__ */ jsx58(Tooltip5, { label: "\u0110\xF3ng t\u1EA5t c\u1EA3 menu", children: /* @__PURE__ */ jsx58(
|
7845
|
+
ActionIcon13,
|
7713
7846
|
{
|
7714
7847
|
size: "lg",
|
7715
7848
|
radius: "md",
|
7716
7849
|
variant: "default",
|
7717
7850
|
onClick: () => basicAppShellStore.clearGroupMenuOpenId(),
|
7718
|
-
children: /* @__PURE__ */
|
7851
|
+
children: /* @__PURE__ */ jsx58(IconLibraryMinus, {})
|
7719
7852
|
}
|
7720
7853
|
) })
|
7721
7854
|
] }),
|
7722
|
-
/* @__PURE__ */
|
7855
|
+
/* @__PURE__ */ jsx58(
|
7723
7856
|
Group18,
|
7724
7857
|
{
|
7725
7858
|
style: {
|
@@ -7727,43 +7860,43 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7727
7860
|
left: "50%",
|
7728
7861
|
transform: "translateX(-50%)"
|
7729
7862
|
},
|
7730
|
-
children: /* @__PURE__ */
|
7863
|
+
children: /* @__PURE__ */ jsx58(Text16, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` })
|
7731
7864
|
}
|
7732
7865
|
),
|
7733
|
-
/* @__PURE__ */
|
7866
|
+
/* @__PURE__ */ jsxs33(Group18, { children: [
|
7734
7867
|
extraTopRight,
|
7735
|
-
/* @__PURE__ */
|
7868
|
+
/* @__PURE__ */ jsx58(MySwitchTheme, {})
|
7736
7869
|
] })
|
7737
7870
|
] }) : (
|
7738
7871
|
// For mobile screens - simplified layout
|
7739
|
-
/* @__PURE__ */
|
7740
|
-
/* @__PURE__ */
|
7741
|
-
|
7872
|
+
/* @__PURE__ */ jsxs33(Group18, { h: "100%", px: "md", justify: "space-between", children: [
|
7873
|
+
/* @__PURE__ */ jsx58(
|
7874
|
+
ActionIcon13,
|
7742
7875
|
{
|
7743
7876
|
size: "lg",
|
7744
7877
|
radius: "md",
|
7745
7878
|
variant: "default",
|
7746
7879
|
onClick: basicAppShellStore.toggle,
|
7747
|
-
children: basicAppShellStore.state.opened ? /* @__PURE__ */
|
7880
|
+
children: basicAppShellStore.state.opened ? /* @__PURE__ */ jsx58(IconLayoutSidebarLeftExpand, {}) : /* @__PURE__ */ jsx58(IconLayoutSidebarLeftCollapse, {})
|
7748
7881
|
}
|
7749
7882
|
),
|
7750
|
-
/* @__PURE__ */
|
7751
|
-
/* @__PURE__ */
|
7883
|
+
/* @__PURE__ */ jsx58(Text16, { c: "green", fw: "bold", size: "sm", children: title ? title : `${basicAppShellStore.state.moduleCode} - ${basicAppShellStore.state.moduleName}` }),
|
7884
|
+
/* @__PURE__ */ jsxs33(Group18, { children: [
|
7752
7885
|
extraTopRight,
|
7753
|
-
/* @__PURE__ */
|
7886
|
+
/* @__PURE__ */ jsx58(MySwitchTheme, {})
|
7754
7887
|
] })
|
7755
7888
|
] })
|
7756
7889
|
) }),
|
7757
|
-
/* @__PURE__ */
|
7758
|
-
/* @__PURE__ */
|
7759
|
-
/* @__PURE__ */
|
7760
|
-
/* @__PURE__ */
|
7761
|
-
/* @__PURE__ */
|
7762
|
-
/* @__PURE__ */
|
7890
|
+
/* @__PURE__ */ jsxs33(AppShell.Navbar, { children: [
|
7891
|
+
/* @__PURE__ */ jsx58(MyAppSpotlight, { menu }),
|
7892
|
+
/* @__PURE__ */ jsxs33(AppShell.Section, { grow: true, component: ScrollArea4, p: 5, children: [
|
7893
|
+
/* @__PURE__ */ jsx58(RenderNavLinks, { items: menu }),
|
7894
|
+
/* @__PURE__ */ jsx58(Divider3, {}),
|
7895
|
+
/* @__PURE__ */ jsx58(F_authenticate_Logout, {})
|
7763
7896
|
] }),
|
7764
|
-
/* @__PURE__ */
|
7765
|
-
/* @__PURE__ */
|
7766
|
-
/* @__PURE__ */
|
7897
|
+
/* @__PURE__ */ jsxs33(AppShell.Section, { p: "md", children: [
|
7898
|
+
/* @__PURE__ */ jsx58(Divider3, {}),
|
7899
|
+
/* @__PURE__ */ jsx58(
|
7767
7900
|
Image3,
|
7768
7901
|
{
|
7769
7902
|
fit: "contain",
|
@@ -7777,7 +7910,7 @@ function BasicAppShell({ children, menu, extraTopRight, title }) {
|
|
7777
7910
|
)
|
7778
7911
|
] })
|
7779
7912
|
] }),
|
7780
|
-
/* @__PURE__ */
|
7913
|
+
/* @__PURE__ */ jsx58(
|
7781
7914
|
AppShell.Main,
|
7782
7915
|
{
|
7783
7916
|
bg: "light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-8))",
|
@@ -7832,17 +7965,17 @@ function utils_layout_getItemsWithoutLinks(menu) {
|
|
7832
7965
|
|
7833
7966
|
// src/components/Layouts/Container/MyContainer.tsx
|
7834
7967
|
import { Container, Flex as Flex5 } from "@mantine/core";
|
7835
|
-
import { jsx as
|
7968
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
7836
7969
|
function MyContainer(_a) {
|
7837
7970
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
7838
|
-
return /* @__PURE__ */
|
7971
|
+
return /* @__PURE__ */ jsx59(Container, __spreadProps(__spreadValues({ fluid: true }, rest), { children: /* @__PURE__ */ jsx59(Flex5, { direction: "column", children }) }));
|
7839
7972
|
}
|
7840
7973
|
|
7841
7974
|
// src/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx
|
7842
7975
|
import {
|
7843
7976
|
Box as Box4,
|
7844
7977
|
Burger,
|
7845
|
-
Button as
|
7978
|
+
Button as Button20,
|
7846
7979
|
Container as Container2,
|
7847
7980
|
Divider as Divider4,
|
7848
7981
|
Drawer,
|
@@ -7881,7 +8014,7 @@ function useHeaderMegaMenuStore() {
|
|
7881
8014
|
}
|
7882
8015
|
|
7883
8016
|
// src/components/Layouts/HeaderMegaMenu/HeaderMegaMenu.tsx
|
7884
|
-
import { jsx as
|
8017
|
+
import { jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
|
7885
8018
|
var mockdata = [
|
7886
8019
|
{
|
7887
8020
|
icon: IconCode,
|
@@ -7919,27 +8052,27 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7919
8052
|
const [linksOpened, { toggle: toggleLinks }] = useDisclosure12(false);
|
7920
8053
|
const HeaderMegaMenuStore = useHeaderMegaMenuStore();
|
7921
8054
|
const theme = useMantineTheme();
|
7922
|
-
const links = mockdata.map((item) => /* @__PURE__ */
|
7923
|
-
/* @__PURE__ */
|
7924
|
-
/* @__PURE__ */
|
7925
|
-
/* @__PURE__ */
|
7926
|
-
/* @__PURE__ */
|
8055
|
+
const links = mockdata.map((item) => /* @__PURE__ */ jsx60(UnstyledButton, { className: css_default.subLink, children: /* @__PURE__ */ jsxs34(Group19, { wrap: "nowrap", align: "flex-start", children: [
|
8056
|
+
/* @__PURE__ */ jsx60(ThemeIcon, { size: 34, variant: "default", radius: "md", children: /* @__PURE__ */ jsx60(item.icon, { size: 22, color: theme.colors.blue[6] }) }),
|
8057
|
+
/* @__PURE__ */ jsxs34("div", { children: [
|
8058
|
+
/* @__PURE__ */ jsx60(Text17, { size: "sm", fw: 500, children: item.title }),
|
8059
|
+
/* @__PURE__ */ jsx60(Text17, { size: "xs", c: "dimmed", children: item.description })
|
7927
8060
|
] })
|
7928
8061
|
] }) }, item.title));
|
7929
|
-
return /* @__PURE__ */
|
7930
|
-
/* @__PURE__ */
|
7931
|
-
/* @__PURE__ */
|
7932
|
-
/* @__PURE__ */
|
7933
|
-
/* @__PURE__ */
|
8062
|
+
return /* @__PURE__ */ jsxs34(Box4, { children: [
|
8063
|
+
/* @__PURE__ */ jsx60("header", { className: css_default.header, children: /* @__PURE__ */ jsxs34(Group19, { justify: "space-between", h: "100%", children: [
|
8064
|
+
/* @__PURE__ */ jsxs34(Group19, { children: [
|
8065
|
+
/* @__PURE__ */ jsx60(Image4, { src: "/imgs/0/IMG0LogoAQTech.png", h: 30, alt: "", w: "auto" }),
|
8066
|
+
/* @__PURE__ */ jsx60(Group19, { h: "100%", gap: 5, visibleFrom: "sm", children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx60(Button20, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) })
|
7934
8067
|
] }),
|
7935
|
-
/* @__PURE__ */
|
7936
|
-
/* @__PURE__ */
|
7937
|
-
/* @__PURE__ */
|
8068
|
+
/* @__PURE__ */ jsxs34(Group19, { children: [
|
8069
|
+
/* @__PURE__ */ jsx60(TextInput3, { placeholder: "T\xECm ki\u1EBFm", leftSection: /* @__PURE__ */ jsx60(IconSearch2, {}), radius: "xl", w: "250px" }),
|
8070
|
+
/* @__PURE__ */ jsx60(MySwitchTheme, {})
|
7938
8071
|
] }),
|
7939
|
-
/* @__PURE__ */
|
8072
|
+
/* @__PURE__ */ jsx60(Burger, { opened: drawerOpened, onClick: toggleDrawer, hiddenFrom: "sm" })
|
7940
8073
|
] }) }),
|
7941
|
-
/* @__PURE__ */
|
7942
|
-
/* @__PURE__ */
|
8074
|
+
/* @__PURE__ */ jsx60(Container2, { fluid: true, pt: "sm", pb: "md", bg: const_object_colors.mantineBackgroundSecondary, mih: "93vh", children }),
|
8075
|
+
/* @__PURE__ */ jsx60(
|
7943
8076
|
Drawer,
|
7944
8077
|
{
|
7945
8078
|
opened: drawerOpened,
|
@@ -7949,10 +8082,10 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7949
8082
|
title: "Navigation",
|
7950
8083
|
hiddenFrom: "sm",
|
7951
8084
|
zIndex: 1e6,
|
7952
|
-
children: /* @__PURE__ */
|
7953
|
-
/* @__PURE__ */
|
7954
|
-
/* @__PURE__ */
|
7955
|
-
/* @__PURE__ */
|
8085
|
+
children: /* @__PURE__ */ jsxs34(ScrollArea5, { h: "calc(100vh - 80px", mx: "-md", children: [
|
8086
|
+
/* @__PURE__ */ jsx60(Divider4, { my: "sm" }),
|
8087
|
+
/* @__PURE__ */ jsx60(MyFlexColumn, { h: "100%", gap: 0, children: menus == null ? void 0 : menus.map((item, idx) => /* @__PURE__ */ jsx60(Button20, { component: Link4, href: item.href, variant: HeaderMegaMenuStore.state.name == item.label ? "light" : "subtle", onClick: () => HeaderMegaMenuStore.setState({ name: item.label }), children: item.label }, idx)) }),
|
8088
|
+
/* @__PURE__ */ jsx60(Divider4, { my: "sm" })
|
7956
8089
|
] })
|
7957
8090
|
}
|
7958
8091
|
)
|
@@ -7961,7 +8094,7 @@ function HeaderMegaMenu({ children, menus }) {
|
|
7961
8094
|
|
7962
8095
|
// src/components/Layouts/PageContent/MyPageContent.tsx
|
7963
8096
|
import { Badge as Badge5, Breadcrumbs, Code, Container as Container3, Divider as Divider5, Group as Group20, Text as Text18, Title } from "@mantine/core";
|
7964
|
-
import { jsx as
|
8097
|
+
import { jsx as jsx61, jsxs as jsxs35 } from "react/jsx-runtime";
|
7965
8098
|
var getStatusColor = (status) => {
|
7966
8099
|
switch (status) {
|
7967
8100
|
case "Prototype":
|
@@ -7972,10 +8105,10 @@ var getStatusColor = (status) => {
|
|
7972
8105
|
};
|
7973
8106
|
function PageTitle({ title, status, note }) {
|
7974
8107
|
const color = getStatusColor(status);
|
7975
|
-
return /* @__PURE__ */
|
7976
|
-
/* @__PURE__ */
|
7977
|
-
/* @__PURE__ */
|
7978
|
-
status && /* @__PURE__ */
|
8108
|
+
return /* @__PURE__ */ jsx61(Group20, { children: /* @__PURE__ */ jsxs35(MyFlexColumn, { gap: 0, children: [
|
8109
|
+
/* @__PURE__ */ jsxs35(Group20, { align: "center", children: [
|
8110
|
+
/* @__PURE__ */ jsx61(Title, { order: 3, children: title }),
|
8111
|
+
status && /* @__PURE__ */ jsx61(
|
7979
8112
|
Badge5,
|
7980
8113
|
{
|
7981
8114
|
variant: "gradient",
|
@@ -7986,7 +8119,7 @@ function PageTitle({ title, status, note }) {
|
|
7986
8119
|
}
|
7987
8120
|
)
|
7988
8121
|
] }),
|
7989
|
-
/* @__PURE__ */
|
8122
|
+
/* @__PURE__ */ jsx61(Text18, { size: "lg", c: "dimmed", fs: "italic", children: note })
|
7990
8123
|
] }) });
|
7991
8124
|
}
|
7992
8125
|
function MyPageContent({
|
@@ -7999,11 +8132,11 @@ function MyPageContent({
|
|
7999
8132
|
var _a;
|
8000
8133
|
const basicAppShellStore = useS_BasicAppShell();
|
8001
8134
|
const finalTitle = title || basicAppShellStore.state.title;
|
8002
|
-
return /* @__PURE__ */
|
8003
|
-
/* @__PURE__ */
|
8004
|
-
/* @__PURE__ */
|
8005
|
-
/* @__PURE__ */
|
8006
|
-
/* @__PURE__ */
|
8135
|
+
return /* @__PURE__ */ jsxs35(Container3, { p: 0, fluid: true, children: [
|
8136
|
+
/* @__PURE__ */ jsxs35(Group20, { justify: "space-between", children: [
|
8137
|
+
/* @__PURE__ */ jsxs35(Group20, { children: [
|
8138
|
+
/* @__PURE__ */ jsx61(MyButtonRouterBack, {}),
|
8139
|
+
/* @__PURE__ */ jsx61(
|
8007
8140
|
PageTitle,
|
8008
8141
|
{
|
8009
8142
|
title: finalTitle,
|
@@ -8013,64 +8146,64 @@ function MyPageContent({
|
|
8013
8146
|
),
|
8014
8147
|
leftTopBar
|
8015
8148
|
] }),
|
8016
|
-
/* @__PURE__ */
|
8149
|
+
/* @__PURE__ */ jsxs35(Group20, { p: "md", children: [
|
8017
8150
|
rightTopBar,
|
8018
|
-
/* @__PURE__ */
|
8151
|
+
/* @__PURE__ */ jsx61(Breadcrumbs, { separatorMargin: "7", children: (_a = basicAppShellStore.state.breadcrumb) == null ? void 0 : _a.map((item, idx) => /* @__PURE__ */ jsx61(Text18, { fw: "600", c: "blue", children: item }, idx)) })
|
8019
8152
|
] })
|
8020
8153
|
] }),
|
8021
|
-
/* @__PURE__ */
|
8154
|
+
/* @__PURE__ */ jsx61(Divider5, { my: "xs" }),
|
8022
8155
|
children,
|
8023
|
-
/* @__PURE__ */
|
8024
|
-
/* @__PURE__ */
|
8156
|
+
/* @__PURE__ */ jsx61(Divider5, { my: "xs" }),
|
8157
|
+
/* @__PURE__ */ jsx61(MyFlexEnd, { children: /* @__PURE__ */ jsx61(Code, { color: "var(--mantine-color-blue-light)", children: basicAppShellStore.state.menuCode }) })
|
8025
8158
|
] });
|
8026
8159
|
}
|
8027
8160
|
|
8028
8161
|
// src/components/Layouts/Tab/MyTab.tsx
|
8029
8162
|
import { rem, Space as Space3, Tabs } from "@mantine/core";
|
8030
|
-
import { jsx as
|
8163
|
+
import { jsx as jsx62, jsxs as jsxs36 } from "react/jsx-runtime";
|
8031
8164
|
function MyTab(_a) {
|
8032
8165
|
var _b = _a, { tabList, children } = _b, rest = __objRest(_b, ["tabList", "children"]);
|
8033
8166
|
const iconStyle = { width: rem(20), height: rem(20) };
|
8034
|
-
return /* @__PURE__ */
|
8035
|
-
/* @__PURE__ */
|
8036
|
-
return /* @__PURE__ */
|
8167
|
+
return /* @__PURE__ */ jsxs36(Tabs, __spreadProps(__spreadValues({ defaultValue: tabList[0].label }, rest), { children: [
|
8168
|
+
/* @__PURE__ */ jsx62(Tabs.List, { children: tabList.map((item, idx) => {
|
8169
|
+
return /* @__PURE__ */ jsx62(Tabs.Tab, { value: item.label, leftSection: item.icon && /* @__PURE__ */ jsx62(item.icon, { style: iconStyle }), children: item.label }, idx);
|
8037
8170
|
}) }),
|
8038
|
-
/* @__PURE__ */
|
8171
|
+
/* @__PURE__ */ jsx62(Space3, { my: "md" }),
|
8039
8172
|
children
|
8040
8173
|
] }));
|
8041
8174
|
}
|
8042
8175
|
|
8043
8176
|
// src/components/RESTAPIComponents/DataTableSelect/MyDataTableSelect.tsx
|
8044
|
-
import { ActionIcon as
|
8177
|
+
import { ActionIcon as ActionIcon14, Button as Button21, Fieldset as Fieldset5, Group as Group21, Modal as Modal13 } from "@mantine/core";
|
8045
8178
|
import { useDisclosure as useDisclosure13 } from "@mantine/hooks";
|
8046
|
-
import { IconX as
|
8047
|
-
import { jsx as
|
8179
|
+
import { IconX as IconX4 } from "@tabler/icons-react";
|
8180
|
+
import { jsx as jsx63, jsxs as jsxs37 } from "react/jsx-runtime";
|
8048
8181
|
function MyDataTableSelect(_a) {
|
8049
8182
|
var _b = _a, { modalSize, renderTopToolbarCustomActions, data, selectButtonlabel, listState, columns, listLabel } = _b, rest = __objRest(_b, ["modalSize", "renderTopToolbarCustomActions", "data", "selectButtonlabel", "listState", "columns", "listLabel"]);
|
8050
8183
|
const disc = useDisclosure13(false);
|
8051
8184
|
if (data == void 0) return "\u0110ang t\u1EA3i...";
|
8052
|
-
return /* @__PURE__ */
|
8053
|
-
/* @__PURE__ */
|
8185
|
+
return /* @__PURE__ */ jsxs37(Fieldset5, { legend: listLabel ? listLabel : "Danh s\xE1ch", children: [
|
8186
|
+
/* @__PURE__ */ jsx63(
|
8054
8187
|
MyDataTable,
|
8055
8188
|
__spreadValues({
|
8056
8189
|
renderTopToolbarCustomActions: ({ table }) => {
|
8057
|
-
return /* @__PURE__ */
|
8190
|
+
return /* @__PURE__ */ jsxs37(Group21, { children: [
|
8058
8191
|
renderTopToolbarCustomActions && renderTopToolbarCustomActions({ table }),
|
8059
|
-
/* @__PURE__ */
|
8192
|
+
/* @__PURE__ */ jsx63(Button21, { onClick: disc[1].open, children: selectButtonlabel || "Ch\u1ECDn t\u1EEB danh s\xE1ch" })
|
8060
8193
|
] });
|
8061
8194
|
},
|
8062
8195
|
columns,
|
8063
8196
|
data: listState[0],
|
8064
8197
|
renderRowActions: ({ row }) => {
|
8065
|
-
return /* @__PURE__ */
|
8198
|
+
return /* @__PURE__ */ jsx63(MyCenterFull, { children: /* @__PURE__ */ jsx63(ActionIcon14, { color: "red", onClick: () => listState[1].remove(row.index), children: /* @__PURE__ */ jsx63(IconX4, {}) }) });
|
8066
8199
|
}
|
8067
8200
|
}, rest)
|
8068
8201
|
),
|
8069
|
-
/* @__PURE__ */
|
8202
|
+
/* @__PURE__ */ jsx63(Modal13, { opened: disc[0], onClose: disc[1].close, size: modalSize || "80%", children: /* @__PURE__ */ jsx63(
|
8070
8203
|
MyDataTable,
|
8071
8204
|
__spreadValues({
|
8072
8205
|
renderTopToolbarCustomActions: ({ table }) => {
|
8073
|
-
return /* @__PURE__ */
|
8206
|
+
return /* @__PURE__ */ jsx63(Button21, { onClick: () => {
|
8074
8207
|
table.getSelectedRowModel().rows.map((item) => listState[1].append(item.original));
|
8075
8208
|
disc[1].close();
|
8076
8209
|
}, children: "Ch\u1ECDn" });
|
@@ -8086,7 +8219,7 @@ function MyDataTableSelect(_a) {
|
|
8086
8219
|
// src/components/RESTAPIComponents/SelectAPIGet/MySelectAPIGet.tsx
|
8087
8220
|
import { Select as Select3 } from "@mantine/core";
|
8088
8221
|
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
8089
|
-
import { jsx as
|
8222
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
8090
8223
|
function MySelectAPIGet(_a) {
|
8091
8224
|
var _b = _a, { apiGet, label = "", dataMapper } = _b, rest = __objRest(_b, ["apiGet", "label", "dataMapper"]);
|
8092
8225
|
var _a2;
|
@@ -8105,7 +8238,7 @@ function MySelectAPIGet(_a) {
|
|
8105
8238
|
label: `${item.code}-${item.name}`
|
8106
8239
|
};
|
8107
8240
|
});
|
8108
|
-
return /* @__PURE__ */
|
8241
|
+
return /* @__PURE__ */ jsx64(
|
8109
8242
|
Select3,
|
8110
8243
|
__spreadValues({
|
8111
8244
|
label,
|
@@ -8120,7 +8253,7 @@ import { useNextCalendarApp as useNextCalendarApp2, ScheduleXCalendar as Schedul
|
|
8120
8253
|
import { createEventsServicePlugin as createEventsServicePlugin2 } from "@schedule-x/events-service";
|
8121
8254
|
import { useState as useState12 } from "react";
|
8122
8255
|
import { createEventModalPlugin as createEventModalPlugin2 } from "@schedule-x/event-modal";
|
8123
|
-
import { jsx as
|
8256
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
8124
8257
|
function MyScheduleX({
|
8125
8258
|
values,
|
8126
8259
|
timeGridEvent,
|
@@ -8145,7 +8278,7 @@ function MyScheduleX({
|
|
8145
8278
|
events: values,
|
8146
8279
|
plugins: [eventsService, eventModalPlugin]
|
8147
8280
|
});
|
8148
|
-
return /* @__PURE__ */
|
8281
|
+
return /* @__PURE__ */ jsx65(
|
8149
8282
|
ScheduleXCalendar2,
|
8150
8283
|
{
|
8151
8284
|
calendarApp: calendar,
|
@@ -8159,9 +8292,9 @@ function MyScheduleX({
|
|
8159
8292
|
|
8160
8293
|
// src/components/Skeletons/SkeletonTable/MySkeletonTable.tsx
|
8161
8294
|
import { Skeleton } from "@mantine/core";
|
8162
|
-
import { jsx as
|
8163
|
-
function MySkeletonTable({ h:
|
8164
|
-
return /* @__PURE__ */
|
8295
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
8296
|
+
function MySkeletonTable({ h: h4 = 500 }) {
|
8297
|
+
return /* @__PURE__ */ jsx66(Skeleton, { h: h4 });
|
8165
8298
|
}
|
8166
8299
|
|
8167
8300
|
export {
|
@@ -8183,11 +8316,13 @@ export {
|
|
8183
8316
|
MySwitchTheme,
|
8184
8317
|
MyAppSpotlight,
|
8185
8318
|
MyAnchorViewPDF,
|
8319
|
+
CoreActionIcon,
|
8320
|
+
CoreButton,
|
8186
8321
|
MyButtonModal,
|
8187
8322
|
AQButtonCreateByImportFile,
|
8188
8323
|
AQButtonExportData,
|
8324
|
+
CoreButtonCreateUpdate,
|
8189
8325
|
MyButtonCreate,
|
8190
|
-
MyButtonCreateUpdate,
|
8191
8326
|
MyButtonDeleteList,
|
8192
8327
|
MySelect,
|
8193
8328
|
MyFlexEnd,
|
@@ -8197,6 +8332,7 @@ export {
|
|
8197
8332
|
SelectFileModal,
|
8198
8333
|
MyButtonImport,
|
8199
8334
|
AQSelectTableByOpenModal,
|
8335
|
+
CoreButtonModal,
|
8200
8336
|
MyButtonPrintPDF,
|
8201
8337
|
MyHtmlWrapper,
|
8202
8338
|
MyButtonPrintTablePDF,
|