@esic-lab/data-core-ui 0.0.77 → 0.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -25
- package/dist/index.d.ts +1 -25
- package/dist/index.js +406 -517
- package/dist/index.mjs +386 -495
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1719,114 +1719,9 @@ function DatePickerRange({
|
|
|
1719
1719
|
] });
|
|
1720
1720
|
}
|
|
1721
1721
|
|
|
1722
|
-
// src/TimePicker/TimePickerBasic/TimePickerBasic.tsx
|
|
1723
|
-
var import_dayjs3 = __toESM(require_dayjs_min());
|
|
1724
|
-
import { ConfigProvider as ConfigProvider8, TimePicker } from "antd";
|
|
1725
|
-
import thTH from "antd/locale/th_TH.js";
|
|
1726
|
-
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1727
|
-
function TimePickerBasic({
|
|
1728
|
-
value,
|
|
1729
|
-
onChange,
|
|
1730
|
-
required,
|
|
1731
|
-
label,
|
|
1732
|
-
error,
|
|
1733
|
-
placeholder,
|
|
1734
|
-
disabled,
|
|
1735
|
-
className
|
|
1736
|
-
}) {
|
|
1737
|
-
return /* @__PURE__ */ jsx26(
|
|
1738
|
-
ConfigProvider8,
|
|
1739
|
-
{
|
|
1740
|
-
locale: thTH,
|
|
1741
|
-
theme: {
|
|
1742
|
-
token: {
|
|
1743
|
-
fontFamily: "Kanit"
|
|
1744
|
-
}
|
|
1745
|
-
},
|
|
1746
|
-
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
1747
|
-
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1748
|
-
/* @__PURE__ */ jsx26("span", { className: "body-1", children: label }),
|
|
1749
|
-
" ",
|
|
1750
|
-
required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
1751
|
-
] }),
|
|
1752
|
-
/* @__PURE__ */ jsx26(
|
|
1753
|
-
TimePicker,
|
|
1754
|
-
{
|
|
1755
|
-
format: "HH:mm",
|
|
1756
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1757
|
-
value: value ? (0, import_dayjs3.default)(value) : null,
|
|
1758
|
-
placeholder,
|
|
1759
|
-
onChange: (time) => {
|
|
1760
|
-
onChange(time ? time.toDate() : null);
|
|
1761
|
-
},
|
|
1762
|
-
allowClear: true,
|
|
1763
|
-
disabled
|
|
1764
|
-
}
|
|
1765
|
-
),
|
|
1766
|
-
error && /* @__PURE__ */ jsx26("p", { className: "text-red-500 caption-1", children: error })
|
|
1767
|
-
] })
|
|
1768
|
-
}
|
|
1769
|
-
);
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
// src/TimePicker/TimePickerRangePicker/TimerPickerRangePicker.tsx
|
|
1773
|
-
var import_dayjs4 = __toESM(require_dayjs_min());
|
|
1774
|
-
import { ConfigProvider as ConfigProvider9, TimePicker as TimePicker2 } from "antd";
|
|
1775
|
-
import thTH2 from "antd/locale/th_TH.js";
|
|
1776
|
-
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1777
|
-
function TimePickerRangePicker({
|
|
1778
|
-
value,
|
|
1779
|
-
onChange,
|
|
1780
|
-
placeholder = ["\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19", "\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"],
|
|
1781
|
-
label,
|
|
1782
|
-
required,
|
|
1783
|
-
error,
|
|
1784
|
-
disabled,
|
|
1785
|
-
className
|
|
1786
|
-
}) {
|
|
1787
|
-
return /* @__PURE__ */ jsx27(
|
|
1788
|
-
ConfigProvider9,
|
|
1789
|
-
{
|
|
1790
|
-
locale: thTH2,
|
|
1791
|
-
theme: {
|
|
1792
|
-
token: {
|
|
1793
|
-
fontFamily: "Kanit"
|
|
1794
|
-
}
|
|
1795
|
-
},
|
|
1796
|
-
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
1797
|
-
/* @__PURE__ */ jsxs20("div", { children: [
|
|
1798
|
-
/* @__PURE__ */ jsx27("span", { className: "body-1", children: label }),
|
|
1799
|
-
" ",
|
|
1800
|
-
required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
1801
|
-
] }),
|
|
1802
|
-
/* @__PURE__ */ jsx27(
|
|
1803
|
-
TimePicker2.RangePicker,
|
|
1804
|
-
{
|
|
1805
|
-
format: "HH:mm",
|
|
1806
|
-
value: value ? [value[0] ? (0, import_dayjs4.default)(value[0]) : null, value[1] ? (0, import_dayjs4.default)(value[1]) : null] : null,
|
|
1807
|
-
placeholder,
|
|
1808
|
-
className: `body-1 w-full ${className ?? ""}`,
|
|
1809
|
-
onChange: (dates, dateStrings) => {
|
|
1810
|
-
if (!dates) {
|
|
1811
|
-
onChange(null);
|
|
1812
|
-
} else {
|
|
1813
|
-
onChange([dates[0] ? dates[0].toDate() : null, dates[1] ? dates[1].toDate() : null]);
|
|
1814
|
-
}
|
|
1815
|
-
},
|
|
1816
|
-
allowClear: true,
|
|
1817
|
-
disabled,
|
|
1818
|
-
showNow: true
|
|
1819
|
-
}
|
|
1820
|
-
),
|
|
1821
|
-
error && /* @__PURE__ */ jsx27("p", { className: "text-red-500 caption-1", children: error })
|
|
1822
|
-
] })
|
|
1823
|
-
}
|
|
1824
|
-
);
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
1722
|
// src/ColorPicker/ColorPickerBasic/ColorPicker.tsx
|
|
1828
|
-
import { ConfigProvider as
|
|
1829
|
-
import { jsx as
|
|
1723
|
+
import { ConfigProvider as ConfigProvider8, ColorPicker } from "antd";
|
|
1724
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1830
1725
|
function ColorPickerBasic({
|
|
1831
1726
|
value,
|
|
1832
1727
|
onChange,
|
|
@@ -1839,8 +1734,8 @@ function ColorPickerBasic({
|
|
|
1839
1734
|
className,
|
|
1840
1735
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2A\u0E35"
|
|
1841
1736
|
}) {
|
|
1842
|
-
return /* @__PURE__ */
|
|
1843
|
-
|
|
1737
|
+
return /* @__PURE__ */ jsx26(
|
|
1738
|
+
ConfigProvider8,
|
|
1844
1739
|
{
|
|
1845
1740
|
theme: {
|
|
1846
1741
|
token: {
|
|
@@ -1848,13 +1743,13 @@ function ColorPickerBasic({
|
|
|
1848
1743
|
fontSize: 16
|
|
1849
1744
|
}
|
|
1850
1745
|
},
|
|
1851
|
-
children: /* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
1746
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "container-input", children: [
|
|
1747
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
1748
|
+
/* @__PURE__ */ jsx26("span", { className: "body-1", children: label }),
|
|
1854
1749
|
" ",
|
|
1855
|
-
required && /* @__PURE__ */
|
|
1750
|
+
required && /* @__PURE__ */ jsx26("span", { className: "text-red-500", children: "*" })
|
|
1856
1751
|
] }),
|
|
1857
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ jsx26(
|
|
1858
1753
|
ColorPicker,
|
|
1859
1754
|
{
|
|
1860
1755
|
defaultFormat,
|
|
@@ -1866,9 +1761,9 @@ function ColorPickerBasic({
|
|
|
1866
1761
|
showText: (color) => {
|
|
1867
1762
|
const hex = color.toHexString();
|
|
1868
1763
|
if (!value) {
|
|
1869
|
-
return /* @__PURE__ */
|
|
1764
|
+
return /* @__PURE__ */ jsx26("span", { children: placeholder });
|
|
1870
1765
|
}
|
|
1871
|
-
return /* @__PURE__ */
|
|
1766
|
+
return /* @__PURE__ */ jsxs19("span", { children: [
|
|
1872
1767
|
"(",
|
|
1873
1768
|
hex,
|
|
1874
1769
|
")"
|
|
@@ -1877,14 +1772,14 @@ function ColorPickerBasic({
|
|
|
1877
1772
|
disabled
|
|
1878
1773
|
}
|
|
1879
1774
|
),
|
|
1880
|
-
error && /* @__PURE__ */
|
|
1775
|
+
error && /* @__PURE__ */ jsx26("p", { className: "text-red-500 caption-1", children: error })
|
|
1881
1776
|
] })
|
|
1882
1777
|
}
|
|
1883
1778
|
);
|
|
1884
1779
|
}
|
|
1885
1780
|
|
|
1886
1781
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
1887
|
-
import { ConfigProvider as
|
|
1782
|
+
import { ConfigProvider as ConfigProvider9, ColorPicker as ColorPicker2, theme } from "antd";
|
|
1888
1783
|
|
|
1889
1784
|
// node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1890
1785
|
function _typeof(o) {
|
|
@@ -2586,7 +2481,7 @@ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a"
|
|
|
2586
2481
|
greyDark.primary = greyDark[5];
|
|
2587
2482
|
|
|
2588
2483
|
// src/ColorPicker/ColorPalettePickerBasic/ColorPalettePickerBasic.tsx
|
|
2589
|
-
import { jsx as
|
|
2484
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2590
2485
|
function genPresets(presets = presetPalettes) {
|
|
2591
2486
|
return Object.entries(presets).map(([label, colors]) => ({
|
|
2592
2487
|
label,
|
|
@@ -2613,8 +2508,8 @@ function ColorPalettePickerBasic({
|
|
|
2613
2508
|
red,
|
|
2614
2509
|
green
|
|
2615
2510
|
});
|
|
2616
|
-
return /* @__PURE__ */
|
|
2617
|
-
|
|
2511
|
+
return /* @__PURE__ */ jsx27(
|
|
2512
|
+
ConfigProvider9,
|
|
2618
2513
|
{
|
|
2619
2514
|
theme: {
|
|
2620
2515
|
token: {
|
|
@@ -2622,13 +2517,13 @@ function ColorPalettePickerBasic({
|
|
|
2622
2517
|
fontSize: 16
|
|
2623
2518
|
}
|
|
2624
2519
|
},
|
|
2625
|
-
children: /* @__PURE__ */
|
|
2626
|
-
/* @__PURE__ */
|
|
2627
|
-
/* @__PURE__ */
|
|
2520
|
+
children: /* @__PURE__ */ jsxs20("div", { className: "container-input", children: [
|
|
2521
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
2522
|
+
/* @__PURE__ */ jsx27("span", { className: "body-1", children: label }),
|
|
2628
2523
|
" ",
|
|
2629
|
-
required && /* @__PURE__ */
|
|
2524
|
+
required && /* @__PURE__ */ jsx27("span", { className: "text-red-500", children: "*" })
|
|
2630
2525
|
] }),
|
|
2631
|
-
/* @__PURE__ */
|
|
2526
|
+
/* @__PURE__ */ jsx27(
|
|
2632
2527
|
ColorPicker2,
|
|
2633
2528
|
{
|
|
2634
2529
|
defaultFormat,
|
|
@@ -2641,9 +2536,9 @@ function ColorPalettePickerBasic({
|
|
|
2641
2536
|
showText: (color) => {
|
|
2642
2537
|
const hex = color.toHexString();
|
|
2643
2538
|
if (!value) {
|
|
2644
|
-
return /* @__PURE__ */
|
|
2539
|
+
return /* @__PURE__ */ jsx27("span", { children: placeholder });
|
|
2645
2540
|
}
|
|
2646
|
-
return /* @__PURE__ */
|
|
2541
|
+
return /* @__PURE__ */ jsxs20("span", { children: [
|
|
2647
2542
|
"(",
|
|
2648
2543
|
hex,
|
|
2649
2544
|
")"
|
|
@@ -2653,15 +2548,15 @@ function ColorPalettePickerBasic({
|
|
|
2653
2548
|
onClear
|
|
2654
2549
|
}
|
|
2655
2550
|
),
|
|
2656
|
-
error && /* @__PURE__ */
|
|
2551
|
+
error && /* @__PURE__ */ jsx27("p", { className: "text-red-500 caption-1", children: error })
|
|
2657
2552
|
] })
|
|
2658
2553
|
}
|
|
2659
2554
|
);
|
|
2660
2555
|
}
|
|
2661
2556
|
|
|
2662
2557
|
// src/Select/SelectField/SelectField.tsx
|
|
2663
|
-
import { Select, ConfigProvider as
|
|
2664
|
-
import { jsx as
|
|
2558
|
+
import { Select, ConfigProvider as ConfigProvider10 } from "antd";
|
|
2559
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2665
2560
|
function SelectField({
|
|
2666
2561
|
value,
|
|
2667
2562
|
onChange,
|
|
@@ -2681,8 +2576,8 @@ function SelectField({
|
|
|
2681
2576
|
size = "middle",
|
|
2682
2577
|
allowClear = true
|
|
2683
2578
|
}) {
|
|
2684
|
-
return /* @__PURE__ */
|
|
2685
|
-
|
|
2579
|
+
return /* @__PURE__ */ jsx28(
|
|
2580
|
+
ConfigProvider10,
|
|
2686
2581
|
{
|
|
2687
2582
|
theme: {
|
|
2688
2583
|
token: {
|
|
@@ -2690,13 +2585,13 @@ function SelectField({
|
|
|
2690
2585
|
fontSize: 16
|
|
2691
2586
|
}
|
|
2692
2587
|
},
|
|
2693
|
-
children: /* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
2695
|
-
/* @__PURE__ */
|
|
2588
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "container-input", children: [
|
|
2589
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
2590
|
+
/* @__PURE__ */ jsx28("span", { className: "body-1", children: label }),
|
|
2696
2591
|
" ",
|
|
2697
|
-
required && /* @__PURE__ */
|
|
2592
|
+
required && /* @__PURE__ */ jsx28("span", { className: "text-red-500", children: "*" })
|
|
2698
2593
|
] }),
|
|
2699
|
-
/* @__PURE__ */
|
|
2594
|
+
/* @__PURE__ */ jsx28(
|
|
2700
2595
|
Select,
|
|
2701
2596
|
{
|
|
2702
2597
|
size,
|
|
@@ -2712,7 +2607,7 @@ function SelectField({
|
|
|
2712
2607
|
options,
|
|
2713
2608
|
mode,
|
|
2714
2609
|
onSearch: handleSearch,
|
|
2715
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2610
|
+
prefix: prefix ? /* @__PURE__ */ jsx28(
|
|
2716
2611
|
"span",
|
|
2717
2612
|
{
|
|
2718
2613
|
style: {
|
|
@@ -2729,15 +2624,15 @@ function SelectField({
|
|
|
2729
2624
|
onClear
|
|
2730
2625
|
}
|
|
2731
2626
|
),
|
|
2732
|
-
error && /* @__PURE__ */
|
|
2627
|
+
error && /* @__PURE__ */ jsx28("p", { className: "text-red-500 caption-1", children: error })
|
|
2733
2628
|
] })
|
|
2734
2629
|
}
|
|
2735
2630
|
);
|
|
2736
2631
|
}
|
|
2737
2632
|
|
|
2738
2633
|
// src/Select/SelectFieldGroup/SelectFieldGroup.tsx
|
|
2739
|
-
import { Select as Select2, ConfigProvider as
|
|
2740
|
-
import { jsx as
|
|
2634
|
+
import { Select as Select2, ConfigProvider as ConfigProvider11 } from "antd";
|
|
2635
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2741
2636
|
function SelectFieldGroup({
|
|
2742
2637
|
value,
|
|
2743
2638
|
onChange,
|
|
@@ -2756,21 +2651,21 @@ function SelectFieldGroup({
|
|
|
2756
2651
|
size = "middle",
|
|
2757
2652
|
allowClear = true
|
|
2758
2653
|
}) {
|
|
2759
|
-
return /* @__PURE__ */
|
|
2760
|
-
|
|
2654
|
+
return /* @__PURE__ */ jsx29(
|
|
2655
|
+
ConfigProvider11,
|
|
2761
2656
|
{
|
|
2762
2657
|
theme: {
|
|
2763
2658
|
token: {
|
|
2764
2659
|
fontFamily: "Kanit"
|
|
2765
2660
|
}
|
|
2766
2661
|
},
|
|
2767
|
-
children: /* @__PURE__ */
|
|
2768
|
-
/* @__PURE__ */
|
|
2769
|
-
/* @__PURE__ */
|
|
2662
|
+
children: /* @__PURE__ */ jsxs22("div", { className: "container-input", children: [
|
|
2663
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
2664
|
+
/* @__PURE__ */ jsx29("span", { className: "body-1", children: label }),
|
|
2770
2665
|
" ",
|
|
2771
|
-
required && /* @__PURE__ */
|
|
2666
|
+
required && /* @__PURE__ */ jsx29("span", { className: "text-red-500", children: "*" })
|
|
2772
2667
|
] }),
|
|
2773
|
-
/* @__PURE__ */
|
|
2668
|
+
/* @__PURE__ */ jsx29(
|
|
2774
2669
|
Select2,
|
|
2775
2670
|
{
|
|
2776
2671
|
size,
|
|
@@ -2786,7 +2681,7 @@ function SelectFieldGroup({
|
|
|
2786
2681
|
options,
|
|
2787
2682
|
mode,
|
|
2788
2683
|
onSearch: handleSearch,
|
|
2789
|
-
prefix: prefix ? /* @__PURE__ */
|
|
2684
|
+
prefix: prefix ? /* @__PURE__ */ jsx29(
|
|
2790
2685
|
"span",
|
|
2791
2686
|
{
|
|
2792
2687
|
style: {
|
|
@@ -2802,16 +2697,16 @@ function SelectFieldGroup({
|
|
|
2802
2697
|
allowClear
|
|
2803
2698
|
}
|
|
2804
2699
|
),
|
|
2805
|
-
error && /* @__PURE__ */
|
|
2700
|
+
error && /* @__PURE__ */ jsx29("p", { className: "text-red-500 caption-1", children: error })
|
|
2806
2701
|
] })
|
|
2807
2702
|
}
|
|
2808
2703
|
);
|
|
2809
2704
|
}
|
|
2810
2705
|
|
|
2811
2706
|
// src/Select/SelectFieldStatus/SelectFieldStatus.tsx
|
|
2812
|
-
import { Select as Select3, ConfigProvider as
|
|
2707
|
+
import { Select as Select3, ConfigProvider as ConfigProvider12 } from "antd";
|
|
2813
2708
|
import { DownOutlined } from "@ant-design/icons";
|
|
2814
|
-
import { jsx as
|
|
2709
|
+
import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2815
2710
|
function SelectFieldStatus({
|
|
2816
2711
|
value,
|
|
2817
2712
|
onChange,
|
|
@@ -2826,8 +2721,8 @@ function SelectFieldStatus({
|
|
|
2826
2721
|
allowClear = false
|
|
2827
2722
|
}) {
|
|
2828
2723
|
const selectedItem = options?.find((s) => s.value === value);
|
|
2829
|
-
return /* @__PURE__ */
|
|
2830
|
-
|
|
2724
|
+
return /* @__PURE__ */ jsx30(
|
|
2725
|
+
ConfigProvider12,
|
|
2831
2726
|
{
|
|
2832
2727
|
theme: {
|
|
2833
2728
|
components: {
|
|
@@ -2842,18 +2737,18 @@ function SelectFieldStatus({
|
|
|
2842
2737
|
fontFamily: "Kanit"
|
|
2843
2738
|
}
|
|
2844
2739
|
},
|
|
2845
|
-
children: /* @__PURE__ */
|
|
2846
|
-
/* @__PURE__ */
|
|
2847
|
-
/* @__PURE__ */
|
|
2740
|
+
children: /* @__PURE__ */ jsxs23("div", { className: "container-input", children: [
|
|
2741
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
2742
|
+
/* @__PURE__ */ jsx30("span", { className: "body-1", children: label }),
|
|
2848
2743
|
" ",
|
|
2849
|
-
required && /* @__PURE__ */
|
|
2744
|
+
required && /* @__PURE__ */ jsx30("span", { className: "text-red-500", children: "*" })
|
|
2850
2745
|
] }),
|
|
2851
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsx30(
|
|
2852
2747
|
Select3,
|
|
2853
2748
|
{
|
|
2854
2749
|
size,
|
|
2855
2750
|
disabled,
|
|
2856
|
-
suffixIcon: /* @__PURE__ */
|
|
2751
|
+
suffixIcon: /* @__PURE__ */ jsx30(DownOutlined, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2857
2752
|
value: value ? value : void 0,
|
|
2858
2753
|
onChange,
|
|
2859
2754
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""} `,
|
|
@@ -2865,14 +2760,14 @@ function SelectFieldStatus({
|
|
|
2865
2760
|
allowClear
|
|
2866
2761
|
}
|
|
2867
2762
|
),
|
|
2868
|
-
error && /* @__PURE__ */
|
|
2763
|
+
error && /* @__PURE__ */ jsx30("p", { className: "text-red-500 caption-1", children: error })
|
|
2869
2764
|
] })
|
|
2870
2765
|
}
|
|
2871
2766
|
);
|
|
2872
2767
|
}
|
|
2873
2768
|
|
|
2874
2769
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2875
|
-
import { Select as Select4, ConfigProvider as
|
|
2770
|
+
import { Select as Select4, ConfigProvider as ConfigProvider13 } from "antd";
|
|
2876
2771
|
|
|
2877
2772
|
// src/Select/SelectFieldStatusReport/StatusReportMockup.ts
|
|
2878
2773
|
var status = [
|
|
@@ -2882,7 +2777,7 @@ var status = [
|
|
|
2882
2777
|
|
|
2883
2778
|
// src/Select/SelectFieldStatusReport/SelectFieldStatusReport.tsx
|
|
2884
2779
|
import { DownOutlined as DownOutlined2 } from "@ant-design/icons";
|
|
2885
|
-
import { jsx as
|
|
2780
|
+
import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2886
2781
|
function SelectFieldStatusReport({
|
|
2887
2782
|
value,
|
|
2888
2783
|
onChange,
|
|
@@ -2897,8 +2792,8 @@ function SelectFieldStatusReport({
|
|
|
2897
2792
|
allowClear = false
|
|
2898
2793
|
}) {
|
|
2899
2794
|
const selectedItem = status.find((s) => s.value === value);
|
|
2900
|
-
return /* @__PURE__ */
|
|
2901
|
-
|
|
2795
|
+
return /* @__PURE__ */ jsx31(
|
|
2796
|
+
ConfigProvider13,
|
|
2902
2797
|
{
|
|
2903
2798
|
theme: {
|
|
2904
2799
|
components: {
|
|
@@ -2913,18 +2808,18 @@ function SelectFieldStatusReport({
|
|
|
2913
2808
|
fontFamily: "Kanit"
|
|
2914
2809
|
}
|
|
2915
2810
|
},
|
|
2916
|
-
children: /* @__PURE__ */
|
|
2917
|
-
/* @__PURE__ */
|
|
2918
|
-
/* @__PURE__ */
|
|
2811
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "container-input", children: [
|
|
2812
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
2813
|
+
/* @__PURE__ */ jsx31("span", { className: "body-1", children: label }),
|
|
2919
2814
|
" ",
|
|
2920
|
-
required && /* @__PURE__ */
|
|
2815
|
+
required && /* @__PURE__ */ jsx31("span", { className: "text-red-500", children: "*" })
|
|
2921
2816
|
] }),
|
|
2922
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ jsx31(
|
|
2923
2818
|
Select4,
|
|
2924
2819
|
{
|
|
2925
2820
|
size,
|
|
2926
2821
|
disabled,
|
|
2927
|
-
suffixIcon: /* @__PURE__ */
|
|
2822
|
+
suffixIcon: /* @__PURE__ */ jsx31(DownOutlined2, { style: { color: value ? "#fff" : "#D9D9D9" } }),
|
|
2928
2823
|
value: value ? value : void 0,
|
|
2929
2824
|
onChange,
|
|
2930
2825
|
className: `body-3 custom-select flex justify-center w-full ${className ?? ""}`,
|
|
@@ -2936,16 +2831,16 @@ function SelectFieldStatusReport({
|
|
|
2936
2831
|
allowClear
|
|
2937
2832
|
}
|
|
2938
2833
|
),
|
|
2939
|
-
error && /* @__PURE__ */
|
|
2834
|
+
error && /* @__PURE__ */ jsx31("p", { className: "text-red-500 caption-1", children: error })
|
|
2940
2835
|
] })
|
|
2941
2836
|
}
|
|
2942
2837
|
);
|
|
2943
2838
|
}
|
|
2944
2839
|
|
|
2945
2840
|
// src/Select/SelectFieldTag/SelectFieldTag.tsx
|
|
2946
|
-
import { Select as Select5, ConfigProvider as
|
|
2841
|
+
import { Select as Select5, ConfigProvider as ConfigProvider14 } from "antd";
|
|
2947
2842
|
import { useState as useState8 } from "react";
|
|
2948
|
-
import { jsx as
|
|
2843
|
+
import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2949
2844
|
function SelectFieldTag({
|
|
2950
2845
|
label,
|
|
2951
2846
|
required,
|
|
@@ -2980,21 +2875,21 @@ function SelectFieldTag({
|
|
|
2980
2875
|
}
|
|
2981
2876
|
onChange?.([]);
|
|
2982
2877
|
};
|
|
2983
|
-
return /* @__PURE__ */
|
|
2984
|
-
|
|
2878
|
+
return /* @__PURE__ */ jsx32(
|
|
2879
|
+
ConfigProvider14,
|
|
2985
2880
|
{
|
|
2986
2881
|
theme: {
|
|
2987
2882
|
token: {
|
|
2988
2883
|
fontFamily: "Kanit"
|
|
2989
2884
|
}
|
|
2990
2885
|
},
|
|
2991
|
-
children: /* @__PURE__ */
|
|
2992
|
-
/* @__PURE__ */
|
|
2993
|
-
/* @__PURE__ */
|
|
2886
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "container-input", children: [
|
|
2887
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2888
|
+
/* @__PURE__ */ jsx32("span", { className: "body-1", children: label }),
|
|
2994
2889
|
" ",
|
|
2995
|
-
required && /* @__PURE__ */
|
|
2890
|
+
required && /* @__PURE__ */ jsx32("span", { className: "text-red-500", children: "*" })
|
|
2996
2891
|
] }),
|
|
2997
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ jsx32(
|
|
2998
2893
|
Select5,
|
|
2999
2894
|
{
|
|
3000
2895
|
size,
|
|
@@ -3014,7 +2909,7 @@ function SelectFieldTag({
|
|
|
3014
2909
|
onClear
|
|
3015
2910
|
}
|
|
3016
2911
|
),
|
|
3017
|
-
error && /* @__PURE__ */
|
|
2912
|
+
error && /* @__PURE__ */ jsx32("p", { className: "text-red-500 caption-1", children: error })
|
|
3018
2913
|
] })
|
|
3019
2914
|
}
|
|
3020
2915
|
);
|
|
@@ -3022,9 +2917,9 @@ function SelectFieldTag({
|
|
|
3022
2917
|
|
|
3023
2918
|
// src/Select/SelectCustom/SelectCustom.tsx
|
|
3024
2919
|
import { IconTrash } from "@tabler/icons-react";
|
|
3025
|
-
import { Select as Select6, ConfigProvider as
|
|
2920
|
+
import { Select as Select6, ConfigProvider as ConfigProvider15 } from "antd";
|
|
3026
2921
|
import { useState as useState9 } from "react";
|
|
3027
|
-
import { jsx as
|
|
2922
|
+
import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3028
2923
|
function SelectCustom({
|
|
3029
2924
|
label = "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23",
|
|
3030
2925
|
placeholder = "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01",
|
|
@@ -3055,8 +2950,8 @@ function SelectCustom({
|
|
|
3055
2950
|
});
|
|
3056
2951
|
};
|
|
3057
2952
|
const filteredOptions = options.filter((opt) => !valueList.includes(opt.value)).map((opt) => ({ value: opt.value, label: opt.label }));
|
|
3058
|
-
return /* @__PURE__ */
|
|
3059
|
-
|
|
2953
|
+
return /* @__PURE__ */ jsx33(
|
|
2954
|
+
ConfigProvider15,
|
|
3060
2955
|
{
|
|
3061
2956
|
theme: {
|
|
3062
2957
|
token: {
|
|
@@ -3064,13 +2959,13 @@ function SelectCustom({
|
|
|
3064
2959
|
fontSize: 16
|
|
3065
2960
|
}
|
|
3066
2961
|
},
|
|
3067
|
-
children: /* @__PURE__ */
|
|
3068
|
-
/* @__PURE__ */
|
|
3069
|
-
/* @__PURE__ */
|
|
2962
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "container-input", children: [
|
|
2963
|
+
/* @__PURE__ */ jsxs26("div", { children: [
|
|
2964
|
+
/* @__PURE__ */ jsx33("span", { className: "body-1", children: label }),
|
|
3070
2965
|
" ",
|
|
3071
|
-
required && /* @__PURE__ */
|
|
2966
|
+
required && /* @__PURE__ */ jsx33("span", { className: "text-red-500", children: "*" })
|
|
3072
2967
|
] }),
|
|
3073
|
-
/* @__PURE__ */
|
|
2968
|
+
/* @__PURE__ */ jsx33(
|
|
3074
2969
|
Select6,
|
|
3075
2970
|
{
|
|
3076
2971
|
size,
|
|
@@ -3083,20 +2978,20 @@ function SelectCustom({
|
|
|
3083
2978
|
allowClear
|
|
3084
2979
|
}
|
|
3085
2980
|
),
|
|
3086
|
-
error && /* @__PURE__ */
|
|
3087
|
-
/* @__PURE__ */
|
|
2981
|
+
error && /* @__PURE__ */ jsx33("p", { className: "text-red-500 caption-1", children: error }),
|
|
2982
|
+
/* @__PURE__ */ jsx33("div", { className: "w-full p-[2px] overflow-y-auto", children: valueList.map((v, index) => /* @__PURE__ */ jsxs26(
|
|
3088
2983
|
"div",
|
|
3089
2984
|
{
|
|
3090
2985
|
className: "flex justify-between items-center py-[2px] body-1",
|
|
3091
2986
|
children: [
|
|
3092
|
-
/* @__PURE__ */
|
|
3093
|
-
/* @__PURE__ */
|
|
2987
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex flex-row gap-[8px]", children: [
|
|
2988
|
+
/* @__PURE__ */ jsxs26("p", { children: [
|
|
3094
2989
|
index + 1,
|
|
3095
2990
|
"."
|
|
3096
2991
|
] }),
|
|
3097
|
-
/* @__PURE__ */
|
|
2992
|
+
/* @__PURE__ */ jsx33("p", { children: v })
|
|
3098
2993
|
] }),
|
|
3099
|
-
/* @__PURE__ */
|
|
2994
|
+
/* @__PURE__ */ jsx33(
|
|
3100
2995
|
IconTrash,
|
|
3101
2996
|
{
|
|
3102
2997
|
className: "cursor-pointer",
|
|
@@ -3113,7 +3008,7 @@ function SelectCustom({
|
|
|
3113
3008
|
}
|
|
3114
3009
|
|
|
3115
3010
|
// src/SortFilter/SortFilter.tsx
|
|
3116
|
-
import { ConfigProvider as
|
|
3011
|
+
import { ConfigProvider as ConfigProvider16 } from "antd";
|
|
3117
3012
|
import { CalendarOutlined } from "@ant-design/icons";
|
|
3118
3013
|
|
|
3119
3014
|
// src/SortFilter/DataMockSortFilter.ts
|
|
@@ -3146,7 +3041,7 @@ var quarters = [
|
|
|
3146
3041
|
// src/SortFilter/SortFilter.tsx
|
|
3147
3042
|
import { useState as useState10 } from "react";
|
|
3148
3043
|
import { IconSortDescending as IconSortDescending2, IconFilter } from "@tabler/icons-react";
|
|
3149
|
-
import { jsx as
|
|
3044
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3150
3045
|
function SortFilter({
|
|
3151
3046
|
showYear = true,
|
|
3152
3047
|
showQuarter = true,
|
|
@@ -3157,20 +3052,20 @@ function SortFilter({
|
|
|
3157
3052
|
const [yearValue, setYearValue] = useState10();
|
|
3158
3053
|
const [monthValue, setMonthValue] = useState10();
|
|
3159
3054
|
const [quarterValue, setQuartersValue] = useState10();
|
|
3160
|
-
return /* @__PURE__ */
|
|
3161
|
-
|
|
3055
|
+
return /* @__PURE__ */ jsx34(
|
|
3056
|
+
ConfigProvider16,
|
|
3162
3057
|
{
|
|
3163
3058
|
theme: {
|
|
3164
3059
|
token: {
|
|
3165
3060
|
fontFamily: "Kanit"
|
|
3166
3061
|
}
|
|
3167
3062
|
},
|
|
3168
|
-
children: /* @__PURE__ */
|
|
3169
|
-
/* @__PURE__ */
|
|
3170
|
-
showYear && /* @__PURE__ */
|
|
3063
|
+
children: /* @__PURE__ */ jsxs27("div", { className: "w-full flex items-center justify-between", children: [
|
|
3064
|
+
/* @__PURE__ */ jsxs27("div", { className: "w-full flex gap-[10px]", children: [
|
|
3065
|
+
showYear && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
3171
3066
|
SelectField,
|
|
3172
3067
|
{
|
|
3173
|
-
prefix: /* @__PURE__ */
|
|
3068
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
3174
3069
|
onChange: setYearValue,
|
|
3175
3070
|
options: years.map((s) => ({
|
|
3176
3071
|
value: s.value,
|
|
@@ -3180,10 +3075,10 @@ function SortFilter({
|
|
|
3180
3075
|
value: yearValue
|
|
3181
3076
|
}
|
|
3182
3077
|
) }),
|
|
3183
|
-
showMonth && /* @__PURE__ */
|
|
3078
|
+
showMonth && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
3184
3079
|
SelectField,
|
|
3185
3080
|
{
|
|
3186
|
-
prefix: /* @__PURE__ */
|
|
3081
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
3187
3082
|
onChange: setMonthValue,
|
|
3188
3083
|
options: months.map((s) => ({
|
|
3189
3084
|
value: s.value,
|
|
@@ -3193,10 +3088,10 @@ function SortFilter({
|
|
|
3193
3088
|
placeholder: "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19"
|
|
3194
3089
|
}
|
|
3195
3090
|
) }),
|
|
3196
|
-
showQuarter && /* @__PURE__ */
|
|
3091
|
+
showQuarter && /* @__PURE__ */ jsx34("div", { className: "w-[200px]", children: /* @__PURE__ */ jsx34(
|
|
3197
3092
|
SelectField,
|
|
3198
3093
|
{
|
|
3199
|
-
prefix: /* @__PURE__ */
|
|
3094
|
+
prefix: /* @__PURE__ */ jsx34(CalendarOutlined, {}),
|
|
3200
3095
|
onChange: setQuartersValue,
|
|
3201
3096
|
options: quarters.map((s) => ({
|
|
3202
3097
|
value: s.value,
|
|
@@ -3207,8 +3102,8 @@ function SortFilter({
|
|
|
3207
3102
|
}
|
|
3208
3103
|
) })
|
|
3209
3104
|
] }),
|
|
3210
|
-
/* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */
|
|
3105
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex gap-[10px]", children: [
|
|
3106
|
+
/* @__PURE__ */ jsx34(
|
|
3212
3107
|
IconSortDescending2,
|
|
3213
3108
|
{
|
|
3214
3109
|
size: 24,
|
|
@@ -3216,7 +3111,7 @@ function SortFilter({
|
|
|
3216
3111
|
onClick: onSortClick
|
|
3217
3112
|
}
|
|
3218
3113
|
),
|
|
3219
|
-
/* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ jsx34(
|
|
3220
3115
|
IconFilter,
|
|
3221
3116
|
{
|
|
3222
3117
|
size: 24,
|
|
@@ -3233,7 +3128,30 @@ function SortFilter({
|
|
|
3233
3128
|
// src/Upload/FileUploader/FileUploader.tsx
|
|
3234
3129
|
import { IconUpload, IconTrash as IconTrash2, IconFileDescription } from "@tabler/icons-react";
|
|
3235
3130
|
import { useRef as useRef4, useState as useState11 } from "react";
|
|
3236
|
-
|
|
3131
|
+
|
|
3132
|
+
// src/Message/Message/Message.tsx
|
|
3133
|
+
var messageApi = null;
|
|
3134
|
+
function setMessageApi(api) {
|
|
3135
|
+
messageApi = api;
|
|
3136
|
+
}
|
|
3137
|
+
function messageSuccess(content) {
|
|
3138
|
+
messageApi?.success({ content, className: "message message-success" });
|
|
3139
|
+
}
|
|
3140
|
+
function messageError(content) {
|
|
3141
|
+
messageApi?.error({ content, className: "message message-error" });
|
|
3142
|
+
}
|
|
3143
|
+
function messageWarning(content) {
|
|
3144
|
+
messageApi?.warning({ content, className: "message message-warning" });
|
|
3145
|
+
}
|
|
3146
|
+
function messageInfo(content) {
|
|
3147
|
+
messageApi?.info({ content, className: "message message-info" });
|
|
3148
|
+
}
|
|
3149
|
+
function messageLoading(content, duration) {
|
|
3150
|
+
messageApi?.loading({ content, duration, className: "message message-loading" });
|
|
3151
|
+
}
|
|
3152
|
+
|
|
3153
|
+
// src/Upload/FileUploader/FileUploader.tsx
|
|
3154
|
+
import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3237
3155
|
function FileUploader({
|
|
3238
3156
|
onUpload,
|
|
3239
3157
|
onError,
|
|
@@ -3259,11 +3177,13 @@ function FileUploader({
|
|
|
3259
3177
|
const validateFile = (file) => {
|
|
3260
3178
|
if (accept && !accept.includes(file.type)) {
|
|
3261
3179
|
onError?.(`Invalid file type. file: ${file.name}`);
|
|
3262
|
-
|
|
3180
|
+
messageError("\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E1F\u0E25\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07");
|
|
3181
|
+
return false;
|
|
3263
3182
|
}
|
|
3264
3183
|
if (maxSize && file.size > maxSize * 1024 * 1024) {
|
|
3265
3184
|
onError?.(`Invalid file size. file: ${file.name}`);
|
|
3266
|
-
|
|
3185
|
+
messageError(`\u0E02\u0E19\u0E32\u0E14\u0E44\u0E1F\u0E25\u0E4C\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14 ${maxSize} MB`);
|
|
3186
|
+
return false;
|
|
3267
3187
|
}
|
|
3268
3188
|
return true;
|
|
3269
3189
|
};
|
|
@@ -3297,21 +3217,15 @@ function FileUploader({
|
|
|
3297
3217
|
if (!files) return;
|
|
3298
3218
|
const fileArray = Array.from(files);
|
|
3299
3219
|
for (const file of fileArray) {
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
} catch (e) {
|
|
3303
|
-
continue;
|
|
3304
|
-
}
|
|
3220
|
+
const isValid = validateFile(file);
|
|
3221
|
+
if (!isValid) continue;
|
|
3305
3222
|
setUploading(true);
|
|
3306
3223
|
try {
|
|
3307
|
-
|
|
3308
|
-
await onUpload(file);
|
|
3309
|
-
}
|
|
3224
|
+
await onUpload(file);
|
|
3310
3225
|
if (!value) {
|
|
3311
3226
|
setInternalFileList((prev) => [...prev, file]);
|
|
3312
3227
|
}
|
|
3313
3228
|
} catch (err) {
|
|
3314
|
-
console.log("catch");
|
|
3315
3229
|
console.error(err);
|
|
3316
3230
|
} finally {
|
|
3317
3231
|
setUploading(false);
|
|
@@ -3319,10 +3233,10 @@ function FileUploader({
|
|
|
3319
3233
|
}
|
|
3320
3234
|
if (inputRef.current) inputRef.current.value = "";
|
|
3321
3235
|
};
|
|
3322
|
-
return /* @__PURE__ */
|
|
3323
|
-
label && /* @__PURE__ */
|
|
3324
|
-
!readOnly && /* @__PURE__ */
|
|
3325
|
-
mode === "upload" ? /* @__PURE__ */
|
|
3236
|
+
return /* @__PURE__ */ jsxs28("div", { className: "w-full", children: [
|
|
3237
|
+
label && /* @__PURE__ */ jsx35("p", { className: "body-1", children: label }),
|
|
3238
|
+
!readOnly && /* @__PURE__ */ jsxs28("div", { className: uploaderWidth, children: [
|
|
3239
|
+
mode === "upload" ? /* @__PURE__ */ jsx35(
|
|
3326
3240
|
"button",
|
|
3327
3241
|
{
|
|
3328
3242
|
type: "button",
|
|
@@ -3330,16 +3244,16 @@ function FileUploader({
|
|
|
3330
3244
|
className: `h-[34px] flex justify-center items-center gap-2 w-full rounded-[2px] border border-gray-200 body-1
|
|
3331
3245
|
${disabled ? "cursor-not-allowed text-gray-400 bg-gray-100" : "cursor-pointer hover:text-primary-400 hover:border-primary-200 duration-300"}`,
|
|
3332
3246
|
disabled: disabled ? disabled : uploading,
|
|
3333
|
-
children: uploading ? /* @__PURE__ */
|
|
3334
|
-
/* @__PURE__ */
|
|
3247
|
+
children: uploading ? /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
3248
|
+
/* @__PURE__ */ jsx35(Loader, { size: 15 }),
|
|
3335
3249
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3336
|
-
] }) : /* @__PURE__ */
|
|
3337
|
-
/* @__PURE__ */
|
|
3250
|
+
] }) : /* @__PURE__ */ jsxs28(Fragment5, { children: [
|
|
3251
|
+
/* @__PURE__ */ jsx35(IconUpload, { size: 15, className: "text-gray-400" }),
|
|
3338
3252
|
" ",
|
|
3339
3253
|
uploadText
|
|
3340
3254
|
] })
|
|
3341
3255
|
}
|
|
3342
|
-
) : /* @__PURE__ */
|
|
3256
|
+
) : /* @__PURE__ */ jsx35(
|
|
3343
3257
|
"div",
|
|
3344
3258
|
{
|
|
3345
3259
|
className: `w-full min-h-[120px] flex justify-center items-center border-2 border-dashed rounded-md p-4 transition-colors body-1
|
|
@@ -3353,17 +3267,17 @@ function FileUploader({
|
|
|
3353
3267
|
},
|
|
3354
3268
|
onDragLeave: () => setDragActive(false),
|
|
3355
3269
|
onDrop: handleDrop,
|
|
3356
|
-
children: uploading ? /* @__PURE__ */
|
|
3357
|
-
/* @__PURE__ */
|
|
3270
|
+
children: uploading ? /* @__PURE__ */ jsxs28("div", { className: "flex justify-center items-center gap-2", children: [
|
|
3271
|
+
/* @__PURE__ */ jsx35(Loader, { size: 15 }),
|
|
3358
3272
|
" \u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14"
|
|
3359
|
-
] }) : /* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
3361
|
-
/* @__PURE__ */
|
|
3362
|
-
/* @__PURE__ */
|
|
3273
|
+
] }) : /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3274
|
+
/* @__PURE__ */ jsx35(IconUpload, { size: 20 }),
|
|
3275
|
+
/* @__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" }),
|
|
3276
|
+
/* @__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" })
|
|
3363
3277
|
] })
|
|
3364
3278
|
}
|
|
3365
3279
|
),
|
|
3366
|
-
/* @__PURE__ */
|
|
3280
|
+
/* @__PURE__ */ jsx35(
|
|
3367
3281
|
"input",
|
|
3368
3282
|
{
|
|
3369
3283
|
type: "file",
|
|
@@ -3376,8 +3290,8 @@ function FileUploader({
|
|
|
3376
3290
|
}
|
|
3377
3291
|
)
|
|
3378
3292
|
] }),
|
|
3379
|
-
description && /* @__PURE__ */
|
|
3380
|
-
/* @__PURE__ */
|
|
3293
|
+
description && /* @__PURE__ */ jsx35("p", { className: "text-gray-400 body-4", children: description }),
|
|
3294
|
+
/* @__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(
|
|
3381
3295
|
"div",
|
|
3382
3296
|
{
|
|
3383
3297
|
className: `flex px-[16px] hover:bg-primary-50 hover:cursor-pointer
|
|
@@ -3387,11 +3301,11 @@ function FileUploader({
|
|
|
3387
3301
|
${index !== 0 ? "pt-[16px]" : ""}`,
|
|
3388
3302
|
onClick: () => onClickFile && onClickFile(file),
|
|
3389
3303
|
children: [
|
|
3390
|
-
/* @__PURE__ */
|
|
3391
|
-
/* @__PURE__ */
|
|
3392
|
-
/* @__PURE__ */
|
|
3304
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex gap-2 overflow-hidden", children: [
|
|
3305
|
+
/* @__PURE__ */ jsx35("div", { className: "w-[24px] h-[24px] flex items-center justify-center", children: /* @__PURE__ */ jsx35(IconFileDescription, { size: 20 }) }),
|
|
3306
|
+
/* @__PURE__ */ jsx35("span", { className: "truncate", children: file.name || file.fileName })
|
|
3393
3307
|
] }),
|
|
3394
|
-
!readOnly && !disabled && /* @__PURE__ */
|
|
3308
|
+
!readOnly && !disabled && /* @__PURE__ */ jsx35(
|
|
3395
3309
|
IconTrash2,
|
|
3396
3310
|
{
|
|
3397
3311
|
size: 20,
|
|
@@ -3409,31 +3323,10 @@ function FileUploader({
|
|
|
3409
3323
|
] });
|
|
3410
3324
|
}
|
|
3411
3325
|
|
|
3412
|
-
// src/Message/Message/Message.tsx
|
|
3413
|
-
var messageApi = null;
|
|
3414
|
-
function setMessageApi(api) {
|
|
3415
|
-
messageApi = api;
|
|
3416
|
-
}
|
|
3417
|
-
function messageSuccess(content) {
|
|
3418
|
-
messageApi?.success({ content, className: "message message-success" });
|
|
3419
|
-
}
|
|
3420
|
-
function messageError(content) {
|
|
3421
|
-
messageApi?.error({ content, className: "message message-error" });
|
|
3422
|
-
}
|
|
3423
|
-
function messageWarning(content) {
|
|
3424
|
-
messageApi?.warning({ content, className: "message message-warning" });
|
|
3425
|
-
}
|
|
3426
|
-
function messageInfo(content) {
|
|
3427
|
-
messageApi?.info({ content, className: "message message-info" });
|
|
3428
|
-
}
|
|
3429
|
-
function messageLoading(content, duration) {
|
|
3430
|
-
messageApi?.loading({ content, duration, className: "message message-loading" });
|
|
3431
|
-
}
|
|
3432
|
-
|
|
3433
3326
|
// src/Breadcrumb/Breadcrumb.tsx
|
|
3434
|
-
import { ConfigProvider as
|
|
3327
|
+
import { ConfigProvider as ConfigProvider17 } from "antd";
|
|
3435
3328
|
import { Breadcrumb } from "antd";
|
|
3436
|
-
import { jsx as
|
|
3329
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3437
3330
|
function Breadcrumbs({
|
|
3438
3331
|
items,
|
|
3439
3332
|
separator,
|
|
@@ -3441,15 +3334,15 @@ function Breadcrumbs({
|
|
|
3441
3334
|
classname,
|
|
3442
3335
|
params
|
|
3443
3336
|
}) {
|
|
3444
|
-
return /* @__PURE__ */
|
|
3445
|
-
|
|
3337
|
+
return /* @__PURE__ */ jsx36(
|
|
3338
|
+
ConfigProvider17,
|
|
3446
3339
|
{
|
|
3447
3340
|
theme: {
|
|
3448
3341
|
token: {
|
|
3449
3342
|
fontFamily: "Kanit"
|
|
3450
3343
|
}
|
|
3451
3344
|
},
|
|
3452
|
-
children: /* @__PURE__ */
|
|
3345
|
+
children: /* @__PURE__ */ jsx36(
|
|
3453
3346
|
Breadcrumb,
|
|
3454
3347
|
{
|
|
3455
3348
|
items,
|
|
@@ -3464,8 +3357,8 @@ function Breadcrumbs({
|
|
|
3464
3357
|
}
|
|
3465
3358
|
|
|
3466
3359
|
// src/HeadingPage/HeadingPage.tsx
|
|
3467
|
-
import { ConfigProvider as
|
|
3468
|
-
import { jsx as
|
|
3360
|
+
import { ConfigProvider as ConfigProvider18 } from "antd";
|
|
3361
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3469
3362
|
function HeadingPage({ Heading }) {
|
|
3470
3363
|
const today = (/* @__PURE__ */ new Date()).toLocaleDateString("th-TH", {
|
|
3471
3364
|
weekday: "long",
|
|
@@ -3473,17 +3366,17 @@ function HeadingPage({ Heading }) {
|
|
|
3473
3366
|
month: "long",
|
|
3474
3367
|
year: "numeric"
|
|
3475
3368
|
});
|
|
3476
|
-
return /* @__PURE__ */
|
|
3477
|
-
|
|
3369
|
+
return /* @__PURE__ */ jsx37(
|
|
3370
|
+
ConfigProvider18,
|
|
3478
3371
|
{
|
|
3479
3372
|
theme: {
|
|
3480
3373
|
token: {
|
|
3481
3374
|
fontFamily: "Kanit"
|
|
3482
3375
|
}
|
|
3483
3376
|
},
|
|
3484
|
-
children: /* @__PURE__ */
|
|
3485
|
-
/* @__PURE__ */
|
|
3486
|
-
/* @__PURE__ */
|
|
3377
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-[10px] px-[20px] py-[10px]", children: [
|
|
3378
|
+
/* @__PURE__ */ jsx37("p", { className: "headline-5", children: Heading }),
|
|
3379
|
+
/* @__PURE__ */ jsxs29("p", { className: "body-1", children: [
|
|
3487
3380
|
" \u0E27\u0E31\u0E19\u0E19\u0E35\u0E49 ",
|
|
3488
3381
|
today
|
|
3489
3382
|
] })
|
|
@@ -3493,9 +3386,9 @@ function HeadingPage({ Heading }) {
|
|
|
3493
3386
|
}
|
|
3494
3387
|
|
|
3495
3388
|
// src/Progress/ProgressBar.tsx
|
|
3496
|
-
import { ConfigProvider as
|
|
3389
|
+
import { ConfigProvider as ConfigProvider19, Progress } from "antd";
|
|
3497
3390
|
import { useEffect as useEffect4, useRef as useRef5, useState as useState12 } from "react";
|
|
3498
|
-
import { jsx as
|
|
3391
|
+
import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3499
3392
|
function ProgressBar({
|
|
3500
3393
|
percent = 0,
|
|
3501
3394
|
size = "default",
|
|
@@ -3526,16 +3419,16 @@ function ProgressBar({
|
|
|
3526
3419
|
observer.observe(inner);
|
|
3527
3420
|
return () => observer.disconnect();
|
|
3528
3421
|
}, []);
|
|
3529
|
-
return /* @__PURE__ */
|
|
3530
|
-
|
|
3422
|
+
return /* @__PURE__ */ jsx38(
|
|
3423
|
+
ConfigProvider19,
|
|
3531
3424
|
{
|
|
3532
3425
|
theme: {
|
|
3533
3426
|
token: {
|
|
3534
3427
|
fontFamily: "Kanit"
|
|
3535
3428
|
}
|
|
3536
3429
|
},
|
|
3537
|
-
children: /* @__PURE__ */
|
|
3538
|
-
/* @__PURE__ */
|
|
3430
|
+
children: /* @__PURE__ */ jsxs30("div", { className: "relative w-full", ref: progressRef, children: [
|
|
3431
|
+
/* @__PURE__ */ jsx38(
|
|
3539
3432
|
Progress,
|
|
3540
3433
|
{
|
|
3541
3434
|
className: "w-full",
|
|
@@ -3551,7 +3444,7 @@ function ProgressBar({
|
|
|
3551
3444
|
strokeColor
|
|
3552
3445
|
}
|
|
3553
3446
|
),
|
|
3554
|
-
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */
|
|
3447
|
+
barWidth > 0 && isCheckPoints && type !== "circle" && checkpoints.map((cp) => /* @__PURE__ */ jsx38(
|
|
3555
3448
|
"div",
|
|
3556
3449
|
{
|
|
3557
3450
|
className: "checkpoint absolute top-0",
|
|
@@ -3573,7 +3466,7 @@ function ProgressBar({
|
|
|
3573
3466
|
}
|
|
3574
3467
|
|
|
3575
3468
|
// src/KpiSection/KpiSection.tsx
|
|
3576
|
-
import { ConfigProvider as
|
|
3469
|
+
import { ConfigProvider as ConfigProvider20, message } from "antd";
|
|
3577
3470
|
import { useEffect as useEffect5, useState as useState14 } from "react";
|
|
3578
3471
|
|
|
3579
3472
|
// src/KpiSection/hooks/useGetKpiSection.ts
|
|
@@ -3724,7 +3617,7 @@ function useGetKpiSection() {
|
|
|
3724
3617
|
|
|
3725
3618
|
// src/KpiSection/KpiSection.tsx
|
|
3726
3619
|
import { IconCheck as IconCheck2, IconCirclePlus, IconPencil, IconTrash as IconTrash3, IconX as IconX2 } from "@tabler/icons-react";
|
|
3727
|
-
import { Fragment as Fragment6, jsx as
|
|
3620
|
+
import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3728
3621
|
function KpiSection({ type, onChangeKpiList }) {
|
|
3729
3622
|
const {
|
|
3730
3623
|
handleAddKpi,
|
|
@@ -3754,8 +3647,8 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3754
3647
|
onChangeKpiList(kpiList);
|
|
3755
3648
|
}
|
|
3756
3649
|
}, [kpiList]);
|
|
3757
|
-
return /* @__PURE__ */
|
|
3758
|
-
|
|
3650
|
+
return /* @__PURE__ */ jsx39(
|
|
3651
|
+
ConfigProvider20,
|
|
3759
3652
|
{
|
|
3760
3653
|
theme: {
|
|
3761
3654
|
token: {
|
|
@@ -3763,11 +3656,11 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3763
3656
|
fontSize: 16
|
|
3764
3657
|
}
|
|
3765
3658
|
},
|
|
3766
|
-
children: /* @__PURE__ */
|
|
3659
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "container-input", children: [
|
|
3767
3660
|
messageContainer,
|
|
3768
|
-
type === "number" && /* @__PURE__ */
|
|
3769
|
-
/* @__PURE__ */
|
|
3770
|
-
/* @__PURE__ */
|
|
3661
|
+
type === "number" && /* @__PURE__ */ jsxs31("div", { className: "space-y-4", children: [
|
|
3662
|
+
/* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-[1fr_200px_200px_50px] w-full gap-[24px] items-start", children: [
|
|
3663
|
+
/* @__PURE__ */ jsx39(
|
|
3771
3664
|
InputField,
|
|
3772
3665
|
{
|
|
3773
3666
|
value: nameKpi,
|
|
@@ -3779,7 +3672,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3779
3672
|
error: errors.nameKpi
|
|
3780
3673
|
}
|
|
3781
3674
|
),
|
|
3782
|
-
/* @__PURE__ */
|
|
3675
|
+
/* @__PURE__ */ jsx39(
|
|
3783
3676
|
InputField,
|
|
3784
3677
|
{
|
|
3785
3678
|
value: kpiValue,
|
|
@@ -3803,7 +3696,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3803
3696
|
error: errors.kpiValue
|
|
3804
3697
|
}
|
|
3805
3698
|
),
|
|
3806
|
-
/* @__PURE__ */
|
|
3699
|
+
/* @__PURE__ */ jsx39(
|
|
3807
3700
|
InputField,
|
|
3808
3701
|
{
|
|
3809
3702
|
value: unitValue,
|
|
@@ -3815,7 +3708,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3815
3708
|
error: errors.unitValue
|
|
3816
3709
|
}
|
|
3817
3710
|
),
|
|
3818
|
-
/* @__PURE__ */
|
|
3711
|
+
/* @__PURE__ */ jsx39("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx39(
|
|
3819
3712
|
IconCirclePlus,
|
|
3820
3713
|
{
|
|
3821
3714
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3824,17 +3717,17 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3824
3717
|
}
|
|
3825
3718
|
) })
|
|
3826
3719
|
] }),
|
|
3827
|
-
/* @__PURE__ */
|
|
3720
|
+
/* @__PURE__ */ jsx39("div", { children: kpiList.map((kpi, index) => /* @__PURE__ */ jsxs31(
|
|
3828
3721
|
"div",
|
|
3829
3722
|
{
|
|
3830
3723
|
className: "grid grid-cols-[30px_1fr_100px_120px_80px] items-start py-2 body-1 gap-[8px]",
|
|
3831
3724
|
children: [
|
|
3832
|
-
/* @__PURE__ */
|
|
3725
|
+
/* @__PURE__ */ jsxs31("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3833
3726
|
index + 1,
|
|
3834
3727
|
"."
|
|
3835
3728
|
] }),
|
|
3836
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3837
|
-
/* @__PURE__ */
|
|
3729
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3730
|
+
/* @__PURE__ */ jsx39(
|
|
3838
3731
|
InputField,
|
|
3839
3732
|
{
|
|
3840
3733
|
value: kpi.name,
|
|
@@ -3844,7 +3737,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3844
3737
|
error: itemErrors[kpi.id]?.name
|
|
3845
3738
|
}
|
|
3846
3739
|
),
|
|
3847
|
-
/* @__PURE__ */
|
|
3740
|
+
/* @__PURE__ */ jsx39(
|
|
3848
3741
|
InputField,
|
|
3849
3742
|
{
|
|
3850
3743
|
value: kpi.value?.toString(),
|
|
@@ -3869,7 +3762,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3869
3762
|
error: itemErrors[kpi.id]?.value
|
|
3870
3763
|
}
|
|
3871
3764
|
),
|
|
3872
|
-
/* @__PURE__ */
|
|
3765
|
+
/* @__PURE__ */ jsx39(
|
|
3873
3766
|
InputField,
|
|
3874
3767
|
{
|
|
3875
3768
|
value: kpi.unit,
|
|
@@ -3879,29 +3772,29 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3879
3772
|
error: itemErrors[kpi.id]?.unit
|
|
3880
3773
|
}
|
|
3881
3774
|
),
|
|
3882
|
-
/* @__PURE__ */
|
|
3775
|
+
/* @__PURE__ */ jsxs31(
|
|
3883
3776
|
"div",
|
|
3884
3777
|
{
|
|
3885
3778
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.value || !!itemErrors[kpi.id]?.unit || !!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3886
3779
|
children: [
|
|
3887
|
-
/* @__PURE__ */
|
|
3780
|
+
/* @__PURE__ */ jsx39(
|
|
3888
3781
|
IconCheck2,
|
|
3889
3782
|
{
|
|
3890
3783
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3891
3784
|
onClick: () => handleSave(kpi.id, type)
|
|
3892
3785
|
}
|
|
3893
3786
|
),
|
|
3894
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ jsx39(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3895
3788
|
]
|
|
3896
3789
|
}
|
|
3897
3790
|
)
|
|
3898
|
-
] }) : /* @__PURE__ */
|
|
3899
|
-
/* @__PURE__ */
|
|
3900
|
-
/* @__PURE__ */
|
|
3901
|
-
/* @__PURE__ */
|
|
3902
|
-
/* @__PURE__ */
|
|
3903
|
-
/* @__PURE__ */
|
|
3904
|
-
/* @__PURE__ */
|
|
3791
|
+
] }) : /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3792
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.name }),
|
|
3793
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.value }),
|
|
3794
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.unit }),
|
|
3795
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex gap-3 justify-end", children: [
|
|
3796
|
+
/* @__PURE__ */ jsx39(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3797
|
+
/* @__PURE__ */ jsx39(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3905
3798
|
] })
|
|
3906
3799
|
] })
|
|
3907
3800
|
]
|
|
@@ -3909,9 +3802,9 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3909
3802
|
kpi.id
|
|
3910
3803
|
)) })
|
|
3911
3804
|
] }),
|
|
3912
|
-
type === "text" && /* @__PURE__ */
|
|
3913
|
-
/* @__PURE__ */
|
|
3914
|
-
/* @__PURE__ */
|
|
3805
|
+
type === "text" && /* @__PURE__ */ jsxs31("div", { className: "space-y-4", children: [
|
|
3806
|
+
/* @__PURE__ */ jsxs31("div", { className: "grid grid-cols-[1fr_50px] w-full gap-[24px] items-start", children: [
|
|
3807
|
+
/* @__PURE__ */ jsx39(
|
|
3915
3808
|
InputField,
|
|
3916
3809
|
{
|
|
3917
3810
|
value: nameKpi,
|
|
@@ -3923,7 +3816,7 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3923
3816
|
error: errors.nameKpi
|
|
3924
3817
|
}
|
|
3925
3818
|
),
|
|
3926
|
-
/* @__PURE__ */
|
|
3819
|
+
/* @__PURE__ */ jsx39("div", { className: `flex justify-end mt-[28px]`, children: /* @__PURE__ */ jsx39(
|
|
3927
3820
|
IconCirclePlus,
|
|
3928
3821
|
{
|
|
3929
3822
|
className: "w-[40px] h-[40px] cursor-pointer hover:scale-110 transition",
|
|
@@ -3932,13 +3825,13 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3932
3825
|
}
|
|
3933
3826
|
) })
|
|
3934
3827
|
] }),
|
|
3935
|
-
/* @__PURE__ */
|
|
3936
|
-
/* @__PURE__ */
|
|
3828
|
+
/* @__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: [
|
|
3829
|
+
/* @__PURE__ */ jsxs31("p", { className: `body-1 ${kpi.isEditing ? "mt-[12px]" : ""}`, children: [
|
|
3937
3830
|
index + 1,
|
|
3938
3831
|
"."
|
|
3939
3832
|
] }),
|
|
3940
|
-
kpi.isEditing ? /* @__PURE__ */
|
|
3941
|
-
/* @__PURE__ */
|
|
3833
|
+
kpi.isEditing ? /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3834
|
+
/* @__PURE__ */ jsx39(
|
|
3942
3835
|
InputField,
|
|
3943
3836
|
{
|
|
3944
3837
|
value: kpi.name,
|
|
@@ -3948,27 +3841,27 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3948
3841
|
error: itemErrors[kpi.id]?.name
|
|
3949
3842
|
}
|
|
3950
3843
|
),
|
|
3951
|
-
/* @__PURE__ */
|
|
3844
|
+
/* @__PURE__ */ jsxs31(
|
|
3952
3845
|
"div",
|
|
3953
3846
|
{
|
|
3954
3847
|
className: `flex gap-2 justify-end self-center ${!!itemErrors[kpi.id]?.name ? "mt-[-12px]" : ""}`,
|
|
3955
3848
|
children: [
|
|
3956
|
-
/* @__PURE__ */
|
|
3849
|
+
/* @__PURE__ */ jsx39(
|
|
3957
3850
|
IconCheck2,
|
|
3958
3851
|
{
|
|
3959
3852
|
className: "w-[30px] h-[30px] cursor-pointer",
|
|
3960
3853
|
onClick: () => handleSave(kpi.id, type)
|
|
3961
3854
|
}
|
|
3962
3855
|
),
|
|
3963
|
-
/* @__PURE__ */
|
|
3856
|
+
/* @__PURE__ */ jsx39(IconX2, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleCancel(kpi.id) })
|
|
3964
3857
|
]
|
|
3965
3858
|
}
|
|
3966
3859
|
)
|
|
3967
|
-
] }) : /* @__PURE__ */
|
|
3968
|
-
/* @__PURE__ */
|
|
3969
|
-
/* @__PURE__ */
|
|
3970
|
-
/* @__PURE__ */
|
|
3971
|
-
/* @__PURE__ */
|
|
3860
|
+
] }) : /* @__PURE__ */ jsxs31(Fragment6, { children: [
|
|
3861
|
+
/* @__PURE__ */ jsx39("p", { className: "body-1", children: kpi.name }),
|
|
3862
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex gap-3 justify-end", children: [
|
|
3863
|
+
/* @__PURE__ */ jsx39(IconPencil, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleEdit(kpi.id) }),
|
|
3864
|
+
/* @__PURE__ */ jsx39(IconTrash3, { className: "w-[30px] h-[30px] cursor-pointer", onClick: () => handleDelete(kpi.id) })
|
|
3972
3865
|
] })
|
|
3973
3866
|
] })
|
|
3974
3867
|
] }, kpi.id)) })
|
|
@@ -3980,16 +3873,16 @@ function KpiSection({ type, onChangeKpiList }) {
|
|
|
3980
3873
|
|
|
3981
3874
|
// src/Modal/Modal/Modal.tsx
|
|
3982
3875
|
import { Modal } from "antd";
|
|
3983
|
-
import { jsx as
|
|
3876
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3984
3877
|
function AntDModal({ children, isOpen, width, onCancel }) {
|
|
3985
|
-
return /* @__PURE__ */
|
|
3878
|
+
return /* @__PURE__ */ jsx40("div", { children: /* @__PURE__ */ jsx40(Modal, { open: isOpen, onCancel, width, centered: true, footer: null, children: /* @__PURE__ */ jsx40("div", { children }) }) });
|
|
3986
3879
|
}
|
|
3987
3880
|
|
|
3988
3881
|
// src/Indicator/Indicator/Indicator.tsx
|
|
3989
3882
|
import { IconCheck as IconCheck3, IconCirclePlus as IconCirclePlus2, IconTrash as IconTrash4, IconX as IconX3 } from "@tabler/icons-react";
|
|
3990
3883
|
import { useState as useState15 } from "react";
|
|
3991
3884
|
import { Input as Input4 } from "antd";
|
|
3992
|
-
import { Fragment as Fragment7, jsx as
|
|
3885
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3993
3886
|
function Indicator({
|
|
3994
3887
|
option = [
|
|
3995
3888
|
{ value: "TEXT", label: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21" },
|
|
@@ -4115,14 +4008,14 @@ function Indicator({
|
|
|
4115
4008
|
[name]: value
|
|
4116
4009
|
}));
|
|
4117
4010
|
};
|
|
4118
|
-
return /* @__PURE__ */
|
|
4119
|
-
/* @__PURE__ */
|
|
4011
|
+
return /* @__PURE__ */ jsxs32("div", { className: "w-full", children: [
|
|
4012
|
+
/* @__PURE__ */ jsxs32(
|
|
4120
4013
|
"div",
|
|
4121
4014
|
{
|
|
4122
4015
|
className: `space-x-2 grid ${valueSwitch === "TEXT" ? `grid-cols-[140px_1fr_50px]` : `grid-cols-[140px_1fr_200px_200px_50px]`} items-start`,
|
|
4123
4016
|
children: [
|
|
4124
|
-
/* @__PURE__ */
|
|
4125
|
-
/* @__PURE__ */
|
|
4017
|
+
/* @__PURE__ */ jsx41(SwitchSelect, { option, onClick: handleClick, value: valueSwitch, label: "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17", required: true }),
|
|
4018
|
+
/* @__PURE__ */ jsx41(
|
|
4126
4019
|
InputField,
|
|
4127
4020
|
{
|
|
4128
4021
|
label: type === "TARGET" ? "\u0E0A\u0E37\u0E48\u0E2D\u0E01\u0E25\u0E38\u0E48\u0E21\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22" : `\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"}`,
|
|
@@ -4137,8 +4030,8 @@ function Indicator({
|
|
|
4137
4030
|
error: addError.textValue
|
|
4138
4031
|
}
|
|
4139
4032
|
),
|
|
4140
|
-
valueSwitch === "NUMBER" && /* @__PURE__ */
|
|
4141
|
-
/* @__PURE__ */
|
|
4033
|
+
valueSwitch === "NUMBER" && /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
4034
|
+
/* @__PURE__ */ jsx41(
|
|
4142
4035
|
InputFieldNumber,
|
|
4143
4036
|
{
|
|
4144
4037
|
label: type === "TARGET" ? "\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22" : `\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"}`,
|
|
@@ -4154,7 +4047,7 @@ function Indicator({
|
|
|
4154
4047
|
error: addError.numberValue
|
|
4155
4048
|
}
|
|
4156
4049
|
),
|
|
4157
|
-
/* @__PURE__ */
|
|
4050
|
+
/* @__PURE__ */ jsx41(
|
|
4158
4051
|
InputField,
|
|
4159
4052
|
{
|
|
4160
4053
|
label: `\u0E2B\u0E19\u0E48\u0E27\u0E22`,
|
|
@@ -4170,18 +4063,18 @@ function Indicator({
|
|
|
4170
4063
|
}
|
|
4171
4064
|
)
|
|
4172
4065
|
] }),
|
|
4173
|
-
/* @__PURE__ */
|
|
4066
|
+
/* @__PURE__ */ jsx41(IconCirclePlus2, { onClick: handleAddIndicator, className: "mt-8 cursor-pointer", size: 32 })
|
|
4174
4067
|
]
|
|
4175
4068
|
}
|
|
4176
4069
|
),
|
|
4177
|
-
/* @__PURE__ */
|
|
4070
|
+
/* @__PURE__ */ jsx41(Fragment7, { children: arrayData.map((item, index) => /* @__PURE__ */ jsxs32(
|
|
4178
4071
|
"div",
|
|
4179
4072
|
{
|
|
4180
4073
|
className: `space-y-2 grid ${item.inputType === "TEXT" ? `grid-cols-[140px_1fr_50px_50px]` : `grid-cols-[140px_1fr_200px_150px_50px_50px]`} items-start`,
|
|
4181
4074
|
children: [
|
|
4182
|
-
/* @__PURE__ */
|
|
4183
|
-
index === editIndex ? /* @__PURE__ */
|
|
4184
|
-
/* @__PURE__ */
|
|
4075
|
+
/* @__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" }),
|
|
4076
|
+
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4077
|
+
/* @__PURE__ */ jsx41(
|
|
4185
4078
|
Input4,
|
|
4186
4079
|
{
|
|
4187
4080
|
className: "body-1 mt-2",
|
|
@@ -4194,11 +4087,11 @@ function Indicator({
|
|
|
4194
4087
|
}
|
|
4195
4088
|
}
|
|
4196
4089
|
),
|
|
4197
|
-
editError.textValue && /* @__PURE__ */
|
|
4198
|
-
] }) : /* @__PURE__ */
|
|
4199
|
-
item.inputType === "NUMBER" && /* @__PURE__ */
|
|
4200
|
-
index === editIndex ? /* @__PURE__ */
|
|
4201
|
-
/* @__PURE__ */
|
|
4090
|
+
editError.textValue && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.textValue })
|
|
4091
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.textValue }),
|
|
4092
|
+
item.inputType === "NUMBER" && /* @__PURE__ */ jsxs32(Fragment7, { children: [
|
|
4093
|
+
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4094
|
+
/* @__PURE__ */ jsx41(
|
|
4202
4095
|
Input4,
|
|
4203
4096
|
{
|
|
4204
4097
|
type: "number",
|
|
@@ -4212,10 +4105,10 @@ function Indicator({
|
|
|
4212
4105
|
}
|
|
4213
4106
|
}
|
|
4214
4107
|
),
|
|
4215
|
-
editError.numberValue && /* @__PURE__ */
|
|
4216
|
-
] }) : /* @__PURE__ */
|
|
4217
|
-
index === editIndex ? /* @__PURE__ */
|
|
4218
|
-
/* @__PURE__ */
|
|
4108
|
+
editError.numberValue && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.numberValue })
|
|
4109
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.numberValue }),
|
|
4110
|
+
index === editIndex ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-[8px]", children: [
|
|
4111
|
+
/* @__PURE__ */ jsx41(
|
|
4219
4112
|
Input4,
|
|
4220
4113
|
{
|
|
4221
4114
|
className: "body-1 mt-2",
|
|
@@ -4228,20 +4121,20 @@ function Indicator({
|
|
|
4228
4121
|
}
|
|
4229
4122
|
}
|
|
4230
4123
|
),
|
|
4231
|
-
editError.unit && /* @__PURE__ */
|
|
4232
|
-
] }) : /* @__PURE__ */
|
|
4124
|
+
editError.unit && /* @__PURE__ */ jsx41("p", { className: "text-red-500 caption-1", children: editError.unit })
|
|
4125
|
+
] }) : /* @__PURE__ */ jsx41("div", { className: "body-1 mt-2", children: item.unit })
|
|
4233
4126
|
] }),
|
|
4234
|
-
/* @__PURE__ */
|
|
4235
|
-
/* @__PURE__ */
|
|
4127
|
+
/* @__PURE__ */ jsx41("div", { className: "body-1 mt-2 flex", children: editIndex !== null ? editIndex === index ? /* @__PURE__ */ jsxs32("div", { className: "flex", children: [
|
|
4128
|
+
/* @__PURE__ */ jsx41(
|
|
4236
4129
|
IconCheck3,
|
|
4237
4130
|
{
|
|
4238
4131
|
className: "cursor-pointer text-green-600",
|
|
4239
4132
|
onClick: () => handleConfirmEditIndicator(index)
|
|
4240
4133
|
}
|
|
4241
4134
|
),
|
|
4242
|
-
/* @__PURE__ */
|
|
4135
|
+
/* @__PURE__ */ jsx41(IconX3, { className: "cursor-pointer text-red-600", onClick: handleCancelEditIndicator })
|
|
4243
4136
|
] }) : void 0 : false }),
|
|
4244
|
-
/* @__PURE__ */
|
|
4137
|
+
/* @__PURE__ */ jsx41("div", { className: "body-1 mt-2 cursor-pointer", children: /* @__PURE__ */ jsx41(
|
|
4245
4138
|
IconTrash4,
|
|
4246
4139
|
{
|
|
4247
4140
|
onClick: () => {
|
|
@@ -4264,7 +4157,7 @@ function Indicator({
|
|
|
4264
4157
|
// src/FilterPopUp/FilterPopUp.tsx
|
|
4265
4158
|
import { IconCheck as IconCheck4, IconFilter as IconFilter2, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
4266
4159
|
import { useState as useState16 } from "react";
|
|
4267
|
-
import { jsx as
|
|
4160
|
+
import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4268
4161
|
var FilterPopUp = (filter) => {
|
|
4269
4162
|
const [isAction, setIsAction] = useState16(true);
|
|
4270
4163
|
const [filterArray, setFilterArray] = useState16([""]);
|
|
@@ -4274,20 +4167,20 @@ var FilterPopUp = (filter) => {
|
|
|
4274
4167
|
const handleSubmitFilter = () => {
|
|
4275
4168
|
filter.handleSearch(filterArray);
|
|
4276
4169
|
};
|
|
4277
|
-
return /* @__PURE__ */
|
|
4278
|
-
/* @__PURE__ */
|
|
4279
|
-
/* @__PURE__ */
|
|
4170
|
+
return /* @__PURE__ */ jsxs33("div", { className: "relative", children: [
|
|
4171
|
+
/* @__PURE__ */ jsxs33("button", { className: "flex px-2 py-1 rounded-lg border-1", onClick: () => setIsAction(!isAction), children: [
|
|
4172
|
+
/* @__PURE__ */ jsx42(IconFilter2, {}),
|
|
4280
4173
|
"filter"
|
|
4281
4174
|
] }),
|
|
4282
|
-
isAction ? /* @__PURE__ */
|
|
4283
|
-
/* @__PURE__ */
|
|
4284
|
-
/* @__PURE__ */
|
|
4285
|
-
/* @__PURE__ */
|
|
4286
|
-
/* @__PURE__ */
|
|
4175
|
+
isAction ? /* @__PURE__ */ jsxs33("div", { className: "absolute bg-white p-5 rounded-lg shadow-2xl w-[600px]", children: [
|
|
4176
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex justify-end", children: [
|
|
4177
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex justify-end text-nowrap gap-2", children: [
|
|
4178
|
+
/* @__PURE__ */ jsx42(GhostButton, { title: "\u0E43\u0E0A\u0E49\u0E1F\u0E34\u0E25\u0E40\u0E15\u0E2D\u0E23\u0E4C", onClick: handleSubmitFilter, iconLeft: /* @__PURE__ */ jsx42(IconCheck4, {}) }),
|
|
4179
|
+
/* @__PURE__ */ jsx42(GhostButton, { title: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14", onClick: handleClearFilter, iconLeft: /* @__PURE__ */ jsx42(IconTrash5, {}) })
|
|
4287
4180
|
] }),
|
|
4288
4181
|
""
|
|
4289
4182
|
] }),
|
|
4290
|
-
/* @__PURE__ */
|
|
4183
|
+
/* @__PURE__ */ jsx42(
|
|
4291
4184
|
SelectCustom,
|
|
4292
4185
|
{
|
|
4293
4186
|
options: filter.selectionFilter,
|
|
@@ -4303,7 +4196,7 @@ var FilterPopUp = (filter) => {
|
|
|
4303
4196
|
import { useEffect as useEffect7, useRef as useRef6, useState as useState17 } from "react";
|
|
4304
4197
|
import { IconSearch, IconUsers, IconX as IconX4 } from "@tabler/icons-react";
|
|
4305
4198
|
import { Input as Input5 } from "antd";
|
|
4306
|
-
import { Fragment as Fragment8, jsx as
|
|
4199
|
+
import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4307
4200
|
function ProfileSelect({
|
|
4308
4201
|
allUser,
|
|
4309
4202
|
assignUser,
|
|
@@ -4363,22 +4256,22 @@ function ProfileSelect({
|
|
|
4363
4256
|
const isSearching = normalizedSearch.length > 0;
|
|
4364
4257
|
const noResult = filteredAssigned.length === 0 && filteredUnassigned.length === 0;
|
|
4365
4258
|
const noUserOption = allUser.length === 0 && !isSearching;
|
|
4366
|
-
return /* @__PURE__ */
|
|
4367
|
-
mode === "icon" ? /* @__PURE__ */
|
|
4259
|
+
return /* @__PURE__ */ jsxs34("div", { ref: containerRef, className: "relative body-1", children: [
|
|
4260
|
+
mode === "icon" ? /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsx43(
|
|
4368
4261
|
IconUsers,
|
|
4369
4262
|
{
|
|
4370
4263
|
size: 40,
|
|
4371
4264
|
className: "p-2 border rounded cursor-pointer bg-white",
|
|
4372
4265
|
onClick: () => setIsShowSelect(!isShowSelect)
|
|
4373
4266
|
}
|
|
4374
|
-
) }) : mode === "showAssign" ? /* @__PURE__ */
|
|
4267
|
+
) }) : mode === "showAssign" ? /* @__PURE__ */ jsx43(
|
|
4375
4268
|
"div",
|
|
4376
4269
|
{
|
|
4377
4270
|
className: `w-full h-[40px] flex items-center p-2 cursor-pointer ${className}`,
|
|
4378
4271
|
onClick: () => setIsShowSelect(!isShowSelect),
|
|
4379
|
-
children: visibleUsers.length === 0 ? placeholder ? /* @__PURE__ */
|
|
4380
|
-
/* @__PURE__ */
|
|
4381
|
-
/* @__PURE__ */
|
|
4272
|
+
children: visibleUsers.length === 0 ? placeholder ? /* @__PURE__ */ jsx43("span", { className: "body-1 text-gray-400 select-none", children: placeholder }) : null : /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4273
|
+
/* @__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: [
|
|
4274
|
+
/* @__PURE__ */ jsx43(
|
|
4382
4275
|
"img",
|
|
4383
4276
|
{
|
|
4384
4277
|
src: user.profile,
|
|
@@ -4391,7 +4284,7 @@ function ProfileSelect({
|
|
|
4391
4284
|
className: "border border-white group-hover:border-3 group-hover:border-red-500 transition"
|
|
4392
4285
|
}
|
|
4393
4286
|
),
|
|
4394
|
-
/* @__PURE__ */
|
|
4287
|
+
/* @__PURE__ */ jsx43(
|
|
4395
4288
|
"span",
|
|
4396
4289
|
{
|
|
4397
4290
|
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",
|
|
@@ -4399,11 +4292,11 @@ function ProfileSelect({
|
|
|
4399
4292
|
e.stopPropagation();
|
|
4400
4293
|
onUpdateAssignUser(user, "remove");
|
|
4401
4294
|
},
|
|
4402
|
-
children: /* @__PURE__ */
|
|
4295
|
+
children: /* @__PURE__ */ jsx43(IconX4, { className: "w-4 h-4 text-red-500" })
|
|
4403
4296
|
}
|
|
4404
4297
|
)
|
|
4405
4298
|
] }) }, user.id)) }),
|
|
4406
|
-
showPlus && /* @__PURE__ */
|
|
4299
|
+
showPlus && /* @__PURE__ */ jsxs34(
|
|
4407
4300
|
"div",
|
|
4408
4301
|
{
|
|
4409
4302
|
className: "border border-white flex items-center justify-center bg-gray-300 text-black text-sm ml-2",
|
|
@@ -4420,8 +4313,8 @@ function ProfileSelect({
|
|
|
4420
4313
|
)
|
|
4421
4314
|
] })
|
|
4422
4315
|
}
|
|
4423
|
-
) : /* @__PURE__ */
|
|
4424
|
-
visibleUsers.map((user) => /* @__PURE__ */
|
|
4316
|
+
) : /* @__PURE__ */ jsxs34("div", { className: `w-full h-[40px] flex -space-x-2 p-2 ${className}`, children: [
|
|
4317
|
+
visibleUsers.map((user) => /* @__PURE__ */ jsx43("div", { className: "flex items-center ", children: /* @__PURE__ */ jsx43("label", { className: "relative group ", children: /* @__PURE__ */ jsx43(
|
|
4425
4318
|
"img",
|
|
4426
4319
|
{
|
|
4427
4320
|
src: user.profile,
|
|
@@ -4434,7 +4327,7 @@ function ProfileSelect({
|
|
|
4434
4327
|
className: "border border-white transition"
|
|
4435
4328
|
}
|
|
4436
4329
|
) }) }, user.id)),
|
|
4437
|
-
showPlus && /* @__PURE__ */
|
|
4330
|
+
showPlus && /* @__PURE__ */ jsxs34(
|
|
4438
4331
|
"div",
|
|
4439
4332
|
{
|
|
4440
4333
|
className: "border border-white flex items-center justify-center bg-gray-300 text-black text-sm",
|
|
@@ -4450,15 +4343,15 @@ function ProfileSelect({
|
|
|
4450
4343
|
}
|
|
4451
4344
|
)
|
|
4452
4345
|
] }),
|
|
4453
|
-
isShowSelect ? /* @__PURE__ */
|
|
4346
|
+
isShowSelect ? /* @__PURE__ */ jsxs34(
|
|
4454
4347
|
"div",
|
|
4455
4348
|
{
|
|
4456
4349
|
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",
|
|
4457
4350
|
ref: selectRef,
|
|
4458
4351
|
children: [
|
|
4459
|
-
/* @__PURE__ */
|
|
4460
|
-
/* @__PURE__ */
|
|
4461
|
-
/* @__PURE__ */
|
|
4352
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex border-1 rounded-md p-2 gap-2 items-center", children: [
|
|
4353
|
+
/* @__PURE__ */ jsx43(IconSearch, {}),
|
|
4354
|
+
/* @__PURE__ */ jsx43(
|
|
4462
4355
|
Input5,
|
|
4463
4356
|
{
|
|
4464
4357
|
variant: "borderless",
|
|
@@ -4469,16 +4362,16 @@ function ProfileSelect({
|
|
|
4469
4362
|
}
|
|
4470
4363
|
)
|
|
4471
4364
|
] }),
|
|
4472
|
-
/* @__PURE__ */
|
|
4473
|
-
filteredAssigned.length > 0 && /* @__PURE__ */
|
|
4474
|
-
/* @__PURE__ */
|
|
4475
|
-
filteredAssigned.map((user) => /* @__PURE__ */
|
|
4365
|
+
/* @__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: [
|
|
4366
|
+
filteredAssigned.length > 0 && /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4367
|
+
/* @__PURE__ */ jsx43("div", { className: "mb-1", children: "\u0E2A\u0E21\u0E32\u0E0A\u0E34\u0E01\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01" }),
|
|
4368
|
+
filteredAssigned.map((user) => /* @__PURE__ */ jsxs34(
|
|
4476
4369
|
"button",
|
|
4477
4370
|
{
|
|
4478
4371
|
className: "flex items-center group my-1 w-full p-1 rounded hover:bg-gray-100",
|
|
4479
4372
|
children: [
|
|
4480
|
-
/* @__PURE__ */
|
|
4481
|
-
/* @__PURE__ */
|
|
4373
|
+
/* @__PURE__ */ jsxs34("div", { className: "relative cursor-pointer", children: [
|
|
4374
|
+
/* @__PURE__ */ jsx43(
|
|
4482
4375
|
"img",
|
|
4483
4376
|
{
|
|
4484
4377
|
src: user.profile,
|
|
@@ -4491,30 +4384,30 @@ function ProfileSelect({
|
|
|
4491
4384
|
className: "border-3 border-red-500"
|
|
4492
4385
|
}
|
|
4493
4386
|
),
|
|
4494
|
-
/* @__PURE__ */
|
|
4387
|
+
/* @__PURE__ */ jsx43(
|
|
4495
4388
|
"span",
|
|
4496
4389
|
{
|
|
4497
4390
|
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",
|
|
4498
4391
|
onClick: () => onUpdateAssignUser(user, "remove"),
|
|
4499
|
-
children: /* @__PURE__ */
|
|
4392
|
+
children: /* @__PURE__ */ jsx43(IconX4, { className: "text-red-500", size: 15 })
|
|
4500
4393
|
}
|
|
4501
4394
|
)
|
|
4502
4395
|
] }),
|
|
4503
|
-
/* @__PURE__ */
|
|
4396
|
+
/* @__PURE__ */ jsx43("span", { className: "ml-2", children: user.name })
|
|
4504
4397
|
]
|
|
4505
4398
|
},
|
|
4506
4399
|
user.id
|
|
4507
4400
|
))
|
|
4508
4401
|
] }),
|
|
4509
|
-
filteredUnassigned.length > 0 && /* @__PURE__ */
|
|
4510
|
-
/* @__PURE__ */
|
|
4511
|
-
filteredUnassigned.map((user) => /* @__PURE__ */
|
|
4402
|
+
filteredUnassigned.length > 0 && /* @__PURE__ */ jsxs34(Fragment8, { children: [
|
|
4403
|
+
/* @__PURE__ */ jsx43("div", { className: "mt-2", children: "\u0E1C\u0E39\u0E49\u0E04\u0E19" }),
|
|
4404
|
+
filteredUnassigned.map((user) => /* @__PURE__ */ jsxs34(
|
|
4512
4405
|
"button",
|
|
4513
4406
|
{
|
|
4514
4407
|
className: "flex items-center my-1 hover:bg-gray-100 w-full p-1 rounded",
|
|
4515
4408
|
onClick: () => onUpdateAssignUser(user),
|
|
4516
4409
|
children: [
|
|
4517
|
-
/* @__PURE__ */
|
|
4410
|
+
/* @__PURE__ */ jsx43(
|
|
4518
4411
|
"img",
|
|
4519
4412
|
{
|
|
4520
4413
|
src: user.profile,
|
|
@@ -4527,7 +4420,7 @@ function ProfileSelect({
|
|
|
4527
4420
|
className: "border"
|
|
4528
4421
|
}
|
|
4529
4422
|
),
|
|
4530
|
-
/* @__PURE__ */
|
|
4423
|
+
/* @__PURE__ */ jsx43("span", { className: "ml-2", children: user.name })
|
|
4531
4424
|
]
|
|
4532
4425
|
},
|
|
4533
4426
|
user.id
|
|
@@ -4543,7 +4436,7 @@ function ProfileSelect({
|
|
|
4543
4436
|
// src/Button/QRCode/QRCode.tsx
|
|
4544
4437
|
import { useEffect as useEffect8, useRef as useRef7, useState as useState18 } from "react";
|
|
4545
4438
|
import QRCode from "qrcode";
|
|
4546
|
-
import { jsx as
|
|
4439
|
+
import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4547
4440
|
var QRCodeGenerator = ({
|
|
4548
4441
|
url,
|
|
4549
4442
|
previewSize = 200,
|
|
@@ -4643,20 +4536,20 @@ var QRCodeGenerator = ({
|
|
|
4643
4536
|
a.click();
|
|
4644
4537
|
a.remove();
|
|
4645
4538
|
};
|
|
4646
|
-
return /* @__PURE__ */
|
|
4539
|
+
return /* @__PURE__ */ jsxs35(
|
|
4647
4540
|
"div",
|
|
4648
4541
|
{
|
|
4649
4542
|
style: { display: "inline-flex", flexDirection: "column", gap: 8 },
|
|
4650
4543
|
className: "justify-center items-center",
|
|
4651
4544
|
children: [
|
|
4652
|
-
url === "" ? /* @__PURE__ */
|
|
4545
|
+
url === "" ? /* @__PURE__ */ jsx44(
|
|
4653
4546
|
"div",
|
|
4654
4547
|
{
|
|
4655
4548
|
className: "border-1 p-2 mb-2",
|
|
4656
4549
|
style: { width: `${previewSize}px`, height: `${previewSize}px` }
|
|
4657
4550
|
}
|
|
4658
|
-
) : /* @__PURE__ */
|
|
4659
|
-
/* @__PURE__ */
|
|
4551
|
+
) : /* @__PURE__ */ jsx44("canvas", { ref: canvasRef, className: "border-1 p-2 mb-2" }),
|
|
4552
|
+
/* @__PURE__ */ jsxs35(
|
|
4660
4553
|
"div",
|
|
4661
4554
|
{
|
|
4662
4555
|
style: {
|
|
@@ -4667,8 +4560,8 @@ var QRCodeGenerator = ({
|
|
|
4667
4560
|
},
|
|
4668
4561
|
className: "flex-col",
|
|
4669
4562
|
children: [
|
|
4670
|
-
/* @__PURE__ */
|
|
4671
|
-
/* @__PURE__ */
|
|
4563
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2 mx-2", children: [
|
|
4564
|
+
/* @__PURE__ */ jsx44("label", { className: "border-1 p-2 rounded-md flex flex-col w-1/2 text-sm text-gray-400", children: /* @__PURE__ */ jsx44(
|
|
4672
4565
|
SelectField,
|
|
4673
4566
|
{
|
|
4674
4567
|
label: "\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A",
|
|
@@ -4677,7 +4570,7 @@ var QRCodeGenerator = ({
|
|
|
4677
4570
|
options: typeOption
|
|
4678
4571
|
}
|
|
4679
4572
|
) }),
|
|
4680
|
-
/* @__PURE__ */
|
|
4573
|
+
/* @__PURE__ */ jsx44("label", { className: "border-1 p-2 rounded-md flex flex-col w-1/2 text-sm text-gray-400", children: /* @__PURE__ */ jsx44(
|
|
4681
4574
|
SelectField,
|
|
4682
4575
|
{
|
|
4683
4576
|
label: "\u0E02\u0E19\u0E32\u0E14 (px)",
|
|
@@ -4687,7 +4580,7 @@ var QRCodeGenerator = ({
|
|
|
4687
4580
|
}
|
|
4688
4581
|
) })
|
|
4689
4582
|
] }),
|
|
4690
|
-
/* @__PURE__ */
|
|
4583
|
+
/* @__PURE__ */ jsx44(
|
|
4691
4584
|
PrimaryButton,
|
|
4692
4585
|
{
|
|
4693
4586
|
onClick: download,
|
|
@@ -4705,11 +4598,11 @@ var QRCodeGenerator = ({
|
|
|
4705
4598
|
};
|
|
4706
4599
|
|
|
4707
4600
|
// src/TabPropject/TabProject/TabProject.tsx
|
|
4708
|
-
import { ConfigProvider as
|
|
4709
|
-
import { jsx as
|
|
4601
|
+
import { ConfigProvider as ConfigProvider21, Tabs } from "antd";
|
|
4602
|
+
import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4710
4603
|
function TabProject({ tabOption, now, onChange }) {
|
|
4711
|
-
return /* @__PURE__ */
|
|
4712
|
-
|
|
4604
|
+
return /* @__PURE__ */ jsx45(
|
|
4605
|
+
ConfigProvider21,
|
|
4713
4606
|
{
|
|
4714
4607
|
theme: {
|
|
4715
4608
|
token: {
|
|
@@ -4725,16 +4618,16 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4725
4618
|
}
|
|
4726
4619
|
}
|
|
4727
4620
|
},
|
|
4728
|
-
children: /* @__PURE__ */
|
|
4621
|
+
children: /* @__PURE__ */ jsx45(
|
|
4729
4622
|
Tabs,
|
|
4730
4623
|
{
|
|
4731
4624
|
activeKey: now,
|
|
4732
4625
|
onChange,
|
|
4733
4626
|
items: tabOption.map((item) => ({
|
|
4734
4627
|
key: item.key,
|
|
4735
|
-
label: /* @__PURE__ */
|
|
4628
|
+
label: /* @__PURE__ */ jsxs36("span", { className: "tab-label flex gap-2 items-center body-1", children: [
|
|
4736
4629
|
item.icon,
|
|
4737
|
-
/* @__PURE__ */
|
|
4630
|
+
/* @__PURE__ */ jsx45("span", { children: item.label })
|
|
4738
4631
|
] })
|
|
4739
4632
|
}))
|
|
4740
4633
|
}
|
|
@@ -4746,7 +4639,7 @@ function TabProject({ tabOption, now, onChange }) {
|
|
|
4746
4639
|
// src/Chart/BarChart/BarChart.tsx
|
|
4747
4640
|
import { useEffect as useEffect9, useMemo as useMemo2, useRef as useRef8 } from "react";
|
|
4748
4641
|
import * as d3 from "d3";
|
|
4749
|
-
import { jsx as
|
|
4642
|
+
import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4750
4643
|
var defaultMargin = { top: 30, right: 200, bottom: 36, left: 50 };
|
|
4751
4644
|
var defaultColorPalette = [
|
|
4752
4645
|
"#4E79A7",
|
|
@@ -4928,7 +4821,7 @@ var BarChart = ({
|
|
|
4928
4821
|
useEffect9(() => {
|
|
4929
4822
|
render();
|
|
4930
4823
|
}, [data, height, margin, modeLabel, xDomain.toString(), yDomain.toString()]);
|
|
4931
|
-
return /* @__PURE__ */
|
|
4824
|
+
return /* @__PURE__ */ jsx46("div", { ref: containerRef, style: { width: "100%" }, children: /* @__PURE__ */ jsxs37(
|
|
4932
4825
|
"svg",
|
|
4933
4826
|
{
|
|
4934
4827
|
ref: svgRef,
|
|
@@ -4936,10 +4829,10 @@ var BarChart = ({
|
|
|
4936
4829
|
"aria-label": "Bar chart",
|
|
4937
4830
|
style: { display: "block", width: "100%", height },
|
|
4938
4831
|
children: [
|
|
4939
|
-
/* @__PURE__ */
|
|
4940
|
-
/* @__PURE__ */
|
|
4941
|
-
/* @__PURE__ */
|
|
4942
|
-
/* @__PURE__ */
|
|
4832
|
+
/* @__PURE__ */ jsx46("title", { children: "Bar chart" }),
|
|
4833
|
+
/* @__PURE__ */ jsx46("g", { ref: gRef, transform: `translate(${margin.left},${margin.top})` }),
|
|
4834
|
+
/* @__PURE__ */ jsx46("g", { ref: xAxisRef }),
|
|
4835
|
+
/* @__PURE__ */ jsx46("g", { ref: yAxisRef })
|
|
4943
4836
|
]
|
|
4944
4837
|
}
|
|
4945
4838
|
) });
|
|
@@ -4948,7 +4841,7 @@ var BarChart = ({
|
|
|
4948
4841
|
// src/Chart/PieChart/PieChart.tsx
|
|
4949
4842
|
import React3, { useRef as useRef9, useEffect as useEffect10 } from "react";
|
|
4950
4843
|
import * as d32 from "d3";
|
|
4951
|
-
import { jsx as
|
|
4844
|
+
import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4952
4845
|
var defaultColors = d32.schemeCategory10;
|
|
4953
4846
|
var PieChart = ({
|
|
4954
4847
|
title,
|
|
@@ -4982,15 +4875,15 @@ var PieChart = ({
|
|
|
4982
4875
|
return `${percentage}%`;
|
|
4983
4876
|
});
|
|
4984
4877
|
}, [data, width, height]);
|
|
4985
|
-
return /* @__PURE__ */
|
|
4986
|
-
title && /* @__PURE__ */
|
|
4987
|
-
description && /* @__PURE__ */
|
|
4988
|
-
/* @__PURE__ */
|
|
4989
|
-
/* @__PURE__ */
|
|
4990
|
-
/* @__PURE__ */
|
|
4991
|
-
/* @__PURE__ */
|
|
4992
|
-
/* @__PURE__ */
|
|
4993
|
-
/* @__PURE__ */
|
|
4878
|
+
return /* @__PURE__ */ jsxs38("div", { children: [
|
|
4879
|
+
title && /* @__PURE__ */ jsx47("p", { className: "body-2", children: title }),
|
|
4880
|
+
description && /* @__PURE__ */ jsx47("p", { className: "caption-1", children: description }),
|
|
4881
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex", children: [
|
|
4882
|
+
/* @__PURE__ */ jsx47("svg", { ref: svgRef }),
|
|
4883
|
+
/* @__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 body-2", children: [
|
|
4884
|
+
/* @__PURE__ */ jsx47("div", { className: "w-[20px] h-[20px]", style: { backgroundColor: d.color } }),
|
|
4885
|
+
/* @__PURE__ */ jsx47("div", { children: d.label }),
|
|
4886
|
+
/* @__PURE__ */ jsx47("div", { children: d.value })
|
|
4994
4887
|
] }, i)) })
|
|
4995
4888
|
] })
|
|
4996
4889
|
] });
|
|
@@ -5016,7 +4909,7 @@ import {
|
|
|
5016
4909
|
IconHourglassEmpty,
|
|
5017
4910
|
IconRosetteDiscountCheck
|
|
5018
4911
|
} from "@tabler/icons-react";
|
|
5019
|
-
import { jsx as
|
|
4912
|
+
import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5020
4913
|
var LAYOUT = {
|
|
5021
4914
|
barHeight: 40,
|
|
5022
4915
|
barSpacing: 10,
|
|
@@ -5036,27 +4929,27 @@ var STATUS_META = {
|
|
|
5036
4929
|
IN_PROGRESS: {
|
|
5037
4930
|
color: "#FFC654",
|
|
5038
4931
|
label: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23",
|
|
5039
|
-
icon: /* @__PURE__ */
|
|
4932
|
+
icon: /* @__PURE__ */ jsx48(IconHourglassEmpty, { className: "text-[#FFC654]" })
|
|
5040
4933
|
},
|
|
5041
4934
|
CANCELLED: {
|
|
5042
4935
|
color: "#D2D5DB",
|
|
5043
4936
|
label: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
|
|
5044
|
-
icon: /* @__PURE__ */
|
|
4937
|
+
icon: /* @__PURE__ */ jsx48(IconCircleX, { className: "text-[#D2D5DB]" })
|
|
5045
4938
|
},
|
|
5046
4939
|
SUCCESS: {
|
|
5047
4940
|
color: "#81CF92",
|
|
5048
4941
|
label: "\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23\u0E41\u0E25\u0E49\u0E27\u0E40\u0E2A\u0E23\u0E47\u0E08",
|
|
5049
|
-
icon: /* @__PURE__ */
|
|
4942
|
+
icon: /* @__PURE__ */ jsx48(IconRosetteDiscountCheck, { className: "text-[#81CF92]" })
|
|
5050
4943
|
},
|
|
5051
4944
|
COMPLETED: {
|
|
5052
4945
|
color: "#81CF92",
|
|
5053
4946
|
label: "\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E2A\u0E34\u0E49\u0E19",
|
|
5054
|
-
icon: /* @__PURE__ */
|
|
4947
|
+
icon: /* @__PURE__ */ jsx48(IconRosetteDiscountCheck, { className: "text-[#81CF92]" })
|
|
5055
4948
|
},
|
|
5056
4949
|
DELAY: {
|
|
5057
4950
|
color: "#F4827E",
|
|
5058
4951
|
label: "\u0E25\u0E48\u0E32\u0E0A\u0E49\u0E32",
|
|
5059
|
-
icon: /* @__PURE__ */
|
|
4952
|
+
icon: /* @__PURE__ */ jsx48(IconClockExclamation, { className: "text-[#F4827E]" })
|
|
5060
4953
|
}
|
|
5061
4954
|
};
|
|
5062
4955
|
var roundedRectPath = (x, y, width, height, radius) => `M${x + radius},${y} H${x + width} V${y + height} H${x + radius} A${radius},${radius},0,0,1,${x},${y + height - radius} V${y + radius} A${radius},${radius},0,0,1,${x + radius},${y}`;
|
|
@@ -5099,7 +4992,7 @@ var ProjectRow = ({ element, barHeight, barSpacing, mode }) => {
|
|
|
5099
4992
|
const statusLabel = getStatusLabel(safeStatus);
|
|
5100
4993
|
const statusIcon = STATUS_META[safeStatus]?.icon;
|
|
5101
4994
|
const toBuddhistDate = (d) => new Date(d.getFullYear() + 543, d.getMonth(), d.getDate());
|
|
5102
|
-
return /* @__PURE__ */
|
|
4995
|
+
return /* @__PURE__ */ jsxs39(
|
|
5103
4996
|
"div",
|
|
5104
4997
|
{
|
|
5105
4998
|
style: {
|
|
@@ -5110,8 +5003,8 @@ var ProjectRow = ({ element, barHeight, barSpacing, mode }) => {
|
|
|
5110
5003
|
},
|
|
5111
5004
|
className: "body-1 grid grid-cols-[1fr_100px_130px] px-8 gap-2",
|
|
5112
5005
|
children: [
|
|
5113
|
-
/* @__PURE__ */
|
|
5114
|
-
mode === "project" && /* @__PURE__ */
|
|
5006
|
+
/* @__PURE__ */ jsxs39("div", { className: `grid ${mode === "project" ? "grid-cols-[10px_1fr]" : "grid-cols-[1fr]"} items-center gap-2`, children: [
|
|
5007
|
+
mode === "project" && /* @__PURE__ */ jsx48(
|
|
5115
5008
|
"div",
|
|
5116
5009
|
{
|
|
5117
5010
|
style: {
|
|
@@ -5120,12 +5013,12 @@ var ProjectRow = ({ element, barHeight, barSpacing, mode }) => {
|
|
|
5120
5013
|
className: "w-[10px] h-[10px] rounded-full"
|
|
5121
5014
|
}
|
|
5122
5015
|
),
|
|
5123
|
-
/* @__PURE__ */
|
|
5016
|
+
/* @__PURE__ */ jsx48("div", { className: "line-clamp-1 break-words text-[#333]", title: element.label, children: element.label })
|
|
5124
5017
|
] }),
|
|
5125
|
-
mode === "project" ? /* @__PURE__ */
|
|
5018
|
+
mode === "project" ? /* @__PURE__ */ jsx48("div", { children: safeEndDate ? format4(toBuddhistDate(safeEndDate), "dd MMM yyyy", { locale: th }) : "-" }) : /* @__PURE__ */ jsx48("div", { children: `Q${getQuarter(
|
|
5126
5019
|
safeEndDate ?? /* @__PURE__ */ new Date()
|
|
5127
5020
|
)}/${(safeEndDate?.getFullYear() ?? 0) + 543}` }),
|
|
5128
|
-
/* @__PURE__ */
|
|
5021
|
+
/* @__PURE__ */ jsxs39("button", { className: "rounded-md subtitile-1 flex gap-2 align-start", children: [
|
|
5129
5022
|
statusIcon,
|
|
5130
5023
|
statusLabel
|
|
5131
5024
|
] })
|
|
@@ -5134,7 +5027,7 @@ var ProjectRow = ({ element, barHeight, barSpacing, mode }) => {
|
|
|
5134
5027
|
element.id
|
|
5135
5028
|
);
|
|
5136
5029
|
};
|
|
5137
|
-
var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__PURE__ */
|
|
5030
|
+
var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__PURE__ */ jsx48(
|
|
5138
5031
|
"div",
|
|
5139
5032
|
{
|
|
5140
5033
|
style: {
|
|
@@ -5148,7 +5041,7 @@ var RowOverlay = ({ data, barHeight, barSpacing, totalHeaderHeight }) => /* @__P
|
|
|
5148
5041
|
children: data.map((_, i) => {
|
|
5149
5042
|
if (i === 0) return null;
|
|
5150
5043
|
const yPos = i * (barHeight + barSpacing) - barSpacing / 2;
|
|
5151
|
-
return /* @__PURE__ */
|
|
5044
|
+
return /* @__PURE__ */ jsx48(
|
|
5152
5045
|
"div",
|
|
5153
5046
|
{
|
|
5154
5047
|
className: "",
|
|
@@ -5347,7 +5240,7 @@ var GanttChart = ({
|
|
|
5347
5240
|
headersGroupLayer1Height,
|
|
5348
5241
|
headersGroupLayer2Height
|
|
5349
5242
|
]);
|
|
5350
|
-
return /* @__PURE__ */
|
|
5243
|
+
return /* @__PURE__ */ jsx48(
|
|
5351
5244
|
"div",
|
|
5352
5245
|
{
|
|
5353
5246
|
className: "body-1",
|
|
@@ -5361,7 +5254,7 @@ var GanttChart = ({
|
|
|
5361
5254
|
backgroundColor: "#fff",
|
|
5362
5255
|
overflow: "hidden"
|
|
5363
5256
|
},
|
|
5364
|
-
children: /* @__PURE__ */
|
|
5257
|
+
children: /* @__PURE__ */ jsxs39(
|
|
5365
5258
|
"div",
|
|
5366
5259
|
{
|
|
5367
5260
|
style: {
|
|
@@ -5372,7 +5265,7 @@ var GanttChart = ({
|
|
|
5372
5265
|
position: "relative"
|
|
5373
5266
|
},
|
|
5374
5267
|
children: [
|
|
5375
|
-
/* @__PURE__ */
|
|
5268
|
+
/* @__PURE__ */ jsx48("div", { className: "z-2", children: /* @__PURE__ */ jsx48(
|
|
5376
5269
|
RowOverlay,
|
|
5377
5270
|
{
|
|
5378
5271
|
data: data.length > 10 ? data : ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"],
|
|
@@ -5381,7 +5274,7 @@ var GanttChart = ({
|
|
|
5381
5274
|
totalHeaderHeight
|
|
5382
5275
|
}
|
|
5383
5276
|
) }),
|
|
5384
|
-
/* @__PURE__ */
|
|
5277
|
+
/* @__PURE__ */ jsxs39(
|
|
5385
5278
|
"div",
|
|
5386
5279
|
{
|
|
5387
5280
|
ref: leftPanelRef,
|
|
@@ -5395,8 +5288,8 @@ var GanttChart = ({
|
|
|
5395
5288
|
zIndex: 2
|
|
5396
5289
|
},
|
|
5397
5290
|
children: [
|
|
5398
|
-
/* @__PURE__ */
|
|
5399
|
-
/* @__PURE__ */
|
|
5291
|
+
/* @__PURE__ */ jsxs39("div", { ref: dataContainerRef, children: [
|
|
5292
|
+
/* @__PURE__ */ jsxs39(
|
|
5400
5293
|
"div",
|
|
5401
5294
|
{
|
|
5402
5295
|
className: "grid body-2 grid-cols-[1fr_100px_130px] gap-2 px-8 border-b bg-white",
|
|
@@ -5409,13 +5302,13 @@ var GanttChart = ({
|
|
|
5409
5302
|
zIndex: 5
|
|
5410
5303
|
},
|
|
5411
5304
|
children: [
|
|
5412
|
-
/* @__PURE__ */
|
|
5413
|
-
/* @__PURE__ */
|
|
5414
|
-
/* @__PURE__ */
|
|
5305
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E42\u0E04\u0E23\u0E07\u0E01\u0E32\u0E23" }),
|
|
5306
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E2A\u0E48\u0E07" }),
|
|
5307
|
+
/* @__PURE__ */ jsx48("div", { children: "\u0E2A\u0E16\u0E32\u0E19\u0E30" })
|
|
5415
5308
|
]
|
|
5416
5309
|
}
|
|
5417
5310
|
),
|
|
5418
|
-
data.map((element) => /* @__PURE__ */
|
|
5311
|
+
data.map((element) => /* @__PURE__ */ jsx48(
|
|
5419
5312
|
ProjectRow,
|
|
5420
5313
|
{
|
|
5421
5314
|
mode,
|
|
@@ -5426,7 +5319,7 @@ var GanttChart = ({
|
|
|
5426
5319
|
element.id
|
|
5427
5320
|
))
|
|
5428
5321
|
] }),
|
|
5429
|
-
/* @__PURE__ */
|
|
5322
|
+
/* @__PURE__ */ jsx48("div", { className: "z-3", children: /* @__PURE__ */ jsx48(
|
|
5430
5323
|
RowOverlay,
|
|
5431
5324
|
{
|
|
5432
5325
|
data,
|
|
@@ -5438,7 +5331,7 @@ var GanttChart = ({
|
|
|
5438
5331
|
]
|
|
5439
5332
|
}
|
|
5440
5333
|
),
|
|
5441
|
-
/* @__PURE__ */
|
|
5334
|
+
/* @__PURE__ */ jsx48(
|
|
5442
5335
|
"div",
|
|
5443
5336
|
{
|
|
5444
5337
|
style: {
|
|
@@ -5447,7 +5340,7 @@ var GanttChart = ({
|
|
|
5447
5340
|
position: "relative",
|
|
5448
5341
|
overflow: "visible"
|
|
5449
5342
|
},
|
|
5450
|
-
children: /* @__PURE__ */
|
|
5343
|
+
children: /* @__PURE__ */ jsx48(
|
|
5451
5344
|
"div",
|
|
5452
5345
|
{
|
|
5453
5346
|
style: {
|
|
@@ -5456,7 +5349,7 @@ var GanttChart = ({
|
|
|
5456
5349
|
width: "max-content",
|
|
5457
5350
|
zIndex: 1
|
|
5458
5351
|
},
|
|
5459
|
-
children: /* @__PURE__ */
|
|
5352
|
+
children: /* @__PURE__ */ jsx48("svg", { ref: svgRef })
|
|
5460
5353
|
}
|
|
5461
5354
|
)
|
|
5462
5355
|
}
|
|
@@ -5471,16 +5364,16 @@ var GanttChart = ({
|
|
|
5471
5364
|
// src/CardKPI/CardKPI/CardKPI.tsx
|
|
5472
5365
|
import { IconDots, IconHourglassEmpty as IconHourglassEmpty2, IconRosetteDiscountCheck as IconRosetteDiscountCheck2 } from "@tabler/icons-react";
|
|
5473
5366
|
import { useState as useState20 } from "react";
|
|
5474
|
-
import { Fragment as Fragment9, jsx as
|
|
5367
|
+
import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5475
5368
|
function KPIRow({ item }) {
|
|
5476
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ jsxs40(
|
|
5477
5370
|
"div",
|
|
5478
5371
|
{
|
|
5479
|
-
className: `w-full grid body-3 py-2 items-center pl-2 ${item.inputType === "NUMBER" ? "grid-cols-[1fr_100px_50px]" : "grid-cols-[1fr_50px]"}`,
|
|
5372
|
+
className: `w-full grid body-3 gap-2 py-2 items-center pl-2 ${item.inputType === "NUMBER" ? "grid-cols-[1fr_100px_50px]" : "grid-cols-[1fr_50px]"}`,
|
|
5480
5373
|
children: [
|
|
5481
|
-
/* @__PURE__ */
|
|
5482
|
-
item.inputType === "NUMBER" && /* @__PURE__ */
|
|
5483
|
-
item.inputType === "NUMBER" ? /* @__PURE__ */
|
|
5374
|
+
/* @__PURE__ */ jsx49("div", { className: "line-clamp-2 w-full", children: item.textValue }),
|
|
5375
|
+
item.inputType === "NUMBER" && /* @__PURE__ */ jsx49("span", { className: "line-clamp-2", children: `${item.currentValue}/${item.numberValue} ${item.unit}` }),
|
|
5376
|
+
item.inputType === "NUMBER" ? /* @__PURE__ */ jsx49("div", { className: "flex", children: /* @__PURE__ */ jsx49(ProgressBar, { percent: Math.floor(item.currentValue * 100 / (item.numberValue ?? 1)), type: "circle", checkpoints: [0] }) }) : /* @__PURE__ */ jsx49(Fragment9, { children: item.currentValue !== 0 ? /* @__PURE__ */ jsx49(IconRosetteDiscountCheck2, { className: "text-green-500 flex justify-center w-full", size: 30 }) : /* @__PURE__ */ jsx49(IconHourglassEmpty2, { className: "text-yellow-500 flex justify-center w-full", size: 30 }) })
|
|
5484
5377
|
]
|
|
5485
5378
|
}
|
|
5486
5379
|
);
|
|
@@ -5493,15 +5386,15 @@ function CardKPI({
|
|
|
5493
5386
|
projectId
|
|
5494
5387
|
}) {
|
|
5495
5388
|
const [isOpen, setIsOpen] = useState20(false);
|
|
5496
|
-
return /* @__PURE__ */
|
|
5389
|
+
return /* @__PURE__ */ jsxs40(
|
|
5497
5390
|
"div",
|
|
5498
5391
|
{
|
|
5499
5392
|
className: `border-10 p-4 rounded-md w-[420px] h-[450px] relative`,
|
|
5500
5393
|
style: { borderColor: dataItem.projectColor },
|
|
5501
5394
|
children: [
|
|
5502
|
-
/* @__PURE__ */
|
|
5503
|
-
/* @__PURE__ */
|
|
5504
|
-
/* @__PURE__ */
|
|
5395
|
+
/* @__PURE__ */ jsxs40("div", { className: "grid grid-cols-[1fr_70px] justify-between items-center", children: [
|
|
5396
|
+
/* @__PURE__ */ jsx49("div", { className: "line-clamp-2 subtitle-2 ", children: dataItem.name }),
|
|
5397
|
+
/* @__PURE__ */ jsx49("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx49(
|
|
5505
5398
|
"button",
|
|
5506
5399
|
{
|
|
5507
5400
|
type: "button",
|
|
@@ -5511,41 +5404,41 @@ function CardKPI({
|
|
|
5511
5404
|
}
|
|
5512
5405
|
) })
|
|
5513
5406
|
] }),
|
|
5514
|
-
/* @__PURE__ */
|
|
5515
|
-
/* @__PURE__ */
|
|
5516
|
-
/* @__PURE__ */
|
|
5407
|
+
/* @__PURE__ */ jsxs40("div", { className: "my-2 body-1", children: [
|
|
5408
|
+
/* @__PURE__ */ jsx49("div", { className: "translate-y-2", children: "\u0E23\u0E49\u0E2D\u0E22\u0E25\u0E30\u0E02\u0E2D\u0E07\u0E01\u0E34\u0E08\u0E01\u0E23\u0E23\u0E21" }),
|
|
5409
|
+
/* @__PURE__ */ jsx49(ProgressBar, { percent: overallPercent, type: "line", checkpoints: [0] })
|
|
5517
5410
|
] }),
|
|
5518
|
-
/* @__PURE__ */
|
|
5519
|
-
/* @__PURE__ */
|
|
5411
|
+
/* @__PURE__ */ jsxs40("div", { className: "border-b", children: [
|
|
5412
|
+
/* @__PURE__ */ jsx49("span", { className: "body-2 ", children: "\u0E01\u0E25\u0E38\u0E48\u0E21\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22" }),
|
|
5520
5413
|
indicator.filter((ind) => ind.indicatorType === "TARGET").map((item, index) => {
|
|
5521
5414
|
if (index === 2) return;
|
|
5522
|
-
return /* @__PURE__ */
|
|
5415
|
+
return /* @__PURE__ */ jsx49(KPIRow, { item });
|
|
5523
5416
|
})
|
|
5524
5417
|
] }),
|
|
5525
|
-
/* @__PURE__ */
|
|
5526
|
-
/* @__PURE__ */
|
|
5418
|
+
/* @__PURE__ */ jsxs40("div", { className: "pt-2", children: [
|
|
5419
|
+
/* @__PURE__ */ jsx49("span", { className: "body-2 ", children: "\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" }),
|
|
5527
5420
|
indicator.filter((ind) => ind.indicatorType === "OUTPUT").map((item, index) => {
|
|
5528
5421
|
if (index === 2) return;
|
|
5529
|
-
return /* @__PURE__ */
|
|
5422
|
+
return /* @__PURE__ */ jsx49(KPIRow, { item });
|
|
5530
5423
|
})
|
|
5531
5424
|
] }),
|
|
5532
|
-
indicator.filter((item) => item.indicatorType === "TARGET").length > 2 || indicator.filter((item) => item.indicatorType === "OUTPUT").length > 2 ? /* @__PURE__ */
|
|
5425
|
+
indicator.filter((item) => item.indicatorType === "TARGET").length > 2 || indicator.filter((item) => item.indicatorType === "OUTPUT").length > 2 ? /* @__PURE__ */ jsx49("div", { className: "bottom-0 right-1/2 absolute text-gray-300", children: /* @__PURE__ */ jsx49(
|
|
5533
5426
|
IconDots,
|
|
5534
5427
|
{
|
|
5535
5428
|
className: "cursor-pointer",
|
|
5536
5429
|
onClick: () => setIsOpen(true)
|
|
5537
5430
|
}
|
|
5538
5431
|
) }) : void 0,
|
|
5539
|
-
/* @__PURE__ */
|
|
5432
|
+
/* @__PURE__ */ jsx49(
|
|
5540
5433
|
AntDModal,
|
|
5541
5434
|
{
|
|
5542
5435
|
isOpen,
|
|
5543
5436
|
onCancel: () => setIsOpen(false),
|
|
5544
5437
|
width: 600,
|
|
5545
|
-
children: /* @__PURE__ */
|
|
5546
|
-
/* @__PURE__ */
|
|
5547
|
-
/* @__PURE__ */
|
|
5548
|
-
/* @__PURE__ */
|
|
5438
|
+
children: /* @__PURE__ */ jsxs40("div", { className: "mt-10", children: [
|
|
5439
|
+
/* @__PURE__ */ jsxs40("div", { className: "grid grid-cols-[1fr_100px] justify-between items-center subtitle-2 ", children: [
|
|
5440
|
+
/* @__PURE__ */ jsx49("div", { className: "font-medium line-clamp-2", children: dataItem.name }),
|
|
5441
|
+
/* @__PURE__ */ jsx49(
|
|
5549
5442
|
"button",
|
|
5550
5443
|
{
|
|
5551
5444
|
type: "button",
|
|
@@ -5555,17 +5448,17 @@ function CardKPI({
|
|
|
5555
5448
|
}
|
|
5556
5449
|
)
|
|
5557
5450
|
] }),
|
|
5558
|
-
/* @__PURE__ */
|
|
5559
|
-
/* @__PURE__ */
|
|
5560
|
-
/* @__PURE__ */
|
|
5451
|
+
/* @__PURE__ */ jsxs40("div", { className: "p-4", children: [
|
|
5452
|
+
/* @__PURE__ */ jsxs40("div", { children: [
|
|
5453
|
+
/* @__PURE__ */ jsx49("span", { className: "body-1 border-b", children: "\u0E01\u0E25\u0E38\u0E48\u0E21\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22" }),
|
|
5561
5454
|
indicator.filter((ind) => ind.indicatorType === "TARGET").map((item, index) => {
|
|
5562
|
-
return /* @__PURE__ */
|
|
5455
|
+
return /* @__PURE__ */ jsx49(KPIRow, { item });
|
|
5563
5456
|
})
|
|
5564
5457
|
] }),
|
|
5565
|
-
/* @__PURE__ */
|
|
5566
|
-
/* @__PURE__ */
|
|
5458
|
+
/* @__PURE__ */ jsxs40("div", { children: [
|
|
5459
|
+
/* @__PURE__ */ jsx49("span", { className: "body-1 border-b", children: "\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E27\u0E31\u0E14\u0E1C\u0E25\u0E1C\u0E25\u0E34\u0E15" }),
|
|
5567
5460
|
indicator.filter((ind) => ind.indicatorType === "OUTPUT").map((item, index) => {
|
|
5568
|
-
return /* @__PURE__ */
|
|
5461
|
+
return /* @__PURE__ */ jsx49(KPIRow, { item });
|
|
5569
5462
|
})
|
|
5570
5463
|
] })
|
|
5571
5464
|
] })
|
|
@@ -5624,8 +5517,6 @@ export {
|
|
|
5624
5517
|
TertiaryButton,
|
|
5625
5518
|
TextAreaInput,
|
|
5626
5519
|
TextInput,
|
|
5627
|
-
TimePickerBasic,
|
|
5628
|
-
TimePickerRangePicker,
|
|
5629
5520
|
TopNavBar,
|
|
5630
5521
|
messageError,
|
|
5631
5522
|
messageInfo,
|