@esic-lab/data-core-ui 0.0.60 → 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.css +0 -22
- package/dist/index.d.mts +47 -18
- package/dist/index.d.ts +47 -18
- package/dist/index.js +700 -577
- package/dist/index.mjs +680 -558
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -398,6 +398,7 @@ __export(index_exports, {
|
|
|
398
398
|
SwitchSelect: () => SwitchSelect,
|
|
399
399
|
TabProject: () => TabProject,
|
|
400
400
|
TabSelectionButton: () => TabSelectionButton,
|
|
401
|
+
TertiaryButton: () => TertiaryButton,
|
|
401
402
|
TextAreaInput: () => TextAreaInput,
|
|
402
403
|
TextInput: () => TextInput,
|
|
403
404
|
TopNavBar: () => TopNavBar,
|
|
@@ -411,47 +412,91 @@ __export(index_exports, {
|
|
|
411
412
|
module.exports = __toCommonJS(index_exports);
|
|
412
413
|
|
|
413
414
|
// src/Button/PrimaryButton/PrimaryButton.tsx
|
|
415
|
+
var import_antd = require("antd");
|
|
414
416
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
415
417
|
function PrimaryButton({
|
|
416
418
|
title,
|
|
417
419
|
onClick,
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
disabled,
|
|
421
|
+
iconPlacement = "start",
|
|
422
|
+
size = "large",
|
|
423
|
+
colorPrimary = "#4e61f6",
|
|
424
|
+
colorPrimaryHover = "#8895f9",
|
|
425
|
+
textColor = "#ffffff",
|
|
426
|
+
icon
|
|
423
427
|
}) {
|
|
428
|
+
const textClass = size === "large" ? "body-1" : "body-3";
|
|
424
429
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
425
|
-
|
|
430
|
+
import_antd.ConfigProvider,
|
|
426
431
|
{
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
432
|
+
theme: {
|
|
433
|
+
token: {
|
|
434
|
+
colorPrimary,
|
|
435
|
+
colorPrimaryHover,
|
|
436
|
+
colorTextLightSolid: textColor
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
440
|
+
import_antd.Button,
|
|
441
|
+
{
|
|
442
|
+
size,
|
|
443
|
+
onClick,
|
|
444
|
+
type: "primary",
|
|
445
|
+
className: textClass,
|
|
446
|
+
disabled,
|
|
447
|
+
icon,
|
|
448
|
+
iconPosition: iconPlacement,
|
|
449
|
+
children: title
|
|
450
|
+
}
|
|
451
|
+
)
|
|
437
452
|
}
|
|
438
453
|
);
|
|
439
454
|
}
|
|
440
455
|
|
|
441
456
|
// src/Button/SecondaryButton/SecondaryButton.tsx
|
|
457
|
+
var import_antd2 = require("antd");
|
|
442
458
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
443
|
-
function SecondaryButton({
|
|
459
|
+
function SecondaryButton({
|
|
460
|
+
title,
|
|
461
|
+
onClick,
|
|
462
|
+
disabled,
|
|
463
|
+
iconPlacement = "start",
|
|
464
|
+
size = "large",
|
|
465
|
+
colorBgContainer = "#ffffff",
|
|
466
|
+
defaultHoverBorderColor = "#7181f8",
|
|
467
|
+
defaultHoverColor = "#7181f8",
|
|
468
|
+
textColor = "rgba(0,0,0,0.88)",
|
|
469
|
+
icon
|
|
470
|
+
}) {
|
|
471
|
+
const textClass = size === "large" ? "body-1" : "body-3";
|
|
444
472
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
445
|
-
|
|
473
|
+
import_antd2.ConfigProvider,
|
|
446
474
|
{
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
475
|
+
theme: {
|
|
476
|
+
components: {
|
|
477
|
+
Button: {
|
|
478
|
+
defaultHoverBorderColor,
|
|
479
|
+
defaultHoverColor
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
token: {
|
|
483
|
+
colorBgContainer,
|
|
484
|
+
colorText: textColor
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
488
|
+
import_antd2.Button,
|
|
489
|
+
{
|
|
490
|
+
size,
|
|
491
|
+
onClick,
|
|
492
|
+
type: "default",
|
|
493
|
+
className: textClass,
|
|
494
|
+
disabled,
|
|
495
|
+
icon,
|
|
496
|
+
iconPosition: iconPlacement,
|
|
497
|
+
children: title
|
|
498
|
+
}
|
|
499
|
+
)
|
|
455
500
|
}
|
|
456
501
|
);
|
|
457
502
|
}
|
|
@@ -491,10 +536,52 @@ var TabSelectionButton = ({ title, now, onClickGoto }) => {
|
|
|
491
536
|
] });
|
|
492
537
|
};
|
|
493
538
|
|
|
494
|
-
// src/
|
|
539
|
+
// src/Button/TertiaryButton/TertiaryButton.tsx
|
|
540
|
+
var import_antd3 = require("antd");
|
|
495
541
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
496
|
-
function
|
|
542
|
+
function TertiaryButton({
|
|
543
|
+
title,
|
|
544
|
+
onClick,
|
|
545
|
+
disabled,
|
|
546
|
+
iconPlacement = "start",
|
|
547
|
+
size = "large",
|
|
548
|
+
colorPrimary = "#000",
|
|
549
|
+
colorPrimaryHover = "#4d5461",
|
|
550
|
+
textColor = "white",
|
|
551
|
+
icon
|
|
552
|
+
}) {
|
|
553
|
+
const textClass = size === "large" ? "body-1" : "body-3";
|
|
497
554
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
555
|
+
import_antd3.ConfigProvider,
|
|
556
|
+
{
|
|
557
|
+
theme: {
|
|
558
|
+
token: {
|
|
559
|
+
colorPrimary,
|
|
560
|
+
colorPrimaryHover,
|
|
561
|
+
colorText: textColor
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
565
|
+
import_antd3.Button,
|
|
566
|
+
{
|
|
567
|
+
size,
|
|
568
|
+
onClick,
|
|
569
|
+
type: "primary",
|
|
570
|
+
className: textClass,
|
|
571
|
+
disabled,
|
|
572
|
+
icon,
|
|
573
|
+
iconPosition: iconPlacement,
|
|
574
|
+
children: title
|
|
575
|
+
}
|
|
576
|
+
)
|
|
577
|
+
}
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
// src/Loader/Loader/Loader.tsx
|
|
582
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
583
|
+
function Loader({ size = 25, color = "#000000" }) {
|
|
584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
498
585
|
"div",
|
|
499
586
|
{
|
|
500
587
|
style: {
|
|
@@ -512,14 +599,14 @@ function Loader({ size = 25, color = "#000000" }) {
|
|
|
512
599
|
|
|
513
600
|
// src/Checkbox/Checkbox/Checkbox.tsx
|
|
514
601
|
var import_icons_react = require("@tabler/icons-react");
|
|
515
|
-
var
|
|
602
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
516
603
|
function Checkbox({ label, checked, onChange, disabled }) {
|
|
517
604
|
const handleClick = () => {
|
|
518
605
|
if (!disabled) {
|
|
519
606
|
onChange(!checked);
|
|
520
607
|
}
|
|
521
608
|
};
|
|
522
|
-
return /* @__PURE__ */ (0,
|
|
609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
523
610
|
"div",
|
|
524
611
|
{
|
|
525
612
|
className: `flex gap-[10px] items-center
|
|
@@ -527,32 +614,32 @@ function Checkbox({ label, checked, onChange, disabled }) {
|
|
|
527
614
|
"aria-disabled": disabled,
|
|
528
615
|
onClick: handleClick,
|
|
529
616
|
children: [
|
|
530
|
-
/* @__PURE__ */ (0,
|
|
617
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
531
618
|
"div",
|
|
532
619
|
{
|
|
533
620
|
className: `flex justify-center items-center border-[1px] border-black w-[24px] h-[24px] rounded-[8px] transition-colors duration-100
|
|
534
621
|
${checked ? "bg-black text-white" : "bg-white text-black"}
|
|
535
622
|
${disabled ? "pointer-events-none" : ""}`,
|
|
536
|
-
children: /* @__PURE__ */ (0,
|
|
623
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
537
624
|
"span",
|
|
538
625
|
{
|
|
539
626
|
className: `flex justify-center items-center transition-transform duration-150
|
|
540
627
|
${checked ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
541
|
-
children: /* @__PURE__ */ (0,
|
|
628
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_icons_react.IconCheck, { size: 20 })
|
|
542
629
|
}
|
|
543
630
|
)
|
|
544
631
|
}
|
|
545
632
|
),
|
|
546
|
-
label && /* @__PURE__ */ (0,
|
|
633
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "body-1 select-none", children: label })
|
|
547
634
|
]
|
|
548
635
|
}
|
|
549
636
|
);
|
|
550
637
|
}
|
|
551
638
|
|
|
552
639
|
// src/Checkbox/CheckboxGroup/CheckboxGroup.tsx
|
|
553
|
-
var
|
|
640
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
554
641
|
function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
555
|
-
return /* @__PURE__ */ (0,
|
|
642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `flex gap-4 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
556
643
|
Checkbox,
|
|
557
644
|
{
|
|
558
645
|
checked: opt.checked,
|
|
@@ -565,14 +652,14 @@ function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
|
565
652
|
}
|
|
566
653
|
|
|
567
654
|
// src/Radio/Radio/Radio.tsx
|
|
568
|
-
var
|
|
655
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
569
656
|
function Radio({ selected, onChange, disabled }) {
|
|
570
657
|
const handleClick = () => {
|
|
571
658
|
if (!disabled) {
|
|
572
659
|
onChange(!selected);
|
|
573
660
|
}
|
|
574
661
|
};
|
|
575
|
-
return /* @__PURE__ */ (0,
|
|
662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
576
663
|
"div",
|
|
577
664
|
{
|
|
578
665
|
className: `
|
|
@@ -581,31 +668,31 @@ function Radio({ selected, onChange, disabled }) {
|
|
|
581
668
|
`,
|
|
582
669
|
onClick: handleClick,
|
|
583
670
|
"aria-disabled": disabled,
|
|
584
|
-
children: selected && /* @__PURE__ */ (0,
|
|
671
|
+
children: selected && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: `bg-black w-[10px] h-[10px] rounded-full transition-all duration-300` })
|
|
585
672
|
}
|
|
586
673
|
);
|
|
587
674
|
}
|
|
588
675
|
|
|
589
676
|
// src/Radio/RadioGroup/RadioGroup.tsx
|
|
590
|
-
var
|
|
677
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
591
678
|
function RadioGroup({ options, value, onChange, alignment = "horizontal" }) {
|
|
592
|
-
return /* @__PURE__ */ (0,
|
|
593
|
-
/* @__PURE__ */ (0,
|
|
594
|
-
/* @__PURE__ */ (0,
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
680
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value), disabled: opt.disabled }),
|
|
681
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: `body-1 ${opt.disabled ? "text-gray-400 cursor-not-allowed" : ""}`, children: opt.label })
|
|
595
682
|
] }, opt.value)) });
|
|
596
683
|
}
|
|
597
684
|
|
|
598
685
|
// src/Switch/Switch/Switch.tsx
|
|
599
|
-
var
|
|
686
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
600
687
|
function Switch({ label, checked, onChange, disabled }) {
|
|
601
688
|
const handleClick = () => {
|
|
602
689
|
if (!disabled) {
|
|
603
690
|
onChange(!checked);
|
|
604
691
|
}
|
|
605
692
|
};
|
|
606
|
-
return /* @__PURE__ */ (0,
|
|
607
|
-
label && /* @__PURE__ */ (0,
|
|
608
|
-
/* @__PURE__ */ (0,
|
|
693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col gap-[10px]", children: [
|
|
694
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: `body-1 ${disabled ? "opacity-50 select-none" : ""}`, children: label }),
|
|
695
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
609
696
|
"button",
|
|
610
697
|
{
|
|
611
698
|
type: "button",
|
|
@@ -617,7 +704,7 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
617
704
|
${checked ? "bg-primary-500" : "bg-gray-300"}
|
|
618
705
|
${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}
|
|
619
706
|
`,
|
|
620
|
-
children: /* @__PURE__ */ (0,
|
|
707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
621
708
|
"div",
|
|
622
709
|
{
|
|
623
710
|
className: `bg-white w-5 h-5 rounded-full shadow-md transform transition-transform duration-300
|
|
@@ -630,7 +717,7 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
630
717
|
}
|
|
631
718
|
|
|
632
719
|
// src/Switch/SwitchSelect/SwitchSelect.tsx
|
|
633
|
-
var
|
|
720
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
634
721
|
function SwitchSelect({
|
|
635
722
|
option,
|
|
636
723
|
onClick,
|
|
@@ -639,13 +726,13 @@ function SwitchSelect({
|
|
|
639
726
|
required,
|
|
640
727
|
color
|
|
641
728
|
}) {
|
|
642
|
-
return /* @__PURE__ */ (0,
|
|
643
|
-
label && /* @__PURE__ */ (0,
|
|
729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col container-input", children: [
|
|
730
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: `body-1`, children: [
|
|
644
731
|
label,
|
|
645
732
|
" ",
|
|
646
|
-
required && /* @__PURE__ */ (0,
|
|
733
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-red-500", children: "*" })
|
|
647
734
|
] }),
|
|
648
|
-
/* @__PURE__ */ (0,
|
|
735
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex", children: option.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
649
736
|
"button",
|
|
650
737
|
{
|
|
651
738
|
onClick: () => onClick(item.value),
|
|
@@ -663,12 +750,12 @@ function SwitchSelect({
|
|
|
663
750
|
|
|
664
751
|
// src/NavBar/MenuNavBar/MenuNavBar.tsx
|
|
665
752
|
var import_react = require("react");
|
|
666
|
-
var
|
|
753
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
667
754
|
function MenuNavBar({ menus, onClick }) {
|
|
668
755
|
const [activePath, setActivePath] = (0, import_react.useState)("");
|
|
669
|
-
return /* @__PURE__ */ (0,
|
|
670
|
-
/* @__PURE__ */ (0,
|
|
671
|
-
menu?.subMenus.map((subMenu) => /* @__PURE__ */ (0,
|
|
756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-full h-full p-[10px] bg-white", children: menus?.map((menu, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `p-[10px] ${index !== 0 ? "mt-[10px]" : ""}`, children: [
|
|
757
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "p-[10px] w-[202px] h-[47px] subtitle-1", children: menu.title }),
|
|
758
|
+
menu?.subMenus.map((subMenu) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
672
759
|
"div",
|
|
673
760
|
{
|
|
674
761
|
className: `group flex justify-center items-center gap-[10px] p-[10px] w-[202px] h-[47px] rounded-[6px] subtitle-2 cursor-pointer
|
|
@@ -678,9 +765,9 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
678
765
|
setActivePath(subMenu.path);
|
|
679
766
|
},
|
|
680
767
|
children: [
|
|
681
|
-
/* @__PURE__ */ (0,
|
|
768
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "flex justify-center items-center w-[24px] h-[24px] text-[20px]", children: activePath === subMenu.path ? subMenu.iconActive ?? subMenu.icon : subMenu.icon }),
|
|
682
769
|
subMenu.title,
|
|
683
|
-
/* @__PURE__ */ (0,
|
|
770
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "flex ml-auto", children: subMenu.customNode && subMenu.customNode })
|
|
684
771
|
]
|
|
685
772
|
},
|
|
686
773
|
`sub_${subMenu.title}`
|
|
@@ -691,39 +778,39 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
691
778
|
// src/NavBar/MenuNavBar/Sidebar.tsx
|
|
692
779
|
var import_icons_react2 = require("@tabler/icons-react");
|
|
693
780
|
var import_react2 = require("react");
|
|
694
|
-
var
|
|
781
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
695
782
|
var SidebarContext = (0, import_react2.createContext)({ expanded: false });
|
|
696
783
|
function Sidebar({ children, logo }) {
|
|
697
784
|
const [expanded, setExpanded] = (0, import_react2.useState)(true);
|
|
698
|
-
return /* @__PURE__ */ (0,
|
|
699
|
-
/* @__PURE__ */ (0,
|
|
700
|
-
expanded && logo && /* @__PURE__ */ (0,
|
|
701
|
-
/* @__PURE__ */ (0,
|
|
785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("aside", { className: "h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
|
|
786
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
|
|
787
|
+
expanded && logo && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: logo, width: 120, className: "ml-auto" }),
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
702
789
|
"button",
|
|
703
790
|
{
|
|
704
791
|
className: "p-1.5 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer ml-auto",
|
|
705
792
|
onClick: () => setExpanded((curr) => !curr),
|
|
706
|
-
children: expanded ? /* @__PURE__ */ (0,
|
|
793
|
+
children: expanded ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react2.IconChevronLeftPipe, {}) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_icons_react2.IconChevronRightPipe, {})
|
|
707
794
|
}
|
|
708
795
|
)
|
|
709
796
|
] }),
|
|
710
|
-
/* @__PURE__ */ (0,
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "flex-1 px-3", children }) })
|
|
711
798
|
] }) });
|
|
712
799
|
}
|
|
713
800
|
|
|
714
801
|
// src/NavBar/TopNavBar/TopNavBar.tsx
|
|
715
802
|
var import_icons_react3 = require("@tabler/icons-react");
|
|
716
|
-
var
|
|
803
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
717
804
|
function TopNavBar({ onClickNoti, logo }) {
|
|
718
|
-
return /* @__PURE__ */ (0,
|
|
719
|
-
/* @__PURE__ */ (0,
|
|
805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "w-full h-full flex", children: [
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
|
|
720
807
|
logo,
|
|
721
|
-
/* @__PURE__ */ (0,
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "subtitle-1", children: "Project Management" })
|
|
722
809
|
] }),
|
|
723
|
-
/* @__PURE__ */ (0,
|
|
724
|
-
/* @__PURE__ */ (0,
|
|
725
|
-
/* @__PURE__ */ (0,
|
|
726
|
-
/* @__PURE__ */ (0,
|
|
810
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
|
|
811
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: "Search" }),
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons_react3.IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
|
|
813
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
|
|
727
814
|
] })
|
|
728
815
|
] });
|
|
729
816
|
}
|
|
@@ -735,7 +822,7 @@ var import_react4 = require("react");
|
|
|
735
822
|
// src/Table/Pagination/Pagination.tsx
|
|
736
823
|
var import_icons_react4 = require("@tabler/icons-react");
|
|
737
824
|
var import_react3 = require("react");
|
|
738
|
-
var
|
|
825
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
739
826
|
function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
740
827
|
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
741
828
|
const getPages = (0, import_react3.useMemo)(() => {
|
|
@@ -759,21 +846,21 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
759
846
|
return pages;
|
|
760
847
|
}, [totalPages, currentPage]);
|
|
761
848
|
if (totalPages <= 1) return null;
|
|
762
|
-
return /* @__PURE__ */ (0,
|
|
763
|
-
/* @__PURE__ */ (0,
|
|
849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-center justify-center gap-2 mt-4 body-1", children: [
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
764
851
|
"button",
|
|
765
852
|
{
|
|
766
853
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
767
854
|
disabled: currentPage === 1,
|
|
768
855
|
onClick: () => onPageChange(currentPage - 1),
|
|
769
856
|
children: [
|
|
770
|
-
/* @__PURE__ */ (0,
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons_react4.IconArrowLeft, {}),
|
|
771
858
|
"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A"
|
|
772
859
|
]
|
|
773
860
|
}
|
|
774
861
|
),
|
|
775
862
|
getPages.map(
|
|
776
|
-
(page, i) => typeof page === "string" ? /* @__PURE__ */ (0,
|
|
863
|
+
(page, i) => typeof page === "string" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
777
864
|
"button",
|
|
778
865
|
{
|
|
779
866
|
className: `w-[32px] h-[32px] rounded-[8px] px-3 py-1 cursor-pointer
|
|
@@ -784,7 +871,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
784
871
|
i
|
|
785
872
|
)
|
|
786
873
|
),
|
|
787
|
-
/* @__PURE__ */ (0,
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
788
875
|
"button",
|
|
789
876
|
{
|
|
790
877
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
@@ -792,7 +879,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
792
879
|
onClick: () => onPageChange(currentPage + 1),
|
|
793
880
|
children: [
|
|
794
881
|
"\u0E16\u0E31\u0E14\u0E44\u0E1B",
|
|
795
|
-
/* @__PURE__ */ (0,
|
|
882
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons_react4.IconArrowRight, {})
|
|
796
883
|
]
|
|
797
884
|
}
|
|
798
885
|
)
|
|
@@ -800,7 +887,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
800
887
|
}
|
|
801
888
|
|
|
802
889
|
// src/Table/DataTable/DataTable.tsx
|
|
803
|
-
var
|
|
890
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
804
891
|
function DataTable({ columns, data, onSort, isLoading }) {
|
|
805
892
|
const cols = Math.max(1, columns.length);
|
|
806
893
|
const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
|
|
@@ -812,14 +899,14 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
812
899
|
onSort();
|
|
813
900
|
}
|
|
814
901
|
};
|
|
815
|
-
return /* @__PURE__ */ (0,
|
|
816
|
-
/* @__PURE__ */ (0,
|
|
902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "border rounded-md w-full h-full", children: [
|
|
903
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
|
|
817
904
|
const isActive = sortConfig?.key === col.accessor;
|
|
818
905
|
const direction = isActive ? sortConfig?.direction : null;
|
|
819
|
-
return /* @__PURE__ */ (0,
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
|
|
820
907
|
col.header,
|
|
821
|
-
col.sortable && /* @__PURE__ */ (0,
|
|
822
|
-
direction === null && /* @__PURE__ */ (0,
|
|
908
|
+
col.sortable && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
909
|
+
direction === null && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
823
910
|
import_icons_react5.IconSelector,
|
|
824
911
|
{
|
|
825
912
|
size: 15,
|
|
@@ -827,7 +914,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
827
914
|
onClick: () => onSorting({ key: col.accessor, direction: "asc" })
|
|
828
915
|
}
|
|
829
916
|
),
|
|
830
|
-
direction === "asc" && /* @__PURE__ */ (0,
|
|
917
|
+
direction === "asc" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
831
918
|
import_icons_react5.IconSortAscending,
|
|
832
919
|
{
|
|
833
920
|
size: 15,
|
|
@@ -835,7 +922,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
835
922
|
onClick: () => onSorting({ key: col.accessor, direction: "desc" })
|
|
836
923
|
}
|
|
837
924
|
),
|
|
838
|
-
direction === "desc" && /* @__PURE__ */ (0,
|
|
925
|
+
direction === "desc" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
839
926
|
import_icons_react5.IconSortDescending,
|
|
840
927
|
{
|
|
841
928
|
size: 15,
|
|
@@ -846,23 +933,23 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
846
933
|
] })
|
|
847
934
|
] }, i);
|
|
848
935
|
}) }),
|
|
849
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
936
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Loader, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: data.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
850
937
|
"div",
|
|
851
938
|
{
|
|
852
939
|
className: `${gridClass} ${data.length - 1 !== i ? "border-b border-gray-200" : ""} items-center`,
|
|
853
940
|
style: { ["--cols"]: cols },
|
|
854
|
-
children: columns.map((col, c) => /* @__PURE__ */ (0,
|
|
941
|
+
children: columns.map((col, c) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
|
|
855
942
|
},
|
|
856
943
|
i
|
|
857
944
|
)) }),
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
945
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
|
|
859
946
|
] });
|
|
860
947
|
}
|
|
861
948
|
|
|
862
949
|
// src/Table/DataTable/AntDataTable.tsx
|
|
863
|
-
var
|
|
950
|
+
var import_antd4 = require("antd");
|
|
864
951
|
var import_react5 = require("react");
|
|
865
|
-
var
|
|
952
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
866
953
|
function AntDataTable({
|
|
867
954
|
dataSource,
|
|
868
955
|
columns,
|
|
@@ -888,8 +975,8 @@ function AntDataTable({
|
|
|
888
975
|
onChange?.(paginationArgs, filters, sorter, extra);
|
|
889
976
|
onFilter(filters);
|
|
890
977
|
};
|
|
891
|
-
return /* @__PURE__ */ (0,
|
|
892
|
-
|
|
978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
979
|
+
import_antd4.ConfigProvider,
|
|
893
980
|
{
|
|
894
981
|
theme: {
|
|
895
982
|
components: {},
|
|
@@ -898,8 +985,8 @@ function AntDataTable({
|
|
|
898
985
|
fontSize: 14
|
|
899
986
|
}
|
|
900
987
|
},
|
|
901
|
-
children: /* @__PURE__ */ (0,
|
|
902
|
-
|
|
988
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
989
|
+
import_antd4.Table,
|
|
903
990
|
{
|
|
904
991
|
dataSource,
|
|
905
992
|
columns,
|
|
@@ -922,7 +1009,7 @@ var import_timegrid = __toESM(require("@fullcalendar/timegrid"));
|
|
|
922
1009
|
var import_interaction = __toESM(require("@fullcalendar/interaction"));
|
|
923
1010
|
var import_th = __toESM(require("@fullcalendar/core/locales/th"));
|
|
924
1011
|
var import_icons_react6 = require("@tabler/icons-react");
|
|
925
|
-
var
|
|
1012
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
926
1013
|
function Calendar({ events }) {
|
|
927
1014
|
const calendarRef = (0, import_react6.useRef)(null);
|
|
928
1015
|
const [monthTitle, setMonthTitle] = (0, import_react6.useState)("");
|
|
@@ -941,11 +1028,11 @@ function Calendar({ events }) {
|
|
|
941
1028
|
(0, import_react6.useEffect)(() => {
|
|
942
1029
|
updateTitle();
|
|
943
1030
|
}, []);
|
|
944
|
-
return /* @__PURE__ */ (0,
|
|
945
|
-
/* @__PURE__ */ (0,
|
|
946
|
-
/* @__PURE__ */ (0,
|
|
947
|
-
/* @__PURE__ */ (0,
|
|
948
|
-
/* @__PURE__ */ (0,
|
|
1031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "fc w-full h-full relative z-10", children: [
|
|
1032
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex mb-[8px]", children: [
|
|
1033
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "headline-5", children: monthTitle }),
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-[10px] ml-auto", children: [
|
|
1035
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
949
1036
|
"p",
|
|
950
1037
|
{
|
|
951
1038
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -956,7 +1043,7 @@ function Calendar({ events }) {
|
|
|
956
1043
|
children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
|
|
957
1044
|
}
|
|
958
1045
|
),
|
|
959
|
-
/* @__PURE__ */ (0,
|
|
1046
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
960
1047
|
"p",
|
|
961
1048
|
{
|
|
962
1049
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -967,7 +1054,7 @@ function Calendar({ events }) {
|
|
|
967
1054
|
children: "Month"
|
|
968
1055
|
}
|
|
969
1056
|
),
|
|
970
|
-
/* @__PURE__ */ (0,
|
|
1057
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
971
1058
|
"p",
|
|
972
1059
|
{
|
|
973
1060
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -978,7 +1065,7 @@ function Calendar({ events }) {
|
|
|
978
1065
|
children: "Week"
|
|
979
1066
|
}
|
|
980
1067
|
),
|
|
981
|
-
/* @__PURE__ */ (0,
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
982
1069
|
"p",
|
|
983
1070
|
{
|
|
984
1071
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -989,7 +1076,7 @@ function Calendar({ events }) {
|
|
|
989
1076
|
children: "Day"
|
|
990
1077
|
}
|
|
991
1078
|
),
|
|
992
|
-
/* @__PURE__ */ (0,
|
|
1079
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
993
1080
|
"button",
|
|
994
1081
|
{
|
|
995
1082
|
className: "cursor-pointer",
|
|
@@ -997,10 +1084,10 @@ function Calendar({ events }) {
|
|
|
997
1084
|
calendarRef.current?.getApi().prev();
|
|
998
1085
|
updateTitle();
|
|
999
1086
|
},
|
|
1000
|
-
children: /* @__PURE__ */ (0,
|
|
1087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react6.IconChevronLeft, {})
|
|
1001
1088
|
}
|
|
1002
1089
|
),
|
|
1003
|
-
/* @__PURE__ */ (0,
|
|
1090
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1004
1091
|
"button",
|
|
1005
1092
|
{
|
|
1006
1093
|
className: "cursor-pointer",
|
|
@@ -1008,12 +1095,12 @@ function Calendar({ events }) {
|
|
|
1008
1095
|
calendarRef.current?.getApi().next();
|
|
1009
1096
|
updateTitle();
|
|
1010
1097
|
},
|
|
1011
|
-
children: /* @__PURE__ */ (0,
|
|
1098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react6.IconChevronRight, {})
|
|
1012
1099
|
}
|
|
1013
1100
|
)
|
|
1014
1101
|
] })
|
|
1015
1102
|
] }),
|
|
1016
|
-
/* @__PURE__ */ (0,
|
|
1103
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1017
1104
|
import_react7.default,
|
|
1018
1105
|
{
|
|
1019
1106
|
ref: calendarRef,
|
|
@@ -1042,28 +1129,28 @@ function Calendar({ events }) {
|
|
|
1042
1129
|
});
|
|
1043
1130
|
},
|
|
1044
1131
|
eventContent: (arg) => {
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex items-center h-[28px] p-[4px] border-green-500 border-l-[10px] bg-red-400 rounded text-left text-white caption-1", children: arg.event.title }) });
|
|
1046
1133
|
},
|
|
1047
1134
|
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
1048
1135
|
}
|
|
1049
1136
|
) }),
|
|
1050
|
-
openPopup && /* @__PURE__ */ (0,
|
|
1137
|
+
openPopup && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
|
|
1051
1138
|
] });
|
|
1052
1139
|
}
|
|
1053
1140
|
function EventPopUp({ event, onClose }) {
|
|
1054
|
-
return /* @__PURE__ */ (0,
|
|
1055
|
-
/* @__PURE__ */ (0,
|
|
1056
|
-
/* @__PURE__ */ (0,
|
|
1057
|
-
/* @__PURE__ */ (0,
|
|
1058
|
-
/* @__PURE__ */ (0,
|
|
1059
|
-
/* @__PURE__ */ (0,
|
|
1141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react6.IconX, { className: "w-6 h-6 text-gray-600" }) }),
|
|
1143
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "text-lg font-semibold", children: event.title }) }),
|
|
1144
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { children: [
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
|
|
1060
1147
|
event?.start?.toLocaleString?.() || String(event?.start)
|
|
1061
1148
|
] }),
|
|
1062
|
-
/* @__PURE__ */ (0,
|
|
1063
|
-
/* @__PURE__ */ (0,
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { children: [
|
|
1150
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
|
|
1064
1151
|
event?.end?.toLocaleString?.() || String(event?.end)
|
|
1065
1152
|
] }),
|
|
1066
|
-
/* @__PURE__ */ (0,
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: "text-sm font-semibold text-gray-500 uppercase mb-2 hover:underline cursor-pointer", children: "\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21" })
|
|
1067
1154
|
] })
|
|
1068
1155
|
] });
|
|
1069
1156
|
}
|
|
@@ -1071,7 +1158,7 @@ function EventPopUp({ event, onClose }) {
|
|
|
1071
1158
|
// src/Input/TextInput/TextInput.tsx
|
|
1072
1159
|
var import_icons_react7 = require("@tabler/icons-react");
|
|
1073
1160
|
var import_react8 = require("react");
|
|
1074
|
-
var
|
|
1161
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1075
1162
|
function TextInput({
|
|
1076
1163
|
label,
|
|
1077
1164
|
placeholder,
|
|
@@ -1088,18 +1175,18 @@ function TextInput({
|
|
|
1088
1175
|
setShowPassword(!showPassword);
|
|
1089
1176
|
};
|
|
1090
1177
|
const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
|
|
1091
|
-
return /* @__PURE__ */ (0,
|
|
1092
|
-
label && /* @__PURE__ */ (0,
|
|
1178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
1179
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "body-1 mb-[8px]", children: [
|
|
1093
1180
|
label,
|
|
1094
|
-
required && /* @__PURE__ */ (0,
|
|
1181
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-red-500", children: "\xA0*" })
|
|
1095
1182
|
] }),
|
|
1096
|
-
/* @__PURE__ */ (0,
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1097
1184
|
"div",
|
|
1098
1185
|
{
|
|
1099
1186
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1100
1187
|
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-500" : ""}`,
|
|
1101
1188
|
children: [
|
|
1102
|
-
/* @__PURE__ */ (0,
|
|
1189
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1103
1190
|
"input",
|
|
1104
1191
|
{
|
|
1105
1192
|
className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
|
|
@@ -1112,18 +1199,18 @@ function TextInput({
|
|
|
1112
1199
|
disabled
|
|
1113
1200
|
}
|
|
1114
1201
|
),
|
|
1115
|
-
type === "password" && (showPassword ? /* @__PURE__ */ (0,
|
|
1202
|
+
type === "password" && (showPassword ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react7.IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react7.IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
|
|
1116
1203
|
]
|
|
1117
1204
|
}
|
|
1118
1205
|
),
|
|
1119
|
-
error && /* @__PURE__ */ (0,
|
|
1206
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-red-500 body-1", children: error })
|
|
1120
1207
|
] });
|
|
1121
1208
|
}
|
|
1122
1209
|
|
|
1123
1210
|
// src/Input/TextArea/TextArea.tsx
|
|
1124
|
-
var
|
|
1125
|
-
var
|
|
1126
|
-
var { TextArea } =
|
|
1211
|
+
var import_antd5 = require("antd");
|
|
1212
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1213
|
+
var { TextArea } = import_antd5.Input;
|
|
1127
1214
|
function TextAreaInput({
|
|
1128
1215
|
label,
|
|
1129
1216
|
height = 4,
|
|
@@ -1137,8 +1224,8 @@ function TextAreaInput({
|
|
|
1137
1224
|
error,
|
|
1138
1225
|
disabled
|
|
1139
1226
|
}) {
|
|
1140
|
-
return /* @__PURE__ */ (0,
|
|
1141
|
-
|
|
1227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1228
|
+
import_antd5.ConfigProvider,
|
|
1142
1229
|
{
|
|
1143
1230
|
theme: {
|
|
1144
1231
|
components: {},
|
|
@@ -1147,13 +1234,13 @@ function TextAreaInput({
|
|
|
1147
1234
|
fontSize: 16
|
|
1148
1235
|
}
|
|
1149
1236
|
},
|
|
1150
|
-
children: /* @__PURE__ */ (0,
|
|
1151
|
-
label && /* @__PURE__ */ (0,
|
|
1237
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
1238
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("p", { className: "body-1 mb-[8px]", children: [
|
|
1152
1239
|
label,
|
|
1153
1240
|
" ",
|
|
1154
|
-
required && /* @__PURE__ */ (0,
|
|
1241
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-red-500", children: "\xA0*" })
|
|
1155
1242
|
] }),
|
|
1156
|
-
/* @__PURE__ */ (0,
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1157
1244
|
TextArea,
|
|
1158
1245
|
{
|
|
1159
1246
|
value,
|
|
@@ -1169,15 +1256,15 @@ function TextAreaInput({
|
|
|
1169
1256
|
disabled
|
|
1170
1257
|
}
|
|
1171
1258
|
),
|
|
1172
|
-
error && /* @__PURE__ */ (0,
|
|
1259
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-red-500 body-1", children: error })
|
|
1173
1260
|
] })
|
|
1174
1261
|
}
|
|
1175
1262
|
) });
|
|
1176
1263
|
}
|
|
1177
1264
|
|
|
1178
1265
|
// src/Input/InputField/InputField.tsx
|
|
1179
|
-
var
|
|
1180
|
-
var
|
|
1266
|
+
var import_antd6 = require("antd");
|
|
1267
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1181
1268
|
function InputField({
|
|
1182
1269
|
value,
|
|
1183
1270
|
onChange,
|
|
@@ -1193,24 +1280,24 @@ function InputField({
|
|
|
1193
1280
|
onClear,
|
|
1194
1281
|
statickey
|
|
1195
1282
|
}) {
|
|
1196
|
-
return /* @__PURE__ */ (0,
|
|
1197
|
-
|
|
1283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1284
|
+
import_antd6.ConfigProvider,
|
|
1198
1285
|
{
|
|
1199
1286
|
theme: {
|
|
1200
1287
|
token: {
|
|
1201
1288
|
fontFamily: "Kanit"
|
|
1202
1289
|
}
|
|
1203
1290
|
},
|
|
1204
|
-
children: /* @__PURE__ */ (0,
|
|
1205
|
-
/* @__PURE__ */ (0,
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1291
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "container-input", children: [
|
|
1292
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
|
|
1293
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "body-1", children: label }),
|
|
1207
1294
|
" ",
|
|
1208
|
-
required && /* @__PURE__ */ (0,
|
|
1295
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1209
1296
|
] }),
|
|
1210
|
-
/* @__PURE__ */ (0,
|
|
1211
|
-
statickey && /* @__PURE__ */ (0,
|
|
1212
|
-
/* @__PURE__ */ (0,
|
|
1213
|
-
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_antd6.Space.Compact, { children: [
|
|
1298
|
+
statickey && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "items-center flex px-2 bg-gray-300 rounded-l-md body-1", children: statickey }),
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1300
|
+
import_antd6.Input,
|
|
1214
1301
|
{
|
|
1215
1302
|
value,
|
|
1216
1303
|
placeholder,
|
|
@@ -1225,15 +1312,15 @@ function InputField({
|
|
|
1225
1312
|
}
|
|
1226
1313
|
)
|
|
1227
1314
|
] }),
|
|
1228
|
-
error && /* @__PURE__ */ (0,
|
|
1315
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1229
1316
|
] })
|
|
1230
1317
|
}
|
|
1231
1318
|
);
|
|
1232
1319
|
}
|
|
1233
1320
|
|
|
1234
1321
|
// src/Input/InputFieldNumber/InputFieldNumber.tsx
|
|
1235
|
-
var
|
|
1236
|
-
var
|
|
1322
|
+
var import_antd7 = require("antd");
|
|
1323
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1237
1324
|
function InputFieldNumber({
|
|
1238
1325
|
value,
|
|
1239
1326
|
onChange,
|
|
@@ -1254,22 +1341,22 @@ function InputFieldNumber({
|
|
|
1254
1341
|
formatter,
|
|
1255
1342
|
parser
|
|
1256
1343
|
}) {
|
|
1257
|
-
return /* @__PURE__ */ (0,
|
|
1258
|
-
|
|
1344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1345
|
+
import_antd7.ConfigProvider,
|
|
1259
1346
|
{
|
|
1260
1347
|
theme: {
|
|
1261
1348
|
token: {
|
|
1262
1349
|
fontFamily: "Kanit"
|
|
1263
1350
|
}
|
|
1264
1351
|
},
|
|
1265
|
-
children: /* @__PURE__ */ (0,
|
|
1266
|
-
/* @__PURE__ */ (0,
|
|
1267
|
-
/* @__PURE__ */ (0,
|
|
1352
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "container-input", children: [
|
|
1353
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
1354
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "body-1", children: label }),
|
|
1268
1355
|
" ",
|
|
1269
|
-
required && /* @__PURE__ */ (0,
|
|
1356
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1270
1357
|
] }),
|
|
1271
|
-
/* @__PURE__ */ (0,
|
|
1272
|
-
|
|
1358
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1359
|
+
import_antd7.InputNumber,
|
|
1273
1360
|
{
|
|
1274
1361
|
value: value ?? void 0,
|
|
1275
1362
|
onChange: (val) => onChange(val),
|
|
@@ -1284,11 +1371,20 @@ function InputFieldNumber({
|
|
|
1284
1371
|
controls,
|
|
1285
1372
|
size,
|
|
1286
1373
|
changeOnWheel,
|
|
1287
|
-
formatter
|
|
1288
|
-
|
|
1374
|
+
formatter: formatter ?? ((value2) => {
|
|
1375
|
+
if (value2 === void 0 || value2 === null || value2 === "")
|
|
1376
|
+
return "";
|
|
1377
|
+
const num = Number(value2);
|
|
1378
|
+
if (isNaN(num)) return "";
|
|
1379
|
+
return num.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1380
|
+
}),
|
|
1381
|
+
parser: parser ?? ((value2) => {
|
|
1382
|
+
if (!value2) return "";
|
|
1383
|
+
return value2.replace(/,/g, "");
|
|
1384
|
+
})
|
|
1289
1385
|
}
|
|
1290
1386
|
),
|
|
1291
|
-
error && /* @__PURE__ */ (0,
|
|
1387
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1292
1388
|
] })
|
|
1293
1389
|
}
|
|
1294
1390
|
);
|
|
@@ -1301,7 +1397,7 @@ var import_th2 = __toESM(require_th());
|
|
|
1301
1397
|
var import_buddhistEra = __toESM(require_buddhistEra());
|
|
1302
1398
|
var import_date_fns = require("date-fns");
|
|
1303
1399
|
var import_locale = require("date-fns/locale");
|
|
1304
|
-
var
|
|
1400
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1305
1401
|
import_dayjs.default.extend(import_buddhistEra.default);
|
|
1306
1402
|
import_dayjs.default.locale("th");
|
|
1307
1403
|
function DatePickerBasic({
|
|
@@ -1365,27 +1461,27 @@ function DatePickerBasic({
|
|
|
1365
1461
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1366
1462
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1367
1463
|
}, []);
|
|
1368
|
-
return /* @__PURE__ */ (0,
|
|
1369
|
-
/* @__PURE__ */ (0,
|
|
1370
|
-
/* @__PURE__ */ (0,
|
|
1371
|
-
required && /* @__PURE__ */ (0,
|
|
1464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref: wrapperRef, style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
|
|
1465
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mb-1", children: [
|
|
1466
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "body-1", children: label }),
|
|
1467
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-red-500 ml-1", children: "*" })
|
|
1372
1468
|
] }),
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1374
1470
|
"div",
|
|
1375
1471
|
{
|
|
1376
1472
|
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"}`,
|
|
1377
1473
|
onClick: () => !disabled && setOpen(!open),
|
|
1378
|
-
children: /* @__PURE__ */ (0,
|
|
1474
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex-1", children: value ? formatThaiBE(value) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-gray-400", children: placeholder }) })
|
|
1379
1475
|
}
|
|
1380
1476
|
),
|
|
1381
|
-
open && /* @__PURE__ */ (0,
|
|
1477
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1382
1478
|
"div",
|
|
1383
1479
|
{
|
|
1384
1480
|
className: "absolute z-50 mt-2 w-80 p-4 bg-white shadow-xl rounded-lg border animate-fade-in",
|
|
1385
1481
|
style: { fontFamily: "Kanit", fontSize: 16 },
|
|
1386
1482
|
children: [
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1388
|
-
/* @__PURE__ */ (0,
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-between items-center mb-3", children: [
|
|
1484
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1389
1485
|
"button",
|
|
1390
1486
|
{
|
|
1391
1487
|
onClick: () => setCalendar(calendar.subtract(1, "month")),
|
|
@@ -1393,16 +1489,16 @@ function DatePickerBasic({
|
|
|
1393
1489
|
children: "\u25C0"
|
|
1394
1490
|
}
|
|
1395
1491
|
),
|
|
1396
|
-
/* @__PURE__ */ (0,
|
|
1492
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "font-semibold text-lg text-gray-700", children: [
|
|
1397
1493
|
monthNames[calendar.month()],
|
|
1398
1494
|
" ",
|
|
1399
1495
|
calendar.year() + 543
|
|
1400
1496
|
] }),
|
|
1401
|
-
/* @__PURE__ */ (0,
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2 hover:bg-gray-100 rounded", children: "\u25B6" })
|
|
1402
1498
|
] }),
|
|
1403
|
-
/* @__PURE__ */ (0,
|
|
1404
|
-
/* @__PURE__ */ (0,
|
|
1405
|
-
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ (0,
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("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__ */ (0, import_jsx_runtime24.jsx)("div", { children: d }, d)) }),
|
|
1500
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "grid grid-cols-7 gap-1 text-center", children: [
|
|
1501
|
+
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", {}, `empty-${i}`)),
|
|
1406
1502
|
Array.from({ length: daysInMonth }, (_, i) => i + 1).map((d) => {
|
|
1407
1503
|
const dateObj = calendar.date(d);
|
|
1408
1504
|
const isDisable = isDisabled(dateObj);
|
|
@@ -1420,7 +1516,7 @@ function DatePickerBasic({
|
|
|
1420
1516
|
bgClass = "border border-blue-500 font-bold";
|
|
1421
1517
|
textClass = "text-blue-600";
|
|
1422
1518
|
}
|
|
1423
|
-
return /* @__PURE__ */ (0,
|
|
1519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1424
1520
|
"div",
|
|
1425
1521
|
{
|
|
1426
1522
|
onClick: () => !isDisable && handleSelect(d),
|
|
@@ -1438,7 +1534,7 @@ function DatePickerBasic({
|
|
|
1438
1534
|
]
|
|
1439
1535
|
}
|
|
1440
1536
|
),
|
|
1441
|
-
error && /* @__PURE__ */ (0,
|
|
1537
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-red-500 text-xs mt-1", children: error })
|
|
1442
1538
|
] });
|
|
1443
1539
|
}
|
|
1444
1540
|
|
|
@@ -1449,7 +1545,7 @@ var import_th3 = __toESM(require_th());
|
|
|
1449
1545
|
var import_buddhistEra2 = __toESM(require_buddhistEra());
|
|
1450
1546
|
var import_date_fns2 = require("date-fns");
|
|
1451
1547
|
var import_locale2 = require("date-fns/locale");
|
|
1452
|
-
var
|
|
1548
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1453
1549
|
import_dayjs2.default.extend(import_buddhistEra2.default);
|
|
1454
1550
|
import_dayjs2.default.locale("th");
|
|
1455
1551
|
function DatePickerRange({
|
|
@@ -1523,7 +1619,7 @@ function DatePickerRange({
|
|
|
1523
1619
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1524
1620
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1525
1621
|
}, []);
|
|
1526
|
-
const ArrowIcon = () => /* @__PURE__ */ (0,
|
|
1622
|
+
const ArrowIcon = () => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("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__ */ (0, import_jsx_runtime25.jsx)(
|
|
1527
1623
|
"path",
|
|
1528
1624
|
{
|
|
1529
1625
|
fillRule: "evenodd",
|
|
@@ -1531,31 +1627,31 @@ function DatePickerRange({
|
|
|
1531
1627
|
clipRule: "evenodd"
|
|
1532
1628
|
}
|
|
1533
1629
|
) });
|
|
1534
|
-
return /* @__PURE__ */ (0,
|
|
1535
|
-
/* @__PURE__ */ (0,
|
|
1536
|
-
/* @__PURE__ */ (0,
|
|
1537
|
-
required && /* @__PURE__ */ (0,
|
|
1630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: wrapperRef, style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "mb-1", children: [
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "body-1", children: label }),
|
|
1633
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-red-500 ml-1", children: "*" })
|
|
1538
1634
|
] }),
|
|
1539
|
-
/* @__PURE__ */ (0,
|
|
1635
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1540
1636
|
"div",
|
|
1541
1637
|
{
|
|
1542
1638
|
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"}`,
|
|
1543
1639
|
onClick: () => !disabled && setOpen(!open),
|
|
1544
1640
|
children: [
|
|
1545
|
-
/* @__PURE__ */ (0,
|
|
1546
|
-
/* @__PURE__ */ (0,
|
|
1547
|
-
/* @__PURE__ */ (0,
|
|
1641
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("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" }),
|
|
1642
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArrowIcon, {}) }),
|
|
1643
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("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" })
|
|
1548
1644
|
]
|
|
1549
1645
|
}
|
|
1550
1646
|
),
|
|
1551
|
-
open && /* @__PURE__ */ (0,
|
|
1647
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1552
1648
|
"div",
|
|
1553
1649
|
{
|
|
1554
1650
|
className: "absolute z-50 mt-2 w-80 p-4 bg-white shadow-xl rounded-lg border animate-fade-in right-0 left-0 mx-auto sm:mx-0 sm:left-auto sm:right-auto",
|
|
1555
1651
|
style: { fontFamily: "Kanit", fontSize: 16 },
|
|
1556
1652
|
children: [
|
|
1557
|
-
/* @__PURE__ */ (0,
|
|
1558
|
-
/* @__PURE__ */ (0,
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex justify-between items-center mb-3", children: [
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1559
1655
|
"button",
|
|
1560
1656
|
{
|
|
1561
1657
|
onClick: () => setCalendar(calendar.subtract(1, "month")),
|
|
@@ -1563,16 +1659,16 @@ function DatePickerRange({
|
|
|
1563
1659
|
children: "\u25C0"
|
|
1564
1660
|
}
|
|
1565
1661
|
),
|
|
1566
|
-
/* @__PURE__ */ (0,
|
|
1662
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "font-semibold text-lg text-gray-700", children: [
|
|
1567
1663
|
monthNames[calendar.month()],
|
|
1568
1664
|
" ",
|
|
1569
1665
|
calendar.year() + 543
|
|
1570
1666
|
] }),
|
|
1571
|
-
/* @__PURE__ */ (0,
|
|
1667
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2 hover:bg-gray-100 rounded", children: "\u25B6" })
|
|
1572
1668
|
] }),
|
|
1573
|
-
/* @__PURE__ */ (0,
|
|
1574
|
-
/* @__PURE__ */ (0,
|
|
1575
|
-
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ (0,
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("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__ */ (0, import_jsx_runtime25.jsx)("div", { children: d }, d)) }),
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "grid grid-cols-7 gap-y-1 text-center", children: [
|
|
1671
|
+
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", {}, `empty-${i}`)),
|
|
1576
1672
|
Array.from({ length: daysInMonth }, (_, i) => i + 1).map((d) => {
|
|
1577
1673
|
const currentObj = calendar.date(d);
|
|
1578
1674
|
const isDisable = isDisabled(currentObj);
|
|
@@ -1595,7 +1691,7 @@ function DatePickerRange({
|
|
|
1595
1691
|
bgClass = "border border-blue-500 font-bold";
|
|
1596
1692
|
textClass = "text-blue-600";
|
|
1597
1693
|
}
|
|
1598
|
-
return /* @__PURE__ */ (0,
|
|
1694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1599
1695
|
"div",
|
|
1600
1696
|
{
|
|
1601
1697
|
onClick: () => !isDisable && handleSelect(d),
|
|
@@ -1613,13 +1709,13 @@ function DatePickerRange({
|
|
|
1613
1709
|
]
|
|
1614
1710
|
}
|
|
1615
1711
|
),
|
|
1616
|
-
error && /* @__PURE__ */ (0,
|
|
1712
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-red-500 text-xs mt-1", children: error })
|
|
1617
1713
|
] });
|
|
1618
1714
|
}
|
|
1619
1715
|
|
|
1620
1716
|
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1621
|
-
var
|
|
1622
|
-
var
|
|
1717
|
+
var import_antd8 = require("antd");
|
|
1718
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1623
1719
|
function ColorPickerBasic({
|
|
1624
1720
|
value,
|
|
1625
1721
|
onChange,
|
|
@@ -1632,8 +1728,8 @@ function ColorPickerBasic({
|
|
|
1632
1728
|
className,
|
|
1633
1729
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1634
1730
|
}) {
|
|
1635
|
-
return /* @__PURE__ */ (0,
|
|
1636
|
-
|
|
1731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1732
|
+
import_antd8.ConfigProvider,
|
|
1637
1733
|
{
|
|
1638
1734
|
theme: {
|
|
1639
1735
|
token: {
|
|
@@ -1641,14 +1737,14 @@ function ColorPickerBasic({
|
|
|
1641
1737
|
fontSize: 16
|
|
1642
1738
|
}
|
|
1643
1739
|
},
|
|
1644
|
-
children: /* @__PURE__ */ (0,
|
|
1645
|
-
/* @__PURE__ */ (0,
|
|
1646
|
-
/* @__PURE__ */ (0,
|
|
1740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "container-input", children: [
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "body-1", children: label }),
|
|
1647
1743
|
" ",
|
|
1648
|
-
required && /* @__PURE__ */ (0,
|
|
1744
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-red-500", children: "*" })
|
|
1649
1745
|
] }),
|
|
1650
|
-
/* @__PURE__ */ (0,
|
|
1651
|
-
|
|
1746
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1747
|
+
import_antd8.ColorPicker,
|
|
1652
1748
|
{
|
|
1653
1749
|
defaultFormat,
|
|
1654
1750
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -1659,9 +1755,9 @@ function ColorPickerBasic({
|
|
|
1659
1755
|
showText: (color) => {
|
|
1660
1756
|
const hex = color.toHexString();
|
|
1661
1757
|
if (!value) {
|
|
1662
|
-
return /* @__PURE__ */ (0,
|
|
1758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: placeholder });
|
|
1663
1759
|
}
|
|
1664
|
-
return /* @__PURE__ */ (0,
|
|
1760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { children: [
|
|
1665
1761
|
"(",
|
|
1666
1762
|
hex,
|
|
1667
1763
|
")"
|
|
@@ -1670,14 +1766,14 @@ function ColorPickerBasic({
|
|
|
1670
1766
|
disabled
|
|
1671
1767
|
}
|
|
1672
1768
|
),
|
|
1673
|
-
error && /* @__PURE__ */ (0,
|
|
1769
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
1674
1770
|
] })
|
|
1675
1771
|
}
|
|
1676
1772
|
);
|
|
1677
1773
|
}
|
|
1678
1774
|
|
|
1679
1775
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1680
|
-
var
|
|
1776
|
+
var import_antd9 = require("antd");
|
|
1681
1777
|
|
|
1682
1778
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1683
1779
|
function _typeof(o) {
|
|
@@ -2379,7 +2475,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2379
2475
|
greyDark.primary = greyDark[5];
|
|
2380
2476
|
|
|
2381
2477
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2382
|
-
var
|
|
2478
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2383
2479
|
function genPresets(presets = presetPalettes) {
|
|
2384
2480
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2385
2481
|
label,
|
|
@@ -2400,14 +2496,14 @@ function ColorPalettePickerBasic({
|
|
|
2400
2496
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35",
|
|
2401
2497
|
onClear
|
|
2402
2498
|
}) {
|
|
2403
|
-
const { token } =
|
|
2499
|
+
const { token } = import_antd9.theme.useToken();
|
|
2404
2500
|
const presets = genPresets({
|
|
2405
2501
|
primary: generate(token.colorPrimary),
|
|
2406
2502
|
red,
|
|
2407
2503
|
green
|
|
2408
2504
|
});
|
|
2409
|
-
return /* @__PURE__ */ (0,
|
|
2410
|
-
|
|
2505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2506
|
+
import_antd9.ConfigProvider,
|
|
2411
2507
|
{
|
|
2412
2508
|
theme: {
|
|
2413
2509
|
token: {
|
|
@@ -2415,14 +2511,14 @@ function ColorPalettePickerBasic({
|
|
|
2415
2511
|
fontSize: 16
|
|
2416
2512
|
}
|
|
2417
2513
|
},
|
|
2418
|
-
children: /* @__PURE__ */ (0,
|
|
2419
|
-
/* @__PURE__ */ (0,
|
|
2420
|
-
/* @__PURE__ */ (0,
|
|
2514
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "container-input", children: [
|
|
2515
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "body-1", children: label }),
|
|
2421
2517
|
" ",
|
|
2422
|
-
required && /* @__PURE__ */ (0,
|
|
2518
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2423
2519
|
] }),
|
|
2424
|
-
/* @__PURE__ */ (0,
|
|
2425
|
-
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2521
|
+
import_antd9.ColorPicker,
|
|
2426
2522
|
{
|
|
2427
2523
|
defaultFormat,
|
|
2428
2524
|
className: `body-1 w-full ${className ?? ""}`,
|
|
@@ -2434,9 +2530,9 @@ function ColorPalettePickerBasic({
|
|
|
2434
2530
|
showText: (color) => {
|
|
2435
2531
|
const hex = color.toHexString();
|
|
2436
2532
|
if (!value) {
|
|
2437
|
-
return /* @__PURE__ */ (0,
|
|
2533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: placeholder });
|
|
2438
2534
|
}
|
|
2439
|
-
return /* @__PURE__ */ (0,
|
|
2535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { children: [
|
|
2440
2536
|
"(",
|
|
2441
2537
|
hex,
|
|
2442
2538
|
")"
|
|
@@ -2446,15 +2542,15 @@ function ColorPalettePickerBasic({
|
|
|
2446
2542
|
onClear
|
|
2447
2543
|
}
|
|
2448
2544
|
),
|
|
2449
|
-
error && /* @__PURE__ */ (0,
|
|
2545
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2450
2546
|
] })
|
|
2451
2547
|
}
|
|
2452
2548
|
);
|
|
2453
2549
|
}
|
|
2454
2550
|
|
|
2455
2551
|
// src/Select/SelectField/SelectField.tsx
|
|
2456
|
-
var
|
|
2457
|
-
var
|
|
2552
|
+
var import_antd10 = require("antd");
|
|
2553
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2458
2554
|
function SelectField({
|
|
2459
2555
|
value,
|
|
2460
2556
|
onChange,
|
|
@@ -2470,10 +2566,12 @@ function SelectField({
|
|
|
2470
2566
|
prefixSize = 20,
|
|
2471
2567
|
handleSearch,
|
|
2472
2568
|
className,
|
|
2473
|
-
onClear
|
|
2569
|
+
onClear,
|
|
2570
|
+
size = "middle",
|
|
2571
|
+
allowClear = true
|
|
2474
2572
|
}) {
|
|
2475
|
-
return /* @__PURE__ */ (0,
|
|
2476
|
-
|
|
2573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2574
|
+
import_antd10.ConfigProvider,
|
|
2477
2575
|
{
|
|
2478
2576
|
theme: {
|
|
2479
2577
|
token: {
|
|
@@ -2481,15 +2579,16 @@ function SelectField({
|
|
|
2481
2579
|
fontSize: 16
|
|
2482
2580
|
}
|
|
2483
2581
|
},
|
|
2484
|
-
children: /* @__PURE__ */ (0,
|
|
2485
|
-
/* @__PURE__ */ (0,
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2582
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "container-input", children: [
|
|
2583
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "body-1", children: label }),
|
|
2487
2585
|
" ",
|
|
2488
|
-
required && /* @__PURE__ */ (0,
|
|
2586
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2489
2587
|
] }),
|
|
2490
|
-
/* @__PURE__ */ (0,
|
|
2491
|
-
|
|
2588
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2589
|
+
import_antd10.Select,
|
|
2492
2590
|
{
|
|
2591
|
+
size,
|
|
2493
2592
|
showSearch: true,
|
|
2494
2593
|
value: value ? value : void 0,
|
|
2495
2594
|
defaultValue,
|
|
@@ -2502,7 +2601,7 @@ function SelectField({
|
|
|
2502
2601
|
options,
|
|
2503
2602
|
mode,
|
|
2504
2603
|
onSearch: handleSearch,
|
|
2505
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2604
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2506
2605
|
"span",
|
|
2507
2606
|
{
|
|
2508
2607
|
style: {
|
|
@@ -2515,19 +2614,19 @@ function SelectField({
|
|
|
2515
2614
|
children: prefix
|
|
2516
2615
|
}
|
|
2517
2616
|
) : void 0,
|
|
2518
|
-
allowClear
|
|
2617
|
+
allowClear,
|
|
2519
2618
|
onClear
|
|
2520
2619
|
}
|
|
2521
2620
|
),
|
|
2522
|
-
error && /* @__PURE__ */ (0,
|
|
2621
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2523
2622
|
] })
|
|
2524
2623
|
}
|
|
2525
2624
|
);
|
|
2526
2625
|
}
|
|
2527
2626
|
|
|
2528
2627
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2529
|
-
var
|
|
2530
|
-
var
|
|
2628
|
+
var import_antd11 = require("antd");
|
|
2629
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2531
2630
|
function SelectFieldGroup({
|
|
2532
2631
|
value,
|
|
2533
2632
|
onChange,
|
|
@@ -2542,25 +2641,28 @@ function SelectFieldGroup({
|
|
|
2542
2641
|
prefix,
|
|
2543
2642
|
prefixSize = 20,
|
|
2544
2643
|
handleSearch,
|
|
2545
|
-
className
|
|
2644
|
+
className,
|
|
2645
|
+
size = "middle",
|
|
2646
|
+
allowClear = true
|
|
2546
2647
|
}) {
|
|
2547
|
-
return /* @__PURE__ */ (0,
|
|
2548
|
-
|
|
2648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2649
|
+
import_antd11.ConfigProvider,
|
|
2549
2650
|
{
|
|
2550
2651
|
theme: {
|
|
2551
2652
|
token: {
|
|
2552
2653
|
fontFamily: "Kanit"
|
|
2553
2654
|
}
|
|
2554
2655
|
},
|
|
2555
|
-
children: /* @__PURE__ */ (0,
|
|
2556
|
-
/* @__PURE__ */ (0,
|
|
2557
|
-
/* @__PURE__ */ (0,
|
|
2656
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "container-input", children: [
|
|
2657
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "body-1", children: label }),
|
|
2558
2659
|
" ",
|
|
2559
|
-
required && /* @__PURE__ */ (0,
|
|
2660
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2560
2661
|
] }),
|
|
2561
|
-
/* @__PURE__ */ (0,
|
|
2562
|
-
|
|
2662
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2663
|
+
import_antd11.Select,
|
|
2563
2664
|
{
|
|
2665
|
+
size,
|
|
2564
2666
|
showSearch: true,
|
|
2565
2667
|
value: value ? value : void 0,
|
|
2566
2668
|
defaultValue,
|
|
@@ -2573,7 +2675,7 @@ function SelectFieldGroup({
|
|
|
2573
2675
|
options,
|
|
2574
2676
|
mode,
|
|
2575
2677
|
onSearch: handleSearch,
|
|
2576
|
-
prefix: prefix ? /* @__PURE__ */ (0,
|
|
2678
|
+
prefix: prefix ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2577
2679
|
"span",
|
|
2578
2680
|
{
|
|
2579
2681
|
style: {
|
|
@@ -2586,19 +2688,19 @@ function SelectFieldGroup({
|
|
|
2586
2688
|
children: prefix
|
|
2587
2689
|
}
|
|
2588
2690
|
) : void 0,
|
|
2589
|
-
allowClear
|
|
2691
|
+
allowClear
|
|
2590
2692
|
}
|
|
2591
2693
|
),
|
|
2592
|
-
error && /* @__PURE__ */ (0,
|
|
2694
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2593
2695
|
] })
|
|
2594
2696
|
}
|
|
2595
2697
|
);
|
|
2596
2698
|
}
|
|
2597
2699
|
|
|
2598
2700
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2599
|
-
var
|
|
2701
|
+
var import_antd12 = require("antd");
|
|
2600
2702
|
var import_icons = require("@ant-design/icons");
|
|
2601
|
-
var
|
|
2703
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2602
2704
|
function SelectFieldStatus({
|
|
2603
2705
|
value,
|
|
2604
2706
|
onChange,
|
|
@@ -2608,11 +2710,13 @@ function SelectFieldStatus({
|
|
|
2608
2710
|
disabled,
|
|
2609
2711
|
error,
|
|
2610
2712
|
options,
|
|
2611
|
-
className
|
|
2713
|
+
className,
|
|
2714
|
+
size = "middle",
|
|
2715
|
+
allowClear = false
|
|
2612
2716
|
}) {
|
|
2613
2717
|
const selectedItem = options?.find((s) => s.value === value);
|
|
2614
|
-
return /* @__PURE__ */ (0,
|
|
2615
|
-
|
|
2718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2719
|
+
import_antd12.ConfigProvider,
|
|
2616
2720
|
{
|
|
2617
2721
|
theme: {
|
|
2618
2722
|
components: {
|
|
@@ -2627,17 +2731,18 @@ function SelectFieldStatus({
|
|
|
2627
2731
|
fontFamily: "Kanit"
|
|
2628
2732
|
}
|
|
2629
2733
|
},
|
|
2630
|
-
children: /* @__PURE__ */ (0,
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
2632
|
-
/* @__PURE__ */ (0,
|
|
2734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "container-input", children: [
|
|
2735
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2736
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "body-1", children: label }),
|
|
2633
2737
|
" ",
|
|
2634
|
-
required && /* @__PURE__ */ (0,
|
|
2738
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2635
2739
|
] }),
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2637
|
-
|
|
2740
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2741
|
+
import_antd12.Select,
|
|
2638
2742
|
{
|
|
2743
|
+
size,
|
|
2639
2744
|
disabled,
|
|
2640
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2745
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_icons.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2641
2746
|
value: value ? value : void 0,
|
|
2642
2747
|
onChange,
|
|
2643
2748
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""} `,
|
|
@@ -2645,17 +2750,18 @@ function SelectFieldStatus({
|
|
|
2645
2750
|
optionFilterProp: "label",
|
|
2646
2751
|
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
2647
2752
|
options,
|
|
2648
|
-
showSearch: true
|
|
2753
|
+
showSearch: true,
|
|
2754
|
+
allowClear
|
|
2649
2755
|
}
|
|
2650
2756
|
),
|
|
2651
|
-
error && /* @__PURE__ */ (0,
|
|
2757
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2652
2758
|
] })
|
|
2653
2759
|
}
|
|
2654
2760
|
);
|
|
2655
2761
|
}
|
|
2656
2762
|
|
|
2657
2763
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2658
|
-
var
|
|
2764
|
+
var import_antd13 = require("antd");
|
|
2659
2765
|
|
|
2660
2766
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2661
2767
|
var status = [
|
|
@@ -2665,7 +2771,7 @@ var status = [
|
|
|
2665
2771
|
|
|
2666
2772
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2667
2773
|
var import_icons2 = require("@ant-design/icons");
|
|
2668
|
-
var
|
|
2774
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2669
2775
|
function SelectFieldStatusReport({
|
|
2670
2776
|
value,
|
|
2671
2777
|
onChange,
|
|
@@ -2675,11 +2781,13 @@ function SelectFieldStatusReport({
|
|
|
2675
2781
|
disabled,
|
|
2676
2782
|
error,
|
|
2677
2783
|
className,
|
|
2678
|
-
options
|
|
2784
|
+
options,
|
|
2785
|
+
size = "middle",
|
|
2786
|
+
allowClear = false
|
|
2679
2787
|
}) {
|
|
2680
2788
|
const selectedItem = status.find((s) => s.value === value);
|
|
2681
|
-
return /* @__PURE__ */ (0,
|
|
2682
|
-
|
|
2789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2790
|
+
import_antd13.ConfigProvider,
|
|
2683
2791
|
{
|
|
2684
2792
|
theme: {
|
|
2685
2793
|
components: {
|
|
@@ -2694,17 +2802,18 @@ function SelectFieldStatusReport({
|
|
|
2694
2802
|
fontFamily: "Kanit"
|
|
2695
2803
|
}
|
|
2696
2804
|
},
|
|
2697
|
-
children: /* @__PURE__ */ (0,
|
|
2698
|
-
/* @__PURE__ */ (0,
|
|
2699
|
-
/* @__PURE__ */ (0,
|
|
2805
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "container-input", children: [
|
|
2806
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { children: [
|
|
2807
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "body-1", children: label }),
|
|
2700
2808
|
" ",
|
|
2701
|
-
required && /* @__PURE__ */ (0,
|
|
2809
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2702
2810
|
] }),
|
|
2703
|
-
/* @__PURE__ */ (0,
|
|
2704
|
-
|
|
2811
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2812
|
+
import_antd13.Select,
|
|
2705
2813
|
{
|
|
2814
|
+
size,
|
|
2706
2815
|
disabled,
|
|
2707
|
-
suffixIcon: /* @__PURE__ */ (0,
|
|
2816
|
+
suffixIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons2.DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2708
2817
|
value: value ? value : void 0,
|
|
2709
2818
|
onChange,
|
|
2710
2819
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2712,19 +2821,20 @@ function SelectFieldStatusReport({
|
|
|
2712
2821
|
optionFilterProp: "label",
|
|
2713
2822
|
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
2714
2823
|
options,
|
|
2715
|
-
showSearch: true
|
|
2824
|
+
showSearch: true,
|
|
2825
|
+
allowClear
|
|
2716
2826
|
}
|
|
2717
2827
|
),
|
|
2718
|
-
error && /* @__PURE__ */ (0,
|
|
2828
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2719
2829
|
] })
|
|
2720
2830
|
}
|
|
2721
2831
|
);
|
|
2722
2832
|
}
|
|
2723
2833
|
|
|
2724
2834
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2725
|
-
var
|
|
2835
|
+
var import_antd14 = require("antd");
|
|
2726
2836
|
var import_react11 = require("react");
|
|
2727
|
-
var
|
|
2837
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2728
2838
|
function SelectFieldTag({
|
|
2729
2839
|
label,
|
|
2730
2840
|
required,
|
|
@@ -2734,7 +2844,9 @@ function SelectFieldTag({
|
|
|
2734
2844
|
value: controlledValue,
|
|
2735
2845
|
className,
|
|
2736
2846
|
onChange,
|
|
2737
|
-
onClear
|
|
2847
|
+
onClear,
|
|
2848
|
+
size = "middle",
|
|
2849
|
+
allowClear = true
|
|
2738
2850
|
}) {
|
|
2739
2851
|
const [internalValue, setInternalValue] = (0, import_react11.useState)([]);
|
|
2740
2852
|
const isControlled = controlledValue !== void 0;
|
|
@@ -2757,23 +2869,24 @@ function SelectFieldTag({
|
|
|
2757
2869
|
}
|
|
2758
2870
|
onChange?.([]);
|
|
2759
2871
|
};
|
|
2760
|
-
return /* @__PURE__ */ (0,
|
|
2761
|
-
|
|
2872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2873
|
+
import_antd14.ConfigProvider,
|
|
2762
2874
|
{
|
|
2763
2875
|
theme: {
|
|
2764
2876
|
token: {
|
|
2765
2877
|
fontFamily: "Kanit"
|
|
2766
2878
|
}
|
|
2767
2879
|
},
|
|
2768
|
-
children: /* @__PURE__ */ (0,
|
|
2769
|
-
/* @__PURE__ */ (0,
|
|
2770
|
-
/* @__PURE__ */ (0,
|
|
2880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "container-input", children: [
|
|
2881
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
2882
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "body-1", children: label }),
|
|
2771
2883
|
" ",
|
|
2772
|
-
required && /* @__PURE__ */ (0,
|
|
2884
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2773
2885
|
] }),
|
|
2774
|
-
/* @__PURE__ */ (0,
|
|
2775
|
-
|
|
2886
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2887
|
+
import_antd14.Select,
|
|
2776
2888
|
{
|
|
2889
|
+
size,
|
|
2777
2890
|
mode: "tags",
|
|
2778
2891
|
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
2779
2892
|
placeholder,
|
|
@@ -2786,11 +2899,11 @@ function SelectFieldTag({
|
|
|
2786
2899
|
},
|
|
2787
2900
|
searchValue: searchWord,
|
|
2788
2901
|
options,
|
|
2789
|
-
allowClear
|
|
2902
|
+
allowClear,
|
|
2790
2903
|
onClear
|
|
2791
2904
|
}
|
|
2792
2905
|
),
|
|
2793
|
-
error && /* @__PURE__ */ (0,
|
|
2906
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-red-500 caption-1", children: error })
|
|
2794
2907
|
] })
|
|
2795
2908
|
}
|
|
2796
2909
|
);
|
|
@@ -2798,9 +2911,9 @@ function SelectFieldTag({
|
|
|
2798
2911
|
|
|
2799
2912
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2800
2913
|
var import_icons_react8 = require("@tabler/icons-react");
|
|
2801
|
-
var
|
|
2914
|
+
var import_antd15 = require("antd");
|
|
2802
2915
|
var import_react12 = require("react");
|
|
2803
|
-
var
|
|
2916
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2804
2917
|
function SelectCustom({
|
|
2805
2918
|
label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2806
2919
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
@@ -2808,7 +2921,9 @@ function SelectCustom({
|
|
|
2808
2921
|
required = false,
|
|
2809
2922
|
onChange,
|
|
2810
2923
|
error,
|
|
2811
|
-
onClear
|
|
2924
|
+
onClear,
|
|
2925
|
+
size = "middle",
|
|
2926
|
+
allowClear = true
|
|
2812
2927
|
}) {
|
|
2813
2928
|
const [value, setValue] = (0, import_react12.useState)([]);
|
|
2814
2929
|
const [valueList, setValueList] = (0, import_react12.useState)([]);
|
|
@@ -2829,8 +2944,8 @@ function SelectCustom({
|
|
|
2829
2944
|
});
|
|
2830
2945
|
};
|
|
2831
2946
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2832
|
-
return /* @__PURE__ */ (0,
|
|
2833
|
-
|
|
2947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2948
|
+
import_antd15.ConfigProvider,
|
|
2834
2949
|
{
|
|
2835
2950
|
theme: {
|
|
2836
2951
|
token: {
|
|
@@ -2838,37 +2953,39 @@ function SelectCustom({
|
|
|
2838
2953
|
fontSize: 16
|
|
2839
2954
|
}
|
|
2840
2955
|
},
|
|
2841
|
-
children: /* @__PURE__ */ (0,
|
|
2842
|
-
/* @__PURE__ */ (0,
|
|
2843
|
-
/* @__PURE__ */ (0,
|
|
2956
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "container-input", children: [
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "body-1", children: label }),
|
|
2844
2959
|
" ",
|
|
2845
|
-
required && /* @__PURE__ */ (0,
|
|
2960
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-red-500", children: "*" })
|
|
2846
2961
|
] }),
|
|
2847
|
-
/* @__PURE__ */ (0,
|
|
2848
|
-
|
|
2962
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2963
|
+
import_antd15.Select,
|
|
2849
2964
|
{
|
|
2965
|
+
size,
|
|
2850
2966
|
value: value ? value : void 0,
|
|
2851
2967
|
onChange: handleChange,
|
|
2852
2968
|
placeholder,
|
|
2853
2969
|
options: filteredOptions,
|
|
2854
2970
|
mode: "tags",
|
|
2855
|
-
onClear
|
|
2971
|
+
onClear,
|
|
2972
|
+
allowClear
|
|
2856
2973
|
}
|
|
2857
2974
|
),
|
|
2858
|
-
error && /* @__PURE__ */ (0,
|
|
2859
|
-
/* @__PURE__ */ (0,
|
|
2975
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-red-500 caption-1", children: error }),
|
|
2976
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2860
2977
|
"div",
|
|
2861
2978
|
{
|
|
2862
2979
|
className: "flex justify-between items-center py-[2px] body-1",
|
|
2863
2980
|
children: [
|
|
2864
|
-
/* @__PURE__ */ (0,
|
|
2865
|
-
/* @__PURE__ */ (0,
|
|
2981
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2982
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { children: [
|
|
2866
2983
|
index + 1,
|
|
2867
2984
|
"."
|
|
2868
2985
|
] }),
|
|
2869
|
-
/* @__PURE__ */ (0,
|
|
2986
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { children: v })
|
|
2870
2987
|
] }),
|
|
2871
|
-
/* @__PURE__ */ (0,
|
|
2988
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2872
2989
|
import_icons_react8.IconTrash,
|
|
2873
2990
|
{
|
|
2874
2991
|
className: "cursor-pointer",
|
|
@@ -2885,7 +3002,7 @@ function SelectCustom({
|
|
|
2885
3002
|
}
|
|
2886
3003
|
|
|
2887
3004
|
// src/SortFilter/SortFilter.tsx
|
|
2888
|
-
var
|
|
3005
|
+
var import_antd16 = require("antd");
|
|
2889
3006
|
var import_icons3 = require("@ant-design/icons");
|
|
2890
3007
|
|
|
2891
3008
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2918,7 +3035,7 @@ var quarters = [
|
|
|
2918
3035
|
// src/SortFilter/SortFilter.tsx
|
|
2919
3036
|
var import_react13 = require("react");
|
|
2920
3037
|
var import_icons_react9 = require("@tabler/icons-react");
|
|
2921
|
-
var
|
|
3038
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2922
3039
|
function SortFilter({
|
|
2923
3040
|
showYear = true,
|
|
2924
3041
|
showQuarter = true,
|
|
@@ -2929,20 +3046,20 @@ function SortFilter({
|
|
|
2929
3046
|
const [yearValue, setYearValue] = (0, import_react13.useState)();
|
|
2930
3047
|
const [monthValue, setMonthValue] = (0, import_react13.useState)();
|
|
2931
3048
|
const [quarterValue, setQuartersValue] = (0, import_react13.useState)();
|
|
2932
|
-
return /* @__PURE__ */ (0,
|
|
2933
|
-
|
|
3049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3050
|
+
import_antd16.ConfigProvider,
|
|
2934
3051
|
{
|
|
2935
3052
|
theme: {
|
|
2936
3053
|
token: {
|
|
2937
3054
|
fontFamily: "Kanit"
|
|
2938
3055
|
}
|
|
2939
3056
|
},
|
|
2940
|
-
children: /* @__PURE__ */ (0,
|
|
2941
|
-
/* @__PURE__ */ (0,
|
|
2942
|
-
showYear && /* @__PURE__ */ (0,
|
|
3057
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full flex items-center justify-between", children: [
|
|
3058
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full flex gap-[10px]", children: [
|
|
3059
|
+
showYear && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2943
3060
|
SelectField,
|
|
2944
3061
|
{
|
|
2945
|
-
prefix: /* @__PURE__ */ (0,
|
|
3062
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2946
3063
|
onChange: setYearValue,
|
|
2947
3064
|
options: years.map((s) => ({
|
|
2948
3065
|
value: s.value,
|
|
@@ -2952,10 +3069,10 @@ function SortFilter({
|
|
|
2952
3069
|
value: yearValue
|
|
2953
3070
|
}
|
|
2954
3071
|
) }),
|
|
2955
|
-
showMonth && /* @__PURE__ */ (0,
|
|
3072
|
+
showMonth && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2956
3073
|
SelectField,
|
|
2957
3074
|
{
|
|
2958
|
-
prefix: /* @__PURE__ */ (0,
|
|
3075
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2959
3076
|
onChange: setMonthValue,
|
|
2960
3077
|
options: months.map((s) => ({
|
|
2961
3078
|
value: s.value,
|
|
@@ -2965,10 +3082,10 @@ function SortFilter({
|
|
|
2965
3082
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2966
3083
|
}
|
|
2967
3084
|
) }),
|
|
2968
|
-
showQuarter && /* @__PURE__ */ (0,
|
|
3085
|
+
showQuarter && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2969
3086
|
SelectField,
|
|
2970
3087
|
{
|
|
2971
|
-
prefix: /* @__PURE__ */ (0,
|
|
3088
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons3.CalendarOutlined, {}),
|
|
2972
3089
|
onChange: setQuartersValue,
|
|
2973
3090
|
options: quarters.map((s) => ({
|
|
2974
3091
|
value: s.value,
|
|
@@ -2979,8 +3096,8 @@ function SortFilter({
|
|
|
2979
3096
|
}
|
|
2980
3097
|
) })
|
|
2981
3098
|
] }),
|
|
2982
|
-
/* @__PURE__ */ (0,
|
|
2983
|
-
/* @__PURE__ */ (0,
|
|
3099
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex gap-[10px]", children: [
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2984
3101
|
import_icons_react9.IconSortDescending,
|
|
2985
3102
|
{
|
|
2986
3103
|
size: 24,
|
|
@@ -2988,7 +3105,7 @@ function SortFilter({
|
|
|
2988
3105
|
onClick: onSortClick
|
|
2989
3106
|
}
|
|
2990
3107
|
),
|
|
2991
|
-
/* @__PURE__ */ (0,
|
|
3108
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2992
3109
|
import_icons_react9.IconFilter,
|
|
2993
3110
|
{
|
|
2994
3111
|
size: 24,
|
|
@@ -3005,7 +3122,7 @@ function SortFilter({
|
|
|
3005
3122
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
3006
3123
|
var import_icons_react10 = require("@tabler/icons-react");
|
|
3007
3124
|
var import_react14 = require("react");
|
|
3008
|
-
var
|
|
3125
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3009
3126
|
function FileUploader({
|
|
3010
3127
|
onUpload,
|
|
3011
3128
|
onError,
|
|
@@ -3091,10 +3208,10 @@ function FileUploader({
|
|
|
3091
3208
|
}
|
|
3092
3209
|
if (inputRef.current) inputRef.current.value = "";
|
|
3093
3210
|
};
|
|
3094
|
-
return /* @__PURE__ */ (0,
|
|
3095
|
-
label && /* @__PURE__ */ (0,
|
|
3096
|
-
!readOnly && /* @__PURE__ */ (0,
|
|
3097
|
-
mode === "upload" ? /* @__PURE__ */ (0,
|
|
3211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "w-full", children: [
|
|
3212
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "body-1", children: label }),
|
|
3213
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: uploaderWidth, children: [
|
|
3214
|
+
mode === "upload" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3098
3215
|
"button",
|
|
3099
3216
|
{
|
|
3100
3217
|
type: "button",
|
|
@@ -3102,16 +3219,16 @@ function FileUploader({
|
|
|
3102
3219
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3103
3220
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3104
3221
|
disabled: disabled ? disabled : uploading,
|
|
3105
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3106
|
-
/* @__PURE__ */ (0,
|
|
3222
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3223
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Loader, { size: 15 }),
|
|
3107
3224
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3108
|
-
] }) : /* @__PURE__ */ (0,
|
|
3109
|
-
/* @__PURE__ */ (0,
|
|
3225
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3226
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons_react10.IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3110
3227
|
" ",
|
|
3111
3228
|
uploadText
|
|
3112
3229
|
] })
|
|
3113
3230
|
}
|
|
3114
|
-
) : /* @__PURE__ */ (0,
|
|
3231
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3115
3232
|
"div",
|
|
3116
3233
|
{
|
|
3117
3234
|
className: `w-full min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3125,17 +3242,17 @@ function FileUploader({
|
|
|
3125
3242
|
},
|
|
3126
3243
|
onDragLeave: () => setDragActive(false),
|
|
3127
3244
|
onDrop: handleDrop,
|
|
3128
|
-
children: uploading ? /* @__PURE__ */ (0,
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3245
|
+
children: uploading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex justify-center items-center gap-2", children: [
|
|
3246
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Loader, { size: 15 }),
|
|
3130
3247
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3131
|
-
] }) : /* @__PURE__ */ (0,
|
|
3132
|
-
/* @__PURE__ */ (0,
|
|
3133
|
-
/* @__PURE__ */ (0,
|
|
3134
|
-
/* @__PURE__ */ (0,
|
|
3248
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3249
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons_react10.IconUpload, { size: 20 }),
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "body-1", children: "\u0E04\u0E25\u0E34\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E1A\u0E23\u0E34\u0E40\u0E27\u0E13\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14" }),
|
|
3251
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-gray-400 body-3", children: "\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E35\u0E48\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E32\u0E22\u0E44\u0E1F\u0E25\u0E4C" })
|
|
3135
3252
|
] })
|
|
3136
3253
|
}
|
|
3137
3254
|
),
|
|
3138
|
-
/* @__PURE__ */ (0,
|
|
3255
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3139
3256
|
"input",
|
|
3140
3257
|
{
|
|
3141
3258
|
type: "file",
|
|
@@ -3148,8 +3265,8 @@ function FileUploader({
|
|
|
3148
3265
|
}
|
|
3149
3266
|
)
|
|
3150
3267
|
] }),
|
|
3151
|
-
description && /* @__PURE__ */ (0,
|
|
3152
|
-
/* @__PURE__ */ (0,
|
|
3268
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-gray-400 body-4", children: description }),
|
|
3269
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `mt-[8px] ${attachWidth}`, children: filesToDisplay.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col rounded-[6px] body-1 border-[1px] border-gray-300", children: filesToDisplay.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3153
3270
|
"div",
|
|
3154
3271
|
{
|
|
3155
3272
|
className: `flex px-[16px] hover:bg-primary-50 hover:cursor-pointer
|
|
@@ -3159,11 +3276,11 @@ function FileUploader({
|
|
|
3159
3276
|
${index !== 0 ? "pt-[16px]" : ""}`,
|
|
3160
3277
|
onClick: () => onClickFile && onClickFile(file),
|
|
3161
3278
|
children: [
|
|
3162
|
-
/* @__PURE__ */ (0,
|
|
3163
|
-
/* @__PURE__ */ (0,
|
|
3164
|
-
/* @__PURE__ */ (0,
|
|
3279
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
|
|
3280
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-[24px] h-[24px] flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons_react10.IconFileDescription, { size: 20 }) }),
|
|
3281
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "truncate", children: file.name || file.fileName })
|
|
3165
3282
|
] }),
|
|
3166
|
-
!readOnly && !disabled && /* @__PURE__ */ (0,
|
|
3283
|
+
!readOnly && !disabled && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3167
3284
|
import_icons_react10.IconTrash,
|
|
3168
3285
|
{
|
|
3169
3286
|
size: 20,
|
|
@@ -3203,9 +3320,9 @@ function messageLoading(content, duration) {
|
|
|
3203
3320
|
}
|
|
3204
3321
|
|
|
3205
3322
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3206
|
-
var
|
|
3207
|
-
var
|
|
3208
|
-
var
|
|
3323
|
+
var import_antd17 = require("antd");
|
|
3324
|
+
var import_antd18 = require("antd");
|
|
3325
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3209
3326
|
function Breadcrumbs({
|
|
3210
3327
|
items,
|
|
3211
3328
|
separator,
|
|
@@ -3213,16 +3330,16 @@ function Breadcrumbs({
|
|
|
3213
3330
|
classname,
|
|
3214
3331
|
params
|
|
3215
3332
|
}) {
|
|
3216
|
-
return /* @__PURE__ */ (0,
|
|
3217
|
-
|
|
3333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3334
|
+
import_antd17.ConfigProvider,
|
|
3218
3335
|
{
|
|
3219
3336
|
theme: {
|
|
3220
3337
|
token: {
|
|
3221
3338
|
fontFamily: "Kanit"
|
|
3222
3339
|
}
|
|
3223
3340
|
},
|
|
3224
|
-
children: /* @__PURE__ */ (0,
|
|
3225
|
-
|
|
3341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3342
|
+
import_antd18.Breadcrumb,
|
|
3226
3343
|
{
|
|
3227
3344
|
items,
|
|
3228
3345
|
separator,
|
|
@@ -3236,8 +3353,8 @@ function Breadcrumbs({
|
|
|
3236
3353
|
}
|
|
3237
3354
|
|
|
3238
3355
|
// src/HeadingPage/HeadingPage.tsx
|
|
3239
|
-
var
|
|
3240
|
-
var
|
|
3356
|
+
var import_antd19 = require("antd");
|
|
3357
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3241
3358
|
function HeadingPage({ Heading }) {
|
|
3242
3359
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3243
3360
|
weekday: "long",
|
|
@@ -3245,17 +3362,17 @@ function HeadingPage({ Heading }) {
|
|
|
3245
3362
|
month: "long",
|
|
3246
3363
|
year: "numeric"
|
|
3247
3364
|
});
|
|
3248
|
-
return /* @__PURE__ */ (0,
|
|
3249
|
-
|
|
3365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3366
|
+
import_antd19.ConfigProvider,
|
|
3250
3367
|
{
|
|
3251
3368
|
theme: {
|
|
3252
3369
|
token: {
|
|
3253
3370
|
fontFamily: "Kanit"
|
|
3254
3371
|
}
|
|
3255
3372
|
},
|
|
3256
|
-
children: /* @__PURE__ */ (0,
|
|
3257
|
-
/* @__PURE__ */ (0,
|
|
3258
|
-
/* @__PURE__ */ (0,
|
|
3373
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3374
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "headline-5", children: Heading }),
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("p", { className: "body-1", children: [
|
|
3259
3376
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3260
3377
|
today
|
|
3261
3378
|
] })
|
|
@@ -3265,9 +3382,9 @@ function HeadingPage({ Heading }) {
|
|
|
3265
3382
|
}
|
|
3266
3383
|
|
|
3267
3384
|
// src/Progress/ProgressBar.tsx
|
|
3268
|
-
var
|
|
3385
|
+
var import_antd20 = require("antd");
|
|
3269
3386
|
var import_react15 = require("react");
|
|
3270
|
-
var
|
|
3387
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3271
3388
|
function ProgressBar({
|
|
3272
3389
|
percent = 0,
|
|
3273
3390
|
size = "default",
|
|
@@ -3298,17 +3415,17 @@ function ProgressBar({
|
|
|
3298
3415
|
observer.observe(inner);
|
|
3299
3416
|
return () => observer.disconnect();
|
|
3300
3417
|
}, []);
|
|
3301
|
-
return /* @__PURE__ */ (0,
|
|
3302
|
-
|
|
3418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3419
|
+
import_antd20.ConfigProvider,
|
|
3303
3420
|
{
|
|
3304
3421
|
theme: {
|
|
3305
3422
|
token: {
|
|
3306
3423
|
fontFamily: "Kanit"
|
|
3307
3424
|
}
|
|
3308
3425
|
},
|
|
3309
|
-
children: /* @__PURE__ */ (0,
|
|
3310
|
-
/* @__PURE__ */ (0,
|
|
3311
|
-
|
|
3426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3427
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3428
|
+
import_antd20.Progress,
|
|
3312
3429
|
{
|
|
3313
3430
|
className: "w-full",
|
|
3314
3431
|
percent,
|
|
@@ -3323,7 +3440,7 @@ function ProgressBar({
|
|
|
3323
3440
|
strokeColor
|
|
3324
3441
|
}
|
|
3325
3442
|
),
|
|
3326
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0,
|
|
3443
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3327
3444
|
"div",
|
|
3328
3445
|
{
|
|
3329
3446
|
className: "checkpoint absolute top-0",
|
|
@@ -3345,7 +3462,7 @@ function ProgressBar({
|
|
|
3345
3462
|
}
|
|
3346
3463
|
|
|
3347
3464
|
// src/KpiSection/KpiSection.tsx
|
|
3348
|
-
var
|
|
3465
|
+
var import_antd21 = require("antd");
|
|
3349
3466
|
var import_react17 = require("react");
|
|
3350
3467
|
|
|
3351
3468
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3496,7 +3613,7 @@ function useGetKpiSection() {
|
|
|
3496
3613
|
|
|
3497
3614
|
// src/KpiSection/KpiSection.tsx
|
|
3498
3615
|
var import_icons_react11 = require("@tabler/icons-react");
|
|
3499
|
-
var
|
|
3616
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3500
3617
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3501
3618
|
const {
|
|
3502
3619
|
handleAddKpi,
|
|
@@ -3516,7 +3633,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3516
3633
|
itemErrors,
|
|
3517
3634
|
setItemErrors
|
|
3518
3635
|
} = useGetKpiSection();
|
|
3519
|
-
const [messageApi2, messageContainer] =
|
|
3636
|
+
const [messageApi2, messageContainer] = import_antd21.message.useMessage();
|
|
3520
3637
|
const [hasShownError, setHasShownError] = (0, import_react17.useState)(false);
|
|
3521
3638
|
(0, import_react17.useEffect)(() => {
|
|
3522
3639
|
setMessageApi(messageApi2);
|
|
@@ -3526,8 +3643,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3526
3643
|
onChangeKpiList(kpiList);
|
|
3527
3644
|
}
|
|
3528
3645
|
}, [kpiList]);
|
|
3529
|
-
return /* @__PURE__ */ (0,
|
|
3530
|
-
|
|
3646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3647
|
+
import_antd21.ConfigProvider,
|
|
3531
3648
|
{
|
|
3532
3649
|
theme: {
|
|
3533
3650
|
token: {
|
|
@@ -3535,11 +3652,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3535
3652
|
fontSize: 16
|
|
3536
3653
|
}
|
|
3537
3654
|
},
|
|
3538
|
-
children: /* @__PURE__ */ (0,
|
|
3655
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "container-input", children: [
|
|
3539
3656
|
messageContainer,
|
|
3540
|
-
type === "number" && /* @__PURE__ */ (0,
|
|
3541
|
-
/* @__PURE__ */ (0,
|
|
3542
|
-
/* @__PURE__ */ (0,
|
|
3657
|
+
type === "number" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-4", children: [
|
|
3658
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3659
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3543
3660
|
InputField,
|
|
3544
3661
|
{
|
|
3545
3662
|
value: nameKpi,
|
|
@@ -3551,7 +3668,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3551
3668
|
error: errors.nameKpi
|
|
3552
3669
|
}
|
|
3553
3670
|
),
|
|
3554
|
-
/* @__PURE__ */ (0,
|
|
3671
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3555
3672
|
InputField,
|
|
3556
3673
|
{
|
|
3557
3674
|
value: kpiValue,
|
|
@@ -3575,7 +3692,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3575
3692
|
error: errors.kpiValue
|
|
3576
3693
|
}
|
|
3577
3694
|
),
|
|
3578
|
-
/* @__PURE__ */ (0,
|
|
3695
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3579
3696
|
InputField,
|
|
3580
3697
|
{
|
|
3581
3698
|
value: unitValue,
|
|
@@ -3587,7 +3704,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3587
3704
|
error: errors.unitValue
|
|
3588
3705
|
}
|
|
3589
3706
|
),
|
|
3590
|
-
/* @__PURE__ */ (0,
|
|
3707
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3591
3708
|
import_icons_react11.IconCirclePlus,
|
|
3592
3709
|
{
|
|
3593
3710
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3596,17 +3713,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3596
3713
|
}
|
|
3597
3714
|
) })
|
|
3598
3715
|
] }),
|
|
3599
|
-
/* @__PURE__ */ (0,
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3600
3717
|
"div",
|
|
3601
3718
|
{
|
|
3602
3719
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3603
3720
|
children: [
|
|
3604
|
-
/* @__PURE__ */ (0,
|
|
3721
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3605
3722
|
index + 1,
|
|
3606
3723
|
"."
|
|
3607
3724
|
] }),
|
|
3608
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3609
|
-
/* @__PURE__ */ (0,
|
|
3725
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3726
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3610
3727
|
InputField,
|
|
3611
3728
|
{
|
|
3612
3729
|
value: kpi.name,
|
|
@@ -3616,7 +3733,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3616
3733
|
error: itemErrors[kpi.id]?.name
|
|
3617
3734
|
}
|
|
3618
3735
|
),
|
|
3619
|
-
/* @__PURE__ */ (0,
|
|
3736
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3620
3737
|
InputField,
|
|
3621
3738
|
{
|
|
3622
3739
|
value: kpi.value?.toString(),
|
|
@@ -3641,7 +3758,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3641
3758
|
error: itemErrors[kpi.id]?.value
|
|
3642
3759
|
}
|
|
3643
3760
|
),
|
|
3644
|
-
/* @__PURE__ */ (0,
|
|
3761
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3645
3762
|
InputField,
|
|
3646
3763
|
{
|
|
3647
3764
|
value: kpi.unit,
|
|
@@ -3651,29 +3768,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3651
3768
|
error: itemErrors[kpi.id]?.unit
|
|
3652
3769
|
}
|
|
3653
3770
|
),
|
|
3654
|
-
/* @__PURE__ */ (0,
|
|
3771
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3655
3772
|
"div",
|
|
3656
3773
|
{
|
|
3657
3774
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3658
3775
|
children: [
|
|
3659
|
-
/* @__PURE__ */ (0,
|
|
3776
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3660
3777
|
import_icons_react11.IconCheck,
|
|
3661
3778
|
{
|
|
3662
3779
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3663
3780
|
onClick: () => handleSave(kpi.id, type)
|
|
3664
3781
|
}
|
|
3665
3782
|
),
|
|
3666
|
-
/* @__PURE__ */ (0,
|
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3667
3784
|
]
|
|
3668
3785
|
}
|
|
3669
3786
|
)
|
|
3670
|
-
] }) : /* @__PURE__ */ (0,
|
|
3671
|
-
/* @__PURE__ */ (0,
|
|
3672
|
-
/* @__PURE__ */ (0,
|
|
3673
|
-
/* @__PURE__ */ (0,
|
|
3674
|
-
/* @__PURE__ */ (0,
|
|
3675
|
-
/* @__PURE__ */ (0,
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
3787
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "body-1", children: kpi.value }),
|
|
3790
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "body-1", children: kpi.unit }),
|
|
3791
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3792
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3677
3794
|
] })
|
|
3678
3795
|
] })
|
|
3679
3796
|
]
|
|
@@ -3681,9 +3798,9 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3681
3798
|
kpi.id
|
|
3682
3799
|
)) })
|
|
3683
3800
|
] }),
|
|
3684
|
-
type === "text" && /* @__PURE__ */ (0,
|
|
3685
|
-
/* @__PURE__ */ (0,
|
|
3686
|
-
/* @__PURE__ */ (0,
|
|
3801
|
+
type === "text" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-4", children: [
|
|
3802
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3803
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3687
3804
|
InputField,
|
|
3688
3805
|
{
|
|
3689
3806
|
value: nameKpi,
|
|
@@ -3695,7 +3812,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3695
3812
|
error: errors.nameKpi
|
|
3696
3813
|
}
|
|
3697
3814
|
),
|
|
3698
|
-
/* @__PURE__ */ (0,
|
|
3815
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3699
3816
|
import_icons_react11.IconCirclePlus,
|
|
3700
3817
|
{
|
|
3701
3818
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3704,13 +3821,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3704
3821
|
}
|
|
3705
3822
|
) })
|
|
3706
3823
|
] }),
|
|
3707
|
-
/* @__PURE__ */ (0,
|
|
3708
|
-
/* @__PURE__ */ (0,
|
|
3824
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
|
|
3825
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3709
3826
|
index + 1,
|
|
3710
3827
|
"."
|
|
3711
3828
|
] }),
|
|
3712
|
-
kpi.isEditing ? /* @__PURE__ */ (0,
|
|
3713
|
-
/* @__PURE__ */ (0,
|
|
3829
|
+
kpi.isEditing ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3830
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3714
3831
|
InputField,
|
|
3715
3832
|
{
|
|
3716
3833
|
value: kpi.name,
|
|
@@ -3720,27 +3837,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3720
3837
|
error: itemErrors[kpi.id]?.name
|
|
3721
3838
|
}
|
|
3722
3839
|
),
|
|
3723
|
-
/* @__PURE__ */ (0,
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3724
3841
|
"div",
|
|
3725
3842
|
{
|
|
3726
3843
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3727
3844
|
children: [
|
|
3728
|
-
/* @__PURE__ */ (0,
|
|
3845
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3729
3846
|
import_icons_react11.IconCheck,
|
|
3730
3847
|
{
|
|
3731
3848
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3732
3849
|
onClick: () => handleSave(kpi.id, type)
|
|
3733
3850
|
}
|
|
3734
3851
|
),
|
|
3735
|
-
/* @__PURE__ */ (0,
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconX, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3736
3853
|
]
|
|
3737
3854
|
}
|
|
3738
3855
|
)
|
|
3739
|
-
] }) : /* @__PURE__ */ (0,
|
|
3740
|
-
/* @__PURE__ */ (0,
|
|
3741
|
-
/* @__PURE__ */ (0,
|
|
3742
|
-
/* @__PURE__ */ (0,
|
|
3743
|
-
/* @__PURE__ */ (0,
|
|
3856
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
3857
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "body-1", children: kpi.name }),
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex gap-3 justify-end", children: [
|
|
3859
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3860
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons_react11.IconTrash, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3744
3861
|
] })
|
|
3745
3862
|
] })
|
|
3746
3863
|
] }, kpi.id)) })
|
|
@@ -3751,17 +3868,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3751
3868
|
}
|
|
3752
3869
|
|
|
3753
3870
|
// src/Modal/Modal/Modal.tsx
|
|
3754
|
-
var
|
|
3755
|
-
var
|
|
3871
|
+
var import_antd22 = require("antd");
|
|
3872
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3756
3873
|
function AntDModal({ children, isOpen, width, onCancel }) {
|
|
3757
|
-
return /* @__PURE__ */ (0,
|
|
3874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd22.Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children }) }) });
|
|
3758
3875
|
}
|
|
3759
3876
|
|
|
3760
3877
|
// src/Indicator/Indicator/Indicator.tsx
|
|
3761
3878
|
var import_icons_react12 = require("@tabler/icons-react");
|
|
3762
3879
|
var import_react18 = require("react");
|
|
3763
|
-
var
|
|
3764
|
-
var
|
|
3880
|
+
var import_antd23 = require("antd");
|
|
3881
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3765
3882
|
function Indicator({
|
|
3766
3883
|
option = [
|
|
3767
3884
|
{ value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
|
|
@@ -3889,13 +4006,13 @@ function Indicator({
|
|
|
3889
4006
|
}));
|
|
3890
4007
|
console.log(cacheEditData);
|
|
3891
4008
|
};
|
|
3892
|
-
return /* @__PURE__ */ (0,
|
|
3893
|
-
/* @__PURE__ */ (0,
|
|
4009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-full", children: [
|
|
4010
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3894
4011
|
"div",
|
|
3895
4012
|
{
|
|
3896
4013
|
className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
|
|
3897
4014
|
children: [
|
|
3898
|
-
/* @__PURE__ */ (0,
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3899
4016
|
SwitchSelect,
|
|
3900
4017
|
{
|
|
3901
4018
|
option,
|
|
@@ -3905,7 +4022,7 @@ function Indicator({
|
|
|
3905
4022
|
required: true
|
|
3906
4023
|
}
|
|
3907
4024
|
),
|
|
3908
|
-
/* @__PURE__ */ (0,
|
|
4025
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3909
4026
|
InputField,
|
|
3910
4027
|
{
|
|
3911
4028
|
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"}`,
|
|
@@ -3920,8 +4037,8 @@ function Indicator({
|
|
|
3920
4037
|
error: addError.textValue
|
|
3921
4038
|
}
|
|
3922
4039
|
),
|
|
3923
|
-
valueSwitch === "NUMBER" && /* @__PURE__ */ (0,
|
|
3924
|
-
/* @__PURE__ */ (0,
|
|
4040
|
+
valueSwitch === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
4041
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3925
4042
|
InputFieldNumber,
|
|
3926
4043
|
{
|
|
3927
4044
|
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"}`,
|
|
@@ -3937,7 +4054,7 @@ function Indicator({
|
|
|
3937
4054
|
error: addError.numberValue
|
|
3938
4055
|
}
|
|
3939
4056
|
),
|
|
3940
|
-
/* @__PURE__ */ (0,
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3941
4058
|
InputField,
|
|
3942
4059
|
{
|
|
3943
4060
|
label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
|
|
@@ -3953,7 +4070,7 @@ function Indicator({
|
|
|
3953
4070
|
}
|
|
3954
4071
|
)
|
|
3955
4072
|
] }),
|
|
3956
|
-
/* @__PURE__ */ (0,
|
|
4073
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3957
4074
|
import_icons_react12.IconCirclePlus,
|
|
3958
4075
|
{
|
|
3959
4076
|
onClick: handleAddIndicator,
|
|
@@ -3964,15 +4081,15 @@ function Indicator({
|
|
|
3964
4081
|
]
|
|
3965
4082
|
}
|
|
3966
4083
|
),
|
|
3967
|
-
/* @__PURE__ */ (0,
|
|
4084
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: arrayData.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3968
4085
|
"div",
|
|
3969
4086
|
{
|
|
3970
4087
|
className: `space-y-2 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
|
|
3971
4088
|
children: [
|
|
3972
|
-
/* @__PURE__ */ (0,
|
|
3973
|
-
index === editIndex ? /* @__PURE__ */ (0,
|
|
3974
|
-
/* @__PURE__ */ (0,
|
|
3975
|
-
|
|
4089
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
|
|
4090
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4092
|
+
import_antd23.Input,
|
|
3976
4093
|
{
|
|
3977
4094
|
className: "body-1 mt-2",
|
|
3978
4095
|
variant: "underlined",
|
|
@@ -3984,12 +4101,12 @@ function Indicator({
|
|
|
3984
4101
|
}
|
|
3985
4102
|
}
|
|
3986
4103
|
),
|
|
3987
|
-
editError.textValue && /* @__PURE__ */ (0,
|
|
3988
|
-
] }) : /* @__PURE__ */ (0,
|
|
3989
|
-
item.inputType === "NUMBER" && /* @__PURE__ */ (0,
|
|
3990
|
-
index === editIndex ? /* @__PURE__ */ (0,
|
|
3991
|
-
/* @__PURE__ */ (0,
|
|
3992
|
-
|
|
4104
|
+
editError.textValue && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-red-500 caption-1", children: editError.textValue })
|
|
4105
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "body-1 mt-2", children: item.textValue }),
|
|
4106
|
+
item.inputType === "NUMBER" && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
4107
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4108
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4109
|
+
import_antd23.Input,
|
|
3993
4110
|
{
|
|
3994
4111
|
type: "number",
|
|
3995
4112
|
className: "body-1 mt-2",
|
|
@@ -4002,11 +4119,11 @@ function Indicator({
|
|
|
4002
4119
|
}
|
|
4003
4120
|
}
|
|
4004
4121
|
),
|
|
4005
|
-
editError.numberValue && /* @__PURE__ */ (0,
|
|
4006
|
-
] }) : /* @__PURE__ */ (0,
|
|
4007
|
-
index === editIndex ? /* @__PURE__ */ (0,
|
|
4008
|
-
/* @__PURE__ */ (0,
|
|
4009
|
-
|
|
4122
|
+
editError.numberValue && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-red-500 caption-1", children: editError.numberValue })
|
|
4123
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "body-1 mt-2", children: item.numberValue }),
|
|
4124
|
+
index === editIndex ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4125
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4126
|
+
import_antd23.Input,
|
|
4010
4127
|
{
|
|
4011
4128
|
className: "body-1 mt-2",
|
|
4012
4129
|
variant: "underlined",
|
|
@@ -4018,32 +4135,32 @@ function Indicator({
|
|
|
4018
4135
|
}
|
|
4019
4136
|
}
|
|
4020
4137
|
),
|
|
4021
|
-
editError.unit && /* @__PURE__ */ (0,
|
|
4022
|
-
] }) : /* @__PURE__ */ (0,
|
|
4138
|
+
editError.unit && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-red-500 caption-1", children: editError.unit })
|
|
4139
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "body-1 mt-2", children: item.unit })
|
|
4023
4140
|
] }),
|
|
4024
|
-
/* @__PURE__ */ (0,
|
|
4025
|
-
/* @__PURE__ */ (0,
|
|
4141
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex", children: [
|
|
4142
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4026
4143
|
import_icons_react12.IconCheck,
|
|
4027
4144
|
{
|
|
4028
4145
|
className: "cursor-pointer text-green-600",
|
|
4029
4146
|
onClick: () => handleConfirmEditIndicator(index)
|
|
4030
4147
|
}
|
|
4031
4148
|
),
|
|
4032
|
-
/* @__PURE__ */ (0,
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4033
4150
|
import_icons_react12.IconX,
|
|
4034
4151
|
{
|
|
4035
4152
|
className: "cursor-pointer text-red-600",
|
|
4036
4153
|
onClick: handleCancelEditIndicator
|
|
4037
4154
|
}
|
|
4038
4155
|
)
|
|
4039
|
-
] }) : void 0 : canEdit && /* @__PURE__ */ (0,
|
|
4156
|
+
] }) : void 0 : canEdit && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4040
4157
|
import_icons_react12.IconPencil,
|
|
4041
4158
|
{
|
|
4042
4159
|
className: "cursor-pointer",
|
|
4043
4160
|
onClick: () => handleEditIndicator(index)
|
|
4044
4161
|
}
|
|
4045
4162
|
) }),
|
|
4046
|
-
/* @__PURE__ */ (0,
|
|
4163
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4047
4164
|
import_icons_react12.IconTrash,
|
|
4048
4165
|
{
|
|
4049
4166
|
onClick: () => {
|
|
@@ -4066,7 +4183,7 @@ function Indicator({
|
|
|
4066
4183
|
// src/FilterPopUp/FilterPopUp.tsx
|
|
4067
4184
|
var import_icons_react13 = require("@tabler/icons-react");
|
|
4068
4185
|
var import_react19 = require("react");
|
|
4069
|
-
var
|
|
4186
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
4070
4187
|
var FilterPopUp = (filter) => {
|
|
4071
4188
|
const [isAction, setIsAction] = (0, import_react19.useState)(true);
|
|
4072
4189
|
const [filterArray, setFilterArray] = (0, import_react19.useState)([""]);
|
|
@@ -4076,20 +4193,20 @@ var FilterPopUp = (filter) => {
|
|
|
4076
4193
|
const handleSubmitFilter = () => {
|
|
4077
4194
|
filter.handleSearch(filterArray);
|
|
4078
4195
|
};
|
|
4079
|
-
return /* @__PURE__ */ (0,
|
|
4080
|
-
/* @__PURE__ */ (0,
|
|
4081
|
-
/* @__PURE__ */ (0,
|
|
4196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "relative", children: [
|
|
4197
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
|
|
4198
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons_react13.IconFilter, {}),
|
|
4082
4199
|
"filter"
|
|
4083
4200
|
] }),
|
|
4084
|
-
isAction ? /* @__PURE__ */ (0,
|
|
4085
|
-
/* @__PURE__ */ (0,
|
|
4086
|
-
/* @__PURE__ */ (0,
|
|
4087
|
-
/* @__PURE__ */ (0,
|
|
4088
|
-
/* @__PURE__ */ (0,
|
|
4201
|
+
isAction ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
|
|
4202
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-end", children: [
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-end text-nowrap gap-2", children: [
|
|
4204
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons_react13.IconCheck, {}) }),
|
|
4205
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons_react13.IconTrash, {}) })
|
|
4089
4206
|
] }),
|
|
4090
4207
|
""
|
|
4091
4208
|
] }),
|
|
4092
|
-
/* @__PURE__ */ (0,
|
|
4209
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
4093
4210
|
SelectCustom,
|
|
4094
4211
|
{
|
|
4095
4212
|
options: filter.selectionFilter,
|
|
@@ -4104,8 +4221,8 @@ var FilterPopUp = (filter) => {
|
|
|
4104
4221
|
// src/ProfileSelect/ProfileSelect/ProfileSelect.tsx
|
|
4105
4222
|
var import_react20 = require("react");
|
|
4106
4223
|
var import_icons_react14 = require("@tabler/icons-react");
|
|
4107
|
-
var
|
|
4108
|
-
var
|
|
4224
|
+
var import_antd24 = require("antd");
|
|
4225
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4109
4226
|
function ProfileSelect({
|
|
4110
4227
|
allUser,
|
|
4111
4228
|
assignUser,
|
|
@@ -4162,22 +4279,25 @@ function ProfileSelect({
|
|
|
4162
4279
|
const filteredUnassigned = normalizedSearch ? userNotAssign.filter(
|
|
4163
4280
|
(u) => u.name.toLowerCase().includes(normalizedSearch)
|
|
4164
4281
|
) : userNotAssign;
|
|
4165
|
-
|
|
4166
|
-
|
|
4282
|
+
const isSearching = normalizedSearch.length > 0;
|
|
4283
|
+
const noResult = filteredAssigned.length === 0 && filteredUnassigned.length === 0;
|
|
4284
|
+
const noUserOption = allUser.length === 0 && !isSearching;
|
|
4285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref: containerRef, className: "relative body-1", children: [
|
|
4286
|
+
mode === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4167
4287
|
import_icons_react14.IconUsers,
|
|
4168
4288
|
{
|
|
4169
4289
|
size: 40,
|
|
4170
4290
|
className: "p-2 border rounded cursor-pointer bg-white",
|
|
4171
4291
|
onClick: () => setIsShowSelect(!isShowSelect)
|
|
4172
4292
|
}
|
|
4173
|
-
) }) : mode === "showAssign" ? /* @__PURE__ */ (0,
|
|
4293
|
+
) }) : mode === "showAssign" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4174
4294
|
"div",
|
|
4175
4295
|
{
|
|
4176
4296
|
className: `w-full h-[40px] flex items-center p-2 cursor-pointer ${className}`,
|
|
4177
4297
|
onClick: () => setIsShowSelect(!isShowSelect),
|
|
4178
|
-
children: visibleUsers.length === 0 ? placeholder ? /* @__PURE__ */ (0,
|
|
4179
|
-
/* @__PURE__ */ (0,
|
|
4180
|
-
/* @__PURE__ */ (0,
|
|
4298
|
+
children: visibleUsers.length === 0 ? placeholder ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "body-1 text-gray-400 select-none", children: placeholder }) : null : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
4299
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex -space-x-2", children: visibleUsers.map((user) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("label", { className: "relative group cursor-pointer", children: [
|
|
4300
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4181
4301
|
"img",
|
|
4182
4302
|
{
|
|
4183
4303
|
src: user.profile,
|
|
@@ -4190,7 +4310,7 @@ function ProfileSelect({
|
|
|
4190
4310
|
className: "border border-white group-hover:border-3 group-hover:border-red-500 transition"
|
|
4191
4311
|
}
|
|
4192
4312
|
),
|
|
4193
|
-
/* @__PURE__ */ (0,
|
|
4313
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4194
4314
|
"span",
|
|
4195
4315
|
{
|
|
4196
4316
|
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",
|
|
@@ -4198,11 +4318,11 @@ function ProfileSelect({
|
|
|
4198
4318
|
e.stopPropagation();
|
|
4199
4319
|
onUpdateAssignUser(user, "remove");
|
|
4200
4320
|
},
|
|
4201
|
-
children: /* @__PURE__ */ (0,
|
|
4321
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons_react14.IconX, { className: "w-4 h-4 text-red-500" })
|
|
4202
4322
|
}
|
|
4203
4323
|
)
|
|
4204
4324
|
] }) }, user.id)) }),
|
|
4205
|
-
showPlus && /* @__PURE__ */ (0,
|
|
4325
|
+
showPlus && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4206
4326
|
"div",
|
|
4207
4327
|
{
|
|
4208
4328
|
className: "border border-white flex items-center justify-center bg-gray-300 text-black text-sm ml-2",
|
|
@@ -4219,8 +4339,8 @@ function ProfileSelect({
|
|
|
4219
4339
|
)
|
|
4220
4340
|
] })
|
|
4221
4341
|
}
|
|
4222
|
-
) : /* @__PURE__ */ (0,
|
|
4223
|
-
visibleUsers.map((user) => /* @__PURE__ */ (0,
|
|
4342
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: `w-full h-[40px] flex -space-x-2 p-2 ${className}`, children: [
|
|
4343
|
+
visibleUsers.map((user) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex items-center ", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: "relative group ", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4224
4344
|
"img",
|
|
4225
4345
|
{
|
|
4226
4346
|
src: user.profile,
|
|
@@ -4233,7 +4353,7 @@ function ProfileSelect({
|
|
|
4233
4353
|
className: "border border-white transition"
|
|
4234
4354
|
}
|
|
4235
4355
|
) }) }, user.id)),
|
|
4236
|
-
showPlus && /* @__PURE__ */ (0,
|
|
4356
|
+
showPlus && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4237
4357
|
"div",
|
|
4238
4358
|
{
|
|
4239
4359
|
className: "border border-white flex items-center justify-center bg-gray-300 text-black text-sm",
|
|
@@ -4249,16 +4369,16 @@ function ProfileSelect({
|
|
|
4249
4369
|
}
|
|
4250
4370
|
)
|
|
4251
4371
|
] }),
|
|
4252
|
-
isShowSelect ? /* @__PURE__ */ (0,
|
|
4372
|
+
isShowSelect ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4253
4373
|
"div",
|
|
4254
4374
|
{
|
|
4255
4375
|
className: "absolute top-12 min-w-[261px] max-w-[400px] w-full h-[314px] p-2 text-xs border-1 rounded-sm z-20 bg-white",
|
|
4256
4376
|
ref: selectRef,
|
|
4257
4377
|
children: [
|
|
4258
|
-
/* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4261
|
-
|
|
4378
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex border-1 rounded-md p-2 gap-2 items-center", children: [
|
|
4379
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons_react14.IconSearch, {}),
|
|
4380
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4381
|
+
import_antd24.Input,
|
|
4262
4382
|
{
|
|
4263
4383
|
variant: "borderless",
|
|
4264
4384
|
placeholder: "\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E0A\u0E37\u0E48\u0E2D",
|
|
@@ -4268,16 +4388,16 @@ function ProfileSelect({
|
|
|
4268
4388
|
}
|
|
4269
4389
|
)
|
|
4270
4390
|
] }),
|
|
4271
|
-
/* @__PURE__ */ (0,
|
|
4272
|
-
filteredAssigned.length > 0 && /* @__PURE__ */ (0,
|
|
4273
|
-
/* @__PURE__ */ (0,
|
|
4274
|
-
filteredAssigned.map((user) => /* @__PURE__ */ (0,
|
|
4391
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "overflow-y-auto h-[250px] pt-2 px-4 body-3", children: noUserOption ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("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__ */ (0, import_jsx_runtime43.jsx)("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__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
4392
|
+
filteredAssigned.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
4393
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "mb-1", children: "\u0E2A\u0E21\u0E32\u0E0A\u0E34\u0E01\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01" }),
|
|
4394
|
+
filteredAssigned.map((user) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4275
4395
|
"button",
|
|
4276
4396
|
{
|
|
4277
4397
|
className: "flex items-center group my-1 w-full p-1 rounded hover:bg-gray-100",
|
|
4278
4398
|
children: [
|
|
4279
|
-
/* @__PURE__ */ (0,
|
|
4280
|
-
/* @__PURE__ */ (0,
|
|
4399
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative cursor-pointer", children: [
|
|
4400
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4281
4401
|
"img",
|
|
4282
4402
|
{
|
|
4283
4403
|
src: user.profile,
|
|
@@ -4290,47 +4410,49 @@ function ProfileSelect({
|
|
|
4290
4410
|
className: "border-3 border-red-500"
|
|
4291
4411
|
}
|
|
4292
4412
|
),
|
|
4293
|
-
/* @__PURE__ */ (0,
|
|
4413
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4294
4414
|
"span",
|
|
4295
4415
|
{
|
|
4296
|
-
className: "absolute top-0 right-0 -translate-y-2 translate-x-2 \r\n
|
|
4416
|
+
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",
|
|
4297
4417
|
onClick: () => onUpdateAssignUser(user, "remove"),
|
|
4298
|
-
children: /* @__PURE__ */ (0,
|
|
4418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons_react14.IconX, { className: "text-red-500", size: 15 })
|
|
4299
4419
|
}
|
|
4300
4420
|
)
|
|
4301
4421
|
] }),
|
|
4302
|
-
/* @__PURE__ */ (0,
|
|
4422
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "ml-2", children: user.name })
|
|
4303
4423
|
]
|
|
4304
4424
|
},
|
|
4305
4425
|
user.id
|
|
4306
4426
|
))
|
|
4307
4427
|
] }),
|
|
4308
|
-
/* @__PURE__ */ (0,
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4428
|
+
filteredUnassigned.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
4429
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "mt-2", children: "\u0E1C\u0E39\u0E49\u0E04\u0E19" }),
|
|
4430
|
+
filteredUnassigned.map((user) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4431
|
+
"button",
|
|
4432
|
+
{
|
|
4433
|
+
className: "flex items-center my-1 hover:bg-gray-100 w-full p-1 rounded",
|
|
4434
|
+
onClick: () => onUpdateAssignUser(user),
|
|
4435
|
+
children: [
|
|
4436
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4437
|
+
"img",
|
|
4438
|
+
{
|
|
4439
|
+
src: user.profile,
|
|
4440
|
+
alt: user.name,
|
|
4441
|
+
style: {
|
|
4442
|
+
width: avatarSize,
|
|
4443
|
+
height: avatarSize,
|
|
4444
|
+
borderRadius: "50%"
|
|
4445
|
+
},
|
|
4446
|
+
className: "border"
|
|
4447
|
+
}
|
|
4448
|
+
),
|
|
4449
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "ml-2", children: user.name })
|
|
4450
|
+
]
|
|
4451
|
+
},
|
|
4452
|
+
user.id
|
|
4453
|
+
))
|
|
4454
|
+
] })
|
|
4455
|
+
] }) })
|
|
4334
4456
|
]
|
|
4335
4457
|
}
|
|
4336
4458
|
) : null
|
|
@@ -4340,7 +4462,7 @@ function ProfileSelect({
|
|
|
4340
4462
|
// src/Button/QRCode/QRCode.tsx
|
|
4341
4463
|
var import_react21 = require("react");
|
|
4342
4464
|
var import_qrcode = __toESM(require("qrcode"));
|
|
4343
|
-
var
|
|
4465
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4344
4466
|
var QRCodeGenerator = ({
|
|
4345
4467
|
url,
|
|
4346
4468
|
previewSize = 200,
|
|
@@ -4435,9 +4557,9 @@ var QRCodeGenerator = ({
|
|
|
4435
4557
|
a.click();
|
|
4436
4558
|
a.remove();
|
|
4437
4559
|
};
|
|
4438
|
-
return /* @__PURE__ */ (0,
|
|
4439
|
-
url === "" ? /* @__PURE__ */ (0,
|
|
4440
|
-
/* @__PURE__ */ (0,
|
|
4560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { style: { display: "inline-flex", flexDirection: "column", gap: 8 }, className: "justify-center items-center", children: [
|
|
4561
|
+
url === "" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "border-1 p-2 mb-2", style: { width: `${previewSize}px`, height: `${previewSize}px` } }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("canvas", { ref: canvasRef, className: "border-1 p-2 mb-2" }),
|
|
4562
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4441
4563
|
"div",
|
|
4442
4564
|
{
|
|
4443
4565
|
style: {
|
|
@@ -4448,8 +4570,8 @@ var QRCodeGenerator = ({
|
|
|
4448
4570
|
},
|
|
4449
4571
|
className: "flex-col",
|
|
4450
4572
|
children: [
|
|
4451
|
-
/* @__PURE__ */ (0,
|
|
4452
|
-
/* @__PURE__ */ (0,
|
|
4573
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex gap-2 mx-2", children: [
|
|
4574
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("label", { className: "border-1 p-2 rounded-md flex flex-col w-1/2 text-sm text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4453
4575
|
SelectField,
|
|
4454
4576
|
{
|
|
4455
4577
|
label: "\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A",
|
|
@@ -4458,7 +4580,7 @@ var QRCodeGenerator = ({
|
|
|
4458
4580
|
options: typeOption
|
|
4459
4581
|
}
|
|
4460
4582
|
) }),
|
|
4461
|
-
/* @__PURE__ */ (0,
|
|
4583
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("label", { className: "border-1 p-2 rounded-md flex flex-col w-1/2 text-sm text-gray-400", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4462
4584
|
SelectField,
|
|
4463
4585
|
{
|
|
4464
4586
|
label: "\u0E02\u0E19\u0E32\u0E14 (px)",
|
|
@@ -4468,7 +4590,7 @@ var QRCodeGenerator = ({
|
|
|
4468
4590
|
}
|
|
4469
4591
|
) })
|
|
4470
4592
|
] }),
|
|
4471
|
-
/* @__PURE__ */ (0,
|
|
4593
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PrimaryButton, { onClick: download, disabled: url === "", textColor: "white", title: "\u0E14\u0E32\u0E27\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E2B\u0E31\u0E2A QR" })
|
|
4472
4594
|
]
|
|
4473
4595
|
}
|
|
4474
4596
|
)
|
|
@@ -4476,11 +4598,11 @@ var QRCodeGenerator = ({
|
|
|
4476
4598
|
};
|
|
4477
4599
|
|
|
4478
4600
|
// src/TabPropject/TabProject/TabProject.tsx
|
|
4479
|
-
var
|
|
4480
|
-
var
|
|
4601
|
+
var import_antd25 = require("antd");
|
|
4602
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4481
4603
|
function TabProject({ tabOption, now, onChange }) {
|
|
4482
|
-
return /* @__PURE__ */ (0,
|
|
4483
|
-
|
|
4604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4605
|
+
import_antd25.ConfigProvider,
|
|
4484
4606
|
{
|
|
4485
4607
|
theme: {
|
|
4486
4608
|
token: {
|
|
@@ -4496,16 +4618,16 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4496
4618
|
}
|
|
4497
4619
|
}
|
|
4498
4620
|
},
|
|
4499
|
-
children: /* @__PURE__ */ (0,
|
|
4500
|
-
|
|
4621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4622
|
+
import_antd25.Tabs,
|
|
4501
4623
|
{
|
|
4502
4624
|
activeKey: now,
|
|
4503
4625
|
onChange,
|
|
4504
4626
|
items: tabOption.map((item) => ({
|
|
4505
4627
|
key: item.key,
|
|
4506
|
-
label: /* @__PURE__ */ (0,
|
|
4628
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "tab-label flex gap-2 items-center body-1", children: [
|
|
4507
4629
|
item.icon,
|
|
4508
|
-
/* @__PURE__ */ (0,
|
|
4630
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: item.label })
|
|
4509
4631
|
] })
|
|
4510
4632
|
}))
|
|
4511
4633
|
}
|
|
@@ -4517,7 +4639,7 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4517
4639
|
// src/Chart/BarChart/BarChart.tsx
|
|
4518
4640
|
var import_react22 = require("react");
|
|
4519
4641
|
var d3 = __toESM(require("d3"));
|
|
4520
|
-
var
|
|
4642
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4521
4643
|
var defaultMargin = { top: 30, right: 200, bottom: 36, left: 50 };
|
|
4522
4644
|
var defaultColorPalette = [
|
|
4523
4645
|
"#4E79A7",
|
|
@@ -4630,17 +4752,17 @@ var BarChart = ({
|
|
|
4630
4752
|
(0, import_react22.useEffect)(() => {
|
|
4631
4753
|
render();
|
|
4632
4754
|
}, [data, height, margin, xDomain.toString(), yDomain.toString()]);
|
|
4633
|
-
return /* @__PURE__ */ (0,
|
|
4634
|
-
/* @__PURE__ */ (0,
|
|
4635
|
-
/* @__PURE__ */ (0,
|
|
4636
|
-
/* @__PURE__ */ (0,
|
|
4755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { ref: containerRef, style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("svg", { ref: svgRef, role: "img", "aria-label": "Bar chart", style: { display: "block", width: "100%", height }, children: [
|
|
4756
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("g", { ref: gRef, transform: `translate(${margin.left},${margin.top})` }),
|
|
4757
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("g", { ref: xAxisRef }),
|
|
4758
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("g", { ref: yAxisRef })
|
|
4637
4759
|
] }) });
|
|
4638
4760
|
};
|
|
4639
4761
|
|
|
4640
4762
|
// src/Chart/PieChart/PieChart.tsx
|
|
4641
4763
|
var import_react23 = __toESM(require("react"));
|
|
4642
4764
|
var d32 = __toESM(require("d3"));
|
|
4643
|
-
var
|
|
4765
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4644
4766
|
var defaultColors = d32.schemeCategory10;
|
|
4645
4767
|
var PieChart = ({
|
|
4646
4768
|
title,
|
|
@@ -4674,15 +4796,15 @@ var PieChart = ({
|
|
|
4674
4796
|
return `${percentage}%`;
|
|
4675
4797
|
});
|
|
4676
4798
|
}, [data, width, height]);
|
|
4677
|
-
return /* @__PURE__ */ (0,
|
|
4678
|
-
title && /* @__PURE__ */ (0,
|
|
4679
|
-
description && /* @__PURE__ */ (0,
|
|
4680
|
-
/* @__PURE__ */ (0,
|
|
4681
|
-
/* @__PURE__ */ (0,
|
|
4682
|
-
/* @__PURE__ */ (0,
|
|
4683
|
-
/* @__PURE__ */ (0,
|
|
4684
|
-
/* @__PURE__ */ (0,
|
|
4685
|
-
/* @__PURE__ */ (0,
|
|
4799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { children: [
|
|
4800
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "body-2", children: title }),
|
|
4801
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "caption-1", children: description }),
|
|
4802
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex", children: [
|
|
4803
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("svg", { ref: svgRef }),
|
|
4804
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-col gap-2 body-3 pl-[200px]", children: dataSide.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "grid grid-cols-3 gap-2 items-center", children: [
|
|
4805
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "w-[20px] h-[20px]", style: { backgroundColor: d.color } }),
|
|
4806
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { children: d.label }),
|
|
4807
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { children: d.value })
|
|
4686
4808
|
] }, i)) })
|
|
4687
4809
|
] })
|
|
4688
4810
|
] });
|
|
@@ -4692,7 +4814,7 @@ var PieChart = ({
|
|
|
4692
4814
|
var import_react24 = require("react");
|
|
4693
4815
|
var d33 = __toESM(require("d3"));
|
|
4694
4816
|
var import_date_fns3 = require("date-fns");
|
|
4695
|
-
var
|
|
4817
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4696
4818
|
var LAYOUT = {
|
|
4697
4819
|
barHeight: 40,
|
|
4698
4820
|
barSpacing: 10,
|
|
@@ -4771,7 +4893,7 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4771
4893
|
const safeStatus = element.status || "pending";
|
|
4772
4894
|
const statusColor = getStatusColor(safeStatus);
|
|
4773
4895
|
const statusLabel = getStatusLabel(safeStatus);
|
|
4774
|
-
return /* @__PURE__ */ (0,
|
|
4896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4775
4897
|
"div",
|
|
4776
4898
|
{
|
|
4777
4899
|
style: {
|
|
@@ -4783,8 +4905,8 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4783
4905
|
marginBottom: `${barSpacing}px`
|
|
4784
4906
|
},
|
|
4785
4907
|
children: [
|
|
4786
|
-
/* @__PURE__ */ (0,
|
|
4787
|
-
/* @__PURE__ */ (0,
|
|
4908
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
4909
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4788
4910
|
"span",
|
|
4789
4911
|
{
|
|
4790
4912
|
style: {
|
|
@@ -4796,11 +4918,11 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4796
4918
|
}
|
|
4797
4919
|
}
|
|
4798
4920
|
),
|
|
4799
|
-
/* @__PURE__ */ (0,
|
|
4921
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { style: { color: "#333" }, children: element.label })
|
|
4800
4922
|
] }),
|
|
4801
|
-
/* @__PURE__ */ (0,
|
|
4802
|
-
/* @__PURE__ */ (0,
|
|
4803
|
-
/* @__PURE__ */ (0,
|
|
4923
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { style: { color: "#666" }, children: formatThaiDate(safeStartDate) }),
|
|
4924
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { style: { color: "#666" }, children: formatThaiDate(safeEndDate) }),
|
|
4925
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4804
4926
|
"button",
|
|
4805
4927
|
{
|
|
4806
4928
|
style: {
|
|
@@ -4822,7 +4944,7 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4822
4944
|
element.id
|
|
4823
4945
|
);
|
|
4824
4946
|
};
|
|
4825
|
-
var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__PURE__ */ (0,
|
|
4947
|
+
var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4826
4948
|
"div",
|
|
4827
4949
|
{
|
|
4828
4950
|
style: {
|
|
@@ -4837,7 +4959,7 @@ var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__P
|
|
|
4837
4959
|
children: data.map((d, i) => {
|
|
4838
4960
|
if (i === 0) return null;
|
|
4839
4961
|
const yPos = i * (barHeight + barSpacing) - barSpacing / 2;
|
|
4840
|
-
return /* @__PURE__ */ (0,
|
|
4962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4841
4963
|
"div",
|
|
4842
4964
|
{
|
|
4843
4965
|
style: {
|
|
@@ -5038,7 +5160,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5038
5160
|
headersGroupLayer1Height,
|
|
5039
5161
|
headersGroupLayer2Height
|
|
5040
5162
|
]);
|
|
5041
|
-
return /* @__PURE__ */ (0,
|
|
5163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5042
5164
|
"div",
|
|
5043
5165
|
{
|
|
5044
5166
|
style: {
|
|
@@ -5052,7 +5174,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5052
5174
|
backgroundColor: "#fff",
|
|
5053
5175
|
overflow: "hidden"
|
|
5054
5176
|
},
|
|
5055
|
-
children: /* @__PURE__ */ (0,
|
|
5177
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
5056
5178
|
"div",
|
|
5057
5179
|
{
|
|
5058
5180
|
style: {
|
|
@@ -5063,8 +5185,8 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5063
5185
|
position: "relative"
|
|
5064
5186
|
},
|
|
5065
5187
|
children: [
|
|
5066
|
-
/* @__PURE__ */ (0,
|
|
5067
|
-
/* @__PURE__ */ (0,
|
|
5188
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RowOverlay, { data, barHeight, barSpacing, totalHeaderHeight }),
|
|
5189
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
5068
5190
|
"div",
|
|
5069
5191
|
{
|
|
5070
5192
|
ref: leftPanelRef,
|
|
@@ -5078,7 +5200,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5078
5200
|
zIndex: 2
|
|
5079
5201
|
},
|
|
5080
5202
|
children: [
|
|
5081
|
-
/* @__PURE__ */ (0,
|
|
5203
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
5082
5204
|
"div",
|
|
5083
5205
|
{
|
|
5084
5206
|
style: {
|
|
@@ -5098,18 +5220,18 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5098
5220
|
boxSizing: "border-box"
|
|
5099
5221
|
},
|
|
5100
5222
|
children: [
|
|
5101
|
-
/* @__PURE__ */ (0,
|
|
5102
|
-
/* @__PURE__ */ (0,
|
|
5103
|
-
/* @__PURE__ */ (0,
|
|
5104
|
-
/* @__PURE__ */ (0,
|
|
5223
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: "\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23" }),
|
|
5224
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: "\u0E27\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21" }),
|
|
5225
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E2A\u0E48\u0E07" }),
|
|
5226
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: "\u0E2A\u0E16\u0E32\u0E19\u0E30" })
|
|
5105
5227
|
]
|
|
5106
5228
|
}
|
|
5107
5229
|
),
|
|
5108
|
-
/* @__PURE__ */ (0,
|
|
5230
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref: dataContainerRef, children: data.map((element) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ProjectRow, { element, barHeight, barSpacing }, element.id)) })
|
|
5109
5231
|
]
|
|
5110
5232
|
}
|
|
5111
5233
|
),
|
|
5112
|
-
/* @__PURE__ */ (0,
|
|
5234
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5113
5235
|
"div",
|
|
5114
5236
|
{
|
|
5115
5237
|
style: {
|
|
@@ -5118,7 +5240,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5118
5240
|
position: "relative",
|
|
5119
5241
|
overflow: "visible"
|
|
5120
5242
|
},
|
|
5121
|
-
children: /* @__PURE__ */ (0,
|
|
5243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5122
5244
|
"div",
|
|
5123
5245
|
{
|
|
5124
5246
|
style: {
|
|
@@ -5127,7 +5249,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5127
5249
|
width: "max-content",
|
|
5128
5250
|
zIndex: 1
|
|
5129
5251
|
},
|
|
5130
|
-
children: /* @__PURE__ */ (0,
|
|
5252
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("svg", { ref: svgRef })
|
|
5131
5253
|
}
|
|
5132
5254
|
)
|
|
5133
5255
|
}
|
|
@@ -5183,6 +5305,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5183
5305
|
SwitchSelect,
|
|
5184
5306
|
TabProject,
|
|
5185
5307
|
TabSelectionButton,
|
|
5308
|
+
TertiaryButton,
|
|
5186
5309
|
TextAreaInput,
|
|
5187
5310
|
TextInput,
|
|
5188
5311
|
TopNavBar,
|