@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.mjs
CHANGED
|
@@ -347,53 +347,97 @@ var require_buddhistEra = __commonJS({
|
|
|
347
347
|
});
|
|
348
348
|
|
|
349
349
|
// src/Button/PrimaryButton/PrimaryButton.tsx
|
|
350
|
-
import {
|
|
350
|
+
import { Button, ConfigProvider } from "antd";
|
|
351
|
+
import { jsx } from "react/jsx-runtime";
|
|
351
352
|
function PrimaryButton({
|
|
352
353
|
title,
|
|
353
354
|
onClick,
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
355
|
+
disabled,
|
|
356
|
+
iconPlacement = "start",
|
|
357
|
+
size = "large",
|
|
358
|
+
colorPrimary = "#4e61f6",
|
|
359
|
+
colorPrimaryHover = "#8895f9",
|
|
360
|
+
textColor = "#ffffff",
|
|
361
|
+
icon
|
|
359
362
|
}) {
|
|
363
|
+
const textClass = size === "large" ? "body-1" : "body-3";
|
|
360
364
|
return /* @__PURE__ */ jsx(
|
|
361
|
-
|
|
365
|
+
ConfigProvider,
|
|
362
366
|
{
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
367
|
+
theme: {
|
|
368
|
+
token: {
|
|
369
|
+
colorPrimary,
|
|
370
|
+
colorPrimaryHover,
|
|
371
|
+
colorTextLightSolid: textColor
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
children: /* @__PURE__ */ jsx(
|
|
375
|
+
Button,
|
|
376
|
+
{
|
|
377
|
+
size,
|
|
378
|
+
onClick,
|
|
379
|
+
type: "primary",
|
|
380
|
+
className: textClass,
|
|
381
|
+
disabled,
|
|
382
|
+
icon,
|
|
383
|
+
iconPosition: iconPlacement,
|
|
384
|
+
children: title
|
|
385
|
+
}
|
|
386
|
+
)
|
|
373
387
|
}
|
|
374
388
|
);
|
|
375
389
|
}
|
|
376
390
|
|
|
377
391
|
// src/Button/SecondaryButton/SecondaryButton.tsx
|
|
378
|
-
import {
|
|
379
|
-
|
|
392
|
+
import { Button as Button2, ConfigProvider as ConfigProvider2 } from "antd";
|
|
393
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
394
|
+
function SecondaryButton({
|
|
395
|
+
title,
|
|
396
|
+
onClick,
|
|
397
|
+
disabled,
|
|
398
|
+
iconPlacement = "start",
|
|
399
|
+
size = "large",
|
|
400
|
+
colorBgContainer = "#ffffff",
|
|
401
|
+
defaultHoverBorderColor = "#7181f8",
|
|
402
|
+
defaultHoverColor = "#7181f8",
|
|
403
|
+
textColor = "rgba(0,0,0,0.88)",
|
|
404
|
+
icon
|
|
405
|
+
}) {
|
|
406
|
+
const textClass = size === "large" ? "body-1" : "body-3";
|
|
380
407
|
return /* @__PURE__ */ jsx2(
|
|
381
|
-
|
|
408
|
+
ConfigProvider2,
|
|
382
409
|
{
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
410
|
+
theme: {
|
|
411
|
+
components: {
|
|
412
|
+
Button: {
|
|
413
|
+
defaultHoverBorderColor,
|
|
414
|
+
defaultHoverColor
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
token: {
|
|
418
|
+
colorBgContainer,
|
|
419
|
+
colorText: textColor
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
children: /* @__PURE__ */ jsx2(
|
|
423
|
+
Button2,
|
|
424
|
+
{
|
|
425
|
+
size,
|
|
426
|
+
onClick,
|
|
427
|
+
type: "default",
|
|
428
|
+
className: textClass,
|
|
429
|
+
disabled,
|
|
430
|
+
icon,
|
|
431
|
+
iconPosition: iconPlacement,
|
|
432
|
+
children: title
|
|
433
|
+
}
|
|
434
|
+
)
|
|
391
435
|
}
|
|
392
436
|
);
|
|
393
437
|
}
|
|
394
438
|
|
|
395
439
|
// src/Button/GhostButton/GhostButton.tsx
|
|
396
|
-
import { jsx as jsx3, jsxs
|
|
440
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
397
441
|
function GhostButton({ title, onClick, iconLeft, iconRight, disabled }) {
|
|
398
442
|
return /* @__PURE__ */ jsx3(
|
|
399
443
|
"button",
|
|
@@ -402,7 +446,7 @@ function GhostButton({ title, onClick, iconLeft, iconRight, disabled }) {
|
|
|
402
446
|
disabled,
|
|
403
447
|
className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] body-1 transition
|
|
404
448
|
${disabled ? "text-gray-400 bg-gray-100 cursor-not-allowed" : "bg-[#E9E9E9] cursor-pointer hover:bg-[#d6d6d6] active:bg-[#c4c4c4]"}`,
|
|
405
|
-
children: /* @__PURE__ */
|
|
449
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex justify-center items-center gap-[10px]", children: [
|
|
406
450
|
iconLeft && /* @__PURE__ */ jsx3("div", { children: iconLeft }),
|
|
407
451
|
title,
|
|
408
452
|
iconRight && /* @__PURE__ */ jsx3("div", { children: iconRight })
|
|
@@ -412,9 +456,9 @@ function GhostButton({ title, onClick, iconLeft, iconRight, disabled }) {
|
|
|
412
456
|
}
|
|
413
457
|
|
|
414
458
|
// src/Button/TabSelectionButton/TabSelectionButton.tsx
|
|
415
|
-
import { jsx as jsx4, jsxs as
|
|
459
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
416
460
|
var TabSelectionButton = ({ title, now, onClickGoto }) => {
|
|
417
|
-
return /* @__PURE__ */
|
|
461
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex subtitle-2", children: [
|
|
418
462
|
title.map((text) => /* @__PURE__ */ jsx4(
|
|
419
463
|
"button",
|
|
420
464
|
{
|
|
@@ -427,10 +471,52 @@ var TabSelectionButton = ({ title, now, onClickGoto }) => {
|
|
|
427
471
|
] });
|
|
428
472
|
};
|
|
429
473
|
|
|
430
|
-
// src/
|
|
474
|
+
// src/Button/TertiaryButton/TertiaryButton.tsx
|
|
475
|
+
import { Button as Button3, ConfigProvider as ConfigProvider3 } from "antd";
|
|
431
476
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
432
|
-
function
|
|
477
|
+
function TertiaryButton({
|
|
478
|
+
title,
|
|
479
|
+
onClick,
|
|
480
|
+
disabled,
|
|
481
|
+
iconPlacement = "start",
|
|
482
|
+
size = "large",
|
|
483
|
+
colorPrimary = "#000",
|
|
484
|
+
colorPrimaryHover = "#4d5461",
|
|
485
|
+
textColor = "white",
|
|
486
|
+
icon
|
|
487
|
+
}) {
|
|
488
|
+
const textClass = size === "large" ? "body-1" : "body-3";
|
|
433
489
|
return /* @__PURE__ */ jsx5(
|
|
490
|
+
ConfigProvider3,
|
|
491
|
+
{
|
|
492
|
+
theme: {
|
|
493
|
+
token: {
|
|
494
|
+
colorPrimary,
|
|
495
|
+
colorPrimaryHover,
|
|
496
|
+
colorText: textColor
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
children: /* @__PURE__ */ jsx5(
|
|
500
|
+
Button3,
|
|
501
|
+
{
|
|
502
|
+
size,
|
|
503
|
+
onClick,
|
|
504
|
+
type: "primary",
|
|
505
|
+
className: textClass,
|
|
506
|
+
disabled,
|
|
507
|
+
icon,
|
|
508
|
+
iconPosition: iconPlacement,
|
|
509
|
+
children: title
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
}
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// src/Loader/Loader/Loader.tsx
|
|
517
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
518
|
+
function Loader({ size = 25, color = "#000000" }) {
|
|
519
|
+
return /* @__PURE__ */ jsx6(
|
|
434
520
|
"div",
|
|
435
521
|
{
|
|
436
522
|
style: {
|
|
@@ -448,14 +534,14 @@ function Loader({ size = 25, color = "#000000" }) {
|
|
|
448
534
|
|
|
449
535
|
// src/Checkbox/Checkbox/Checkbox.tsx
|
|
450
536
|
import { IconCheck } from "@tabler/icons-react";
|
|
451
|
-
import { jsx as
|
|
537
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
452
538
|
function Checkbox({ label, checked, onChange, disabled }) {
|
|
453
539
|
const handleClick = () => {
|
|
454
540
|
if (!disabled) {
|
|
455
541
|
onChange(!checked);
|
|
456
542
|
}
|
|
457
543
|
};
|
|
458
|
-
return /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ jsxs3(
|
|
459
545
|
"div",
|
|
460
546
|
{
|
|
461
547
|
className: `flex gap-[10px] items-center
|
|
@@ -463,32 +549,32 @@ function Checkbox({ label, checked, onChange, disabled }) {
|
|
|
463
549
|
"aria-disabled": disabled,
|
|
464
550
|
onClick: handleClick,
|
|
465
551
|
children: [
|
|
466
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ jsx7(
|
|
467
553
|
"div",
|
|
468
554
|
{
|
|
469
555
|
className: `flex justify-center items-center border-[1px] border-black w-[24px] h-[24px] rounded-[8px] transition-colors duration-100
|
|
470
556
|
${checked ? "bg-black text-white" : "bg-white text-black"}
|
|
471
557
|
${disabled ? "pointer-events-none" : ""}`,
|
|
472
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ jsx7(
|
|
473
559
|
"span",
|
|
474
560
|
{
|
|
475
561
|
className: `flex justify-center items-center transition-transform duration-150
|
|
476
562
|
${checked ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
|
|
477
|
-
children: /* @__PURE__ */
|
|
563
|
+
children: /* @__PURE__ */ jsx7(IconCheck, { size: 20 })
|
|
478
564
|
}
|
|
479
565
|
)
|
|
480
566
|
}
|
|
481
567
|
),
|
|
482
|
-
label && /* @__PURE__ */
|
|
568
|
+
label && /* @__PURE__ */ jsx7("p", { className: "body-1 select-none", children: label })
|
|
483
569
|
]
|
|
484
570
|
}
|
|
485
571
|
);
|
|
486
572
|
}
|
|
487
573
|
|
|
488
574
|
// src/Checkbox/CheckboxGroup/CheckboxGroup.tsx
|
|
489
|
-
import { jsx as
|
|
575
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
490
576
|
function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
491
|
-
return /* @__PURE__ */
|
|
577
|
+
return /* @__PURE__ */ jsx8("div", { className: `flex gap-4 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsx8(
|
|
492
578
|
Checkbox,
|
|
493
579
|
{
|
|
494
580
|
checked: opt.checked,
|
|
@@ -501,14 +587,14 @@ function CheckboxGroup({ options, onChange, alignment = "vertical" }) {
|
|
|
501
587
|
}
|
|
502
588
|
|
|
503
589
|
// src/Radio/Radio/Radio.tsx
|
|
504
|
-
import { jsx as
|
|
590
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
505
591
|
function Radio({ selected, onChange, disabled }) {
|
|
506
592
|
const handleClick = () => {
|
|
507
593
|
if (!disabled) {
|
|
508
594
|
onChange(!selected);
|
|
509
595
|
}
|
|
510
596
|
};
|
|
511
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ jsx9(
|
|
512
598
|
"div",
|
|
513
599
|
{
|
|
514
600
|
className: `
|
|
@@ -517,31 +603,31 @@ function Radio({ selected, onChange, disabled }) {
|
|
|
517
603
|
`,
|
|
518
604
|
onClick: handleClick,
|
|
519
605
|
"aria-disabled": disabled,
|
|
520
|
-
children: selected && /* @__PURE__ */
|
|
606
|
+
children: selected && /* @__PURE__ */ jsx9("div", { className: `bg-black w-[10px] h-[10px] rounded-full transition-all duration-300` })
|
|
521
607
|
}
|
|
522
608
|
);
|
|
523
609
|
}
|
|
524
610
|
|
|
525
611
|
// src/Radio/RadioGroup/RadioGroup.tsx
|
|
526
|
-
import { jsx as
|
|
612
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
527
613
|
function RadioGroup({ options, value, onChange, alignment = "horizontal" }) {
|
|
528
|
-
return /* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
/* @__PURE__ */
|
|
614
|
+
return /* @__PURE__ */ jsx10("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsxs4("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
615
|
+
/* @__PURE__ */ jsx10(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value), disabled: opt.disabled }),
|
|
616
|
+
/* @__PURE__ */ jsx10("span", { className: `body-1 ${opt.disabled ? "text-gray-400 cursor-not-allowed" : ""}`, children: opt.label })
|
|
531
617
|
] }, opt.value)) });
|
|
532
618
|
}
|
|
533
619
|
|
|
534
620
|
// src/Switch/Switch/Switch.tsx
|
|
535
|
-
import { jsx as
|
|
621
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
536
622
|
function Switch({ label, checked, onChange, disabled }) {
|
|
537
623
|
const handleClick = () => {
|
|
538
624
|
if (!disabled) {
|
|
539
625
|
onChange(!checked);
|
|
540
626
|
}
|
|
541
627
|
};
|
|
542
|
-
return /* @__PURE__ */
|
|
543
|
-
label && /* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
628
|
+
return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[10px]", children: [
|
|
629
|
+
label && /* @__PURE__ */ jsx11("p", { className: `body-1 ${disabled ? "opacity-50 select-none" : ""}`, children: label }),
|
|
630
|
+
/* @__PURE__ */ jsx11(
|
|
545
631
|
"button",
|
|
546
632
|
{
|
|
547
633
|
type: "button",
|
|
@@ -553,7 +639,7 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
553
639
|
${checked ? "bg-primary-500" : "bg-gray-300"}
|
|
554
640
|
${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}
|
|
555
641
|
`,
|
|
556
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ jsx11(
|
|
557
643
|
"div",
|
|
558
644
|
{
|
|
559
645
|
className: `bg-white w-5 h-5 rounded-full shadow-md transform transition-transform duration-300
|
|
@@ -566,7 +652,7 @@ function Switch({ label, checked, onChange, disabled }) {
|
|
|
566
652
|
}
|
|
567
653
|
|
|
568
654
|
// src/Switch/SwitchSelect/SwitchSelect.tsx
|
|
569
|
-
import { jsx as
|
|
655
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
570
656
|
function SwitchSelect({
|
|
571
657
|
option,
|
|
572
658
|
onClick,
|
|
@@ -575,13 +661,13 @@ function SwitchSelect({
|
|
|
575
661
|
required,
|
|
576
662
|
color
|
|
577
663
|
}) {
|
|
578
|
-
return /* @__PURE__ */
|
|
579
|
-
label && /* @__PURE__ */
|
|
664
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col container-input", children: [
|
|
665
|
+
label && /* @__PURE__ */ jsxs6("p", { className: `body-1`, children: [
|
|
580
666
|
label,
|
|
581
667
|
" ",
|
|
582
|
-
required && /* @__PURE__ */
|
|
668
|
+
required && /* @__PURE__ */ jsx12("span", { className: "text-red-500", children: "*" })
|
|
583
669
|
] }),
|
|
584
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ jsx12("div", { className: "flex", children: option.map((item, index) => /* @__PURE__ */ jsx12(
|
|
585
671
|
"button",
|
|
586
672
|
{
|
|
587
673
|
onClick: () => onClick(item.value),
|
|
@@ -599,12 +685,12 @@ function SwitchSelect({
|
|
|
599
685
|
|
|
600
686
|
// src/NavBar/MenuNavBar/MenuNavBar.tsx
|
|
601
687
|
import { useState } from "react";
|
|
602
|
-
import { jsx as
|
|
688
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
603
689
|
function MenuNavBar({ menus, onClick }) {
|
|
604
690
|
const [activePath, setActivePath] = useState("");
|
|
605
|
-
return /* @__PURE__ */
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
-
menu?.subMenus.map((subMenu) => /* @__PURE__ */
|
|
691
|
+
return /* @__PURE__ */ jsx13("div", { className: "w-full h-full p-[10px] bg-white", children: menus?.map((menu, index) => /* @__PURE__ */ jsxs7("div", { className: `p-[10px] ${index !== 0 ? "mt-[10px]" : ""}`, children: [
|
|
692
|
+
/* @__PURE__ */ jsx13("p", { className: "p-[10px] w-[202px] h-[47px] subtitle-1", children: menu.title }),
|
|
693
|
+
menu?.subMenus.map((subMenu) => /* @__PURE__ */ jsxs7(
|
|
608
694
|
"div",
|
|
609
695
|
{
|
|
610
696
|
className: `group flex justify-center items-center gap-[10px] p-[10px] w-[202px] h-[47px] rounded-[6px] subtitle-2 cursor-pointer
|
|
@@ -614,9 +700,9 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
614
700
|
setActivePath(subMenu.path);
|
|
615
701
|
},
|
|
616
702
|
children: [
|
|
617
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ jsx13("span", { className: "flex justify-center items-center w-[24px] h-[24px] text-[20px]", children: activePath === subMenu.path ? subMenu.iconActive ?? subMenu.icon : subMenu.icon }),
|
|
618
704
|
subMenu.title,
|
|
619
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ jsx13("span", { className: "flex ml-auto", children: subMenu.customNode && subMenu.customNode })
|
|
620
706
|
]
|
|
621
707
|
},
|
|
622
708
|
`sub_${subMenu.title}`
|
|
@@ -627,39 +713,39 @@ function MenuNavBar({ menus, onClick }) {
|
|
|
627
713
|
// src/NavBar/MenuNavBar/Sidebar.tsx
|
|
628
714
|
import { IconChevronLeftPipe, IconChevronRightPipe } from "@tabler/icons-react";
|
|
629
715
|
import { createContext, useContext, useState as useState2 } from "react";
|
|
630
|
-
import { jsx as
|
|
716
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
631
717
|
var SidebarContext = createContext({ expanded: false });
|
|
632
718
|
function Sidebar({ children, logo }) {
|
|
633
719
|
const [expanded, setExpanded] = useState2(true);
|
|
634
|
-
return /* @__PURE__ */
|
|
635
|
-
/* @__PURE__ */
|
|
636
|
-
expanded && logo && /* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ jsx14("aside", { className: "h-screen", children: /* @__PURE__ */ jsxs8("nav", { className: `h-full flex flex-col bg-white border-r shadow-sm duration-150 ${expanded ? "w-64" : "w-16"}`, children: [
|
|
721
|
+
/* @__PURE__ */ jsxs8("div", { className: "p-4 pb-2 flex justify-center items-center", children: [
|
|
722
|
+
expanded && logo && /* @__PURE__ */ jsx14("img", { src: logo, width: 120, className: "ml-auto" }),
|
|
723
|
+
/* @__PURE__ */ jsx14(
|
|
638
724
|
"button",
|
|
639
725
|
{
|
|
640
726
|
className: "p-1.5 rounded-lg bg-gray-50 hover:bg-gray-100 cursor-pointer ml-auto",
|
|
641
727
|
onClick: () => setExpanded((curr) => !curr),
|
|
642
|
-
children: expanded ? /* @__PURE__ */
|
|
728
|
+
children: expanded ? /* @__PURE__ */ jsx14(IconChevronLeftPipe, {}) : /* @__PURE__ */ jsx14(IconChevronRightPipe, {})
|
|
643
729
|
}
|
|
644
730
|
)
|
|
645
731
|
] }),
|
|
646
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ jsx14(SidebarContext.Provider, { value: { expanded }, children: /* @__PURE__ */ jsx14("ul", { className: "flex-1 px-3", children }) })
|
|
647
733
|
] }) });
|
|
648
734
|
}
|
|
649
735
|
|
|
650
736
|
// src/NavBar/TopNavBar/TopNavBar.tsx
|
|
651
737
|
import { IconBellRinging } from "@tabler/icons-react";
|
|
652
|
-
import { jsx as
|
|
738
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
653
739
|
function TopNavBar({ onClickNoti, logo }) {
|
|
654
|
-
return /* @__PURE__ */
|
|
655
|
-
/* @__PURE__ */
|
|
740
|
+
return /* @__PURE__ */ jsxs9("div", { className: "w-full h-full flex", children: [
|
|
741
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
|
|
656
742
|
logo,
|
|
657
|
-
/* @__PURE__ */
|
|
743
|
+
/* @__PURE__ */ jsx15("p", { className: "subtitle-1", children: "Project Management" })
|
|
658
744
|
] }),
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
|
|
746
|
+
/* @__PURE__ */ jsx15("div", { children: "Search" }),
|
|
747
|
+
/* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsx15(IconBellRinging, { onClick: onClickNoti, className: "cursor-pointer" }) }),
|
|
748
|
+
/* @__PURE__ */ jsx15("div", { className: "w-[40px] h-[40px] bg-gray-400 rounded-full cursor-pointer" })
|
|
663
749
|
] })
|
|
664
750
|
] });
|
|
665
751
|
}
|
|
@@ -671,7 +757,7 @@ import { useState as useState3 } from "react";
|
|
|
671
757
|
// src/Table/Pagination/Pagination.tsx
|
|
672
758
|
import { IconArrowLeft, IconArrowRight } from "@tabler/icons-react";
|
|
673
759
|
import { useMemo } from "react";
|
|
674
|
-
import { jsx as
|
|
760
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
675
761
|
function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
676
762
|
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
677
763
|
const getPages = useMemo(() => {
|
|
@@ -695,21 +781,21 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
695
781
|
return pages;
|
|
696
782
|
}, [totalPages, currentPage]);
|
|
697
783
|
if (totalPages <= 1) return null;
|
|
698
|
-
return /* @__PURE__ */
|
|
699
|
-
/* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-center gap-2 mt-4 body-1", children: [
|
|
785
|
+
/* @__PURE__ */ jsxs10(
|
|
700
786
|
"button",
|
|
701
787
|
{
|
|
702
788
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
703
789
|
disabled: currentPage === 1,
|
|
704
790
|
onClick: () => onPageChange(currentPage - 1),
|
|
705
791
|
children: [
|
|
706
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ jsx16(IconArrowLeft, {}),
|
|
707
793
|
"\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A"
|
|
708
794
|
]
|
|
709
795
|
}
|
|
710
796
|
),
|
|
711
797
|
getPages.map(
|
|
712
|
-
(page, i) => typeof page === "string" ? /* @__PURE__ */
|
|
798
|
+
(page, i) => typeof page === "string" ? /* @__PURE__ */ jsx16("span", { className: "px-2", children: page }, i) : /* @__PURE__ */ jsx16(
|
|
713
799
|
"button",
|
|
714
800
|
{
|
|
715
801
|
className: `w-[32px] h-[32px] rounded-[8px] px-3 py-1 cursor-pointer
|
|
@@ -720,7 +806,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
720
806
|
i
|
|
721
807
|
)
|
|
722
808
|
),
|
|
723
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ jsxs10(
|
|
724
810
|
"button",
|
|
725
811
|
{
|
|
726
812
|
className: "px-3 py-1 disabled:opacity-50 flex gap-[8px] cursor-pointer",
|
|
@@ -728,7 +814,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
728
814
|
onClick: () => onPageChange(currentPage + 1),
|
|
729
815
|
children: [
|
|
730
816
|
"\u0E16\u0E31\u0E14\u0E44\u0E1B",
|
|
731
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ jsx16(IconArrowRight, {})
|
|
732
818
|
]
|
|
733
819
|
}
|
|
734
820
|
)
|
|
@@ -736,7 +822,7 @@ function Pagination({ totalItems, itemsPerPage, currentPage, onPageChange }) {
|
|
|
736
822
|
}
|
|
737
823
|
|
|
738
824
|
// src/Table/DataTable/DataTable.tsx
|
|
739
|
-
import { Fragment, jsx as
|
|
825
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
740
826
|
function DataTable({ columns, data, onSort, isLoading }) {
|
|
741
827
|
const cols = Math.max(1, columns.length);
|
|
742
828
|
const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
|
|
@@ -748,14 +834,14 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
748
834
|
onSort();
|
|
749
835
|
}
|
|
750
836
|
};
|
|
751
|
-
return /* @__PURE__ */
|
|
752
|
-
/* @__PURE__ */
|
|
837
|
+
return /* @__PURE__ */ jsxs11("div", { className: "border rounded-md w-full h-full", children: [
|
|
838
|
+
/* @__PURE__ */ jsx17("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => {
|
|
753
839
|
const isActive = sortConfig?.key === col.accessor;
|
|
754
840
|
const direction = isActive ? sortConfig?.direction : null;
|
|
755
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-[8px] py-[8px] px-[16px] body-4 truncate", children: [
|
|
756
842
|
col.header,
|
|
757
|
-
col.sortable && /* @__PURE__ */
|
|
758
|
-
direction === null && /* @__PURE__ */
|
|
843
|
+
col.sortable && /* @__PURE__ */ jsxs11(Fragment, { children: [
|
|
844
|
+
direction === null && /* @__PURE__ */ jsx17(
|
|
759
845
|
IconSelector,
|
|
760
846
|
{
|
|
761
847
|
size: 15,
|
|
@@ -763,7 +849,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
763
849
|
onClick: () => onSorting({ key: col.accessor, direction: "asc" })
|
|
764
850
|
}
|
|
765
851
|
),
|
|
766
|
-
direction === "asc" && /* @__PURE__ */
|
|
852
|
+
direction === "asc" && /* @__PURE__ */ jsx17(
|
|
767
853
|
IconSortAscending,
|
|
768
854
|
{
|
|
769
855
|
size: 15,
|
|
@@ -771,7 +857,7 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
771
857
|
onClick: () => onSorting({ key: col.accessor, direction: "desc" })
|
|
772
858
|
}
|
|
773
859
|
),
|
|
774
|
-
direction === "desc" && /* @__PURE__ */
|
|
860
|
+
direction === "desc" && /* @__PURE__ */ jsx17(
|
|
775
861
|
IconSortDescending,
|
|
776
862
|
{
|
|
777
863
|
size: 15,
|
|
@@ -782,23 +868,23 @@ function DataTable({ columns, data, onSort, isLoading }) {
|
|
|
782
868
|
] })
|
|
783
869
|
] }, i);
|
|
784
870
|
}) }),
|
|
785
|
-
isLoading ? /* @__PURE__ */
|
|
871
|
+
isLoading ? /* @__PURE__ */ jsx17("div", { className: "flex justify-center items-center w-full h-full", children: /* @__PURE__ */ jsx17(Loader, {}) }) : /* @__PURE__ */ jsx17(Fragment, { children: data.map((row, i) => /* @__PURE__ */ jsx17(
|
|
786
872
|
"div",
|
|
787
873
|
{
|
|
788
874
|
className: `${gridClass} ${data.length - 1 !== i ? "border-b border-gray-200" : ""} items-center`,
|
|
789
875
|
style: { ["--cols"]: cols },
|
|
790
|
-
children: columns.map((col, c) => /* @__PURE__ */
|
|
876
|
+
children: columns.map((col, c) => /* @__PURE__ */ jsx17("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
|
|
791
877
|
},
|
|
792
878
|
i
|
|
793
879
|
)) }),
|
|
794
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17(Pagination, { currentPage: page, itemsPerPage: 5, totalItems: 10, onPageChange: setPage }) })
|
|
795
881
|
] });
|
|
796
882
|
}
|
|
797
883
|
|
|
798
884
|
// src/Table/DataTable/AntDataTable.tsx
|
|
799
|
-
import { ConfigProvider, Table } from "antd";
|
|
885
|
+
import { ConfigProvider as ConfigProvider4, Table } from "antd";
|
|
800
886
|
import { useState as useState4 } from "react";
|
|
801
|
-
import { Fragment as Fragment2, jsx as
|
|
887
|
+
import { Fragment as Fragment2, jsx as jsx18 } from "react/jsx-runtime";
|
|
802
888
|
function AntDataTable({
|
|
803
889
|
dataSource,
|
|
804
890
|
columns,
|
|
@@ -824,8 +910,8 @@ function AntDataTable({
|
|
|
824
910
|
onChange?.(paginationArgs, filters, sorter, extra);
|
|
825
911
|
onFilter(filters);
|
|
826
912
|
};
|
|
827
|
-
return /* @__PURE__ */
|
|
828
|
-
|
|
913
|
+
return /* @__PURE__ */ jsx18(Fragment2, { children: /* @__PURE__ */ jsx18(
|
|
914
|
+
ConfigProvider4,
|
|
829
915
|
{
|
|
830
916
|
theme: {
|
|
831
917
|
components: {},
|
|
@@ -834,7 +920,7 @@ function AntDataTable({
|
|
|
834
920
|
fontSize: 14
|
|
835
921
|
}
|
|
836
922
|
},
|
|
837
|
-
children: /* @__PURE__ */
|
|
923
|
+
children: /* @__PURE__ */ jsx18(
|
|
838
924
|
Table,
|
|
839
925
|
{
|
|
840
926
|
dataSource,
|
|
@@ -858,7 +944,7 @@ import timeGridPlugin from "@fullcalendar/timegrid";
|
|
|
858
944
|
import interactionPlugin from "@fullcalendar/interaction";
|
|
859
945
|
import thLocale from "@fullcalendar/core/locales/th";
|
|
860
946
|
import { IconChevronLeft, IconChevronRight, IconX } from "@tabler/icons-react";
|
|
861
|
-
import { Fragment as Fragment3, jsx as
|
|
947
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
862
948
|
function Calendar({ events }) {
|
|
863
949
|
const calendarRef = useRef(null);
|
|
864
950
|
const [monthTitle, setMonthTitle] = useState5("");
|
|
@@ -877,11 +963,11 @@ function Calendar({ events }) {
|
|
|
877
963
|
useEffect(() => {
|
|
878
964
|
updateTitle();
|
|
879
965
|
}, []);
|
|
880
|
-
return /* @__PURE__ */
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
884
|
-
/* @__PURE__ */
|
|
966
|
+
return /* @__PURE__ */ jsxs12("div", { className: "fc w-full h-full relative z-10", children: [
|
|
967
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex mb-[8px]", children: [
|
|
968
|
+
/* @__PURE__ */ jsx19("p", { className: "headline-5", children: monthTitle }),
|
|
969
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex gap-[10px] ml-auto", children: [
|
|
970
|
+
/* @__PURE__ */ jsx19(
|
|
885
971
|
"p",
|
|
886
972
|
{
|
|
887
973
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -892,7 +978,7 @@ function Calendar({ events }) {
|
|
|
892
978
|
children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
|
|
893
979
|
}
|
|
894
980
|
),
|
|
895
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ jsx19(
|
|
896
982
|
"p",
|
|
897
983
|
{
|
|
898
984
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -903,7 +989,7 @@ function Calendar({ events }) {
|
|
|
903
989
|
children: "Month"
|
|
904
990
|
}
|
|
905
991
|
),
|
|
906
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ jsx19(
|
|
907
993
|
"p",
|
|
908
994
|
{
|
|
909
995
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -914,7 +1000,7 @@ function Calendar({ events }) {
|
|
|
914
1000
|
children: "Week"
|
|
915
1001
|
}
|
|
916
1002
|
),
|
|
917
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ jsx19(
|
|
918
1004
|
"p",
|
|
919
1005
|
{
|
|
920
1006
|
className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
|
|
@@ -925,7 +1011,7 @@ function Calendar({ events }) {
|
|
|
925
1011
|
children: "Day"
|
|
926
1012
|
}
|
|
927
1013
|
),
|
|
928
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ jsx19(
|
|
929
1015
|
"button",
|
|
930
1016
|
{
|
|
931
1017
|
className: "cursor-pointer",
|
|
@@ -933,10 +1019,10 @@ function Calendar({ events }) {
|
|
|
933
1019
|
calendarRef.current?.getApi().prev();
|
|
934
1020
|
updateTitle();
|
|
935
1021
|
},
|
|
936
|
-
children: /* @__PURE__ */
|
|
1022
|
+
children: /* @__PURE__ */ jsx19(IconChevronLeft, {})
|
|
937
1023
|
}
|
|
938
1024
|
),
|
|
939
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ jsx19(
|
|
940
1026
|
"button",
|
|
941
1027
|
{
|
|
942
1028
|
className: "cursor-pointer",
|
|
@@ -944,12 +1030,12 @@ function Calendar({ events }) {
|
|
|
944
1030
|
calendarRef.current?.getApi().next();
|
|
945
1031
|
updateTitle();
|
|
946
1032
|
},
|
|
947
|
-
children: /* @__PURE__ */
|
|
1033
|
+
children: /* @__PURE__ */ jsx19(IconChevronRight, {})
|
|
948
1034
|
}
|
|
949
1035
|
)
|
|
950
1036
|
] })
|
|
951
1037
|
] }),
|
|
952
|
-
/* @__PURE__ */
|
|
1038
|
+
/* @__PURE__ */ jsx19("div", { className: "relative z-10", children: /* @__PURE__ */ jsx19(
|
|
953
1039
|
FullCalendar,
|
|
954
1040
|
{
|
|
955
1041
|
ref: calendarRef,
|
|
@@ -978,28 +1064,28 @@ function Calendar({ events }) {
|
|
|
978
1064
|
});
|
|
979
1065
|
},
|
|
980
1066
|
eventContent: (arg) => {
|
|
981
|
-
return /* @__PURE__ */
|
|
1067
|
+
return /* @__PURE__ */ jsx19(Fragment3, { children: /* @__PURE__ */ jsx19("div", { className: "flex items-center h-[28px] p-[4px] border-green-500 border-l-[10px] bg-red-400 rounded text-left text-white caption-1", children: arg.event.title }) });
|
|
982
1068
|
},
|
|
983
1069
|
moreLinkContent: (arg) => `+${arg.num} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23`
|
|
984
1070
|
}
|
|
985
1071
|
) }),
|
|
986
|
-
openPopup && /* @__PURE__ */
|
|
1072
|
+
openPopup && /* @__PURE__ */ jsx19("div", { className: "fixed inset-0 flex justify-center items-center bg-black/50 z-50", children: /* @__PURE__ */ jsx19(EventPopUp, { event: selectedEvent, onClose: () => setOpenPopup(false) }) })
|
|
987
1073
|
] });
|
|
988
1074
|
}
|
|
989
1075
|
function EventPopUp({ event, onClose }) {
|
|
990
|
-
return /* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */
|
|
994
|
-
/* @__PURE__ */
|
|
995
|
-
/* @__PURE__ */
|
|
1076
|
+
return /* @__PURE__ */ jsxs12("div", { className: "w-[500px] h-auto rounded-2xl bg-white relative z-50 shadow-2xl overflow-hidden", children: [
|
|
1077
|
+
/* @__PURE__ */ jsx19("button", { className: "absolute top-3 right-3 rounded-full p-1 hover:bg-gray-200 transition", onClick: onClose, children: /* @__PURE__ */ jsx19(IconX, { className: "w-6 h-6 text-gray-600" }) }),
|
|
1078
|
+
/* @__PURE__ */ jsx19("div", { className: "bg-red-400 text-left text-white px-6 py-4 headline-5", children: /* @__PURE__ */ jsx19("h2", { className: "text-lg font-semibold", children: event.title }) }),
|
|
1079
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col w-full p-6 gap-3 text-gray-700 body-3", children: [
|
|
1080
|
+
/* @__PURE__ */ jsxs12("p", { children: [
|
|
1081
|
+
/* @__PURE__ */ jsx19("span", { className: "font-medium", children: "\u0E40\u0E23\u0E34\u0E48\u0E21: " }),
|
|
996
1082
|
event?.start?.toLocaleString?.() || String(event?.start)
|
|
997
1083
|
] }),
|
|
998
|
-
/* @__PURE__ */
|
|
999
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ jsxs12("p", { children: [
|
|
1085
|
+
/* @__PURE__ */ jsx19("span", { className: "font-medium", children: "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14: " }),
|
|
1000
1086
|
event?.end?.toLocaleString?.() || String(event?.end)
|
|
1001
1087
|
] }),
|
|
1002
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ jsx19("h3", { className: "text-sm font-semibold text-gray-500 uppercase mb-2 hover:underline cursor-pointer", children: "\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21" })
|
|
1003
1089
|
] })
|
|
1004
1090
|
] });
|
|
1005
1091
|
}
|
|
@@ -1007,7 +1093,7 @@ function EventPopUp({ event, onClose }) {
|
|
|
1007
1093
|
// src/Input/TextInput/TextInput.tsx
|
|
1008
1094
|
import { IconEye, IconEyeOff } from "@tabler/icons-react";
|
|
1009
1095
|
import { useState as useState6 } from "react";
|
|
1010
|
-
import { jsx as
|
|
1096
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1011
1097
|
function TextInput({
|
|
1012
1098
|
label,
|
|
1013
1099
|
placeholder,
|
|
@@ -1024,18 +1110,18 @@ function TextInput({
|
|
|
1024
1110
|
setShowPassword(!showPassword);
|
|
1025
1111
|
};
|
|
1026
1112
|
const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
|
|
1027
|
-
return /* @__PURE__ */
|
|
1028
|
-
label && /* @__PURE__ */
|
|
1113
|
+
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
1114
|
+
label && /* @__PURE__ */ jsxs13("p", { className: "body-1 mb-[8px]", children: [
|
|
1029
1115
|
label,
|
|
1030
|
-
required && /* @__PURE__ */
|
|
1116
|
+
required && /* @__PURE__ */ jsx20("span", { className: "text-red-500", children: "\xA0*" })
|
|
1031
1117
|
] }),
|
|
1032
|
-
/* @__PURE__ */
|
|
1118
|
+
/* @__PURE__ */ jsxs13(
|
|
1033
1119
|
"div",
|
|
1034
1120
|
{
|
|
1035
1121
|
className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center
|
|
1036
1122
|
${disabled ? "bg-gray-100 text-gray-400" : error ? "border-red-500" : ""}`,
|
|
1037
1123
|
children: [
|
|
1038
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ jsx20(
|
|
1039
1125
|
"input",
|
|
1040
1126
|
{
|
|
1041
1127
|
className: `w-full h-full px-[16px] ${disabled ? "cursor-not-allowed" : ""}`,
|
|
@@ -1048,17 +1134,17 @@ function TextInput({
|
|
|
1048
1134
|
disabled
|
|
1049
1135
|
}
|
|
1050
1136
|
),
|
|
1051
|
-
type === "password" && (showPassword ? /* @__PURE__ */
|
|
1137
|
+
type === "password" && (showPassword ? /* @__PURE__ */ jsx20(IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ jsx20(IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
|
|
1052
1138
|
]
|
|
1053
1139
|
}
|
|
1054
1140
|
),
|
|
1055
|
-
error && /* @__PURE__ */
|
|
1141
|
+
error && /* @__PURE__ */ jsx20("p", { className: "text-red-500 body-1", children: error })
|
|
1056
1142
|
] });
|
|
1057
1143
|
}
|
|
1058
1144
|
|
|
1059
1145
|
// src/Input/TextArea/TextArea.tsx
|
|
1060
|
-
import { ConfigProvider as
|
|
1061
|
-
import { Fragment as Fragment4, jsx as
|
|
1146
|
+
import { ConfigProvider as ConfigProvider5, Input } from "antd";
|
|
1147
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1062
1148
|
var { TextArea } = Input;
|
|
1063
1149
|
function TextAreaInput({
|
|
1064
1150
|
label,
|
|
@@ -1073,8 +1159,8 @@ function TextAreaInput({
|
|
|
1073
1159
|
error,
|
|
1074
1160
|
disabled
|
|
1075
1161
|
}) {
|
|
1076
|
-
return /* @__PURE__ */
|
|
1077
|
-
|
|
1162
|
+
return /* @__PURE__ */ jsx21(Fragment4, { children: /* @__PURE__ */ jsx21(
|
|
1163
|
+
ConfigProvider5,
|
|
1078
1164
|
{
|
|
1079
1165
|
theme: {
|
|
1080
1166
|
components: {},
|
|
@@ -1083,13 +1169,13 @@ function TextAreaInput({
|
|
|
1083
1169
|
fontSize: 16
|
|
1084
1170
|
}
|
|
1085
1171
|
},
|
|
1086
|
-
children: /* @__PURE__ */
|
|
1087
|
-
label && /* @__PURE__ */
|
|
1172
|
+
children: /* @__PURE__ */ jsxs14("div", { children: [
|
|
1173
|
+
label && /* @__PURE__ */ jsxs14("p", { className: "body-1 mb-[8px]", children: [
|
|
1088
1174
|
label,
|
|
1089
1175
|
" ",
|
|
1090
|
-
required && /* @__PURE__ */
|
|
1176
|
+
required && /* @__PURE__ */ jsx21("span", { className: "text-red-500", children: "\xA0*" })
|
|
1091
1177
|
] }),
|
|
1092
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ jsx21(
|
|
1093
1179
|
TextArea,
|
|
1094
1180
|
{
|
|
1095
1181
|
value,
|
|
@@ -1105,15 +1191,15 @@ function TextAreaInput({
|
|
|
1105
1191
|
disabled
|
|
1106
1192
|
}
|
|
1107
1193
|
),
|
|
1108
|
-
error && /* @__PURE__ */
|
|
1194
|
+
error && /* @__PURE__ */ jsx21("p", { className: "text-red-500 body-1", children: error })
|
|
1109
1195
|
] })
|
|
1110
1196
|
}
|
|
1111
1197
|
) });
|
|
1112
1198
|
}
|
|
1113
1199
|
|
|
1114
1200
|
// src/Input/InputField/InputField.tsx
|
|
1115
|
-
import { ConfigProvider as
|
|
1116
|
-
import { jsx as
|
|
1201
|
+
import { ConfigProvider as ConfigProvider6, Input as Input2, Space } from "antd";
|
|
1202
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1117
1203
|
function InputField({
|
|
1118
1204
|
value,
|
|
1119
1205
|
onChange,
|
|
@@ -1129,23 +1215,23 @@ function InputField({
|
|
|
1129
1215
|
onClear,
|
|
1130
1216
|
statickey
|
|
1131
1217
|
}) {
|
|
1132
|
-
return /* @__PURE__ */
|
|
1133
|
-
|
|
1218
|
+
return /* @__PURE__ */ jsx22(
|
|
1219
|
+
ConfigProvider6,
|
|
1134
1220
|
{
|
|
1135
1221
|
theme: {
|
|
1136
1222
|
token: {
|
|
1137
1223
|
fontFamily: "Kanit"
|
|
1138
1224
|
}
|
|
1139
1225
|
},
|
|
1140
|
-
children: /* @__PURE__ */
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1226
|
+
children: /* @__PURE__ */ jsxs15("div", { className: "container-input", children: [
|
|
1227
|
+
/* @__PURE__ */ jsxs15("div", { children: [
|
|
1228
|
+
/* @__PURE__ */ jsx22("span", { className: "body-1", children: label }),
|
|
1143
1229
|
" ",
|
|
1144
|
-
required && /* @__PURE__ */
|
|
1230
|
+
required && /* @__PURE__ */ jsx22("span", { className: "text-red-500", children: "*" })
|
|
1145
1231
|
] }),
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
statickey && /* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ jsxs15(Space.Compact, { children: [
|
|
1233
|
+
statickey && /* @__PURE__ */ jsx22("span", { className: "items-center flex px-2 bg-gray-300 rounded-l-md body-1", children: statickey }),
|
|
1234
|
+
/* @__PURE__ */ jsx22(
|
|
1149
1235
|
Input2,
|
|
1150
1236
|
{
|
|
1151
1237
|
value,
|
|
@@ -1161,15 +1247,15 @@ function InputField({
|
|
|
1161
1247
|
}
|
|
1162
1248
|
)
|
|
1163
1249
|
] }),
|
|
1164
|
-
error && /* @__PURE__ */
|
|
1250
|
+
error && /* @__PURE__ */ jsx22("p", { className: "text-red-500 caption-1", children: error })
|
|
1165
1251
|
] })
|
|
1166
1252
|
}
|
|
1167
1253
|
);
|
|
1168
1254
|
}
|
|
1169
1255
|
|
|
1170
1256
|
// src/Input/InputFieldNumber/InputFieldNumber.tsx
|
|
1171
|
-
import { ConfigProvider as
|
|
1172
|
-
import { jsx as
|
|
1257
|
+
import { ConfigProvider as ConfigProvider7, InputNumber } from "antd";
|
|
1258
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1173
1259
|
function InputFieldNumber({
|
|
1174
1260
|
value,
|
|
1175
1261
|
onChange,
|
|
@@ -1190,21 +1276,21 @@ function InputFieldNumber({
|
|
|
1190
1276
|
formatter,
|
|
1191
1277
|
parser
|
|
1192
1278
|
}) {
|
|
1193
|
-
return /* @__PURE__ */
|
|
1194
|
-
|
|
1279
|
+
return /* @__PURE__ */ jsx23(
|
|
1280
|
+
ConfigProvider7,
|
|
1195
1281
|
{
|
|
1196
1282
|
theme: {
|
|
1197
1283
|
token: {
|
|
1198
1284
|
fontFamily: "Kanit"
|
|
1199
1285
|
}
|
|
1200
1286
|
},
|
|
1201
|
-
children: /* @__PURE__ */
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
/* @__PURE__ */
|
|
1287
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "container-input", children: [
|
|
1288
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1289
|
+
/* @__PURE__ */ jsx23("span", { className: "body-1", children: label }),
|
|
1204
1290
|
" ",
|
|
1205
|
-
required && /* @__PURE__ */
|
|
1291
|
+
required && /* @__PURE__ */ jsx23("span", { className: "text-red-500", children: "*" })
|
|
1206
1292
|
] }),
|
|
1207
|
-
/* @__PURE__ */
|
|
1293
|
+
/* @__PURE__ */ jsx23(
|
|
1208
1294
|
InputNumber,
|
|
1209
1295
|
{
|
|
1210
1296
|
value: value ?? void 0,
|
|
@@ -1220,11 +1306,20 @@ function InputFieldNumber({
|
|
|
1220
1306
|
controls,
|
|
1221
1307
|
size,
|
|
1222
1308
|
changeOnWheel,
|
|
1223
|
-
formatter
|
|
1224
|
-
|
|
1309
|
+
formatter: formatter ?? ((value2) => {
|
|
1310
|
+
if (value2 === void 0 || value2 === null || value2 === "")
|
|
1311
|
+
return "";
|
|
1312
|
+
const num = Number(value2);
|
|
1313
|
+
if (isNaN(num)) return "";
|
|
1314
|
+
return num.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1315
|
+
}),
|
|
1316
|
+
parser: parser ?? ((value2) => {
|
|
1317
|
+
if (!value2) return "";
|
|
1318
|
+
return value2.replace(/,/g, "");
|
|
1319
|
+
})
|
|
1225
1320
|
}
|
|
1226
1321
|
),
|
|
1227
|
-
error && /* @__PURE__ */
|
|
1322
|
+
error && /* @__PURE__ */ jsx23("p", { className: "text-red-500 caption-1", children: error })
|
|
1228
1323
|
] })
|
|
1229
1324
|
}
|
|
1230
1325
|
);
|
|
@@ -1237,7 +1332,7 @@ var import_buddhistEra = __toESM(require_buddhistEra());
|
|
|
1237
1332
|
import { useState as useState7, useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
1238
1333
|
import { format } from "date-fns";
|
|
1239
1334
|
import { th as thFns } from "date-fns/locale";
|
|
1240
|
-
import { jsx as
|
|
1335
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1241
1336
|
import_dayjs.default.extend(import_buddhistEra.default);
|
|
1242
1337
|
import_dayjs.default.locale("th");
|
|
1243
1338
|
function DatePickerBasic({
|
|
@@ -1301,27 +1396,27 @@ function DatePickerBasic({
|
|
|
1301
1396
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1302
1397
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1303
1398
|
}, []);
|
|
1304
|
-
return /* @__PURE__ */
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
/* @__PURE__ */
|
|
1307
|
-
required && /* @__PURE__ */
|
|
1399
|
+
return /* @__PURE__ */ jsxs17("div", { ref: wrapperRef, style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
|
|
1400
|
+
/* @__PURE__ */ jsxs17("div", { className: "mb-1", children: [
|
|
1401
|
+
/* @__PURE__ */ jsx24("span", { className: "body-1", children: label }),
|
|
1402
|
+
required && /* @__PURE__ */ jsx24("span", { className: "text-red-500 ml-1", children: "*" })
|
|
1308
1403
|
] }),
|
|
1309
|
-
/* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ jsx24(
|
|
1310
1405
|
"div",
|
|
1311
1406
|
{
|
|
1312
1407
|
className: `border rounded px-3 py-2 cursor-pointer bg-white flex items-center ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${error ? "border-red-500" : "border-gray-300"}`,
|
|
1313
1408
|
onClick: () => !disabled && setOpen(!open),
|
|
1314
|
-
children: /* @__PURE__ */
|
|
1409
|
+
children: /* @__PURE__ */ jsx24("div", { className: "flex-1", children: value ? formatThaiBE(value) : /* @__PURE__ */ jsx24("span", { className: "text-gray-400", children: placeholder }) })
|
|
1315
1410
|
}
|
|
1316
1411
|
),
|
|
1317
|
-
open && /* @__PURE__ */
|
|
1412
|
+
open && /* @__PURE__ */ jsxs17(
|
|
1318
1413
|
"div",
|
|
1319
1414
|
{
|
|
1320
1415
|
className: "absolute z-50 mt-2 w-80 p-4 bg-white shadow-xl rounded-lg border animate-fade-in",
|
|
1321
1416
|
style: { fontFamily: "Kanit", fontSize: 16 },
|
|
1322
1417
|
children: [
|
|
1323
|
-
/* @__PURE__ */
|
|
1324
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex justify-between items-center mb-3", children: [
|
|
1419
|
+
/* @__PURE__ */ jsx24(
|
|
1325
1420
|
"button",
|
|
1326
1421
|
{
|
|
1327
1422
|
onClick: () => setCalendar(calendar.subtract(1, "month")),
|
|
@@ -1329,16 +1424,16 @@ function DatePickerBasic({
|
|
|
1329
1424
|
children: "\u25C0"
|
|
1330
1425
|
}
|
|
1331
1426
|
),
|
|
1332
|
-
/* @__PURE__ */
|
|
1427
|
+
/* @__PURE__ */ jsxs17("div", { className: "font-semibold text-lg text-gray-700", children: [
|
|
1333
1428
|
monthNames[calendar.month()],
|
|
1334
1429
|
" ",
|
|
1335
1430
|
calendar.year() + 543
|
|
1336
1431
|
] }),
|
|
1337
|
-
/* @__PURE__ */
|
|
1432
|
+
/* @__PURE__ */ jsx24("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2 hover:bg-gray-100 rounded", children: "\u25B6" })
|
|
1338
1433
|
] }),
|
|
1339
|
-
/* @__PURE__ */
|
|
1340
|
-
/* @__PURE__ */
|
|
1341
|
-
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */
|
|
1434
|
+
/* @__PURE__ */ jsx24("div", { className: "grid grid-cols-7 text-center text-gray-500 text-sm mb-2 font-medium", children: ["\u0E2D\u0E32", "\u0E08", "\u0E2D", "\u0E1E", "\u0E1E\u0E24", "\u0E28", "\u0E2A"].map((d) => /* @__PURE__ */ jsx24("div", { children: d }, d)) }),
|
|
1435
|
+
/* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-7 gap-1 text-center", children: [
|
|
1436
|
+
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ jsx24("div", {}, `empty-${i}`)),
|
|
1342
1437
|
Array.from({ length: daysInMonth }, (_, i) => i + 1).map((d) => {
|
|
1343
1438
|
const dateObj = calendar.date(d);
|
|
1344
1439
|
const isDisable = isDisabled(dateObj);
|
|
@@ -1356,7 +1451,7 @@ function DatePickerBasic({
|
|
|
1356
1451
|
bgClass = "border border-blue-500 font-bold";
|
|
1357
1452
|
textClass = "text-blue-600";
|
|
1358
1453
|
}
|
|
1359
|
-
return /* @__PURE__ */
|
|
1454
|
+
return /* @__PURE__ */ jsx24(
|
|
1360
1455
|
"div",
|
|
1361
1456
|
{
|
|
1362
1457
|
onClick: () => !isDisable && handleSelect(d),
|
|
@@ -1374,7 +1469,7 @@ function DatePickerBasic({
|
|
|
1374
1469
|
]
|
|
1375
1470
|
}
|
|
1376
1471
|
),
|
|
1377
|
-
error && /* @__PURE__ */
|
|
1472
|
+
error && /* @__PURE__ */ jsx24("p", { className: "text-red-500 text-xs mt-1", children: error })
|
|
1378
1473
|
] });
|
|
1379
1474
|
}
|
|
1380
1475
|
|
|
@@ -1385,7 +1480,7 @@ var import_buddhistEra2 = __toESM(require_buddhistEra());
|
|
|
1385
1480
|
import { useState as useState8, useRef as useRef3, useEffect as useEffect3 } from "react";
|
|
1386
1481
|
import { format as format2 } from "date-fns";
|
|
1387
1482
|
import { th as thFns2 } from "date-fns/locale";
|
|
1388
|
-
import { jsx as
|
|
1483
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1389
1484
|
import_dayjs2.default.extend(import_buddhistEra2.default);
|
|
1390
1485
|
import_dayjs2.default.locale("th");
|
|
1391
1486
|
function DatePickerRange({
|
|
@@ -1459,7 +1554,7 @@ function DatePickerRange({
|
|
|
1459
1554
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1460
1555
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1461
1556
|
}, []);
|
|
1462
|
-
const ArrowIcon = () => /* @__PURE__ */
|
|
1557
|
+
const ArrowIcon = () => /* @__PURE__ */ jsx25("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-4 h-4 text-gray-400", children: /* @__PURE__ */ jsx25(
|
|
1463
1558
|
"path",
|
|
1464
1559
|
{
|
|
1465
1560
|
fillRule: "evenodd",
|
|
@@ -1467,31 +1562,31 @@ function DatePickerRange({
|
|
|
1467
1562
|
clipRule: "evenodd"
|
|
1468
1563
|
}
|
|
1469
1564
|
) });
|
|
1470
|
-
return /* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
/* @__PURE__ */
|
|
1473
|
-
required && /* @__PURE__ */
|
|
1565
|
+
return /* @__PURE__ */ jsxs18("div", { ref: wrapperRef, style: { fontFamily: "Kanit", fontSize: 16 }, className: "relative w-full", children: [
|
|
1566
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-1", children: [
|
|
1567
|
+
/* @__PURE__ */ jsx25("span", { className: "body-1", children: label }),
|
|
1568
|
+
required && /* @__PURE__ */ jsx25("span", { className: "text-red-500 ml-1", children: "*" })
|
|
1474
1569
|
] }),
|
|
1475
|
-
/* @__PURE__ */
|
|
1570
|
+
/* @__PURE__ */ jsxs18(
|
|
1476
1571
|
"div",
|
|
1477
1572
|
{
|
|
1478
1573
|
className: `border rounded px-3 py-2 cursor-pointer bg-white flex items-center justify-between gap-2 ${disabled ? "opacity-50 cursor-not-allowed" : ""} ${error ? "border-red-500" : "border-gray-300"}`,
|
|
1479
1574
|
onClick: () => !disabled && setOpen(!open),
|
|
1480
1575
|
children: [
|
|
1481
|
-
/* @__PURE__ */
|
|
1482
|
-
/* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */
|
|
1576
|
+
/* @__PURE__ */ jsx25("div", { className: `flex-1 ${!startDate ? "text-gray-400 font-light" : "text-gray-800"}`, children: startDate ? formatThaiBE(startDate) : "\u0E27\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19" }),
|
|
1577
|
+
/* @__PURE__ */ jsx25("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx25(ArrowIcon, {}) }),
|
|
1578
|
+
/* @__PURE__ */ jsx25("div", { className: `flex-1 text-right ${!endDate ? "text-gray-400 font-light" : "text-gray-800"}`, children: endDate ? formatThaiBE(endDate) : "\u0E27\u0E31\u0E19\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14" })
|
|
1484
1579
|
]
|
|
1485
1580
|
}
|
|
1486
1581
|
),
|
|
1487
|
-
open && /* @__PURE__ */
|
|
1582
|
+
open && /* @__PURE__ */ jsxs18(
|
|
1488
1583
|
"div",
|
|
1489
1584
|
{
|
|
1490
1585
|
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",
|
|
1491
1586
|
style: { fontFamily: "Kanit", fontSize: 16 },
|
|
1492
1587
|
children: [
|
|
1493
|
-
/* @__PURE__ */
|
|
1494
|
-
/* @__PURE__ */
|
|
1588
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex justify-between items-center mb-3", children: [
|
|
1589
|
+
/* @__PURE__ */ jsx25(
|
|
1495
1590
|
"button",
|
|
1496
1591
|
{
|
|
1497
1592
|
onClick: () => setCalendar(calendar.subtract(1, "month")),
|
|
@@ -1499,16 +1594,16 @@ function DatePickerRange({
|
|
|
1499
1594
|
children: "\u25C0"
|
|
1500
1595
|
}
|
|
1501
1596
|
),
|
|
1502
|
-
/* @__PURE__ */
|
|
1597
|
+
/* @__PURE__ */ jsxs18("div", { className: "font-semibold text-lg text-gray-700", children: [
|
|
1503
1598
|
monthNames[calendar.month()],
|
|
1504
1599
|
" ",
|
|
1505
1600
|
calendar.year() + 543
|
|
1506
1601
|
] }),
|
|
1507
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ jsx25("button", { onClick: () => setCalendar(calendar.add(1, "month")), className: "px-2 hover:bg-gray-100 rounded", children: "\u25B6" })
|
|
1508
1603
|
] }),
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1511
|
-
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */
|
|
1604
|
+
/* @__PURE__ */ jsx25("div", { className: "grid grid-cols-7 text-center text-gray-500 text-sm mb-2 font-medium", children: ["\u0E2D\u0E32", "\u0E08", "\u0E2D", "\u0E1E", "\u0E1E\u0E24", "\u0E28", "\u0E2A"].map((d) => /* @__PURE__ */ jsx25("div", { children: d }, d)) }),
|
|
1605
|
+
/* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-7 gap-y-1 text-center", children: [
|
|
1606
|
+
Array(firstDayOfMonth).fill(null).map((_, i) => /* @__PURE__ */ jsx25("div", {}, `empty-${i}`)),
|
|
1512
1607
|
Array.from({ length: daysInMonth }, (_, i) => i + 1).map((d) => {
|
|
1513
1608
|
const currentObj = calendar.date(d);
|
|
1514
1609
|
const isDisable = isDisabled(currentObj);
|
|
@@ -1531,7 +1626,7 @@ function DatePickerRange({
|
|
|
1531
1626
|
bgClass = "border border-blue-500 font-bold";
|
|
1532
1627
|
textClass = "text-blue-600";
|
|
1533
1628
|
}
|
|
1534
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ jsx25(
|
|
1535
1630
|
"div",
|
|
1536
1631
|
{
|
|
1537
1632
|
onClick: () => !isDisable && handleSelect(d),
|
|
@@ -1549,13 +1644,13 @@ function DatePickerRange({
|
|
|
1549
1644
|
]
|
|
1550
1645
|
}
|
|
1551
1646
|
),
|
|
1552
|
-
error && /* @__PURE__ */
|
|
1647
|
+
error && /* @__PURE__ */ jsx25("p", { className: "text-red-500 text-xs mt-1", children: error })
|
|
1553
1648
|
] });
|
|
1554
1649
|
}
|
|
1555
1650
|
|
|
1556
1651
|
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1557
|
-
import { ConfigProvider as
|
|
1558
|
-
import { jsx as
|
|
1652
|
+
import { ConfigProvider as ConfigProvider8, ColorPicker } from "antd";
|
|
1653
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1559
1654
|
function ColorPickerBasic({
|
|
1560
1655
|
value,
|
|
1561
1656
|
onChange,
|
|
@@ -1568,8 +1663,8 @@ function ColorPickerBasic({
|
|
|
1568
1663
|
className,
|
|
1569
1664
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1570
1665
|
}) {
|
|
1571
|
-
return /* @__PURE__ */
|
|
1572
|
-
|
|
1666
|
+
return /* @__PURE__ */ jsx26(
|
|
1667
|
+
ConfigProvider8,
|
|
1573
1668
|
{
|
|
1574
1669
|
theme: {
|
|
1575
1670
|
token: {
|
|
@@ -1577,13 +1672,13 @@ function ColorPickerBasic({
|
|
|
1577
1672
|
fontSize: 16
|
|
1578
1673
|
}
|
|
1579
1674
|
},
|
|
1580
|
-
children: /* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
1582
|
-
/* @__PURE__ */
|
|
1675
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
1676
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1677
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: label }),
|
|
1583
1678
|
" ",
|
|
1584
|
-
required && /* @__PURE__ */
|
|
1679
|
+
required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
1585
1680
|
] }),
|
|
1586
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ jsx26(
|
|
1587
1682
|
ColorPicker,
|
|
1588
1683
|
{
|
|
1589
1684
|
defaultFormat,
|
|
@@ -1595,9 +1690,9 @@ function ColorPickerBasic({
|
|
|
1595
1690
|
showText: (color) => {
|
|
1596
1691
|
const hex = color.toHexString();
|
|
1597
1692
|
if (!value) {
|
|
1598
|
-
return /* @__PURE__ */
|
|
1693
|
+
return /* @__PURE__ */ jsx26("span", { children: placeholder });
|
|
1599
1694
|
}
|
|
1600
|
-
return /* @__PURE__ */
|
|
1695
|
+
return /* @__PURE__ */ jsxs19("span", { children: [
|
|
1601
1696
|
"(",
|
|
1602
1697
|
hex,
|
|
1603
1698
|
")"
|
|
@@ -1606,14 +1701,14 @@ function ColorPickerBasic({
|
|
|
1606
1701
|
disabled
|
|
1607
1702
|
}
|
|
1608
1703
|
),
|
|
1609
|
-
error && /* @__PURE__ */
|
|
1704
|
+
error && /* @__PURE__ */ jsx26("p", { className: "text-red-500 caption-1", children: error })
|
|
1610
1705
|
] })
|
|
1611
1706
|
}
|
|
1612
1707
|
);
|
|
1613
1708
|
}
|
|
1614
1709
|
|
|
1615
1710
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1616
|
-
import { ConfigProvider as
|
|
1711
|
+
import { ConfigProvider as ConfigProvider9, ColorPicker as ColorPicker2, theme } from "antd";
|
|
1617
1712
|
|
|
1618
1713
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1619
1714
|
function _typeof(o) {
|
|
@@ -2315,7 +2410,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2315
2410
|
greyDark.primary = greyDark[5];
|
|
2316
2411
|
|
|
2317
2412
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2318
|
-
import { jsx as
|
|
2413
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2319
2414
|
function genPresets(presets = presetPalettes) {
|
|
2320
2415
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2321
2416
|
label,
|
|
@@ -2342,8 +2437,8 @@ function ColorPalettePickerBasic({
|
|
|
2342
2437
|
red,
|
|
2343
2438
|
green
|
|
2344
2439
|
});
|
|
2345
|
-
return /* @__PURE__ */
|
|
2346
|
-
|
|
2440
|
+
return /* @__PURE__ */ jsx27(
|
|
2441
|
+
ConfigProvider9,
|
|
2347
2442
|
{
|
|
2348
2443
|
theme: {
|
|
2349
2444
|
token: {
|
|
@@ -2351,13 +2446,13 @@ function ColorPalettePickerBasic({
|
|
|
2351
2446
|
fontSize: 16
|
|
2352
2447
|
}
|
|
2353
2448
|
},
|
|
2354
|
-
children: /* @__PURE__ */
|
|
2355
|
-
/* @__PURE__ */
|
|
2356
|
-
/* @__PURE__ */
|
|
2449
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
2450
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
2451
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: label }),
|
|
2357
2452
|
" ",
|
|
2358
|
-
required && /* @__PURE__ */
|
|
2453
|
+
required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
2359
2454
|
] }),
|
|
2360
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ jsx27(
|
|
2361
2456
|
ColorPicker2,
|
|
2362
2457
|
{
|
|
2363
2458
|
defaultFormat,
|
|
@@ -2370,9 +2465,9 @@ function ColorPalettePickerBasic({
|
|
|
2370
2465
|
showText: (color) => {
|
|
2371
2466
|
const hex = color.toHexString();
|
|
2372
2467
|
if (!value) {
|
|
2373
|
-
return /* @__PURE__ */
|
|
2468
|
+
return /* @__PURE__ */ jsx27("span", { children: placeholder });
|
|
2374
2469
|
}
|
|
2375
|
-
return /* @__PURE__ */
|
|
2470
|
+
return /* @__PURE__ */ jsxs20("span", { children: [
|
|
2376
2471
|
"(",
|
|
2377
2472
|
hex,
|
|
2378
2473
|
")"
|
|
@@ -2382,15 +2477,15 @@ function ColorPalettePickerBasic({
|
|
|
2382
2477
|
onClear
|
|
2383
2478
|
}
|
|
2384
2479
|
),
|
|
2385
|
-
error && /* @__PURE__ */
|
|
2480
|
+
error && /* @__PURE__ */ jsx27("p", { className: "text-red-500 caption-1", children: error })
|
|
2386
2481
|
] })
|
|
2387
2482
|
}
|
|
2388
2483
|
);
|
|
2389
2484
|
}
|
|
2390
2485
|
|
|
2391
2486
|
// src/Select/SelectField/SelectField.tsx
|
|
2392
|
-
import { Select, ConfigProvider as
|
|
2393
|
-
import { jsx as
|
|
2487
|
+
import { Select, ConfigProvider as ConfigProvider10 } from "antd";
|
|
2488
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2394
2489
|
function SelectField({
|
|
2395
2490
|
value,
|
|
2396
2491
|
onChange,
|
|
@@ -2406,10 +2501,12 @@ function SelectField({
|
|
|
2406
2501
|
prefixSize = 20,
|
|
2407
2502
|
handleSearch,
|
|
2408
2503
|
className,
|
|
2409
|
-
onClear
|
|
2504
|
+
onClear,
|
|
2505
|
+
size = "middle",
|
|
2506
|
+
allowClear = true
|
|
2410
2507
|
}) {
|
|
2411
|
-
return /* @__PURE__ */
|
|
2412
|
-
|
|
2508
|
+
return /* @__PURE__ */ jsx28(
|
|
2509
|
+
ConfigProvider10,
|
|
2413
2510
|
{
|
|
2414
2511
|
theme: {
|
|
2415
2512
|
token: {
|
|
@@ -2417,15 +2514,16 @@ function SelectField({
|
|
|
2417
2514
|
fontSize: 16
|
|
2418
2515
|
}
|
|
2419
2516
|
},
|
|
2420
|
-
children: /* @__PURE__ */
|
|
2421
|
-
/* @__PURE__ */
|
|
2422
|
-
/* @__PURE__ */
|
|
2517
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
2518
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
2519
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: label }),
|
|
2423
2520
|
" ",
|
|
2424
|
-
required && /* @__PURE__ */
|
|
2521
|
+
required && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
2425
2522
|
] }),
|
|
2426
|
-
/* @__PURE__ */
|
|
2523
|
+
/* @__PURE__ */ jsx28(
|
|
2427
2524
|
Select,
|
|
2428
2525
|
{
|
|
2526
|
+
size,
|
|
2429
2527
|
showSearch: true,
|
|
2430
2528
|
value: value ? value : void 0,
|
|
2431
2529
|
defaultValue,
|
|
@@ -2438,7 +2536,7 @@ function SelectField({
|
|
|
2438
2536
|
options,
|
|
2439
2537
|
mode,
|
|
2440
2538
|
onSearch: handleSearch,
|
|
2441
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2539
|
+
prefix: prefix ? /* @__PURE__ */ jsx28(
|
|
2442
2540
|
"span",
|
|
2443
2541
|
{
|
|
2444
2542
|
style: {
|
|
@@ -2451,19 +2549,19 @@ function SelectField({
|
|
|
2451
2549
|
children: prefix
|
|
2452
2550
|
}
|
|
2453
2551
|
) : void 0,
|
|
2454
|
-
allowClear
|
|
2552
|
+
allowClear,
|
|
2455
2553
|
onClear
|
|
2456
2554
|
}
|
|
2457
2555
|
),
|
|
2458
|
-
error && /* @__PURE__ */
|
|
2556
|
+
error && /* @__PURE__ */ jsx28("p", { className: "text-red-500 caption-1", children: error })
|
|
2459
2557
|
] })
|
|
2460
2558
|
}
|
|
2461
2559
|
);
|
|
2462
2560
|
}
|
|
2463
2561
|
|
|
2464
2562
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2465
|
-
import { Select as Select2, ConfigProvider as
|
|
2466
|
-
import { jsx as
|
|
2563
|
+
import { Select as Select2, ConfigProvider as ConfigProvider11 } from "antd";
|
|
2564
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2467
2565
|
function SelectFieldGroup({
|
|
2468
2566
|
value,
|
|
2469
2567
|
onChange,
|
|
@@ -2478,25 +2576,28 @@ function SelectFieldGroup({
|
|
|
2478
2576
|
prefix,
|
|
2479
2577
|
prefixSize = 20,
|
|
2480
2578
|
handleSearch,
|
|
2481
|
-
className
|
|
2579
|
+
className,
|
|
2580
|
+
size = "middle",
|
|
2581
|
+
allowClear = true
|
|
2482
2582
|
}) {
|
|
2483
|
-
return /* @__PURE__ */
|
|
2484
|
-
|
|
2583
|
+
return /* @__PURE__ */ jsx29(
|
|
2584
|
+
ConfigProvider11,
|
|
2485
2585
|
{
|
|
2486
2586
|
theme: {
|
|
2487
2587
|
token: {
|
|
2488
2588
|
fontFamily: "Kanit"
|
|
2489
2589
|
}
|
|
2490
2590
|
},
|
|
2491
|
-
children: /* @__PURE__ */
|
|
2492
|
-
/* @__PURE__ */
|
|
2493
|
-
/* @__PURE__ */
|
|
2591
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
2592
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
2593
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: label }),
|
|
2494
2594
|
" ",
|
|
2495
|
-
required && /* @__PURE__ */
|
|
2595
|
+
required && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
2496
2596
|
] }),
|
|
2497
|
-
/* @__PURE__ */
|
|
2597
|
+
/* @__PURE__ */ jsx29(
|
|
2498
2598
|
Select2,
|
|
2499
2599
|
{
|
|
2600
|
+
size,
|
|
2500
2601
|
showSearch: true,
|
|
2501
2602
|
value: value ? value : void 0,
|
|
2502
2603
|
defaultValue,
|
|
@@ -2509,7 +2610,7 @@ function SelectFieldGroup({
|
|
|
2509
2610
|
options,
|
|
2510
2611
|
mode,
|
|
2511
2612
|
onSearch: handleSearch,
|
|
2512
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2613
|
+
prefix: prefix ? /* @__PURE__ */ jsx29(
|
|
2513
2614
|
"span",
|
|
2514
2615
|
{
|
|
2515
2616
|
style: {
|
|
@@ -2522,19 +2623,19 @@ function SelectFieldGroup({
|
|
|
2522
2623
|
children: prefix
|
|
2523
2624
|
}
|
|
2524
2625
|
) : void 0,
|
|
2525
|
-
allowClear
|
|
2626
|
+
allowClear
|
|
2526
2627
|
}
|
|
2527
2628
|
),
|
|
2528
|
-
error && /* @__PURE__ */
|
|
2629
|
+
error && /* @__PURE__ */ jsx29("p", { className: "text-red-500 caption-1", children: error })
|
|
2529
2630
|
] })
|
|
2530
2631
|
}
|
|
2531
2632
|
);
|
|
2532
2633
|
}
|
|
2533
2634
|
|
|
2534
2635
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2535
|
-
import { Select as Select3, ConfigProvider as
|
|
2636
|
+
import { Select as Select3, ConfigProvider as ConfigProvider12 } from "antd";
|
|
2536
2637
|
import { DownOutlined } from "@ant-design/icons";
|
|
2537
|
-
import { jsx as
|
|
2638
|
+
import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2538
2639
|
function SelectFieldStatus({
|
|
2539
2640
|
value,
|
|
2540
2641
|
onChange,
|
|
@@ -2544,11 +2645,13 @@ function SelectFieldStatus({
|
|
|
2544
2645
|
disabled,
|
|
2545
2646
|
error,
|
|
2546
2647
|
options,
|
|
2547
|
-
className
|
|
2648
|
+
className,
|
|
2649
|
+
size = "middle",
|
|
2650
|
+
allowClear = false
|
|
2548
2651
|
}) {
|
|
2549
2652
|
const selectedItem = options?.find((s) => s.value === value);
|
|
2550
|
-
return /* @__PURE__ */
|
|
2551
|
-
|
|
2653
|
+
return /* @__PURE__ */ jsx30(
|
|
2654
|
+
ConfigProvider12,
|
|
2552
2655
|
{
|
|
2553
2656
|
theme: {
|
|
2554
2657
|
components: {
|
|
@@ -2563,17 +2666,18 @@ function SelectFieldStatus({
|
|
|
2563
2666
|
fontFamily: "Kanit"
|
|
2564
2667
|
}
|
|
2565
2668
|
},
|
|
2566
|
-
children: /* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2568
|
-
/* @__PURE__ */
|
|
2669
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
2670
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
2671
|
+
/* @__PURE__ */ jsx30("span", { className: "body-1", children: label }),
|
|
2569
2672
|
" ",
|
|
2570
|
-
required && /* @__PURE__ */
|
|
2673
|
+
required && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
|
|
2571
2674
|
] }),
|
|
2572
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ jsx30(
|
|
2573
2676
|
Select3,
|
|
2574
2677
|
{
|
|
2678
|
+
size,
|
|
2575
2679
|
disabled,
|
|
2576
|
-
suffixIcon: /* @__PURE__ */
|
|
2680
|
+
suffixIcon: /* @__PURE__ */ jsx30(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2577
2681
|
value: value ? value : void 0,
|
|
2578
2682
|
onChange,
|
|
2579
2683
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""} `,
|
|
@@ -2581,17 +2685,18 @@ function SelectFieldStatus({
|
|
|
2581
2685
|
optionFilterProp: "label",
|
|
2582
2686
|
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
2583
2687
|
options,
|
|
2584
|
-
showSearch: true
|
|
2688
|
+
showSearch: true,
|
|
2689
|
+
allowClear
|
|
2585
2690
|
}
|
|
2586
2691
|
),
|
|
2587
|
-
error && /* @__PURE__ */
|
|
2692
|
+
error && /* @__PURE__ */ jsx30("p", { className: "text-red-500 caption-1", children: error })
|
|
2588
2693
|
] })
|
|
2589
2694
|
}
|
|
2590
2695
|
);
|
|
2591
2696
|
}
|
|
2592
2697
|
|
|
2593
2698
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2594
|
-
import { Select as Select4, ConfigProvider as
|
|
2699
|
+
import { Select as Select4, ConfigProvider as ConfigProvider13 } from "antd";
|
|
2595
2700
|
|
|
2596
2701
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2597
2702
|
var status = [
|
|
@@ -2601,7 +2706,7 @@ var status = [
|
|
|
2601
2706
|
|
|
2602
2707
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2603
2708
|
import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
|
|
2604
|
-
import { jsx as
|
|
2709
|
+
import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2605
2710
|
function SelectFieldStatusReport({
|
|
2606
2711
|
value,
|
|
2607
2712
|
onChange,
|
|
@@ -2611,11 +2716,13 @@ function SelectFieldStatusReport({
|
|
|
2611
2716
|
disabled,
|
|
2612
2717
|
error,
|
|
2613
2718
|
className,
|
|
2614
|
-
options
|
|
2719
|
+
options,
|
|
2720
|
+
size = "middle",
|
|
2721
|
+
allowClear = false
|
|
2615
2722
|
}) {
|
|
2616
2723
|
const selectedItem = status.find((s) => s.value === value);
|
|
2617
|
-
return /* @__PURE__ */
|
|
2618
|
-
|
|
2724
|
+
return /* @__PURE__ */ jsx31(
|
|
2725
|
+
ConfigProvider13,
|
|
2619
2726
|
{
|
|
2620
2727
|
theme: {
|
|
2621
2728
|
components: {
|
|
@@ -2630,17 +2737,18 @@ function SelectFieldStatusReport({
|
|
|
2630
2737
|
fontFamily: "Kanit"
|
|
2631
2738
|
}
|
|
2632
2739
|
},
|
|
2633
|
-
children: /* @__PURE__ */
|
|
2634
|
-
/* @__PURE__ */
|
|
2635
|
-
/* @__PURE__ */
|
|
2740
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
2741
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
2742
|
+
/* @__PURE__ */ jsx31("span", { className: "body-1", children: label }),
|
|
2636
2743
|
" ",
|
|
2637
|
-
required && /* @__PURE__ */
|
|
2744
|
+
required && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
|
|
2638
2745
|
] }),
|
|
2639
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsx31(
|
|
2640
2747
|
Select4,
|
|
2641
2748
|
{
|
|
2749
|
+
size,
|
|
2642
2750
|
disabled,
|
|
2643
|
-
suffixIcon: /* @__PURE__ */
|
|
2751
|
+
suffixIcon: /* @__PURE__ */ jsx31(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2644
2752
|
value: value ? value : void 0,
|
|
2645
2753
|
onChange,
|
|
2646
2754
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2648,19 +2756,20 @@ function SelectFieldStatusReport({
|
|
|
2648
2756
|
optionFilterProp: "label",
|
|
2649
2757
|
filterOption: (input, option) => (option?.label ?? "").toString().toLowerCase().includes(input.toLowerCase()),
|
|
2650
2758
|
options,
|
|
2651
|
-
showSearch: true
|
|
2759
|
+
showSearch: true,
|
|
2760
|
+
allowClear
|
|
2652
2761
|
}
|
|
2653
2762
|
),
|
|
2654
|
-
error && /* @__PURE__ */
|
|
2763
|
+
error && /* @__PURE__ */ jsx31("p", { className: "text-red-500 caption-1", children: error })
|
|
2655
2764
|
] })
|
|
2656
2765
|
}
|
|
2657
2766
|
);
|
|
2658
2767
|
}
|
|
2659
2768
|
|
|
2660
2769
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2661
|
-
import { Select as Select5, ConfigProvider as
|
|
2770
|
+
import { Select as Select5, ConfigProvider as ConfigProvider14 } from "antd";
|
|
2662
2771
|
import { useState as useState9 } from "react";
|
|
2663
|
-
import { jsx as
|
|
2772
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2664
2773
|
function SelectFieldTag({
|
|
2665
2774
|
label,
|
|
2666
2775
|
required,
|
|
@@ -2670,7 +2779,9 @@ function SelectFieldTag({
|
|
|
2670
2779
|
value: controlledValue,
|
|
2671
2780
|
className,
|
|
2672
2781
|
onChange,
|
|
2673
|
-
onClear
|
|
2782
|
+
onClear,
|
|
2783
|
+
size = "middle",
|
|
2784
|
+
allowClear = true
|
|
2674
2785
|
}) {
|
|
2675
2786
|
const [internalValue, setInternalValue] = useState9([]);
|
|
2676
2787
|
const isControlled = controlledValue !== void 0;
|
|
@@ -2693,23 +2804,24 @@ function SelectFieldTag({
|
|
|
2693
2804
|
}
|
|
2694
2805
|
onChange?.([]);
|
|
2695
2806
|
};
|
|
2696
|
-
return /* @__PURE__ */
|
|
2697
|
-
|
|
2807
|
+
return /* @__PURE__ */ jsx32(
|
|
2808
|
+
ConfigProvider14,
|
|
2698
2809
|
{
|
|
2699
2810
|
theme: {
|
|
2700
2811
|
token: {
|
|
2701
2812
|
fontFamily: "Kanit"
|
|
2702
2813
|
}
|
|
2703
2814
|
},
|
|
2704
|
-
children: /* @__PURE__ */
|
|
2705
|
-
/* @__PURE__ */
|
|
2706
|
-
/* @__PURE__ */
|
|
2815
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
2816
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2817
|
+
/* @__PURE__ */ jsx32("span", { className: "body-1", children: label }),
|
|
2707
2818
|
" ",
|
|
2708
|
-
required && /* @__PURE__ */
|
|
2819
|
+
required && /* @__PURE__ */ jsx32("span", { className: "text-red-500", children: "*" })
|
|
2709
2820
|
] }),
|
|
2710
|
-
/* @__PURE__ */
|
|
2821
|
+
/* @__PURE__ */ jsx32(
|
|
2711
2822
|
Select5,
|
|
2712
2823
|
{
|
|
2824
|
+
size,
|
|
2713
2825
|
mode: "tags",
|
|
2714
2826
|
className: `body-1 flex justify-center w-full ${className ?? ""}`,
|
|
2715
2827
|
placeholder,
|
|
@@ -2722,11 +2834,11 @@ function SelectFieldTag({
|
|
|
2722
2834
|
},
|
|
2723
2835
|
searchValue: searchWord,
|
|
2724
2836
|
options,
|
|
2725
|
-
allowClear
|
|
2837
|
+
allowClear,
|
|
2726
2838
|
onClear
|
|
2727
2839
|
}
|
|
2728
2840
|
),
|
|
2729
|
-
error && /* @__PURE__ */
|
|
2841
|
+
error && /* @__PURE__ */ jsx32("p", { className: "text-red-500 caption-1", children: error })
|
|
2730
2842
|
] })
|
|
2731
2843
|
}
|
|
2732
2844
|
);
|
|
@@ -2734,9 +2846,9 @@ function SelectFieldTag({
|
|
|
2734
2846
|
|
|
2735
2847
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
2736
2848
|
import { IconTrash } from "@tabler/icons-react";
|
|
2737
|
-
import { Select as Select6, ConfigProvider as
|
|
2849
|
+
import { Select as Select6, ConfigProvider as ConfigProvider15 } from "antd";
|
|
2738
2850
|
import { useState as useState10 } from "react";
|
|
2739
|
-
import { jsx as
|
|
2851
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2740
2852
|
function SelectCustom({
|
|
2741
2853
|
label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
2742
2854
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
@@ -2744,7 +2856,9 @@ function SelectCustom({
|
|
|
2744
2856
|
required = false,
|
|
2745
2857
|
onChange,
|
|
2746
2858
|
error,
|
|
2747
|
-
onClear
|
|
2859
|
+
onClear,
|
|
2860
|
+
size = "middle",
|
|
2861
|
+
allowClear = true
|
|
2748
2862
|
}) {
|
|
2749
2863
|
const [value, setValue] = useState10([]);
|
|
2750
2864
|
const [valueList, setValueList] = useState10([]);
|
|
@@ -2765,8 +2879,8 @@ function SelectCustom({
|
|
|
2765
2879
|
});
|
|
2766
2880
|
};
|
|
2767
2881
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
2768
|
-
return /* @__PURE__ */
|
|
2769
|
-
|
|
2882
|
+
return /* @__PURE__ */ jsx33(
|
|
2883
|
+
ConfigProvider15,
|
|
2770
2884
|
{
|
|
2771
2885
|
theme: {
|
|
2772
2886
|
token: {
|
|
@@ -2774,37 +2888,39 @@ function SelectCustom({
|
|
|
2774
2888
|
fontSize: 16
|
|
2775
2889
|
}
|
|
2776
2890
|
},
|
|
2777
|
-
children: /* @__PURE__ */
|
|
2778
|
-
/* @__PURE__ */
|
|
2779
|
-
/* @__PURE__ */
|
|
2891
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
|
|
2892
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
2893
|
+
/* @__PURE__ */ jsx33("span", { className: "body-1", children: label }),
|
|
2780
2894
|
" ",
|
|
2781
|
-
required && /* @__PURE__ */
|
|
2895
|
+
required && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: "*" })
|
|
2782
2896
|
] }),
|
|
2783
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ jsx33(
|
|
2784
2898
|
Select6,
|
|
2785
2899
|
{
|
|
2900
|
+
size,
|
|
2786
2901
|
value: value ? value : void 0,
|
|
2787
2902
|
onChange: handleChange,
|
|
2788
2903
|
placeholder,
|
|
2789
2904
|
options: filteredOptions,
|
|
2790
2905
|
mode: "tags",
|
|
2791
|
-
onClear
|
|
2906
|
+
onClear,
|
|
2907
|
+
allowClear
|
|
2792
2908
|
}
|
|
2793
2909
|
),
|
|
2794
|
-
error && /* @__PURE__ */
|
|
2795
|
-
/* @__PURE__ */
|
|
2910
|
+
error && /* @__PURE__ */ jsx33("p", { className: "text-red-500 caption-1", children: error }),
|
|
2911
|
+
/* @__PURE__ */ jsx33("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs26(
|
|
2796
2912
|
"div",
|
|
2797
2913
|
{
|
|
2798
2914
|
className: "flex justify-between items-center py-[2px] body-1",
|
|
2799
2915
|
children: [
|
|
2800
|
-
/* @__PURE__ */
|
|
2801
|
-
/* @__PURE__ */
|
|
2916
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2917
|
+
/* @__PURE__ */ jsxs26("p", { children: [
|
|
2802
2918
|
index + 1,
|
|
2803
2919
|
"."
|
|
2804
2920
|
] }),
|
|
2805
|
-
/* @__PURE__ */
|
|
2921
|
+
/* @__PURE__ */ jsx33("p", { children: v })
|
|
2806
2922
|
] }),
|
|
2807
|
-
/* @__PURE__ */
|
|
2923
|
+
/* @__PURE__ */ jsx33(
|
|
2808
2924
|
IconTrash,
|
|
2809
2925
|
{
|
|
2810
2926
|
className: "cursor-pointer",
|
|
@@ -2821,7 +2937,7 @@ function SelectCustom({
|
|
|
2821
2937
|
}
|
|
2822
2938
|
|
|
2823
2939
|
// src/SortFilter/SortFilter.tsx
|
|
2824
|
-
import { ConfigProvider as
|
|
2940
|
+
import { ConfigProvider as ConfigProvider16 } from "antd";
|
|
2825
2941
|
import { CalendarOutlined } from "@ant-design/icons";
|
|
2826
2942
|
|
|
2827
2943
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -2854,7 +2970,7 @@ var quarters = [
|
|
|
2854
2970
|
// src/SortFilter/SortFilter.tsx
|
|
2855
2971
|
import { useState as useState11 } from "react";
|
|
2856
2972
|
import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
|
|
2857
|
-
import { jsx as
|
|
2973
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2858
2974
|
function SortFilter({
|
|
2859
2975
|
showYear = true,
|
|
2860
2976
|
showQuarter = true,
|
|
@@ -2865,20 +2981,20 @@ function SortFilter({
|
|
|
2865
2981
|
const [yearValue, setYearValue] = useState11();
|
|
2866
2982
|
const [monthValue, setMonthValue] = useState11();
|
|
2867
2983
|
const [quarterValue, setQuartersValue] = useState11();
|
|
2868
|
-
return /* @__PURE__ */
|
|
2869
|
-
|
|
2984
|
+
return /* @__PURE__ */ jsx34(
|
|
2985
|
+
ConfigProvider16,
|
|
2870
2986
|
{
|
|
2871
2987
|
theme: {
|
|
2872
2988
|
token: {
|
|
2873
2989
|
fontFamily: "Kanit"
|
|
2874
2990
|
}
|
|
2875
2991
|
},
|
|
2876
|
-
children: /* @__PURE__ */
|
|
2877
|
-
/* @__PURE__ */
|
|
2878
|
-
showYear && /* @__PURE__ */
|
|
2992
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "w-full flex items-center justify-between", children: [
|
|
2993
|
+
/* @__PURE__ */ jsxs27("div", { className: "w-full flex gap-[10px]", children: [
|
|
2994
|
+
showYear && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
2879
2995
|
SelectField,
|
|
2880
2996
|
{
|
|
2881
|
-
prefix: /* @__PURE__ */
|
|
2997
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
2882
2998
|
onChange: setYearValue,
|
|
2883
2999
|
options: years.map((s) => ({
|
|
2884
3000
|
value: s.value,
|
|
@@ -2888,10 +3004,10 @@ function SortFilter({
|
|
|
2888
3004
|
value: yearValue
|
|
2889
3005
|
}
|
|
2890
3006
|
) }),
|
|
2891
|
-
showMonth && /* @__PURE__ */
|
|
3007
|
+
showMonth && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
2892
3008
|
SelectField,
|
|
2893
3009
|
{
|
|
2894
|
-
prefix: /* @__PURE__ */
|
|
3010
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
2895
3011
|
onChange: setMonthValue,
|
|
2896
3012
|
options: months.map((s) => ({
|
|
2897
3013
|
value: s.value,
|
|
@@ -2901,10 +3017,10 @@ function SortFilter({
|
|
|
2901
3017
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
2902
3018
|
}
|
|
2903
3019
|
) }),
|
|
2904
|
-
showQuarter && /* @__PURE__ */
|
|
3020
|
+
showQuarter && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
2905
3021
|
SelectField,
|
|
2906
3022
|
{
|
|
2907
|
-
prefix: /* @__PURE__ */
|
|
3023
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
2908
3024
|
onChange: setQuartersValue,
|
|
2909
3025
|
options: quarters.map((s) => ({
|
|
2910
3026
|
value: s.value,
|
|
@@ -2915,8 +3031,8 @@ function SortFilter({
|
|
|
2915
3031
|
}
|
|
2916
3032
|
) })
|
|
2917
3033
|
] }),
|
|
2918
|
-
/* @__PURE__ */
|
|
2919
|
-
/* @__PURE__ */
|
|
3034
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex gap-[10px]", children: [
|
|
3035
|
+
/* @__PURE__ */ jsx34(
|
|
2920
3036
|
IconSortDescending2,
|
|
2921
3037
|
{
|
|
2922
3038
|
size: 24,
|
|
@@ -2924,7 +3040,7 @@ function SortFilter({
|
|
|
2924
3040
|
onClick: onSortClick
|
|
2925
3041
|
}
|
|
2926
3042
|
),
|
|
2927
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ jsx34(
|
|
2928
3044
|
IconFilter,
|
|
2929
3045
|
{
|
|
2930
3046
|
size: 24,
|
|
@@ -2941,7 +3057,7 @@ function SortFilter({
|
|
|
2941
3057
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
2942
3058
|
import { IconUpload, IconTrash as IconTrash2, IconFileDescription } from "@tabler/icons-react";
|
|
2943
3059
|
import { useRef as useRef4, useState as useState12 } from "react";
|
|
2944
|
-
import { Fragment as Fragment5, jsx as
|
|
3060
|
+
import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2945
3061
|
function FileUploader({
|
|
2946
3062
|
onUpload,
|
|
2947
3063
|
onError,
|
|
@@ -3027,10 +3143,10 @@ function FileUploader({
|
|
|
3027
3143
|
}
|
|
3028
3144
|
if (inputRef.current) inputRef.current.value = "";
|
|
3029
3145
|
};
|
|
3030
|
-
return /* @__PURE__ */
|
|
3031
|
-
label && /* @__PURE__ */
|
|
3032
|
-
!readOnly && /* @__PURE__ */
|
|
3033
|
-
mode === "upload" ? /* @__PURE__ */
|
|
3146
|
+
return /* @__PURE__ */ jsxs28("div", { className: "w-full", children: [
|
|
3147
|
+
label && /* @__PURE__ */ jsx35("p", { className: "body-1", children: label }),
|
|
3148
|
+
!readOnly && /* @__PURE__ */ jsxs28("div", { className: uploaderWidth, children: [
|
|
3149
|
+
mode === "upload" ? /* @__PURE__ */ jsx35(
|
|
3034
3150
|
"button",
|
|
3035
3151
|
{
|
|
3036
3152
|
type: "button",
|
|
@@ -3038,16 +3154,16 @@ function FileUploader({
|
|
|
3038
3154
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3039
3155
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3040
3156
|
disabled: disabled ? disabled : uploading,
|
|
3041
|
-
children: uploading ? /* @__PURE__ */
|
|
3042
|
-
/* @__PURE__ */
|
|
3157
|
+
children: uploading ? /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
3158
|
+
/* @__PURE__ */ jsx35(Loader, { size: 15 }),
|
|
3043
3159
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3044
|
-
] }) : /* @__PURE__ */
|
|
3045
|
-
/* @__PURE__ */
|
|
3160
|
+
] }) : /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
3161
|
+
/* @__PURE__ */ jsx35(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3046
3162
|
" ",
|
|
3047
3163
|
uploadText
|
|
3048
3164
|
] })
|
|
3049
3165
|
}
|
|
3050
|
-
) : /* @__PURE__ */
|
|
3166
|
+
) : /* @__PURE__ */ jsx35(
|
|
3051
3167
|
"div",
|
|
3052
3168
|
{
|
|
3053
3169
|
className: `w-full min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3061,17 +3177,17 @@ function FileUploader({
|
|
|
3061
3177
|
},
|
|
3062
3178
|
onDragLeave: () => setDragActive(false),
|
|
3063
3179
|
onDrop: handleDrop,
|
|
3064
|
-
children: uploading ? /* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3180
|
+
children: uploading ? /* @__PURE__ */ jsxs28("div", { className: "flex justify-center items-center gap-2", children: [
|
|
3181
|
+
/* @__PURE__ */ jsx35(Loader, { size: 15 }),
|
|
3066
3182
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3067
|
-
] }) : /* @__PURE__ */
|
|
3068
|
-
/* @__PURE__ */
|
|
3069
|
-
/* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3183
|
+
] }) : /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3184
|
+
/* @__PURE__ */ jsx35(IconUpload, { size: 20 }),
|
|
3185
|
+
/* @__PURE__ */ jsx35("span", { className: "body-1", children: "\u0E04\u0E25\u0E34\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E17\u0E35\u0E48\u0E1A\u0E23\u0E34\u0E40\u0E27\u0E13\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14" }),
|
|
3186
|
+
/* @__PURE__ */ jsx35("span", { className: "text-gray-400 body-3", children: "\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E35\u0E48\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E2B\u0E25\u0E32\u0E22\u0E44\u0E1F\u0E25\u0E4C" })
|
|
3071
3187
|
] })
|
|
3072
3188
|
}
|
|
3073
3189
|
),
|
|
3074
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ jsx35(
|
|
3075
3191
|
"input",
|
|
3076
3192
|
{
|
|
3077
3193
|
type: "file",
|
|
@@ -3084,8 +3200,8 @@ function FileUploader({
|
|
|
3084
3200
|
}
|
|
3085
3201
|
)
|
|
3086
3202
|
] }),
|
|
3087
|
-
description && /* @__PURE__ */
|
|
3088
|
-
/* @__PURE__ */
|
|
3203
|
+
description && /* @__PURE__ */ jsx35("p", { className: "text-gray-400 body-4", children: description }),
|
|
3204
|
+
/* @__PURE__ */ jsx35("div", { className: `mt-[8px] ${attachWidth}`, children: filesToDisplay.length !== 0 && /* @__PURE__ */ jsx35("div", { className: "flex flex-col rounded-[6px] body-1 border-[1px] border-gray-300", children: filesToDisplay.map((file, index) => /* @__PURE__ */ jsxs28(
|
|
3089
3205
|
"div",
|
|
3090
3206
|
{
|
|
3091
3207
|
className: `flex px-[16px] hover:bg-primary-50 hover:cursor-pointer
|
|
@@ -3095,11 +3211,11 @@ function FileUploader({
|
|
|
3095
3211
|
${index !== 0 ? "pt-[16px]" : ""}`,
|
|
3096
3212
|
onClick: () => onClickFile && onClickFile(file),
|
|
3097
3213
|
children: [
|
|
3098
|
-
/* @__PURE__ */
|
|
3099
|
-
/* @__PURE__ */
|
|
3100
|
-
/* @__PURE__ */
|
|
3214
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex gap-2 overflow-hidden", children: [
|
|
3215
|
+
/* @__PURE__ */ jsx35("div", { className: "w-[24px] h-[24px] flex items-center justify-center", children: /* @__PURE__ */ jsx35(IconFileDescription, { size: 20 }) }),
|
|
3216
|
+
/* @__PURE__ */ jsx35("span", { className: "truncate", children: file.name || file.fileName })
|
|
3101
3217
|
] }),
|
|
3102
|
-
!readOnly && !disabled && /* @__PURE__ */
|
|
3218
|
+
!readOnly && !disabled && /* @__PURE__ */ jsx35(
|
|
3103
3219
|
IconTrash2,
|
|
3104
3220
|
{
|
|
3105
3221
|
size: 20,
|
|
@@ -3139,9 +3255,9 @@ function messageLoading(content, duration) {
|
|
|
3139
3255
|
}
|
|
3140
3256
|
|
|
3141
3257
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3142
|
-
import { ConfigProvider as
|
|
3258
|
+
import { ConfigProvider as ConfigProvider17 } from "antd";
|
|
3143
3259
|
import { Breadcrumb } from "antd";
|
|
3144
|
-
import { jsx as
|
|
3260
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3145
3261
|
function Breadcrumbs({
|
|
3146
3262
|
items,
|
|
3147
3263
|
separator,
|
|
@@ -3149,15 +3265,15 @@ function Breadcrumbs({
|
|
|
3149
3265
|
classname,
|
|
3150
3266
|
params
|
|
3151
3267
|
}) {
|
|
3152
|
-
return /* @__PURE__ */
|
|
3153
|
-
|
|
3268
|
+
return /* @__PURE__ */ jsx36(
|
|
3269
|
+
ConfigProvider17,
|
|
3154
3270
|
{
|
|
3155
3271
|
theme: {
|
|
3156
3272
|
token: {
|
|
3157
3273
|
fontFamily: "Kanit"
|
|
3158
3274
|
}
|
|
3159
3275
|
},
|
|
3160
|
-
children: /* @__PURE__ */
|
|
3276
|
+
children: /* @__PURE__ */ jsx36(
|
|
3161
3277
|
Breadcrumb,
|
|
3162
3278
|
{
|
|
3163
3279
|
items,
|
|
@@ -3172,8 +3288,8 @@ function Breadcrumbs({
|
|
|
3172
3288
|
}
|
|
3173
3289
|
|
|
3174
3290
|
// src/HeadingPage/HeadingPage.tsx
|
|
3175
|
-
import { ConfigProvider as
|
|
3176
|
-
import { jsx as
|
|
3291
|
+
import { ConfigProvider as ConfigProvider18 } from "antd";
|
|
3292
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3177
3293
|
function HeadingPage({ Heading }) {
|
|
3178
3294
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3179
3295
|
weekday: "long",
|
|
@@ -3181,17 +3297,17 @@ function HeadingPage({ Heading }) {
|
|
|
3181
3297
|
month: "long",
|
|
3182
3298
|
year: "numeric"
|
|
3183
3299
|
});
|
|
3184
|
-
return /* @__PURE__ */
|
|
3185
|
-
|
|
3300
|
+
return /* @__PURE__ */ jsx37(
|
|
3301
|
+
ConfigProvider18,
|
|
3186
3302
|
{
|
|
3187
3303
|
theme: {
|
|
3188
3304
|
token: {
|
|
3189
3305
|
fontFamily: "Kanit"
|
|
3190
3306
|
}
|
|
3191
3307
|
},
|
|
3192
|
-
children: /* @__PURE__ */
|
|
3193
|
-
/* @__PURE__ */
|
|
3194
|
-
/* @__PURE__ */
|
|
3308
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3309
|
+
/* @__PURE__ */ jsx37("p", { className: "headline-5", children: Heading }),
|
|
3310
|
+
/* @__PURE__ */ jsxs29("p", { className: "body-1", children: [
|
|
3195
3311
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3196
3312
|
today
|
|
3197
3313
|
] })
|
|
@@ -3201,9 +3317,9 @@ function HeadingPage({ Heading }) {
|
|
|
3201
3317
|
}
|
|
3202
3318
|
|
|
3203
3319
|
// src/Progress/ProgressBar.tsx
|
|
3204
|
-
import { ConfigProvider as
|
|
3320
|
+
import { ConfigProvider as ConfigProvider19, Progress } from "antd";
|
|
3205
3321
|
import { useEffect as useEffect4, useRef as useRef5, useState as useState13 } from "react";
|
|
3206
|
-
import { jsx as
|
|
3322
|
+
import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3207
3323
|
function ProgressBar({
|
|
3208
3324
|
percent = 0,
|
|
3209
3325
|
size = "default",
|
|
@@ -3234,16 +3350,16 @@ function ProgressBar({
|
|
|
3234
3350
|
observer.observe(inner);
|
|
3235
3351
|
return () => observer.disconnect();
|
|
3236
3352
|
}, []);
|
|
3237
|
-
return /* @__PURE__ */
|
|
3238
|
-
|
|
3353
|
+
return /* @__PURE__ */ jsx38(
|
|
3354
|
+
ConfigProvider19,
|
|
3239
3355
|
{
|
|
3240
3356
|
theme: {
|
|
3241
3357
|
token: {
|
|
3242
3358
|
fontFamily: "Kanit"
|
|
3243
3359
|
}
|
|
3244
3360
|
},
|
|
3245
|
-
children: /* @__PURE__ */
|
|
3246
|
-
/* @__PURE__ */
|
|
3361
|
+
children: /* @__PURE__ */ jsxs30("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3362
|
+
/* @__PURE__ */ jsx38(
|
|
3247
3363
|
Progress,
|
|
3248
3364
|
{
|
|
3249
3365
|
className: "w-full",
|
|
@@ -3259,7 +3375,7 @@ function ProgressBar({
|
|
|
3259
3375
|
strokeColor
|
|
3260
3376
|
}
|
|
3261
3377
|
),
|
|
3262
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */
|
|
3378
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx38(
|
|
3263
3379
|
"div",
|
|
3264
3380
|
{
|
|
3265
3381
|
className: "checkpoint absolute top-0",
|
|
@@ -3281,7 +3397,7 @@ function ProgressBar({
|
|
|
3281
3397
|
}
|
|
3282
3398
|
|
|
3283
3399
|
// src/KpiSection/KpiSection.tsx
|
|
3284
|
-
import { ConfigProvider as
|
|
3400
|
+
import { ConfigProvider as ConfigProvider20, message } from "antd";
|
|
3285
3401
|
import { useEffect as useEffect5, useState as useState15 } from "react";
|
|
3286
3402
|
|
|
3287
3403
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3432,7 +3548,7 @@ function useGetKpiSection() {
|
|
|
3432
3548
|
|
|
3433
3549
|
// src/KpiSection/KpiSection.tsx
|
|
3434
3550
|
import { IconCheck as IconCheck2, IconCirclePlus, IconPencil, IconTrash as IconTrash3, IconX as IconX2 } from "@tabler/icons-react";
|
|
3435
|
-
import { Fragment as Fragment6, jsx as
|
|
3551
|
+
import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3436
3552
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3437
3553
|
const {
|
|
3438
3554
|
handleAddKpi,
|
|
@@ -3462,8 +3578,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3462
3578
|
onChangeKpiList(kpiList);
|
|
3463
3579
|
}
|
|
3464
3580
|
}, [kpiList]);
|
|
3465
|
-
return /* @__PURE__ */
|
|
3466
|
-
|
|
3581
|
+
return /* @__PURE__ */ jsx39(
|
|
3582
|
+
ConfigProvider20,
|
|
3467
3583
|
{
|
|
3468
3584
|
theme: {
|
|
3469
3585
|
token: {
|
|
@@ -3471,11 +3587,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3471
3587
|
fontSize: 16
|
|
3472
3588
|
}
|
|
3473
3589
|
},
|
|
3474
|
-
children: /* @__PURE__ */
|
|
3590
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "container-input", children: [
|
|
3475
3591
|
messageContainer,
|
|
3476
|
-
type === "number" && /* @__PURE__ */
|
|
3477
|
-
/* @__PURE__ */
|
|
3478
|
-
/* @__PURE__ */
|
|
3592
|
+
type === "number" && /* @__PURE__ */ jsxs31("div", { className: "space-y-4", children: [
|
|
3593
|
+
/* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3594
|
+
/* @__PURE__ */ jsx39(
|
|
3479
3595
|
InputField,
|
|
3480
3596
|
{
|
|
3481
3597
|
value: nameKpi,
|
|
@@ -3487,7 +3603,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3487
3603
|
error: errors.nameKpi
|
|
3488
3604
|
}
|
|
3489
3605
|
),
|
|
3490
|
-
/* @__PURE__ */
|
|
3606
|
+
/* @__PURE__ */ jsx39(
|
|
3491
3607
|
InputField,
|
|
3492
3608
|
{
|
|
3493
3609
|
value: kpiValue,
|
|
@@ -3511,7 +3627,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3511
3627
|
error: errors.kpiValue
|
|
3512
3628
|
}
|
|
3513
3629
|
),
|
|
3514
|
-
/* @__PURE__ */
|
|
3630
|
+
/* @__PURE__ */ jsx39(
|
|
3515
3631
|
InputField,
|
|
3516
3632
|
{
|
|
3517
3633
|
value: unitValue,
|
|
@@ -3523,7 +3639,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3523
3639
|
error: errors.unitValue
|
|
3524
3640
|
}
|
|
3525
3641
|
),
|
|
3526
|
-
/* @__PURE__ */
|
|
3642
|
+
/* @__PURE__ */ jsx39("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx39(
|
|
3527
3643
|
IconCirclePlus,
|
|
3528
3644
|
{
|
|
3529
3645
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3532,17 +3648,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3532
3648
|
}
|
|
3533
3649
|
) })
|
|
3534
3650
|
] }),
|
|
3535
|
-
/* @__PURE__ */
|
|
3651
|
+
/* @__PURE__ */ jsx39("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs31(
|
|
3536
3652
|
"div",
|
|
3537
3653
|
{
|
|
3538
3654
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3539
3655
|
children: [
|
|
3540
|
-
/* @__PURE__ */
|
|
3656
|
+
/* @__PURE__ */ jsxs31("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3541
3657
|
index + 1,
|
|
3542
3658
|
"."
|
|
3543
3659
|
] }),
|
|
3544
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3545
|
-
/* @__PURE__ */
|
|
3660
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3661
|
+
/* @__PURE__ */ jsx39(
|
|
3546
3662
|
InputField,
|
|
3547
3663
|
{
|
|
3548
3664
|
value: kpi.name,
|
|
@@ -3552,7 +3668,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3552
3668
|
error: itemErrors[kpi.id]?.name
|
|
3553
3669
|
}
|
|
3554
3670
|
),
|
|
3555
|
-
/* @__PURE__ */
|
|
3671
|
+
/* @__PURE__ */ jsx39(
|
|
3556
3672
|
InputField,
|
|
3557
3673
|
{
|
|
3558
3674
|
value: kpi.value?.toString(),
|
|
@@ -3577,7 +3693,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3577
3693
|
error: itemErrors[kpi.id]?.value
|
|
3578
3694
|
}
|
|
3579
3695
|
),
|
|
3580
|
-
/* @__PURE__ */
|
|
3696
|
+
/* @__PURE__ */ jsx39(
|
|
3581
3697
|
InputField,
|
|
3582
3698
|
{
|
|
3583
3699
|
value: kpi.unit,
|
|
@@ -3587,29 +3703,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3587
3703
|
error: itemErrors[kpi.id]?.unit
|
|
3588
3704
|
}
|
|
3589
3705
|
),
|
|
3590
|
-
/* @__PURE__ */
|
|
3706
|
+
/* @__PURE__ */ jsxs31(
|
|
3591
3707
|
"div",
|
|
3592
3708
|
{
|
|
3593
3709
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3594
3710
|
children: [
|
|
3595
|
-
/* @__PURE__ */
|
|
3711
|
+
/* @__PURE__ */ jsx39(
|
|
3596
3712
|
IconCheck2,
|
|
3597
3713
|
{
|
|
3598
3714
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3599
3715
|
onClick: () => handleSave(kpi.id, type)
|
|
3600
3716
|
}
|
|
3601
3717
|
),
|
|
3602
|
-
/* @__PURE__ */
|
|
3718
|
+
/* @__PURE__ */ jsx39(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3603
3719
|
]
|
|
3604
3720
|
}
|
|
3605
3721
|
)
|
|
3606
|
-
] }) : /* @__PURE__ */
|
|
3607
|
-
/* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
/* @__PURE__ */
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
-
/* @__PURE__ */
|
|
3722
|
+
] }) : /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3723
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.name }),
|
|
3724
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.value }),
|
|
3725
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.unit }),
|
|
3726
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex gap-3 justify-end", children: [
|
|
3727
|
+
/* @__PURE__ */ jsx39(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3728
|
+
/* @__PURE__ */ jsx39(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3613
3729
|
] })
|
|
3614
3730
|
] })
|
|
3615
3731
|
]
|
|
@@ -3617,9 +3733,9 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3617
3733
|
kpi.id
|
|
3618
3734
|
)) })
|
|
3619
3735
|
] }),
|
|
3620
|
-
type === "text" && /* @__PURE__ */
|
|
3621
|
-
/* @__PURE__ */
|
|
3622
|
-
/* @__PURE__ */
|
|
3736
|
+
type === "text" && /* @__PURE__ */ jsxs31("div", { className: "space-y-4", children: [
|
|
3737
|
+
/* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3738
|
+
/* @__PURE__ */ jsx39(
|
|
3623
3739
|
InputField,
|
|
3624
3740
|
{
|
|
3625
3741
|
value: nameKpi,
|
|
@@ -3631,7 +3747,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3631
3747
|
error: errors.nameKpi
|
|
3632
3748
|
}
|
|
3633
3749
|
),
|
|
3634
|
-
/* @__PURE__ */
|
|
3750
|
+
/* @__PURE__ */ jsx39("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx39(
|
|
3635
3751
|
IconCirclePlus,
|
|
3636
3752
|
{
|
|
3637
3753
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3640,13 +3756,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3640
3756
|
}
|
|
3641
3757
|
) })
|
|
3642
3758
|
] }),
|
|
3643
|
-
/* @__PURE__ */
|
|
3644
|
-
/* @__PURE__ */
|
|
3759
|
+
/* @__PURE__ */ jsx39("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-[30px_1fr_80px] items-start py-2 body-1 gap-[8px]", children: [
|
|
3760
|
+
/* @__PURE__ */ jsxs31("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3645
3761
|
index + 1,
|
|
3646
3762
|
"."
|
|
3647
3763
|
] }),
|
|
3648
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3649
|
-
/* @__PURE__ */
|
|
3764
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3765
|
+
/* @__PURE__ */ jsx39(
|
|
3650
3766
|
InputField,
|
|
3651
3767
|
{
|
|
3652
3768
|
value: kpi.name,
|
|
@@ -3656,27 +3772,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3656
3772
|
error: itemErrors[kpi.id]?.name
|
|
3657
3773
|
}
|
|
3658
3774
|
),
|
|
3659
|
-
/* @__PURE__ */
|
|
3775
|
+
/* @__PURE__ */ jsxs31(
|
|
3660
3776
|
"div",
|
|
3661
3777
|
{
|
|
3662
3778
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3663
3779
|
children: [
|
|
3664
|
-
/* @__PURE__ */
|
|
3780
|
+
/* @__PURE__ */ jsx39(
|
|
3665
3781
|
IconCheck2,
|
|
3666
3782
|
{
|
|
3667
3783
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3668
3784
|
onClick: () => handleSave(kpi.id, type)
|
|
3669
3785
|
}
|
|
3670
3786
|
),
|
|
3671
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ jsx39(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3672
3788
|
]
|
|
3673
3789
|
}
|
|
3674
3790
|
)
|
|
3675
|
-
] }) : /* @__PURE__ */
|
|
3676
|
-
/* @__PURE__ */
|
|
3677
|
-
/* @__PURE__ */
|
|
3678
|
-
/* @__PURE__ */
|
|
3679
|
-
/* @__PURE__ */
|
|
3791
|
+
] }) : /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3792
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.name }),
|
|
3793
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex gap-3 justify-end", children: [
|
|
3794
|
+
/* @__PURE__ */ jsx39(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3795
|
+
/* @__PURE__ */ jsx39(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3680
3796
|
] })
|
|
3681
3797
|
] })
|
|
3682
3798
|
] }, kpi.id)) })
|
|
@@ -3688,9 +3804,9 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3688
3804
|
|
|
3689
3805
|
// src/Modal/Modal/Modal.tsx
|
|
3690
3806
|
import { Modal } from "antd";
|
|
3691
|
-
import { jsx as
|
|
3807
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3692
3808
|
function AntDModal({ children, isOpen, width, onCancel }) {
|
|
3693
|
-
return /* @__PURE__ */
|
|
3809
|
+
return /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40(Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ jsx40("div", { children }) }) });
|
|
3694
3810
|
}
|
|
3695
3811
|
|
|
3696
3812
|
// src/Indicator/Indicator/Indicator.tsx
|
|
@@ -3703,7 +3819,7 @@ import {
|
|
|
3703
3819
|
} from "@tabler/icons-react";
|
|
3704
3820
|
import { useState as useState16 } from "react";
|
|
3705
3821
|
import { Input as Input4 } from "antd";
|
|
3706
|
-
import { Fragment as Fragment7, jsx as
|
|
3822
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3707
3823
|
function Indicator({
|
|
3708
3824
|
option = [
|
|
3709
3825
|
{ value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
|
|
@@ -3831,13 +3947,13 @@ function Indicator({
|
|
|
3831
3947
|
}));
|
|
3832
3948
|
console.log(cacheEditData);
|
|
3833
3949
|
};
|
|
3834
|
-
return /* @__PURE__ */
|
|
3835
|
-
/* @__PURE__ */
|
|
3950
|
+
return /* @__PURE__ */ jsxs32("div", { className: "w-full", children: [
|
|
3951
|
+
/* @__PURE__ */ jsxs32(
|
|
3836
3952
|
"div",
|
|
3837
3953
|
{
|
|
3838
3954
|
className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
|
|
3839
3955
|
children: [
|
|
3840
|
-
/* @__PURE__ */
|
|
3956
|
+
/* @__PURE__ */ jsx41(
|
|
3841
3957
|
SwitchSelect,
|
|
3842
3958
|
{
|
|
3843
3959
|
option,
|
|
@@ -3847,7 +3963,7 @@ function Indicator({
|
|
|
3847
3963
|
required: true
|
|
3848
3964
|
}
|
|
3849
3965
|
),
|
|
3850
|
-
/* @__PURE__ */
|
|
3966
|
+
/* @__PURE__ */ jsx41(
|
|
3851
3967
|
InputField,
|
|
3852
3968
|
{
|
|
3853
3969
|
label: `\u0E0A\u0E37\u0E48\u0E2D\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
|
|
@@ -3862,8 +3978,8 @@ function Indicator({
|
|
|
3862
3978
|
error: addError.textValue
|
|
3863
3979
|
}
|
|
3864
3980
|
),
|
|
3865
|
-
valueSwitch === "NUMBER" && /* @__PURE__ */
|
|
3866
|
-
/* @__PURE__ */
|
|
3981
|
+
valueSwitch === "NUMBER" && /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
3982
|
+
/* @__PURE__ */ jsx41(
|
|
3867
3983
|
InputFieldNumber,
|
|
3868
3984
|
{
|
|
3869
3985
|
label: `\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22${type === "OUTPUT" ? "\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" : "\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C"}`,
|
|
@@ -3879,7 +3995,7 @@ function Indicator({
|
|
|
3879
3995
|
error: addError.numberValue
|
|
3880
3996
|
}
|
|
3881
3997
|
),
|
|
3882
|
-
/* @__PURE__ */
|
|
3998
|
+
/* @__PURE__ */ jsx41(
|
|
3883
3999
|
InputField,
|
|
3884
4000
|
{
|
|
3885
4001
|
label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
|
|
@@ -3895,7 +4011,7 @@ function Indicator({
|
|
|
3895
4011
|
}
|
|
3896
4012
|
)
|
|
3897
4013
|
] }),
|
|
3898
|
-
/* @__PURE__ */
|
|
4014
|
+
/* @__PURE__ */ jsx41(
|
|
3899
4015
|
IconCirclePlus2,
|
|
3900
4016
|
{
|
|
3901
4017
|
onClick: handleAddIndicator,
|
|
@@ -3906,14 +4022,14 @@ function Indicator({
|
|
|
3906
4022
|
]
|
|
3907
4023
|
}
|
|
3908
4024
|
),
|
|
3909
|
-
/* @__PURE__ */
|
|
4025
|
+
/* @__PURE__ */ jsx41(Fragment7, { children: arrayData.map((item, index) => /* @__PURE__ */ jsxs32(
|
|
3910
4026
|
"div",
|
|
3911
4027
|
{
|
|
3912
4028
|
className: `space-y-2 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
|
|
3913
4029
|
children: [
|
|
3914
|
-
/* @__PURE__ */
|
|
3915
|
-
index === editIndex ? /* @__PURE__ */
|
|
3916
|
-
/* @__PURE__ */
|
|
4030
|
+
/* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.inputType === "TEXT" ? "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" : "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02" }),
|
|
4031
|
+
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4032
|
+
/* @__PURE__ */ jsx41(
|
|
3917
4033
|
Input4,
|
|
3918
4034
|
{
|
|
3919
4035
|
className: "body-1 mt-2",
|
|
@@ -3926,11 +4042,11 @@ function Indicator({
|
|
|
3926
4042
|
}
|
|
3927
4043
|
}
|
|
3928
4044
|
),
|
|
3929
|
-
editError.textValue && /* @__PURE__ */
|
|
3930
|
-
] }) : /* @__PURE__ */
|
|
3931
|
-
item.inputType === "NUMBER" && /* @__PURE__ */
|
|
3932
|
-
index === editIndex ? /* @__PURE__ */
|
|
3933
|
-
/* @__PURE__ */
|
|
4045
|
+
editError.textValue && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.textValue })
|
|
4046
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.textValue }),
|
|
4047
|
+
item.inputType === "NUMBER" && /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
4048
|
+
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4049
|
+
/* @__PURE__ */ jsx41(
|
|
3934
4050
|
Input4,
|
|
3935
4051
|
{
|
|
3936
4052
|
type: "number",
|
|
@@ -3944,10 +4060,10 @@ function Indicator({
|
|
|
3944
4060
|
}
|
|
3945
4061
|
}
|
|
3946
4062
|
),
|
|
3947
|
-
editError.numberValue && /* @__PURE__ */
|
|
3948
|
-
] }) : /* @__PURE__ */
|
|
3949
|
-
index === editIndex ? /* @__PURE__ */
|
|
3950
|
-
/* @__PURE__ */
|
|
4063
|
+
editError.numberValue && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.numberValue })
|
|
4064
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.numberValue }),
|
|
4065
|
+
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4066
|
+
/* @__PURE__ */ jsx41(
|
|
3951
4067
|
Input4,
|
|
3952
4068
|
{
|
|
3953
4069
|
className: "body-1 mt-2",
|
|
@@ -3960,32 +4076,32 @@ function Indicator({
|
|
|
3960
4076
|
}
|
|
3961
4077
|
}
|
|
3962
4078
|
),
|
|
3963
|
-
editError.unit && /* @__PURE__ */
|
|
3964
|
-
] }) : /* @__PURE__ */
|
|
4079
|
+
editError.unit && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.unit })
|
|
4080
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.unit })
|
|
3965
4081
|
] }),
|
|
3966
|
-
/* @__PURE__ */
|
|
3967
|
-
/* @__PURE__ */
|
|
4082
|
+
/* @__PURE__ */ jsx41("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ jsxs32("div", { className: "flex", children: [
|
|
4083
|
+
/* @__PURE__ */ jsx41(
|
|
3968
4084
|
IconCheck3,
|
|
3969
4085
|
{
|
|
3970
4086
|
className: "cursor-pointer text-green-600",
|
|
3971
4087
|
onClick: () => handleConfirmEditIndicator(index)
|
|
3972
4088
|
}
|
|
3973
4089
|
),
|
|
3974
|
-
/* @__PURE__ */
|
|
4090
|
+
/* @__PURE__ */ jsx41(
|
|
3975
4091
|
IconX3,
|
|
3976
4092
|
{
|
|
3977
4093
|
className: "cursor-pointer text-red-600",
|
|
3978
4094
|
onClick: handleCancelEditIndicator
|
|
3979
4095
|
}
|
|
3980
4096
|
)
|
|
3981
|
-
] }) : void 0 : canEdit && /* @__PURE__ */
|
|
4097
|
+
] }) : void 0 : canEdit && /* @__PURE__ */ jsx41(
|
|
3982
4098
|
IconPencil2,
|
|
3983
4099
|
{
|
|
3984
4100
|
className: "cursor-pointer",
|
|
3985
4101
|
onClick: () => handleEditIndicator(index)
|
|
3986
4102
|
}
|
|
3987
4103
|
) }),
|
|
3988
|
-
/* @__PURE__ */
|
|
4104
|
+
/* @__PURE__ */ jsx41("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ jsx41(
|
|
3989
4105
|
IconTrash4,
|
|
3990
4106
|
{
|
|
3991
4107
|
onClick: () => {
|
|
@@ -4008,7 +4124,7 @@ function Indicator({
|
|
|
4008
4124
|
// src/FilterPopUp/FilterPopUp.tsx
|
|
4009
4125
|
import { IconCheck as IconCheck4, IconFilter as IconFilter2, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
4010
4126
|
import { useState as useState17 } from "react";
|
|
4011
|
-
import { jsx as
|
|
4127
|
+
import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4012
4128
|
var FilterPopUp = (filter) => {
|
|
4013
4129
|
const [isAction, setIsAction] = useState17(true);
|
|
4014
4130
|
const [filterArray, setFilterArray] = useState17([""]);
|
|
@@ -4018,20 +4134,20 @@ var FilterPopUp = (filter) => {
|
|
|
4018
4134
|
const handleSubmitFilter = () => {
|
|
4019
4135
|
filter.handleSearch(filterArray);
|
|
4020
4136
|
};
|
|
4021
|
-
return /* @__PURE__ */
|
|
4022
|
-
/* @__PURE__ */
|
|
4023
|
-
/* @__PURE__ */
|
|
4137
|
+
return /* @__PURE__ */ jsxs33("div", { className: "relative", children: [
|
|
4138
|
+
/* @__PURE__ */ jsxs33("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
|
|
4139
|
+
/* @__PURE__ */ jsx42(IconFilter2, {}),
|
|
4024
4140
|
"filter"
|
|
4025
4141
|
] }),
|
|
4026
|
-
isAction ? /* @__PURE__ */
|
|
4027
|
-
/* @__PURE__ */
|
|
4028
|
-
/* @__PURE__ */
|
|
4029
|
-
/* @__PURE__ */
|
|
4030
|
-
/* @__PURE__ */
|
|
4142
|
+
isAction ? /* @__PURE__ */ jsxs33("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
|
|
4143
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex justify-end", children: [
|
|
4144
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex justify-end text-nowrap gap-2", children: [
|
|
4145
|
+
/* @__PURE__ */ jsx42(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ jsx42(IconCheck4, {}) }),
|
|
4146
|
+
/* @__PURE__ */ jsx42(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ jsx42(IconTrash5, {}) })
|
|
4031
4147
|
] }),
|
|
4032
4148
|
""
|
|
4033
4149
|
] }),
|
|
4034
|
-
/* @__PURE__ */
|
|
4150
|
+
/* @__PURE__ */ jsx42(
|
|
4035
4151
|
SelectCustom,
|
|
4036
4152
|
{
|
|
4037
4153
|
options: filter.selectionFilter,
|
|
@@ -4047,7 +4163,7 @@ var FilterPopUp = (filter) => {
|
|
|
4047
4163
|
import { useEffect as useEffect7, useRef as useRef6, useState as useState18 } from "react";
|
|
4048
4164
|
import { IconSearch, IconUsers, IconX as IconX4 } from "@tabler/icons-react";
|
|
4049
4165
|
import { Input as Input5 } from "antd";
|
|
4050
|
-
import { Fragment as Fragment8, jsx as
|
|
4166
|
+
import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4051
4167
|
function ProfileSelect({
|
|
4052
4168
|
allUser,
|
|
4053
4169
|
assignUser,
|
|
@@ -4104,22 +4220,25 @@ function ProfileSelect({
|
|
|
4104
4220
|
const filteredUnassigned = normalizedSearch ? userNotAssign.filter(
|
|
4105
4221
|
(u) => u.name.toLowerCase().includes(normalizedSearch)
|
|
4106
4222
|
) : userNotAssign;
|
|
4107
|
-
|
|
4108
|
-
|
|
4223
|
+
const isSearching = normalizedSearch.length > 0;
|
|
4224
|
+
const noResult = filteredAssigned.length === 0 && filteredUnassigned.length === 0;
|
|
4225
|
+
const noUserOption = allUser.length === 0 && !isSearching;
|
|
4226
|
+
return /* @__PURE__ */ jsxs34("div", { ref: containerRef, className: "relative body-1", children: [
|
|
4227
|
+
mode === "icon" ? /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsx43(
|
|
4109
4228
|
IconUsers,
|
|
4110
4229
|
{
|
|
4111
4230
|
size: 40,
|
|
4112
4231
|
className: "p-2 border rounded cursor-pointer bg-white",
|
|
4113
4232
|
onClick: () => setIsShowSelect(!isShowSelect)
|
|
4114
4233
|
}
|
|
4115
|
-
) }) : mode === "showAssign" ? /* @__PURE__ */
|
|
4234
|
+
) }) : mode === "showAssign" ? /* @__PURE__ */ jsx43(
|
|
4116
4235
|
"div",
|
|
4117
4236
|
{
|
|
4118
4237
|
className: `w-full h-[40px] flex items-center p-2 cursor-pointer ${className}`,
|
|
4119
4238
|
onClick: () => setIsShowSelect(!isShowSelect),
|
|
4120
|
-
children: visibleUsers.length === 0 ? placeholder ? /* @__PURE__ */
|
|
4121
|
-
/* @__PURE__ */
|
|
4122
|
-
/* @__PURE__ */
|
|
4239
|
+
children: visibleUsers.length === 0 ? placeholder ? /* @__PURE__ */ jsx43("span", { className: "body-1 text-gray-400 select-none", children: placeholder }) : null : /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4240
|
+
/* @__PURE__ */ jsx43("div", { className: "flex -space-x-2", children: visibleUsers.map((user) => /* @__PURE__ */ jsx43("div", { className: "flex items-center", children: /* @__PURE__ */ jsxs34("label", { className: "relative group cursor-pointer", children: [
|
|
4241
|
+
/* @__PURE__ */ jsx43(
|
|
4123
4242
|
"img",
|
|
4124
4243
|
{
|
|
4125
4244
|
src: user.profile,
|
|
@@ -4132,7 +4251,7 @@ function ProfileSelect({
|
|
|
4132
4251
|
className: "border border-white group-hover:border-3 group-hover:border-red-500 transition"
|
|
4133
4252
|
}
|
|
4134
4253
|
),
|
|
4135
|
-
/* @__PURE__ */
|
|
4254
|
+
/* @__PURE__ */ jsx43(
|
|
4136
4255
|
"span",
|
|
4137
4256
|
{
|
|
4138
4257
|
className: "absolute top-0 right-0 -translate-y-2 translate-x-2 \r\n rounded-full bg-white opacity-0 group-hover:opacity-100 \r\n border-3 z-10 border-red-500 flex items-center justify-center transition",
|
|
@@ -4140,11 +4259,11 @@ function ProfileSelect({
|
|
|
4140
4259
|
e.stopPropagation();
|
|
4141
4260
|
onUpdateAssignUser(user, "remove");
|
|
4142
4261
|
},
|
|
4143
|
-
children: /* @__PURE__ */
|
|
4262
|
+
children: /* @__PURE__ */ jsx43(IconX4, { className: "w-4 h-4 text-red-500" })
|
|
4144
4263
|
}
|
|
4145
4264
|
)
|
|
4146
4265
|
] }) }, user.id)) }),
|
|
4147
|
-
showPlus && /* @__PURE__ */
|
|
4266
|
+
showPlus && /* @__PURE__ */ jsxs34(
|
|
4148
4267
|
"div",
|
|
4149
4268
|
{
|
|
4150
4269
|
className: "border border-white flex items-center justify-center bg-gray-300 text-black text-sm ml-2",
|
|
@@ -4161,8 +4280,8 @@ function ProfileSelect({
|
|
|
4161
4280
|
)
|
|
4162
4281
|
] })
|
|
4163
4282
|
}
|
|
4164
|
-
) : /* @__PURE__ */
|
|
4165
|
-
visibleUsers.map((user) => /* @__PURE__ */
|
|
4283
|
+
) : /* @__PURE__ */ jsxs34("div", { className: `w-full h-[40px] flex -space-x-2 p-2 ${className}`, children: [
|
|
4284
|
+
visibleUsers.map((user) => /* @__PURE__ */ jsx43("div", { className: "flex items-center ", children: /* @__PURE__ */ jsx43("label", { className: "relative group ", children: /* @__PURE__ */ jsx43(
|
|
4166
4285
|
"img",
|
|
4167
4286
|
{
|
|
4168
4287
|
src: user.profile,
|
|
@@ -4175,7 +4294,7 @@ function ProfileSelect({
|
|
|
4175
4294
|
className: "border border-white transition"
|
|
4176
4295
|
}
|
|
4177
4296
|
) }) }, user.id)),
|
|
4178
|
-
showPlus && /* @__PURE__ */
|
|
4297
|
+
showPlus && /* @__PURE__ */ jsxs34(
|
|
4179
4298
|
"div",
|
|
4180
4299
|
{
|
|
4181
4300
|
className: "border border-white flex items-center justify-center bg-gray-300 text-black text-sm",
|
|
@@ -4191,15 +4310,15 @@ function ProfileSelect({
|
|
|
4191
4310
|
}
|
|
4192
4311
|
)
|
|
4193
4312
|
] }),
|
|
4194
|
-
isShowSelect ? /* @__PURE__ */
|
|
4313
|
+
isShowSelect ? /* @__PURE__ */ jsxs34(
|
|
4195
4314
|
"div",
|
|
4196
4315
|
{
|
|
4197
4316
|
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",
|
|
4198
4317
|
ref: selectRef,
|
|
4199
4318
|
children: [
|
|
4200
|
-
/* @__PURE__ */
|
|
4201
|
-
/* @__PURE__ */
|
|
4202
|
-
/* @__PURE__ */
|
|
4319
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex border-1 rounded-md p-2 gap-2 items-center", children: [
|
|
4320
|
+
/* @__PURE__ */ jsx43(IconSearch, {}),
|
|
4321
|
+
/* @__PURE__ */ jsx43(
|
|
4203
4322
|
Input5,
|
|
4204
4323
|
{
|
|
4205
4324
|
variant: "borderless",
|
|
@@ -4210,16 +4329,16 @@ function ProfileSelect({
|
|
|
4210
4329
|
}
|
|
4211
4330
|
)
|
|
4212
4331
|
] }),
|
|
4213
|
-
/* @__PURE__ */
|
|
4214
|
-
filteredAssigned.length > 0 && /* @__PURE__ */
|
|
4215
|
-
/* @__PURE__ */
|
|
4216
|
-
filteredAssigned.map((user) => /* @__PURE__ */
|
|
4332
|
+
/* @__PURE__ */ jsx43("div", { className: "overflow-y-auto h-[250px] pt-2 px-4 body-3", children: noUserOption ? /* @__PURE__ */ jsx43("div", { className: "flex items-center justify-center h-full text-gray-400 select-none", children: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E39\u0E49\u0E04\u0E19\u0E43\u0E2B\u0E49\u0E40\u0E25\u0E37\u0E2D\u0E01" }) : isSearching && noResult ? /* @__PURE__ */ jsx43("div", { className: "flex items-center justify-center h-full text-gray-400 select-none", children: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E1C\u0E39\u0E49\u0E04\u0E19\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32" }) : /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4333
|
+
filteredAssigned.length > 0 && /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4334
|
+
/* @__PURE__ */ jsx43("div", { className: "mb-1", children: "\u0E2A\u0E21\u0E32\u0E0A\u0E34\u0E01\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01" }),
|
|
4335
|
+
filteredAssigned.map((user) => /* @__PURE__ */ jsxs34(
|
|
4217
4336
|
"button",
|
|
4218
4337
|
{
|
|
4219
4338
|
className: "flex items-center group my-1 w-full p-1 rounded hover:bg-gray-100",
|
|
4220
4339
|
children: [
|
|
4221
|
-
/* @__PURE__ */
|
|
4222
|
-
/* @__PURE__ */
|
|
4340
|
+
/* @__PURE__ */ jsxs34("div", { className: "relative cursor-pointer", children: [
|
|
4341
|
+
/* @__PURE__ */ jsx43(
|
|
4223
4342
|
"img",
|
|
4224
4343
|
{
|
|
4225
4344
|
src: user.profile,
|
|
@@ -4232,47 +4351,49 @@ function ProfileSelect({
|
|
|
4232
4351
|
className: "border-3 border-red-500"
|
|
4233
4352
|
}
|
|
4234
4353
|
),
|
|
4235
|
-
/* @__PURE__ */
|
|
4354
|
+
/* @__PURE__ */ jsx43(
|
|
4236
4355
|
"span",
|
|
4237
4356
|
{
|
|
4238
|
-
className: "absolute top-0 right-0 -translate-y-2 translate-x-2 \r\n
|
|
4357
|
+
className: "absolute top-0 right-0 -translate-y-2 translate-x-2 \r\n rounded-full bg-white opacity-0 group-hover:opacity-100 \r\n border-3 border-red-500 flex items-center justify-center transition",
|
|
4239
4358
|
onClick: () => onUpdateAssignUser(user, "remove"),
|
|
4240
|
-
children: /* @__PURE__ */
|
|
4359
|
+
children: /* @__PURE__ */ jsx43(IconX4, { className: "text-red-500", size: 15 })
|
|
4241
4360
|
}
|
|
4242
4361
|
)
|
|
4243
4362
|
] }),
|
|
4244
|
-
/* @__PURE__ */
|
|
4363
|
+
/* @__PURE__ */ jsx43("span", { className: "ml-2", children: user.name })
|
|
4245
4364
|
]
|
|
4246
4365
|
},
|
|
4247
4366
|
user.id
|
|
4248
4367
|
))
|
|
4249
4368
|
] }),
|
|
4250
|
-
/* @__PURE__ */
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4369
|
+
filteredUnassigned.length > 0 && /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4370
|
+
/* @__PURE__ */ jsx43("div", { className: "mt-2", children: "\u0E1C\u0E39\u0E49\u0E04\u0E19" }),
|
|
4371
|
+
filteredUnassigned.map((user) => /* @__PURE__ */ jsxs34(
|
|
4372
|
+
"button",
|
|
4373
|
+
{
|
|
4374
|
+
className: "flex items-center my-1 hover:bg-gray-100 w-full p-1 rounded",
|
|
4375
|
+
onClick: () => onUpdateAssignUser(user),
|
|
4376
|
+
children: [
|
|
4377
|
+
/* @__PURE__ */ jsx43(
|
|
4378
|
+
"img",
|
|
4379
|
+
{
|
|
4380
|
+
src: user.profile,
|
|
4381
|
+
alt: user.name,
|
|
4382
|
+
style: {
|
|
4383
|
+
width: avatarSize,
|
|
4384
|
+
height: avatarSize,
|
|
4385
|
+
borderRadius: "50%"
|
|
4386
|
+
},
|
|
4387
|
+
className: "border"
|
|
4388
|
+
}
|
|
4389
|
+
),
|
|
4390
|
+
/* @__PURE__ */ jsx43("span", { className: "ml-2", children: user.name })
|
|
4391
|
+
]
|
|
4392
|
+
},
|
|
4393
|
+
user.id
|
|
4394
|
+
))
|
|
4395
|
+
] })
|
|
4396
|
+
] }) })
|
|
4276
4397
|
]
|
|
4277
4398
|
}
|
|
4278
4399
|
) : null
|
|
@@ -4282,7 +4403,7 @@ function ProfileSelect({
|
|
|
4282
4403
|
// src/Button/QRCode/QRCode.tsx
|
|
4283
4404
|
import { useEffect as useEffect8, useRef as useRef7, useState as useState19 } from "react";
|
|
4284
4405
|
import QRCode from "qrcode";
|
|
4285
|
-
import { jsx as
|
|
4406
|
+
import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4286
4407
|
var QRCodeGenerator = ({
|
|
4287
4408
|
url,
|
|
4288
4409
|
previewSize = 200,
|
|
@@ -4377,9 +4498,9 @@ var QRCodeGenerator = ({
|
|
|
4377
4498
|
a.click();
|
|
4378
4499
|
a.remove();
|
|
4379
4500
|
};
|
|
4380
|
-
return /* @__PURE__ */
|
|
4381
|
-
url === "" ? /* @__PURE__ */
|
|
4382
|
-
/* @__PURE__ */
|
|
4501
|
+
return /* @__PURE__ */ jsxs35("div", { style: { display: "inline-flex", flexDirection: "column", gap: 8 }, className: "justify-center items-center", children: [
|
|
4502
|
+
url === "" ? /* @__PURE__ */ jsx44("div", { className: "border-1 p-2 mb-2", style: { width: `${previewSize}px`, height: `${previewSize}px` } }) : /* @__PURE__ */ jsx44("canvas", { ref: canvasRef, className: "border-1 p-2 mb-2" }),
|
|
4503
|
+
/* @__PURE__ */ jsxs35(
|
|
4383
4504
|
"div",
|
|
4384
4505
|
{
|
|
4385
4506
|
style: {
|
|
@@ -4390,8 +4511,8 @@ var QRCodeGenerator = ({
|
|
|
4390
4511
|
},
|
|
4391
4512
|
className: "flex-col",
|
|
4392
4513
|
children: [
|
|
4393
|
-
/* @__PURE__ */
|
|
4394
|
-
/* @__PURE__ */
|
|
4514
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 mx-2", children: [
|
|
4515
|
+
/* @__PURE__ */ jsx44("label", { className: "border-1 p-2 rounded-md flex flex-col w-1/2 text-sm text-gray-400", children: /* @__PURE__ */ jsx44(
|
|
4395
4516
|
SelectField,
|
|
4396
4517
|
{
|
|
4397
4518
|
label: "\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A",
|
|
@@ -4400,7 +4521,7 @@ var QRCodeGenerator = ({
|
|
|
4400
4521
|
options: typeOption
|
|
4401
4522
|
}
|
|
4402
4523
|
) }),
|
|
4403
|
-
/* @__PURE__ */
|
|
4524
|
+
/* @__PURE__ */ jsx44("label", { className: "border-1 p-2 rounded-md flex flex-col w-1/2 text-sm text-gray-400", children: /* @__PURE__ */ jsx44(
|
|
4404
4525
|
SelectField,
|
|
4405
4526
|
{
|
|
4406
4527
|
label: "\u0E02\u0E19\u0E32\u0E14 (px)",
|
|
@@ -4410,7 +4531,7 @@ var QRCodeGenerator = ({
|
|
|
4410
4531
|
}
|
|
4411
4532
|
) })
|
|
4412
4533
|
] }),
|
|
4413
|
-
/* @__PURE__ */
|
|
4534
|
+
/* @__PURE__ */ jsx44(PrimaryButton, { onClick: download, disabled: url === "", textColor: "white", title: "\u0E14\u0E32\u0E27\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E2B\u0E31\u0E2A QR" })
|
|
4414
4535
|
]
|
|
4415
4536
|
}
|
|
4416
4537
|
)
|
|
@@ -4418,11 +4539,11 @@ var QRCodeGenerator = ({
|
|
|
4418
4539
|
};
|
|
4419
4540
|
|
|
4420
4541
|
// src/TabPropject/TabProject/TabProject.tsx
|
|
4421
|
-
import { ConfigProvider as
|
|
4422
|
-
import { jsx as
|
|
4542
|
+
import { ConfigProvider as ConfigProvider21, Tabs } from "antd";
|
|
4543
|
+
import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4423
4544
|
function TabProject({ tabOption, now, onChange }) {
|
|
4424
|
-
return /* @__PURE__ */
|
|
4425
|
-
|
|
4545
|
+
return /* @__PURE__ */ jsx45(
|
|
4546
|
+
ConfigProvider21,
|
|
4426
4547
|
{
|
|
4427
4548
|
theme: {
|
|
4428
4549
|
token: {
|
|
@@ -4438,16 +4559,16 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4438
4559
|
}
|
|
4439
4560
|
}
|
|
4440
4561
|
},
|
|
4441
|
-
children: /* @__PURE__ */
|
|
4562
|
+
children: /* @__PURE__ */ jsx45(
|
|
4442
4563
|
Tabs,
|
|
4443
4564
|
{
|
|
4444
4565
|
activeKey: now,
|
|
4445
4566
|
onChange,
|
|
4446
4567
|
items: tabOption.map((item) => ({
|
|
4447
4568
|
key: item.key,
|
|
4448
|
-
label: /* @__PURE__ */
|
|
4569
|
+
label: /* @__PURE__ */ jsxs36("span", { className: "tab-label flex gap-2 items-center body-1", children: [
|
|
4449
4570
|
item.icon,
|
|
4450
|
-
/* @__PURE__ */
|
|
4571
|
+
/* @__PURE__ */ jsx45("span", { children: item.label })
|
|
4451
4572
|
] })
|
|
4452
4573
|
}))
|
|
4453
4574
|
}
|
|
@@ -4459,7 +4580,7 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4459
4580
|
// src/Chart/BarChart/BarChart.tsx
|
|
4460
4581
|
import { useEffect as useEffect9, useMemo as useMemo2, useRef as useRef8 } from "react";
|
|
4461
4582
|
import * as d3 from "d3";
|
|
4462
|
-
import { jsx as
|
|
4583
|
+
import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4463
4584
|
var defaultMargin = { top: 30, right: 200, bottom: 36, left: 50 };
|
|
4464
4585
|
var defaultColorPalette = [
|
|
4465
4586
|
"#4E79A7",
|
|
@@ -4572,17 +4693,17 @@ var BarChart = ({
|
|
|
4572
4693
|
useEffect9(() => {
|
|
4573
4694
|
render();
|
|
4574
4695
|
}, [data, height, margin, xDomain.toString(), yDomain.toString()]);
|
|
4575
|
-
return /* @__PURE__ */
|
|
4576
|
-
/* @__PURE__ */
|
|
4577
|
-
/* @__PURE__ */
|
|
4578
|
-
/* @__PURE__ */
|
|
4696
|
+
return /* @__PURE__ */ jsx46("div", { ref: containerRef, style: { width: "100%" }, children: /* @__PURE__ */ jsxs37("svg", { ref: svgRef, role: "img", "aria-label": "Bar chart", style: { display: "block", width: "100%", height }, children: [
|
|
4697
|
+
/* @__PURE__ */ jsx46("g", { ref: gRef, transform: `translate(${margin.left},${margin.top})` }),
|
|
4698
|
+
/* @__PURE__ */ jsx46("g", { ref: xAxisRef }),
|
|
4699
|
+
/* @__PURE__ */ jsx46("g", { ref: yAxisRef })
|
|
4579
4700
|
] }) });
|
|
4580
4701
|
};
|
|
4581
4702
|
|
|
4582
4703
|
// src/Chart/PieChart/PieChart.tsx
|
|
4583
4704
|
import React3, { useRef as useRef9, useEffect as useEffect10 } from "react";
|
|
4584
4705
|
import * as d32 from "d3";
|
|
4585
|
-
import { jsx as
|
|
4706
|
+
import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4586
4707
|
var defaultColors = d32.schemeCategory10;
|
|
4587
4708
|
var PieChart = ({
|
|
4588
4709
|
title,
|
|
@@ -4616,15 +4737,15 @@ var PieChart = ({
|
|
|
4616
4737
|
return `${percentage}%`;
|
|
4617
4738
|
});
|
|
4618
4739
|
}, [data, width, height]);
|
|
4619
|
-
return /* @__PURE__ */
|
|
4620
|
-
title && /* @__PURE__ */
|
|
4621
|
-
description && /* @__PURE__ */
|
|
4622
|
-
/* @__PURE__ */
|
|
4623
|
-
/* @__PURE__ */
|
|
4624
|
-
/* @__PURE__ */
|
|
4625
|
-
/* @__PURE__ */
|
|
4626
|
-
/* @__PURE__ */
|
|
4627
|
-
/* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ jsxs38("div", { children: [
|
|
4741
|
+
title && /* @__PURE__ */ jsx47("p", { className: "body-2", children: title }),
|
|
4742
|
+
description && /* @__PURE__ */ jsx47("p", { className: "caption-1", children: description }),
|
|
4743
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex", children: [
|
|
4744
|
+
/* @__PURE__ */ jsx47("svg", { ref: svgRef }),
|
|
4745
|
+
/* @__PURE__ */ jsx47("div", { className: "flex flex-col gap-2 body-3 pl-[200px]", children: dataSide.map((d, i) => /* @__PURE__ */ jsxs38("div", { className: "grid grid-cols-3 gap-2 items-center", children: [
|
|
4746
|
+
/* @__PURE__ */ jsx47("div", { className: "w-[20px] h-[20px]", style: { backgroundColor: d.color } }),
|
|
4747
|
+
/* @__PURE__ */ jsx47("div", { children: d.label }),
|
|
4748
|
+
/* @__PURE__ */ jsx47("div", { children: d.value })
|
|
4628
4749
|
] }, i)) })
|
|
4629
4750
|
] })
|
|
4630
4751
|
] });
|
|
@@ -4643,7 +4764,7 @@ import {
|
|
|
4643
4764
|
addDays,
|
|
4644
4765
|
eachHourOfInterval
|
|
4645
4766
|
} from "date-fns";
|
|
4646
|
-
import { jsx as
|
|
4767
|
+
import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4647
4768
|
var LAYOUT = {
|
|
4648
4769
|
barHeight: 40,
|
|
4649
4770
|
barSpacing: 10,
|
|
@@ -4722,7 +4843,7 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4722
4843
|
const safeStatus = element.status || "pending";
|
|
4723
4844
|
const statusColor = getStatusColor(safeStatus);
|
|
4724
4845
|
const statusLabel = getStatusLabel(safeStatus);
|
|
4725
|
-
return /* @__PURE__ */
|
|
4846
|
+
return /* @__PURE__ */ jsxs39(
|
|
4726
4847
|
"div",
|
|
4727
4848
|
{
|
|
4728
4849
|
style: {
|
|
@@ -4734,8 +4855,8 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4734
4855
|
marginBottom: `${barSpacing}px`
|
|
4735
4856
|
},
|
|
4736
4857
|
children: [
|
|
4737
|
-
/* @__PURE__ */
|
|
4738
|
-
/* @__PURE__ */
|
|
4858
|
+
/* @__PURE__ */ jsxs39("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
4859
|
+
/* @__PURE__ */ jsx48(
|
|
4739
4860
|
"span",
|
|
4740
4861
|
{
|
|
4741
4862
|
style: {
|
|
@@ -4747,11 +4868,11 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4747
4868
|
}
|
|
4748
4869
|
}
|
|
4749
4870
|
),
|
|
4750
|
-
/* @__PURE__ */
|
|
4871
|
+
/* @__PURE__ */ jsx48("span", { style: { color: "#333" }, children: element.label })
|
|
4751
4872
|
] }),
|
|
4752
|
-
/* @__PURE__ */
|
|
4753
|
-
/* @__PURE__ */
|
|
4754
|
-
/* @__PURE__ */
|
|
4873
|
+
/* @__PURE__ */ jsx48("div", { style: { color: "#666" }, children: formatThaiDate(safeStartDate) }),
|
|
4874
|
+
/* @__PURE__ */ jsx48("div", { style: { color: "#666" }, children: formatThaiDate(safeEndDate) }),
|
|
4875
|
+
/* @__PURE__ */ jsx48(
|
|
4755
4876
|
"button",
|
|
4756
4877
|
{
|
|
4757
4878
|
style: {
|
|
@@ -4773,7 +4894,7 @@ var ProjectRow = ({ element, barHeight, barSpacing }) => {
|
|
|
4773
4894
|
element.id
|
|
4774
4895
|
);
|
|
4775
4896
|
};
|
|
4776
|
-
var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__PURE__ */
|
|
4897
|
+
var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__PURE__ */ jsx48(
|
|
4777
4898
|
"div",
|
|
4778
4899
|
{
|
|
4779
4900
|
style: {
|
|
@@ -4788,7 +4909,7 @@ var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__P
|
|
|
4788
4909
|
children: data.map((d, i) => {
|
|
4789
4910
|
if (i === 0) return null;
|
|
4790
4911
|
const yPos = i * (barHeight + barSpacing) - barSpacing / 2;
|
|
4791
|
-
return /* @__PURE__ */
|
|
4912
|
+
return /* @__PURE__ */ jsx48(
|
|
4792
4913
|
"div",
|
|
4793
4914
|
{
|
|
4794
4915
|
style: {
|
|
@@ -4989,7 +5110,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
4989
5110
|
headersGroupLayer1Height,
|
|
4990
5111
|
headersGroupLayer2Height
|
|
4991
5112
|
]);
|
|
4992
|
-
return /* @__PURE__ */
|
|
5113
|
+
return /* @__PURE__ */ jsx48(
|
|
4993
5114
|
"div",
|
|
4994
5115
|
{
|
|
4995
5116
|
style: {
|
|
@@ -5003,7 +5124,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5003
5124
|
backgroundColor: "#fff",
|
|
5004
5125
|
overflow: "hidden"
|
|
5005
5126
|
},
|
|
5006
|
-
children: /* @__PURE__ */
|
|
5127
|
+
children: /* @__PURE__ */ jsxs39(
|
|
5007
5128
|
"div",
|
|
5008
5129
|
{
|
|
5009
5130
|
style: {
|
|
@@ -5014,8 +5135,8 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5014
5135
|
position: "relative"
|
|
5015
5136
|
},
|
|
5016
5137
|
children: [
|
|
5017
|
-
/* @__PURE__ */
|
|
5018
|
-
/* @__PURE__ */
|
|
5138
|
+
/* @__PURE__ */ jsx48(RowOverlay, { data, barHeight, barSpacing, totalHeaderHeight }),
|
|
5139
|
+
/* @__PURE__ */ jsxs39(
|
|
5019
5140
|
"div",
|
|
5020
5141
|
{
|
|
5021
5142
|
ref: leftPanelRef,
|
|
@@ -5029,7 +5150,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5029
5150
|
zIndex: 2
|
|
5030
5151
|
},
|
|
5031
5152
|
children: [
|
|
5032
|
-
/* @__PURE__ */
|
|
5153
|
+
/* @__PURE__ */ jsxs39(
|
|
5033
5154
|
"div",
|
|
5034
5155
|
{
|
|
5035
5156
|
style: {
|
|
@@ -5049,18 +5170,18 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5049
5170
|
boxSizing: "border-box"
|
|
5050
5171
|
},
|
|
5051
5172
|
children: [
|
|
5052
|
-
/* @__PURE__ */
|
|
5053
|
-
/* @__PURE__ */
|
|
5054
|
-
/* @__PURE__ */
|
|
5055
|
-
/* @__PURE__ */
|
|
5173
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23" }),
|
|
5174
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E27\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21" }),
|
|
5175
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E2A\u0E48\u0E07" }),
|
|
5176
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E2A\u0E16\u0E32\u0E19\u0E30" })
|
|
5056
5177
|
]
|
|
5057
5178
|
}
|
|
5058
5179
|
),
|
|
5059
|
-
/* @__PURE__ */
|
|
5180
|
+
/* @__PURE__ */ jsx48("div", { ref: dataContainerRef, children: data.map((element) => /* @__PURE__ */ jsx48(ProjectRow, { element, barHeight, barSpacing }, element.id)) })
|
|
5060
5181
|
]
|
|
5061
5182
|
}
|
|
5062
5183
|
),
|
|
5063
|
-
/* @__PURE__ */
|
|
5184
|
+
/* @__PURE__ */ jsx48(
|
|
5064
5185
|
"div",
|
|
5065
5186
|
{
|
|
5066
5187
|
style: {
|
|
@@ -5069,7 +5190,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5069
5190
|
position: "relative",
|
|
5070
5191
|
overflow: "visible"
|
|
5071
5192
|
},
|
|
5072
|
-
children: /* @__PURE__ */
|
|
5193
|
+
children: /* @__PURE__ */ jsx48(
|
|
5073
5194
|
"div",
|
|
5074
5195
|
{
|
|
5075
5196
|
style: {
|
|
@@ -5078,7 +5199,7 @@ var GanttChart = ({ data, width, height }) => {
|
|
|
5078
5199
|
width: "max-content",
|
|
5079
5200
|
zIndex: 1
|
|
5080
5201
|
},
|
|
5081
|
-
children: /* @__PURE__ */
|
|
5202
|
+
children: /* @__PURE__ */ jsx48("svg", { ref: svgRef })
|
|
5082
5203
|
}
|
|
5083
5204
|
)
|
|
5084
5205
|
}
|
|
@@ -5133,6 +5254,7 @@ export {
|
|
|
5133
5254
|
SwitchSelect,
|
|
5134
5255
|
TabProject,
|
|
5135
5256
|
TabSelectionButton,
|
|
5257
|
+
TertiaryButton,
|
|
5136
5258
|
TextAreaInput,
|
|
5137
5259
|
TextInput,
|
|
5138
5260
|
TopNavBar,
|