@esic-lab/data-core-ui 0.0.61 → 0.0.62
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/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +558 -514
- package/dist/index.mjs +406 -363
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -471,10 +471,52 @@ var TabSelectionButton = ({ title, now, onClickGoto }) => {
|
|
|
471
471
|
] });
|
|
472
472
|
};
|
|
473
473
|
|
|
474
|
-
// src/
|
|
474
|
+
// src/Button/TertiaryButton/TertiaryButton.tsx
|
|
475
|
+
import { Button as Button3, ConfigProvider as ConfigProvider3 } from "antd";
|
|
475
476
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
476
|
-
function
|
|
477
|
+
function TertiaryButton({
|
|
478
|
+
title,
|
|
479
|
+
onClick,
|
|
480
|
+
disabled,
|
|
481
|
+
iconPlacement = "start",
|
|
482
|
+
size = "large",
|
|
483
|
+
colorPrimary = "#000",
|
|
484
|
+
colorPrimaryHover = "#4d5461",
|
|
485
|
+
textColor = "white",
|
|
486
|
+
icon
|
|
487
|
+
}) {
|
|
488
|
+
const textClass = size === "large" ? "body-1" : "body-3";
|
|
477
489
|
return /* @__PURE__ */ jsx5(
|
|
490
|
+
ConfigProvider3,
|
|
491
|
+
{
|
|
492
|
+
theme: {
|
|
493
|
+
token: {
|
|
494
|
+
colorPrimary,
|
|
495
|
+
colorPrimaryHover,
|
|
496
|
+
colorText: textColor
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
children: /* @__PURE__ */ jsx5(
|
|
500
|
+
Button3,
|
|
501
|
+
{
|
|
502
|
+
size,
|
|
503
|
+
onClick,
|
|
504
|
+
type: "primary",
|
|
505
|
+
className: textClass,
|
|
506
|
+
disabled,
|
|
507
|
+
icon,
|
|
508
|
+
iconPosition: iconPlacement,
|
|
509
|
+
children: title
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
}
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// src/Loader/Loader/Loader.tsx
|
|
517
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
518
|
+
function Loader({ size = 25, color = "#000000" }) {
|
|
519
|
+
return /* @__PURE__ */ jsx6(
|
|
478
520
|
"div",
|
|
479
521
|
{
|
|
480
522
|
style: {
|
|
@@ -492,7 +534,7 @@ function Loader({ size = 25, color = "#000000" }) {
|
|
|
492
534
|
|
|
493
535
|
// src/Checkbox/Checkbox/Checkbox.tsx
|
|
494
536
|
import { IconCheck } from "@tabler/icons-react";
|
|
495
|
-
import { jsx as
|
|
537
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
496
538
|
function Checkbox({ label, checked, onChange, disabled }) {
|
|
497
539
|
const handleClick = () => {
|
|
498
540
|
if (!disabled) {
|
|
@@ -507,32 +549,32 @@ function Checkbox({ label, checked, onChange, disabled }) {
|
|
|
507
549
|
"aria-disabled": disabled,
|
|
508
550
|
onClick: handleClick,
|
|
509
551
|
children: [
|
|
510
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ jsx7(
|
|
511
553
|
"div",
|
|
512
554
|
{
|
|
513
555
|
className: `flex justify-center items-center border-[1px] border-black w-[24px] h-[24px] rounded-[8px] transition-colors duration-100
|
|
514
556
|
${checked ? "bg-black text-white" : "bg-white text-black"}
|
|
515
557
|
${disabled ? "pointer-events-none" : ""}`,
|
|
516
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ jsx7(
|
|
517
559
|
"span",
|
|
518
560
|
{
|
|
519
561
|
className: `flex justify-center items-center transition-transform duration-150
|
|
520
562
|
${checked ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
521
|
-
children: /* @__PURE__ */
|
|
563
|
+
children: /* @__PURE__ */ jsx7(IconCheck, { size: 20 })
|
|
522
564
|
}
|
|
523
565
|
)
|
|
524
566
|
}
|
|
525
567
|
),
|
|
526
|
-
label && /* @__PURE__ */
|
|
568
|
+
label && /* @__PURE__ */ jsx7("p", { className: "body-1 select-none", children: label })
|
|
527
569
|
]
|
|
528
570
|
}
|
|
529
571
|
);
|
|
530
572
|
}
|
|
531
573
|
|
|
532
574
|
// src/Checkbox/CheckboxGroup/CheckboxGroup.tsx
|
|
533
|
-
import { jsx as
|
|
575
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
534
576
|
function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
535
|
-
return /* @__PURE__ */
|
|
577
|
+
return /* @__PURE__ */ jsx8("div", { className: `flex gap-4 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsx8(
|
|
536
578
|
Checkbox,
|
|
537
579
|
{
|
|
538
580
|
checked: opt.checked,
|
|
@@ -545,14 +587,14 @@ function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
|
545
587
|
}
|
|
546
588
|
|
|
547
589
|
// src/Radio/Radio/Radio.tsx
|
|
548
|
-
import { jsx as
|
|
590
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
549
591
|
function Radio({ selected, onChange, disabled }) {
|
|
550
592
|
const handleClick = () => {
|
|
551
593
|
if (!disabled) {
|
|
552
594
|
onChange(!selected);
|
|
553
595
|
}
|
|
554
596
|
};
|
|
555
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ jsx9(
|
|
556
598
|
"div",
|
|
557
599
|
{
|
|
558
600
|
className: `
|
|
@@ -561,22 +603,22 @@ function Radio({ selected, onChange, disabled }) {
|
|
|
561
603
|
`,
|
|
562
604
|
onClick: handleClick,
|
|
563
605
|
"aria-disabled": disabled,
|
|
564
|
-
children: selected && /* @__PURE__ */
|
|
606
|
+
children: selected && /* @__PURE__ */ jsx9("div", { className: `bg-black w-[10px] h-[10px] rounded-full transition-all duration-300` })
|
|
565
607
|
}
|
|
566
608
|
);
|
|
567
609
|
}
|
|
568
610
|
|
|
569
611
|
// src/Radio/RadioGroup/RadioGroup.tsx
|
|
570
|
-
import { jsx as
|
|
612
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
571
613
|
function RadioGroup({ options, value, onChange, alignment = "horizontal" }) {
|
|
572
|
-
return /* @__PURE__ */
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
/* @__PURE__ */
|
|
614
|
+
return /* @__PURE__ */ jsx10("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsxs4("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
615
|
+
/* @__PURE__ */ jsx10(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value), disabled: opt.disabled }),
|
|
616
|
+
/* @__PURE__ */ jsx10("span", { className: `body-1 ${opt.disabled ? "text-gray-400 cursor-not-allowed" : ""}`, children: opt.label })
|
|
575
617
|
] }, opt.value)) });
|
|
576
618
|
}
|
|
577
619
|
|
|
578
620
|
// src/Switch/Switch/Switch.tsx
|
|
579
|
-
import { jsx as
|
|
621
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
580
622
|
function Switch({ label, checked, onChange, disabled }) {
|
|
581
623
|
const handleClick = () => {
|
|
582
624
|
if (!disabled) {
|
|
@@ -584,8 +626,8 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
584
626
|
}
|
|
585
627
|
};
|
|
586
628
|
return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[10px]", children: [
|
|
587
|
-
label && /* @__PURE__ */
|
|
588
|
-
/* @__PURE__ */
|
|
629
|
+
label && /* @__PURE__ */ jsx11("p", { className: `body-1 ${disabled ? "opacity-50 select-none" : ""}`, children: label }),
|
|
630
|
+
/* @__PURE__ */ jsx11(
|
|
589
631
|
"button",
|
|
590
632
|
{
|
|
591
633
|
type: "button",
|
|
@@ -597,7 +639,7 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
597
639
|
${checked ? "bg-primary-500" : "bg-gray-300"}
|
|
598
640
|
${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}
|
|
599
641
|
`,
|
|
600
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ jsx11(
|
|
601
643
|
"div",
|
|
602
644
|
{
|
|
603
645
|
className: `bg-white w-5 h-5 rounded-full shadow-md transform transition-transform duration-300
|
|
@@ -610,7 +652,7 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
610
652
|
}
|
|
611
653
|
|
|
612
654
|
// src/Switch/SwitchSelect/SwitchSelect.tsx
|
|
613
|
-
import { jsx as
|
|
655
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
614
656
|
function SwitchSelect({
|
|
615
657
|
option,
|
|
616
658
|
onClick,
|
|
@@ -623,9 +665,9 @@ function SwitchSelect({
|
|
|
623
665
|
label && /* @__PURE__ */ jsxs6("p", { className: `body-1`, children: [
|
|
624
666
|
label,
|
|
625
667
|
" ",
|
|
626
|
-
required && /* @__PURE__ */
|
|
668
|
+
required && /* @__PURE__ */ jsx12("span", { className: "text-red-500", children: "*" })
|
|
627
669
|
] }),
|
|
628
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ jsx12("div", { className: "flex", children: option.map((item, index) => /* @__PURE__ */ jsx12(
|
|
629
671
|
"button",
|
|
630
672
|
{
|
|
631
673
|
onClick: () => onClick(item.value),
|
|
@@ -643,11 +685,11 @@ function SwitchSelect({
|
|
|
643
685
|
|
|
644
686
|
// src/NavBar/MenuNavBar/MenuNavBar.tsx
|
|
645
687
|
import { useState } from "react";
|
|
646
|
-
import { jsx as
|
|
688
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
647
689
|
function MenuNavBar({ menus, onClick }) {
|
|
648
690
|
const [activePath, setActivePath] = useState("");
|
|
649
|
-
return /* @__PURE__ */
|
|
650
|
-
/* @__PURE__ */
|
|
691
|
+
return /* @__PURE__ */ jsx13("div", { className: "w-full h-full p-[10px] bg-white", children: menus?.map((menu, index) => /* @__PURE__ */ jsxs7("div", { className: `p-[10px] ${index !== 0 ? "mt-[10px]" : ""}`, children: [
|
|
692
|
+
/* @__PURE__ */ jsx13("p", { className: "p-[10px] w-[202px] h-[47px] subtitle-1", children: menu.title }),
|
|
651
693
|
menu?.subMenus.map((subMenu) => /* @__PURE__ */ jsxs7(
|
|
652
694
|
"div",
|
|
653
695
|
{
|
|
@@ -658,9 +700,9 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
658
700
|
setActivePath(subMenu.path);
|
|
659
701
|
},
|
|
660
702
|
children: [
|
|
661
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ jsx13("span", { className: "flex justify-center items-center w-[24px] h-[24px] text-[20px]", children: activePath === subMenu.path ? subMenu.iconActive ?? subMenu.icon : subMenu.icon }),
|
|
662
704
|
subMenu.title,
|
|
663
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ jsx13("span", { className: "flex ml-auto", children: subMenu.customNode && subMenu.customNode })
|
|
664
706
|
]
|
|
665
707
|
},
|
|
666
708
|
`sub_${subMenu.title}`
|
|
@@ -671,39 +713,39 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
671
713
|
// src/NavBar/MenuNavBar/Sidebar.tsx
|
|
672
714
|
import { IconChevronLeftPipe, IconChevronRightPipe } from "@tabler/icons-react";
|
|
673
715
|
import { createContext, useContext, useState as useState2 } from "react";
|
|
674
|
-
import { jsx as
|
|
716
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
675
717
|
var SidebarContext = createContext({ expanded: false });
|
|
676
718
|
function Sidebar({ children, logo }) {
|
|
677
719
|
const [expanded, setExpanded] = useState2(true);
|
|
678
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ jsx14("aside", { className: "h-screen", children: /* @__PURE__ */ jsxs8("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
|
|
679
721
|
/* @__PURE__ */ jsxs8("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
|
|
680
|
-
expanded && logo && /* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
722
|
+
expanded && logo && /* @__PURE__ */ jsx14("img", { src: logo, width: 120, className: "ml-auto" }),
|
|
723
|
+
/* @__PURE__ */ jsx14(
|
|
682
724
|
"button",
|
|
683
725
|
{
|
|
684
726
|
className: "p-1.5 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer ml-auto",
|
|
685
727
|
onClick: () => setExpanded((curr) => !curr),
|
|
686
|
-
children: expanded ? /* @__PURE__ */
|
|
728
|
+
children: expanded ? /* @__PURE__ */ jsx14(IconChevronLeftPipe, {}) : /* @__PURE__ */ jsx14(IconChevronRightPipe, {})
|
|
687
729
|
}
|
|
688
730
|
)
|
|
689
731
|
] }),
|
|
690
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ jsx14(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ jsx14("ul", { className: "flex-1 px-3", children }) })
|
|
691
733
|
] }) });
|
|
692
734
|
}
|
|
693
735
|
|
|
694
736
|
// src/NavBar/TopNavBar/TopNavBar.tsx
|
|
695
737
|
import { IconBellRinging } from "@tabler/icons-react";
|
|
696
|
-
import { jsx as
|
|
738
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
697
739
|
function TopNavBar({ onClickNoti, logo }) {
|
|
698
740
|
return /* @__PURE__ */ jsxs9("div", { className: "w-full h-full flex", children: [
|
|
699
741
|
/* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
|
|
700
742
|
logo,
|
|
701
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ jsx15("p", { className: "subtitle-1", children: "Project Management" })
|
|
702
744
|
] }),
|
|
703
745
|
/* @__PURE__ */ jsxs9("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
746
|
+
/* @__PURE__ */ jsx15("div", { children: "Search" }),
|
|
747
|
+
/* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsx15(IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
|
|
748
|
+
/* @__PURE__ */ jsx15("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
|
|
707
749
|
] })
|
|
708
750
|
] });
|
|
709
751
|
}
|
|
@@ -715,7 +757,7 @@ import { useState as useState3 } from "react";
|
|
|
715
757
|
// src/Table/Pagination/Pagination.tsx
|
|
716
758
|
import { IconArrowLeft, IconArrowRight } from "@tabler/icons-react";
|
|
717
759
|
import { useMemo } from "react";
|
|
718
|
-
import { jsx as
|
|
760
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
719
761
|
function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
720
762
|
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
721
763
|
const getPages = useMemo(() => {
|
|
@@ -747,13 +789,13 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
747
789
|
disabled: currentPage === 1,
|
|
748
790
|
onClick: () => onPageChange(currentPage - 1),
|
|
749
791
|
children: [
|
|
750
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ jsx16(IconArrowLeft, {}),
|
|
751
793
|
"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A"
|
|
752
794
|
]
|
|
753
795
|
}
|
|
754
796
|
),
|
|
755
797
|
getPages.map(
|
|
756
|
-
(page, i) => typeof page === "string" ? /* @__PURE__ */
|
|
798
|
+
(page, i) => typeof page === "string" ? /* @__PURE__ */ jsx16("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ jsx16(
|
|
757
799
|
"button",
|
|
758
800
|
{
|
|
759
801
|
className: `w-[32px] h-[32px] rounded-[8px] px-3 py-1 cursor-pointer
|
|
@@ -772,7 +814,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
772
814
|
onClick: () => onPageChange(currentPage + 1),
|
|
773
815
|
children: [
|
|
774
816
|
"\u0E16\u0E31\u0E14\u0E44\u0E1B",
|
|
775
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ jsx16(IconArrowRight, {})
|
|
776
818
|
]
|
|
777
819
|
}
|
|
778
820
|
)
|
|
@@ -780,7 +822,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
780
822
|
}
|
|
781
823
|
|
|
782
824
|
// src/Table/DataTable/DataTable.tsx
|
|
783
|
-
import { Fragment, jsx as
|
|
825
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
784
826
|
function DataTable({ columns, data, onSort, isLoading }) {
|
|
785
827
|
const cols = Math.max(1, columns.length);
|
|
786
828
|
const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
|
|
@@ -793,13 +835,13 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
793
835
|
}
|
|
794
836
|
};
|
|
795
837
|
return /* @__PURE__ */ jsxs11("div", { className: "border rounded-md w-full h-full", children: [
|
|
796
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ jsx17("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
|
|
797
839
|
const isActive = sortConfig?.key === col.accessor;
|
|
798
840
|
const direction = isActive ? sortConfig?.direction : null;
|
|
799
841
|
return /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
|
|
800
842
|
col.header,
|
|
801
843
|
col.sortable && /* @__PURE__ */ jsxs11(Fragment, { children: [
|
|
802
|
-
direction === null && /* @__PURE__ */
|
|
844
|
+
direction === null && /* @__PURE__ */ jsx17(
|
|
803
845
|
IconSelector,
|
|
804
846
|
{
|
|
805
847
|
size: 15,
|
|
@@ -807,7 +849,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
807
849
|
onClick: () => onSorting({ key: col.accessor, direction: "asc" })
|
|
808
850
|
}
|
|
809
851
|
),
|
|
810
|
-
direction === "asc" && /* @__PURE__ */
|
|
852
|
+
direction === "asc" && /* @__PURE__ */ jsx17(
|
|
811
853
|
IconSortAscending,
|
|
812
854
|
{
|
|
813
855
|
size: 15,
|
|
@@ -815,7 +857,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
815
857
|
onClick: () => onSorting({ key: col.accessor, direction: "desc" })
|
|
816
858
|
}
|
|
817
859
|
),
|
|
818
|
-
direction === "desc" && /* @__PURE__ */
|
|
860
|
+
direction === "desc" && /* @__PURE__ */ jsx17(
|
|
819
861
|
IconSortDescending,
|
|
820
862
|
{
|
|
821
863
|
size: 15,
|
|
@@ -826,23 +868,23 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
826
868
|
] })
|
|
827
869
|
] }, i);
|
|
828
870
|
}) }),
|
|
829
|
-
isLoading ? /* @__PURE__ */
|
|
871
|
+
isLoading ? /* @__PURE__ */ jsx17("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ jsx17(Loader, {}) }) : /* @__PURE__ */ jsx17(Fragment, { children: data.map((row, i) => /* @__PURE__ */ jsx17(
|
|
830
872
|
"div",
|
|
831
873
|
{
|
|
832
874
|
className: `${gridClass} ${data.length - 1 !== i ? "border-b border-gray-200" : ""} items-center`,
|
|
833
875
|
style: { ["--cols"]: cols },
|
|
834
|
-
children: columns.map((col, c) => /* @__PURE__ */
|
|
876
|
+
children: columns.map((col, c) => /* @__PURE__ */ jsx17("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
|
|
835
877
|
},
|
|
836
878
|
i
|
|
837
879
|
)) }),
|
|
838
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
|
|
839
881
|
] });
|
|
840
882
|
}
|
|
841
883
|
|
|
842
884
|
// src/Table/DataTable/AntDataTable.tsx
|
|
843
|
-
import { ConfigProvider as
|
|
885
|
+
import { ConfigProvider as ConfigProvider4, Table } from "antd";
|
|
844
886
|
import { useState as useState4 } from "react";
|
|
845
|
-
import { Fragment as Fragment2, jsx as
|
|
887
|
+
import { Fragment as Fragment2, jsx as jsx18 } from "react/jsx-runtime";
|
|
846
888
|
function AntDataTable({
|
|
847
889
|
dataSource,
|
|
848
890
|
columns,
|
|
@@ -868,8 +910,8 @@ function AntDataTable({
|
|
|
868
910
|
onChange?.(paginationArgs, filters, sorter, extra);
|
|
869
911
|
onFilter(filters);
|
|
870
912
|
};
|
|
871
|
-
return /* @__PURE__ */
|
|
872
|
-
|
|
913
|
+
return /* @__PURE__ */ jsx18(Fragment2, { children: /* @__PURE__ */ jsx18(
|
|
914
|
+
ConfigProvider4,
|
|
873
915
|
{
|
|
874
916
|
theme: {
|
|
875
917
|
components: {},
|
|
@@ -878,7 +920,7 @@ function AntDataTable({
|
|
|
878
920
|
fontSize: 14
|
|
879
921
|
}
|
|
880
922
|
},
|
|
881
|
-
children: /* @__PURE__ */
|
|
923
|
+
children: /* @__PURE__ */ jsx18(
|
|
882
924
|
Table,
|
|
883
925
|
{
|
|
884
926
|
dataSource,
|
|
@@ -902,7 +944,7 @@ import timeGridPlugin from "@fullcalendar/timegrid";
|
|
|
902
944
|
import interactionPlugin from "@fullcalendar/interaction";
|
|
903
945
|
import thLocale from "@fullcalendar/core/locales/th";
|
|
904
946
|
import { IconChevronLeft, IconChevronRight, IconX } from "@tabler/icons-react";
|
|
905
|
-
import { Fragment as Fragment3, jsx as
|
|
947
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
906
948
|
function Calendar({ events }) {
|
|
907
949
|
const calendarRef = useRef(null);
|
|
908
950
|
const [monthTitle, setMonthTitle] = useState5("");
|
|
@@ -923,9 +965,9 @@ function Calendar({ events }) {
|
|
|
923
965
|
}, []);
|
|
924
966
|
return /* @__PURE__ */ jsxs12("div", { className: "fc w-full h-full relative z-10", children: [
|
|
925
967
|
/* @__PURE__ */ jsxs12("div", { className: "flex mb-[8px]", children: [
|
|
926
|
-
/* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ jsx19("p", { className: "headline-5", children: monthTitle }),
|
|
927
969
|
/* @__PURE__ */ jsxs12("div", { className: "flex gap-[10px] ml-auto", children: [
|
|
928
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ jsx19(
|
|
929
971
|
"p",
|
|
930
972
|
{
|
|
931
973
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -936,7 +978,7 @@ function Calendar({ events }) {
|
|
|
936
978
|
children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
|
|
937
979
|
}
|
|
938
980
|
),
|
|
939
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ jsx19(
|
|
940
982
|
"p",
|
|
941
983
|
{
|
|
942
984
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -947,7 +989,7 @@ function Calendar({ events }) {
|
|
|
947
989
|
children: "Month"
|
|
948
990
|
}
|
|
949
991
|
),
|
|
950
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ jsx19(
|
|
951
993
|
"p",
|
|
952
994
|
{
|
|
953
995
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -958,7 +1000,7 @@ function Calendar({ events }) {
|
|
|
958
1000
|
children: "Week"
|
|
959
1001
|
}
|
|
960
1002
|
),
|
|
961
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ jsx19(
|
|
962
1004
|
"p",
|
|
963
1005
|
{
|
|
964
1006
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -969,7 +1011,7 @@ function Calendar({ events }) {
|
|
|
969
1011
|
children: "Day"
|
|
970
1012
|
}
|
|
971
1013
|
),
|
|
972
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ jsx19(
|
|
973
1015
|
"button",
|
|
974
1016
|
{
|
|
975
1017
|
className: "cursor-pointer",
|
|
@@ -977,10 +1019,10 @@ function Calendar({ events }) {
|
|
|
977
1019
|
calendarRef.current?.getApi().prev();
|
|
978
1020
|
updateTitle();
|
|
979
1021
|
},
|
|
980
|
-
children: /* @__PURE__ */
|
|
1022
|
+
children: /* @__PURE__ */ jsx19(IconChevronLeft, {})
|
|
981
1023
|
}
|
|
982
1024
|
),
|
|
983
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ jsx19(
|
|
984
1026
|
"button",
|
|
985
1027
|
{
|
|
986
1028
|
className: "cursor-pointer",
|
|
@@ -988,12 +1030,12 @@ function Calendar({ events }) {
|
|
|
988
1030
|
calendarRef.current?.getApi().next();
|
|
989
1031
|
updateTitle();
|
|
990
1032
|
},
|
|
991
|
-
children: /* @__PURE__ */
|
|
1033
|
+
children: /* @__PURE__ */ jsx19(IconChevronRight, {})
|
|
992
1034
|
}
|
|
993
1035
|
)
|
|
994
1036
|
] })
|
|
995
1037
|
] }),
|
|
996
|
-
/* @__PURE__ */
|
|
1038
|
+
/* @__PURE__ */ jsx19("div", { className: "relative z-10", children: /* @__PURE__ */ jsx19(
|
|
997
1039
|
FullCalendar,
|
|
998
1040
|
{
|
|
999
1041
|
ref: calendarRef,
|
|
@@ -1022,28 +1064,28 @@ function Calendar({ events }) {
|
|
|
1022
1064
|
});
|
|
1023
1065
|
},
|
|
1024
1066
|
eventContent: (arg) => {
|
|
1025
|
-
return /* @__PURE__ */
|
|
1067
|
+
return /* @__PURE__ */ jsx19(Fragment3, { children: /* @__PURE__ */ jsx19("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 }) });
|
|
1026
1068
|
},
|
|
1027
1069
|
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
1028
1070
|
}
|
|
1029
1071
|
) }),
|
|
1030
|
-
openPopup && /* @__PURE__ */
|
|
1072
|
+
openPopup && /* @__PURE__ */ jsx19("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ jsx19(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
|
|
1031
1073
|
] });
|
|
1032
1074
|
}
|
|
1033
1075
|
function EventPopUp({ event, onClose }) {
|
|
1034
1076
|
return /* @__PURE__ */ jsxs12("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ jsx19("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ jsx19(IconX, { className: "w-6 h-6 text-gray-600" }) }),
|
|
1078
|
+
/* @__PURE__ */ jsx19("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ jsx19("h2", { className: "text-lg font-semibold", children: event.title }) }),
|
|
1037
1079
|
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
|
|
1038
1080
|
/* @__PURE__ */ jsxs12("p", { children: [
|
|
1039
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ jsx19("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
|
|
1040
1082
|
event?.start?.toLocaleString?.() || String(event?.start)
|
|
1041
1083
|
] }),
|
|
1042
1084
|
/* @__PURE__ */ jsxs12("p", { children: [
|
|
1043
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ jsx19("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
|
|
1044
1086
|
event?.end?.toLocaleString?.() || String(event?.end)
|
|
1045
1087
|
] }),
|
|
1046
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ jsx19("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" })
|
|
1047
1089
|
] })
|
|
1048
1090
|
] });
|
|
1049
1091
|
}
|
|
@@ -1051,7 +1093,7 @@ function EventPopUp({ event, onClose }) {
|
|
|
1051
1093
|
// src/Input/TextInput/TextInput.tsx
|
|
1052
1094
|
import { IconEye, IconEyeOff } from "@tabler/icons-react";
|
|
1053
1095
|
import { useState as useState6 } from "react";
|
|
1054
|
-
import { jsx as
|
|
1096
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1055
1097
|
function TextInput({
|
|
1056
1098
|
label,
|
|
1057
1099
|
placeholder,
|
|
@@ -1071,7 +1113,7 @@ function TextInput({
|
|
|
1071
1113
|
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
1072
1114
|
label && /* @__PURE__ */ jsxs13("p", { className: "body-1 mb-[8px]", children: [
|
|
1073
1115
|
label,
|
|
1074
|
-
required && /* @__PURE__ */
|
|
1116
|
+
required && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "\xA0*" })
|
|
1075
1117
|
] }),
|
|
1076
1118
|
/* @__PURE__ */ jsxs13(
|
|
1077
1119
|
"div",
|
|
@@ -1079,7 +1121,7 @@ function TextInput({
|
|
|
1079
1121
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1080
1122
|
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-500" : ""}`,
|
|
1081
1123
|
children: [
|
|
1082
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ jsx20(
|
|
1083
1125
|
"input",
|
|
1084
1126
|
{
|
|
1085
1127
|
className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
|
|
@@ -1092,17 +1134,17 @@ function TextInput({
|
|
|
1092
1134
|
disabled
|
|
1093
1135
|
}
|
|
1094
1136
|
),
|
|
1095
|
-
type === "password" && (showPassword ? /* @__PURE__ */
|
|
1137
|
+
type === "password" && (showPassword ? /* @__PURE__ */ jsx20(IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ jsx20(IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
|
|
1096
1138
|
]
|
|
1097
1139
|
}
|
|
1098
1140
|
),
|
|
1099
|
-
error && /* @__PURE__ */
|
|
1141
|
+
error && /* @__PURE__ */ jsx20("p", { className: "text-red-500 body-1", children: error })
|
|
1100
1142
|
] });
|
|
1101
1143
|
}
|
|
1102
1144
|
|
|
1103
1145
|
// src/Input/TextArea/TextArea.tsx
|
|
1104
|
-
import { ConfigProvider as
|
|
1105
|
-
import { Fragment as Fragment4, jsx as
|
|
1146
|
+
import { ConfigProvider as ConfigProvider5, Input } from "antd";
|
|
1147
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1106
1148
|
var { TextArea } = Input;
|
|
1107
1149
|
function TextAreaInput({
|
|
1108
1150
|
label,
|
|
@@ -1117,8 +1159,8 @@ function TextAreaInput({
|
|
|
1117
1159
|
error,
|
|
1118
1160
|
disabled
|
|
1119
1161
|
}) {
|
|
1120
|
-
return /* @__PURE__ */
|
|
1121
|
-
|
|
1162
|
+
return /* @__PURE__ */ jsx21(Fragment4, { children: /* @__PURE__ */ jsx21(
|
|
1163
|
+
ConfigProvider5,
|
|
1122
1164
|
{
|
|
1123
1165
|
theme: {
|
|
1124
1166
|
components: {},
|
|
@@ -1131,9 +1173,9 @@ function TextAreaInput({
|
|
|
1131
1173
|
label && /* @__PURE__ */ jsxs14("p", { className: "body-1 mb-[8px]", children: [
|
|
1132
1174
|
label,
|
|
1133
1175
|
" ",
|
|
1134
|
-
required && /* @__PURE__ */
|
|
1176
|
+
required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "\xA0*" })
|
|
1135
1177
|
] }),
|
|
1136
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ jsx21(
|
|
1137
1179
|
TextArea,
|
|
1138
1180
|
{
|
|
1139
1181
|
value,
|
|
@@ -1149,15 +1191,15 @@ function TextAreaInput({
|
|
|
1149
1191
|
disabled
|
|
1150
1192
|
}
|
|
1151
1193
|
),
|
|
1152
|
-
error && /* @__PURE__ */
|
|
1194
|
+
error && /* @__PURE__ */ jsx21("p", { className: "text-red-500 body-1", children: error })
|
|
1153
1195
|
] })
|
|
1154
1196
|
}
|
|
1155
1197
|
) });
|
|
1156
1198
|
}
|
|
1157
1199
|
|
|
1158
1200
|
// src/Input/InputField/InputField.tsx
|
|
1159
|
-
import { ConfigProvider as
|
|
1160
|
-
import { jsx as
|
|
1201
|
+
import { ConfigProvider as ConfigProvider6, Input as Input2, Space } from "antd";
|
|
1202
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1161
1203
|
function InputField({
|
|
1162
1204
|
value,
|
|
1163
1205
|
onChange,
|
|
@@ -1173,8 +1215,8 @@ function InputField({
|
|
|
1173
1215
|
onClear,
|
|
1174
1216
|
statickey
|
|
1175
1217
|
}) {
|
|
1176
|
-
return /* @__PURE__ */
|
|
1177
|
-
|
|
1218
|
+
return /* @__PURE__ */ jsx22(
|
|
1219
|
+
ConfigProvider6,
|
|
1178
1220
|
{
|
|
1179
1221
|
theme: {
|
|
1180
1222
|
token: {
|
|
@@ -1183,13 +1225,13 @@ function InputField({
|
|
|
1183
1225
|
},
|
|
1184
1226
|
children: /* @__PURE__ */ jsxs15("div", { className: "container-input", children: [
|
|
1185
1227
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
1186
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ jsx22("span", { className: "body-1", children: label }),
|
|
1187
1229
|
" ",
|
|
1188
|
-
required && /* @__PURE__ */
|
|
1230
|
+
required && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
|
|
1189
1231
|
] }),
|
|
1190
1232
|
/* @__PURE__ */ jsxs15(Space.Compact, { children: [
|
|
1191
|
-
statickey && /* @__PURE__ */
|
|
1192
|
-
/* @__PURE__ */
|
|
1233
|
+
statickey && /* @__PURE__ */ jsx22("span", { className: "items-center flex px-2 bg-gray-300 rounded-l-md body-1", children: statickey }),
|
|
1234
|
+
/* @__PURE__ */ jsx22(
|
|
1193
1235
|
Input2,
|
|
1194
1236
|
{
|
|
1195
1237
|
value,
|
|
@@ -1205,15 +1247,15 @@ function InputField({
|
|
|
1205
1247
|
}
|
|
1206
1248
|
)
|
|
1207
1249
|
] }),
|
|
1208
|
-
error && /* @__PURE__ */
|
|
1250
|
+
error && /* @__PURE__ */ jsx22("p", { className: "text-red-500 caption-1", children: error })
|
|
1209
1251
|
] })
|
|
1210
1252
|
}
|
|
1211
1253
|
);
|
|
1212
1254
|
}
|
|
1213
1255
|
|
|
1214
1256
|
// src/Input/InputFieldNumber/InputFieldNumber.tsx
|
|
1215
|
-
import { ConfigProvider as
|
|
1216
|
-
import { jsx as
|
|
1257
|
+
import { ConfigProvider as ConfigProvider7, InputNumber } from "antd";
|
|
1258
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1217
1259
|
function InputFieldNumber({
|
|
1218
1260
|
value,
|
|
1219
1261
|
onChange,
|
|
@@ -1234,8 +1276,8 @@ function InputFieldNumber({
|
|
|
1234
1276
|
formatter,
|
|
1235
1277
|
parser
|
|
1236
1278
|
}) {
|
|
1237
|
-
return /* @__PURE__ */
|
|
1238
|
-
|
|
1279
|
+
return /* @__PURE__ */ jsx23(
|
|
1280
|
+
ConfigProvider7,
|
|
1239
1281
|
{
|
|
1240
1282
|
theme: {
|
|
1241
1283
|
token: {
|
|
@@ -1244,11 +1286,11 @@ function InputFieldNumber({
|
|
|
1244
1286
|
},
|
|
1245
1287
|
children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
|
|
1246
1288
|
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1247
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ jsx23("span", { className: "body-1", children: label }),
|
|
1248
1290
|
" ",
|
|
1249
|
-
required && /* @__PURE__ */
|
|
1291
|
+
required && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
|
|
1250
1292
|
] }),
|
|
1251
|
-
/* @__PURE__ */
|
|
1293
|
+
/* @__PURE__ */ jsx23(
|
|
1252
1294
|
InputNumber,
|
|
1253
1295
|
{
|
|
1254
1296
|
value: value ?? void 0,
|
|
@@ -1277,7 +1319,7 @@ function InputFieldNumber({
|
|
|
1277
1319
|
})
|
|
1278
1320
|
}
|
|
1279
1321
|
),
|
|
1280
|
-
error && /* @__PURE__ */
|
|
1322
|
+
error && /* @__PURE__ */ jsx23("p", { className: "text-red-500 caption-1", children: error })
|
|
1281
1323
|
] })
|
|
1282
1324
|
}
|
|
1283
1325
|
);
|
|
@@ -1290,7 +1332,7 @@ var import_buddhistEra = __toESM(require_buddhistEra());
|
|
|
1290
1332
|
import { useState as useState7, useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
1291
1333
|
import { format } from "date-fns";
|
|
1292
1334
|
import { th as thFns } from "date-fns/locale";
|
|
1293
|
-
import { jsx as
|
|
1335
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1294
1336
|
import_dayjs.default.extend(import_buddhistEra.default);
|
|
1295
1337
|
import_dayjs.default.locale("th");
|
|
1296
1338
|
function DatePickerBasic({
|
|
@@ -1356,15 +1398,15 @@ function DatePickerBasic({
|
|
|
1356
1398
|
}, []);
|
|
1357
1399
|
return /* @__PURE__ */ jsxs17("div", { ref: wrapperRef, style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
|
|
1358
1400
|
/* @__PURE__ */ jsxs17("div", { className: "mb-1", children: [
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
required && /* @__PURE__ */
|
|
1401
|
+
/* @__PURE__ */ jsx24("span", { className: "body-1", children: label }),
|
|
1402
|
+
required && /* @__PURE__ */ jsx24("span", { className: "text-red-500 ml-1", children: "*" })
|
|
1361
1403
|
] }),
|
|
1362
|
-
/* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ jsx24(
|
|
1363
1405
|
"div",
|
|
1364
1406
|
{
|
|
1365
1407
|
className: `border rounded px-3 py-2 cursor-pointer bg-white flex items-center ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${error ? "border-red-500" : "border-gray-300"}`,
|
|
1366
1408
|
onClick: () => !disabled && setOpen(!open),
|
|
1367
|
-
children: /* @__PURE__ */
|
|
1409
|
+
children: /* @__PURE__ */ jsx24("div", { className: "flex-1", children: value ? formatThaiBE(value) : /* @__PURE__ */ jsx24("span", { className: "text-gray-400", children: placeholder }) })
|
|
1368
1410
|
}
|
|
1369
1411
|
),
|
|
1370
1412
|
open && /* @__PURE__ */ jsxs17(
|
|
@@ -1374,7 +1416,7 @@ function DatePickerBasic({
|
|
|
1374
1416
|
style: { fontFamily: "Kanit", fontSize: 16 },
|
|
1375
1417
|
children: [
|
|
1376
1418
|
/* @__PURE__ */ jsxs17("div", { className: "flex justify-between items-center mb-3", children: [
|
|
1377
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ jsx24(
|
|
1378
1420
|
"button",
|
|
1379
1421
|
{
|
|
1380
1422
|
onClick: () => setCalendar(calendar.subtract(1, "month")),
|
|
@@ -1387,11 +1429,11 @@ function DatePickerBasic({
|
|
|
1387
1429
|
" ",
|
|
1388
1430
|
calendar.year() + 543
|
|
1389
1431
|
] }),
|
|
1390
|
-
/* @__PURE__ */
|
|
1432
|
+
/* @__PURE__ */ jsx24("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2 hover:bg-gray-100 rounded", children: "\u25B6" })
|
|
1391
1433
|
] }),
|
|
1392
|
-
/* @__PURE__ */
|
|
1434
|
+
/* @__PURE__ */ jsx24("div", { className: "grid grid-cols-7 text-center text-gray-500 text-sm mb-2 font-medium", children: ["\u0E2D\u0E32", "\u0E08", "\u0E2D", "\u0E1E", "\u0E1E\u0E24", "\u0E28", "\u0E2A"].map((d) => /* @__PURE__ */ jsx24("div", { children: d }, d)) }),
|
|
1393
1435
|
/* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-7 gap-1 text-center", children: [
|
|
1394
|
-
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */
|
|
1436
|
+
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ jsx24("div", {}, `empty-${i}`)),
|
|
1395
1437
|
Array.from({ length: daysInMonth }, (_, i) => i + 1).map((d) => {
|
|
1396
1438
|
const dateObj = calendar.date(d);
|
|
1397
1439
|
const isDisable = isDisabled(dateObj);
|
|
@@ -1409,7 +1451,7 @@ function DatePickerBasic({
|
|
|
1409
1451
|
bgClass = "border border-blue-500 font-bold";
|
|
1410
1452
|
textClass = "text-blue-600";
|
|
1411
1453
|
}
|
|
1412
|
-
return /* @__PURE__ */
|
|
1454
|
+
return /* @__PURE__ */ jsx24(
|
|
1413
1455
|
"div",
|
|
1414
1456
|
{
|
|
1415
1457
|
onClick: () => !isDisable && handleSelect(d),
|
|
@@ -1427,7 +1469,7 @@ function DatePickerBasic({
|
|
|
1427
1469
|
]
|
|
1428
1470
|
}
|
|
1429
1471
|
),
|
|
1430
|
-
error && /* @__PURE__ */
|
|
1472
|
+
error && /* @__PURE__ */ jsx24("p", { className: "text-red-500 text-xs mt-1", children: error })
|
|
1431
1473
|
] });
|
|
1432
1474
|
}
|
|
1433
1475
|
|
|
@@ -1438,7 +1480,7 @@ var import_buddhistEra2 = __toESM(require_buddhistEra());
|
|
|
1438
1480
|
import { useState as useState8, useRef as useRef3, useEffect as useEffect3 } from "react";
|
|
1439
1481
|
import { format as format2 } from "date-fns";
|
|
1440
1482
|
import { th as thFns2 } from "date-fns/locale";
|
|
1441
|
-
import { jsx as
|
|
1483
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1442
1484
|
import_dayjs2.default.extend(import_buddhistEra2.default);
|
|
1443
1485
|
import_dayjs2.default.locale("th");
|
|
1444
1486
|
function DatePickerRange({
|
|
@@ -1512,7 +1554,7 @@ function DatePickerRange({
|
|
|
1512
1554
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1513
1555
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1514
1556
|
}, []);
|
|
1515
|
-
const ArrowIcon = () => /* @__PURE__ */
|
|
1557
|
+
const ArrowIcon = () => /* @__PURE__ */ jsx25("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-4 h-4 text-gray-400", children: /* @__PURE__ */ jsx25(
|
|
1516
1558
|
"path",
|
|
1517
1559
|
{
|
|
1518
1560
|
fillRule: "evenodd",
|
|
@@ -1522,8 +1564,8 @@ function DatePickerRange({
|
|
|
1522
1564
|
) });
|
|
1523
1565
|
return /* @__PURE__ */ jsxs18("div", { ref: wrapperRef, style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
|
|
1524
1566
|
/* @__PURE__ */ jsxs18("div", { className: "mb-1", children: [
|
|
1525
|
-
/* @__PURE__ */
|
|
1526
|
-
required && /* @__PURE__ */
|
|
1567
|
+
/* @__PURE__ */ jsx25("span", { className: "body-1", children: label }),
|
|
1568
|
+
required && /* @__PURE__ */ jsx25("span", { className: "text-red-500 ml-1", children: "*" })
|
|
1527
1569
|
] }),
|
|
1528
1570
|
/* @__PURE__ */ jsxs18(
|
|
1529
1571
|
"div",
|
|
@@ -1531,9 +1573,9 @@ function DatePickerRange({
|
|
|
1531
1573
|
className: `border rounded px-3 py-2 cursor-pointer bg-white flex items-center justify-between gap-2 ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${error ? "border-red-500" : "border-gray-300"}`,
|
|
1532
1574
|
onClick: () => !disabled && setOpen(!open),
|
|
1533
1575
|
children: [
|
|
1534
|
-
/* @__PURE__ */
|
|
1535
|
-
/* @__PURE__ */
|
|
1536
|
-
/* @__PURE__ */
|
|
1576
|
+
/* @__PURE__ */ jsx25("div", { className: `flex-1 ${!startDate ? "text-gray-400 font-light" : "text-gray-800"}`, children: startDate ? formatThaiBE(startDate) : "\u0E27\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19" }),
|
|
1577
|
+
/* @__PURE__ */ jsx25("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx25(ArrowIcon, {}) }),
|
|
1578
|
+
/* @__PURE__ */ jsx25("div", { className: `flex-1 text-right ${!endDate ? "text-gray-400 font-light" : "text-gray-800"}`, children: endDate ? formatThaiBE(endDate) : "\u0E27\u0E31\u0E19\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14" })
|
|
1537
1579
|
]
|
|
1538
1580
|
}
|
|
1539
1581
|
),
|
|
@@ -1544,7 +1586,7 @@ function DatePickerRange({
|
|
|
1544
1586
|
style: { fontFamily: "Kanit", fontSize: 16 },
|
|
1545
1587
|
children: [
|
|
1546
1588
|
/* @__PURE__ */ jsxs18("div", { className: "flex justify-between items-center mb-3", children: [
|
|
1547
|
-
/* @__PURE__ */
|
|
1589
|
+
/* @__PURE__ */ jsx25(
|
|
1548
1590
|
"button",
|
|
1549
1591
|
{
|
|
1550
1592
|
onClick: () => setCalendar(calendar.subtract(1, "month")),
|
|
@@ -1557,11 +1599,11 @@ function DatePickerRange({
|
|
|
1557
1599
|
" ",
|
|
1558
1600
|
calendar.year() + 543
|
|
1559
1601
|
] }),
|
|
1560
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ jsx25("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2 hover:bg-gray-100 rounded", children: "\u25B6" })
|
|
1561
1603
|
] }),
|
|
1562
|
-
/* @__PURE__ */
|
|
1604
|
+
/* @__PURE__ */ jsx25("div", { className: "grid grid-cols-7 text-center text-gray-500 text-sm mb-2 font-medium", children: ["\u0E2D\u0E32", "\u0E08", "\u0E2D", "\u0E1E", "\u0E1E\u0E24", "\u0E28", "\u0E2A"].map((d) => /* @__PURE__ */ jsx25("div", { children: d }, d)) }),
|
|
1563
1605
|
/* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-7 gap-y-1 text-center", children: [
|
|
1564
|
-
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */
|
|
1606
|
+
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ jsx25("div", {}, `empty-${i}`)),
|
|
1565
1607
|
Array.from({ length: daysInMonth }, (_, i) => i + 1).map((d) => {
|
|
1566
1608
|
const currentObj = calendar.date(d);
|
|
1567
1609
|
const isDisable = isDisabled(currentObj);
|
|
@@ -1584,7 +1626,7 @@ function DatePickerRange({
|
|
|
1584
1626
|
bgClass = "border border-blue-500 font-bold";
|
|
1585
1627
|
textClass = "text-blue-600";
|
|
1586
1628
|
}
|
|
1587
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsx25(
|
|
1588
1630
|
"div",
|
|
1589
1631
|
{
|
|
1590
1632
|
onClick: () => !isDisable && handleSelect(d),
|
|
@@ -1602,13 +1644,13 @@ function DatePickerRange({
|
|
|
1602
1644
|
]
|
|
1603
1645
|
}
|
|
1604
1646
|
),
|
|
1605
|
-
error && /* @__PURE__ */
|
|
1647
|
+
error && /* @__PURE__ */ jsx25("p", { className: "text-red-500 text-xs mt-1", children: error })
|
|
1606
1648
|
] });
|
|
1607
1649
|
}
|
|
1608
1650
|
|
|
1609
1651
|
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1610
|
-
import { ConfigProvider as
|
|
1611
|
-
import { jsx as
|
|
1652
|
+
import { ConfigProvider as ConfigProvider8, ColorPicker } from "antd";
|
|
1653
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1612
1654
|
function ColorPickerBasic({
|
|
1613
1655
|
value,
|
|
1614
1656
|
onChange,
|
|
@@ -1621,8 +1663,8 @@ function ColorPickerBasic({
|
|
|
1621
1663
|
className,
|
|
1622
1664
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1623
1665
|
}) {
|
|
1624
|
-
return /* @__PURE__ */
|
|
1625
|
-
|
|
1666
|
+
return /* @__PURE__ */ jsx26(
|
|
1667
|
+
ConfigProvider8,
|
|
1626
1668
|
{
|
|
1627
1669
|
theme: {
|
|
1628
1670
|
token: {
|
|
@@ -1632,11 +1674,11 @@ function ColorPickerBasic({
|
|
|
1632
1674
|
},
|
|
1633
1675
|
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
1634
1676
|
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1635
|
-
/* @__PURE__ */
|
|
1677
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: label }),
|
|
1636
1678
|
" ",
|
|
1637
|
-
required && /* @__PURE__ */
|
|
1679
|
+
required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
1638
1680
|
] }),
|
|
1639
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ jsx26(
|
|
1640
1682
|
ColorPicker,
|
|
1641
1683
|
{
|
|
1642
1684
|
defaultFormat,
|
|
@@ -1648,7 +1690,7 @@ function ColorPickerBasic({
|
|
|
1648
1690
|
showText: (color) => {
|
|
1649
1691
|
const hex = color.toHexString();
|
|
1650
1692
|
if (!value) {
|
|
1651
|
-
return /* @__PURE__ */
|
|
1693
|
+
return /* @__PURE__ */ jsx26("span", { children: placeholder });
|
|
1652
1694
|
}
|
|
1653
1695
|
return /* @__PURE__ */ jsxs19("span", { children: [
|
|
1654
1696
|
"(",
|
|
@@ -1659,14 +1701,14 @@ function ColorPickerBasic({
|
|
|
1659
1701
|
disabled
|
|
1660
1702
|
}
|
|
1661
1703
|
),
|
|
1662
|
-
error && /* @__PURE__ */
|
|
1704
|
+
error && /* @__PURE__ */ jsx26("p", { className: "text-red-500 caption-1", children: error })
|
|
1663
1705
|
] })
|
|
1664
1706
|
}
|
|
1665
1707
|
);
|
|
1666
1708
|
}
|
|
1667
1709
|
|
|
1668
1710
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1669
|
-
import { ConfigProvider as
|
|
1711
|
+
import { ConfigProvider as ConfigProvider9, ColorPicker as ColorPicker2, theme } from "antd";
|
|
1670
1712
|
|
|
1671
1713
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1672
1714
|
function _typeof(o) {
|
|
@@ -2368,7 +2410,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2368
2410
|
greyDark.primary = greyDark[5];
|
|
2369
2411
|
|
|
2370
2412
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2371
|
-
import { jsx as
|
|
2413
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2372
2414
|
function genPresets(presets = presetPalettes) {
|
|
2373
2415
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2374
2416
|
label,
|
|
@@ -2395,8 +2437,8 @@ function ColorPalettePickerBasic({
|
|
|
2395
2437
|
red,
|
|
2396
2438
|
green
|
|
2397
2439
|
});
|
|
2398
|
-
return /* @__PURE__ */
|
|
2399
|
-
|
|
2440
|
+
return /* @__PURE__ */ jsx27(
|
|
2441
|
+
ConfigProvider9,
|
|
2400
2442
|
{
|
|
2401
2443
|
theme: {
|
|
2402
2444
|
token: {
|
|
@@ -2406,11 +2448,11 @@ function ColorPalettePickerBasic({
|
|
|
2406
2448
|
},
|
|
2407
2449
|
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
2408
2450
|
/* @__PURE__ */ jsxs20("div", { children: [
|
|
2409
|
-
/* @__PURE__ */
|
|
2451
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: label }),
|
|
2410
2452
|
" ",
|
|
2411
|
-
required && /* @__PURE__ */
|
|
2453
|
+
required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
2412
2454
|
] }),
|
|
2413
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ jsx27(
|
|
2414
2456
|
ColorPicker2,
|
|
2415
2457
|
{
|
|
2416
2458
|
defaultFormat,
|
|
@@ -2423,7 +2465,7 @@ function ColorPalettePickerBasic({
|
|
|
2423
2465
|
showText: (color) => {
|
|
2424
2466
|
const hex = color.toHexString();
|
|
2425
2467
|
if (!value) {
|
|
2426
|
-
return /* @__PURE__ */
|
|
2468
|
+
return /* @__PURE__ */ jsx27("span", { children: placeholder });
|
|
2427
2469
|
}
|
|
2428
2470
|
return /* @__PURE__ */ jsxs20("span", { children: [
|
|
2429
2471
|
"(",
|
|
@@ -2435,15 +2477,15 @@ function ColorPalettePickerBasic({
|
|
|
2435
2477
|
onClear
|
|
2436
2478
|
}
|
|
2437
2479
|
),
|
|
2438
|
-
error && /* @__PURE__ */
|
|
2480
|
+
error && /* @__PURE__ */ jsx27("p", { className: "text-red-500 caption-1", children: error })
|
|
2439
2481
|
] })
|
|
2440
2482
|
}
|
|
2441
2483
|
);
|
|
2442
2484
|
}
|
|
2443
2485
|
|
|
2444
2486
|
// src/Select/SelectField/SelectField.tsx
|
|
2445
|
-
import { Select, ConfigProvider as
|
|
2446
|
-
import { jsx as
|
|
2487
|
+
import { Select, ConfigProvider as ConfigProvider10 } from "antd";
|
|
2488
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2447
2489
|
function SelectField({
|
|
2448
2490
|
value,
|
|
2449
2491
|
onChange,
|
|
@@ -2463,8 +2505,8 @@ function SelectField({
|
|
|
2463
2505
|
size = "middle",
|
|
2464
2506
|
allowClear = true
|
|
2465
2507
|
}) {
|
|
2466
|
-
return /* @__PURE__ */
|
|
2467
|
-
|
|
2508
|
+
return /* @__PURE__ */ jsx28(
|
|
2509
|
+
ConfigProvider10,
|
|
2468
2510
|
{
|
|
2469
2511
|
theme: {
|
|
2470
2512
|
token: {
|
|
@@ -2474,11 +2516,11 @@ function SelectField({
|
|
|
2474
2516
|
},
|
|
2475
2517
|
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
2476
2518
|
/* @__PURE__ */ jsxs21("div", { children: [
|
|
2477
|
-
/* @__PURE__ */
|
|
2519
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: label }),
|
|
2478
2520
|
" ",
|
|
2479
|
-
required && /* @__PURE__ */
|
|
2521
|
+
required && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
2480
2522
|
] }),
|
|
2481
|
-
/* @__PURE__ */
|
|
2523
|
+
/* @__PURE__ */ jsx28(
|
|
2482
2524
|
Select,
|
|
2483
2525
|
{
|
|
2484
2526
|
size,
|
|
@@ -2494,7 +2536,7 @@ function SelectField({
|
|
|
2494
2536
|
options,
|
|
2495
2537
|
mode,
|
|
2496
2538
|
onSearch: handleSearch,
|
|
2497
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2539
|
+
prefix: prefix ? /* @__PURE__ */ jsx28(
|
|
2498
2540
|
"span",
|
|
2499
2541
|
{
|
|
2500
2542
|
style: {
|
|
@@ -2511,15 +2553,15 @@ function SelectField({
|
|
|
2511
2553
|
onClear
|
|
2512
2554
|
}
|
|
2513
2555
|
),
|
|
2514
|
-
error && /* @__PURE__ */
|
|
2556
|
+
error && /* @__PURE__ */ jsx28("p", { className: "text-red-500 caption-1", children: error })
|
|
2515
2557
|
] })
|
|
2516
2558
|
}
|
|
2517
2559
|
);
|
|
2518
2560
|
}
|
|
2519
2561
|
|
|
2520
2562
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2521
|
-
import { Select as Select2, ConfigProvider as
|
|
2522
|
-
import { jsx as
|
|
2563
|
+
import { Select as Select2, ConfigProvider as ConfigProvider11 } from "antd";
|
|
2564
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2523
2565
|
function SelectFieldGroup({
|
|
2524
2566
|
value,
|
|
2525
2567
|
onChange,
|
|
@@ -2538,8 +2580,8 @@ function SelectFieldGroup({
|
|
|
2538
2580
|
size = "middle",
|
|
2539
2581
|
allowClear = true
|
|
2540
2582
|
}) {
|
|
2541
|
-
return /* @__PURE__ */
|
|
2542
|
-
|
|
2583
|
+
return /* @__PURE__ */ jsx29(
|
|
2584
|
+
ConfigProvider11,
|
|
2543
2585
|
{
|
|
2544
2586
|
theme: {
|
|
2545
2587
|
token: {
|
|
@@ -2548,11 +2590,11 @@ function SelectFieldGroup({
|
|
|
2548
2590
|
},
|
|
2549
2591
|
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
2550
2592
|
/* @__PURE__ */ jsxs22("div", { children: [
|
|
2551
|
-
/* @__PURE__ */
|
|
2593
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: label }),
|
|
2552
2594
|
" ",
|
|
2553
|
-
required && /* @__PURE__ */
|
|
2595
|
+
required && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
2554
2596
|
] }),
|
|
2555
|
-
/* @__PURE__ */
|
|
2597
|
+
/* @__PURE__ */ jsx29(
|
|
2556
2598
|
Select2,
|
|
2557
2599
|
{
|
|
2558
2600
|
size,
|
|
@@ -2568,7 +2610,7 @@ function SelectFieldGroup({
|
|
|
2568
2610
|
options,
|
|
2569
2611
|
mode,
|
|
2570
2612
|
onSearch: handleSearch,
|
|
2571
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2613
|
+
prefix: prefix ? /* @__PURE__ */ jsx29(
|
|
2572
2614
|
"span",
|
|
2573
2615
|
{
|
|
2574
2616
|
style: {
|
|
@@ -2584,16 +2626,16 @@ function SelectFieldGroup({
|
|
|
2584
2626
|
allowClear
|
|
2585
2627
|
}
|
|
2586
2628
|
),
|
|
2587
|
-
error && /* @__PURE__ */
|
|
2629
|
+
error && /* @__PURE__ */ jsx29("p", { className: "text-red-500 caption-1", children: error })
|
|
2588
2630
|
] })
|
|
2589
2631
|
}
|
|
2590
2632
|
);
|
|
2591
2633
|
}
|
|
2592
2634
|
|
|
2593
2635
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2594
|
-
import { Select as Select3, ConfigProvider as
|
|
2636
|
+
import { Select as Select3, ConfigProvider as ConfigProvider12 } from "antd";
|
|
2595
2637
|
import { DownOutlined } from "@ant-design/icons";
|
|
2596
|
-
import { jsx as
|
|
2638
|
+
import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2597
2639
|
function SelectFieldStatus({
|
|
2598
2640
|
value,
|
|
2599
2641
|
onChange,
|
|
@@ -2608,8 +2650,8 @@ function SelectFieldStatus({
|
|
|
2608
2650
|
allowClear = false
|
|
2609
2651
|
}) {
|
|
2610
2652
|
const selectedItem = options?.find((s) => s.value === value);
|
|
2611
|
-
return /* @__PURE__ */
|
|
2612
|
-
|
|
2653
|
+
return /* @__PURE__ */ jsx30(
|
|
2654
|
+
ConfigProvider12,
|
|
2613
2655
|
{
|
|
2614
2656
|
theme: {
|
|
2615
2657
|
components: {
|
|
@@ -2626,16 +2668,16 @@ function SelectFieldStatus({
|
|
|
2626
2668
|
},
|
|
2627
2669
|
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
2628
2670
|
/* @__PURE__ */ jsxs23("div", { children: [
|
|
2629
|
-
/* @__PURE__ */
|
|
2671
|
+
/* @__PURE__ */ jsx30("span", { className: "body-1", children: label }),
|
|
2630
2672
|
" ",
|
|
2631
|
-
required && /* @__PURE__ */
|
|
2673
|
+
required && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
|
|
2632
2674
|
] }),
|
|
2633
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ jsx30(
|
|
2634
2676
|
Select3,
|
|
2635
2677
|
{
|
|
2636
2678
|
size,
|
|
2637
2679
|
disabled,
|
|
2638
|
-
suffixIcon: /* @__PURE__ */
|
|
2680
|
+
suffixIcon: /* @__PURE__ */ jsx30(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2639
2681
|
value: value ? value : void 0,
|
|
2640
2682
|
onChange,
|
|
2641
2683
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""} `,
|
|
@@ -2647,14 +2689,14 @@ function SelectFieldStatus({
|
|
|
2647
2689
|
allowClear
|
|
2648
2690
|
}
|
|
2649
2691
|
),
|
|
2650
|
-
error && /* @__PURE__ */
|
|
2692
|
+
error && /* @__PURE__ */ jsx30("p", { className: "text-red-500 caption-1", children: error })
|
|
2651
2693
|
] })
|
|
2652
2694
|
}
|
|
2653
2695
|
);
|
|
2654
2696
|
}
|
|
2655
2697
|
|
|
2656
2698
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2657
|
-
import { Select as Select4, ConfigProvider as
|
|
2699
|
+
import { Select as Select4, ConfigProvider as ConfigProvider13 } from "antd";
|
|
2658
2700
|
|
|
2659
2701
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2660
2702
|
var status = [
|
|
@@ -2664,7 +2706,7 @@ var status = [
|
|
|
2664
2706
|
|
|
2665
2707
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2666
2708
|
import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
|
|
2667
|
-
import { jsx as
|
|
2709
|
+
import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2668
2710
|
function SelectFieldStatusReport({
|
|
2669
2711
|
value,
|
|
2670
2712
|
onChange,
|
|
@@ -2679,8 +2721,8 @@ function SelectFieldStatusReport({
|
|
|
2679
2721
|
allowClear = false
|
|
2680
2722
|
}) {
|
|
2681
2723
|
const selectedItem = status.find((s) => s.value === value);
|
|
2682
|
-
return /* @__PURE__ */
|
|
2683
|
-
|
|
2724
|
+
return /* @__PURE__ */ jsx31(
|
|
2725
|
+
ConfigProvider13,
|
|
2684
2726
|
{
|
|
2685
2727
|
theme: {
|
|
2686
2728
|
components: {
|
|
@@ -2697,16 +2739,16 @@ function SelectFieldStatusReport({
|
|
|
2697
2739
|
},
|
|
2698
2740
|
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
2699
2741
|
/* @__PURE__ */ jsxs24("div", { children: [
|
|
2700
|
-
/* @__PURE__ */
|
|
2742
|
+
/* @__PURE__ */ jsx31("span", { className: "body-1", children: label }),
|
|
2701
2743
|
" ",
|
|
2702
|
-
required && /* @__PURE__ */
|
|
2744
|
+
required && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
|
|
2703
2745
|
] }),
|
|
2704
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsx31(
|
|
2705
2747
|
Select4,
|
|
2706
2748
|
{
|
|
2707
2749
|
size,
|
|
2708
2750
|
disabled,
|
|
2709
|
-
suffixIcon: /* @__PURE__ */
|
|
2751
|
+
suffixIcon: /* @__PURE__ */ jsx31(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2710
2752
|
value: value ? value : void 0,
|
|
2711
2753
|
onChange,
|
|
2712
2754
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2718,16 +2760,16 @@ function SelectFieldStatusReport({
|
|
|
2718
2760
|
allowClear
|
|
2719
2761
|
}
|
|
2720
2762
|
),
|
|
2721
|
-
error && /* @__PURE__ */
|
|
2763
|
+
error && /* @__PURE__ */ jsx31("p", { className: "text-red-500 caption-1", children: error })
|
|
2722
2764
|
] })
|
|
2723
2765
|
}
|
|
2724
2766
|
);
|
|
2725
2767
|
}
|
|
2726
2768
|
|
|
2727
2769
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2728
|
-
import { Select as Select5, ConfigProvider as
|
|
2770
|
+
import { Select as Select5, ConfigProvider as ConfigProvider14 } from "antd";
|
|
2729
2771
|
import { useState as useState9 } from "react";
|
|
2730
|
-
import { jsx as
|
|
2772
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2731
2773
|
function SelectFieldTag({
|
|
2732
2774
|
label,
|
|
2733
2775
|
required,
|
|
@@ -2762,8 +2804,8 @@ function SelectFieldTag({
|
|
|
2762
2804
|
}
|
|
2763
2805
|
onChange?.([]);
|
|
2764
2806
|
};
|
|
2765
|
-
return /* @__PURE__ */
|
|
2766
|
-
|
|
2807
|
+
return /* @__PURE__ */ jsx32(
|
|
2808
|
+
ConfigProvider14,
|
|
2767
2809
|
{
|
|
2768
2810
|
theme: {
|
|
2769
2811
|
token: {
|
|
@@ -2772,11 +2814,11 @@ function SelectFieldTag({
|
|
|
2772
2814
|
},
|
|
2773
2815
|
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
2774
2816
|
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2775
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ jsx32("span", { className: "body-1", children: label }),
|
|
2776
2818
|
" ",
|
|
2777
|
-
required && /* @__PURE__ */
|
|
2819
|
+
required && /* @__PURE__ */ jsx32("span", { className: "text-red-500", children: "*" })
|
|
2778
2820
|
] }),
|
|
2779
|
-
/* @__PURE__ */
|
|
2821
|
+
/* @__PURE__ */ jsx32(
|
|
2780
2822
|
Select5,
|
|
2781
2823
|
{
|
|
2782
2824
|
size,
|
|
@@ -2796,7 +2838,7 @@ function SelectFieldTag({
|
|
|
2796
2838
|
onClear
|
|
2797
2839
|
}
|
|
2798
2840
|
),
|
|
2799
|
-
error && /* @__PURE__ */
|
|
2841
|
+
error && /* @__PURE__ */ jsx32("p", { className: "text-red-500 caption-1", children: error })
|
|
2800
2842
|
] })
|
|
2801
2843
|
}
|
|
2802
2844
|
);
|
|
@@ -2804,9 +2846,9 @@ function SelectFieldTag({
|
|
|
2804
2846
|
|
|
2805
2847
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2806
2848
|
import { IconTrash } from "@tabler/icons-react";
|
|
2807
|
-
import { Select as Select6, ConfigProvider as
|
|
2849
|
+
import { Select as Select6, ConfigProvider as ConfigProvider15 } from "antd";
|
|
2808
2850
|
import { useState as useState10 } from "react";
|
|
2809
|
-
import { jsx as
|
|
2851
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2810
2852
|
function SelectCustom({
|
|
2811
2853
|
label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2812
2854
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
@@ -2837,8 +2879,8 @@ function SelectCustom({
|
|
|
2837
2879
|
});
|
|
2838
2880
|
};
|
|
2839
2881
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2840
|
-
return /* @__PURE__ */
|
|
2841
|
-
|
|
2882
|
+
return /* @__PURE__ */ jsx33(
|
|
2883
|
+
ConfigProvider15,
|
|
2842
2884
|
{
|
|
2843
2885
|
theme: {
|
|
2844
2886
|
token: {
|
|
@@ -2848,11 +2890,11 @@ function SelectCustom({
|
|
|
2848
2890
|
},
|
|
2849
2891
|
children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
|
|
2850
2892
|
/* @__PURE__ */ jsxs26("div", { children: [
|
|
2851
|
-
/* @__PURE__ */
|
|
2893
|
+
/* @__PURE__ */ jsx33("span", { className: "body-1", children: label }),
|
|
2852
2894
|
" ",
|
|
2853
|
-
required && /* @__PURE__ */
|
|
2895
|
+
required && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: "*" })
|
|
2854
2896
|
] }),
|
|
2855
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ jsx33(
|
|
2856
2898
|
Select6,
|
|
2857
2899
|
{
|
|
2858
2900
|
size,
|
|
@@ -2865,8 +2907,8 @@ function SelectCustom({
|
|
|
2865
2907
|
allowClear
|
|
2866
2908
|
}
|
|
2867
2909
|
),
|
|
2868
|
-
error && /* @__PURE__ */
|
|
2869
|
-
/* @__PURE__ */
|
|
2910
|
+
error && /* @__PURE__ */ jsx33("p", { className: "text-red-500 caption-1", children: error }),
|
|
2911
|
+
/* @__PURE__ */ jsx33("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs26(
|
|
2870
2912
|
"div",
|
|
2871
2913
|
{
|
|
2872
2914
|
className: "flex justify-between items-center py-[2px] body-1",
|
|
@@ -2876,9 +2918,9 @@ function SelectCustom({
|
|
|
2876
2918
|
index + 1,
|
|
2877
2919
|
"."
|
|
2878
2920
|
] }),
|
|
2879
|
-
/* @__PURE__ */
|
|
2921
|
+
/* @__PURE__ */ jsx33("p", { children: v })
|
|
2880
2922
|
] }),
|
|
2881
|
-
/* @__PURE__ */
|
|
2923
|
+
/* @__PURE__ */ jsx33(
|
|
2882
2924
|
IconTrash,
|
|
2883
2925
|
{
|
|
2884
2926
|
className: "cursor-pointer",
|
|
@@ -2895,7 +2937,7 @@ function SelectCustom({
|
|
|
2895
2937
|
}
|
|
2896
2938
|
|
|
2897
2939
|
// src/SortFilter/SortFilter.tsx
|
|
2898
|
-
import { ConfigProvider as
|
|
2940
|
+
import { ConfigProvider as ConfigProvider16 } from "antd";
|
|
2899
2941
|
import { CalendarOutlined } from "@ant-design/icons";
|
|
2900
2942
|
|
|
2901
2943
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2928,7 +2970,7 @@ var quarters = [
|
|
|
2928
2970
|
// src/SortFilter/SortFilter.tsx
|
|
2929
2971
|
import { useState as useState11 } from "react";
|
|
2930
2972
|
import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
|
|
2931
|
-
import { jsx as
|
|
2973
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2932
2974
|
function SortFilter({
|
|
2933
2975
|
showYear = true,
|
|
2934
2976
|
showQuarter = true,
|
|
@@ -2939,8 +2981,8 @@ function SortFilter({
|
|
|
2939
2981
|
const [yearValue, setYearValue] = useState11();
|
|
2940
2982
|
const [monthValue, setMonthValue] = useState11();
|
|
2941
2983
|
const [quarterValue, setQuartersValue] = useState11();
|
|
2942
|
-
return /* @__PURE__ */
|
|
2943
|
-
|
|
2984
|
+
return /* @__PURE__ */ jsx34(
|
|
2985
|
+
ConfigProvider16,
|
|
2944
2986
|
{
|
|
2945
2987
|
theme: {
|
|
2946
2988
|
token: {
|
|
@@ -2949,10 +2991,10 @@ function SortFilter({
|
|
|
2949
2991
|
},
|
|
2950
2992
|
children: /* @__PURE__ */ jsxs27("div", { className: "w-full flex items-center justify-between", children: [
|
|
2951
2993
|
/* @__PURE__ */ jsxs27("div", { className: "w-full flex gap-[10px]", children: [
|
|
2952
|
-
showYear && /* @__PURE__ */
|
|
2994
|
+
showYear && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
2953
2995
|
SelectField,
|
|
2954
2996
|
{
|
|
2955
|
-
prefix: /* @__PURE__ */
|
|
2997
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
2956
2998
|
onChange: setYearValue,
|
|
2957
2999
|
options: years.map((s) => ({
|
|
2958
3000
|
value: s.value,
|
|
@@ -2962,10 +3004,10 @@ function SortFilter({
|
|
|
2962
3004
|
value: yearValue
|
|
2963
3005
|
}
|
|
2964
3006
|
) }),
|
|
2965
|
-
showMonth && /* @__PURE__ */
|
|
3007
|
+
showMonth && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
2966
3008
|
SelectField,
|
|
2967
3009
|
{
|
|
2968
|
-
prefix: /* @__PURE__ */
|
|
3010
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
2969
3011
|
onChange: setMonthValue,
|
|
2970
3012
|
options: months.map((s) => ({
|
|
2971
3013
|
value: s.value,
|
|
@@ -2975,10 +3017,10 @@ function SortFilter({
|
|
|
2975
3017
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2976
3018
|
}
|
|
2977
3019
|
) }),
|
|
2978
|
-
showQuarter && /* @__PURE__ */
|
|
3020
|
+
showQuarter && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
2979
3021
|
SelectField,
|
|
2980
3022
|
{
|
|
2981
|
-
prefix: /* @__PURE__ */
|
|
3023
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
2982
3024
|
onChange: setQuartersValue,
|
|
2983
3025
|
options: quarters.map((s) => ({
|
|
2984
3026
|
value: s.value,
|
|
@@ -2990,7 +3032,7 @@ function SortFilter({
|
|
|
2990
3032
|
) })
|
|
2991
3033
|
] }),
|
|
2992
3034
|
/* @__PURE__ */ jsxs27("div", { className: "flex gap-[10px]", children: [
|
|
2993
|
-
/* @__PURE__ */
|
|
3035
|
+
/* @__PURE__ */ jsx34(
|
|
2994
3036
|
IconSortDescending2,
|
|
2995
3037
|
{
|
|
2996
3038
|
size: 24,
|
|
@@ -2998,7 +3040,7 @@ function SortFilter({
|
|
|
2998
3040
|
onClick: onSortClick
|
|
2999
3041
|
}
|
|
3000
3042
|
),
|
|
3001
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ jsx34(
|
|
3002
3044
|
IconFilter,
|
|
3003
3045
|
{
|
|
3004
3046
|
size: 24,
|
|
@@ -3015,7 +3057,7 @@ function SortFilter({
|
|
|
3015
3057
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
3016
3058
|
import { IconUpload, IconTrash as IconTrash2, IconFileDescription } from "@tabler/icons-react";
|
|
3017
3059
|
import { useRef as useRef4, useState as useState12 } from "react";
|
|
3018
|
-
import { Fragment as Fragment5, jsx as
|
|
3060
|
+
import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3019
3061
|
function FileUploader({
|
|
3020
3062
|
onUpload,
|
|
3021
3063
|
onError,
|
|
@@ -3102,9 +3144,9 @@ function FileUploader({
|
|
|
3102
3144
|
if (inputRef.current) inputRef.current.value = "";
|
|
3103
3145
|
};
|
|
3104
3146
|
return /* @__PURE__ */ jsxs28("div", { className: "w-full", children: [
|
|
3105
|
-
label && /* @__PURE__ */
|
|
3147
|
+
label && /* @__PURE__ */ jsx35("p", { className: "body-1", children: label }),
|
|
3106
3148
|
!readOnly && /* @__PURE__ */ jsxs28("div", { className: uploaderWidth, children: [
|
|
3107
|
-
mode === "upload" ? /* @__PURE__ */
|
|
3149
|
+
mode === "upload" ? /* @__PURE__ */ jsx35(
|
|
3108
3150
|
"button",
|
|
3109
3151
|
{
|
|
3110
3152
|
type: "button",
|
|
@@ -3113,15 +3155,15 @@ function FileUploader({
|
|
|
3113
3155
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3114
3156
|
disabled: disabled ? disabled : uploading,
|
|
3115
3157
|
children: uploading ? /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
3116
|
-
/* @__PURE__ */
|
|
3158
|
+
/* @__PURE__ */ jsx35(Loader, { size: 15 }),
|
|
3117
3159
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3118
3160
|
] }) : /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
3119
|
-
/* @__PURE__ */
|
|
3161
|
+
/* @__PURE__ */ jsx35(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3120
3162
|
" ",
|
|
3121
3163
|
uploadText
|
|
3122
3164
|
] })
|
|
3123
3165
|
}
|
|
3124
|
-
) : /* @__PURE__ */
|
|
3166
|
+
) : /* @__PURE__ */ jsx35(
|
|
3125
3167
|
"div",
|
|
3126
3168
|
{
|
|
3127
3169
|
className: `w-full min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3136,16 +3178,16 @@ function FileUploader({
|
|
|
3136
3178
|
onDragLeave: () => setDragActive(false),
|
|
3137
3179
|
onDrop: handleDrop,
|
|
3138
3180
|
children: uploading ? /* @__PURE__ */ jsxs28("div", { className: "flex justify-center items-center gap-2", children: [
|
|
3139
|
-
/* @__PURE__ */
|
|
3181
|
+
/* @__PURE__ */ jsx35(Loader, { size: 15 }),
|
|
3140
3182
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3141
3183
|
] }) : /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3142
|
-
/* @__PURE__ */
|
|
3143
|
-
/* @__PURE__ */
|
|
3144
|
-
/* @__PURE__ */
|
|
3184
|
+
/* @__PURE__ */ jsx35(IconUpload, { size: 20 }),
|
|
3185
|
+
/* @__PURE__ */ jsx35("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" }),
|
|
3186
|
+
/* @__PURE__ */ jsx35("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" })
|
|
3145
3187
|
] })
|
|
3146
3188
|
}
|
|
3147
3189
|
),
|
|
3148
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ jsx35(
|
|
3149
3191
|
"input",
|
|
3150
3192
|
{
|
|
3151
3193
|
type: "file",
|
|
@@ -3158,8 +3200,8 @@ function FileUploader({
|
|
|
3158
3200
|
}
|
|
3159
3201
|
)
|
|
3160
3202
|
] }),
|
|
3161
|
-
description && /* @__PURE__ */
|
|
3162
|
-
/* @__PURE__ */
|
|
3203
|
+
description && /* @__PURE__ */ jsx35("p", { className: "text-gray-400 body-4", children: description }),
|
|
3204
|
+
/* @__PURE__ */ jsx35("div", { className: `mt-[8px] ${attachWidth}`, children: filesToDisplay.length !== 0 && /* @__PURE__ */ jsx35("div", { className: "flex flex-col rounded-[6px] body-1 border-[1px] border-gray-300", children: filesToDisplay.map((file, index) => /* @__PURE__ */ jsxs28(
|
|
3163
3205
|
"div",
|
|
3164
3206
|
{
|
|
3165
3207
|
className: `flex px-[16px] hover:bg-primary-50 hover:cursor-pointer
|
|
@@ -3170,10 +3212,10 @@ function FileUploader({
|
|
|
3170
3212
|
onClick: () => onClickFile && onClickFile(file),
|
|
3171
3213
|
children: [
|
|
3172
3214
|
/* @__PURE__ */ jsxs28("div", { className: "flex gap-2 overflow-hidden", children: [
|
|
3173
|
-
/* @__PURE__ */
|
|
3174
|
-
/* @__PURE__ */
|
|
3215
|
+
/* @__PURE__ */ jsx35("div", { className: "w-[24px] h-[24px] flex items-center justify-center", children: /* @__PURE__ */ jsx35(IconFileDescription, { size: 20 }) }),
|
|
3216
|
+
/* @__PURE__ */ jsx35("span", { className: "truncate", children: file.name || file.fileName })
|
|
3175
3217
|
] }),
|
|
3176
|
-
!readOnly && !disabled && /* @__PURE__ */
|
|
3218
|
+
!readOnly && !disabled && /* @__PURE__ */ jsx35(
|
|
3177
3219
|
IconTrash2,
|
|
3178
3220
|
{
|
|
3179
3221
|
size: 20,
|
|
@@ -3213,9 +3255,9 @@ function messageLoading(content, duration) {
|
|
|
3213
3255
|
}
|
|
3214
3256
|
|
|
3215
3257
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3216
|
-
import { ConfigProvider as
|
|
3258
|
+
import { ConfigProvider as ConfigProvider17 } from "antd";
|
|
3217
3259
|
import { Breadcrumb } from "antd";
|
|
3218
|
-
import { jsx as
|
|
3260
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3219
3261
|
function Breadcrumbs({
|
|
3220
3262
|
items,
|
|
3221
3263
|
separator,
|
|
@@ -3223,15 +3265,15 @@ function Breadcrumbs({
|
|
|
3223
3265
|
classname,
|
|
3224
3266
|
params
|
|
3225
3267
|
}) {
|
|
3226
|
-
return /* @__PURE__ */
|
|
3227
|
-
|
|
3268
|
+
return /* @__PURE__ */ jsx36(
|
|
3269
|
+
ConfigProvider17,
|
|
3228
3270
|
{
|
|
3229
3271
|
theme: {
|
|
3230
3272
|
token: {
|
|
3231
3273
|
fontFamily: "Kanit"
|
|
3232
3274
|
}
|
|
3233
3275
|
},
|
|
3234
|
-
children: /* @__PURE__ */
|
|
3276
|
+
children: /* @__PURE__ */ jsx36(
|
|
3235
3277
|
Breadcrumb,
|
|
3236
3278
|
{
|
|
3237
3279
|
items,
|
|
@@ -3246,8 +3288,8 @@ function Breadcrumbs({
|
|
|
3246
3288
|
}
|
|
3247
3289
|
|
|
3248
3290
|
// src/HeadingPage/HeadingPage.tsx
|
|
3249
|
-
import { ConfigProvider as
|
|
3250
|
-
import { jsx as
|
|
3291
|
+
import { ConfigProvider as ConfigProvider18 } from "antd";
|
|
3292
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3251
3293
|
function HeadingPage({ Heading }) {
|
|
3252
3294
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3253
3295
|
weekday: "long",
|
|
@@ -3255,8 +3297,8 @@ function HeadingPage({ Heading }) {
|
|
|
3255
3297
|
month: "long",
|
|
3256
3298
|
year: "numeric"
|
|
3257
3299
|
});
|
|
3258
|
-
return /* @__PURE__ */
|
|
3259
|
-
|
|
3300
|
+
return /* @__PURE__ */ jsx37(
|
|
3301
|
+
ConfigProvider18,
|
|
3260
3302
|
{
|
|
3261
3303
|
theme: {
|
|
3262
3304
|
token: {
|
|
@@ -3264,7 +3306,7 @@ function HeadingPage({ Heading }) {
|
|
|
3264
3306
|
}
|
|
3265
3307
|
},
|
|
3266
3308
|
children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3267
|
-
/* @__PURE__ */
|
|
3309
|
+
/* @__PURE__ */ jsx37("p", { className: "headline-5", children: Heading }),
|
|
3268
3310
|
/* @__PURE__ */ jsxs29("p", { className: "body-1", children: [
|
|
3269
3311
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3270
3312
|
today
|
|
@@ -3275,9 +3317,9 @@ function HeadingPage({ Heading }) {
|
|
|
3275
3317
|
}
|
|
3276
3318
|
|
|
3277
3319
|
// src/Progress/ProgressBar.tsx
|
|
3278
|
-
import { ConfigProvider as
|
|
3320
|
+
import { ConfigProvider as ConfigProvider19, Progress } from "antd";
|
|
3279
3321
|
import { useEffect as useEffect4, useRef as useRef5, useState as useState13 } from "react";
|
|
3280
|
-
import { jsx as
|
|
3322
|
+
import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3281
3323
|
function ProgressBar({
|
|
3282
3324
|
percent = 0,
|
|
3283
3325
|
size = "default",
|
|
@@ -3308,8 +3350,8 @@ function ProgressBar({
|
|
|
3308
3350
|
observer.observe(inner);
|
|
3309
3351
|
return () => observer.disconnect();
|
|
3310
3352
|
}, []);
|
|
3311
|
-
return /* @__PURE__ */
|
|
3312
|
-
|
|
3353
|
+
return /* @__PURE__ */ jsx38(
|
|
3354
|
+
ConfigProvider19,
|
|
3313
3355
|
{
|
|
3314
3356
|
theme: {
|
|
3315
3357
|
token: {
|
|
@@ -3317,7 +3359,7 @@ function ProgressBar({
|
|
|
3317
3359
|
}
|
|
3318
3360
|
},
|
|
3319
3361
|
children: /* @__PURE__ */ jsxs30("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3320
|
-
/* @__PURE__ */
|
|
3362
|
+
/* @__PURE__ */ jsx38(
|
|
3321
3363
|
Progress,
|
|
3322
3364
|
{
|
|
3323
3365
|
className: "w-full",
|
|
@@ -3333,7 +3375,7 @@ function ProgressBar({
|
|
|
3333
3375
|
strokeColor
|
|
3334
3376
|
}
|
|
3335
3377
|
),
|
|
3336
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */
|
|
3378
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx38(
|
|
3337
3379
|
"div",
|
|
3338
3380
|
{
|
|
3339
3381
|
className: "checkpoint absolute top-0",
|
|
@@ -3355,7 +3397,7 @@ function ProgressBar({
|
|
|
3355
3397
|
}
|
|
3356
3398
|
|
|
3357
3399
|
// src/KpiSection/KpiSection.tsx
|
|
3358
|
-
import { ConfigProvider as
|
|
3400
|
+
import { ConfigProvider as ConfigProvider20, message } from "antd";
|
|
3359
3401
|
import { useEffect as useEffect5, useState as useState15 } from "react";
|
|
3360
3402
|
|
|
3361
3403
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3506,7 +3548,7 @@ function useGetKpiSection() {
|
|
|
3506
3548
|
|
|
3507
3549
|
// src/KpiSection/KpiSection.tsx
|
|
3508
3550
|
import { IconCheck as IconCheck2, IconCirclePlus, IconPencil, IconTrash as IconTrash3, IconX as IconX2 } from "@tabler/icons-react";
|
|
3509
|
-
import { Fragment as Fragment6, jsx as
|
|
3551
|
+
import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3510
3552
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3511
3553
|
const {
|
|
3512
3554
|
handleAddKpi,
|
|
@@ -3536,8 +3578,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3536
3578
|
onChangeKpiList(kpiList);
|
|
3537
3579
|
}
|
|
3538
3580
|
}, [kpiList]);
|
|
3539
|
-
return /* @__PURE__ */
|
|
3540
|
-
|
|
3581
|
+
return /* @__PURE__ */ jsx39(
|
|
3582
|
+
ConfigProvider20,
|
|
3541
3583
|
{
|
|
3542
3584
|
theme: {
|
|
3543
3585
|
token: {
|
|
@@ -3549,7 +3591,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3549
3591
|
messageContainer,
|
|
3550
3592
|
type === "number" && /* @__PURE__ */ jsxs31("div", { className: "space-y-4", children: [
|
|
3551
3593
|
/* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3552
|
-
/* @__PURE__ */
|
|
3594
|
+
/* @__PURE__ */ jsx39(
|
|
3553
3595
|
InputField,
|
|
3554
3596
|
{
|
|
3555
3597
|
value: nameKpi,
|
|
@@ -3561,7 +3603,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3561
3603
|
error: errors.nameKpi
|
|
3562
3604
|
}
|
|
3563
3605
|
),
|
|
3564
|
-
/* @__PURE__ */
|
|
3606
|
+
/* @__PURE__ */ jsx39(
|
|
3565
3607
|
InputField,
|
|
3566
3608
|
{
|
|
3567
3609
|
value: kpiValue,
|
|
@@ -3585,7 +3627,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3585
3627
|
error: errors.kpiValue
|
|
3586
3628
|
}
|
|
3587
3629
|
),
|
|
3588
|
-
/* @__PURE__ */
|
|
3630
|
+
/* @__PURE__ */ jsx39(
|
|
3589
3631
|
InputField,
|
|
3590
3632
|
{
|
|
3591
3633
|
value: unitValue,
|
|
@@ -3597,7 +3639,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3597
3639
|
error: errors.unitValue
|
|
3598
3640
|
}
|
|
3599
3641
|
),
|
|
3600
|
-
/* @__PURE__ */
|
|
3642
|
+
/* @__PURE__ */ jsx39("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx39(
|
|
3601
3643
|
IconCirclePlus,
|
|
3602
3644
|
{
|
|
3603
3645
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3606,7 +3648,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3606
3648
|
}
|
|
3607
3649
|
) })
|
|
3608
3650
|
] }),
|
|
3609
|
-
/* @__PURE__ */
|
|
3651
|
+
/* @__PURE__ */ jsx39("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs31(
|
|
3610
3652
|
"div",
|
|
3611
3653
|
{
|
|
3612
3654
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
@@ -3616,7 +3658,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3616
3658
|
"."
|
|
3617
3659
|
] }),
|
|
3618
3660
|
kpi.isEditing ? /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3619
|
-
/* @__PURE__ */
|
|
3661
|
+
/* @__PURE__ */ jsx39(
|
|
3620
3662
|
InputField,
|
|
3621
3663
|
{
|
|
3622
3664
|
value: kpi.name,
|
|
@@ -3626,7 +3668,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3626
3668
|
error: itemErrors[kpi.id]?.name
|
|
3627
3669
|
}
|
|
3628
3670
|
),
|
|
3629
|
-
/* @__PURE__ */
|
|
3671
|
+
/* @__PURE__ */ jsx39(
|
|
3630
3672
|
InputField,
|
|
3631
3673
|
{
|
|
3632
3674
|
value: kpi.value?.toString(),
|
|
@@ -3651,7 +3693,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3651
3693
|
error: itemErrors[kpi.id]?.value
|
|
3652
3694
|
}
|
|
3653
3695
|
),
|
|
3654
|
-
/* @__PURE__ */
|
|
3696
|
+
/* @__PURE__ */ jsx39(
|
|
3655
3697
|
InputField,
|
|
3656
3698
|
{
|
|
3657
3699
|
value: kpi.unit,
|
|
@@ -3666,24 +3708,24 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3666
3708
|
{
|
|
3667
3709
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3668
3710
|
children: [
|
|
3669
|
-
/* @__PURE__ */
|
|
3711
|
+
/* @__PURE__ */ jsx39(
|
|
3670
3712
|
IconCheck2,
|
|
3671
3713
|
{
|
|
3672
3714
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3673
3715
|
onClick: () => handleSave(kpi.id, type)
|
|
3674
3716
|
}
|
|
3675
3717
|
),
|
|
3676
|
-
/* @__PURE__ */
|
|
3718
|
+
/* @__PURE__ */ jsx39(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3677
3719
|
]
|
|
3678
3720
|
}
|
|
3679
3721
|
)
|
|
3680
3722
|
] }) : /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3681
|
-
/* @__PURE__ */
|
|
3682
|
-
/* @__PURE__ */
|
|
3683
|
-
/* @__PURE__ */
|
|
3723
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.name }),
|
|
3724
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.value }),
|
|
3725
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.unit }),
|
|
3684
3726
|
/* @__PURE__ */ jsxs31("div", { className: "flex gap-3 justify-end", children: [
|
|
3685
|
-
/* @__PURE__ */
|
|
3686
|
-
/* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ jsx39(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3728
|
+
/* @__PURE__ */ jsx39(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3687
3729
|
] })
|
|
3688
3730
|
] })
|
|
3689
3731
|
]
|
|
@@ -3693,7 +3735,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3693
3735
|
] }),
|
|
3694
3736
|
type === "text" && /* @__PURE__ */ jsxs31("div", { className: "space-y-4", children: [
|
|
3695
3737
|
/* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3696
|
-
/* @__PURE__ */
|
|
3738
|
+
/* @__PURE__ */ jsx39(
|
|
3697
3739
|
InputField,
|
|
3698
3740
|
{
|
|
3699
3741
|
value: nameKpi,
|
|
@@ -3705,7 +3747,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3705
3747
|
error: errors.nameKpi
|
|
3706
3748
|
}
|
|
3707
3749
|
),
|
|
3708
|
-
/* @__PURE__ */
|
|
3750
|
+
/* @__PURE__ */ jsx39("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx39(
|
|
3709
3751
|
IconCirclePlus,
|
|
3710
3752
|
{
|
|
3711
3753
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3714,13 +3756,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3714
3756
|
}
|
|
3715
3757
|
) })
|
|
3716
3758
|
] }),
|
|
3717
|
-
/* @__PURE__ */
|
|
3759
|
+
/* @__PURE__ */ jsx39("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
|
|
3718
3760
|
/* @__PURE__ */ jsxs31("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3719
3761
|
index + 1,
|
|
3720
3762
|
"."
|
|
3721
3763
|
] }),
|
|
3722
3764
|
kpi.isEditing ? /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3723
|
-
/* @__PURE__ */
|
|
3765
|
+
/* @__PURE__ */ jsx39(
|
|
3724
3766
|
InputField,
|
|
3725
3767
|
{
|
|
3726
3768
|
value: kpi.name,
|
|
@@ -3735,22 +3777,22 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3735
3777
|
{
|
|
3736
3778
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3737
3779
|
children: [
|
|
3738
|
-
/* @__PURE__ */
|
|
3780
|
+
/* @__PURE__ */ jsx39(
|
|
3739
3781
|
IconCheck2,
|
|
3740
3782
|
{
|
|
3741
3783
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3742
3784
|
onClick: () => handleSave(kpi.id, type)
|
|
3743
3785
|
}
|
|
3744
3786
|
),
|
|
3745
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ jsx39(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3746
3788
|
]
|
|
3747
3789
|
}
|
|
3748
3790
|
)
|
|
3749
3791
|
] }) : /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3750
|
-
/* @__PURE__ */
|
|
3792
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.name }),
|
|
3751
3793
|
/* @__PURE__ */ jsxs31("div", { className: "flex gap-3 justify-end", children: [
|
|
3752
|
-
/* @__PURE__ */
|
|
3753
|
-
/* @__PURE__ */
|
|
3794
|
+
/* @__PURE__ */ jsx39(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3795
|
+
/* @__PURE__ */ jsx39(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3754
3796
|
] })
|
|
3755
3797
|
] })
|
|
3756
3798
|
] }, kpi.id)) })
|
|
@@ -3762,9 +3804,9 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3762
3804
|
|
|
3763
3805
|
// src/Modal/Modal/Modal.tsx
|
|
3764
3806
|
import { Modal } from "antd";
|
|
3765
|
-
import { jsx as
|
|
3807
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3766
3808
|
function AntDModal({ children, isOpen, width, onCancel }) {
|
|
3767
|
-
return /* @__PURE__ */
|
|
3809
|
+
return /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40(Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ jsx40("div", { children }) }) });
|
|
3768
3810
|
}
|
|
3769
3811
|
|
|
3770
3812
|
// src/Indicator/Indicator/Indicator.tsx
|
|
@@ -3777,7 +3819,7 @@ import {
|
|
|
3777
3819
|
} from "@tabler/icons-react";
|
|
3778
3820
|
import { useState as useState16 } from "react";
|
|
3779
3821
|
import { Input as Input4 } from "antd";
|
|
3780
|
-
import { Fragment as Fragment7, jsx as
|
|
3822
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3781
3823
|
function Indicator({
|
|
3782
3824
|
option = [
|
|
3783
3825
|
{ value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
|
|
@@ -3911,7 +3953,7 @@ function Indicator({
|
|
|
3911
3953
|
{
|
|
3912
3954
|
className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
|
|
3913
3955
|
children: [
|
|
3914
|
-
/* @__PURE__ */
|
|
3956
|
+
/* @__PURE__ */ jsx41(
|
|
3915
3957
|
SwitchSelect,
|
|
3916
3958
|
{
|
|
3917
3959
|
option,
|
|
@@ -3921,7 +3963,7 @@ function Indicator({
|
|
|
3921
3963
|
required: true
|
|
3922
3964
|
}
|
|
3923
3965
|
),
|
|
3924
|
-
/* @__PURE__ */
|
|
3966
|
+
/* @__PURE__ */ jsx41(
|
|
3925
3967
|
InputField,
|
|
3926
3968
|
{
|
|
3927
3969
|
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"}`,
|
|
@@ -3937,7 +3979,7 @@ function Indicator({
|
|
|
3937
3979
|
}
|
|
3938
3980
|
),
|
|
3939
3981
|
valueSwitch === "NUMBER" && /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
3940
|
-
/* @__PURE__ */
|
|
3982
|
+
/* @__PURE__ */ jsx41(
|
|
3941
3983
|
InputFieldNumber,
|
|
3942
3984
|
{
|
|
3943
3985
|
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"}`,
|
|
@@ -3953,7 +3995,7 @@ function Indicator({
|
|
|
3953
3995
|
error: addError.numberValue
|
|
3954
3996
|
}
|
|
3955
3997
|
),
|
|
3956
|
-
/* @__PURE__ */
|
|
3998
|
+
/* @__PURE__ */ jsx41(
|
|
3957
3999
|
InputField,
|
|
3958
4000
|
{
|
|
3959
4001
|
label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
|
|
@@ -3969,7 +4011,7 @@ function Indicator({
|
|
|
3969
4011
|
}
|
|
3970
4012
|
)
|
|
3971
4013
|
] }),
|
|
3972
|
-
/* @__PURE__ */
|
|
4014
|
+
/* @__PURE__ */ jsx41(
|
|
3973
4015
|
IconCirclePlus2,
|
|
3974
4016
|
{
|
|
3975
4017
|
onClick: handleAddIndicator,
|
|
@@ -3980,14 +4022,14 @@ function Indicator({
|
|
|
3980
4022
|
]
|
|
3981
4023
|
}
|
|
3982
4024
|
),
|
|
3983
|
-
/* @__PURE__ */
|
|
4025
|
+
/* @__PURE__ */ jsx41(Fragment7, { children: arrayData.map((item, index) => /* @__PURE__ */ jsxs32(
|
|
3984
4026
|
"div",
|
|
3985
4027
|
{
|
|
3986
4028
|
className: `space-y-2 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
|
|
3987
4029
|
children: [
|
|
3988
|
-
/* @__PURE__ */
|
|
4030
|
+
/* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
|
|
3989
4031
|
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
3990
|
-
/* @__PURE__ */
|
|
4032
|
+
/* @__PURE__ */ jsx41(
|
|
3991
4033
|
Input4,
|
|
3992
4034
|
{
|
|
3993
4035
|
className: "body-1 mt-2",
|
|
@@ -4000,11 +4042,11 @@ function Indicator({
|
|
|
4000
4042
|
}
|
|
4001
4043
|
}
|
|
4002
4044
|
),
|
|
4003
|
-
editError.textValue && /* @__PURE__ */
|
|
4004
|
-
] }) : /* @__PURE__ */
|
|
4045
|
+
editError.textValue && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.textValue })
|
|
4046
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.textValue }),
|
|
4005
4047
|
item.inputType === "NUMBER" && /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
4006
4048
|
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4007
|
-
/* @__PURE__ */
|
|
4049
|
+
/* @__PURE__ */ jsx41(
|
|
4008
4050
|
Input4,
|
|
4009
4051
|
{
|
|
4010
4052
|
type: "number",
|
|
@@ -4018,10 +4060,10 @@ function Indicator({
|
|
|
4018
4060
|
}
|
|
4019
4061
|
}
|
|
4020
4062
|
),
|
|
4021
|
-
editError.numberValue && /* @__PURE__ */
|
|
4022
|
-
] }) : /* @__PURE__ */
|
|
4063
|
+
editError.numberValue && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.numberValue })
|
|
4064
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.numberValue }),
|
|
4023
4065
|
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4024
|
-
/* @__PURE__ */
|
|
4066
|
+
/* @__PURE__ */ jsx41(
|
|
4025
4067
|
Input4,
|
|
4026
4068
|
{
|
|
4027
4069
|
className: "body-1 mt-2",
|
|
@@ -4034,32 +4076,32 @@ function Indicator({
|
|
|
4034
4076
|
}
|
|
4035
4077
|
}
|
|
4036
4078
|
),
|
|
4037
|
-
editError.unit && /* @__PURE__ */
|
|
4038
|
-
] }) : /* @__PURE__ */
|
|
4079
|
+
editError.unit && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.unit })
|
|
4080
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.unit })
|
|
4039
4081
|
] }),
|
|
4040
|
-
/* @__PURE__ */
|
|
4041
|
-
/* @__PURE__ */
|
|
4082
|
+
/* @__PURE__ */ jsx41("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ jsxs32("div", { className: "flex", children: [
|
|
4083
|
+
/* @__PURE__ */ jsx41(
|
|
4042
4084
|
IconCheck3,
|
|
4043
4085
|
{
|
|
4044
4086
|
className: "cursor-pointer text-green-600",
|
|
4045
4087
|
onClick: () => handleConfirmEditIndicator(index)
|
|
4046
4088
|
}
|
|
4047
4089
|
),
|
|
4048
|
-
/* @__PURE__ */
|
|
4090
|
+
/* @__PURE__ */ jsx41(
|
|
4049
4091
|
IconX3,
|
|
4050
4092
|
{
|
|
4051
4093
|
className: "cursor-pointer text-red-600",
|
|
4052
4094
|
onClick: handleCancelEditIndicator
|
|
4053
4095
|
}
|
|
4054
4096
|
)
|
|
4055
|
-
] }) : void 0 : canEdit && /* @__PURE__ */
|
|
4097
|
+
] }) : void 0 : canEdit && /* @__PURE__ */ jsx41(
|
|
4056
4098
|
IconPencil2,
|
|
4057
4099
|
{
|
|
4058
4100
|
className: "cursor-pointer",
|
|
4059
4101
|
onClick: () => handleEditIndicator(index)
|
|
4060
4102
|
}
|
|
4061
4103
|
) }),
|
|
4062
|
-
/* @__PURE__ */
|
|
4104
|
+
/* @__PURE__ */ jsx41("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ jsx41(
|
|
4063
4105
|
IconTrash4,
|
|
4064
4106
|
{
|
|
4065
4107
|
onClick: () => {
|
|
@@ -4082,7 +4124,7 @@ function Indicator({
|
|
|
4082
4124
|
// src/FilterPopUp/FilterPopUp.tsx
|
|
4083
4125
|
import { IconCheck as IconCheck4, IconFilter as IconFilter2, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
4084
4126
|
import { useState as useState17 } from "react";
|
|
4085
|
-
import { jsx as
|
|
4127
|
+
import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4086
4128
|
var FilterPopUp = (filter) => {
|
|
4087
4129
|
const [isAction, setIsAction] = useState17(true);
|
|
4088
4130
|
const [filterArray, setFilterArray] = useState17([""]);
|
|
@@ -4094,18 +4136,18 @@ var FilterPopUp = (filter) => {
|
|
|
4094
4136
|
};
|
|
4095
4137
|
return /* @__PURE__ */ jsxs33("div", { className: "relative", children: [
|
|
4096
4138
|
/* @__PURE__ */ jsxs33("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
|
|
4097
|
-
/* @__PURE__ */
|
|
4139
|
+
/* @__PURE__ */ jsx42(IconFilter2, {}),
|
|
4098
4140
|
"filter"
|
|
4099
4141
|
] }),
|
|
4100
4142
|
isAction ? /* @__PURE__ */ jsxs33("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
|
|
4101
4143
|
/* @__PURE__ */ jsxs33("div", { className: "flex justify-end", children: [
|
|
4102
4144
|
/* @__PURE__ */ jsxs33("div", { className: "flex justify-end text-nowrap gap-2", children: [
|
|
4103
|
-
/* @__PURE__ */
|
|
4104
|
-
/* @__PURE__ */
|
|
4145
|
+
/* @__PURE__ */ jsx42(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ jsx42(IconCheck4, {}) }),
|
|
4146
|
+
/* @__PURE__ */ jsx42(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ jsx42(IconTrash5, {}) })
|
|
4105
4147
|
] }),
|
|
4106
4148
|
""
|
|
4107
4149
|
] }),
|
|
4108
|
-
/* @__PURE__ */
|
|
4150
|
+
/* @__PURE__ */ jsx42(
|
|
4109
4151
|
SelectCustom,
|
|
4110
4152
|
{
|
|
4111
4153
|
options: filter.selectionFilter,
|
|
@@ -4121,7 +4163,7 @@ var FilterPopUp = (filter) => {
|
|
|
4121
4163
|
import { useEffect as useEffect7, useRef as useRef6, useState as useState18 } from "react";
|
|
4122
4164
|
import { IconSearch, IconUsers, IconX as IconX4 } from "@tabler/icons-react";
|
|
4123
4165
|
import { Input as Input5 } from "antd";
|
|
4124
|
-
import { Fragment as Fragment8, jsx as
|
|
4166
|
+
import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4125
4167
|
function ProfileSelect({
|
|
4126
4168
|
allUser,
|
|
4127
4169
|
assignUser,
|
|
@@ -4182,21 +4224,21 @@ function ProfileSelect({
|
|
|
4182
4224
|
const noResult = filteredAssigned.length === 0 && filteredUnassigned.length === 0;
|
|
4183
4225
|
const noUserOption = allUser.length === 0 && !isSearching;
|
|
4184
4226
|
return /* @__PURE__ */ jsxs34("div", { ref: containerRef, className: "relative body-1", children: [
|
|
4185
|
-
mode === "icon" ? /* @__PURE__ */
|
|
4227
|
+
mode === "icon" ? /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsx43(
|
|
4186
4228
|
IconUsers,
|
|
4187
4229
|
{
|
|
4188
4230
|
size: 40,
|
|
4189
4231
|
className: "p-2 border rounded cursor-pointer bg-white",
|
|
4190
4232
|
onClick: () => setIsShowSelect(!isShowSelect)
|
|
4191
4233
|
}
|
|
4192
|
-
) }) : mode === "showAssign" ? /* @__PURE__ */
|
|
4234
|
+
) }) : mode === "showAssign" ? /* @__PURE__ */ jsx43(
|
|
4193
4235
|
"div",
|
|
4194
4236
|
{
|
|
4195
4237
|
className: `w-full h-[40px] flex items-center p-2 cursor-pointer ${className}`,
|
|
4196
4238
|
onClick: () => setIsShowSelect(!isShowSelect),
|
|
4197
|
-
children: visibleUsers.length === 0 ? placeholder ? /* @__PURE__ */
|
|
4198
|
-
/* @__PURE__ */
|
|
4199
|
-
/* @__PURE__ */
|
|
4239
|
+
children: visibleUsers.length === 0 ? placeholder ? /* @__PURE__ */ jsx43("span", { className: "body-1 text-gray-400 select-none", children: placeholder }) : null : /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4240
|
+
/* @__PURE__ */ jsx43("div", { className: "flex -space-x-2", children: visibleUsers.map((user) => /* @__PURE__ */ jsx43("div", { className: "flex items-center", children: /* @__PURE__ */ jsxs34("label", { className: "relative group cursor-pointer", children: [
|
|
4241
|
+
/* @__PURE__ */ jsx43(
|
|
4200
4242
|
"img",
|
|
4201
4243
|
{
|
|
4202
4244
|
src: user.profile,
|
|
@@ -4209,7 +4251,7 @@ function ProfileSelect({
|
|
|
4209
4251
|
className: "border border-white group-hover:border-3 group-hover:border-red-500 transition"
|
|
4210
4252
|
}
|
|
4211
4253
|
),
|
|
4212
|
-
/* @__PURE__ */
|
|
4254
|
+
/* @__PURE__ */ jsx43(
|
|
4213
4255
|
"span",
|
|
4214
4256
|
{
|
|
4215
4257
|
className: "absolute top-0 right-0 -translate-y-2 translate-x-2 \r\n rounded-full bg-white opacity-0 group-hover:opacity-100 \r\n border-3 z-10 border-red-500 flex items-center justify-center transition",
|
|
@@ -4217,7 +4259,7 @@ function ProfileSelect({
|
|
|
4217
4259
|
e.stopPropagation();
|
|
4218
4260
|
onUpdateAssignUser(user, "remove");
|
|
4219
4261
|
},
|
|
4220
|
-
children: /* @__PURE__ */
|
|
4262
|
+
children: /* @__PURE__ */ jsx43(IconX4, { className: "w-4 h-4 text-red-500" })
|
|
4221
4263
|
}
|
|
4222
4264
|
)
|
|
4223
4265
|
] }) }, user.id)) }),
|
|
@@ -4239,7 +4281,7 @@ function ProfileSelect({
|
|
|
4239
4281
|
] })
|
|
4240
4282
|
}
|
|
4241
4283
|
) : /* @__PURE__ */ jsxs34("div", { className: `w-full h-[40px] flex -space-x-2 p-2 ${className}`, children: [
|
|
4242
|
-
visibleUsers.map((user) => /* @__PURE__ */
|
|
4284
|
+
visibleUsers.map((user) => /* @__PURE__ */ jsx43("div", { className: "flex items-center ", children: /* @__PURE__ */ jsx43("label", { className: "relative group ", children: /* @__PURE__ */ jsx43(
|
|
4243
4285
|
"img",
|
|
4244
4286
|
{
|
|
4245
4287
|
src: user.profile,
|
|
@@ -4275,8 +4317,8 @@ function ProfileSelect({
|
|
|
4275
4317
|
ref: selectRef,
|
|
4276
4318
|
children: [
|
|
4277
4319
|
/* @__PURE__ */ jsxs34("div", { className: "flex border-1 rounded-md p-2 gap-2 items-center", children: [
|
|
4278
|
-
/* @__PURE__ */
|
|
4279
|
-
/* @__PURE__ */
|
|
4320
|
+
/* @__PURE__ */ jsx43(IconSearch, {}),
|
|
4321
|
+
/* @__PURE__ */ jsx43(
|
|
4280
4322
|
Input5,
|
|
4281
4323
|
{
|
|
4282
4324
|
variant: "borderless",
|
|
@@ -4287,16 +4329,16 @@ function ProfileSelect({
|
|
|
4287
4329
|
}
|
|
4288
4330
|
)
|
|
4289
4331
|
] }),
|
|
4290
|
-
/* @__PURE__ */
|
|
4332
|
+
/* @__PURE__ */ jsx43("div", { className: "overflow-y-auto h-[250px] pt-2 px-4 body-3", children: noUserOption ? /* @__PURE__ */ jsx43("div", { className: "flex items-center justify-center h-full text-gray-400 select-none", children: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E39\u0E49\u0E04\u0E19\u0E43\u0E2B\u0E49\u0E40\u0E25\u0E37\u0E2D\u0E01" }) : isSearching && noResult ? /* @__PURE__ */ jsx43("div", { className: "flex items-center justify-center h-full text-gray-400 select-none", children: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E39\u0E49\u0E04\u0E19\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32" }) : /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4291
4333
|
filteredAssigned.length > 0 && /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4292
|
-
/* @__PURE__ */
|
|
4334
|
+
/* @__PURE__ */ jsx43("div", { className: "mb-1", children: "\u0E2A\u0E21\u0E32\u0E0A\u0E34\u0E01\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01" }),
|
|
4293
4335
|
filteredAssigned.map((user) => /* @__PURE__ */ jsxs34(
|
|
4294
4336
|
"button",
|
|
4295
4337
|
{
|
|
4296
4338
|
className: "flex items-center group my-1 w-full p-1 rounded hover:bg-gray-100",
|
|
4297
4339
|
children: [
|
|
4298
4340
|
/* @__PURE__ */ jsxs34("div", { className: "relative cursor-pointer", children: [
|
|
4299
|
-
/* @__PURE__ */
|
|
4341
|
+
/* @__PURE__ */ jsx43(
|
|
4300
4342
|
"img",
|
|
4301
4343
|
{
|
|
4302
4344
|
src: user.profile,
|
|
@@ -4309,30 +4351,30 @@ function ProfileSelect({
|
|
|
4309
4351
|
className: "border-3 border-red-500"
|
|
4310
4352
|
}
|
|
4311
4353
|
),
|
|
4312
|
-
/* @__PURE__ */
|
|
4354
|
+
/* @__PURE__ */ jsx43(
|
|
4313
4355
|
"span",
|
|
4314
4356
|
{
|
|
4315
4357
|
className: "absolute top-0 right-0 -translate-y-2 translate-x-2 \r\n rounded-full bg-white opacity-0 group-hover:opacity-100 \r\n border-3 border-red-500 flex items-center justify-center transition",
|
|
4316
4358
|
onClick: () => onUpdateAssignUser(user, "remove"),
|
|
4317
|
-
children: /* @__PURE__ */
|
|
4359
|
+
children: /* @__PURE__ */ jsx43(IconX4, { className: "text-red-500", size: 15 })
|
|
4318
4360
|
}
|
|
4319
4361
|
)
|
|
4320
4362
|
] }),
|
|
4321
|
-
/* @__PURE__ */
|
|
4363
|
+
/* @__PURE__ */ jsx43("span", { className: "ml-2", children: user.name })
|
|
4322
4364
|
]
|
|
4323
4365
|
},
|
|
4324
4366
|
user.id
|
|
4325
4367
|
))
|
|
4326
4368
|
] }),
|
|
4327
4369
|
filteredUnassigned.length > 0 && /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4328
|
-
/* @__PURE__ */
|
|
4370
|
+
/* @__PURE__ */ jsx43("div", { className: "mt-2", children: "\u0E1C\u0E39\u0E49\u0E04\u0E19" }),
|
|
4329
4371
|
filteredUnassigned.map((user) => /* @__PURE__ */ jsxs34(
|
|
4330
4372
|
"button",
|
|
4331
4373
|
{
|
|
4332
4374
|
className: "flex items-center my-1 hover:bg-gray-100 w-full p-1 rounded",
|
|
4333
4375
|
onClick: () => onUpdateAssignUser(user),
|
|
4334
4376
|
children: [
|
|
4335
|
-
/* @__PURE__ */
|
|
4377
|
+
/* @__PURE__ */ jsx43(
|
|
4336
4378
|
"img",
|
|
4337
4379
|
{
|
|
4338
4380
|
src: user.profile,
|
|
@@ -4345,7 +4387,7 @@ function ProfileSelect({
|
|
|
4345
4387
|
className: "border"
|
|
4346
4388
|
}
|
|
4347
4389
|
),
|
|
4348
|
-
/* @__PURE__ */
|
|
4390
|
+
/* @__PURE__ */ jsx43("span", { className: "ml-2", children: user.name })
|
|
4349
4391
|
]
|
|
4350
4392
|
},
|
|
4351
4393
|
user.id
|
|
@@ -4361,7 +4403,7 @@ function ProfileSelect({
|
|
|
4361
4403
|
// src/Button/QRCode/QRCode.tsx
|
|
4362
4404
|
import { useEffect as useEffect8, useRef as useRef7, useState as useState19 } from "react";
|
|
4363
4405
|
import QRCode from "qrcode";
|
|
4364
|
-
import { jsx as
|
|
4406
|
+
import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4365
4407
|
var QRCodeGenerator = ({
|
|
4366
4408
|
url,
|
|
4367
4409
|
previewSize = 200,
|
|
@@ -4457,7 +4499,7 @@ var QRCodeGenerator = ({
|
|
|
4457
4499
|
a.remove();
|
|
4458
4500
|
};
|
|
4459
4501
|
return /* @__PURE__ */ jsxs35("div", { style: { display: "inline-flex", flexDirection: "column", gap: 8 }, className: "justify-center items-center", children: [
|
|
4460
|
-
url === "" ? /* @__PURE__ */
|
|
4502
|
+
url === "" ? /* @__PURE__ */ jsx44("div", { className: "border-1 p-2 mb-2", style: { width: `${previewSize}px`, height: `${previewSize}px` } }) : /* @__PURE__ */ jsx44("canvas", { ref: canvasRef, className: "border-1 p-2 mb-2" }),
|
|
4461
4503
|
/* @__PURE__ */ jsxs35(
|
|
4462
4504
|
"div",
|
|
4463
4505
|
{
|
|
@@ -4470,7 +4512,7 @@ var QRCodeGenerator = ({
|
|
|
4470
4512
|
className: "flex-col",
|
|
4471
4513
|
children: [
|
|
4472
4514
|
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 mx-2", children: [
|
|
4473
|
-
/* @__PURE__ */
|
|
4515
|
+
/* @__PURE__ */ jsx44("label", { className: "border-1 p-2 rounded-md flex flex-col w-1/2 text-sm text-gray-400", children: /* @__PURE__ */ jsx44(
|
|
4474
4516
|
SelectField,
|
|
4475
4517
|
{
|
|
4476
4518
|
label: "\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A",
|
|
@@ -4479,7 +4521,7 @@ var QRCodeGenerator = ({
|
|
|
4479
4521
|
options: typeOption
|
|
4480
4522
|
}
|
|
4481
4523
|
) }),
|
|
4482
|
-
/* @__PURE__ */
|
|
4524
|
+
/* @__PURE__ */ jsx44("label", { className: "border-1 p-2 rounded-md flex flex-col w-1/2 text-sm text-gray-400", children: /* @__PURE__ */ jsx44(
|
|
4483
4525
|
SelectField,
|
|
4484
4526
|
{
|
|
4485
4527
|
label: "\u0E02\u0E19\u0E32\u0E14 (px)",
|
|
@@ -4489,7 +4531,7 @@ var QRCodeGenerator = ({
|
|
|
4489
4531
|
}
|
|
4490
4532
|
) })
|
|
4491
4533
|
] }),
|
|
4492
|
-
/* @__PURE__ */
|
|
4534
|
+
/* @__PURE__ */ jsx44(PrimaryButton, { onClick: download, disabled: url === "", textColor: "white", title: "\u0E14\u0E32\u0E27\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E2B\u0E31\u0E2A QR" })
|
|
4493
4535
|
]
|
|
4494
4536
|
}
|
|
4495
4537
|
)
|
|
@@ -4497,11 +4539,11 @@ var QRCodeGenerator = ({
|
|
|
4497
4539
|
};
|
|
4498
4540
|
|
|
4499
4541
|
// src/TabPropject/TabProject/TabProject.tsx
|
|
4500
|
-
import { ConfigProvider as
|
|
4501
|
-
import { jsx as
|
|
4542
|
+
import { ConfigProvider as ConfigProvider21, Tabs } from "antd";
|
|
4543
|
+
import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4502
4544
|
function TabProject({ tabOption, now, onChange }) {
|
|
4503
|
-
return /* @__PURE__ */
|
|
4504
|
-
|
|
4545
|
+
return /* @__PURE__ */ jsx45(
|
|
4546
|
+
ConfigProvider21,
|
|
4505
4547
|
{
|
|
4506
4548
|
theme: {
|
|
4507
4549
|
token: {
|
|
@@ -4517,7 +4559,7 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4517
4559
|
}
|
|
4518
4560
|
}
|
|
4519
4561
|
},
|
|
4520
|
-
children: /* @__PURE__ */
|
|
4562
|
+
children: /* @__PURE__ */ jsx45(
|
|
4521
4563
|
Tabs,
|
|
4522
4564
|
{
|
|
4523
4565
|
activeKey: now,
|
|
@@ -4526,7 +4568,7 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4526
4568
|
key: item.key,
|
|
4527
4569
|
label: /* @__PURE__ */ jsxs36("span", { className: "tab-label flex gap-2 items-center body-1", children: [
|
|
4528
4570
|
item.icon,
|
|
4529
|
-
/* @__PURE__ */
|
|
4571
|
+
/* @__PURE__ */ jsx45("span", { children: item.label })
|
|
4530
4572
|
] })
|
|
4531
4573
|
}))
|
|
4532
4574
|
}
|
|
@@ -4538,7 +4580,7 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4538
4580
|
// src/Chart/BarChart/BarChart.tsx
|
|
4539
4581
|
import { useEffect as useEffect9, useMemo as useMemo2, useRef as useRef8 } from "react";
|
|
4540
4582
|
import * as d3 from "d3";
|
|
4541
|
-
import { jsx as
|
|
4583
|
+
import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4542
4584
|
var defaultMargin = { top: 30, right: 200, bottom: 36, left: 50 };
|
|
4543
4585
|
var defaultColorPalette = [
|
|
4544
4586
|
"#4E79A7",
|
|
@@ -4651,17 +4693,17 @@ var BarChart = ({
|
|
|
4651
4693
|
useEffect9(() => {
|
|
4652
4694
|
render();
|
|
4653
4695
|
}, [data, height, margin, xDomain.toString(), yDomain.toString()]);
|
|
4654
|
-
return /* @__PURE__ */
|
|
4655
|
-
/* @__PURE__ */
|
|
4656
|
-
/* @__PURE__ */
|
|
4657
|
-
/* @__PURE__ */
|
|
4696
|
+
return /* @__PURE__ */ jsx46("div", { ref: containerRef, style: { width: "100%" }, children: /* @__PURE__ */ jsxs37("svg", { ref: svgRef, role: "img", "aria-label": "Bar chart", style: { display: "block", width: "100%", height }, children: [
|
|
4697
|
+
/* @__PURE__ */ jsx46("g", { ref: gRef, transform: `translate(${margin.left},${margin.top})` }),
|
|
4698
|
+
/* @__PURE__ */ jsx46("g", { ref: xAxisRef }),
|
|
4699
|
+
/* @__PURE__ */ jsx46("g", { ref: yAxisRef })
|
|
4658
4700
|
] }) });
|
|
4659
4701
|
};
|
|
4660
4702
|
|
|
4661
4703
|
// src/Chart/PieChart/PieChart.tsx
|
|
4662
4704
|
import React3, { useRef as useRef9, useEffect as useEffect10 } from "react";
|
|
4663
4705
|
import * as d32 from "d3";
|
|
4664
|
-
import { jsx as
|
|
4706
|
+
import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4665
4707
|
var defaultColors = d32.schemeCategory10;
|
|
4666
4708
|
var PieChart = ({
|
|
4667
4709
|
title,
|
|
@@ -4696,14 +4738,14 @@ var PieChart = ({
|
|
|
4696
4738
|
});
|
|
4697
4739
|
}, [data, width, height]);
|
|
4698
4740
|
return /* @__PURE__ */ jsxs38("div", { children: [
|
|
4699
|
-
title && /* @__PURE__ */
|
|
4700
|
-
description && /* @__PURE__ */
|
|
4741
|
+
title && /* @__PURE__ */ jsx47("p", { className: "body-2", children: title }),
|
|
4742
|
+
description && /* @__PURE__ */ jsx47("p", { className: "caption-1", children: description }),
|
|
4701
4743
|
/* @__PURE__ */ jsxs38("div", { className: "flex", children: [
|
|
4702
|
-
/* @__PURE__ */
|
|
4703
|
-
/* @__PURE__ */
|
|
4704
|
-
/* @__PURE__ */
|
|
4705
|
-
/* @__PURE__ */
|
|
4706
|
-
/* @__PURE__ */
|
|
4744
|
+
/* @__PURE__ */ jsx47("svg", { ref: svgRef }),
|
|
4745
|
+
/* @__PURE__ */ jsx47("div", { className: "flex flex-col gap-2 body-3 pl-[200px]", children: dataSide.map((d, i) => /* @__PURE__ */ jsxs38("div", { className: "grid grid-cols-3 gap-2 items-center", children: [
|
|
4746
|
+
/* @__PURE__ */ jsx47("div", { className: "w-[20px] h-[20px]", style: { backgroundColor: d.color } }),
|
|
4747
|
+
/* @__PURE__ */ jsx47("div", { children: d.label }),
|
|
4748
|
+
/* @__PURE__ */ jsx47("div", { children: d.value })
|
|
4707
4749
|
] }, i)) })
|
|
4708
4750
|
] })
|
|
4709
4751
|
] });
|
|
@@ -4722,7 +4764,7 @@ import {
|
|
|
4722
4764
|
addDays,
|
|
4723
4765
|
eachHourOfInterval
|
|
4724
4766
|
} from "date-fns";
|
|
4725
|
-
import { jsx as
|
|
4767
|
+
import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4726
4768
|
var LAYOUT = {
|
|
4727
4769
|
barHeight: 40,
|
|
4728
4770
|
barSpacing: 10,
|
|
@@ -4814,7 +4856,7 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4814
4856
|
},
|
|
4815
4857
|
children: [
|
|
4816
4858
|
/* @__PURE__ */ jsxs39("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
4817
|
-
/* @__PURE__ */
|
|
4859
|
+
/* @__PURE__ */ jsx48(
|
|
4818
4860
|
"span",
|
|
4819
4861
|
{
|
|
4820
4862
|
style: {
|
|
@@ -4826,11 +4868,11 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4826
4868
|
}
|
|
4827
4869
|
}
|
|
4828
4870
|
),
|
|
4829
|
-
/* @__PURE__ */
|
|
4871
|
+
/* @__PURE__ */ jsx48("span", { style: { color: "#333" }, children: element.label })
|
|
4830
4872
|
] }),
|
|
4831
|
-
/* @__PURE__ */
|
|
4832
|
-
/* @__PURE__ */
|
|
4833
|
-
/* @__PURE__ */
|
|
4873
|
+
/* @__PURE__ */ jsx48("div", { style: { color: "#666" }, children: formatThaiDate(safeStartDate) }),
|
|
4874
|
+
/* @__PURE__ */ jsx48("div", { style: { color: "#666" }, children: formatThaiDate(safeEndDate) }),
|
|
4875
|
+
/* @__PURE__ */ jsx48(
|
|
4834
4876
|
"button",
|
|
4835
4877
|
{
|
|
4836
4878
|
style: {
|
|
@@ -4852,7 +4894,7 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4852
4894
|
element.id
|
|
4853
4895
|
);
|
|
4854
4896
|
};
|
|
4855
|
-
var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__PURE__ */
|
|
4897
|
+
var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__PURE__ */ jsx48(
|
|
4856
4898
|
"div",
|
|
4857
4899
|
{
|
|
4858
4900
|
style: {
|
|
@@ -4867,7 +4909,7 @@ var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__P
|
|
|
4867
4909
|
children: data.map((d, i) => {
|
|
4868
4910
|
if (i === 0) return null;
|
|
4869
4911
|
const yPos = i * (barHeight + barSpacing) - barSpacing / 2;
|
|
4870
|
-
return /* @__PURE__ */
|
|
4912
|
+
return /* @__PURE__ */ jsx48(
|
|
4871
4913
|
"div",
|
|
4872
4914
|
{
|
|
4873
4915
|
style: {
|
|
@@ -5068,7 +5110,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5068
5110
|
headersGroupLayer1Height,
|
|
5069
5111
|
headersGroupLayer2Height
|
|
5070
5112
|
]);
|
|
5071
|
-
return /* @__PURE__ */
|
|
5113
|
+
return /* @__PURE__ */ jsx48(
|
|
5072
5114
|
"div",
|
|
5073
5115
|
{
|
|
5074
5116
|
style: {
|
|
@@ -5093,7 +5135,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5093
5135
|
position: "relative"
|
|
5094
5136
|
},
|
|
5095
5137
|
children: [
|
|
5096
|
-
/* @__PURE__ */
|
|
5138
|
+
/* @__PURE__ */ jsx48(RowOverlay, { data, barHeight, barSpacing, totalHeaderHeight }),
|
|
5097
5139
|
/* @__PURE__ */ jsxs39(
|
|
5098
5140
|
"div",
|
|
5099
5141
|
{
|
|
@@ -5128,18 +5170,18 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5128
5170
|
boxSizing: "border-box"
|
|
5129
5171
|
},
|
|
5130
5172
|
children: [
|
|
5131
|
-
/* @__PURE__ */
|
|
5132
|
-
/* @__PURE__ */
|
|
5133
|
-
/* @__PURE__ */
|
|
5134
|
-
/* @__PURE__ */
|
|
5173
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23" }),
|
|
5174
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E27\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21" }),
|
|
5175
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E2A\u0E48\u0E07" }),
|
|
5176
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E2A\u0E16\u0E32\u0E19\u0E30" })
|
|
5135
5177
|
]
|
|
5136
5178
|
}
|
|
5137
5179
|
),
|
|
5138
|
-
/* @__PURE__ */
|
|
5180
|
+
/* @__PURE__ */ jsx48("div", { ref: dataContainerRef, children: data.map((element) => /* @__PURE__ */ jsx48(ProjectRow, { element, barHeight, barSpacing }, element.id)) })
|
|
5139
5181
|
]
|
|
5140
5182
|
}
|
|
5141
5183
|
),
|
|
5142
|
-
/* @__PURE__ */
|
|
5184
|
+
/* @__PURE__ */ jsx48(
|
|
5143
5185
|
"div",
|
|
5144
5186
|
{
|
|
5145
5187
|
style: {
|
|
@@ -5148,7 +5190,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5148
5190
|
position: "relative",
|
|
5149
5191
|
overflow: "visible"
|
|
5150
5192
|
},
|
|
5151
|
-
children: /* @__PURE__ */
|
|
5193
|
+
children: /* @__PURE__ */ jsx48(
|
|
5152
5194
|
"div",
|
|
5153
5195
|
{
|
|
5154
5196
|
style: {
|
|
@@ -5157,7 +5199,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5157
5199
|
width: "max-content",
|
|
5158
5200
|
zIndex: 1
|
|
5159
5201
|
},
|
|
5160
|
-
children: /* @__PURE__ */
|
|
5202
|
+
children: /* @__PURE__ */ jsx48("svg", { ref: svgRef })
|
|
5161
5203
|
}
|
|
5162
5204
|
)
|
|
5163
5205
|
}
|
|
@@ -5212,6 +5254,7 @@ export {
|
|
|
5212
5254
|
SwitchSelect,
|
|
5213
5255
|
TabProject,
|
|
5214
5256
|
TabSelectionButton,
|
|
5257
|
+
TertiaryButton,
|
|
5215
5258
|
TextAreaInput,
|
|
5216
5259
|
TextInput,
|
|
5217
5260
|
TopNavBar,
|