@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.mjs
CHANGED
|
@@ -324,6 +324,28 @@ var require_th = __commonJS({
|
|
|
324
324
|
}
|
|
325
325
|
});
|
|
326
326
|
|
|
327
|
+
// node_modules/dayjs/plugin/buddhistEra.js
|
|
328
|
+
var require_buddhistEra = __commonJS({
|
|
329
|
+
"node_modules/dayjs/plugin/buddhistEra.js"(exports, module) {
|
|
330
|
+
"use strict";
|
|
331
|
+
!(function(t, e) {
|
|
332
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_buddhistEra = e();
|
|
333
|
+
})(exports, (function() {
|
|
334
|
+
"use strict";
|
|
335
|
+
return function(t, e) {
|
|
336
|
+
var n = e.prototype, i = n.format;
|
|
337
|
+
n.format = function(t2) {
|
|
338
|
+
var e2 = this, n2 = (t2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g, (function(t3, n3) {
|
|
339
|
+
var i2, o = String(e2.$y + 543), f = "BB" === t3 ? [o.slice(-2), 2] : [o, 4];
|
|
340
|
+
return n3 || (i2 = e2.$utils()).s.apply(i2, f.concat(["0"]));
|
|
341
|
+
}));
|
|
342
|
+
return i.bind(this)(n2);
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
}));
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
|
|
327
349
|
// node_modules/dayjs/plugin/customParseFormat.js
|
|
328
350
|
var require_customParseFormat = __commonJS({
|
|
329
351
|
"node_modules/dayjs/plugin/customParseFormat.js"(exports, module) {
|
|
@@ -671,23 +693,55 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
671
693
|
] });
|
|
672
694
|
}
|
|
673
695
|
|
|
674
|
-
// src/
|
|
696
|
+
// src/Switch/SwitchSelect/SwitchSelect.tsx
|
|
675
697
|
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
698
|
+
function SwitchSelect({
|
|
699
|
+
option,
|
|
700
|
+
onClick,
|
|
701
|
+
value,
|
|
702
|
+
label,
|
|
703
|
+
required,
|
|
704
|
+
color
|
|
705
|
+
}) {
|
|
706
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col container-input", children: [
|
|
707
|
+
label && /* @__PURE__ */ jsxs8("p", { className: `body-1`, children: [
|
|
708
|
+
label,
|
|
709
|
+
" ",
|
|
710
|
+
required && /* @__PURE__ */ jsx11("span", { className: "text-red-500", children: "*" })
|
|
711
|
+
] }),
|
|
712
|
+
/* @__PURE__ */ jsx11("div", { className: "flex", children: option.map((item, index) => /* @__PURE__ */ jsx11(
|
|
713
|
+
"button",
|
|
714
|
+
{
|
|
715
|
+
onClick: () => onClick(item.value),
|
|
716
|
+
className: `
|
|
717
|
+
body-1 border-y-1 border-primary-500 cursor-pointer h-[32px] px-2
|
|
718
|
+
${item.value === value ? `${color ? `bg-[${color}]` : `bg-primary-500`} text-white` : "bg-white text-primary-500"}
|
|
719
|
+
${index === 0 ? "border-l-1 rounded-l-lg" : index === option.length - 1 ? "border-r-1 rounded-r-lg" : "border-x-1"}
|
|
720
|
+
`,
|
|
721
|
+
children: item.label
|
|
722
|
+
},
|
|
723
|
+
item.value
|
|
724
|
+
)) })
|
|
725
|
+
] });
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// src/NavBar/MenuNavBar/MenuNavBar.tsx
|
|
729
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
676
730
|
function MenuNavBar({ menus, onClick }) {
|
|
677
|
-
return /* @__PURE__ */
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
menu?.subMenus.map((subMenu) => /* @__PURE__ */
|
|
731
|
+
return /* @__PURE__ */ jsx12("div", { className: "w-full h-full p-[10px] bg-white", children: menus?.map((menu, index) => /* @__PURE__ */ jsxs9("div", { className: `p-[10px] ${index !== 0 ? "mt-[10px]" : ""}`, children: [
|
|
732
|
+
/* @__PURE__ */ jsx12("p", { className: "p-[10px] w-[202px] h-[47px] subtitle-1", children: menu.title }),
|
|
733
|
+
menu?.subMenus.map((subMenu) => /* @__PURE__ */ jsxs9(
|
|
680
734
|
"div",
|
|
681
735
|
{
|
|
682
736
|
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",
|
|
683
737
|
onClick: () => onClick(subMenu.path),
|
|
684
738
|
children: [
|
|
685
|
-
/* @__PURE__ */
|
|
686
|
-
subMenu.icon && /* @__PURE__ */
|
|
687
|
-
subMenu.iconActive && /* @__PURE__ */
|
|
739
|
+
/* @__PURE__ */ jsxs9("span", { className: "flex justify-center items-center w-[24px] h-[24px] text-[20px]", children: [
|
|
740
|
+
subMenu.icon && /* @__PURE__ */ jsx12("span", { className: `block ${subMenu.iconActive ? "group-active:hidden" : ""}`, children: subMenu.icon }),
|
|
741
|
+
subMenu.iconActive && /* @__PURE__ */ jsx12("span", { className: "hidden group-active:block", children: subMenu.iconActive })
|
|
688
742
|
] }),
|
|
689
743
|
subMenu.title,
|
|
690
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ jsx12("span", { className: "flex ml-auto", children: subMenu.customNode && subMenu.customNode })
|
|
691
745
|
]
|
|
692
746
|
},
|
|
693
747
|
`sub_${subMenu.title}`
|
|
@@ -698,39 +752,39 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
698
752
|
// src/NavBar/MenuNavBar/Sidebar.tsx
|
|
699
753
|
import { IconChevronLeftPipe, IconChevronRightPipe } from "@tabler/icons-react";
|
|
700
754
|
import { createContext, useContext, useState } from "react";
|
|
701
|
-
import { jsx as
|
|
755
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
702
756
|
var SidebarContext = createContext({ expanded: false });
|
|
703
757
|
function Sidebar({ children, logo }) {
|
|
704
758
|
const [expanded, setExpanded] = useState(true);
|
|
705
|
-
return /* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
expanded && logo && /* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */
|
|
759
|
+
return /* @__PURE__ */ jsx13("aside", { className: "h-screen", children: /* @__PURE__ */ jsxs10("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
|
|
760
|
+
/* @__PURE__ */ jsxs10("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
|
|
761
|
+
expanded && logo && /* @__PURE__ */ jsx13("img", { src: logo, width: 120, className: "ml-auto" }),
|
|
762
|
+
/* @__PURE__ */ jsx13(
|
|
709
763
|
"button",
|
|
710
764
|
{
|
|
711
765
|
className: "p-1.5 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer ml-auto",
|
|
712
766
|
onClick: () => setExpanded((curr) => !curr),
|
|
713
|
-
children: expanded ? /* @__PURE__ */
|
|
767
|
+
children: expanded ? /* @__PURE__ */ jsx13(IconChevronLeftPipe, {}) : /* @__PURE__ */ jsx13(IconChevronRightPipe, {})
|
|
714
768
|
}
|
|
715
769
|
)
|
|
716
770
|
] }),
|
|
717
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ jsx13(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ jsx13("ul", { className: "flex-1 px-3", children }) })
|
|
718
772
|
] }) });
|
|
719
773
|
}
|
|
720
774
|
|
|
721
775
|
// src/NavBar/TopNavBar/TopNavBar.tsx
|
|
722
776
|
import { IconBellRinging } from "@tabler/icons-react";
|
|
723
|
-
import { jsx as
|
|
777
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
724
778
|
function TopNavBar({ onClickNoti, logo }) {
|
|
725
|
-
return /* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
779
|
+
return /* @__PURE__ */ jsxs11("div", { className: "w-full h-full flex", children: [
|
|
780
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
|
|
727
781
|
logo,
|
|
728
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ jsx14("p", { className: "subtitle-1", children: "Project Management" })
|
|
729
783
|
] }),
|
|
730
|
-
/* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
|
|
785
|
+
/* @__PURE__ */ jsx14("div", { children: "Search" }),
|
|
786
|
+
/* @__PURE__ */ jsx14("div", { children: /* @__PURE__ */ jsx14(IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
|
|
787
|
+
/* @__PURE__ */ jsx14("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
|
|
734
788
|
] })
|
|
735
789
|
] });
|
|
736
790
|
}
|
|
@@ -742,7 +796,7 @@ import { useState as useState2 } from "react";
|
|
|
742
796
|
// src/Table/Pagination/Pagination.tsx
|
|
743
797
|
import { IconArrowLeft, IconArrowRight } from "@tabler/icons-react";
|
|
744
798
|
import { useMemo } from "react";
|
|
745
|
-
import { jsx as
|
|
799
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
746
800
|
function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
747
801
|
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
748
802
|
const getPages = useMemo(() => {
|
|
@@ -766,21 +820,21 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
766
820
|
return pages;
|
|
767
821
|
}, [totalPages, currentPage]);
|
|
768
822
|
if (totalPages <= 1) return null;
|
|
769
|
-
return /* @__PURE__ */
|
|
770
|
-
/* @__PURE__ */
|
|
823
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-center gap-2 mt-4 body-1", children: [
|
|
824
|
+
/* @__PURE__ */ jsxs12(
|
|
771
825
|
"button",
|
|
772
826
|
{
|
|
773
827
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
774
828
|
disabled: currentPage === 1,
|
|
775
829
|
onClick: () => onPageChange(currentPage - 1),
|
|
776
830
|
children: [
|
|
777
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ jsx15(IconArrowLeft, {}),
|
|
778
832
|
"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A"
|
|
779
833
|
]
|
|
780
834
|
}
|
|
781
835
|
),
|
|
782
836
|
getPages.map(
|
|
783
|
-
(page, i) => typeof page === "string" ? /* @__PURE__ */
|
|
837
|
+
(page, i) => typeof page === "string" ? /* @__PURE__ */ jsx15("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ jsx15(
|
|
784
838
|
"button",
|
|
785
839
|
{
|
|
786
840
|
className: `w-[32px] h-[32px] rounded-[8px] px-3 py-1 cursor-pointer
|
|
@@ -791,7 +845,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
791
845
|
i
|
|
792
846
|
)
|
|
793
847
|
),
|
|
794
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ jsxs12(
|
|
795
849
|
"button",
|
|
796
850
|
{
|
|
797
851
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
@@ -799,7 +853,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
799
853
|
onClick: () => onPageChange(currentPage + 1),
|
|
800
854
|
children: [
|
|
801
855
|
"\u0E16\u0E31\u0E14\u0E44\u0E1B",
|
|
802
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ jsx15(IconArrowRight, {})
|
|
803
857
|
]
|
|
804
858
|
}
|
|
805
859
|
)
|
|
@@ -807,7 +861,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
807
861
|
}
|
|
808
862
|
|
|
809
863
|
// src/Table/DataTable/DataTable.tsx
|
|
810
|
-
import { Fragment, jsx as
|
|
864
|
+
import { Fragment, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
811
865
|
function DataTable({ columns, data, onSort, isLoading }) {
|
|
812
866
|
const cols = Math.max(1, columns.length);
|
|
813
867
|
const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
|
|
@@ -819,14 +873,14 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
819
873
|
onSort();
|
|
820
874
|
}
|
|
821
875
|
};
|
|
822
|
-
return /* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
876
|
+
return /* @__PURE__ */ jsxs13("div", { className: "border rounded-md w-full h-full", children: [
|
|
877
|
+
/* @__PURE__ */ jsx16("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
|
|
824
878
|
const isActive = sortConfig?.key === col.accessor;
|
|
825
879
|
const direction = isActive ? sortConfig?.direction : null;
|
|
826
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
|
|
827
881
|
col.header,
|
|
828
|
-
col.sortable && /* @__PURE__ */
|
|
829
|
-
direction === null && /* @__PURE__ */
|
|
882
|
+
col.sortable && /* @__PURE__ */ jsxs13(Fragment, { children: [
|
|
883
|
+
direction === null && /* @__PURE__ */ jsx16(
|
|
830
884
|
IconSelector,
|
|
831
885
|
{
|
|
832
886
|
size: 15,
|
|
@@ -834,7 +888,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
834
888
|
onClick: () => onSorting({ key: col.accessor, direction: "asc" })
|
|
835
889
|
}
|
|
836
890
|
),
|
|
837
|
-
direction === "asc" && /* @__PURE__ */
|
|
891
|
+
direction === "asc" && /* @__PURE__ */ jsx16(
|
|
838
892
|
IconSortAscending,
|
|
839
893
|
{
|
|
840
894
|
size: 15,
|
|
@@ -842,7 +896,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
842
896
|
onClick: () => onSorting({ key: col.accessor, direction: "desc" })
|
|
843
897
|
}
|
|
844
898
|
),
|
|
845
|
-
direction === "desc" && /* @__PURE__ */
|
|
899
|
+
direction === "desc" && /* @__PURE__ */ jsx16(
|
|
846
900
|
IconSortDescending,
|
|
847
901
|
{
|
|
848
902
|
size: 15,
|
|
@@ -853,29 +907,32 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
853
907
|
] })
|
|
854
908
|
] }, i);
|
|
855
909
|
}) }),
|
|
856
|
-
isLoading ? /* @__PURE__ */
|
|
910
|
+
isLoading ? /* @__PURE__ */ jsx16("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ jsx16(Loader, {}) }) : /* @__PURE__ */ jsx16(Fragment, { children: data.map((row, i) => /* @__PURE__ */ jsx16(
|
|
857
911
|
"div",
|
|
858
912
|
{
|
|
859
913
|
className: `${gridClass} ${data.length - 1 !== i ? "border-b border-gray-200" : ""} items-center`,
|
|
860
914
|
style: { ["--cols"]: cols },
|
|
861
|
-
children: columns.map((col, c) => /* @__PURE__ */
|
|
915
|
+
children: columns.map((col, c) => /* @__PURE__ */ jsx16("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
|
|
862
916
|
},
|
|
863
917
|
i
|
|
864
918
|
)) }),
|
|
865
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
|
|
866
920
|
] });
|
|
867
921
|
}
|
|
868
922
|
|
|
869
923
|
// src/Table/DataTable/AntDataTable.tsx
|
|
870
924
|
import { ConfigProvider, Table } from "antd";
|
|
871
925
|
import { useState as useState3 } from "react";
|
|
872
|
-
import { Fragment as Fragment2, jsx as
|
|
926
|
+
import { Fragment as Fragment2, jsx as jsx17 } from "react/jsx-runtime";
|
|
873
927
|
function AntDataTable({
|
|
874
928
|
dataSource,
|
|
875
929
|
columns,
|
|
876
930
|
pageSize = 10,
|
|
877
931
|
rowCheckbox,
|
|
878
932
|
onRowSelect,
|
|
933
|
+
// onFilteredDataChange,
|
|
934
|
+
onFilter,
|
|
935
|
+
onChange,
|
|
879
936
|
width,
|
|
880
937
|
height,
|
|
881
938
|
pagination
|
|
@@ -888,7 +945,11 @@ function AntDataTable({
|
|
|
888
945
|
onRowSelect && onRowSelect(newSelectedRowKeys);
|
|
889
946
|
}
|
|
890
947
|
};
|
|
891
|
-
|
|
948
|
+
const handleChange = (paginationArgs, filters, sorter, extra) => {
|
|
949
|
+
onChange?.(paginationArgs, filters, sorter, extra);
|
|
950
|
+
onFilter(filters);
|
|
951
|
+
};
|
|
952
|
+
return /* @__PURE__ */ jsx17(Fragment2, { children: /* @__PURE__ */ jsx17(
|
|
892
953
|
ConfigProvider,
|
|
893
954
|
{
|
|
894
955
|
theme: {
|
|
@@ -898,12 +959,13 @@ function AntDataTable({
|
|
|
898
959
|
fontSize: 14
|
|
899
960
|
}
|
|
900
961
|
},
|
|
901
|
-
children: /* @__PURE__ */
|
|
962
|
+
children: /* @__PURE__ */ jsx17(
|
|
902
963
|
Table,
|
|
903
964
|
{
|
|
904
965
|
dataSource,
|
|
905
966
|
columns,
|
|
906
967
|
rowSelection: rowCheckbox ? rowSelection : void 0,
|
|
968
|
+
onChange: handleChange,
|
|
907
969
|
pagination: pagination ? { position: ["bottomCenter"], pageSize } : false,
|
|
908
970
|
style: { width },
|
|
909
971
|
scroll: { y: height }
|
|
@@ -921,7 +983,7 @@ import timeGridPlugin from "@fullcalendar/timegrid";
|
|
|
921
983
|
import interactionPlugin from "@fullcalendar/interaction";
|
|
922
984
|
import thLocale from "@fullcalendar/core/locales/th";
|
|
923
985
|
import { IconChevronLeft, IconChevronRight, IconX } from "@tabler/icons-react";
|
|
924
|
-
import { Fragment as Fragment3, jsx as
|
|
986
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
925
987
|
function Calendar({ events }) {
|
|
926
988
|
const calendarRef = useRef(null);
|
|
927
989
|
const [monthTitle, setMonthTitle] = useState4("");
|
|
@@ -940,11 +1002,11 @@ function Calendar({ events }) {
|
|
|
940
1002
|
useEffect(() => {
|
|
941
1003
|
updateTitle();
|
|
942
1004
|
}, []);
|
|
943
|
-
return /* @__PURE__ */
|
|
944
|
-
/* @__PURE__ */
|
|
945
|
-
/* @__PURE__ */
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
/* @__PURE__ */
|
|
1005
|
+
return /* @__PURE__ */ jsxs14("div", { className: "fc w-full h-full relative z-10", children: [
|
|
1006
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex mb-[8px]", children: [
|
|
1007
|
+
/* @__PURE__ */ jsx18("p", { className: "headline-5", children: monthTitle }),
|
|
1008
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex gap-[10px] ml-auto", children: [
|
|
1009
|
+
/* @__PURE__ */ jsx18(
|
|
948
1010
|
"p",
|
|
949
1011
|
{
|
|
950
1012
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -955,7 +1017,7 @@ function Calendar({ events }) {
|
|
|
955
1017
|
children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
|
|
956
1018
|
}
|
|
957
1019
|
),
|
|
958
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ jsx18(
|
|
959
1021
|
"p",
|
|
960
1022
|
{
|
|
961
1023
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -966,7 +1028,7 @@ function Calendar({ events }) {
|
|
|
966
1028
|
children: "Month"
|
|
967
1029
|
}
|
|
968
1030
|
),
|
|
969
|
-
/* @__PURE__ */
|
|
1031
|
+
/* @__PURE__ */ jsx18(
|
|
970
1032
|
"p",
|
|
971
1033
|
{
|
|
972
1034
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -977,7 +1039,7 @@ function Calendar({ events }) {
|
|
|
977
1039
|
children: "Week"
|
|
978
1040
|
}
|
|
979
1041
|
),
|
|
980
|
-
/* @__PURE__ */
|
|
1042
|
+
/* @__PURE__ */ jsx18(
|
|
981
1043
|
"p",
|
|
982
1044
|
{
|
|
983
1045
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -988,7 +1050,7 @@ function Calendar({ events }) {
|
|
|
988
1050
|
children: "Day"
|
|
989
1051
|
}
|
|
990
1052
|
),
|
|
991
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ jsx18(
|
|
992
1054
|
"button",
|
|
993
1055
|
{
|
|
994
1056
|
className: "cursor-pointer",
|
|
@@ -996,10 +1058,10 @@ function Calendar({ events }) {
|
|
|
996
1058
|
calendarRef.current?.getApi().prev();
|
|
997
1059
|
updateTitle();
|
|
998
1060
|
},
|
|
999
|
-
children: /* @__PURE__ */
|
|
1061
|
+
children: /* @__PURE__ */ jsx18(IconChevronLeft, {})
|
|
1000
1062
|
}
|
|
1001
1063
|
),
|
|
1002
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ jsx18(
|
|
1003
1065
|
"button",
|
|
1004
1066
|
{
|
|
1005
1067
|
className: "cursor-pointer",
|
|
@@ -1007,12 +1069,12 @@ function Calendar({ events }) {
|
|
|
1007
1069
|
calendarRef.current?.getApi().next();
|
|
1008
1070
|
updateTitle();
|
|
1009
1071
|
},
|
|
1010
|
-
children: /* @__PURE__ */
|
|
1072
|
+
children: /* @__PURE__ */ jsx18(IconChevronRight, {})
|
|
1011
1073
|
}
|
|
1012
1074
|
)
|
|
1013
1075
|
] })
|
|
1014
1076
|
] }),
|
|
1015
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ jsx18("div", { className: "relative z-10", children: /* @__PURE__ */ jsx18(
|
|
1016
1078
|
FullCalendar,
|
|
1017
1079
|
{
|
|
1018
1080
|
ref: calendarRef,
|
|
@@ -1041,28 +1103,28 @@ function Calendar({ events }) {
|
|
|
1041
1103
|
});
|
|
1042
1104
|
},
|
|
1043
1105
|
eventContent: (arg) => {
|
|
1044
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ jsx18(Fragment3, { children: /* @__PURE__ */ jsx18("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 }) });
|
|
1045
1107
|
},
|
|
1046
1108
|
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
1047
1109
|
}
|
|
1048
1110
|
) }),
|
|
1049
|
-
openPopup && /* @__PURE__ */
|
|
1111
|
+
openPopup && /* @__PURE__ */ jsx18("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ jsx18(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
|
|
1050
1112
|
] });
|
|
1051
1113
|
}
|
|
1052
1114
|
function EventPopUp({ event, onClose }) {
|
|
1053
|
-
return /* @__PURE__ */
|
|
1054
|
-
/* @__PURE__ */
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1115
|
+
return /* @__PURE__ */ jsxs14("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
|
|
1116
|
+
/* @__PURE__ */ jsx18("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ jsx18(IconX, { className: "w-6 h-6 text-gray-600" }) }),
|
|
1117
|
+
/* @__PURE__ */ jsx18("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ jsx18("h2", { className: "text-lg font-semibold", children: event.title }) }),
|
|
1118
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
|
|
1119
|
+
/* @__PURE__ */ jsxs14("p", { children: [
|
|
1120
|
+
/* @__PURE__ */ jsx18("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
|
|
1059
1121
|
event?.start?.toLocaleString?.() || String(event?.start)
|
|
1060
1122
|
] }),
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */
|
|
1123
|
+
/* @__PURE__ */ jsxs14("p", { children: [
|
|
1124
|
+
/* @__PURE__ */ jsx18("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
|
|
1063
1125
|
event?.end?.toLocaleString?.() || String(event?.end)
|
|
1064
1126
|
] }),
|
|
1065
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ jsx18("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" })
|
|
1066
1128
|
] })
|
|
1067
1129
|
] });
|
|
1068
1130
|
}
|
|
@@ -1070,7 +1132,7 @@ function EventPopUp({ event, onClose }) {
|
|
|
1070
1132
|
// src/Input/TextInput/TextInput.tsx
|
|
1071
1133
|
import { IconEye, IconEyeOff } from "@tabler/icons-react";
|
|
1072
1134
|
import { useState as useState5 } from "react";
|
|
1073
|
-
import { jsx as
|
|
1135
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1074
1136
|
function TextInput({
|
|
1075
1137
|
label,
|
|
1076
1138
|
placeholder,
|
|
@@ -1087,18 +1149,18 @@ function TextInput({
|
|
|
1087
1149
|
setShowPassword(!showPassword);
|
|
1088
1150
|
};
|
|
1089
1151
|
const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
|
|
1090
|
-
return /* @__PURE__ */
|
|
1091
|
-
label && /* @__PURE__ */
|
|
1152
|
+
return /* @__PURE__ */ jsxs15("div", { children: [
|
|
1153
|
+
label && /* @__PURE__ */ jsxs15("p", { className: "body-1 mb-[8px]", children: [
|
|
1092
1154
|
label,
|
|
1093
|
-
required && /* @__PURE__ */
|
|
1155
|
+
required && /* @__PURE__ */ jsx19("span", { className: "text-red-500", children: "\xA0*" })
|
|
1094
1156
|
] }),
|
|
1095
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ jsxs15(
|
|
1096
1158
|
"div",
|
|
1097
1159
|
{
|
|
1098
1160
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1099
|
-
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-
|
|
1161
|
+
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-500" : ""}`,
|
|
1100
1162
|
children: [
|
|
1101
|
-
/* @__PURE__ */
|
|
1163
|
+
/* @__PURE__ */ jsx19(
|
|
1102
1164
|
"input",
|
|
1103
1165
|
{
|
|
1104
1166
|
className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
|
|
@@ -1111,17 +1173,17 @@ function TextInput({
|
|
|
1111
1173
|
disabled
|
|
1112
1174
|
}
|
|
1113
1175
|
),
|
|
1114
|
-
type === "password" && (showPassword ? /* @__PURE__ */
|
|
1176
|
+
type === "password" && (showPassword ? /* @__PURE__ */ jsx19(IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ jsx19(IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
|
|
1115
1177
|
]
|
|
1116
1178
|
}
|
|
1117
1179
|
),
|
|
1118
|
-
error && /* @__PURE__ */
|
|
1180
|
+
error && /* @__PURE__ */ jsx19("p", { className: "text-red-500 body-1", children: error })
|
|
1119
1181
|
] });
|
|
1120
1182
|
}
|
|
1121
1183
|
|
|
1122
1184
|
// src/Input/TextArea/TextArea.tsx
|
|
1123
1185
|
import { ConfigProvider as ConfigProvider2, Input } from "antd";
|
|
1124
|
-
import { Fragment as Fragment4, jsx as
|
|
1186
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1125
1187
|
var { TextArea } = Input;
|
|
1126
1188
|
function TextAreaInput({
|
|
1127
1189
|
label,
|
|
@@ -1136,7 +1198,7 @@ function TextAreaInput({
|
|
|
1136
1198
|
error,
|
|
1137
1199
|
disabled
|
|
1138
1200
|
}) {
|
|
1139
|
-
return /* @__PURE__ */
|
|
1201
|
+
return /* @__PURE__ */ jsx20(Fragment4, { children: /* @__PURE__ */ jsx20(
|
|
1140
1202
|
ConfigProvider2,
|
|
1141
1203
|
{
|
|
1142
1204
|
theme: {
|
|
@@ -1146,13 +1208,13 @@ function TextAreaInput({
|
|
|
1146
1208
|
fontSize: 16
|
|
1147
1209
|
}
|
|
1148
1210
|
},
|
|
1149
|
-
children: /* @__PURE__ */
|
|
1150
|
-
label && /* @__PURE__ */
|
|
1211
|
+
children: /* @__PURE__ */ jsxs16("div", { children: [
|
|
1212
|
+
label && /* @__PURE__ */ jsxs16("p", { className: "body-1 mb-[8px]", children: [
|
|
1151
1213
|
label,
|
|
1152
1214
|
" ",
|
|
1153
|
-
required && /* @__PURE__ */
|
|
1215
|
+
required && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "\xA0*" })
|
|
1154
1216
|
] }),
|
|
1155
|
-
/* @__PURE__ */
|
|
1217
|
+
/* @__PURE__ */ jsx20(
|
|
1156
1218
|
TextArea,
|
|
1157
1219
|
{
|
|
1158
1220
|
value,
|
|
@@ -1168,31 +1230,31 @@ function TextAreaInput({
|
|
|
1168
1230
|
disabled
|
|
1169
1231
|
}
|
|
1170
1232
|
),
|
|
1171
|
-
error && /* @__PURE__ */
|
|
1233
|
+
error && /* @__PURE__ */ jsx20("p", { className: "text-red-500 body-1", children: error })
|
|
1172
1234
|
] })
|
|
1173
1235
|
}
|
|
1174
1236
|
) });
|
|
1175
1237
|
}
|
|
1176
1238
|
|
|
1177
1239
|
// src/Input/InputField/InputField.tsx
|
|
1178
|
-
import { ConfigProvider as ConfigProvider3, Input as Input2 } from "antd";
|
|
1179
|
-
import { jsx as
|
|
1240
|
+
import { ConfigProvider as ConfigProvider3, Input as Input2, Space } from "antd";
|
|
1241
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1180
1242
|
function InputField({
|
|
1181
1243
|
value,
|
|
1182
1244
|
onChange,
|
|
1183
1245
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1184
|
-
|
|
1246
|
+
label,
|
|
1185
1247
|
required,
|
|
1186
|
-
bottomText,
|
|
1187
1248
|
disabled,
|
|
1188
1249
|
error,
|
|
1189
1250
|
addonBefore,
|
|
1190
1251
|
addonAfter,
|
|
1191
1252
|
defaultValue,
|
|
1192
1253
|
className,
|
|
1193
|
-
onClear
|
|
1254
|
+
onClear,
|
|
1255
|
+
statickey
|
|
1194
1256
|
}) {
|
|
1195
|
-
return /* @__PURE__ */
|
|
1257
|
+
return /* @__PURE__ */ jsx21(
|
|
1196
1258
|
ConfigProvider3,
|
|
1197
1259
|
{
|
|
1198
1260
|
theme: {
|
|
@@ -1200,32 +1262,31 @@ function InputField({
|
|
|
1200
1262
|
fontFamily: "Kanit"
|
|
1201
1263
|
}
|
|
1202
1264
|
},
|
|
1203
|
-
children: /* @__PURE__ */
|
|
1204
|
-
/* @__PURE__ */
|
|
1205
|
-
/* @__PURE__ */
|
|
1265
|
+
children: /* @__PURE__ */ jsxs17("div", { className: "container-input", children: [
|
|
1266
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
1267
|
+
/* @__PURE__ */ jsx21("span", { className: "body-1", children: label }),
|
|
1206
1268
|
" ",
|
|
1207
|
-
required && /* @__PURE__ */
|
|
1269
|
+
required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "*" })
|
|
1208
1270
|
] }),
|
|
1209
|
-
/* @__PURE__ */
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
] })
|
|
1271
|
+
/* @__PURE__ */ jsxs17(Space.Compact, { children: [
|
|
1272
|
+
statickey && /* @__PURE__ */ jsx21("span", { className: "items-center flex px-2 bg-gray-300 rounded-l-md body-1", children: statickey }),
|
|
1273
|
+
/* @__PURE__ */ jsx21(
|
|
1274
|
+
Input2,
|
|
1275
|
+
{
|
|
1276
|
+
value,
|
|
1277
|
+
placeholder,
|
|
1278
|
+
disabled,
|
|
1279
|
+
className: `body-1 w-full ${className ?? ""}`,
|
|
1280
|
+
onChange: (e) => onChange(e.target.value || void 0),
|
|
1281
|
+
allowClear: true,
|
|
1282
|
+
addonBefore,
|
|
1283
|
+
addonAfter,
|
|
1284
|
+
defaultValue,
|
|
1285
|
+
onClear
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1288
|
+
] }),
|
|
1289
|
+
error && /* @__PURE__ */ jsx21("p", { className: "text-red-500 caption-1", children: error })
|
|
1229
1290
|
] })
|
|
1230
1291
|
}
|
|
1231
1292
|
);
|
|
@@ -1233,12 +1294,12 @@ function InputField({
|
|
|
1233
1294
|
|
|
1234
1295
|
// src/Input/InputFieldNumber/InputFieldNumber.tsx
|
|
1235
1296
|
import { ConfigProvider as ConfigProvider4, InputNumber } from "antd";
|
|
1236
|
-
import { jsx as
|
|
1297
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1237
1298
|
function InputFieldNumber({
|
|
1238
1299
|
value,
|
|
1239
1300
|
onChange,
|
|
1240
1301
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
1241
|
-
|
|
1302
|
+
label,
|
|
1242
1303
|
required,
|
|
1243
1304
|
disabled,
|
|
1244
1305
|
error,
|
|
@@ -1254,7 +1315,7 @@ function InputFieldNumber({
|
|
|
1254
1315
|
formatter,
|
|
1255
1316
|
parser
|
|
1256
1317
|
}) {
|
|
1257
|
-
return /* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ jsx22(
|
|
1258
1319
|
ConfigProvider4,
|
|
1259
1320
|
{
|
|
1260
1321
|
theme: {
|
|
@@ -1262,20 +1323,20 @@ function InputFieldNumber({
|
|
|
1262
1323
|
fontFamily: "Kanit"
|
|
1263
1324
|
}
|
|
1264
1325
|
},
|
|
1265
|
-
children: /* @__PURE__ */
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
/* @__PURE__ */
|
|
1326
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "container-input", children: [
|
|
1327
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
1328
|
+
/* @__PURE__ */ jsx22("span", { className: "body-1", children: label }),
|
|
1268
1329
|
" ",
|
|
1269
|
-
required && /* @__PURE__ */
|
|
1330
|
+
required && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
|
|
1270
1331
|
] }),
|
|
1271
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ jsx22(
|
|
1272
1333
|
InputNumber,
|
|
1273
1334
|
{
|
|
1274
1335
|
value: value ?? void 0,
|
|
1275
1336
|
onChange: (val) => onChange(val),
|
|
1276
1337
|
placeholder,
|
|
1277
1338
|
disabled,
|
|
1278
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1339
|
+
className: `body-1 !w-full ${className ?? ""}`,
|
|
1279
1340
|
addonBefore,
|
|
1280
1341
|
addonAfter,
|
|
1281
1342
|
defaultValue,
|
|
@@ -1288,7 +1349,7 @@ function InputFieldNumber({
|
|
|
1288
1349
|
parser
|
|
1289
1350
|
}
|
|
1290
1351
|
),
|
|
1291
|
-
error && /* @__PURE__ */
|
|
1352
|
+
error && /* @__PURE__ */ jsx22("p", { className: "text-red-500 caption-1", children: error })
|
|
1292
1353
|
] })
|
|
1293
1354
|
}
|
|
1294
1355
|
);
|
|
@@ -1297,15 +1358,19 @@ function InputFieldNumber({
|
|
|
1297
1358
|
// src/DatePicker/DatePickerBasic/DatePickerBasic.tsx
|
|
1298
1359
|
var import_dayjs = __toESM(require_dayjs_min());
|
|
1299
1360
|
var import_th2 = __toESM(require_th());
|
|
1361
|
+
var import_buddhistEra = __toESM(require_buddhistEra());
|
|
1300
1362
|
import { ConfigProvider as ConfigProvider5, DatePicker } from "antd";
|
|
1363
|
+
import th from "antd/es/date-picker/locale/th_TH";
|
|
1301
1364
|
import thTH from "antd/locale/th_TH";
|
|
1302
|
-
import {
|
|
1365
|
+
import { th as thFns } from "date-fns/locale";
|
|
1366
|
+
import { format } from "date-fns";
|
|
1367
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1368
|
+
import_dayjs.default.extend(import_buddhistEra.default);
|
|
1303
1369
|
function DatePickerBasic({
|
|
1304
1370
|
value,
|
|
1305
1371
|
onChange,
|
|
1306
1372
|
required,
|
|
1307
|
-
|
|
1308
|
-
bottomText,
|
|
1373
|
+
label,
|
|
1309
1374
|
error,
|
|
1310
1375
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
|
|
1311
1376
|
disabled,
|
|
@@ -1318,7 +1383,17 @@ function DatePickerBasic({
|
|
|
1318
1383
|
}) {
|
|
1319
1384
|
const dateFormat = "DD/MM/YYYY";
|
|
1320
1385
|
import_dayjs.default.locale("th_TH");
|
|
1321
|
-
|
|
1386
|
+
const buddhistLocale = {
|
|
1387
|
+
...th,
|
|
1388
|
+
lang: {
|
|
1389
|
+
...th.lang,
|
|
1390
|
+
fieldDateFormat: "BBBB-MM-DD",
|
|
1391
|
+
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1392
|
+
yearFormat: "BBBB",
|
|
1393
|
+
cellYearFormat: "BBBB"
|
|
1394
|
+
}
|
|
1395
|
+
};
|
|
1396
|
+
return /* @__PURE__ */ jsx23(
|
|
1322
1397
|
ConfigProvider5,
|
|
1323
1398
|
{
|
|
1324
1399
|
locale: thTH,
|
|
@@ -1328,13 +1403,13 @@ function DatePickerBasic({
|
|
|
1328
1403
|
fontSize: 16
|
|
1329
1404
|
}
|
|
1330
1405
|
},
|
|
1331
|
-
children: /* @__PURE__ */
|
|
1332
|
-
/* @__PURE__ */
|
|
1333
|
-
/* @__PURE__ */
|
|
1406
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
1407
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1408
|
+
/* @__PURE__ */ jsx23("span", { className: "body-1", children: label }),
|
|
1334
1409
|
" ",
|
|
1335
|
-
required && /* @__PURE__ */
|
|
1410
|
+
required && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
|
|
1336
1411
|
] }),
|
|
1337
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ jsx23(
|
|
1338
1413
|
DatePicker,
|
|
1339
1414
|
{
|
|
1340
1415
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -1343,19 +1418,19 @@ function DatePickerBasic({
|
|
|
1343
1418
|
onChange,
|
|
1344
1419
|
allowClear: true,
|
|
1345
1420
|
disabled,
|
|
1346
|
-
format:
|
|
1421
|
+
format: (date) => date ? format(date.toDate(), "dd/MM/yyyy", { locale: thFns }).replace(
|
|
1422
|
+
/\d{4}$/,
|
|
1423
|
+
(y) => String(parseInt(y) + 543)
|
|
1424
|
+
) : "",
|
|
1347
1425
|
defaultValue,
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
size
|
|
1426
|
+
disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
|
|
1427
|
+
minDate: minDate ? (0, import_dayjs.default)(minDate) : void 0,
|
|
1428
|
+
maxDate: maxDate ? (0, import_dayjs.default)(maxDate) : void 0,
|
|
1429
|
+
size,
|
|
1430
|
+
locale: buddhistLocale
|
|
1352
1431
|
}
|
|
1353
1432
|
),
|
|
1354
|
-
/* @__PURE__ */
|
|
1355
|
-
/* @__PURE__ */ jsx22("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1356
|
-
" ",
|
|
1357
|
-
error && /* @__PURE__ */ jsx22("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1358
|
-
] })
|
|
1433
|
+
error && /* @__PURE__ */ jsx23("p", { className: "text-red-500 caption-1", children: error })
|
|
1359
1434
|
] })
|
|
1360
1435
|
}
|
|
1361
1436
|
);
|
|
@@ -1367,15 +1442,17 @@ var import_customParseFormat = __toESM(require_customParseFormat());
|
|
|
1367
1442
|
var import_dayjs2 = __toESM(require_dayjs_min());
|
|
1368
1443
|
import { ConfigProvider as ConfigProvider6, DatePicker as DatePicker2 } from "antd";
|
|
1369
1444
|
import thTH2 from "antd/locale/th_TH";
|
|
1370
|
-
import
|
|
1445
|
+
import th2 from "antd/es/date-picker/locale/th_TH";
|
|
1446
|
+
import { format as format2 } from "date-fns";
|
|
1447
|
+
import { th as thFns2 } from "date-fns/locale";
|
|
1448
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1371
1449
|
import_dayjs2.default.extend(import_customParseFormat.default);
|
|
1372
1450
|
function DatePickerRangePicker({
|
|
1373
1451
|
value,
|
|
1374
1452
|
onChange,
|
|
1375
1453
|
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1376
|
-
|
|
1454
|
+
label,
|
|
1377
1455
|
required,
|
|
1378
|
-
bottomText,
|
|
1379
1456
|
error,
|
|
1380
1457
|
disabled,
|
|
1381
1458
|
minDate,
|
|
@@ -1388,7 +1465,17 @@ function DatePickerRangePicker({
|
|
|
1388
1465
|
}) {
|
|
1389
1466
|
const dateFormat = "DD/MM/YYYY";
|
|
1390
1467
|
import_dayjs2.default.locale("th_TH");
|
|
1391
|
-
|
|
1468
|
+
const buddhistLocale = {
|
|
1469
|
+
...th2,
|
|
1470
|
+
lang: {
|
|
1471
|
+
...th2.lang,
|
|
1472
|
+
fieldDateFormat: "BBBB-MM-DD",
|
|
1473
|
+
fieldDateTimeFormat: "BBBB-MM-DD HH:mm:ss",
|
|
1474
|
+
yearFormat: "BBBB",
|
|
1475
|
+
cellYearFormat: "BBBB"
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
return /* @__PURE__ */ jsx24(
|
|
1392
1479
|
ConfigProvider6,
|
|
1393
1480
|
{
|
|
1394
1481
|
locale: thTH2,
|
|
@@ -1398,135 +1485,156 @@ function DatePickerRangePicker({
|
|
|
1398
1485
|
fontSize: 16
|
|
1399
1486
|
}
|
|
1400
1487
|
},
|
|
1401
|
-
children: /* @__PURE__ */
|
|
1402
|
-
/* @__PURE__ */
|
|
1403
|
-
/* @__PURE__ */
|
|
1488
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
1489
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1490
|
+
/* @__PURE__ */ jsx24("span", { className: "body-1", children: label }),
|
|
1404
1491
|
" ",
|
|
1405
|
-
required && /* @__PURE__ */
|
|
1492
|
+
required && /* @__PURE__ */ jsx24("span", { className: "text-red-500", children: "*" })
|
|
1406
1493
|
] }),
|
|
1407
|
-
/* @__PURE__ */
|
|
1494
|
+
/* @__PURE__ */ jsx24(
|
|
1408
1495
|
DatePicker2.RangePicker,
|
|
1409
1496
|
{
|
|
1410
|
-
format:
|
|
1411
|
-
|
|
1497
|
+
format: (date) => date ? format2(date.toDate(), "dd/MM/yyyy", { locale: thFns2 }).replace(
|
|
1498
|
+
/\d{4}$/,
|
|
1499
|
+
(y) => String(parseInt(y) + 543)
|
|
1500
|
+
) : "",
|
|
1501
|
+
value: value ? [value[0] ? (0, import_dayjs2.default)(value[0]) : null, value[1] ? (0, import_dayjs2.default)(value[1]) : null] : null,
|
|
1412
1502
|
placeholder,
|
|
1413
1503
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1414
|
-
onChange,
|
|
1504
|
+
onChange: (dates, dateStrings) => {
|
|
1505
|
+
if (!dates) {
|
|
1506
|
+
onChange(null);
|
|
1507
|
+
} else {
|
|
1508
|
+
onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1415
1511
|
allowClear: true,
|
|
1416
1512
|
disabled,
|
|
1417
|
-
minDate,
|
|
1418
|
-
maxDate,
|
|
1419
|
-
disabledDate,
|
|
1513
|
+
minDate: minDate ? (0, import_dayjs2.default)(minDate) : void 0,
|
|
1514
|
+
maxDate: maxDate ? (0, import_dayjs2.default)(maxDate) : void 0,
|
|
1515
|
+
disabledDate: (d) => disabledDate ? disabledDate(d.toDate()) : false,
|
|
1420
1516
|
size,
|
|
1421
1517
|
onOpenChange,
|
|
1422
|
-
onCalendarChange
|
|
1518
|
+
onCalendarChange: (dates, dateStrings, info) => {
|
|
1519
|
+
if (!dates) {
|
|
1520
|
+
onCalendarChange?.([null, null], dateStrings, info);
|
|
1521
|
+
} else {
|
|
1522
|
+
onCalendarChange?.(
|
|
1523
|
+
[dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null],
|
|
1524
|
+
dateStrings,
|
|
1525
|
+
info
|
|
1526
|
+
);
|
|
1527
|
+
}
|
|
1528
|
+
},
|
|
1529
|
+
locale: buddhistLocale
|
|
1423
1530
|
}
|
|
1424
1531
|
),
|
|
1425
|
-
/* @__PURE__ */
|
|
1426
|
-
/* @__PURE__ */ jsx23("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1427
|
-
" ",
|
|
1428
|
-
error && /* @__PURE__ */ jsx23("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1429
|
-
] })
|
|
1532
|
+
error && /* @__PURE__ */ jsx24("p", { className: "text-red-500 caption-1", children: error })
|
|
1430
1533
|
] })
|
|
1431
1534
|
}
|
|
1432
1535
|
);
|
|
1433
1536
|
}
|
|
1434
1537
|
|
|
1435
1538
|
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1539
|
+
var import_dayjs3 = __toESM(require_dayjs_min());
|
|
1436
1540
|
import { ConfigProvider as ConfigProvider7, TimePicker } from "antd";
|
|
1437
|
-
import
|
|
1541
|
+
import thTH3 from "antd/locale/th_TH";
|
|
1542
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1438
1543
|
function TimePickerBasic({
|
|
1439
1544
|
value,
|
|
1440
1545
|
onChange,
|
|
1441
1546
|
required,
|
|
1442
|
-
|
|
1443
|
-
bottomText,
|
|
1547
|
+
label,
|
|
1444
1548
|
error,
|
|
1445
1549
|
placeholder,
|
|
1446
1550
|
disabled,
|
|
1447
1551
|
className
|
|
1448
1552
|
}) {
|
|
1449
|
-
return /* @__PURE__ */
|
|
1553
|
+
return /* @__PURE__ */ jsx25(
|
|
1450
1554
|
ConfigProvider7,
|
|
1451
1555
|
{
|
|
1556
|
+
locale: thTH3,
|
|
1452
1557
|
theme: {
|
|
1453
1558
|
token: {
|
|
1454
1559
|
fontFamily: "Kanit"
|
|
1455
1560
|
}
|
|
1456
1561
|
},
|
|
1457
|
-
children: /* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1459
|
-
/* @__PURE__ */
|
|
1562
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
1563
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
1564
|
+
/* @__PURE__ */ jsx25("span", { className: "body-1", children: label }),
|
|
1460
1565
|
" ",
|
|
1461
|
-
required && /* @__PURE__ */
|
|
1566
|
+
required && /* @__PURE__ */ jsx25("span", { className: "text-red-500", children: "*" })
|
|
1462
1567
|
] }),
|
|
1463
|
-
/* @__PURE__ */
|
|
1568
|
+
/* @__PURE__ */ jsx25(
|
|
1464
1569
|
TimePicker,
|
|
1465
1570
|
{
|
|
1466
1571
|
format: "HH:mm",
|
|
1467
1572
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1468
|
-
value,
|
|
1573
|
+
value: value ? (0, import_dayjs3.default)(value) : null,
|
|
1469
1574
|
placeholder,
|
|
1470
|
-
onChange
|
|
1575
|
+
onChange: (time) => {
|
|
1576
|
+
onChange(time ? time.toDate() : null);
|
|
1577
|
+
},
|
|
1471
1578
|
allowClear: true,
|
|
1472
1579
|
disabled
|
|
1473
1580
|
}
|
|
1474
1581
|
),
|
|
1475
|
-
/* @__PURE__ */
|
|
1476
|
-
/* @__PURE__ */ jsx24("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1477
|
-
" ",
|
|
1478
|
-
error && /* @__PURE__ */ jsx24("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1479
|
-
] })
|
|
1582
|
+
error && /* @__PURE__ */ jsx25("p", { className: "text-red-500 caption-1", children: error })
|
|
1480
1583
|
] })
|
|
1481
1584
|
}
|
|
1482
1585
|
);
|
|
1483
1586
|
}
|
|
1484
1587
|
|
|
1485
1588
|
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1589
|
+
var import_dayjs4 = __toESM(require_dayjs_min());
|
|
1486
1590
|
import { ConfigProvider as ConfigProvider8, TimePicker as TimePicker2 } from "antd";
|
|
1487
|
-
import
|
|
1591
|
+
import thTH4 from "antd/locale/th_TH";
|
|
1592
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1488
1593
|
function TimePickerRangePicker({
|
|
1489
1594
|
value,
|
|
1490
1595
|
onChange,
|
|
1491
1596
|
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1492
|
-
|
|
1597
|
+
label,
|
|
1493
1598
|
required,
|
|
1494
|
-
bottomText,
|
|
1495
1599
|
error,
|
|
1496
1600
|
disabled,
|
|
1497
1601
|
className
|
|
1498
1602
|
}) {
|
|
1499
|
-
return /* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ jsx26(
|
|
1500
1604
|
ConfigProvider8,
|
|
1501
1605
|
{
|
|
1606
|
+
locale: thTH4,
|
|
1502
1607
|
theme: {
|
|
1503
1608
|
token: {
|
|
1504
1609
|
fontFamily: "Kanit"
|
|
1505
1610
|
}
|
|
1506
1611
|
},
|
|
1507
|
-
children: /* @__PURE__ */
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1612
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
1613
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
1614
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: label }),
|
|
1510
1615
|
" ",
|
|
1511
|
-
required && /* @__PURE__ */
|
|
1616
|
+
required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
1512
1617
|
] }),
|
|
1513
|
-
/* @__PURE__ */
|
|
1618
|
+
/* @__PURE__ */ jsx26(
|
|
1514
1619
|
TimePicker2.RangePicker,
|
|
1515
1620
|
{
|
|
1516
1621
|
format: "HH:mm",
|
|
1517
|
-
value,
|
|
1622
|
+
value: value ? [value[0] ? (0, import_dayjs4.default)(value[0]) : null, value[1] ? (0, import_dayjs4.default)(value[1]) : null] : null,
|
|
1518
1623
|
placeholder,
|
|
1519
1624
|
className: `body-1 w-full ${className ?? ""}`,
|
|
1520
|
-
onChange,
|
|
1625
|
+
onChange: (dates, dateStrings) => {
|
|
1626
|
+
if (!dates) {
|
|
1627
|
+
onChange(null);
|
|
1628
|
+
} else {
|
|
1629
|
+
onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1521
1632
|
allowClear: true,
|
|
1522
|
-
disabled
|
|
1633
|
+
disabled,
|
|
1634
|
+
showNow: true
|
|
1523
1635
|
}
|
|
1524
1636
|
),
|
|
1525
|
-
/* @__PURE__ */
|
|
1526
|
-
/* @__PURE__ */ jsx25("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1527
|
-
" ",
|
|
1528
|
-
error && /* @__PURE__ */ jsx25("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1529
|
-
] })
|
|
1637
|
+
error && /* @__PURE__ */ jsx26("p", { className: "text-red-500 caption-1", children: error })
|
|
1530
1638
|
] })
|
|
1531
1639
|
}
|
|
1532
1640
|
);
|
|
@@ -1534,13 +1642,12 @@ function TimePickerRangePicker({
|
|
|
1534
1642
|
|
|
1535
1643
|
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1536
1644
|
import { ConfigProvider as ConfigProvider9, ColorPicker } from "antd";
|
|
1537
|
-
import { jsx as
|
|
1645
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1538
1646
|
function ColorPickerBasic({
|
|
1539
1647
|
value,
|
|
1540
1648
|
onChange,
|
|
1541
1649
|
required,
|
|
1542
|
-
|
|
1543
|
-
bottomText,
|
|
1650
|
+
label,
|
|
1544
1651
|
error,
|
|
1545
1652
|
disabled,
|
|
1546
1653
|
allowClear,
|
|
@@ -1548,7 +1655,7 @@ function ColorPickerBasic({
|
|
|
1548
1655
|
className,
|
|
1549
1656
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1550
1657
|
}) {
|
|
1551
|
-
return /* @__PURE__ */
|
|
1658
|
+
return /* @__PURE__ */ jsx27(
|
|
1552
1659
|
ConfigProvider9,
|
|
1553
1660
|
{
|
|
1554
1661
|
theme: {
|
|
@@ -1557,13 +1664,13 @@ function ColorPickerBasic({
|
|
|
1557
1664
|
fontSize: 16
|
|
1558
1665
|
}
|
|
1559
1666
|
},
|
|
1560
|
-
children: /* @__PURE__ */
|
|
1561
|
-
/* @__PURE__ */
|
|
1562
|
-
/* @__PURE__ */
|
|
1667
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
1668
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
1669
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: label }),
|
|
1563
1670
|
" ",
|
|
1564
|
-
required && /* @__PURE__ */
|
|
1671
|
+
required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
1565
1672
|
] }),
|
|
1566
|
-
/* @__PURE__ */
|
|
1673
|
+
/* @__PURE__ */ jsx27(
|
|
1567
1674
|
ColorPicker,
|
|
1568
1675
|
{
|
|
1569
1676
|
defaultFormat,
|
|
@@ -1575,9 +1682,9 @@ function ColorPickerBasic({
|
|
|
1575
1682
|
showText: (color) => {
|
|
1576
1683
|
const hex = color.toHexString();
|
|
1577
1684
|
if (!value) {
|
|
1578
|
-
return /* @__PURE__ */
|
|
1685
|
+
return /* @__PURE__ */ jsx27("span", { children: placeholder });
|
|
1579
1686
|
}
|
|
1580
|
-
return /* @__PURE__ */
|
|
1687
|
+
return /* @__PURE__ */ jsxs23("span", { children: [
|
|
1581
1688
|
"(",
|
|
1582
1689
|
hex,
|
|
1583
1690
|
")"
|
|
@@ -1586,11 +1693,7 @@ function ColorPickerBasic({
|
|
|
1586
1693
|
disabled
|
|
1587
1694
|
}
|
|
1588
1695
|
),
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
/* @__PURE__ */ jsx26("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
1591
|
-
" ",
|
|
1592
|
-
error && /* @__PURE__ */ jsx26("p", { className: "caption-1 text-red-500 ", children: error })
|
|
1593
|
-
] })
|
|
1696
|
+
error && /* @__PURE__ */ jsx27("p", { className: "text-red-500 caption-1", children: error })
|
|
1594
1697
|
] })
|
|
1595
1698
|
}
|
|
1596
1699
|
);
|
|
@@ -2299,7 +2402,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2299
2402
|
greyDark.primary = greyDark[5];
|
|
2300
2403
|
|
|
2301
2404
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2302
|
-
import { jsx as
|
|
2405
|
+
import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2303
2406
|
function genPresets(presets = presetPalettes) {
|
|
2304
2407
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2305
2408
|
label,
|
|
@@ -2311,8 +2414,7 @@ function ColorPalettePickerBasic({
|
|
|
2311
2414
|
value,
|
|
2312
2415
|
onChange,
|
|
2313
2416
|
required,
|
|
2314
|
-
|
|
2315
|
-
bottomText,
|
|
2417
|
+
label,
|
|
2316
2418
|
error,
|
|
2317
2419
|
disabled,
|
|
2318
2420
|
allowClear,
|
|
@@ -2327,7 +2429,7 @@ function ColorPalettePickerBasic({
|
|
|
2327
2429
|
red,
|
|
2328
2430
|
green
|
|
2329
2431
|
});
|
|
2330
|
-
return /* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ jsx28(
|
|
2331
2433
|
ConfigProvider10,
|
|
2332
2434
|
{
|
|
2333
2435
|
theme: {
|
|
@@ -2336,13 +2438,13 @@ function ColorPalettePickerBasic({
|
|
|
2336
2438
|
fontSize: 16
|
|
2337
2439
|
}
|
|
2338
2440
|
},
|
|
2339
|
-
children: /* @__PURE__ */
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
/* @__PURE__ */
|
|
2441
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
2442
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
2443
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: label }),
|
|
2342
2444
|
" ",
|
|
2343
|
-
required && /* @__PURE__ */
|
|
2445
|
+
required && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
2344
2446
|
] }),
|
|
2345
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ jsx28(
|
|
2346
2448
|
ColorPicker2,
|
|
2347
2449
|
{
|
|
2348
2450
|
defaultFormat,
|
|
@@ -2355,9 +2457,9 @@ function ColorPalettePickerBasic({
|
|
|
2355
2457
|
showText: (color) => {
|
|
2356
2458
|
const hex = color.toHexString();
|
|
2357
2459
|
if (!value) {
|
|
2358
|
-
return /* @__PURE__ */
|
|
2460
|
+
return /* @__PURE__ */ jsx28("span", { children: placeholder });
|
|
2359
2461
|
}
|
|
2360
|
-
return /* @__PURE__ */
|
|
2462
|
+
return /* @__PURE__ */ jsxs24("span", { children: [
|
|
2361
2463
|
"(",
|
|
2362
2464
|
hex,
|
|
2363
2465
|
")"
|
|
@@ -2367,11 +2469,7 @@ function ColorPalettePickerBasic({
|
|
|
2367
2469
|
onClear
|
|
2368
2470
|
}
|
|
2369
2471
|
),
|
|
2370
|
-
/* @__PURE__ */
|
|
2371
|
-
/* @__PURE__ */ jsx27("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2372
|
-
" ",
|
|
2373
|
-
error && /* @__PURE__ */ jsx27("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2374
|
-
] })
|
|
2472
|
+
error && /* @__PURE__ */ jsx28("p", { className: "text-red-500 caption-1", children: error })
|
|
2375
2473
|
] })
|
|
2376
2474
|
}
|
|
2377
2475
|
);
|
|
@@ -2379,14 +2477,13 @@ function ColorPalettePickerBasic({
|
|
|
2379
2477
|
|
|
2380
2478
|
// src/Select/SelectField/SelectField.tsx
|
|
2381
2479
|
import { Select, ConfigProvider as ConfigProvider11 } from "antd";
|
|
2382
|
-
import { jsx as
|
|
2480
|
+
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2383
2481
|
function SelectField({
|
|
2384
2482
|
value,
|
|
2385
2483
|
onChange,
|
|
2386
2484
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2387
|
-
|
|
2485
|
+
label,
|
|
2388
2486
|
required,
|
|
2389
|
-
bottomText,
|
|
2390
2487
|
error,
|
|
2391
2488
|
disabled,
|
|
2392
2489
|
defaultValue,
|
|
@@ -2398,7 +2495,7 @@ function SelectField({
|
|
|
2398
2495
|
className,
|
|
2399
2496
|
onClear
|
|
2400
2497
|
}) {
|
|
2401
|
-
return /* @__PURE__ */
|
|
2498
|
+
return /* @__PURE__ */ jsx29(
|
|
2402
2499
|
ConfigProvider11,
|
|
2403
2500
|
{
|
|
2404
2501
|
theme: {
|
|
@@ -2407,13 +2504,13 @@ function SelectField({
|
|
|
2407
2504
|
fontSize: 16
|
|
2408
2505
|
}
|
|
2409
2506
|
},
|
|
2410
|
-
children: /* @__PURE__ */
|
|
2411
|
-
/* @__PURE__ */
|
|
2412
|
-
/* @__PURE__ */
|
|
2507
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
2508
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2509
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: label }),
|
|
2413
2510
|
" ",
|
|
2414
|
-
required && /* @__PURE__ */
|
|
2511
|
+
required && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
2415
2512
|
] }),
|
|
2416
|
-
/* @__PURE__ */
|
|
2513
|
+
/* @__PURE__ */ jsx29(
|
|
2417
2514
|
Select,
|
|
2418
2515
|
{
|
|
2419
2516
|
showSearch: true,
|
|
@@ -2428,7 +2525,7 @@ function SelectField({
|
|
|
2428
2525
|
options,
|
|
2429
2526
|
mode,
|
|
2430
2527
|
onSearch: handleSearch,
|
|
2431
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2528
|
+
prefix: prefix ? /* @__PURE__ */ jsx29(
|
|
2432
2529
|
"span",
|
|
2433
2530
|
{
|
|
2434
2531
|
style: {
|
|
@@ -2445,11 +2542,7 @@ function SelectField({
|
|
|
2445
2542
|
onClear
|
|
2446
2543
|
}
|
|
2447
2544
|
),
|
|
2448
|
-
/* @__PURE__ */
|
|
2449
|
-
/* @__PURE__ */ jsx28("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2450
|
-
" ",
|
|
2451
|
-
error && /* @__PURE__ */ jsx28("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2452
|
-
] })
|
|
2545
|
+
error && /* @__PURE__ */ jsx29("p", { className: "text-red-500 caption-1", children: error })
|
|
2453
2546
|
] })
|
|
2454
2547
|
}
|
|
2455
2548
|
);
|
|
@@ -2457,14 +2550,13 @@ function SelectField({
|
|
|
2457
2550
|
|
|
2458
2551
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2459
2552
|
import { Select as Select2, ConfigProvider as ConfigProvider12 } from "antd";
|
|
2460
|
-
import { jsx as
|
|
2553
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2461
2554
|
function SelectFieldGroup({
|
|
2462
2555
|
value,
|
|
2463
2556
|
onChange,
|
|
2464
2557
|
placeholder = "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
2465
|
-
|
|
2558
|
+
label,
|
|
2466
2559
|
required,
|
|
2467
|
-
bottomText,
|
|
2468
2560
|
error,
|
|
2469
2561
|
disabled,
|
|
2470
2562
|
defaultValue,
|
|
@@ -2475,7 +2567,7 @@ function SelectFieldGroup({
|
|
|
2475
2567
|
handleSearch,
|
|
2476
2568
|
className
|
|
2477
2569
|
}) {
|
|
2478
|
-
return /* @__PURE__ */
|
|
2570
|
+
return /* @__PURE__ */ jsx30(
|
|
2479
2571
|
ConfigProvider12,
|
|
2480
2572
|
{
|
|
2481
2573
|
theme: {
|
|
@@ -2483,13 +2575,13 @@ function SelectFieldGroup({
|
|
|
2483
2575
|
fontFamily: "Kanit"
|
|
2484
2576
|
}
|
|
2485
2577
|
},
|
|
2486
|
-
children: /* @__PURE__ */
|
|
2487
|
-
/* @__PURE__ */
|
|
2488
|
-
/* @__PURE__ */
|
|
2578
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
|
|
2579
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
2580
|
+
/* @__PURE__ */ jsx30("span", { className: "body-1", children: label }),
|
|
2489
2581
|
" ",
|
|
2490
|
-
required && /* @__PURE__ */
|
|
2582
|
+
required && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
|
|
2491
2583
|
] }),
|
|
2492
|
-
/* @__PURE__ */
|
|
2584
|
+
/* @__PURE__ */ jsx30(
|
|
2493
2585
|
Select2,
|
|
2494
2586
|
{
|
|
2495
2587
|
showSearch: true,
|
|
@@ -2504,7 +2596,7 @@ function SelectFieldGroup({
|
|
|
2504
2596
|
options,
|
|
2505
2597
|
mode,
|
|
2506
2598
|
onSearch: handleSearch,
|
|
2507
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2599
|
+
prefix: prefix ? /* @__PURE__ */ jsx30(
|
|
2508
2600
|
"span",
|
|
2509
2601
|
{
|
|
2510
2602
|
style: {
|
|
@@ -2520,11 +2612,7 @@ function SelectFieldGroup({
|
|
|
2520
2612
|
allowClear: true
|
|
2521
2613
|
}
|
|
2522
2614
|
),
|
|
2523
|
-
/* @__PURE__ */
|
|
2524
|
-
/* @__PURE__ */ jsx29("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2525
|
-
" ",
|
|
2526
|
-
error && /* @__PURE__ */ jsx29("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2527
|
-
] })
|
|
2615
|
+
error && /* @__PURE__ */ jsx30("p", { className: "text-red-500 caption-1", children: error })
|
|
2528
2616
|
] })
|
|
2529
2617
|
}
|
|
2530
2618
|
);
|
|
@@ -2544,21 +2632,20 @@ var status = [
|
|
|
2544
2632
|
|
|
2545
2633
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2546
2634
|
import { DownOutlined } from "@ant-design/icons";
|
|
2547
|
-
import { jsx as
|
|
2635
|
+
import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2548
2636
|
function SelectFieldStatus({
|
|
2549
2637
|
value,
|
|
2550
2638
|
onChange,
|
|
2551
2639
|
placeholder,
|
|
2552
|
-
|
|
2640
|
+
label,
|
|
2553
2641
|
required,
|
|
2554
|
-
bottomText,
|
|
2555
2642
|
disabled,
|
|
2556
2643
|
error,
|
|
2557
2644
|
options,
|
|
2558
2645
|
className
|
|
2559
2646
|
}) {
|
|
2560
2647
|
const selectedItem = status.find((s) => s.value === value);
|
|
2561
|
-
return /* @__PURE__ */
|
|
2648
|
+
return /* @__PURE__ */ jsx31(
|
|
2562
2649
|
ConfigProvider13,
|
|
2563
2650
|
{
|
|
2564
2651
|
theme: {
|
|
@@ -2574,17 +2661,17 @@ function SelectFieldStatus({
|
|
|
2574
2661
|
fontFamily: "Kanit"
|
|
2575
2662
|
}
|
|
2576
2663
|
},
|
|
2577
|
-
children: /* @__PURE__ */
|
|
2578
|
-
/* @__PURE__ */
|
|
2579
|
-
/* @__PURE__ */
|
|
2664
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "container-input", children: [
|
|
2665
|
+
/* @__PURE__ */ jsxs27("div", { children: [
|
|
2666
|
+
/* @__PURE__ */ jsx31("span", { className: "body-1", children: label }),
|
|
2580
2667
|
" ",
|
|
2581
|
-
required && /* @__PURE__ */
|
|
2668
|
+
required && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
|
|
2582
2669
|
] }),
|
|
2583
|
-
/* @__PURE__ */
|
|
2670
|
+
/* @__PURE__ */ jsx31(
|
|
2584
2671
|
Select3,
|
|
2585
2672
|
{
|
|
2586
2673
|
disabled,
|
|
2587
|
-
suffixIcon: /* @__PURE__ */
|
|
2674
|
+
suffixIcon: /* @__PURE__ */ jsx31(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2588
2675
|
value,
|
|
2589
2676
|
onChange,
|
|
2590
2677
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2595,11 +2682,7 @@ function SelectFieldStatus({
|
|
|
2595
2682
|
showSearch: true
|
|
2596
2683
|
}
|
|
2597
2684
|
),
|
|
2598
|
-
/* @__PURE__ */
|
|
2599
|
-
/* @__PURE__ */ jsx30("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2600
|
-
" ",
|
|
2601
|
-
error && /* @__PURE__ */ jsx30("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2602
|
-
] })
|
|
2685
|
+
error && /* @__PURE__ */ jsx31("p", { className: "text-red-500 caption-1", children: error })
|
|
2603
2686
|
] })
|
|
2604
2687
|
}
|
|
2605
2688
|
);
|
|
@@ -2616,21 +2699,20 @@ var status2 = [
|
|
|
2616
2699
|
|
|
2617
2700
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2618
2701
|
import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
|
|
2619
|
-
import { jsx as
|
|
2702
|
+
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2620
2703
|
function SelectFieldStatusReport({
|
|
2621
2704
|
value,
|
|
2622
2705
|
onChange,
|
|
2623
2706
|
placeholder,
|
|
2624
|
-
|
|
2707
|
+
label,
|
|
2625
2708
|
required,
|
|
2626
|
-
bottomText,
|
|
2627
2709
|
disabled,
|
|
2628
2710
|
error,
|
|
2629
2711
|
className,
|
|
2630
2712
|
options
|
|
2631
2713
|
}) {
|
|
2632
2714
|
const selectedItem = status2.find((s) => s.value === value);
|
|
2633
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ jsx32(
|
|
2634
2716
|
ConfigProvider14,
|
|
2635
2717
|
{
|
|
2636
2718
|
theme: {
|
|
@@ -2646,17 +2728,17 @@ function SelectFieldStatusReport({
|
|
|
2646
2728
|
fontFamily: "Kanit"
|
|
2647
2729
|
}
|
|
2648
2730
|
},
|
|
2649
|
-
children: /* @__PURE__ */
|
|
2650
|
-
/* @__PURE__ */
|
|
2651
|
-
/* @__PURE__ */
|
|
2731
|
+
children: /* @__PURE__ */ jsxs28("div", { className: "container-input", children: [
|
|
2732
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
2733
|
+
/* @__PURE__ */ jsx32("span", { className: "body-1", children: label }),
|
|
2652
2734
|
" ",
|
|
2653
|
-
required && /* @__PURE__ */
|
|
2735
|
+
required && /* @__PURE__ */ jsx32("span", { className: "text-red-500", children: "*" })
|
|
2654
2736
|
] }),
|
|
2655
|
-
/* @__PURE__ */
|
|
2737
|
+
/* @__PURE__ */ jsx32(
|
|
2656
2738
|
Select4,
|
|
2657
2739
|
{
|
|
2658
2740
|
disabled,
|
|
2659
|
-
suffixIcon: /* @__PURE__ */
|
|
2741
|
+
suffixIcon: /* @__PURE__ */ jsx32(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2660
2742
|
value,
|
|
2661
2743
|
onChange,
|
|
2662
2744
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2667,11 +2749,7 @@ function SelectFieldStatusReport({
|
|
|
2667
2749
|
showSearch: true
|
|
2668
2750
|
}
|
|
2669
2751
|
),
|
|
2670
|
-
/* @__PURE__ */
|
|
2671
|
-
/* @__PURE__ */ jsx31("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2672
|
-
" ",
|
|
2673
|
-
error && /* @__PURE__ */ jsx31("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2674
|
-
] })
|
|
2752
|
+
error && /* @__PURE__ */ jsx32("p", { className: "text-red-500 caption-1", children: error })
|
|
2675
2753
|
] })
|
|
2676
2754
|
}
|
|
2677
2755
|
);
|
|
@@ -2680,11 +2758,10 @@ function SelectFieldStatusReport({
|
|
|
2680
2758
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2681
2759
|
import { Select as Select5, ConfigProvider as ConfigProvider15 } from "antd";
|
|
2682
2760
|
import { useState as useState6 } from "react";
|
|
2683
|
-
import { jsx as
|
|
2761
|
+
import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2684
2762
|
function SelectFieldTag({
|
|
2685
|
-
|
|
2763
|
+
label,
|
|
2686
2764
|
required,
|
|
2687
|
-
bottomText,
|
|
2688
2765
|
placeholder,
|
|
2689
2766
|
options,
|
|
2690
2767
|
error,
|
|
@@ -2714,7 +2791,7 @@ function SelectFieldTag({
|
|
|
2714
2791
|
}
|
|
2715
2792
|
onChange?.([]);
|
|
2716
2793
|
};
|
|
2717
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ jsx33(
|
|
2718
2795
|
ConfigProvider15,
|
|
2719
2796
|
{
|
|
2720
2797
|
theme: {
|
|
@@ -2722,13 +2799,13 @@ function SelectFieldTag({
|
|
|
2722
2799
|
fontFamily: "Kanit"
|
|
2723
2800
|
}
|
|
2724
2801
|
},
|
|
2725
|
-
children: /* @__PURE__ */
|
|
2726
|
-
/* @__PURE__ */
|
|
2727
|
-
/* @__PURE__ */
|
|
2802
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "container-input", children: [
|
|
2803
|
+
/* @__PURE__ */ jsxs29("div", { children: [
|
|
2804
|
+
/* @__PURE__ */ jsx33("span", { className: "body-1", children: label }),
|
|
2728
2805
|
" ",
|
|
2729
|
-
required && /* @__PURE__ */
|
|
2806
|
+
required && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: "*" })
|
|
2730
2807
|
] }),
|
|
2731
|
-
/* @__PURE__ */
|
|
2808
|
+
/* @__PURE__ */ jsx33(
|
|
2732
2809
|
Select5,
|
|
2733
2810
|
{
|
|
2734
2811
|
mode: "tags",
|
|
@@ -2747,11 +2824,7 @@ function SelectFieldTag({
|
|
|
2747
2824
|
onClear
|
|
2748
2825
|
}
|
|
2749
2826
|
),
|
|
2750
|
-
/* @__PURE__ */
|
|
2751
|
-
/* @__PURE__ */ jsx32("p", { className: "caption-1 text-gray-500", children: bottomText }),
|
|
2752
|
-
" ",
|
|
2753
|
-
error && /* @__PURE__ */ jsx32("p", { className: "caption-1 text-red-500 ", children: error })
|
|
2754
|
-
] })
|
|
2827
|
+
error && /* @__PURE__ */ jsx33("p", { className: "text-red-500 caption-1", children: error })
|
|
2755
2828
|
] })
|
|
2756
2829
|
}
|
|
2757
2830
|
);
|
|
@@ -2761,14 +2834,13 @@ function SelectFieldTag({
|
|
|
2761
2834
|
import { IconTrash } from "@tabler/icons-react";
|
|
2762
2835
|
import { Select as Select6, ConfigProvider as ConfigProvider16 } from "antd";
|
|
2763
2836
|
import { useState as useState7 } from "react";
|
|
2764
|
-
import { jsx as
|
|
2837
|
+
import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2765
2838
|
function SelectCustom({
|
|
2766
|
-
|
|
2839
|
+
label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2767
2840
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
2768
2841
|
options,
|
|
2769
2842
|
required = false,
|
|
2770
2843
|
onChange,
|
|
2771
|
-
bottomText,
|
|
2772
2844
|
error,
|
|
2773
2845
|
onClear
|
|
2774
2846
|
}) {
|
|
@@ -2791,7 +2863,7 @@ function SelectCustom({
|
|
|
2791
2863
|
});
|
|
2792
2864
|
};
|
|
2793
2865
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2794
|
-
return /* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ jsx34(
|
|
2795
2867
|
ConfigProvider16,
|
|
2796
2868
|
{
|
|
2797
2869
|
theme: {
|
|
@@ -2800,13 +2872,13 @@ function SelectCustom({
|
|
|
2800
2872
|
fontSize: 16
|
|
2801
2873
|
}
|
|
2802
2874
|
},
|
|
2803
|
-
children: /* @__PURE__ */
|
|
2804
|
-
/* @__PURE__ */
|
|
2805
|
-
/* @__PURE__ */
|
|
2875
|
+
children: /* @__PURE__ */ jsxs30("div", { className: "container-input", children: [
|
|
2876
|
+
/* @__PURE__ */ jsxs30("div", { children: [
|
|
2877
|
+
/* @__PURE__ */ jsx34("span", { className: "body-1", children: label }),
|
|
2806
2878
|
" ",
|
|
2807
|
-
required && /* @__PURE__ */
|
|
2879
|
+
required && /* @__PURE__ */ jsx34("span", { className: "text-red-500", children: "*" })
|
|
2808
2880
|
] }),
|
|
2809
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ jsx34(
|
|
2810
2882
|
Select6,
|
|
2811
2883
|
{
|
|
2812
2884
|
value,
|
|
@@ -2817,20 +2889,16 @@ function SelectCustom({
|
|
|
2817
2889
|
onClear
|
|
2818
2890
|
}
|
|
2819
2891
|
),
|
|
2820
|
-
/* @__PURE__ */
|
|
2821
|
-
|
|
2822
|
-
" ",
|
|
2823
|
-
|
|
2824
|
-
] }),
|
|
2825
|
-
/* @__PURE__ */ jsx33("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs29("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
|
|
2826
|
-
/* @__PURE__ */ jsxs29("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2827
|
-
/* @__PURE__ */ jsxs29("p", { children: [
|
|
2892
|
+
error && /* @__PURE__ */ jsx34("p", { className: "text-red-500 caption-1", children: error }),
|
|
2893
|
+
/* @__PURE__ */ jsx34("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs30("div", { className: "flex justify-between items-center py-[2px] body-1", children: [
|
|
2894
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2895
|
+
/* @__PURE__ */ jsxs30("p", { children: [
|
|
2828
2896
|
index + 1,
|
|
2829
2897
|
"."
|
|
2830
2898
|
] }),
|
|
2831
|
-
/* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ jsx34("p", { children: v })
|
|
2832
2900
|
] }),
|
|
2833
|
-
/* @__PURE__ */
|
|
2901
|
+
/* @__PURE__ */ jsx34(IconTrash, { className: "cursor-pointer", onClick: () => handleDelete(v) })
|
|
2834
2902
|
] }, index)) })
|
|
2835
2903
|
] })
|
|
2836
2904
|
}
|
|
@@ -2871,7 +2939,7 @@ var quarters = [
|
|
|
2871
2939
|
// src/SortFilter/SortFilter.tsx
|
|
2872
2940
|
import { useState as useState8 } from "react";
|
|
2873
2941
|
import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
|
|
2874
|
-
import { jsx as
|
|
2942
|
+
import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2875
2943
|
function SortFilter({
|
|
2876
2944
|
showYear = true,
|
|
2877
2945
|
showQuarter = true,
|
|
@@ -2882,7 +2950,7 @@ function SortFilter({
|
|
|
2882
2950
|
const [yearValue, setYearValue] = useState8();
|
|
2883
2951
|
const [monthValue, setMonthValue] = useState8();
|
|
2884
2952
|
const [quarterValue, setQuartersValue] = useState8();
|
|
2885
|
-
return /* @__PURE__ */
|
|
2953
|
+
return /* @__PURE__ */ jsx35(
|
|
2886
2954
|
ConfigProvider17,
|
|
2887
2955
|
{
|
|
2888
2956
|
theme: {
|
|
@@ -2890,12 +2958,12 @@ function SortFilter({
|
|
|
2890
2958
|
fontFamily: "Kanit"
|
|
2891
2959
|
}
|
|
2892
2960
|
},
|
|
2893
|
-
children: /* @__PURE__ */
|
|
2894
|
-
/* @__PURE__ */
|
|
2895
|
-
showYear && /* @__PURE__ */
|
|
2961
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "w-full flex items-center justify-between", children: [
|
|
2962
|
+
/* @__PURE__ */ jsxs31("div", { className: "w-full flex gap-[10px]", children: [
|
|
2963
|
+
showYear && /* @__PURE__ */ jsx35("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx35(
|
|
2896
2964
|
SelectField,
|
|
2897
2965
|
{
|
|
2898
|
-
prefix: /* @__PURE__ */
|
|
2966
|
+
prefix: /* @__PURE__ */ jsx35(CalendarOutlined, {}),
|
|
2899
2967
|
onChange: setYearValue,
|
|
2900
2968
|
options: years.map((s) => ({
|
|
2901
2969
|
value: s.value,
|
|
@@ -2905,10 +2973,10 @@ function SortFilter({
|
|
|
2905
2973
|
value: yearValue
|
|
2906
2974
|
}
|
|
2907
2975
|
) }),
|
|
2908
|
-
showMonth && /* @__PURE__ */
|
|
2976
|
+
showMonth && /* @__PURE__ */ jsx35("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx35(
|
|
2909
2977
|
SelectField,
|
|
2910
2978
|
{
|
|
2911
|
-
prefix: /* @__PURE__ */
|
|
2979
|
+
prefix: /* @__PURE__ */ jsx35(CalendarOutlined, {}),
|
|
2912
2980
|
onChange: setMonthValue,
|
|
2913
2981
|
options: months.map((s) => ({
|
|
2914
2982
|
value: s.value,
|
|
@@ -2918,10 +2986,10 @@ function SortFilter({
|
|
|
2918
2986
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2919
2987
|
}
|
|
2920
2988
|
) }),
|
|
2921
|
-
showQuarter && /* @__PURE__ */
|
|
2989
|
+
showQuarter && /* @__PURE__ */ jsx35("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx35(
|
|
2922
2990
|
SelectField,
|
|
2923
2991
|
{
|
|
2924
|
-
prefix: /* @__PURE__ */
|
|
2992
|
+
prefix: /* @__PURE__ */ jsx35(CalendarOutlined, {}),
|
|
2925
2993
|
onChange: setQuartersValue,
|
|
2926
2994
|
options: quarters.map((s) => ({
|
|
2927
2995
|
value: s.value,
|
|
@@ -2932,8 +3000,8 @@ function SortFilter({
|
|
|
2932
3000
|
}
|
|
2933
3001
|
) })
|
|
2934
3002
|
] }),
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex gap-[10px]", children: [
|
|
3004
|
+
/* @__PURE__ */ jsx35(
|
|
2937
3005
|
IconSortDescending2,
|
|
2938
3006
|
{
|
|
2939
3007
|
size: 24,
|
|
@@ -2941,7 +3009,7 @@ function SortFilter({
|
|
|
2941
3009
|
onClick: onSortClick
|
|
2942
3010
|
}
|
|
2943
3011
|
),
|
|
2944
|
-
/* @__PURE__ */
|
|
3012
|
+
/* @__PURE__ */ jsx35(
|
|
2945
3013
|
IconFilter,
|
|
2946
3014
|
{
|
|
2947
3015
|
size: 24,
|
|
@@ -2958,7 +3026,7 @@ function SortFilter({
|
|
|
2958
3026
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2959
3027
|
import { IconPaperclip, IconUpload, IconTrash as IconTrash2 } from "@tabler/icons-react";
|
|
2960
3028
|
import { useRef as useRef2, useState as useState9 } from "react";
|
|
2961
|
-
import { Fragment as Fragment5, jsx as
|
|
3029
|
+
import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2962
3030
|
function FileUploader({
|
|
2963
3031
|
onUpload,
|
|
2964
3032
|
onError,
|
|
@@ -2991,7 +3059,7 @@ function FileUploader({
|
|
|
2991
3059
|
const handleRemoveFile = async (index) => {
|
|
2992
3060
|
try {
|
|
2993
3061
|
if (onRemove) {
|
|
2994
|
-
await onRemove();
|
|
3062
|
+
await onRemove(index);
|
|
2995
3063
|
}
|
|
2996
3064
|
const updatedList = [...fileList];
|
|
2997
3065
|
updatedList.splice(index, 1);
|
|
@@ -3029,10 +3097,10 @@ function FileUploader({
|
|
|
3029
3097
|
}
|
|
3030
3098
|
if (inputRef.current) inputRef.current.value = "";
|
|
3031
3099
|
};
|
|
3032
|
-
return /* @__PURE__ */
|
|
3033
|
-
label && /* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
3035
|
-
mode === "upload" ? /* @__PURE__ */
|
|
3100
|
+
return /* @__PURE__ */ jsxs32("div", { className: "w-full", children: [
|
|
3101
|
+
label && /* @__PURE__ */ jsx36("p", { className: "body-1", children: label }),
|
|
3102
|
+
/* @__PURE__ */ jsxs32("div", { children: [
|
|
3103
|
+
mode === "upload" ? /* @__PURE__ */ jsx36(
|
|
3036
3104
|
"button",
|
|
3037
3105
|
{
|
|
3038
3106
|
type: "button",
|
|
@@ -3040,15 +3108,15 @@ function FileUploader({
|
|
|
3040
3108
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3041
3109
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3042
3110
|
disabled: disabled ? disabled : uploading,
|
|
3043
|
-
children: uploading ? /* @__PURE__ */
|
|
3044
|
-
/* @__PURE__ */
|
|
3111
|
+
children: uploading ? /* @__PURE__ */ jsxs32(Fragment5, { children: [
|
|
3112
|
+
/* @__PURE__ */ jsx36(Loader, { size: 15 }),
|
|
3045
3113
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3046
|
-
] }) : /* @__PURE__ */
|
|
3047
|
-
/* @__PURE__ */
|
|
3114
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment5, { children: [
|
|
3115
|
+
/* @__PURE__ */ jsx36(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3048
3116
|
" \u0E41\u0E19\u0E1A\u0E44\u0E1F\u0E25\u0E4C"
|
|
3049
3117
|
] })
|
|
3050
3118
|
}
|
|
3051
|
-
) : /* @__PURE__ */
|
|
3119
|
+
) : /* @__PURE__ */ jsx36(
|
|
3052
3120
|
"div",
|
|
3053
3121
|
{
|
|
3054
3122
|
className: `min-w-[400px] min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3062,17 +3130,17 @@ function FileUploader({
|
|
|
3062
3130
|
},
|
|
3063
3131
|
onDragLeave: () => setDragActive(false),
|
|
3064
3132
|
onDrop: handleDrop,
|
|
3065
|
-
children: uploading ? /* @__PURE__ */
|
|
3066
|
-
/* @__PURE__ */
|
|
3133
|
+
children: uploading ? /* @__PURE__ */ jsxs32("div", { className: "flex justify-center items-center gap-2", children: [
|
|
3134
|
+
/* @__PURE__ */ jsx36(Loader, { size: 15 }),
|
|
3067
3135
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3068
|
-
] }) : /* @__PURE__ */
|
|
3069
|
-
/* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3071
|
-
/* @__PURE__ */
|
|
3136
|
+
] }) : /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3137
|
+
/* @__PURE__ */ jsx36(IconUpload, { size: 20 }),
|
|
3138
|
+
/* @__PURE__ */ jsx36("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" }),
|
|
3139
|
+
/* @__PURE__ */ jsx36("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" })
|
|
3072
3140
|
] })
|
|
3073
3141
|
}
|
|
3074
3142
|
),
|
|
3075
|
-
/* @__PURE__ */
|
|
3143
|
+
/* @__PURE__ */ jsx36(
|
|
3076
3144
|
"input",
|
|
3077
3145
|
{
|
|
3078
3146
|
type: "file",
|
|
@@ -3085,13 +3153,13 @@ function FileUploader({
|
|
|
3085
3153
|
}
|
|
3086
3154
|
)
|
|
3087
3155
|
] }),
|
|
3088
|
-
description && /* @__PURE__ */
|
|
3089
|
-
/* @__PURE__ */
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
3156
|
+
description && /* @__PURE__ */ jsx36("p", { className: "text-gray-400 body-4", children: description }),
|
|
3157
|
+
/* @__PURE__ */ jsx36("div", { className: "mt-[8px]", children: fileList.length !== 0 && fileList.map((file, index) => /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 rounded-[4px] px-[8px] py-[4px] body-1", children: [
|
|
3158
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 w-[75%] overflow-hidden", children: [
|
|
3159
|
+
/* @__PURE__ */ jsx36("div", { className: "w-[15px] h-[15px]", children: /* @__PURE__ */ jsx36(IconPaperclip, { size: 15 }) }),
|
|
3160
|
+
/* @__PURE__ */ jsx36("span", { className: "truncate", children: file.name })
|
|
3093
3161
|
] }),
|
|
3094
|
-
/* @__PURE__ */
|
|
3162
|
+
/* @__PURE__ */ jsx36(
|
|
3095
3163
|
IconTrash2,
|
|
3096
3164
|
{
|
|
3097
3165
|
size: 20,
|
|
@@ -3127,7 +3195,7 @@ function messageLoading(content, duration) {
|
|
|
3127
3195
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3128
3196
|
import { ConfigProvider as ConfigProvider18 } from "antd";
|
|
3129
3197
|
import { Breadcrumb } from "antd";
|
|
3130
|
-
import { jsx as
|
|
3198
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3131
3199
|
function Breadcrumbs({
|
|
3132
3200
|
items,
|
|
3133
3201
|
separator,
|
|
@@ -3135,7 +3203,7 @@ function Breadcrumbs({
|
|
|
3135
3203
|
classname,
|
|
3136
3204
|
params
|
|
3137
3205
|
}) {
|
|
3138
|
-
return /* @__PURE__ */
|
|
3206
|
+
return /* @__PURE__ */ jsx37(
|
|
3139
3207
|
ConfigProvider18,
|
|
3140
3208
|
{
|
|
3141
3209
|
theme: {
|
|
@@ -3143,7 +3211,7 @@ function Breadcrumbs({
|
|
|
3143
3211
|
fontFamily: "Kanit"
|
|
3144
3212
|
}
|
|
3145
3213
|
},
|
|
3146
|
-
children: /* @__PURE__ */
|
|
3214
|
+
children: /* @__PURE__ */ jsx37(
|
|
3147
3215
|
Breadcrumb,
|
|
3148
3216
|
{
|
|
3149
3217
|
items,
|
|
@@ -3159,7 +3227,7 @@ function Breadcrumbs({
|
|
|
3159
3227
|
|
|
3160
3228
|
// src/HeadingPage/HeadingPage.tsx
|
|
3161
3229
|
import { ConfigProvider as ConfigProvider19 } from "antd";
|
|
3162
|
-
import { jsx as
|
|
3230
|
+
import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3163
3231
|
function HeadingPage({ Heading }) {
|
|
3164
3232
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3165
3233
|
weekday: "long",
|
|
@@ -3167,7 +3235,7 @@ function HeadingPage({ Heading }) {
|
|
|
3167
3235
|
month: "long",
|
|
3168
3236
|
year: "numeric"
|
|
3169
3237
|
});
|
|
3170
|
-
return /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ jsx38(
|
|
3171
3239
|
ConfigProvider19,
|
|
3172
3240
|
{
|
|
3173
3241
|
theme: {
|
|
@@ -3175,9 +3243,9 @@ function HeadingPage({ Heading }) {
|
|
|
3175
3243
|
fontFamily: "Kanit"
|
|
3176
3244
|
}
|
|
3177
3245
|
},
|
|
3178
|
-
children: /* @__PURE__ */
|
|
3179
|
-
/* @__PURE__ */
|
|
3180
|
-
/* @__PURE__ */
|
|
3246
|
+
children: /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3247
|
+
/* @__PURE__ */ jsx38("p", { className: "headline-5", children: Heading }),
|
|
3248
|
+
/* @__PURE__ */ jsxs33("p", { className: "body-1", children: [
|
|
3181
3249
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3182
3250
|
today
|
|
3183
3251
|
] })
|
|
@@ -3189,7 +3257,7 @@ function HeadingPage({ Heading }) {
|
|
|
3189
3257
|
// src/Progress/ProgressBar.tsx
|
|
3190
3258
|
import { ConfigProvider as ConfigProvider20, Progress } from "antd";
|
|
3191
3259
|
import { useEffect as useEffect2, useRef as useRef3, useState as useState10 } from "react";
|
|
3192
|
-
import { jsx as
|
|
3260
|
+
import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3193
3261
|
function ProgressBar({
|
|
3194
3262
|
percent = 0,
|
|
3195
3263
|
size = "default",
|
|
@@ -3220,7 +3288,7 @@ function ProgressBar({
|
|
|
3220
3288
|
observer.observe(inner);
|
|
3221
3289
|
return () => observer.disconnect();
|
|
3222
3290
|
}, []);
|
|
3223
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsx39(
|
|
3224
3292
|
ConfigProvider20,
|
|
3225
3293
|
{
|
|
3226
3294
|
theme: {
|
|
@@ -3228,8 +3296,8 @@ function ProgressBar({
|
|
|
3228
3296
|
fontFamily: "Kanit"
|
|
3229
3297
|
}
|
|
3230
3298
|
},
|
|
3231
|
-
children: /* @__PURE__ */
|
|
3232
|
-
/* @__PURE__ */
|
|
3299
|
+
children: /* @__PURE__ */ jsxs34("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3300
|
+
/* @__PURE__ */ jsx39(
|
|
3233
3301
|
Progress,
|
|
3234
3302
|
{
|
|
3235
3303
|
className: "w-full",
|
|
@@ -3245,7 +3313,7 @@ function ProgressBar({
|
|
|
3245
3313
|
strokeColor
|
|
3246
3314
|
}
|
|
3247
3315
|
),
|
|
3248
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */
|
|
3316
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx39(
|
|
3249
3317
|
"div",
|
|
3250
3318
|
{
|
|
3251
3319
|
className: "checkpoint absolute top-0",
|
|
@@ -3418,7 +3486,7 @@ function useGetKpiSection() {
|
|
|
3418
3486
|
|
|
3419
3487
|
// src/KpiSection/KpiSection.tsx
|
|
3420
3488
|
import { IconCheck as IconCheck2, IconCirclePlus, IconPencil, IconTrash as IconTrash3, IconX as IconX2 } from "@tabler/icons-react";
|
|
3421
|
-
import { Fragment as Fragment6, jsx as
|
|
3489
|
+
import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3422
3490
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3423
3491
|
const {
|
|
3424
3492
|
handleAddKpi,
|
|
@@ -3448,7 +3516,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3448
3516
|
onChangeKpiList(kpiList);
|
|
3449
3517
|
}
|
|
3450
3518
|
}, [kpiList]);
|
|
3451
|
-
return /* @__PURE__ */
|
|
3519
|
+
return /* @__PURE__ */ jsx40(
|
|
3452
3520
|
ConfigProvider21,
|
|
3453
3521
|
{
|
|
3454
3522
|
theme: {
|
|
@@ -3457,15 +3525,15 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3457
3525
|
fontSize: 16
|
|
3458
3526
|
}
|
|
3459
3527
|
},
|
|
3460
|
-
children: /* @__PURE__ */
|
|
3528
|
+
children: /* @__PURE__ */ jsxs35("div", { className: "container-input", children: [
|
|
3461
3529
|
messageContainer,
|
|
3462
|
-
type === "number" && /* @__PURE__ */
|
|
3463
|
-
/* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */
|
|
3530
|
+
type === "number" && /* @__PURE__ */ jsxs35("div", { className: "space-y-4", children: [
|
|
3531
|
+
/* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3532
|
+
/* @__PURE__ */ jsx40(
|
|
3465
3533
|
InputField,
|
|
3466
3534
|
{
|
|
3467
3535
|
value: nameKpi,
|
|
3468
|
-
|
|
3536
|
+
label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3469
3537
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3470
3538
|
required: true,
|
|
3471
3539
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
@@ -3473,11 +3541,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3473
3541
|
error: errors.nameKpi
|
|
3474
3542
|
}
|
|
3475
3543
|
),
|
|
3476
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ jsx40(
|
|
3477
3545
|
InputField,
|
|
3478
3546
|
{
|
|
3479
3547
|
value: kpiValue,
|
|
3480
|
-
|
|
3548
|
+
label: "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3481
3549
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3482
3550
|
required: true,
|
|
3483
3551
|
onChange: (value) => {
|
|
@@ -3497,11 +3565,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3497
3565
|
error: errors.kpiValue
|
|
3498
3566
|
}
|
|
3499
3567
|
),
|
|
3500
|
-
/* @__PURE__ */
|
|
3568
|
+
/* @__PURE__ */ jsx40(
|
|
3501
3569
|
InputField,
|
|
3502
3570
|
{
|
|
3503
3571
|
value: unitValue,
|
|
3504
|
-
|
|
3572
|
+
label: "\u0E2B\u0E19\u0E48\u0E27\u0E22",
|
|
3505
3573
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3506
3574
|
required: true,
|
|
3507
3575
|
onChange: (value) => setUnitValue(value ?? ""),
|
|
@@ -3509,7 +3577,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3509
3577
|
error: errors.unitValue
|
|
3510
3578
|
}
|
|
3511
3579
|
),
|
|
3512
|
-
/* @__PURE__ */
|
|
3580
|
+
/* @__PURE__ */ jsx40("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx40(
|
|
3513
3581
|
IconCirclePlus,
|
|
3514
3582
|
{
|
|
3515
3583
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3518,17 +3586,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3518
3586
|
}
|
|
3519
3587
|
) })
|
|
3520
3588
|
] }),
|
|
3521
|
-
/* @__PURE__ */
|
|
3589
|
+
/* @__PURE__ */ jsx40("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs35(
|
|
3522
3590
|
"div",
|
|
3523
3591
|
{
|
|
3524
3592
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3525
3593
|
children: [
|
|
3526
|
-
/* @__PURE__ */
|
|
3594
|
+
/* @__PURE__ */ jsxs35("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3527
3595
|
index + 1,
|
|
3528
3596
|
"."
|
|
3529
3597
|
] }),
|
|
3530
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3531
|
-
/* @__PURE__ */
|
|
3598
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs35(Fragment6, { children: [
|
|
3599
|
+
/* @__PURE__ */ jsx40(
|
|
3532
3600
|
InputField,
|
|
3533
3601
|
{
|
|
3534
3602
|
value: kpi.name,
|
|
@@ -3538,7 +3606,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3538
3606
|
error: itemErrors[kpi.id]?.name
|
|
3539
3607
|
}
|
|
3540
3608
|
),
|
|
3541
|
-
/* @__PURE__ */
|
|
3609
|
+
/* @__PURE__ */ jsx40(
|
|
3542
3610
|
InputField,
|
|
3543
3611
|
{
|
|
3544
3612
|
value: kpi.value?.toString(),
|
|
@@ -3563,7 +3631,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3563
3631
|
error: itemErrors[kpi.id]?.value
|
|
3564
3632
|
}
|
|
3565
3633
|
),
|
|
3566
|
-
/* @__PURE__ */
|
|
3634
|
+
/* @__PURE__ */ jsx40(
|
|
3567
3635
|
InputField,
|
|
3568
3636
|
{
|
|
3569
3637
|
value: kpi.unit,
|
|
@@ -3573,29 +3641,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3573
3641
|
error: itemErrors[kpi.id]?.unit
|
|
3574
3642
|
}
|
|
3575
3643
|
),
|
|
3576
|
-
/* @__PURE__ */
|
|
3644
|
+
/* @__PURE__ */ jsxs35(
|
|
3577
3645
|
"div",
|
|
3578
3646
|
{
|
|
3579
3647
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3580
3648
|
children: [
|
|
3581
|
-
/* @__PURE__ */
|
|
3649
|
+
/* @__PURE__ */ jsx40(
|
|
3582
3650
|
IconCheck2,
|
|
3583
3651
|
{
|
|
3584
3652
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3585
3653
|
onClick: () => handleSave(kpi.id, type)
|
|
3586
3654
|
}
|
|
3587
3655
|
),
|
|
3588
|
-
/* @__PURE__ */
|
|
3656
|
+
/* @__PURE__ */ jsx40(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3589
3657
|
]
|
|
3590
3658
|
}
|
|
3591
3659
|
)
|
|
3592
|
-
] }) : /* @__PURE__ */
|
|
3593
|
-
/* @__PURE__ */
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
/* @__PURE__ */
|
|
3596
|
-
/* @__PURE__ */
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
/* @__PURE__ */
|
|
3660
|
+
] }) : /* @__PURE__ */ jsxs35(Fragment6, { children: [
|
|
3661
|
+
/* @__PURE__ */ jsx40("p", { className: "body-1", children: kpi.name }),
|
|
3662
|
+
/* @__PURE__ */ jsx40("p", { className: "body-1", children: kpi.value }),
|
|
3663
|
+
/* @__PURE__ */ jsx40("p", { className: "body-1", children: kpi.unit }),
|
|
3664
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-3 justify-end", children: [
|
|
3665
|
+
/* @__PURE__ */ jsx40(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3666
|
+
/* @__PURE__ */ jsx40(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3599
3667
|
] })
|
|
3600
3668
|
] })
|
|
3601
3669
|
]
|
|
@@ -3603,13 +3671,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3603
3671
|
kpi.id
|
|
3604
3672
|
)) })
|
|
3605
3673
|
] }),
|
|
3606
|
-
type === "text" && /* @__PURE__ */
|
|
3607
|
-
/* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3674
|
+
type === "text" && /* @__PURE__ */ jsxs35("div", { className: "space-y-4", children: [
|
|
3675
|
+
/* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3676
|
+
/* @__PURE__ */ jsx40(
|
|
3609
3677
|
InputField,
|
|
3610
3678
|
{
|
|
3611
3679
|
value: nameKpi,
|
|
3612
|
-
|
|
3680
|
+
label: "\u0E0A\u0E37\u0E48\u0E2D\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E32\u0E14\u0E2B\u0E27\u0E31\u0E07 (KPI)",
|
|
3613
3681
|
placeholder: "\u0E42\u0E1B\u0E23\u0E14\u0E23\u0E30\u0E1A\u0E38",
|
|
3614
3682
|
required: true,
|
|
3615
3683
|
onChange: (value) => setNameKpi(value ?? ""),
|
|
@@ -3617,7 +3685,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3617
3685
|
error: errors.nameKpi
|
|
3618
3686
|
}
|
|
3619
3687
|
),
|
|
3620
|
-
/* @__PURE__ */
|
|
3688
|
+
/* @__PURE__ */ jsx40("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx40(
|
|
3621
3689
|
IconCirclePlus,
|
|
3622
3690
|
{
|
|
3623
3691
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3626,13 +3694,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3626
3694
|
}
|
|
3627
3695
|
) })
|
|
3628
3696
|
] }),
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3697
|
+
/* @__PURE__ */ jsx40("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
|
|
3698
|
+
/* @__PURE__ */ jsxs35("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3631
3699
|
index + 1,
|
|
3632
3700
|
"."
|
|
3633
3701
|
] }),
|
|
3634
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3702
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs35(Fragment6, { children: [
|
|
3703
|
+
/* @__PURE__ */ jsx40(
|
|
3636
3704
|
InputField,
|
|
3637
3705
|
{
|
|
3638
3706
|
value: kpi.name,
|
|
@@ -3642,27 +3710,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3642
3710
|
error: itemErrors[kpi.id]?.name
|
|
3643
3711
|
}
|
|
3644
3712
|
),
|
|
3645
|
-
/* @__PURE__ */
|
|
3713
|
+
/* @__PURE__ */ jsxs35(
|
|
3646
3714
|
"div",
|
|
3647
3715
|
{
|
|
3648
3716
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3649
3717
|
children: [
|
|
3650
|
-
/* @__PURE__ */
|
|
3718
|
+
/* @__PURE__ */ jsx40(
|
|
3651
3719
|
IconCheck2,
|
|
3652
3720
|
{
|
|
3653
3721
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3654
3722
|
onClick: () => handleSave(kpi.id, type)
|
|
3655
3723
|
}
|
|
3656
3724
|
),
|
|
3657
|
-
/* @__PURE__ */
|
|
3725
|
+
/* @__PURE__ */ jsx40(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3658
3726
|
]
|
|
3659
3727
|
}
|
|
3660
3728
|
)
|
|
3661
|
-
] }) : /* @__PURE__ */
|
|
3662
|
-
/* @__PURE__ */
|
|
3663
|
-
/* @__PURE__ */
|
|
3664
|
-
/* @__PURE__ */
|
|
3665
|
-
/* @__PURE__ */
|
|
3729
|
+
] }) : /* @__PURE__ */ jsxs35(Fragment6, { children: [
|
|
3730
|
+
/* @__PURE__ */ jsx40("p", { className: "body-1", children: kpi.name }),
|
|
3731
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-3 justify-end", children: [
|
|
3732
|
+
/* @__PURE__ */ jsx40(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3733
|
+
/* @__PURE__ */ jsx40(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3666
3734
|
] })
|
|
3667
3735
|
] })
|
|
3668
3736
|
] }, kpi.id)) })
|
|
@@ -3674,10 +3742,235 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3674
3742
|
|
|
3675
3743
|
// src/Modal/Modal/Modal.tsx
|
|
3676
3744
|
import { Modal } from "antd";
|
|
3677
|
-
import { jsx as
|
|
3745
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3678
3746
|
function AntDModal({ children, isOpen, width, onCancel }) {
|
|
3679
|
-
return /* @__PURE__ */
|
|
3747
|
+
return /* @__PURE__ */ jsx41("div", { children: /* @__PURE__ */ jsx41(Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ jsx41("div", { children }) }) });
|
|
3748
|
+
}
|
|
3749
|
+
|
|
3750
|
+
// src/Indicator/Indicator/Indicator.tsx
|
|
3751
|
+
import { IconCheck as IconCheck3, IconCirclePlus as IconCirclePlus2, IconPencil as IconPencil2, IconTrash as IconTrash4, IconX as IconX3 } from "@tabler/icons-react";
|
|
3752
|
+
import { useState as useState13 } from "react";
|
|
3753
|
+
import { Input as Input4 } from "antd";
|
|
3754
|
+
import { Fragment as Fragment7, jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3755
|
+
function Indicator({
|
|
3756
|
+
option = [
|
|
3757
|
+
{ value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
|
|
3758
|
+
{ value: "NUMBER", label: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }
|
|
3759
|
+
],
|
|
3760
|
+
type,
|
|
3761
|
+
arrayData,
|
|
3762
|
+
setArrayData
|
|
3763
|
+
}) {
|
|
3764
|
+
const [valueSwitch, setValueSwitch] = useState13("TEXT");
|
|
3765
|
+
const [cacheData, setCacheData] = useState13({
|
|
3766
|
+
indicatorType: type,
|
|
3767
|
+
inputType: valueSwitch,
|
|
3768
|
+
textValue: "",
|
|
3769
|
+
numberValue: "",
|
|
3770
|
+
unit: ""
|
|
3771
|
+
});
|
|
3772
|
+
const [cacheEditData, setCacheEditData] = useState13({
|
|
3773
|
+
indicatorType: type,
|
|
3774
|
+
inputType: valueSwitch,
|
|
3775
|
+
textValue: "",
|
|
3776
|
+
numberValue: "",
|
|
3777
|
+
unit: ""
|
|
3778
|
+
});
|
|
3779
|
+
const [editIndex, setEditIndex] = useState13(null);
|
|
3780
|
+
const handleAddIndicator = () => {
|
|
3781
|
+
if (cacheData.textValue.trim() === "") return;
|
|
3782
|
+
setArrayData([
|
|
3783
|
+
...arrayData,
|
|
3784
|
+
valueSwitch === "TEXT" ? {
|
|
3785
|
+
indicatorType: type,
|
|
3786
|
+
inputType: "TEXT",
|
|
3787
|
+
textValue: cacheData.textValue
|
|
3788
|
+
} : cacheData
|
|
3789
|
+
]);
|
|
3790
|
+
setCacheData({
|
|
3791
|
+
indicatorType: type,
|
|
3792
|
+
inputType: valueSwitch,
|
|
3793
|
+
textValue: "",
|
|
3794
|
+
numberValue: "",
|
|
3795
|
+
unit: ""
|
|
3796
|
+
});
|
|
3797
|
+
};
|
|
3798
|
+
const handleChangeCashData = (key, value) => {
|
|
3799
|
+
setCacheData((prev) => ({
|
|
3800
|
+
...prev,
|
|
3801
|
+
[key]: value
|
|
3802
|
+
}));
|
|
3803
|
+
console.log(cacheData);
|
|
3804
|
+
};
|
|
3805
|
+
const handleClick = (active) => {
|
|
3806
|
+
handleChangeCashData("inputType", active);
|
|
3807
|
+
setValueSwitch(active);
|
|
3808
|
+
};
|
|
3809
|
+
const handleDeleteIndicator = (index) => {
|
|
3810
|
+
const newData = arrayData.filter((_, i) => i !== index);
|
|
3811
|
+
setArrayData(newData);
|
|
3812
|
+
setEditIndex(null);
|
|
3813
|
+
};
|
|
3814
|
+
const handleEditIndicator = (index) => {
|
|
3815
|
+
setCacheEditData(arrayData[index]);
|
|
3816
|
+
setEditIndex(index);
|
|
3817
|
+
};
|
|
3818
|
+
const handleCancelEditIndicator = () => {
|
|
3819
|
+
setEditIndex(null);
|
|
3820
|
+
};
|
|
3821
|
+
const handleConfirmEditIndicator = (index) => {
|
|
3822
|
+
if (cacheEditData.textValue.trim() === "") return;
|
|
3823
|
+
const newData = [...arrayData];
|
|
3824
|
+
newData[index] = cacheEditData;
|
|
3825
|
+
setArrayData(newData);
|
|
3826
|
+
setEditIndex(null);
|
|
3827
|
+
};
|
|
3828
|
+
const handleChangeEditCashData = (e) => {
|
|
3829
|
+
const { name, value } = e.target;
|
|
3830
|
+
setCacheEditData((prev) => ({
|
|
3831
|
+
...prev,
|
|
3832
|
+
[name]: value
|
|
3833
|
+
}));
|
|
3834
|
+
console.log(cacheEditData);
|
|
3835
|
+
};
|
|
3836
|
+
return /* @__PURE__ */ jsxs36("div", { className: "w-full", children: [
|
|
3837
|
+
/* @__PURE__ */ jsxs36(
|
|
3838
|
+
"div",
|
|
3839
|
+
{
|
|
3840
|
+
className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
|
|
3841
|
+
children: [
|
|
3842
|
+
/* @__PURE__ */ jsx42(SwitchSelect, { option, onClick: handleClick, value: valueSwitch, label: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17", required: true }),
|
|
3843
|
+
/* @__PURE__ */ jsx42(
|
|
3844
|
+
InputField,
|
|
3845
|
+
{
|
|
3846
|
+
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"}`,
|
|
3847
|
+
value: cacheData.textValue,
|
|
3848
|
+
className: "h-[32px]",
|
|
3849
|
+
onChange: (e) => handleChangeCashData("textValue", String(e)),
|
|
3850
|
+
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"}`,
|
|
3851
|
+
required: true
|
|
3852
|
+
}
|
|
3853
|
+
),
|
|
3854
|
+
valueSwitch === "NUMBER" && /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
3855
|
+
/* @__PURE__ */ jsx42(
|
|
3856
|
+
InputFieldNumber,
|
|
3857
|
+
{
|
|
3858
|
+
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"}`,
|
|
3859
|
+
value: cacheData.numberValue ?? "",
|
|
3860
|
+
className: "h-[32px]",
|
|
3861
|
+
onChange: (e) => handleChangeCashData("numberValue", String(e)),
|
|
3862
|
+
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"}`,
|
|
3863
|
+
required: true
|
|
3864
|
+
}
|
|
3865
|
+
),
|
|
3866
|
+
/* @__PURE__ */ jsx42(
|
|
3867
|
+
InputField,
|
|
3868
|
+
{
|
|
3869
|
+
label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
|
|
3870
|
+
value: cacheData.unit ?? "",
|
|
3871
|
+
className: "h-[32px]",
|
|
3872
|
+
onChange: (e) => handleChangeCashData("unit", String(e)),
|
|
3873
|
+
placeholder: "\u0E23\u0E30\u0E1A\u0E38\u0E2B\u0E19\u0E48\u0E27\u0E22",
|
|
3874
|
+
required: true
|
|
3875
|
+
}
|
|
3876
|
+
)
|
|
3877
|
+
] }),
|
|
3878
|
+
/* @__PURE__ */ jsx42(IconCirclePlus2, { onClick: handleAddIndicator, className: "mt-7 cursor-pointer", size: 32 })
|
|
3879
|
+
]
|
|
3880
|
+
}
|
|
3881
|
+
),
|
|
3882
|
+
/* @__PURE__ */ jsx42(Fragment7, { children: arrayData.map((item, index) => /* @__PURE__ */ jsxs36(
|
|
3883
|
+
"div",
|
|
3884
|
+
{
|
|
3885
|
+
className: `space-y-4 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
|
|
3886
|
+
children: [
|
|
3887
|
+
/* @__PURE__ */ jsx42("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
|
|
3888
|
+
index === editIndex ? /* @__PURE__ */ jsx42(
|
|
3889
|
+
Input4,
|
|
3890
|
+
{
|
|
3891
|
+
className: "body-1 mt-2",
|
|
3892
|
+
variant: "underlined",
|
|
3893
|
+
value: cacheEditData.textValue,
|
|
3894
|
+
name: "textValue",
|
|
3895
|
+
onChange: (e) => handleChangeEditCashData(e)
|
|
3896
|
+
}
|
|
3897
|
+
) : /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2", children: item.textValue }),
|
|
3898
|
+
item.inputType === "NUMBER" && /* @__PURE__ */ jsxs36(Fragment7, { children: [
|
|
3899
|
+
index === editIndex ? /* @__PURE__ */ jsx42(
|
|
3900
|
+
Input4,
|
|
3901
|
+
{
|
|
3902
|
+
className: "body-1 mt-2",
|
|
3903
|
+
variant: "underlined",
|
|
3904
|
+
value: cacheEditData.numberValue,
|
|
3905
|
+
name: "numberValue",
|
|
3906
|
+
onChange: (e) => handleChangeEditCashData(e)
|
|
3907
|
+
}
|
|
3908
|
+
) : /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2", children: item.numberValue }),
|
|
3909
|
+
index === editIndex ? /* @__PURE__ */ jsx42(
|
|
3910
|
+
Input4,
|
|
3911
|
+
{
|
|
3912
|
+
className: "body-1 mt-2",
|
|
3913
|
+
variant: "underlined",
|
|
3914
|
+
value: cacheEditData.unit,
|
|
3915
|
+
name: "unit",
|
|
3916
|
+
onChange: (e) => handleChangeEditCashData(e)
|
|
3917
|
+
}
|
|
3918
|
+
) : /* @__PURE__ */ jsx42("div", { className: "body-1 mt-2", children: item.unit })
|
|
3919
|
+
] }),
|
|
3920
|
+
/* @__PURE__ */ jsx42("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ jsxs36("div", { className: "flex", children: [
|
|
3921
|
+
/* @__PURE__ */ jsx42(
|
|
3922
|
+
IconCheck3,
|
|
3923
|
+
{
|
|
3924
|
+
className: "cursor-pointer text-green-600",
|
|
3925
|
+
onClick: () => handleConfirmEditIndicator(index)
|
|
3926
|
+
}
|
|
3927
|
+
),
|
|
3928
|
+
/* @__PURE__ */ jsx42(IconX3, { className: "cursor-pointer text-red-600", onClick: handleCancelEditIndicator })
|
|
3929
|
+
] }) : void 0 : /* @__PURE__ */ jsx42(IconPencil2, { className: "cursor-pointer", onClick: () => handleEditIndicator(index) }) }),
|
|
3930
|
+
/* @__PURE__ */ jsx42("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ jsx42(IconTrash4, { onClick: () => handleDeleteIndicator(index) }) })
|
|
3931
|
+
]
|
|
3932
|
+
}
|
|
3933
|
+
)) })
|
|
3934
|
+
] });
|
|
3680
3935
|
}
|
|
3936
|
+
|
|
3937
|
+
// src/FilterPopUp/FilterPopUp.tsx
|
|
3938
|
+
import { IconCheck as IconCheck4, IconFilter as IconFilter2, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
3939
|
+
import { useState as useState14 } from "react";
|
|
3940
|
+
import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3941
|
+
var FilterPopUp = (filter) => {
|
|
3942
|
+
const [isAction, setIsAction] = useState14(true);
|
|
3943
|
+
const [filterArray, setFilterArray] = useState14([""]);
|
|
3944
|
+
const handleClearFilter = () => {
|
|
3945
|
+
setFilterArray([]);
|
|
3946
|
+
};
|
|
3947
|
+
const handleSubmitFilter = () => {
|
|
3948
|
+
filter.handleSearch(filterArray);
|
|
3949
|
+
};
|
|
3950
|
+
return /* @__PURE__ */ jsxs37("div", { className: "relative", children: [
|
|
3951
|
+
/* @__PURE__ */ jsxs37("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
|
|
3952
|
+
/* @__PURE__ */ jsx43(IconFilter2, {}),
|
|
3953
|
+
"filter"
|
|
3954
|
+
] }),
|
|
3955
|
+
isAction ? /* @__PURE__ */ jsxs37("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
|
|
3956
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex justify-end", children: [
|
|
3957
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex justify-end text-nowrap gap-2", children: [
|
|
3958
|
+
/* @__PURE__ */ jsx43(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ jsx43(IconCheck4, {}) }),
|
|
3959
|
+
/* @__PURE__ */ jsx43(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ jsx43(IconTrash5, {}) })
|
|
3960
|
+
] }),
|
|
3961
|
+
""
|
|
3962
|
+
] }),
|
|
3963
|
+
/* @__PURE__ */ jsx43(
|
|
3964
|
+
SelectCustom,
|
|
3965
|
+
{
|
|
3966
|
+
options: filter.selectionFilter,
|
|
3967
|
+
onChange: (list) => setFilterArray(list),
|
|
3968
|
+
label: "\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01"
|
|
3969
|
+
}
|
|
3970
|
+
)
|
|
3971
|
+
] }) : void 0
|
|
3972
|
+
] });
|
|
3973
|
+
};
|
|
3681
3974
|
export {
|
|
3682
3975
|
AntDModal,
|
|
3683
3976
|
AntDataTable,
|
|
@@ -3691,8 +3984,10 @@ export {
|
|
|
3691
3984
|
DatePickerBasic,
|
|
3692
3985
|
DatePickerRangePicker,
|
|
3693
3986
|
FileUploader,
|
|
3987
|
+
FilterPopUp,
|
|
3694
3988
|
GhostButton,
|
|
3695
3989
|
HeadingPage,
|
|
3990
|
+
Indicator,
|
|
3696
3991
|
InputField,
|
|
3697
3992
|
InputFieldNumber,
|
|
3698
3993
|
KpiSection,
|
|
@@ -3712,6 +4007,7 @@ export {
|
|
|
3712
4007
|
Sidebar,
|
|
3713
4008
|
SortFilter,
|
|
3714
4009
|
Switch,
|
|
4010
|
+
SwitchSelect,
|
|
3715
4011
|
TabSelectionButton,
|
|
3716
4012
|
TextAreaInput,
|
|
3717
4013
|
TextInput,
|