@esic-lab/data-core-ui 0.0.30 → 0.0.32
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/assets/STO-logo.svg +92 -92
- package/dist/index.css +72 -7
- package/dist/index.d.mts +93 -493
- package/dist/index.d.ts +93 -493
- package/dist/index.js +722 -423
- package/dist/index.mjs +716 -420
- package/package.json +10 -2
- package/dist/STO-logo-ADYYAPS3.svg +0 -92
package/dist/index.js
CHANGED
|
@@ -330,6 +330,28 @@ var require_th = __commonJS({
|
|
|
330
330
|
}
|
|
331
331
|
});
|
|
332
332
|
|
|
333
|
+
// node_modules/dayjs/plugin/buddhistEra.js
|
|
334
|
+
var require_buddhistEra = __commonJS({
|
|
335
|
+
"node_modules/dayjs/plugin/buddhistEra.js"(exports2, module2) {
|
|
336
|
+
"use strict";
|
|
337
|
+
!(function(t, e) {
|
|
338
|
+
"object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_buddhistEra = e();
|
|
339
|
+
})(exports2, (function() {
|
|
340
|
+
"use strict";
|
|
341
|
+
return function(t, e) {
|
|
342
|
+
var n = e.prototype, i = n.format;
|
|
343
|
+
n.format = function(t2) {
|
|
344
|
+
var e2 = this, n2 = (t2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g, (function(t3, n3) {
|
|
345
|
+
var i2, o = String(e2.$y + 543), f = "BB" === t3 ? [o.slice(-2), 2] : [o, 4];
|
|
346
|
+
return n3 || (i2 = e2.$utils()).s.apply(i2, f.concat(["0"]));
|
|
347
|
+
}));
|
|
348
|
+
return i.bind(this)(n2);
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
}));
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
|
|
333
355
|
// node_modules/dayjs/plugin/customParseFormat.js
|
|
334
356
|
var require_customParseFormat = __commonJS({
|
|
335
357
|
"node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) {
|
|
@@ -473,8 +495,10 @@ __export(index_exports, {
|
|
|
473
495
|
DatePickerBasic: () => DatePickerBasic,
|
|
474
496
|
DatePickerRangePicker: () => DatePickerRangePicker,
|
|
475
497
|
FileUploader: () => FileUploader,
|
|
498
|
+
FilterPopUp: () => FilterPopUp,
|
|
476
499
|
GhostButton: () => GhostButton,
|
|
477
500
|
HeadingPage: () => HeadingPage,
|
|
501
|
+
Indicator: () => Indicator,
|
|
478
502
|
InputField: () => InputField,
|
|
479
503
|
InputFieldNumber: () => InputFieldNumber,
|
|
480
504
|
KpiSection: () => KpiSection,
|
|
@@ -494,6 +518,7 @@ __export(index_exports, {
|
|
|
494
518
|
Sidebar: () => Sidebar,
|
|
495
519
|
SortFilter: () => SortFilter,
|
|
496
520
|
Switch: () => Switch,
|
|
521
|
+
SwitchSelect: () => SwitchSelect,
|
|
497
522
|
TabSelectionButton: () => TabSelectionButton,
|
|
498
523
|
TextAreaInput: () => TextAreaInput,
|
|
499
524
|
TextInput: () => TextInput,
|
|
@@ -728,23 +753,55 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
728
753
|
] });
|
|
729
754
|
}
|
|
730
755
|
|
|
731
|
-
// src/
|
|
756
|
+
// src/Switch/SwitchSelect/SwitchSelect.tsx
|
|
732
757
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
758
|
+
function SwitchSelect({
|
|
759
|
+
option,
|
|
760
|
+
onClick,
|
|
761
|
+
value,
|
|
762
|
+
label,
|
|
763
|
+
required,
|
|
764
|
+
color
|
|
765
|
+
}) {
|
|
766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col container-input", children: [
|
|
767
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: `body-1`, children: [
|
|
768
|
+
label,
|
|
769
|
+
" ",
|
|
770
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-red-500", children: "*" })
|
|
771
|
+
] }),
|
|
772
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex", children: option.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
773
|
+
"button",
|
|
774
|
+
{
|
|
775
|
+
onClick: () => onClick(item.value),
|
|
776
|
+
className: `
|
|
777
|
+
body-1 border-y-1 border-primary-500 cursor-pointer h-[32px] px-2
|
|
778
|
+
${item.value === value ? `${color ? `bg-[${color}]` : `bg-primary-500`} text-white` : "bg-white text-primary-500"}
|
|
779
|
+
${index === 0 ? "border-l-1 rounded-l-lg" : index === option.length - 1 ? "border-r-1 rounded-r-lg" : "border-x-1"}
|
|
780
|
+
`,
|
|
781
|
+
children: item.label
|
|
782
|
+
},
|
|
783
|
+
item.value
|
|
784
|
+
)) })
|
|
785
|
+
] });
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// src/NavBar/MenuNavBar/MenuNavBar.tsx
|
|
789
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
733
790
|
function MenuNavBar({ menus, onClick }) {
|
|
734
|
-
return /* @__PURE__ */ (0,
|
|
735
|
-
/* @__PURE__ */ (0,
|
|
736
|
-
menu?.subMenus.map((subMenu) => /* @__PURE__ */ (0,
|
|
791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-full h-full p-[10px] bg-white", children: menus?.map((menu, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `p-[10px] ${index !== 0 ? "mt-[10px]" : ""}`, children: [
|
|
792
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "p-[10px] w-[202px] h-[47px] subtitle-1", children: menu.title }),
|
|
793
|
+
menu?.subMenus.map((subMenu) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
737
794
|
"div",
|
|
738
795
|
{
|
|
739
796
|
className: "group flex justify-center items-center gap-[10px] p-[10px] w-[202px] h-[47px] rounded-[6px] subtitle-2 cursor-pointer hover:bg-red-100 active:bg-primary-500 hover:text-white active:text-white",
|
|
740
797
|
onClick: () => onClick(subMenu.path),
|
|
741
798
|
children: [
|
|
742
|
-
/* @__PURE__ */ (0,
|
|
743
|
-
subMenu.icon && /* @__PURE__ */ (0,
|
|
744
|
-
subMenu.iconActive && /* @__PURE__ */ (0,
|
|
799
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex justify-center items-center w-[24px] h-[24px] text-[20px]", children: [
|
|
800
|
+
subMenu.icon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: `block ${subMenu.iconActive ? "group-active:hidden" : ""}`, children: subMenu.icon }),
|
|
801
|
+
subMenu.iconActive && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "hidden group-active:block", children: subMenu.iconActive })
|
|
745
802
|
] }),
|
|
746
803
|
subMenu.title,
|
|
747
|
-
/* @__PURE__ */ (0,
|
|
804
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "flex ml-auto", children: subMenu.customNode && subMenu.customNode })
|
|
748
805
|
]
|
|
749
806
|
},
|
|
750
807
|
`sub_${subMenu.title}`
|
|
@@ -755,39 +812,39 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
755
812
|
// src/NavBar/MenuNavBar/Sidebar.tsx
|
|
756
813
|
var import_icons_react2 = require("@tabler/icons-react");
|
|
757
814
|
var import_react = require("react");
|
|
758
|
-
var
|
|
815
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
759
816
|
var SidebarContext = (0, import_react.createContext)({ expanded: false });
|
|
760
817
|
function Sidebar({ children, logo }) {
|
|
761
818
|
const [expanded, setExpanded] = (0, import_react.useState)(true);
|
|
762
|
-
return /* @__PURE__ */ (0,
|
|
763
|
-
/* @__PURE__ */ (0,
|
|
764
|
-
expanded && logo && /* @__PURE__ */ (0,
|
|
765
|
-
/* @__PURE__ */ (0,
|
|
819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("aside", { className: "h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
|
|
821
|
+
expanded && logo && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { src: logo, width: 120, className: "ml-auto" }),
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
766
823
|
"button",
|
|
767
824
|
{
|
|
768
825
|
className: "p-1.5 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer ml-auto",
|
|
769
826
|
onClick: () => setExpanded((curr) => !curr),
|
|
770
|
-
children: expanded ? /* @__PURE__ */ (0,
|
|
827
|
+
children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons_react2.IconChevronLeftPipe, {}) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons_react2.IconChevronRightPipe, {})
|
|
771
828
|
}
|
|
772
829
|
)
|
|
773
830
|
] }),
|
|
774
|
-
/* @__PURE__ */ (0,
|
|
831
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "flex-1 px-3", children }) })
|
|
775
832
|
] }) });
|
|
776
833
|
}
|
|
777
834
|
|
|
778
835
|
// src/NavBar/TopNavBar/TopNavBar.tsx
|
|
779
836
|
var import_icons_react3 = require("@tabler/icons-react");
|
|
780
|
-
var
|
|
837
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
781
838
|
function TopNavBar({ onClickNoti, logo }) {
|
|
782
|
-
return /* @__PURE__ */ (0,
|
|
783
|
-
/* @__PURE__ */ (0,
|
|
839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w-full h-full flex", children: [
|
|
840
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
|
|
784
841
|
logo,
|
|
785
|
-
/* @__PURE__ */ (0,
|
|
842
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "subtitle-1", children: "Project Management" })
|
|
786
843
|
] }),
|
|
787
|
-
/* @__PURE__ */ (0,
|
|
788
|
-
/* @__PURE__ */ (0,
|
|
789
|
-
/* @__PURE__ */ (0,
|
|
790
|
-
/* @__PURE__ */ (0,
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: "Search" }),
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react3.IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
|
|
791
848
|
] })
|
|
792
849
|
] });
|
|
793
850
|
}
|
|
@@ -799,7 +856,7 @@ var import_react3 = require("react");
|
|
|
799
856
|
// src/Table/Pagination/Pagination.tsx
|
|
800
857
|
var import_icons_react4 = require("@tabler/icons-react");
|
|
801
858
|
var import_react2 = require("react");
|
|
802
|
-
var
|
|
859
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
803
860
|
function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
804
861
|
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
805
862
|
const getPages = (0, import_react2.useMemo)(() => {
|
|
@@ -823,21 +880,21 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
823
880
|
return pages;
|
|
824
881
|
}, [totalPages, currentPage]);
|
|
825
882
|
if (totalPages <= 1) return null;
|
|
826
|
-
return /* @__PURE__ */ (0,
|
|
827
|
-
/* @__PURE__ */ (0,
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-center gap-2 mt-4 body-1", children: [
|
|
884
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
828
885
|
"button",
|
|
829
886
|
{
|
|
830
887
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
831
888
|
disabled: currentPage === 1,
|
|
832
889
|
onClick: () => onPageChange(currentPage - 1),
|
|
833
890
|
children: [
|
|
834
|
-
/* @__PURE__ */ (0,
|
|
891
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons_react4.IconArrowLeft, {}),
|
|
835
892
|
"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A"
|
|
836
893
|
]
|
|
837
894
|
}
|
|
838
895
|
),
|
|
839
896
|
getPages.map(
|
|
840
|
-
(page, i) => typeof page === "string" ? /* @__PURE__ */ (0,
|
|
897
|
+
(page, i) => typeof page === "string" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
841
898
|
"button",
|
|
842
899
|
{
|
|
843
900
|
className: `w-[32px] h-[32px] rounded-[8px] px-3 py-1 cursor-pointer
|
|
@@ -848,7 +905,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
848
905
|
i
|
|
849
906
|
)
|
|
850
907
|
),
|
|
851
|
-
/* @__PURE__ */ (0,
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
852
909
|
"button",
|
|
853
910
|
{
|
|
854
911
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
@@ -856,7 +913,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
856
913
|
onClick: () => onPageChange(currentPage + 1),
|
|
857
914
|
children: [
|
|
858
915
|
"\u0E16\u0E31\u0E14\u0E44\u0E1B",
|
|
859
|
-
/* @__PURE__ */ (0,
|
|
916
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons_react4.IconArrowRight, {})
|
|
860
917
|
]
|
|
861
918
|
}
|
|
862
919
|
)
|
|
@@ -864,7 +921,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
864
921
|
}
|
|
865
922
|
|
|
866
923
|
// src/Table/DataTable/DataTable.tsx
|
|
867
|
-
var
|
|
924
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
868
925
|
function DataTable({ columns, data, onSort, isLoading }) {
|
|
869
926
|
const cols = Math.max(1, columns.length);
|
|
870
927
|
const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
|
|
@@ -876,14 +933,14 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
876
933
|
onSort();
|
|
877
934
|
}
|
|
878
935
|
};
|
|
879
|
-
return /* @__PURE__ */ (0,
|
|
880
|
-
/* @__PURE__ */ (0,
|
|
936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "border rounded-md w-full h-full", children: [
|
|
937
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
|
|
881
938
|
const isActive = sortConfig?.key === col.accessor;
|
|
882
939
|
const direction = isActive ? sortConfig?.direction : null;
|
|
883
|
-
return /* @__PURE__ */ (0,
|
|
940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
|
|
884
941
|
col.header,
|
|
885
|
-
col.sortable && /* @__PURE__ */ (0,
|
|
886
|
-
direction === null && /* @__PURE__ */ (0,
|
|
942
|
+
col.sortable && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
943
|
+
direction === null && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
887
944
|
import_icons_react5.IconSelector,
|
|
888
945
|
{
|
|
889
946
|
size: 15,
|
|
@@ -891,7 +948,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
891
948
|
onClick: () => onSorting({ key: col.accessor, direction: "asc" })
|
|
892
949
|
}
|
|
893
950
|
),
|
|
894
|
-
direction === "asc" && /* @__PURE__ */ (0,
|
|
951
|
+
direction === "asc" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
895
952
|
import_icons_react5.IconSortAscending,
|
|
896
953
|
{
|
|
897
954
|
size: 15,
|
|
@@ -899,7 +956,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
899
956
|
onClick: () => onSorting({ key: col.accessor, direction: "desc" })
|
|
900
957
|
}
|
|
901
958
|
),
|
|
902
|
-
direction === "desc" && /* @__PURE__ */ (0,
|
|
959
|
+
direction === "desc" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
903
960
|
import_icons_react5.IconSortDescending,
|
|
904
961
|
{
|
|
905
962
|
size: 15,
|
|
@@ -910,29 +967,32 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
910
967
|
] })
|
|
911
968
|
] }, i);
|
|
912
969
|
}) }),
|
|
913
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
970
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Loader, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children: data.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
914
971
|
"div",
|
|
915
972
|
{
|
|
916
973
|
className: `${gridClass} ${data.length - 1 !== i ? "border-b border-gray-200" : ""} items-center`,
|
|
917
974
|
style: { ["--cols"]: cols },
|
|
918
|
-
children: columns.map((col, c) => /* @__PURE__ */ (0,
|
|
975
|
+
children: columns.map((col, c) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
|
|
919
976
|
},
|
|
920
977
|
i
|
|
921
978
|
)) }),
|
|
922
|
-
/* @__PURE__ */ (0,
|
|
979
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
|
|
923
980
|
] });
|
|
924
981
|
}
|
|
925
982
|
|
|
926
983
|
// src/Table/DataTable/AntDataTable.tsx
|
|
927
984
|
var import_antd = require("antd");
|
|
928
985
|
var import_react4 = require("react");
|
|
929
|
-
var
|
|
986
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
930
987
|
function AntDataTable({
|
|
931
988
|
dataSource,
|
|
932
989
|
columns,
|
|
933
990
|
pageSize = 10,
|
|
934
991
|
rowCheckbox,
|
|
935
992
|
onRowSelect,
|
|
993
|
+
// onFilteredDataChange,
|
|
994
|
+
onFilter,
|
|
995
|
+
onChange,
|
|
936
996
|
width,
|
|
937
997
|
height,
|
|
938
998
|
pagination
|
|
@@ -945,7 +1005,11 @@ function AntDataTable({
|
|
|
945
1005
|
onRowSelect && onRowSelect(newSelectedRowKeys);
|
|
946
1006
|
}
|
|
947
1007
|
};
|
|
948
|
-
|
|
1008
|
+
const handleChange = (paginationArgs, filters, sorter, extra) => {
|
|
1009
|
+
onChange?.(paginationArgs, filters, sorter, extra);
|
|
1010
|
+
onFilter(filters);
|
|
1011
|
+
};
|
|
1012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
949
1013
|
import_antd.ConfigProvider,
|
|
950
1014
|
{
|
|
951
1015
|
theme: {
|
|
@@ -955,12 +1019,13 @@ function AntDataTable({
|
|
|
955
1019
|
fontSize: 14
|
|
956
1020
|
}
|
|
957
1021
|
},
|
|
958
|
-
children: /* @__PURE__ */ (0,
|
|
1022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
959
1023
|
import_antd.Table,
|
|
960
1024
|
{
|
|
961
1025
|
dataSource,
|
|
962
1026
|
columns,
|
|
963
1027
|
rowSelection: rowCheckbox ? rowSelection : void 0,
|
|
1028
|
+
onChange: handleChange,
|
|
964
1029
|
pagination: pagination ? { position: ["bottomCenter"], pageSize } : false,
|
|
965
1030
|
style: { width },
|
|
966
1031
|
scroll: { y: height }
|
|
@@ -978,7 +1043,7 @@ var import_timegrid = __toESM(require("@fullcalendar/timegrid"));
|
|
|
978
1043
|
var import_interaction = __toESM(require("@fullcalendar/interaction"));
|
|
979
1044
|
var import_th = __toESM(require("@fullcalendar/core/locales/th"));
|
|
980
1045
|
var import_icons_react6 = require("@tabler/icons-react");
|
|
981
|
-
var
|
|
1046
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
982
1047
|
function Calendar({ events }) {
|
|
983
1048
|
const calendarRef = (0, import_react5.useRef)(null);
|
|
984
1049
|
const [monthTitle, setMonthTitle] = (0, import_react5.useState)("");
|
|
@@ -997,11 +1062,11 @@ function Calendar({ events }) {
|
|
|
997
1062
|
(0, import_react5.useEffect)(() => {
|
|
998
1063
|
updateTitle();
|
|
999
1064
|
}, []);
|
|
1000
|
-
return /* @__PURE__ */ (0,
|
|
1001
|
-
/* @__PURE__ */ (0,
|
|
1002
|
-
/* @__PURE__ */ (0,
|
|
1003
|
-
/* @__PURE__ */ (0,
|
|
1004
|
-
/* @__PURE__ */ (0,
|
|
1065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "fc w-full h-full relative z-10", children: [
|
|
1066
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex mb-[8px]", children: [
|
|
1067
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "headline-5", children: monthTitle }),
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex gap-[10px] ml-auto", children: [
|
|
1069
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1005
1070
|
"p",
|
|
1006
1071
|
{
|
|
1007
1072
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1012,7 +1077,7 @@ function Calendar({ events }) {
|
|
|
1012
1077
|
children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
|
|
1013
1078
|
}
|
|
1014
1079
|
),
|
|
1015
|
-
/* @__PURE__ */ (0,
|
|
1080
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1016
1081
|
"p",
|
|
1017
1082
|
{
|
|
1018
1083
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1023,7 +1088,7 @@ function Calendar({ events }) {
|
|
|
1023
1088
|
children: "Month"
|
|
1024
1089
|
}
|
|
1025
1090
|
),
|
|
1026
|
-
/* @__PURE__ */ (0,
|
|
1091
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1027
1092
|
"p",
|
|
1028
1093
|
{
|
|
1029
1094
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1034,7 +1099,7 @@ function Calendar({ events }) {
|
|
|
1034
1099
|
children: "Week"
|
|
1035
1100
|
}
|
|
1036
1101
|
),
|
|
1037
|
-
/* @__PURE__ */ (0,
|
|
1102
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1038
1103
|
"p",
|
|
1039
1104
|
{
|
|
1040
1105
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -1045,7 +1110,7 @@ function Calendar({ events }) {
|
|
|
1045
1110
|
children: "Day"
|
|
1046
1111
|
}
|
|
1047
1112
|
),
|
|
1048
|
-
/* @__PURE__ */ (0,
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1049
1114
|
"button",
|
|
1050
1115
|
{
|
|
1051
1116
|
className: "cursor-pointer",
|
|
@@ -1053,10 +1118,10 @@ function Calendar({ events }) {
|
|
|
1053
1118
|
calendarRef.current?.getApi().prev();
|
|
1054
1119
|
updateTitle();
|
|
1055
1120
|
},
|
|
1056
|
-
children: /* @__PURE__ */ (0,
|
|
1121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_react6.IconChevronLeft, {})
|
|
1057
1122
|
}
|
|
1058
1123
|
),
|
|
1059
|
-
/* @__PURE__ */ (0,
|
|
1124
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1060
1125
|
"button",
|
|
1061
1126
|
{
|
|
1062
1127
|
className: "cursor-pointer",
|
|
@@ -1064,12 +1129,12 @@ function Calendar({ events }) {
|
|
|
1064
1129
|
calendarRef.current?.getApi().next();
|
|
1065
1130
|
updateTitle();
|
|
1066
1131
|
},
|
|
1067
|
-
children: /* @__PURE__ */ (0,
|
|
1132
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_react6.IconChevronRight, {})
|
|
1068
1133
|
}
|
|
1069
1134
|
)
|
|
1070
1135
|
] })
|
|
1071
1136
|
] }),
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1073
1138
|
import_react6.default,
|
|
1074
1139
|
{
|
|
1075
1140
|
ref: calendarRef,
|
|
@@ -1098,28 +1163,28 @@ function Calendar({ events }) {
|
|
|
1098
1163
|
});
|
|
1099
1164
|
},
|
|
1100
1165
|
eventContent: (arg) => {
|
|
1101
|
-
return /* @__PURE__ */ (0,
|
|
1166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex items-center h-[28px] p-[4px] border-green-500 border-l-[10px] bg-red-400 rounded text-left text-white caption-1", children: arg.event.title }) });
|
|
1102
1167
|
},
|
|
1103
1168
|
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
1104
1169
|
}
|
|
1105
1170
|
) }),
|
|
1106
|
-
openPopup && /* @__PURE__ */ (0,
|
|
1171
|
+
openPopup && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
|
|
1107
1172
|
] });
|
|
1108
1173
|
}
|
|
1109
1174
|
function EventPopUp({ event, onClose }) {
|
|
1110
|
-
return /* @__PURE__ */ (0,
|
|
1111
|
-
/* @__PURE__ */ (0,
|
|
1112
|
-
/* @__PURE__ */ (0,
|
|
1113
|
-
/* @__PURE__ */ (0,
|
|
1114
|
-
/* @__PURE__ */ (0,
|
|
1115
|
-
/* @__PURE__ */ (0,
|
|
1175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons_react6.IconX, { className: "w-6 h-6 text-gray-600" }) }),
|
|
1177
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "text-lg font-semibold", children: event.title }) }),
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { children: [
|
|
1180
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
|
|
1116
1181
|
event?.start?.toLocaleString?.() || String(event?.start)
|
|
1117
1182
|
] }),
|
|
1118
|
-
/* @__PURE__ */ (0,
|
|
1119
|
-
/* @__PURE__ */ (0,
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { children: [
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
|
|
1120
1185
|
event?.end?.toLocaleString?.() || String(event?.end)
|
|
1121
1186
|
] }),
|
|
1122
|
-
/* @__PURE__ */ (0,
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: "text-sm font-semibold text-gray-500 uppercase mb-2 hover:underline cursor-pointer", children: "\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21" })
|
|
1123
1188
|
] })
|
|
1124
1189
|
] });
|
|
1125
1190
|
}
|
|
@@ -1127,7 +1192,7 @@ function EventPopUp({ event, onClose }) {
|
|
|
1127
1192
|
// src/Input/TextInput/TextInput.tsx
|
|
1128
1193
|
var import_icons_react7 = require("@tabler/icons-react");
|
|
1129
1194
|
var import_react7 = require("react");
|
|
1130
|
-
var
|
|
1195
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1131
1196
|
function TextInput({
|
|
1132
1197
|
label,
|
|
1133
1198
|
placeholder,
|
|
@@ -1144,18 +1209,18 @@ function TextInput({
|
|
|
1144
1209
|
setShowPassword(!showPassword);
|
|
1145
1210
|
};
|
|
1146
1211
|
const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
|
|
1147
|
-
return /* @__PURE__ */ (0,
|
|
1148
|
-
label && /* @__PURE__ */ (0,
|
|
1212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
1213
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "body-1 mb-[8px]", children: [
|
|
1149
1214
|
label,
|
|
1150
|
-
required && /* @__PURE__ */ (0,
|
|
1215
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-red-500", children: "\xA0*" })
|
|
1151
1216
|
] }),
|
|
1152
|
-
/* @__PURE__ */ (0,
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1153
1218
|
"div",
|
|
1154
1219
|
{
|
|
1155
1220
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1156
|
-
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-
|
|
1221
|
+
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-500" : ""}`,
|
|
1157
1222
|
children: [
|
|
1158
|
-
/* @__PURE__ */ (0,
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1159
1224
|
"input",
|
|
1160
1225
|
{
|
|
1161
1226
|
className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
|
|
@@ -1168,17 +1233,17 @@ function TextInput({
|
|
|
1168
1233
|
disabled
|
|
1169
1234
|
}
|
|
1170
1235
|
),
|
|
1171
|
-
type === "password" && (showPassword ? /* @__PURE__ */ (0,
|
|
1236
|
+
type === "password" && (showPassword ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react7.IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react7.IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
|
|
1172
1237
|
]
|
|
1173
1238
|
}
|
|
1174
1239
|
),
|
|
1175
|
-
error && /* @__PURE__ */ (0,
|
|
1240
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-red-500 body-1", children: error })
|
|
1176
1241
|
] });
|
|
1177
1242
|
}
|
|
1178
1243
|
|
|
1179
1244
|
// src/Input/TextArea/TextArea.tsx
|
|
1180
1245
|
var import_antd2 = require("antd");
|
|
1181
|
-
var
|
|
1246
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1182
1247
|
var { TextArea } = import_antd2.Input;
|
|
1183
1248
|
function TextAreaInput({
|
|
1184
1249
|
label,
|
|
@@ -1193,7 +1258,7 @@ function TextAreaInput({
|
|
|
1193
1258
|
error,
|
|
1194
1259
|
disabled
|
|
1195
1260
|
}) {
|
|
1196
|
-
return /* @__PURE__ */ (0,
|
|
1261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1197
1262
|
import_antd2.ConfigProvider,
|
|
1198
1263
|
{
|
|
1199
1264
|
theme: {
|
|
@@ -1203,13 +1268,13 @@ function TextAreaInput({
|
|
|
1203
1268
|
fontSize: 16
|
|
1204
1269
|
}
|
|
1205
1270
|
},
|
|
1206
|
-
children: /* @__PURE__ */ (0,
|
|
1207
|
-
label && /* @__PURE__ */ (0,
|
|
1271
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
1272
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "body-1 mb-[8px]", children: [
|
|
1208
1273
|
label,
|
|
1209
1274
|
" ",
|
|
1210
|
-
required && /* @__PURE__ */ (0,
|
|
1275
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-red-500", children: "\xA0*" })
|
|
1211
1276
|
] }),
|
|
1212
|
-
/* @__PURE__ */ (0,
|
|
1277
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1213
1278
|
TextArea,
|
|
1214
1279
|
{
|
|
1215
1280
|
value,
|
|
@@ -1225,7 +1290,7 @@ function TextAreaInput({
|
|
|
1225
1290
|
disabled
|
|
1226
1291
|
}
|
|
1227
1292
|
),
|
|
1228
|
-
error && /* @__PURE__ */ (0,
|
|
1293
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-red-500 body-1", children: error })
|
|
1229
1294
|
] })
|
|
1230
1295
|
}
|
|
1231
1296
|
) });
|
|
@@ -1233,23 +1298,23 @@ function TextAreaInput({
|
|
|
1233
1298
|
|
|
1234
1299
|
// src/Input/InputField/InputField.tsx
|
|
1235
1300
|
var import_antd3 = require("antd");
|
|
1236
|
-
var
|
|
1301
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1237
1302
|
function InputField({
|
|
1238
1303
|
value,
|
|
1239
1304
|
onChange,
|
|
1240
1305
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1241
|
-
|
|
1306
|
+
label,
|
|
1242
1307
|
required,
|
|
1243
|
-
bottomText,
|
|
1244
1308
|
disabled,
|
|
1245
1309
|
error,
|
|
1246
1310
|
addonBefore,
|
|
1247
1311
|
addonAfter,
|
|
1248
1312
|
defaultValue,
|
|
1249
1313
|
className,
|
|
1250
|
-
onClear
|
|
1314
|
+
onClear,
|
|
1315
|
+
statickey
|
|
1251
1316
|
}) {
|
|
1252
|
-
return /* @__PURE__ */ (0,
|
|
1317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1253
1318
|
import_antd3.ConfigProvider,
|
|
1254
1319
|
{
|
|
1255
1320
|
theme: {
|
|
@@ -1257,32 +1322,31 @@ function InputField({
|
|
|
1257
1322
|
fontFamily: "Kanit"
|
|
1258
1323
|
}
|
|
1259
1324
|
},
|
|
1260
|
-
children: /* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "container-input", children: [
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
1327
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "body-1", children: label }),
|
|
1263
1328
|
" ",
|
|
1264
|
-
required && /* @__PURE__ */ (0,
|
|
1329
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1265
1330
|
] }),
|
|
1266
|
-
/* @__PURE__ */ (0,
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
] })
|
|
1331
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_antd3.Space.Compact, { children: [
|
|
1332
|
+
statickey && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "items-center flex px-2 bg-gray-300 rounded-l-md body-1", children: statickey }),
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1334
|
+
import_antd3.Input,
|
|
1335
|
+
{
|
|
1336
|
+
value,
|
|
1337
|
+
placeholder,
|
|
1338
|
+
disabled,
|
|
1339
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1340
|
+
onChange: (e) => onChange(e.target.value || void 0),
|
|
1341
|
+
allowClear: true,
|
|
1342
|
+
addonBefore,
|
|
1343
|
+
addonAfter,
|
|
1344
|
+
defaultValue,
|
|
1345
|
+
onClear
|
|
1346
|
+
}
|
|
1347
|
+
)
|
|
1348
|
+
] }),
|
|
1349
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1286
1350
|
] })
|
|
1287
1351
|
}
|
|
1288
1352
|
);
|
|
@@ -1290,12 +1354,12 @@ function InputField({
|
|
|
1290
1354
|
|
|
1291
1355
|
// src/Input/InputFieldNumber/InputFieldNumber.tsx
|
|
1292
1356
|
var import_antd4 = require("antd");
|
|
1293
|
-
var
|
|
1357
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1294
1358
|
function InputFieldNumber({
|
|
1295
1359
|
value,
|
|
1296
1360
|
onChange,
|
|
1297
1361
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1298
|
-
|
|
1362
|
+
label,
|
|
1299
1363
|
required,
|
|
1300
1364
|
disabled,
|
|
1301
1365
|
error,
|
|
@@ -1311,7 +1375,7 @@ function InputFieldNumber({
|
|
|
1311
1375
|
formatter,
|
|
1312
1376
|
parser
|
|
1313
1377
|
}) {
|
|
1314
|
-
return /* @__PURE__ */ (0,
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1315
1379
|
import_antd4.ConfigProvider,
|
|
1316
1380
|
{
|
|
1317
1381
|
theme: {
|
|
@@ -1319,20 +1383,20 @@ function InputFieldNumber({
|
|
|
1319
1383
|
fontFamily: "Kanit"
|
|
1320
1384
|
}
|
|
1321
1385
|
},
|
|
1322
|
-
children: /* @__PURE__ */ (0,
|
|
1323
|
-
/* @__PURE__ */ (0,
|
|
1324
|
-
/* @__PURE__ */ (0,
|
|
1386
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "container-input", children: [
|
|
1387
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "body-1", children: label }),
|
|
1325
1389
|
" ",
|
|
1326
|
-
required && /* @__PURE__ */ (0,
|
|
1390
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1327
1391
|
] }),
|
|
1328
|
-
/* @__PURE__ */ (0,
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1329
1393
|
import_antd4.InputNumber,
|
|
1330
1394
|
{
|
|
1331
1395
|
value: value ?? void 0,
|
|
1332
1396
|
onChange: (val) => onChange(val),
|
|
1333
1397
|
placeholder,
|
|
1334
1398
|
disabled,
|
|
1335
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1399
|
+
className: `body-1 !w-full ${className ?? ""}`,
|
|
1336
1400
|
addonBefore,
|
|
1337
1401
|
addonAfter,
|
|
1338
1402
|
defaultValue,
|
|
@@ -1345,7 +1409,7 @@ function InputFieldNumber({
|
|
|
1345
1409
|
parser
|
|
1346
1410
|
}
|
|
1347
1411
|
),
|
|
1348
|
-
error && /* @__PURE__ */ (0,
|
|
1412
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1349
1413
|
] })
|
|
1350
1414
|
}
|
|
1351
1415
|
);
|
|
@@ -1354,15 +1418,19 @@ function InputFieldNumber({
|
|
|
1354
1418
|
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1355
1419
|
var import_antd5 = require("antd");
|
|
1356
1420
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
1357
|
-
var import_th_TH = __toESM(require("antd/locale/th_TH"));
|
|
1421
|
+
var import_th_TH = __toESM(require("antd/es/date-picker/locale/th_TH"));
|
|
1422
|
+
var import_th_TH2 = __toESM(require("antd/locale/th_TH"));
|
|
1358
1423
|
var import_th2 = __toESM(require_th());
|
|
1359
|
-
var
|
|
1424
|
+
var import_locale = require("date-fns/locale");
|
|
1425
|
+
var import_date_fns = require("date-fns");
|
|
1426
|
+
var import_buddhistEra = __toESM(require_buddhistEra());
|
|
1427
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1428
|
+
import_dayjs.default.extend(import_buddhistEra.default);
|
|
1360
1429
|
function DatePickerBasic({
|
|
1361
1430
|
value,
|
|
1362
1431
|
onChange,
|
|
1363
1432
|
required,
|
|
1364
|
-
|
|
1365
|
-
bottomText,
|
|
1433
|
+
label,
|
|
1366
1434
|
error,
|
|
1367
1435
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
1368
1436
|
disabled,
|
|
@@ -1375,23 +1443,33 @@ function DatePickerBasic({
|
|
|
1375
1443
|
}) {
|
|
1376
1444
|
const dateFormat = "DD/MM/YYYY";
|
|
1377
1445
|
import_dayjs.default.locale("th_TH");
|
|
1378
|
-
|
|
1446
|
+
const buddhistLocale = {
|
|
1447
|
+
...import_th_TH.default,
|
|
1448
|
+
lang: {
|
|
1449
|
+
...import_th_TH.default.lang,
|
|
1450
|
+
fieldDateFormat: "BBBB-MM-DD",
|
|
1451
|
+
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1452
|
+
yearFormat: "BBBB",
|
|
1453
|
+
cellYearFormat: "BBBB"
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1379
1457
|
import_antd5.ConfigProvider,
|
|
1380
1458
|
{
|
|
1381
|
-
locale:
|
|
1459
|
+
locale: import_th_TH2.default,
|
|
1382
1460
|
theme: {
|
|
1383
1461
|
token: {
|
|
1384
1462
|
fontFamily: "Kanit",
|
|
1385
1463
|
fontSize: 16
|
|
1386
1464
|
}
|
|
1387
1465
|
},
|
|
1388
|
-
children: /* @__PURE__ */ (0,
|
|
1389
|
-
/* @__PURE__ */ (0,
|
|
1390
|
-
/* @__PURE__ */ (0,
|
|
1466
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "container-input", children: [
|
|
1467
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
1468
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "body-1", children: label }),
|
|
1391
1469
|
" ",
|
|
1392
|
-
required && /* @__PURE__ */ (0,
|
|
1470
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1393
1471
|
] }),
|
|
1394
|
-
/* @__PURE__ */ (0,
|
|
1472
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1395
1473
|
import_antd5.DatePicker,
|
|
1396
1474
|
{
|
|
1397
1475
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -1400,19 +1478,19 @@ function DatePickerBasic({
|
|
|
1400
1478
|
onChange,
|
|
1401
1479
|
allowClear: true,
|
|
1402
1480
|
disabled,
|
|
1403
|
-
format:
|
|
1481
|
+
format: (date) => date ? (0, import_date_fns.format)(date.toDate(), "dd/MM/yyyy", { locale: import_locale.th }).replace(
|
|
1482
|
+
/\d{4}$/,
|
|
1483
|
+
(y) => String(parseInt(y) + 543)
|
|
1484
|
+
) : "",
|
|
1404
1485
|
defaultValue,
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
size
|
|
1486
|
+
disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
|
|
1487
|
+
minDate: minDate ? (0, import_dayjs.default)(minDate) : void 0,
|
|
1488
|
+
maxDate: maxDate ? (0, import_dayjs.default)(maxDate) : void 0,
|
|
1489
|
+
size,
|
|
1490
|
+
locale: buddhistLocale
|
|
1409
1491
|
}
|
|
1410
1492
|
),
|
|
1411
|
-
/* @__PURE__ */ (0,
|
|
1412
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1413
|
-
" ",
|
|
1414
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1415
|
-
] })
|
|
1493
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1416
1494
|
] })
|
|
1417
1495
|
}
|
|
1418
1496
|
);
|
|
@@ -1420,19 +1498,21 @@ function DatePickerBasic({
|
|
|
1420
1498
|
|
|
1421
1499
|
// src/DatePicker/DatePickerRangePicker/DatePickerRangePicker.tsx
|
|
1422
1500
|
var import_antd6 = require("antd");
|
|
1423
|
-
var
|
|
1501
|
+
var import_th_TH3 = __toESM(require("antd/locale/th_TH"));
|
|
1424
1502
|
var import_th3 = __toESM(require_th());
|
|
1503
|
+
var import_th_TH4 = __toESM(require("antd/es/date-picker/locale/th_TH"));
|
|
1425
1504
|
var import_customParseFormat = __toESM(require_customParseFormat());
|
|
1426
1505
|
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1427
|
-
var
|
|
1506
|
+
var import_date_fns2 = require("date-fns");
|
|
1507
|
+
var import_locale2 = require("date-fns/locale");
|
|
1508
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1428
1509
|
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
1429
1510
|
function DatePickerRangePicker({
|
|
1430
1511
|
value,
|
|
1431
1512
|
onChange,
|
|
1432
1513
|
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1433
|
-
|
|
1514
|
+
label,
|
|
1434
1515
|
required,
|
|
1435
|
-
bottomText,
|
|
1436
1516
|
error,
|
|
1437
1517
|
disabled,
|
|
1438
1518
|
minDate,
|
|
@@ -1445,45 +1525,71 @@ function DatePickerRangePicker({
|
|
|
1445
1525
|
}) {
|
|
1446
1526
|
const dateFormat = "DD/MM/YYYY";
|
|
1447
1527
|
import_dayjs2.default.locale("th_TH");
|
|
1448
|
-
|
|
1528
|
+
const buddhistLocale = {
|
|
1529
|
+
...import_th_TH4.default,
|
|
1530
|
+
lang: {
|
|
1531
|
+
...import_th_TH4.default.lang,
|
|
1532
|
+
fieldDateFormat: "BBBB-MM-DD",
|
|
1533
|
+
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1534
|
+
yearFormat: "BBBB",
|
|
1535
|
+
cellYearFormat: "BBBB"
|
|
1536
|
+
}
|
|
1537
|
+
};
|
|
1538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1449
1539
|
import_antd6.ConfigProvider,
|
|
1450
1540
|
{
|
|
1451
|
-
locale:
|
|
1541
|
+
locale: import_th_TH3.default,
|
|
1452
1542
|
theme: {
|
|
1453
1543
|
token: {
|
|
1454
1544
|
fontFamily: "Kanit",
|
|
1455
1545
|
fontSize: 16
|
|
1456
1546
|
}
|
|
1457
1547
|
},
|
|
1458
|
-
children: /* @__PURE__ */ (0,
|
|
1459
|
-
/* @__PURE__ */ (0,
|
|
1460
|
-
/* @__PURE__ */ (0,
|
|
1548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "container-input", children: [
|
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
1550
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "body-1", children: label }),
|
|
1461
1551
|
" ",
|
|
1462
|
-
required && /* @__PURE__ */ (0,
|
|
1552
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1463
1553
|
] }),
|
|
1464
|
-
/* @__PURE__ */ (0,
|
|
1554
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1465
1555
|
import_antd6.DatePicker.RangePicker,
|
|
1466
1556
|
{
|
|
1467
|
-
format:
|
|
1468
|
-
|
|
1557
|
+
format: (date) => date ? (0, import_date_fns2.format)(date.toDate(), "dd/MM/yyyy", { locale: import_locale2.th }).replace(
|
|
1558
|
+
/\d{4}$/,
|
|
1559
|
+
(y) => String(parseInt(y) + 543)
|
|
1560
|
+
) : "",
|
|
1561
|
+
value: value ? [value[0] ? (0, import_dayjs2.default)(value[0]) : null, value[1] ? (0, import_dayjs2.default)(value[1]) : null] : null,
|
|
1469
1562
|
placeholder,
|
|
1470
1563
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1471
|
-
onChange,
|
|
1564
|
+
onChange: (dates, dateStrings) => {
|
|
1565
|
+
if (!dates) {
|
|
1566
|
+
onChange(null);
|
|
1567
|
+
} else {
|
|
1568
|
+
onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
|
|
1569
|
+
}
|
|
1570
|
+
},
|
|
1472
1571
|
allowClear: true,
|
|
1473
1572
|
disabled,
|
|
1474
|
-
minDate,
|
|
1475
|
-
maxDate,
|
|
1476
|
-
disabledDate,
|
|
1573
|
+
minDate: minDate ? (0, import_dayjs2.default)(minDate) : void 0,
|
|
1574
|
+
maxDate: maxDate ? (0, import_dayjs2.default)(maxDate) : void 0,
|
|
1575
|
+
disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
|
|
1477
1576
|
size,
|
|
1478
1577
|
onOpenChange,
|
|
1479
|
-
onCalendarChange
|
|
1578
|
+
onCalendarChange: (dates, dateStrings, info) => {
|
|
1579
|
+
if (!dates) {
|
|
1580
|
+
onCalendarChange?.([null, null], dateStrings, info);
|
|
1581
|
+
} else {
|
|
1582
|
+
onCalendarChange?.(
|
|
1583
|
+
[dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null],
|
|
1584
|
+
dateStrings,
|
|
1585
|
+
info
|
|
1586
|
+
);
|
|
1587
|
+
}
|
|
1588
|
+
},
|
|
1589
|
+
locale: buddhistLocale
|
|
1480
1590
|
}
|
|
1481
1591
|
),
|
|
1482
|
-
/* @__PURE__ */ (0,
|
|
1483
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1484
|
-
" ",
|
|
1485
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1486
|
-
] })
|
|
1592
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1487
1593
|
] })
|
|
1488
1594
|
}
|
|
1489
1595
|
);
|
|
@@ -1491,49 +1597,49 @@ function DatePickerRangePicker({
|
|
|
1491
1597
|
|
|
1492
1598
|
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1493
1599
|
var import_antd7 = require("antd");
|
|
1494
|
-
var
|
|
1600
|
+
var import_dayjs3 = __toESM(require_dayjs_min());
|
|
1601
|
+
var import_th_TH5 = __toESM(require("antd/locale/th_TH"));
|
|
1602
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1495
1603
|
function TimePickerBasic({
|
|
1496
1604
|
value,
|
|
1497
1605
|
onChange,
|
|
1498
1606
|
required,
|
|
1499
|
-
|
|
1500
|
-
bottomText,
|
|
1607
|
+
label,
|
|
1501
1608
|
error,
|
|
1502
1609
|
placeholder,
|
|
1503
1610
|
disabled,
|
|
1504
1611
|
className
|
|
1505
1612
|
}) {
|
|
1506
|
-
return /* @__PURE__ */ (0,
|
|
1613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1507
1614
|
import_antd7.ConfigProvider,
|
|
1508
1615
|
{
|
|
1616
|
+
locale: import_th_TH5.default,
|
|
1509
1617
|
theme: {
|
|
1510
1618
|
token: {
|
|
1511
1619
|
fontFamily: "Kanit"
|
|
1512
1620
|
}
|
|
1513
1621
|
},
|
|
1514
|
-
children: /* @__PURE__ */ (0,
|
|
1515
|
-
/* @__PURE__ */ (0,
|
|
1516
|
-
/* @__PURE__ */ (0,
|
|
1622
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "container-input", children: [
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { children: [
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: label }),
|
|
1517
1625
|
" ",
|
|
1518
|
-
required && /* @__PURE__ */ (0,
|
|
1626
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1519
1627
|
] }),
|
|
1520
|
-
/* @__PURE__ */ (0,
|
|
1628
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1521
1629
|
import_antd7.TimePicker,
|
|
1522
1630
|
{
|
|
1523
1631
|
format: "HH:mm",
|
|
1524
1632
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1525
|
-
value,
|
|
1633
|
+
value: value ? (0, import_dayjs3.default)(value) : null,
|
|
1526
1634
|
placeholder,
|
|
1527
|
-
onChange
|
|
1635
|
+
onChange: (time) => {
|
|
1636
|
+
onChange(time ? time.toDate() : null);
|
|
1637
|
+
},
|
|
1528
1638
|
allowClear: true,
|
|
1529
1639
|
disabled
|
|
1530
1640
|
}
|
|
1531
1641
|
),
|
|
1532
|
-
/* @__PURE__ */ (0,
|
|
1533
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1534
|
-
" ",
|
|
1535
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1536
|
-
] })
|
|
1642
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1537
1643
|
] })
|
|
1538
1644
|
}
|
|
1539
1645
|
);
|
|
@@ -1541,49 +1647,54 @@ function TimePickerBasic({
|
|
|
1541
1647
|
|
|
1542
1648
|
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1543
1649
|
var import_antd8 = require("antd");
|
|
1544
|
-
var
|
|
1650
|
+
var import_dayjs4 = __toESM(require_dayjs_min());
|
|
1651
|
+
var import_th_TH6 = __toESM(require("antd/locale/th_TH"));
|
|
1652
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1545
1653
|
function TimePickerRangePicker({
|
|
1546
1654
|
value,
|
|
1547
1655
|
onChange,
|
|
1548
1656
|
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1549
|
-
|
|
1657
|
+
label,
|
|
1550
1658
|
required,
|
|
1551
|
-
bottomText,
|
|
1552
1659
|
error,
|
|
1553
1660
|
disabled,
|
|
1554
1661
|
className
|
|
1555
1662
|
}) {
|
|
1556
|
-
return /* @__PURE__ */ (0,
|
|
1663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1557
1664
|
import_antd8.ConfigProvider,
|
|
1558
1665
|
{
|
|
1666
|
+
locale: import_th_TH6.default,
|
|
1559
1667
|
theme: {
|
|
1560
1668
|
token: {
|
|
1561
1669
|
fontFamily: "Kanit"
|
|
1562
1670
|
}
|
|
1563
1671
|
},
|
|
1564
|
-
children: /* @__PURE__ */ (0,
|
|
1565
|
-
/* @__PURE__ */ (0,
|
|
1566
|
-
/* @__PURE__ */ (0,
|
|
1672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
1674
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: label }),
|
|
1567
1675
|
" ",
|
|
1568
|
-
required && /* @__PURE__ */ (0,
|
|
1676
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1569
1677
|
] }),
|
|
1570
|
-
/* @__PURE__ */ (0,
|
|
1678
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1571
1679
|
import_antd8.TimePicker.RangePicker,
|
|
1572
1680
|
{
|
|
1573
1681
|
format: "HH:mm",
|
|
1574
|
-
value,
|
|
1682
|
+
value: value ? [value[0] ? (0, import_dayjs4.default)(value[0]) : null, value[1] ? (0, import_dayjs4.default)(value[1]) : null] : null,
|
|
1575
1683
|
placeholder,
|
|
1576
1684
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1577
|
-
onChange,
|
|
1685
|
+
onChange: (dates, dateStrings) => {
|
|
1686
|
+
if (!dates) {
|
|
1687
|
+
onChange(null);
|
|
1688
|
+
} else {
|
|
1689
|
+
onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1578
1692
|
allowClear: true,
|
|
1579
|
-
disabled
|
|
1693
|
+
disabled,
|
|
1694
|
+
showNow: true
|
|
1580
1695
|
}
|
|
1581
1696
|
),
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1583
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1584
|
-
" ",
|
|
1585
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1586
|
-
] })
|
|
1697
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1587
1698
|
] })
|
|
1588
1699
|
}
|
|
1589
1700
|
);
|
|
@@ -1591,13 +1702,12 @@ function TimePickerRangePicker({
|
|
|
1591
1702
|
|
|
1592
1703
|
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1593
1704
|
var import_antd9 = require("antd");
|
|
1594
|
-
var
|
|
1705
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1595
1706
|
function ColorPickerBasic({
|
|
1596
1707
|
value,
|
|
1597
1708
|
onChange,
|
|
1598
1709
|
required,
|
|
1599
|
-
|
|
1600
|
-
bottomText,
|
|
1710
|
+
label,
|
|
1601
1711
|
error,
|
|
1602
1712
|
disabled,
|
|
1603
1713
|
allowClear,
|
|
@@ -1605,7 +1715,7 @@ function ColorPickerBasic({
|
|
|
1605
1715
|
className,
|
|
1606
1716
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1607
1717
|
}) {
|
|
1608
|
-
return /* @__PURE__ */ (0,
|
|
1718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1609
1719
|
import_antd9.ConfigProvider,
|
|
1610
1720
|
{
|
|
1611
1721
|
theme: {
|
|
@@ -1614,13 +1724,13 @@ function ColorPickerBasic({
|
|
|
1614
1724
|
fontSize: 16
|
|
1615
1725
|
}
|
|
1616
1726
|
},
|
|
1617
|
-
children: /* @__PURE__ */ (0,
|
|
1618
|
-
/* @__PURE__ */ (0,
|
|
1619
|
-
/* @__PURE__ */ (0,
|
|
1727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
|
|
1728
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: label }),
|
|
1620
1730
|
" ",
|
|
1621
|
-
required && /* @__PURE__ */ (0,
|
|
1731
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1622
1732
|
] }),
|
|
1623
|
-
/* @__PURE__ */ (0,
|
|
1733
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1624
1734
|
import_antd9.ColorPicker,
|
|
1625
1735
|
{
|
|
1626
1736
|
defaultFormat,
|
|
@@ -1632,9 +1742,9 @@ function ColorPickerBasic({
|
|
|
1632
1742
|
showText: (color) => {
|
|
1633
1743
|
const hex = color.toHexString();
|
|
1634
1744
|
if (!value) {
|
|
1635
|
-
return /* @__PURE__ */ (0,
|
|
1745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: placeholder });
|
|
1636
1746
|
}
|
|
1637
|
-
return /* @__PURE__ */ (0,
|
|
1747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { children: [
|
|
1638
1748
|
"(",
|
|
1639
1749
|
hex,
|
|
1640
1750
|
")"
|
|
@@ -1643,11 +1753,7 @@ function ColorPickerBasic({
|
|
|
1643
1753
|
disabled
|
|
1644
1754
|
}
|
|
1645
1755
|
),
|
|
1646
|
-
/* @__PURE__ */ (0,
|
|
1647
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1648
|
-
" ",
|
|
1649
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1650
|
-
] })
|
|
1756
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1651
1757
|
] })
|
|
1652
1758
|
}
|
|
1653
1759
|
);
|
|
@@ -2356,7 +2462,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2356
2462
|
greyDark.primary = greyDark[5];
|
|
2357
2463
|
|
|
2358
2464
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2359
|
-
var
|
|
2465
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2360
2466
|
function genPresets(presets = presetPalettes) {
|
|
2361
2467
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2362
2468
|
label,
|
|
@@ -2368,8 +2474,7 @@ function ColorPalettePickerBasic({
|
|
|
2368
2474
|
value,
|
|
2369
2475
|
onChange,
|
|
2370
2476
|
required,
|
|
2371
|
-
|
|
2372
|
-
bottomText,
|
|
2477
|
+
label,
|
|
2373
2478
|
error,
|
|
2374
2479
|
disabled,
|
|
2375
2480
|
allowClear,
|
|
@@ -2384,7 +2489,7 @@ function ColorPalettePickerBasic({
|
|
|
2384
2489
|
red,
|
|
2385
2490
|
green
|
|
2386
2491
|
});
|
|
2387
|
-
return /* @__PURE__ */ (0,
|
|
2492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2388
2493
|
import_antd10.ConfigProvider,
|
|
2389
2494
|
{
|
|
2390
2495
|
theme: {
|
|
@@ -2393,13 +2498,13 @@ function ColorPalettePickerBasic({
|
|
|
2393
2498
|
fontSize: 16
|
|
2394
2499
|
}
|
|
2395
2500
|
},
|
|
2396
|
-
children: /* @__PURE__ */ (0,
|
|
2397
|
-
/* @__PURE__ */ (0,
|
|
2398
|
-
/* @__PURE__ */ (0,
|
|
2501
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "container-input", children: [
|
|
2502
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
2503
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "body-1", children: label }),
|
|
2399
2504
|
" ",
|
|
2400
|
-
required && /* @__PURE__ */ (0,
|
|
2505
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2401
2506
|
] }),
|
|
2402
|
-
/* @__PURE__ */ (0,
|
|
2507
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2403
2508
|
import_antd10.ColorPicker,
|
|
2404
2509
|
{
|
|
2405
2510
|
defaultFormat,
|
|
@@ -2412,9 +2517,9 @@ function ColorPalettePickerBasic({
|
|
|
2412
2517
|
showText: (color) => {
|
|
2413
2518
|
const hex = color.toHexString();
|
|
2414
2519
|
if (!value) {
|
|
2415
|
-
return /* @__PURE__ */ (0,
|
|
2520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: placeholder });
|
|
2416
2521
|
}
|
|
2417
|
-
return /* @__PURE__ */ (0,
|
|
2522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { children: [
|
|
2418
2523
|
"(",
|
|
2419
2524
|
hex,
|
|
2420
2525
|
")"
|
|
@@ -2424,11 +2529,7 @@ function ColorPalettePickerBasic({
|
|
|
2424
2529
|
onClear
|
|
2425
2530
|
}
|
|
2426
2531
|
),
|
|
2427
|
-
/* @__PURE__ */ (0,
|
|
2428
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2429
|
-
" ",
|
|
2430
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2431
|
-
] })
|
|
2532
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2432
2533
|
] })
|
|
2433
2534
|
}
|
|
2434
2535
|
);
|
|
@@ -2436,14 +2537,13 @@ function ColorPalettePickerBasic({
|
|
|
2436
2537
|
|
|
2437
2538
|
// src/Select/SelectField/SelectField.tsx
|
|
2438
2539
|
var import_antd11 = require("antd");
|
|
2439
|
-
var
|
|
2540
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2440
2541
|
function SelectField({
|
|
2441
2542
|
value,
|
|
2442
2543
|
onChange,
|
|
2443
2544
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2444
|
-
|
|
2545
|
+
label,
|
|
2445
2546
|
required,
|
|
2446
|
-
bottomText,
|
|
2447
2547
|
error,
|
|
2448
2548
|
disabled,
|
|
2449
2549
|
defaultValue,
|
|
@@ -2455,7 +2555,7 @@ function SelectField({
|
|
|
2455
2555
|
className,
|
|
2456
2556
|
onClear
|
|
2457
2557
|
}) {
|
|
2458
|
-
return /* @__PURE__ */ (0,
|
|
2558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2459
2559
|
import_antd11.ConfigProvider,
|
|
2460
2560
|
{
|
|
2461
2561
|
theme: {
|
|
@@ -2464,13 +2564,13 @@ function SelectField({
|
|
|
2464
2564
|
fontSize: 16
|
|
2465
2565
|
}
|
|
2466
2566
|
},
|
|
2467
|
-
children: /* @__PURE__ */ (0,
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2567
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "container-input", children: [
|
|
2568
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
2569
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "body-1", children: label }),
|
|
2470
2570
|
" ",
|
|
2471
|
-
required && /* @__PURE__ */ (0,
|
|
2571
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2472
2572
|
] }),
|
|
2473
|
-
/* @__PURE__ */ (0,
|
|
2573
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2474
2574
|
import_antd11.Select,
|
|
2475
2575
|
{
|
|
2476
2576
|
showSearch: true,
|
|
@@ -2485,7 +2585,7 @@ function SelectField({
|
|
|
2485
2585
|
options,
|
|
2486
2586
|
mode,
|
|
2487
2587
|
onSearch: handleSearch,
|
|
2488
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2588
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2489
2589
|
"span",
|
|
2490
2590
|
{
|
|
2491
2591
|
style: {
|
|
@@ -2502,11 +2602,7 @@ function SelectField({
|
|
|
2502
2602
|
onClear
|
|
2503
2603
|
}
|
|
2504
2604
|
),
|
|
2505
|
-
/* @__PURE__ */ (0,
|
|
2506
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2507
|
-
" ",
|
|
2508
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2509
|
-
] })
|
|
2605
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2510
2606
|
] })
|
|
2511
2607
|
}
|
|
2512
2608
|
);
|
|
@@ -2514,14 +2610,13 @@ function SelectField({
|
|
|
2514
2610
|
|
|
2515
2611
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2516
2612
|
var import_antd12 = require("antd");
|
|
2517
|
-
var
|
|
2613
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2518
2614
|
function SelectFieldGroup({
|
|
2519
2615
|
value,
|
|
2520
2616
|
onChange,
|
|
2521
2617
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2522
|
-
|
|
2618
|
+
label,
|
|
2523
2619
|
required,
|
|
2524
|
-
bottomText,
|
|
2525
2620
|
error,
|
|
2526
2621
|
disabled,
|
|
2527
2622
|
defaultValue,
|
|
@@ -2532,7 +2627,7 @@ function SelectFieldGroup({
|
|
|
2532
2627
|
handleSearch,
|
|
2533
2628
|
className
|
|
2534
2629
|
}) {
|
|
2535
|
-
return /* @__PURE__ */ (0,
|
|
2630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2536
2631
|
import_antd12.ConfigProvider,
|
|
2537
2632
|
{
|
|
2538
2633
|
theme: {
|
|
@@ -2540,13 +2635,13 @@ function SelectFieldGroup({
|
|
|
2540
2635
|
fontFamily: "Kanit"
|
|
2541
2636
|
}
|
|
2542
2637
|
},
|
|
2543
|
-
children: /* @__PURE__ */ (0,
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
2545
|
-
/* @__PURE__ */ (0,
|
|
2638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "container-input", children: [
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "body-1", children: label }),
|
|
2546
2641
|
" ",
|
|
2547
|
-
required && /* @__PURE__ */ (0,
|
|
2642
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2548
2643
|
] }),
|
|
2549
|
-
/* @__PURE__ */ (0,
|
|
2644
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2550
2645
|
import_antd12.Select,
|
|
2551
2646
|
{
|
|
2552
2647
|
showSearch: true,
|
|
@@ -2561,7 +2656,7 @@ function SelectFieldGroup({
|
|
|
2561
2656
|
options,
|
|
2562
2657
|
mode,
|
|
2563
2658
|
onSearch: handleSearch,
|
|
2564
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2659
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2565
2660
|
"span",
|
|
2566
2661
|
{
|
|
2567
2662
|
style: {
|
|
@@ -2577,11 +2672,7 @@ function SelectFieldGroup({
|
|
|
2577
2672
|
allowClear: true
|
|
2578
2673
|
}
|
|
2579
2674
|
),
|
|
2580
|
-
/* @__PURE__ */ (0,
|
|
2581
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2582
|
-
" ",
|
|
2583
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2584
|
-
] })
|
|
2675
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2585
2676
|
] })
|
|
2586
2677
|
}
|
|
2587
2678
|
);
|
|
@@ -2601,21 +2692,20 @@ var status = [
|
|
|
2601
2692
|
|
|
2602
2693
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2603
2694
|
var import_icons = require("@ant-design/icons");
|
|
2604
|
-
var
|
|
2695
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2605
2696
|
function SelectFieldStatus({
|
|
2606
2697
|
value,
|
|
2607
2698
|
onChange,
|
|
2608
2699
|
placeholder,
|
|
2609
|
-
|
|
2700
|
+
label,
|
|
2610
2701
|
required,
|
|
2611
|
-
bottomText,
|
|
2612
2702
|
disabled,
|
|
2613
2703
|
error,
|
|
2614
2704
|
options,
|
|
2615
2705
|
className
|
|
2616
2706
|
}) {
|
|
2617
2707
|
const selectedItem = status.find((s) => s.value === value);
|
|
2618
|
-
return /* @__PURE__ */ (0,
|
|
2708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2619
2709
|
import_antd13.ConfigProvider,
|
|
2620
2710
|
{
|
|
2621
2711
|
theme: {
|
|
@@ -2631,17 +2721,17 @@ function SelectFieldStatus({
|
|
|
2631
2721
|
fontFamily: "Kanit"
|
|
2632
2722
|
}
|
|
2633
2723
|
},
|
|
2634
|
-
children: /* @__PURE__ */ (0,
|
|
2635
|
-
/* @__PURE__ */ (0,
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2724
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "container-input", children: [
|
|
2725
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { children: [
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "body-1", children: label }),
|
|
2637
2727
|
" ",
|
|
2638
|
-
required && /* @__PURE__ */ (0,
|
|
2728
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2639
2729
|
] }),
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2641
2731
|
import_antd13.Select,
|
|
2642
2732
|
{
|
|
2643
2733
|
disabled,
|
|
2644
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2734
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2645
2735
|
value,
|
|
2646
2736
|
onChange,
|
|
2647
2737
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2652,11 +2742,7 @@ function SelectFieldStatus({
|
|
|
2652
2742
|
showSearch: true
|
|
2653
2743
|
}
|
|
2654
2744
|
),
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2657
|
-
" ",
|
|
2658
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2659
|
-
] })
|
|
2745
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2660
2746
|
] })
|
|
2661
2747
|
}
|
|
2662
2748
|
);
|
|
@@ -2673,21 +2759,20 @@ var status2 = [
|
|
|
2673
2759
|
|
|
2674
2760
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2675
2761
|
var import_icons2 = require("@ant-design/icons");
|
|
2676
|
-
var
|
|
2762
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2677
2763
|
function SelectFieldStatusReport({
|
|
2678
2764
|
value,
|
|
2679
2765
|
onChange,
|
|
2680
2766
|
placeholder,
|
|
2681
|
-
|
|
2767
|
+
label,
|
|
2682
2768
|
required,
|
|
2683
|
-
bottomText,
|
|
2684
2769
|
disabled,
|
|
2685
2770
|
error,
|
|
2686
2771
|
className,
|
|
2687
2772
|
options
|
|
2688
2773
|
}) {
|
|
2689
2774
|
const selectedItem = status2.find((s) => s.value === value);
|
|
2690
|
-
return /* @__PURE__ */ (0,
|
|
2775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2691
2776
|
import_antd14.ConfigProvider,
|
|
2692
2777
|
{
|
|
2693
2778
|
theme: {
|
|
@@ -2703,17 +2788,17 @@ function SelectFieldStatusReport({
|
|
|
2703
2788
|
fontFamily: "Kanit"
|
|
2704
2789
|
}
|
|
2705
2790
|
},
|
|
2706
|
-
children: /* @__PURE__ */ (0,
|
|
2707
|
-
/* @__PURE__ */ (0,
|
|
2708
|
-
/* @__PURE__ */ (0,
|
|
2791
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "container-input", children: [
|
|
2792
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
2793
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "body-1", children: label }),
|
|
2709
2794
|
" ",
|
|
2710
|
-
required && /* @__PURE__ */ (0,
|
|
2795
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2711
2796
|
] }),
|
|
2712
|
-
/* @__PURE__ */ (0,
|
|
2797
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2713
2798
|
import_antd14.Select,
|
|
2714
2799
|
{
|
|
2715
2800
|
disabled,
|
|
2716
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2801
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2717
2802
|
value,
|
|
2718
2803
|
onChange,
|
|
2719
2804
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2724,11 +2809,7 @@ function SelectFieldStatusReport({
|
|
|
2724
2809
|
showSearch: true
|
|
2725
2810
|
}
|
|
2726
2811
|
),
|
|
2727
|
-
/* @__PURE__ */ (0,
|
|
2728
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2729
|
-
" ",
|
|
2730
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2731
|
-
] })
|
|
2812
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2732
2813
|
] })
|
|
2733
2814
|
}
|
|
2734
2815
|
);
|
|
@@ -2737,11 +2818,10 @@ function SelectFieldStatusReport({
|
|
|
2737
2818
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2738
2819
|
var import_antd15 = require("antd");
|
|
2739
2820
|
var import_react8 = require("react");
|
|
2740
|
-
var
|
|
2821
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2741
2822
|
function SelectFieldTag({
|
|
2742
|
-
|
|
2823
|
+
label,
|
|
2743
2824
|
required,
|
|
2744
|
-
bottomText,
|
|
2745
2825
|
placeholder,
|
|
2746
2826
|
options,
|
|
2747
2827
|
error,
|
|
@@ -2771,7 +2851,7 @@ function SelectFieldTag({
|
|
|
2771
2851
|
}
|
|
2772
2852
|
onChange?.([]);
|
|
2773
2853
|
};
|
|
2774
|
-
return /* @__PURE__ */ (0,
|
|
2854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2775
2855
|
import_antd15.ConfigProvider,
|
|
2776
2856
|
{
|
|
2777
2857
|
theme: {
|
|
@@ -2779,13 +2859,13 @@ function SelectFieldTag({
|
|
|
2779
2859
|
fontFamily: "Kanit"
|
|
2780
2860
|
}
|
|
2781
2861
|
},
|
|
2782
|
-
children: /* @__PURE__ */ (0,
|
|
2783
|
-
/* @__PURE__ */ (0,
|
|
2784
|
-
/* @__PURE__ */ (0,
|
|
2862
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "container-input", children: [
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
|
|
2864
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "body-1", children: label }),
|
|
2785
2865
|
" ",
|
|
2786
|
-
required && /* @__PURE__ */ (0,
|
|
2866
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2787
2867
|
] }),
|
|
2788
|
-
/* @__PURE__ */ (0,
|
|
2868
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2789
2869
|
import_antd15.Select,
|
|
2790
2870
|
{
|
|
2791
2871
|
mode: "tags",
|
|
@@ -2804,11 +2884,7 @@ function SelectFieldTag({
|
|
|
2804
2884
|
onClear
|
|
2805
2885
|
}
|
|
2806
2886
|
),
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2808
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2809
|
-
" ",
|
|
2810
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2811
|
-
] })
|
|
2887
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2812
2888
|
] })
|
|
2813
2889
|
}
|
|
2814
2890
|
);
|
|
@@ -2818,14 +2894,13 @@ function SelectFieldTag({
|
|
|
2818
2894
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
2819
2895
|
var import_antd16 = require("antd");
|
|
2820
2896
|
var import_react9 = require("react");
|
|
2821
|
-
var
|
|
2897
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2822
2898
|
function SelectCustom({
|
|
2823
|
-
|
|
2899
|
+
label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2824
2900
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
2825
2901
|
options,
|
|
2826
2902
|
required = false,
|
|
2827
2903
|
onChange,
|
|
2828
|
-
bottomText,
|
|
2829
2904
|
error,
|
|
2830
2905
|
onClear
|
|
2831
2906
|
}) {
|
|
@@ -2848,7 +2923,7 @@ function SelectCustom({
|
|
|
2848
2923
|
});
|
|
2849
2924
|
};
|
|
2850
2925
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2851
|
-
return /* @__PURE__ */ (0,
|
|
2926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2852
2927
|
import_antd16.ConfigProvider,
|
|
2853
2928
|
{
|
|
2854
2929
|
theme: {
|
|
@@ -2857,13 +2932,13 @@ function SelectCustom({
|
|
|
2857
2932
|
fontSize: 16
|
|
2858
2933
|
}
|
|
2859
2934
|
},
|
|
2860
|
-
children: /* @__PURE__ */ (0,
|
|
2861
|
-
/* @__PURE__ */ (0,
|
|
2862
|
-
/* @__PURE__ */ (0,
|
|
2935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "container-input", children: [
|
|
2936
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
|
|
2937
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "body-1", children: label }),
|
|
2863
2938
|
" ",
|
|
2864
|
-
required && /* @__PURE__ */ (0,
|
|
2939
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2865
2940
|
] }),
|
|
2866
|
-
/* @__PURE__ */ (0,
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2867
2942
|
import_antd16.Select,
|
|
2868
2943
|
{
|
|
2869
2944
|
value,
|
|
@@ -2874,20 +2949,16 @@ function SelectCustom({
|
|
|
2874
2949
|
onClear
|
|
2875
2950
|
}
|
|
2876
2951
|
),
|
|
2877
|
-
/* @__PURE__ */ (0,
|
|
2878
|
-
|
|
2879
|
-
" ",
|
|
2880
|
-
|
|
2881
|
-
] }),
|
|
2882
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
|
|
2883
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2884
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { children: [
|
|
2952
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-red-500 caption-1", children: error }),
|
|
2953
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
|
|
2954
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { children: [
|
|
2885
2956
|
index + 1,
|
|
2886
2957
|
"."
|
|
2887
2958
|
] }),
|
|
2888
|
-
/* @__PURE__ */ (0,
|
|
2959
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { children: v })
|
|
2889
2960
|
] }),
|
|
2890
|
-
/* @__PURE__ */ (0,
|
|
2961
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons_react8.IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
|
|
2891
2962
|
] }, index)) })
|
|
2892
2963
|
] })
|
|
2893
2964
|
}
|
|
@@ -2928,7 +2999,7 @@ var quarters = [
|
|
|
2928
2999
|
// src/SortFilter/SortFilter.tsx
|
|
2929
3000
|
var import_react10 = require("react");
|
|
2930
3001
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
2931
|
-
var
|
|
3002
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2932
3003
|
function SortFilter({
|
|
2933
3004
|
showYear = true,
|
|
2934
3005
|
showQuarter = true,
|
|
@@ -2939,7 +3010,7 @@ function SortFilter({
|
|
|
2939
3010
|
const [yearValue, setYearValue] = (0, import_react10.useState)();
|
|
2940
3011
|
const [monthValue, setMonthValue] = (0, import_react10.useState)();
|
|
2941
3012
|
const [quarterValue, setQuartersValue] = (0, import_react10.useState)();
|
|
2942
|
-
return /* @__PURE__ */ (0,
|
|
3013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2943
3014
|
import_antd17.ConfigProvider,
|
|
2944
3015
|
{
|
|
2945
3016
|
theme: {
|
|
@@ -2947,12 +3018,12 @@ function SortFilter({
|
|
|
2947
3018
|
fontFamily: "Kanit"
|
|
2948
3019
|
}
|
|
2949
3020
|
},
|
|
2950
|
-
children: /* @__PURE__ */ (0,
|
|
2951
|
-
/* @__PURE__ */ (0,
|
|
2952
|
-
showYear && /* @__PURE__ */ (0,
|
|
3021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "w-full flex items-center justify-between", children: [
|
|
3022
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "w-full flex gap-[10px]", children: [
|
|
3023
|
+
showYear && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2953
3024
|
SelectField,
|
|
2954
3025
|
{
|
|
2955
|
-
prefix: /* @__PURE__ */ (0,
|
|
3026
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2956
3027
|
onChange: setYearValue,
|
|
2957
3028
|
options: years.map((s) => ({
|
|
2958
3029
|
value: s.value,
|
|
@@ -2962,10 +3033,10 @@ function SortFilter({
|
|
|
2962
3033
|
value: yearValue
|
|
2963
3034
|
}
|
|
2964
3035
|
) }),
|
|
2965
|
-
showMonth && /* @__PURE__ */ (0,
|
|
3036
|
+
showMonth && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2966
3037
|
SelectField,
|
|
2967
3038
|
{
|
|
2968
|
-
prefix: /* @__PURE__ */ (0,
|
|
3039
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2969
3040
|
onChange: setMonthValue,
|
|
2970
3041
|
options: months.map((s) => ({
|
|
2971
3042
|
value: s.value,
|
|
@@ -2975,10 +3046,10 @@ function SortFilter({
|
|
|
2975
3046
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2976
3047
|
}
|
|
2977
3048
|
) }),
|
|
2978
|
-
showQuarter && /* @__PURE__ */ (0,
|
|
3049
|
+
showQuarter && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2979
3050
|
SelectField,
|
|
2980
3051
|
{
|
|
2981
|
-
prefix: /* @__PURE__ */ (0,
|
|
3052
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2982
3053
|
onChange: setQuartersValue,
|
|
2983
3054
|
options: quarters.map((s) => ({
|
|
2984
3055
|
value: s.value,
|
|
@@ -2989,8 +3060,8 @@ function SortFilter({
|
|
|
2989
3060
|
}
|
|
2990
3061
|
) })
|
|
2991
3062
|
] }),
|
|
2992
|
-
/* @__PURE__ */ (0,
|
|
2993
|
-
/* @__PURE__ */ (0,
|
|
3063
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex gap-[10px]", children: [
|
|
3064
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2994
3065
|
import_icons_react9.IconSortDescending,
|
|
2995
3066
|
{
|
|
2996
3067
|
size: 24,
|
|
@@ -2998,7 +3069,7 @@ function SortFilter({
|
|
|
2998
3069
|
onClick: onSortClick
|
|
2999
3070
|
}
|
|
3000
3071
|
),
|
|
3001
|
-
/* @__PURE__ */ (0,
|
|
3072
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3002
3073
|
import_icons_react9.IconFilter,
|
|
3003
3074
|
{
|
|
3004
3075
|
size: 24,
|
|
@@ -3015,7 +3086,7 @@ function SortFilter({
|
|
|
3015
3086
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
3016
3087
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
3017
3088
|
var import_react11 = require("react");
|
|
3018
|
-
var
|
|
3089
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3019
3090
|
function FileUploader({
|
|
3020
3091
|
onUpload,
|
|
3021
3092
|
onError,
|
|
@@ -3048,7 +3119,7 @@ function FileUploader({
|
|
|
3048
3119
|
const handleRemoveFile = async (index) => {
|
|
3049
3120
|
try {
|
|
3050
3121
|
if (onRemove) {
|
|
3051
|
-
await onRemove();
|
|
3122
|
+
await onRemove(index);
|
|
3052
3123
|
}
|
|
3053
3124
|
const updatedList = [...fileList];
|
|
3054
3125
|
updatedList.splice(index, 1);
|
|
@@ -3086,10 +3157,10 @@ function FileUploader({
|
|
|
3086
3157
|
}
|
|
3087
3158
|
if (inputRef.current) inputRef.current.value = "";
|
|
3088
3159
|
};
|
|
3089
|
-
return /* @__PURE__ */ (0,
|
|
3090
|
-
label && /* @__PURE__ */ (0,
|
|
3091
|
-
/* @__PURE__ */ (0,
|
|
3092
|
-
mode === "upload" ? /* @__PURE__ */ (0,
|
|
3160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "w-full", children: [
|
|
3161
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "body-1", children: label }),
|
|
3162
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
|
|
3163
|
+
mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3093
3164
|
"button",
|
|
3094
3165
|
{
|
|
3095
3166
|
type: "button",
|
|
@@ -3097,15 +3168,15 @@ function FileUploader({
|
|
|
3097
3168
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3098
3169
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3099
3170
|
disabled: disabled ? disabled : uploading,
|
|
3100
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3101
|
-
/* @__PURE__ */ (0,
|
|
3171
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3172
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Loader, { size: 15 }),
|
|
3102
3173
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3103
|
-
] }) : /* @__PURE__ */ (0,
|
|
3104
|
-
/* @__PURE__ */ (0,
|
|
3174
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react10.IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3105
3176
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
3106
3177
|
] })
|
|
3107
3178
|
}
|
|
3108
|
-
) : /* @__PURE__ */ (0,
|
|
3179
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3109
3180
|
"div",
|
|
3110
3181
|
{
|
|
3111
3182
|
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3119,17 +3190,17 @@ function FileUploader({
|
|
|
3119
3190
|
},
|
|
3120
3191
|
onDragLeave: () => setDragActive(false),
|
|
3121
3192
|
onDrop: handleDrop,
|
|
3122
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3123
|
-
/* @__PURE__ */ (0,
|
|
3193
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex justify-center items-center gap-2", children: [
|
|
3194
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Loader, { size: 15 }),
|
|
3124
3195
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3125
|
-
] }) : /* @__PURE__ */ (0,
|
|
3126
|
-
/* @__PURE__ */ (0,
|
|
3127
|
-
/* @__PURE__ */ (0,
|
|
3128
|
-
/* @__PURE__ */ (0,
|
|
3196
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3197
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react10.IconUpload, { size: 20 }),
|
|
3198
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "body-1", children: "\u0E04\u0E25\u0E34\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E1A\u0E23\u0E34\u0E40\u0E27\u0E13\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14" }),
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-gray-400 body-3", children: "\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E35\u0E48\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E32\u0E22\u0E44\u0E1F\u0E25\u0E4C" })
|
|
3129
3200
|
] })
|
|
3130
3201
|
}
|
|
3131
3202
|
),
|
|
3132
|
-
/* @__PURE__ */ (0,
|
|
3203
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3133
3204
|
"input",
|
|
3134
3205
|
{
|
|
3135
3206
|
type: "file",
|
|
@@ -3142,13 +3213,13 @@ function FileUploader({
|
|
|
3142
3213
|
}
|
|
3143
3214
|
)
|
|
3144
3215
|
] }),
|
|
3145
|
-
description && /* @__PURE__ */ (0,
|
|
3146
|
-
/* @__PURE__ */ (0,
|
|
3147
|
-
/* @__PURE__ */ (0,
|
|
3148
|
-
/* @__PURE__ */ (0,
|
|
3149
|
-
/* @__PURE__ */ (0,
|
|
3216
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-gray-400 body-4", children: description }),
|
|
3217
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
3218
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
3219
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react10.IconPaperclip, { size: 15 }) }),
|
|
3220
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "truncate", children: file.name })
|
|
3150
3221
|
] }),
|
|
3151
|
-
/* @__PURE__ */ (0,
|
|
3222
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3152
3223
|
import_icons_react10.IconTrash,
|
|
3153
3224
|
{
|
|
3154
3225
|
size: 20,
|
|
@@ -3184,7 +3255,7 @@ function messageLoading(content, duration) {
|
|
|
3184
3255
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3185
3256
|
var import_antd18 = require("antd");
|
|
3186
3257
|
var import_antd19 = require("antd");
|
|
3187
|
-
var
|
|
3258
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3188
3259
|
function Breadcrumbs({
|
|
3189
3260
|
items,
|
|
3190
3261
|
separator,
|
|
@@ -3192,7 +3263,7 @@ function Breadcrumbs({
|
|
|
3192
3263
|
classname,
|
|
3193
3264
|
params
|
|
3194
3265
|
}) {
|
|
3195
|
-
return /* @__PURE__ */ (0,
|
|
3266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3196
3267
|
import_antd18.ConfigProvider,
|
|
3197
3268
|
{
|
|
3198
3269
|
theme: {
|
|
@@ -3200,7 +3271,7 @@ function Breadcrumbs({
|
|
|
3200
3271
|
fontFamily: "Kanit"
|
|
3201
3272
|
}
|
|
3202
3273
|
},
|
|
3203
|
-
children: /* @__PURE__ */ (0,
|
|
3274
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3204
3275
|
import_antd19.Breadcrumb,
|
|
3205
3276
|
{
|
|
3206
3277
|
items,
|
|
@@ -3216,7 +3287,7 @@ function Breadcrumbs({
|
|
|
3216
3287
|
|
|
3217
3288
|
// src/HeadingPage/HeadingPage.tsx
|
|
3218
3289
|
var import_antd20 = require("antd");
|
|
3219
|
-
var
|
|
3290
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3220
3291
|
function HeadingPage({ Heading }) {
|
|
3221
3292
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3222
3293
|
weekday: "long",
|
|
@@ -3224,7 +3295,7 @@ function HeadingPage({ Heading }) {
|
|
|
3224
3295
|
month: "long",
|
|
3225
3296
|
year: "numeric"
|
|
3226
3297
|
});
|
|
3227
|
-
return /* @__PURE__ */ (0,
|
|
3298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3228
3299
|
import_antd20.ConfigProvider,
|
|
3229
3300
|
{
|
|
3230
3301
|
theme: {
|
|
@@ -3232,9 +3303,9 @@ function HeadingPage({ Heading }) {
|
|
|
3232
3303
|
fontFamily: "Kanit"
|
|
3233
3304
|
}
|
|
3234
3305
|
},
|
|
3235
|
-
children: /* @__PURE__ */ (0,
|
|
3236
|
-
/* @__PURE__ */ (0,
|
|
3237
|
-
/* @__PURE__ */ (0,
|
|
3306
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "headline-5", children: Heading }),
|
|
3308
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("p", { className: "body-1", children: [
|
|
3238
3309
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3239
3310
|
today
|
|
3240
3311
|
] })
|
|
@@ -3246,7 +3317,7 @@ function HeadingPage({ Heading }) {
|
|
|
3246
3317
|
// src/Progress/ProgressBar.tsx
|
|
3247
3318
|
var import_antd21 = require("antd");
|
|
3248
3319
|
var import_react12 = require("react");
|
|
3249
|
-
var
|
|
3320
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3250
3321
|
function ProgressBar({
|
|
3251
3322
|
percent = 0,
|
|
3252
3323
|
size = "default",
|
|
@@ -3277,7 +3348,7 @@ function ProgressBar({
|
|
|
3277
3348
|
observer.observe(inner);
|
|
3278
3349
|
return () => observer.disconnect();
|
|
3279
3350
|
}, []);
|
|
3280
|
-
return /* @__PURE__ */ (0,
|
|
3351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3281
3352
|
import_antd21.ConfigProvider,
|
|
3282
3353
|
{
|
|
3283
3354
|
theme: {
|
|
@@ -3285,8 +3356,8 @@ function ProgressBar({
|
|
|
3285
3356
|
fontFamily: "Kanit"
|
|
3286
3357
|
}
|
|
3287
3358
|
},
|
|
3288
|
-
children: /* @__PURE__ */ (0,
|
|
3289
|
-
/* @__PURE__ */ (0,
|
|
3359
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3360
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3290
3361
|
import_antd21.Progress,
|
|
3291
3362
|
{
|
|
3292
3363
|
className: "w-full",
|
|
@@ -3302,7 +3373,7 @@ function ProgressBar({
|
|
|
3302
3373
|
strokeColor
|
|
3303
3374
|
}
|
|
3304
3375
|
),
|
|
3305
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0,
|
|
3376
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3306
3377
|
"div",
|
|
3307
3378
|
{
|
|
3308
3379
|
className: "checkpoint absolute top-0",
|
|
@@ -3475,7 +3546,7 @@ function useGetKpiSection() {
|
|
|
3475
3546
|
|
|
3476
3547
|
// src/KpiSection/KpiSection.tsx
|
|
3477
3548
|
var import_icons_react11 = require("@tabler/icons-react");
|
|
3478
|
-
var
|
|
3549
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3479
3550
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3480
3551
|
const {
|
|
3481
3552
|
handleAddKpi,
|
|
@@ -3505,7 +3576,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3505
3576
|
onChangeKpiList(kpiList);
|
|
3506
3577
|
}
|
|
3507
3578
|
}, [kpiList]);
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3509
3580
|
import_antd22.ConfigProvider,
|
|
3510
3581
|
{
|
|
3511
3582
|
theme: {
|
|
@@ -3514,15 +3585,15 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3514
3585
|
fontSize: 16
|
|
3515
3586
|
}
|
|
3516
3587
|
},
|
|
3517
|
-
children: /* @__PURE__ */ (0,
|
|
3588
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "container-input", children: [
|
|
3518
3589
|
messageContainer,
|
|
3519
|
-
type === "number" && /* @__PURE__ */ (0,
|
|
3520
|
-
/* @__PURE__ */ (0,
|
|
3521
|
-
/* @__PURE__ */ (0,
|
|
3590
|
+
type === "number" && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "space-y-4", children: [
|
|
3591
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3592
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3522
3593
|
InputField,
|
|
3523
3594
|
{
|
|
3524
3595
|
value: nameKpi,
|
|
3525
|
-
|
|
3596
|
+
label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3526
3597
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3527
3598
|
required: true,
|
|
3528
3599
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
@@ -3530,11 +3601,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3530
3601
|
error: errors.nameKpi
|
|
3531
3602
|
}
|
|
3532
3603
|
),
|
|
3533
|
-
/* @__PURE__ */ (0,
|
|
3604
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3534
3605
|
InputField,
|
|
3535
3606
|
{
|
|
3536
3607
|
value: kpiValue,
|
|
3537
|
-
|
|
3608
|
+
label: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3538
3609
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3539
3610
|
required: true,
|
|
3540
3611
|
onChange: (value) => {
|
|
@@ -3554,11 +3625,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3554
3625
|
error: errors.kpiValue
|
|
3555
3626
|
}
|
|
3556
3627
|
),
|
|
3557
|
-
/* @__PURE__ */ (0,
|
|
3628
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3558
3629
|
InputField,
|
|
3559
3630
|
{
|
|
3560
3631
|
value: unitValue,
|
|
3561
|
-
|
|
3632
|
+
label: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
|
|
3562
3633
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3563
3634
|
required: true,
|
|
3564
3635
|
onChange: (value) => setUnitValue(value ?? ""),
|
|
@@ -3566,7 +3637,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3566
3637
|
error: errors.unitValue
|
|
3567
3638
|
}
|
|
3568
3639
|
),
|
|
3569
|
-
/* @__PURE__ */ (0,
|
|
3640
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3570
3641
|
import_icons_react11.IconCirclePlus,
|
|
3571
3642
|
{
|
|
3572
3643
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3575,17 +3646,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3575
3646
|
}
|
|
3576
3647
|
) })
|
|
3577
3648
|
] }),
|
|
3578
|
-
/* @__PURE__ */ (0,
|
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3579
3650
|
"div",
|
|
3580
3651
|
{
|
|
3581
3652
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3582
3653
|
children: [
|
|
3583
|
-
/* @__PURE__ */ (0,
|
|
3654
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3584
3655
|
index + 1,
|
|
3585
3656
|
"."
|
|
3586
3657
|
] }),
|
|
3587
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3588
|
-
/* @__PURE__ */ (0,
|
|
3658
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
3659
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3589
3660
|
InputField,
|
|
3590
3661
|
{
|
|
3591
3662
|
value: kpi.name,
|
|
@@ -3595,7 +3666,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3595
3666
|
error: itemErrors[kpi.id]?.name
|
|
3596
3667
|
}
|
|
3597
3668
|
),
|
|
3598
|
-
/* @__PURE__ */ (0,
|
|
3669
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3599
3670
|
InputField,
|
|
3600
3671
|
{
|
|
3601
3672
|
value: kpi.value?.toString(),
|
|
@@ -3620,7 +3691,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3620
3691
|
error: itemErrors[kpi.id]?.value
|
|
3621
3692
|
}
|
|
3622
3693
|
),
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3694
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3624
3695
|
InputField,
|
|
3625
3696
|
{
|
|
3626
3697
|
value: kpi.unit,
|
|
@@ -3630,29 +3701,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3630
3701
|
error: itemErrors[kpi.id]?.unit
|
|
3631
3702
|
}
|
|
3632
3703
|
),
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3634
3705
|
"div",
|
|
3635
3706
|
{
|
|
3636
3707
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3637
3708
|
children: [
|
|
3638
|
-
/* @__PURE__ */ (0,
|
|
3709
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3639
3710
|
import_icons_react11.IconCheck,
|
|
3640
3711
|
{
|
|
3641
3712
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3642
3713
|
onClick: () => handleSave(kpi.id, type)
|
|
3643
3714
|
}
|
|
3644
3715
|
),
|
|
3645
|
-
/* @__PURE__ */ (0,
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3646
3717
|
]
|
|
3647
3718
|
}
|
|
3648
3719
|
)
|
|
3649
|
-
] }) : /* @__PURE__ */ (0,
|
|
3650
|
-
/* @__PURE__ */ (0,
|
|
3651
|
-
/* @__PURE__ */ (0,
|
|
3652
|
-
/* @__PURE__ */ (0,
|
|
3653
|
-
/* @__PURE__ */ (0,
|
|
3654
|
-
/* @__PURE__ */ (0,
|
|
3655
|
-
/* @__PURE__ */ (0,
|
|
3720
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
3721
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3722
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "body-1", children: kpi.value }),
|
|
3723
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "body-1", children: kpi.unit }),
|
|
3724
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3725
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3726
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3656
3727
|
] })
|
|
3657
3728
|
] })
|
|
3658
3729
|
]
|
|
@@ -3660,13 +3731,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3660
3731
|
kpi.id
|
|
3661
3732
|
)) })
|
|
3662
3733
|
] }),
|
|
3663
|
-
type === "text" && /* @__PURE__ */ (0,
|
|
3664
|
-
/* @__PURE__ */ (0,
|
|
3665
|
-
/* @__PURE__ */ (0,
|
|
3734
|
+
type === "text" && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "space-y-4", children: [
|
|
3735
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3736
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3666
3737
|
InputField,
|
|
3667
3738
|
{
|
|
3668
3739
|
value: nameKpi,
|
|
3669
|
-
|
|
3740
|
+
label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3670
3741
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3671
3742
|
required: true,
|
|
3672
3743
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
@@ -3674,7 +3745,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3674
3745
|
error: errors.nameKpi
|
|
3675
3746
|
}
|
|
3676
3747
|
),
|
|
3677
|
-
/* @__PURE__ */ (0,
|
|
3748
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3678
3749
|
import_icons_react11.IconCirclePlus,
|
|
3679
3750
|
{
|
|
3680
3751
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3683,13 +3754,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3683
3754
|
}
|
|
3684
3755
|
) })
|
|
3685
3756
|
] }),
|
|
3686
|
-
/* @__PURE__ */ (0,
|
|
3687
|
-
/* @__PURE__ */ (0,
|
|
3757
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
|
|
3758
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3688
3759
|
index + 1,
|
|
3689
3760
|
"."
|
|
3690
3761
|
] }),
|
|
3691
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3692
|
-
/* @__PURE__ */ (0,
|
|
3762
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
3763
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3693
3764
|
InputField,
|
|
3694
3765
|
{
|
|
3695
3766
|
value: kpi.name,
|
|
@@ -3699,27 +3770,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3699
3770
|
error: itemErrors[kpi.id]?.name
|
|
3700
3771
|
}
|
|
3701
3772
|
),
|
|
3702
|
-
/* @__PURE__ */ (0,
|
|
3773
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3703
3774
|
"div",
|
|
3704
3775
|
{
|
|
3705
3776
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3706
3777
|
children: [
|
|
3707
|
-
/* @__PURE__ */ (0,
|
|
3778
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3708
3779
|
import_icons_react11.IconCheck,
|
|
3709
3780
|
{
|
|
3710
3781
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3711
3782
|
onClick: () => handleSave(kpi.id, type)
|
|
3712
3783
|
}
|
|
3713
3784
|
),
|
|
3714
|
-
/* @__PURE__ */ (0,
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3715
3786
|
]
|
|
3716
3787
|
}
|
|
3717
3788
|
)
|
|
3718
|
-
] }) : /* @__PURE__ */ (0,
|
|
3719
|
-
/* @__PURE__ */ (0,
|
|
3720
|
-
/* @__PURE__ */ (0,
|
|
3721
|
-
/* @__PURE__ */ (0,
|
|
3722
|
-
/* @__PURE__ */ (0,
|
|
3789
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
3790
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3791
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3792
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3723
3794
|
] })
|
|
3724
3795
|
] })
|
|
3725
3796
|
] }, kpi.id)) })
|
|
@@ -3731,10 +3802,235 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3731
3802
|
|
|
3732
3803
|
// src/Modal/Modal/Modal.tsx
|
|
3733
3804
|
var import_antd23 = require("antd");
|
|
3734
|
-
var
|
|
3805
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3735
3806
|
function AntDModal({ children, isOpen, width, onCancel }) {
|
|
3736
|
-
return /* @__PURE__ */ (0,
|
|
3807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_antd23.Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children }) }) });
|
|
3737
3808
|
}
|
|
3809
|
+
|
|
3810
|
+
// src/Indicator/Indicator/Indicator.tsx
|
|
3811
|
+
var import_icons_react12 = require("@tabler/icons-react");
|
|
3812
|
+
var import_react15 = require("react");
|
|
3813
|
+
var import_antd24 = require("antd");
|
|
3814
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3815
|
+
function Indicator({
|
|
3816
|
+
option = [
|
|
3817
|
+
{ value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
|
|
3818
|
+
{ value: "NUMBER", label: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }
|
|
3819
|
+
],
|
|
3820
|
+
type,
|
|
3821
|
+
arrayData,
|
|
3822
|
+
setArrayData
|
|
3823
|
+
}) {
|
|
3824
|
+
const [valueSwitch, setValueSwitch] = (0, import_react15.useState)("TEXT");
|
|
3825
|
+
const [cacheData, setCacheData] = (0, import_react15.useState)({
|
|
3826
|
+
indicatorType: type,
|
|
3827
|
+
inputType: valueSwitch,
|
|
3828
|
+
textValue: "",
|
|
3829
|
+
numberValue: "",
|
|
3830
|
+
unit: ""
|
|
3831
|
+
});
|
|
3832
|
+
const [cacheEditData, setCacheEditData] = (0, import_react15.useState)({
|
|
3833
|
+
indicatorType: type,
|
|
3834
|
+
inputType: valueSwitch,
|
|
3835
|
+
textValue: "",
|
|
3836
|
+
numberValue: "",
|
|
3837
|
+
unit: ""
|
|
3838
|
+
});
|
|
3839
|
+
const [editIndex, setEditIndex] = (0, import_react15.useState)(null);
|
|
3840
|
+
const handleAddIndicator = () => {
|
|
3841
|
+
if (cacheData.textValue.trim() === "") return;
|
|
3842
|
+
setArrayData([
|
|
3843
|
+
...arrayData,
|
|
3844
|
+
valueSwitch === "TEXT" ? {
|
|
3845
|
+
indicatorType: type,
|
|
3846
|
+
inputType: "TEXT",
|
|
3847
|
+
textValue: cacheData.textValue
|
|
3848
|
+
} : cacheData
|
|
3849
|
+
]);
|
|
3850
|
+
setCacheData({
|
|
3851
|
+
indicatorType: type,
|
|
3852
|
+
inputType: valueSwitch,
|
|
3853
|
+
textValue: "",
|
|
3854
|
+
numberValue: "",
|
|
3855
|
+
unit: ""
|
|
3856
|
+
});
|
|
3857
|
+
};
|
|
3858
|
+
const handleChangeCashData = (key, value) => {
|
|
3859
|
+
setCacheData((prev) => ({
|
|
3860
|
+
...prev,
|
|
3861
|
+
[key]: value
|
|
3862
|
+
}));
|
|
3863
|
+
console.log(cacheData);
|
|
3864
|
+
};
|
|
3865
|
+
const handleClick = (active) => {
|
|
3866
|
+
handleChangeCashData("inputType", active);
|
|
3867
|
+
setValueSwitch(active);
|
|
3868
|
+
};
|
|
3869
|
+
const handleDeleteIndicator = (index) => {
|
|
3870
|
+
const newData = arrayData.filter((_, i) => i !== index);
|
|
3871
|
+
setArrayData(newData);
|
|
3872
|
+
setEditIndex(null);
|
|
3873
|
+
};
|
|
3874
|
+
const handleEditIndicator = (index) => {
|
|
3875
|
+
setCacheEditData(arrayData[index]);
|
|
3876
|
+
setEditIndex(index);
|
|
3877
|
+
};
|
|
3878
|
+
const handleCancelEditIndicator = () => {
|
|
3879
|
+
setEditIndex(null);
|
|
3880
|
+
};
|
|
3881
|
+
const handleConfirmEditIndicator = (index) => {
|
|
3882
|
+
if (cacheEditData.textValue.trim() === "") return;
|
|
3883
|
+
const newData = [...arrayData];
|
|
3884
|
+
newData[index] = cacheEditData;
|
|
3885
|
+
setArrayData(newData);
|
|
3886
|
+
setEditIndex(null);
|
|
3887
|
+
};
|
|
3888
|
+
const handleChangeEditCashData = (e) => {
|
|
3889
|
+
const { name, value } = e.target;
|
|
3890
|
+
setCacheEditData((prev) => ({
|
|
3891
|
+
...prev,
|
|
3892
|
+
[name]: value
|
|
3893
|
+
}));
|
|
3894
|
+
console.log(cacheEditData);
|
|
3895
|
+
};
|
|
3896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "w-full", children: [
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3898
|
+
"div",
|
|
3899
|
+
{
|
|
3900
|
+
className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
|
|
3901
|
+
children: [
|
|
3902
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SwitchSelect, { option, onClick: handleClick, value: valueSwitch, label: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17", required: true }),
|
|
3903
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3904
|
+
InputField,
|
|
3905
|
+
{
|
|
3906
|
+
label: `\u0E0A\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
|
|
3907
|
+
value: cacheData.textValue,
|
|
3908
|
+
className: "h-[32px]",
|
|
3909
|
+
onChange: (e) => handleChangeCashData("textValue", String(e)),
|
|
3910
|
+
placeholder: `\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
|
|
3911
|
+
required: true
|
|
3912
|
+
}
|
|
3913
|
+
),
|
|
3914
|
+
valueSwitch === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3915
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3916
|
+
InputFieldNumber,
|
|
3917
|
+
{
|
|
3918
|
+
label: `\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
|
|
3919
|
+
value: cacheData.numberValue ?? "",
|
|
3920
|
+
className: "h-[32px]",
|
|
3921
|
+
onChange: (e) => handleChangeCashData("numberValue", String(e)),
|
|
3922
|
+
placeholder: `\u0E23\u0E30\u0E1A\u0E38\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
|
|
3923
|
+
required: true
|
|
3924
|
+
}
|
|
3925
|
+
),
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3927
|
+
InputField,
|
|
3928
|
+
{
|
|
3929
|
+
label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
|
|
3930
|
+
value: cacheData.unit ?? "",
|
|
3931
|
+
className: "h-[32px]",
|
|
3932
|
+
onChange: (e) => handleChangeCashData("unit", String(e)),
|
|
3933
|
+
placeholder: "\u0E23\u0E30\u0E1A\u0E38\u0E2B\u0E19\u0E48\u0E27\u0E22",
|
|
3934
|
+
required: true
|
|
3935
|
+
}
|
|
3936
|
+
)
|
|
3937
|
+
] }),
|
|
3938
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons_react12.IconCirclePlus, { onClick: handleAddIndicator, className: "mt-7 cursor-pointer", size: 32 })
|
|
3939
|
+
]
|
|
3940
|
+
}
|
|
3941
|
+
),
|
|
3942
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: arrayData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3943
|
+
"div",
|
|
3944
|
+
{
|
|
3945
|
+
className: `space-y-4 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
|
|
3946
|
+
children: [
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
|
|
3948
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3949
|
+
import_antd24.Input,
|
|
3950
|
+
{
|
|
3951
|
+
className: "body-1 mt-2",
|
|
3952
|
+
variant: "underlined",
|
|
3953
|
+
value: cacheEditData.textValue,
|
|
3954
|
+
name: "textValue",
|
|
3955
|
+
onChange: (e) => handleChangeEditCashData(e)
|
|
3956
|
+
}
|
|
3957
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "body-1 mt-2", children: item.textValue }),
|
|
3958
|
+
item.inputType === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3959
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3960
|
+
import_antd24.Input,
|
|
3961
|
+
{
|
|
3962
|
+
className: "body-1 mt-2",
|
|
3963
|
+
variant: "underlined",
|
|
3964
|
+
value: cacheEditData.numberValue,
|
|
3965
|
+
name: "numberValue",
|
|
3966
|
+
onChange: (e) => handleChangeEditCashData(e)
|
|
3967
|
+
}
|
|
3968
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "body-1 mt-2", children: item.numberValue }),
|
|
3969
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3970
|
+
import_antd24.Input,
|
|
3971
|
+
{
|
|
3972
|
+
className: "body-1 mt-2",
|
|
3973
|
+
variant: "underlined",
|
|
3974
|
+
value: cacheEditData.unit,
|
|
3975
|
+
name: "unit",
|
|
3976
|
+
onChange: (e) => handleChangeEditCashData(e)
|
|
3977
|
+
}
|
|
3978
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "body-1 mt-2", children: item.unit })
|
|
3979
|
+
] }),
|
|
3980
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex", children: [
|
|
3981
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3982
|
+
import_icons_react12.IconCheck,
|
|
3983
|
+
{
|
|
3984
|
+
className: "cursor-pointer text-green-600",
|
|
3985
|
+
onClick: () => handleConfirmEditIndicator(index)
|
|
3986
|
+
}
|
|
3987
|
+
),
|
|
3988
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons_react12.IconX, { className: "cursor-pointer text-red-600", onClick: handleCancelEditIndicator })
|
|
3989
|
+
] }) : void 0 : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons_react12.IconPencil, { className: "cursor-pointer", onClick: () => handleEditIndicator(index) }) }),
|
|
3990
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons_react12.IconTrash, { onClick: () => handleDeleteIndicator(index) }) })
|
|
3991
|
+
]
|
|
3992
|
+
}
|
|
3993
|
+
)) })
|
|
3994
|
+
] });
|
|
3995
|
+
}
|
|
3996
|
+
|
|
3997
|
+
// src/FilterPopUp/FilterPopUp.tsx
|
|
3998
|
+
var import_icons_react13 = require("@tabler/icons-react");
|
|
3999
|
+
var import_react16 = require("react");
|
|
4000
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4001
|
+
var FilterPopUp = (filter) => {
|
|
4002
|
+
const [isAction, setIsAction] = (0, import_react16.useState)(true);
|
|
4003
|
+
const [filterArray, setFilterArray] = (0, import_react16.useState)([""]);
|
|
4004
|
+
const handleClearFilter = () => {
|
|
4005
|
+
setFilterArray([]);
|
|
4006
|
+
};
|
|
4007
|
+
const handleSubmitFilter = () => {
|
|
4008
|
+
filter.handleSearch(filterArray);
|
|
4009
|
+
};
|
|
4010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative", children: [
|
|
4011
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons_react13.IconFilter, {}),
|
|
4013
|
+
"filter"
|
|
4014
|
+
] }),
|
|
4015
|
+
isAction ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
|
|
4016
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex justify-end", children: [
|
|
4017
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex justify-end text-nowrap gap-2", children: [
|
|
4018
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons_react13.IconCheck, {}) }),
|
|
4019
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons_react13.IconTrash, {}) })
|
|
4020
|
+
] }),
|
|
4021
|
+
""
|
|
4022
|
+
] }),
|
|
4023
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4024
|
+
SelectCustom,
|
|
4025
|
+
{
|
|
4026
|
+
options: filter.selectionFilter,
|
|
4027
|
+
onChange: (list) => setFilterArray(list),
|
|
4028
|
+
label: "\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01"
|
|
4029
|
+
}
|
|
4030
|
+
)
|
|
4031
|
+
] }) : void 0
|
|
4032
|
+
] });
|
|
4033
|
+
};
|
|
3738
4034
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3739
4035
|
0 && (module.exports = {
|
|
3740
4036
|
AntDModal,
|
|
@@ -3749,8 +4045,10 @@ function AntDModal({ children, isOpen, width, onCancel }) {
|
|
|
3749
4045
|
DatePickerBasic,
|
|
3750
4046
|
DatePickerRangePicker,
|
|
3751
4047
|
FileUploader,
|
|
4048
|
+
FilterPopUp,
|
|
3752
4049
|
GhostButton,
|
|
3753
4050
|
HeadingPage,
|
|
4051
|
+
Indicator,
|
|
3754
4052
|
InputField,
|
|
3755
4053
|
InputFieldNumber,
|
|
3756
4054
|
KpiSection,
|
|
@@ -3770,6 +4068,7 @@ function AntDModal({ children, isOpen, width, onCancel }) {
|
|
|
3770
4068
|
Sidebar,
|
|
3771
4069
|
SortFilter,
|
|
3772
4070
|
Switch,
|
|
4071
|
+
SwitchSelect,
|
|
3773
4072
|
TabSelectionButton,
|
|
3774
4073
|
TextAreaInput,
|
|
3775
4074
|
TextInput,
|