@fctc/sme-widget-ui 1.9.5 → 1.9.7
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/icons.js +29 -389
- package/dist/icons.mjs +72 -432
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +686 -1249
- package/dist/index.mjs +610 -1172
- package/dist/widgets.d.mts +1 -8
- package/dist/widgets.d.ts +1 -8
- package/dist/widgets.js +685 -1325
- package/dist/widgets.mjs +594 -1233
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5012,7 +5012,6 @@ __export(index_exports, {
|
|
|
5012
5012
|
RadioGroupField: () => RadioGroupField,
|
|
5013
5013
|
RatingStarField: () => RatingStarField,
|
|
5014
5014
|
RemainingDaysField: () => RemainingDaysField,
|
|
5015
|
-
RenderFiles: () => RenderFiles,
|
|
5016
5015
|
ResetIcon: () => ResetIcon,
|
|
5017
5016
|
Row: () => Row,
|
|
5018
5017
|
Search: () => Search,
|
|
@@ -5653,201 +5652,21 @@ var DownloadIcon = () => {
|
|
|
5653
5652
|
// src/icons/excel-icon.tsx
|
|
5654
5653
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
5655
5654
|
var ExcelIcon = () => {
|
|
5656
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.
|
|
5655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5657
5656
|
"svg",
|
|
5658
5657
|
{
|
|
5659
|
-
width: "40",
|
|
5660
|
-
height: "40",
|
|
5661
|
-
viewBox: "0 0 40 40",
|
|
5662
|
-
fill: "none",
|
|
5663
5658
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
"path",
|
|
5676
|
-
{
|
|
5677
|
-
d: "M30 39.25H10C7.10051 39.25 4.75 36.8995 4.75 34V6C4.75 3.10051 7.10051 0.75 10 0.75H20.5147C21.9071 0.75 23.2425 1.30312 24.227 2.28769L33.7123 11.773C34.6969 12.7575 35.25 14.0929 35.25 15.4853V34C35.25 36.8995 32.8995 39.25 30 39.25Z",
|
|
5678
|
-
stroke: "#E5E5E5",
|
|
5679
|
-
strokeWidth: "1.5"
|
|
5680
|
-
}
|
|
5681
|
-
)
|
|
5682
|
-
] }),
|
|
5683
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5684
|
-
"path",
|
|
5685
|
-
{
|
|
5686
|
-
d: "M23 1V9C23 11.2091 24.7909 13 27 13H35",
|
|
5687
|
-
stroke: "#E5E5E5",
|
|
5688
|
-
strokeWidth: "1.5"
|
|
5689
|
-
}
|
|
5690
|
-
),
|
|
5691
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("g", { filter: "url(#filter1_i_3263_110998)", children: [
|
|
5692
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("mask", { id: "path-4-inside-1_3263_110998", fill: "white", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M0 22C0 19.7909 1.79086 18 4 18H29C31.2091 18 33 19.7909 33 22V30C33 32.2091 31.2091 34 29 34H4C1.79086 34 0 32.2091 0 30V22Z" }) }),
|
|
5693
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5694
|
-
"path",
|
|
5695
|
-
{
|
|
5696
|
-
d: "M0 22C0 19.7909 1.79086 18 4 18H29C31.2091 18 33 19.7909 33 22V30C33 32.2091 31.2091 34 29 34H4C1.79086 34 0 32.2091 0 30V22Z",
|
|
5697
|
-
fill: "#11A52B"
|
|
5698
|
-
}
|
|
5699
|
-
),
|
|
5700
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5701
|
-
"path",
|
|
5702
|
-
{
|
|
5703
|
-
d: "M-1 22C-1 19.2386 1.23858 17 4 17H29C31.7614 17 34 19.2386 34 22H32C32 20.3431 30.6569 19 29 19H4C2.34315 19 1 20.3431 1 22H-1ZM33 34H0H33ZM4 34C1.23858 34 -1 31.7614 -1 29V22C-1 19.2386 1.23858 17 4 17V19C2.34315 19 1 20.3431 1 22V30C1 32.2091 2.34315 34 4 34ZM29 17C31.7614 17 34 19.2386 34 22V29C34 31.7614 31.7614 34 29 34C30.6569 34 32 32.2091 32 30V22C32 20.3431 30.6569 19 29 19V17Z",
|
|
5704
|
-
fill: "black",
|
|
5705
|
-
fillOpacity: "0.08",
|
|
5706
|
-
mask: "url(#path-4-inside-1_3263_110998)"
|
|
5707
|
-
}
|
|
5708
|
-
),
|
|
5709
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5710
|
-
"path",
|
|
5711
|
-
{
|
|
5712
|
-
d: "M4.81818 22.7273L6.41974 25.3906H6.47656L8.08523 22.7273H9.58736L7.34659 26.3636L9.62287 30H8.09588L6.47656 27.3544H6.41974L4.80043 30H3.28054L5.57812 26.3636L3.30895 22.7273H4.81818ZM10.8216 30V22.7273H12.1391V28.8956H15.3422V30H10.8216ZM20.6381 24.7266C20.605 24.4164 20.4653 24.175 20.2191 24.0021C19.9752 23.8293 19.658 23.7429 19.2674 23.7429C18.9927 23.7429 18.7572 23.7843 18.5607 23.8672C18.3642 23.95 18.2139 24.0625 18.1097 24.2045C18.0055 24.3466 17.9523 24.5088 17.9499 24.6911C17.9499 24.8426 17.9842 24.974 18.0529 25.0852C18.1239 25.1965 18.2198 25.2912 18.3405 25.3693C18.4613 25.4451 18.595 25.509 18.7418 25.5611C18.8886 25.6132 19.0365 25.657 19.1857 25.6925L19.8675 25.8629C20.1421 25.9268 20.4061 26.0133 20.6594 26.1222C20.9151 26.2311 21.1435 26.3684 21.3448 26.5341C21.5484 26.6998 21.7094 26.8999 21.8277 27.1342C21.9461 27.3686 22.0053 27.6432 22.0053 27.9581C22.0053 28.3842 21.8964 28.7595 21.6786 29.0838C21.4608 29.4058 21.1459 29.6579 20.734 29.8402C20.3244 30.0201 19.8284 30.1101 19.2461 30.1101C18.6802 30.1101 18.189 30.0225 17.7723 29.8473C17.358 29.6721 17.0337 29.4164 16.7993 29.0803C16.5673 28.7441 16.4418 28.3345 16.4229 27.8516H17.7191C17.738 28.1049 17.8161 28.3156 17.9534 28.4837C18.0908 28.6518 18.2695 28.7772 18.4897 28.8601C18.7122 28.9429 18.9608 28.9844 19.2354 28.9844C19.5219 28.9844 19.7728 28.9418 19.9882 28.8565C20.206 28.7689 20.3765 28.6482 20.4996 28.4943C20.6227 28.3381 20.6855 28.1558 20.6878 27.9474C20.6855 27.758 20.6298 27.6018 20.5209 27.4787C20.412 27.3532 20.2593 27.2491 20.0628 27.1662C19.8687 27.081 19.6414 27.0052 19.381 26.9389L18.5536 26.7259C17.9546 26.572 17.4811 26.3388 17.1331 26.0263C16.7875 25.7114 16.6147 25.2936 16.6147 24.7727C16.6147 24.3442 16.7307 23.969 16.9627 23.647C17.1971 23.325 17.5155 23.0753 17.9179 22.8977C18.3204 22.7178 18.7761 22.6278 19.2851 22.6278C19.8012 22.6278 20.2534 22.7178 20.6417 22.8977C21.0323 23.0753 21.3389 23.3227 21.5614 23.6399C21.7839 23.9548 21.8988 24.317 21.9059 24.7266H20.6381ZM24.4807 22.7273L26.0822 25.3906H26.1391L27.7477 22.7273H29.2499L27.0091 26.3636L29.2854 30H27.7584L26.1391 27.3544H26.0822L24.4629 30H22.943L25.2406 26.3636L22.9714 22.7273H24.4807Z",
|
|
5713
|
-
fill: "white"
|
|
5714
|
-
}
|
|
5715
|
-
)
|
|
5716
|
-
] })
|
|
5717
|
-
] }),
|
|
5718
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("defs", { children: [
|
|
5719
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5720
|
-
"filter",
|
|
5721
|
-
{
|
|
5722
|
-
id: "filter0_di_3263_110998",
|
|
5723
|
-
x: "2",
|
|
5724
|
-
y: "-4",
|
|
5725
|
-
width: "36",
|
|
5726
|
-
height: "47",
|
|
5727
|
-
filterUnits: "userSpaceOnUse",
|
|
5728
|
-
colorInterpolationFilters: "sRGB",
|
|
5729
|
-
children: [
|
|
5730
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
5731
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5732
|
-
"feColorMatrix",
|
|
5733
|
-
{
|
|
5734
|
-
in: "SourceAlpha",
|
|
5735
|
-
type: "matrix",
|
|
5736
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
5737
|
-
result: "hardAlpha"
|
|
5738
|
-
}
|
|
5739
|
-
),
|
|
5740
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feOffset", { dy: "1" }),
|
|
5741
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feGaussianBlur", { stdDeviation: "1" }),
|
|
5742
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
|
5743
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5744
|
-
"feColorMatrix",
|
|
5745
|
-
{
|
|
5746
|
-
type: "matrix",
|
|
5747
|
-
values: "0 0 0 0 0.894118 0 0 0 0 0.898039 0 0 0 0 0.905882 0 0 0 0.24 0"
|
|
5748
|
-
}
|
|
5749
|
-
),
|
|
5750
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5751
|
-
"feBlend",
|
|
5752
|
-
{
|
|
5753
|
-
mode: "normal",
|
|
5754
|
-
in2: "BackgroundImageFix",
|
|
5755
|
-
result: "effect1_dropShadow_3263_110998"
|
|
5756
|
-
}
|
|
5757
|
-
),
|
|
5758
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5759
|
-
"feBlend",
|
|
5760
|
-
{
|
|
5761
|
-
mode: "normal",
|
|
5762
|
-
in: "SourceGraphic",
|
|
5763
|
-
in2: "effect1_dropShadow_3263_110998",
|
|
5764
|
-
result: "shape"
|
|
5765
|
-
}
|
|
5766
|
-
),
|
|
5767
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5768
|
-
"feColorMatrix",
|
|
5769
|
-
{
|
|
5770
|
-
in: "SourceAlpha",
|
|
5771
|
-
type: "matrix",
|
|
5772
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
5773
|
-
result: "hardAlpha"
|
|
5774
|
-
}
|
|
5775
|
-
),
|
|
5776
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feOffset", { dy: "-4" }),
|
|
5777
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feGaussianBlur", { stdDeviation: "2" }),
|
|
5778
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
5779
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5780
|
-
"feColorMatrix",
|
|
5781
|
-
{
|
|
5782
|
-
type: "matrix",
|
|
5783
|
-
values: "0 0 0 0 0.813571 0 0 0 0 0.82 0 0 0 0 0.826429 0 0 0 0.32 0"
|
|
5784
|
-
}
|
|
5785
|
-
),
|
|
5786
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5787
|
-
"feBlend",
|
|
5788
|
-
{
|
|
5789
|
-
mode: "normal",
|
|
5790
|
-
in2: "shape",
|
|
5791
|
-
result: "effect2_innerShadow_3263_110998"
|
|
5792
|
-
}
|
|
5793
|
-
)
|
|
5794
|
-
]
|
|
5795
|
-
}
|
|
5796
|
-
),
|
|
5797
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5798
|
-
"filter",
|
|
5799
|
-
{
|
|
5800
|
-
id: "filter1_i_3263_110998",
|
|
5801
|
-
x: "0",
|
|
5802
|
-
y: "18",
|
|
5803
|
-
width: "33",
|
|
5804
|
-
height: "20",
|
|
5805
|
-
filterUnits: "userSpaceOnUse",
|
|
5806
|
-
colorInterpolationFilters: "sRGB",
|
|
5807
|
-
children: [
|
|
5808
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
5809
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5810
|
-
"feBlend",
|
|
5811
|
-
{
|
|
5812
|
-
mode: "normal",
|
|
5813
|
-
in: "SourceGraphic",
|
|
5814
|
-
in2: "BackgroundImageFix",
|
|
5815
|
-
result: "shape"
|
|
5816
|
-
}
|
|
5817
|
-
),
|
|
5818
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5819
|
-
"feColorMatrix",
|
|
5820
|
-
{
|
|
5821
|
-
in: "SourceAlpha",
|
|
5822
|
-
type: "matrix",
|
|
5823
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
5824
|
-
result: "hardAlpha"
|
|
5825
|
-
}
|
|
5826
|
-
),
|
|
5827
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feOffset", { dy: "4" }),
|
|
5828
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feGaussianBlur", { stdDeviation: "2" }),
|
|
5829
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
5830
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5831
|
-
"feColorMatrix",
|
|
5832
|
-
{
|
|
5833
|
-
type: "matrix",
|
|
5834
|
-
values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0"
|
|
5835
|
-
}
|
|
5836
|
-
),
|
|
5837
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5838
|
-
"feBlend",
|
|
5839
|
-
{
|
|
5840
|
-
mode: "normal",
|
|
5841
|
-
in2: "shape",
|
|
5842
|
-
result: "effect1_innerShadow_3263_110998"
|
|
5843
|
-
}
|
|
5844
|
-
)
|
|
5845
|
-
]
|
|
5846
|
-
}
|
|
5847
|
-
),
|
|
5848
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("clipPath", { id: "clip0_3263_110998", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("rect", { width: "40", height: "40", fill: "white" }) })
|
|
5849
|
-
] })
|
|
5850
|
-
]
|
|
5659
|
+
width: "19",
|
|
5660
|
+
height: "10",
|
|
5661
|
+
viewBox: "0 0 19 10",
|
|
5662
|
+
fill: "none",
|
|
5663
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5664
|
+
"path",
|
|
5665
|
+
{
|
|
5666
|
+
d: "M18.5 8.5C18.5 8.9125 18.1625 9.25 17.75 9.25H1.25C0.8375 9.25 0.5 8.9125 0.5 8.5V1C0.5 0.5875 0.8375 0.25 1.25 0.25H17.75C18.1625 0.25 18.5 0.5875 18.5 1V8.5Z",
|
|
5667
|
+
fill: "#47A800"
|
|
5668
|
+
}
|
|
5669
|
+
)
|
|
5851
5670
|
}
|
|
5852
5671
|
);
|
|
5853
5672
|
};
|
|
@@ -6093,201 +5912,21 @@ var MoreIcon = () => {
|
|
|
6093
5912
|
// src/icons/pdf-icon.tsx
|
|
6094
5913
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
6095
5914
|
var PdfIcon = () => {
|
|
6096
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.
|
|
5915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6097
5916
|
"svg",
|
|
6098
5917
|
{
|
|
6099
|
-
width: "40",
|
|
6100
|
-
height: "40",
|
|
6101
|
-
viewBox: "0 0 40 40",
|
|
6102
|
-
fill: "none",
|
|
6103
5918
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
"path",
|
|
6116
|
-
{
|
|
6117
|
-
d: "M30 39.25H10C7.10051 39.25 4.75 36.8995 4.75 34V6C4.75 3.10051 7.10051 0.75 10 0.75H20.5147C21.9071 0.75 23.2425 1.30312 24.227 2.28769L33.7123 11.773C34.6969 12.7575 35.25 14.0929 35.25 15.4853V34C35.25 36.8995 32.8995 39.25 30 39.25Z",
|
|
6118
|
-
stroke: "#CDD0D5",
|
|
6119
|
-
strokeWidth: "1.5"
|
|
6120
|
-
}
|
|
6121
|
-
)
|
|
6122
|
-
] }),
|
|
6123
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6124
|
-
"path",
|
|
6125
|
-
{
|
|
6126
|
-
d: "M23 1V9C23 11.2091 24.7909 13 27 13H35",
|
|
6127
|
-
stroke: "#CDD0D5",
|
|
6128
|
-
strokeWidth: "1.5"
|
|
6129
|
-
}
|
|
6130
|
-
),
|
|
6131
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("g", { filter: "url(#filter1_i_2648_1158)", children: [
|
|
6132
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("mask", { id: "path-4-inside-1_2648_1158", fill: "white", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M0 22C0 19.7909 1.79086 18 4 18H24C26.2091 18 28 19.7909 28 22V30C28 32.2091 26.2091 34 24 34H4C1.79086 34 0 32.2091 0 30V22Z" }) }),
|
|
6133
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6134
|
-
"path",
|
|
6135
|
-
{
|
|
6136
|
-
d: "M0 22C0 19.7909 1.79086 18 4 18H24C26.2091 18 28 19.7909 28 22V30C28 32.2091 26.2091 34 24 34H4C1.79086 34 0 32.2091 0 30V22Z",
|
|
6137
|
-
fill: "#DF1C41"
|
|
6138
|
-
}
|
|
6139
|
-
),
|
|
6140
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6141
|
-
"path",
|
|
6142
|
-
{
|
|
6143
|
-
d: "M-1 22C-1 19.2386 1.23858 17 4 17H24C26.7614 17 29 19.2386 29 22H27C27 20.3431 25.6569 19 24 19H4C2.34315 19 1 20.3431 1 22H-1ZM28 34H0H28ZM4 34C1.23858 34 -1 31.7614 -1 29V22C-1 19.2386 1.23858 17 4 17V19C2.34315 19 1 20.3431 1 22V30C1 32.2091 2.34315 34 4 34ZM24 17C26.7614 17 29 19.2386 29 22V29C29 31.7614 26.7614 34 24 34C25.6569 34 27 32.2091 27 30V22C27 20.3431 25.6569 19 24 19V17Z",
|
|
6144
|
-
fill: "black",
|
|
6145
|
-
fillOpacity: "0.08",
|
|
6146
|
-
mask: "url(#path-4-inside-1_2648_1158)"
|
|
6147
|
-
}
|
|
6148
|
-
),
|
|
6149
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6150
|
-
"path",
|
|
6151
|
-
{
|
|
6152
|
-
d: "M3.78906 30V22H6.78906C7.40365 22 7.91927 22.1146 8.33594 22.3437C8.75521 22.5729 9.07161 22.888 9.28516 23.2891C9.5013 23.6875 9.60938 24.1406 9.60938 24.6484C9.60938 25.1615 9.5013 25.6172 9.28516 26.0156C9.06901 26.4141 8.75 26.7279 8.32812 26.957C7.90625 27.1836 7.38672 27.2969 6.76953 27.2969H4.78125V26.1055H6.57422C6.93359 26.1055 7.22786 26.043 7.45703 25.918C7.6862 25.793 7.85547 25.6211 7.96484 25.4023C8.07682 25.1836 8.13281 24.9323 8.13281 24.6484C8.13281 24.3646 8.07682 24.1146 7.96484 23.8984C7.85547 23.6823 7.6849 23.5143 7.45313 23.3945C7.22396 23.2721 6.92839 23.2109 6.56641 23.2109H5.23828V30H3.78906ZM13.7991 30H11.0882V22H13.8538C14.6481 22 15.3304 22.1602 15.9007 22.4805C16.4736 22.7982 16.9137 23.2552 17.221 23.8516C17.5283 24.4479 17.6819 25.1615 17.6819 25.9922C17.6819 26.8255 17.527 27.5417 17.2171 28.1406C16.9098 28.7396 16.4658 29.1992 15.885 29.5195C15.3069 29.8398 14.6116 30 13.7991 30ZM12.5374 28.7461H13.7288C14.2861 28.7461 14.7509 28.6445 15.1233 28.4414C15.4957 28.2357 15.7757 27.9297 15.9632 27.5234C16.1507 27.1146 16.2444 26.6042 16.2444 25.9922C16.2444 25.3802 16.1507 24.8724 15.9632 24.4687C15.7757 24.0625 15.4983 23.7591 15.1311 23.5586C14.7665 23.3555 14.3134 23.2539 13.7718 23.2539H12.5374V28.7461ZM19.2789 30V22H24.4039V23.2148H20.7281V25.3867H24.0523V26.6016H20.7281V30H19.2789Z",
|
|
6153
|
-
fill: "white"
|
|
6154
|
-
}
|
|
6155
|
-
)
|
|
6156
|
-
] })
|
|
6157
|
-
] }),
|
|
6158
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("defs", { children: [
|
|
6159
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
6160
|
-
"filter",
|
|
6161
|
-
{
|
|
6162
|
-
id: "filter0_di_2648_1158",
|
|
6163
|
-
x: "2",
|
|
6164
|
-
y: "-4",
|
|
6165
|
-
width: "36",
|
|
6166
|
-
height: "47",
|
|
6167
|
-
filterUnits: "userSpaceOnUse",
|
|
6168
|
-
colorInterpolationFilters: "sRGB",
|
|
6169
|
-
children: [
|
|
6170
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
6171
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6172
|
-
"feColorMatrix",
|
|
6173
|
-
{
|
|
6174
|
-
in: "SourceAlpha",
|
|
6175
|
-
type: "matrix",
|
|
6176
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
6177
|
-
result: "hardAlpha"
|
|
6178
|
-
}
|
|
6179
|
-
),
|
|
6180
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feOffset", { dy: "1" }),
|
|
6181
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feGaussianBlur", { stdDeviation: "1" }),
|
|
6182
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }),
|
|
6183
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6184
|
-
"feColorMatrix",
|
|
6185
|
-
{
|
|
6186
|
-
type: "matrix",
|
|
6187
|
-
values: "0 0 0 0 0.894118 0 0 0 0 0.898039 0 0 0 0 0.905882 0 0 0 0.24 0"
|
|
6188
|
-
}
|
|
6189
|
-
),
|
|
6190
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6191
|
-
"feBlend",
|
|
6192
|
-
{
|
|
6193
|
-
mode: "normal",
|
|
6194
|
-
in2: "BackgroundImageFix",
|
|
6195
|
-
result: "effect1_dropShadow_2648_1158"
|
|
6196
|
-
}
|
|
6197
|
-
),
|
|
6198
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6199
|
-
"feBlend",
|
|
6200
|
-
{
|
|
6201
|
-
mode: "normal",
|
|
6202
|
-
in: "SourceGraphic",
|
|
6203
|
-
in2: "effect1_dropShadow_2648_1158",
|
|
6204
|
-
result: "shape"
|
|
6205
|
-
}
|
|
6206
|
-
),
|
|
6207
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6208
|
-
"feColorMatrix",
|
|
6209
|
-
{
|
|
6210
|
-
in: "SourceAlpha",
|
|
6211
|
-
type: "matrix",
|
|
6212
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
6213
|
-
result: "hardAlpha"
|
|
6214
|
-
}
|
|
6215
|
-
),
|
|
6216
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feOffset", { dy: "-4" }),
|
|
6217
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feGaussianBlur", { stdDeviation: "2" }),
|
|
6218
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
6219
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6220
|
-
"feColorMatrix",
|
|
6221
|
-
{
|
|
6222
|
-
type: "matrix",
|
|
6223
|
-
values: "0 0 0 0 0.813571 0 0 0 0 0.82 0 0 0 0 0.826429 0 0 0 0.32 0"
|
|
6224
|
-
}
|
|
6225
|
-
),
|
|
6226
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6227
|
-
"feBlend",
|
|
6228
|
-
{
|
|
6229
|
-
mode: "normal",
|
|
6230
|
-
in2: "shape",
|
|
6231
|
-
result: "effect2_innerShadow_2648_1158"
|
|
6232
|
-
}
|
|
6233
|
-
)
|
|
6234
|
-
]
|
|
6235
|
-
}
|
|
6236
|
-
),
|
|
6237
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
6238
|
-
"filter",
|
|
6239
|
-
{
|
|
6240
|
-
id: "filter1_i_2648_1158",
|
|
6241
|
-
x: "0",
|
|
6242
|
-
y: "18",
|
|
6243
|
-
width: "28",
|
|
6244
|
-
height: "20",
|
|
6245
|
-
filterUnits: "userSpaceOnUse",
|
|
6246
|
-
colorInterpolationFilters: "sRGB",
|
|
6247
|
-
children: [
|
|
6248
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
6249
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6250
|
-
"feBlend",
|
|
6251
|
-
{
|
|
6252
|
-
mode: "normal",
|
|
6253
|
-
in: "SourceGraphic",
|
|
6254
|
-
in2: "BackgroundImageFix",
|
|
6255
|
-
result: "shape"
|
|
6256
|
-
}
|
|
6257
|
-
),
|
|
6258
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6259
|
-
"feColorMatrix",
|
|
6260
|
-
{
|
|
6261
|
-
in: "SourceAlpha",
|
|
6262
|
-
type: "matrix",
|
|
6263
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
6264
|
-
result: "hardAlpha"
|
|
6265
|
-
}
|
|
6266
|
-
),
|
|
6267
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feOffset", { dy: "4" }),
|
|
6268
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feGaussianBlur", { stdDeviation: "2" }),
|
|
6269
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
6270
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6271
|
-
"feColorMatrix",
|
|
6272
|
-
{
|
|
6273
|
-
type: "matrix",
|
|
6274
|
-
values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0"
|
|
6275
|
-
}
|
|
6276
|
-
),
|
|
6277
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
6278
|
-
"feBlend",
|
|
6279
|
-
{
|
|
6280
|
-
mode: "normal",
|
|
6281
|
-
in2: "shape",
|
|
6282
|
-
result: "effect1_innerShadow_2648_1158"
|
|
6283
|
-
}
|
|
6284
|
-
)
|
|
6285
|
-
]
|
|
6286
|
-
}
|
|
6287
|
-
),
|
|
6288
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("clipPath", { id: "clip0_2648_1158", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("rect", { width: "40", height: "40", fill: "white" }) })
|
|
6289
|
-
] })
|
|
6290
|
-
]
|
|
5919
|
+
width: "19",
|
|
5920
|
+
height: "10",
|
|
5921
|
+
viewBox: "0 0 19 10",
|
|
5922
|
+
fill: "none",
|
|
5923
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5924
|
+
"path",
|
|
5925
|
+
{
|
|
5926
|
+
d: "M18.6992 8.5C18.6992 8.9125 18.3617 9.25 17.9492 9.25H1.44922C1.03672 9.25 0.699219 8.9125 0.699219 8.5V1C0.699219 0.5875 1.03672 0.25 1.44922 0.25H17.9492C18.3617 0.25 18.6992 0.5875 18.6992 1V8.5Z",
|
|
5927
|
+
fill: "#FF4B34"
|
|
5928
|
+
}
|
|
5929
|
+
)
|
|
6291
5930
|
}
|
|
6292
5931
|
);
|
|
6293
5932
|
};
|
|
@@ -7108,28 +6747,28 @@ var VideoIcon = () => {
|
|
|
7108
6747
|
{
|
|
7109
6748
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7110
6749
|
width: "22",
|
|
7111
|
-
height: "
|
|
7112
|
-
viewBox: "0 0 22
|
|
6750
|
+
height: "20",
|
|
6751
|
+
viewBox: "0 0 22 20",
|
|
7113
6752
|
fill: "none",
|
|
7114
6753
|
children: [
|
|
7115
6754
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7116
6755
|
"path",
|
|
7117
6756
|
{
|
|
7118
|
-
d: "M22.0001
|
|
6757
|
+
d: "M22.0001 1.60859L22.0001 18.3914C22.0001 19.2798 21.2799 20 20.3915 20H1.61054C0.722142 20 0.00195312 19.2798 0.00195312 18.3914V1.60859C0.00195312 0.720189 0.722143 0 1.61054 0H20.3915C21.2799 0 22.0001 0.720189 22.0001 1.60859Z",
|
|
7119
6758
|
fill: "#435E88"
|
|
7120
6759
|
}
|
|
7121
6760
|
),
|
|
7122
6761
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7123
6762
|
"path",
|
|
7124
6763
|
{
|
|
7125
|
-
d: "M21.9974
|
|
6764
|
+
d: "M21.9974 1.60515L21.9981 18.3914C21.9981 19.2782 21.2797 20 20.3895 20H1.60863C0.721846 20 0 19.2782 0 18.3914L20.3888 0C21.2791 0 21.9974 0.718322 21.9974 1.60515Z",
|
|
7126
6765
|
fill: "#33527D"
|
|
7127
6766
|
}
|
|
7128
6767
|
),
|
|
7129
6768
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
7130
6769
|
"path",
|
|
7131
6770
|
{
|
|
7132
|
-
d: "M3.96875 14.
|
|
6771
|
+
d: "M3.96875 14.3779C4.15191 14.3782 4.30078 14.5267 4.30078 14.71V16.623C4.30078 16.8063 4.15191 16.9549 3.96875 16.9551H2.05469C1.87133 16.9551 1.72266 16.8064 1.72266 16.623V14.71C1.72266 14.5266 1.87133 14.3779 2.05469 14.3779H3.96875ZM19.9492 14.3779C20.1326 14.3779 20.2812 14.5266 20.2812 14.71V16.623C20.2812 16.8064 20.1326 16.9551 19.9492 16.9551H18.0361C17.8528 16.9551 17.7041 16.8064 17.7041 16.623V14.71C17.7041 14.5266 17.8528 14.3779 18.0361 14.3779H19.9492ZM8.59473 7.05566C8.59499 6.5953 9.10791 6.32103 9.49121 6.57617L14.1484 9.67578C14.4914 9.90408 14.4914 10.4084 14.1484 10.6367L9.49121 13.7363C9.10788 13.9915 8.59493 13.7173 8.59473 13.2568V7.05566ZM3.96875 10.1592C4.15175 10.1594 4.30052 10.3072 4.30078 10.4902V12.4043C4.30078 12.5875 4.15191 12.7361 3.96875 12.7363H2.05469C1.87133 12.7363 1.72266 12.5877 1.72266 12.4043V10.4902C1.72292 10.3071 1.87149 10.1592 2.05469 10.1592H3.96875ZM19.9492 10.1592C20.1324 10.1592 20.281 10.3071 20.2812 10.4902V12.4043C20.2812 12.5877 20.1326 12.7363 19.9492 12.7363H18.0361C17.8528 12.7363 17.7041 12.5877 17.7041 12.4043V10.4902C17.7044 10.3071 17.8529 10.1592 18.0361 10.1592H19.9492ZM3.96875 5.9375C4.15177 5.93773 4.30055 6.08651 4.30078 6.26953V8.18359C4.30078 8.36681 4.15191 8.5154 3.96875 8.51562H2.05469C1.87133 8.51562 1.72266 8.36695 1.72266 8.18359V6.26953C1.72289 6.08637 1.87147 5.9375 2.05469 5.9375H3.96875ZM19.9492 5.9375C20.1324 5.9375 20.281 6.08637 20.2812 6.26953V8.18359C20.2812 8.36695 20.1326 8.51562 19.9492 8.51562H18.0361C17.8528 8.51562 17.7041 8.36695 17.7041 8.18359V6.26953C17.7043 6.08637 17.8529 5.9375 18.0361 5.9375H19.9492ZM3.96875 1.71875C4.15181 1.71898 4.3006 1.86771 4.30078 2.05078V3.96484C4.30078 4.14806 4.15191 4.29665 3.96875 4.29688H2.05469C1.87133 4.29688 1.72266 4.1482 1.72266 3.96484V2.05078C1.72283 1.86757 1.87144 1.71875 2.05469 1.71875H3.96875ZM19.9492 1.71875C20.1325 1.71875 20.2811 1.86757 20.2812 2.05078V3.96484C20.2812 4.1482 20.1326 4.29688 19.9492 4.29688H18.0361C17.8528 4.29688 17.7041 4.1482 17.7041 3.96484V2.05078C17.7043 1.86757 17.8529 1.71875 18.0361 1.71875H19.9492Z",
|
|
7133
6772
|
fill: "white"
|
|
7134
6773
|
}
|
|
7135
6774
|
)
|
|
@@ -16552,213 +16191,12 @@ var LoadingSmall = () => {
|
|
|
16552
16191
|
)) }) }) }) });
|
|
16553
16192
|
};
|
|
16554
16193
|
|
|
16555
|
-
// src/widgets/common/render-files.tsx
|
|
16556
|
-
var import_react27 = require("react");
|
|
16557
|
-
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
16558
|
-
var FileItem = (props) => {
|
|
16559
|
-
const {
|
|
16560
|
-
filename,
|
|
16561
|
-
index: index4,
|
|
16562
|
-
handleRemoveFile,
|
|
16563
|
-
handleFileDownload,
|
|
16564
|
-
src,
|
|
16565
|
-
mimetype,
|
|
16566
|
-
size: size4,
|
|
16567
|
-
id,
|
|
16568
|
-
envFile,
|
|
16569
|
-
accessToken
|
|
16570
|
-
} = props;
|
|
16571
|
-
const [name2, ext] = filename.split(".");
|
|
16572
|
-
const shortName = name2.length > 12 ? name2.slice(0, 6) : name2;
|
|
16573
|
-
const [isOpen, setIsOpen] = (0, import_react27.useState)(false);
|
|
16574
|
-
const tooltipRef = (0, import_react27.useRef)(null);
|
|
16575
|
-
(0, import_react27.useEffect)(() => {
|
|
16576
|
-
const handleClickOutside = (event) => {
|
|
16577
|
-
if (tooltipRef.current && !tooltipRef.current.contains(event.target)) {
|
|
16578
|
-
setIsOpen(false);
|
|
16579
|
-
}
|
|
16580
|
-
};
|
|
16581
|
-
if (isOpen) {
|
|
16582
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
16583
|
-
} else {
|
|
16584
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
16585
|
-
}
|
|
16586
|
-
return () => {
|
|
16587
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
16588
|
-
};
|
|
16589
|
-
}, [isOpen]);
|
|
16590
|
-
const fileTypeIcon = {
|
|
16591
|
-
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PdfIcon, {}),
|
|
16592
|
-
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ZipIcon, {}),
|
|
16593
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ZipIcon, {}),
|
|
16594
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExcelIcon, {}),
|
|
16595
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExcelIcon, {}),
|
|
16596
|
-
"image/png": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ImageIcon, {}),
|
|
16597
|
-
"video/mp4": /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(VideoIcon, {})
|
|
16598
|
-
};
|
|
16599
|
-
const renderFile = () => {
|
|
16600
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16601
|
-
"div",
|
|
16602
|
-
{
|
|
16603
|
-
onClick: (e3) => {
|
|
16604
|
-
if (accessToken) {
|
|
16605
|
-
e3?.stopPropagation();
|
|
16606
|
-
downloadFile(
|
|
16607
|
-
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
16608
|
-
filename,
|
|
16609
|
-
accessToken
|
|
16610
|
-
);
|
|
16611
|
-
}
|
|
16612
|
-
},
|
|
16613
|
-
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
16614
|
-
className: "flex items-center p-2 gap-2 overflow-hidden rounded-lg",
|
|
16615
|
-
children: [
|
|
16616
|
-
fileTypeIcon[mimetype],
|
|
16617
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { ref: tooltipRef, className: "relative w-fit", children: [
|
|
16618
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16619
|
-
"p",
|
|
16620
|
-
{
|
|
16621
|
-
className: "text-[#060606] font-medium text-[14px] cursor-pointer",
|
|
16622
|
-
onClick: () => setIsOpen((prev2) => !prev2),
|
|
16623
|
-
"data-tooltip-id": `field-help-${id}`,
|
|
16624
|
-
"data-tooltip-content": filename,
|
|
16625
|
-
children: [
|
|
16626
|
-
shortName + "...",
|
|
16627
|
-
".",
|
|
16628
|
-
ext
|
|
16629
|
-
]
|
|
16630
|
-
}
|
|
16631
|
-
),
|
|
16632
|
-
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16633
|
-
M,
|
|
16634
|
-
{
|
|
16635
|
-
id: `field-help-${id}`,
|
|
16636
|
-
isOpen,
|
|
16637
|
-
place: "top",
|
|
16638
|
-
positionStrategy: "fixed",
|
|
16639
|
-
style: {
|
|
16640
|
-
padding: "6px 12px",
|
|
16641
|
-
fontSize: "12px",
|
|
16642
|
-
borderRadius: "4px",
|
|
16643
|
-
maxWidth: "200%",
|
|
16644
|
-
whiteSpace: "wrap",
|
|
16645
|
-
fontWeight: 400,
|
|
16646
|
-
textTransform: "none",
|
|
16647
|
-
zIndex: 999
|
|
16648
|
-
}
|
|
16649
|
-
}
|
|
16650
|
-
),
|
|
16651
|
-
size4 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-[12px] font-semibold text-[#666666]", children: formatFileSize(size4) })
|
|
16652
|
-
] })
|
|
16653
|
-
]
|
|
16654
|
-
}
|
|
16655
|
-
);
|
|
16656
|
-
};
|
|
16657
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
16658
|
-
"div",
|
|
16659
|
-
{
|
|
16660
|
-
className: "flex relative items-center justify-between group rounded-md w-fit",
|
|
16661
|
-
children: [
|
|
16662
|
-
renderFile(),
|
|
16663
|
-
handleRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16664
|
-
"div",
|
|
16665
|
-
{
|
|
16666
|
-
style: {
|
|
16667
|
-
position: "absolute",
|
|
16668
|
-
top: 0,
|
|
16669
|
-
right: 0,
|
|
16670
|
-
backgroundColor: "rgba(0,0,0,0.2)"
|
|
16671
|
-
},
|
|
16672
|
-
onClick: () => handleRemoveFile(index4),
|
|
16673
|
-
className: "cursor-pointer p-2 hidden group-hover:block",
|
|
16674
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DeleteIcon, {})
|
|
16675
|
-
}
|
|
16676
|
-
),
|
|
16677
|
-
!handleRemoveFile && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16678
|
-
"span",
|
|
16679
|
-
{
|
|
16680
|
-
style: {
|
|
16681
|
-
position: "absolute",
|
|
16682
|
-
top: 0,
|
|
16683
|
-
right: 0,
|
|
16684
|
-
backgroundColor: "rgba(0,0,0,0.2)",
|
|
16685
|
-
zIndex: 10
|
|
16686
|
-
},
|
|
16687
|
-
onClick: (e3) => handleFileDownload(e3, src, filename),
|
|
16688
|
-
className: "hidden group-hover:block cursor-pointer p-2 text-white ",
|
|
16689
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DownloadIcon, {})
|
|
16690
|
-
}
|
|
16691
|
-
)
|
|
16692
|
-
]
|
|
16693
|
-
},
|
|
16694
|
-
index4
|
|
16695
|
-
);
|
|
16696
|
-
};
|
|
16697
|
-
var downloadFile = async (url, filename, accessToken) => {
|
|
16698
|
-
try {
|
|
16699
|
-
const response = accessToken ? await fetch(url, {
|
|
16700
|
-
method: "GET",
|
|
16701
|
-
headers: {
|
|
16702
|
-
Authorization: `Bearer ${accessToken}`
|
|
16703
|
-
}
|
|
16704
|
-
}) : await fetch(url);
|
|
16705
|
-
if (response.ok) {
|
|
16706
|
-
const blob = await response.blob();
|
|
16707
|
-
const urlBlob = window.URL.createObjectURL(blob);
|
|
16708
|
-
const link = document.createElement("a");
|
|
16709
|
-
link.href = urlBlob;
|
|
16710
|
-
link.download = filename || "downloaded-file";
|
|
16711
|
-
document.body.appendChild(link);
|
|
16712
|
-
link.click();
|
|
16713
|
-
document.body.removeChild(link);
|
|
16714
|
-
window.URL.revokeObjectURL(urlBlob);
|
|
16715
|
-
} else {
|
|
16716
|
-
console.error("File download failed:", response.statusText);
|
|
16717
|
-
}
|
|
16718
|
-
} catch (error2) {
|
|
16719
|
-
console.error("File download failed:", error2);
|
|
16720
|
-
}
|
|
16721
|
-
};
|
|
16722
|
-
var RenderFiles = ({
|
|
16723
|
-
selectedFiles,
|
|
16724
|
-
setSelectedFiles,
|
|
16725
|
-
envFile,
|
|
16726
|
-
accessToken
|
|
16727
|
-
}) => {
|
|
16728
|
-
const handleRemoveFile = (index4) => {
|
|
16729
|
-
if (setSelectedFiles) {
|
|
16730
|
-
const files = selectedFiles.filter((_2, i3) => i3 !== index4);
|
|
16731
|
-
setSelectedFiles(files);
|
|
16732
|
-
}
|
|
16733
|
-
};
|
|
16734
|
-
const handleFileDownload = (e3, url, name2) => {
|
|
16735
|
-
e3.stopPropagation();
|
|
16736
|
-
downloadFile(url, name2);
|
|
16737
|
-
};
|
|
16738
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex flex-wrap w-full gap-2", children: selectedFiles.map((file, index4) => {
|
|
16739
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative group/file", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
16740
|
-
FileItem,
|
|
16741
|
-
{
|
|
16742
|
-
...file,
|
|
16743
|
-
src: file?.datas,
|
|
16744
|
-
filename: file?.display_name ?? file?.name ?? file?.filename,
|
|
16745
|
-
id: file?.id,
|
|
16746
|
-
index: index4,
|
|
16747
|
-
handleRemoveFile: setSelectedFiles && handleRemoveFile,
|
|
16748
|
-
handleFileDownload,
|
|
16749
|
-
envFile,
|
|
16750
|
-
accessToken
|
|
16751
|
-
}
|
|
16752
|
-
) }, file?.id ?? index4);
|
|
16753
|
-
}) });
|
|
16754
|
-
};
|
|
16755
|
-
|
|
16756
16194
|
// node_modules/react-toastify/dist/index.mjs
|
|
16757
|
-
var
|
|
16758
|
-
var
|
|
16759
|
-
var
|
|
16195
|
+
var import_react27 = require("react");
|
|
16196
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
16197
|
+
var import_react29 = require("react");
|
|
16198
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
16760
16199
|
var import_react31 = __toESM(require("react"), 1);
|
|
16761
|
-
var import_react32 = __toESM(require("react"), 1);
|
|
16762
16200
|
|
|
16763
16201
|
// node_modules/clsx/dist/clsx.mjs
|
|
16764
16202
|
function r3(e3) {
|
|
@@ -16776,12 +16214,12 @@ function clsx() {
|
|
|
16776
16214
|
}
|
|
16777
16215
|
|
|
16778
16216
|
// node_modules/react-toastify/dist/index.mjs
|
|
16779
|
-
var
|
|
16217
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
16218
|
+
var import_react33 = require("react");
|
|
16780
16219
|
var import_react34 = require("react");
|
|
16781
16220
|
var import_react35 = require("react");
|
|
16782
|
-
var import_react36 = require("react");
|
|
16221
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
16783
16222
|
var import_react37 = __toESM(require("react"), 1);
|
|
16784
|
-
var import_react38 = __toESM(require("react"), 1);
|
|
16785
16223
|
function Mt(t3) {
|
|
16786
16224
|
if (!t3 || typeof document == "undefined") return;
|
|
16787
16225
|
let o3 = document.head || document.getElementsByTagName("head")[0], e3 = document.createElement("style");
|
|
@@ -16793,7 +16231,7 @@ var L2 = (t3) => typeof t3 == "number" && !isNaN(t3);
|
|
|
16793
16231
|
var N2 = (t3) => typeof t3 == "string";
|
|
16794
16232
|
var P = (t3) => typeof t3 == "function";
|
|
16795
16233
|
var mt = (t3) => N2(t3) || L2(t3);
|
|
16796
|
-
var z3 = (t3) => (0,
|
|
16234
|
+
var z3 = (t3) => (0, import_react27.isValidElement)(t3) || N2(t3) || P(t3) || L2(t3);
|
|
16797
16235
|
function Z(t3, o3, e3 = 300) {
|
|
16798
16236
|
let { scrollHeight: r4, style: s4 } = t3;
|
|
16799
16237
|
requestAnimationFrame(() => {
|
|
@@ -16804,22 +16242,22 @@ function Z(t3, o3, e3 = 300) {
|
|
|
16804
16242
|
}
|
|
16805
16243
|
function $2({ enter: t3, exit: o3, appendPosition: e3 = false, collapse: r4 = true, collapseDuration: s4 = 300 }) {
|
|
16806
16244
|
return function({ children: a2, position: d, preventExitTransition: c2, done: T2, nodeRef: g, isIn: v, playToast: x2 }) {
|
|
16807
|
-
let C2 = e3 ? `${t3}--${d}` : t3, S2 = e3 ? `${o3}--${d}` : o3, E2 = (0,
|
|
16808
|
-
return (0,
|
|
16245
|
+
let C2 = e3 ? `${t3}--${d}` : t3, S2 = e3 ? `${o3}--${d}` : o3, E2 = (0, import_react28.useRef)(0);
|
|
16246
|
+
return (0, import_react28.useLayoutEffect)(() => {
|
|
16809
16247
|
let f = g.current, p = C2.split(" "), b2 = (n4) => {
|
|
16810
16248
|
n4.target === g.current && (x2(), f.removeEventListener("animationend", b2), f.removeEventListener("animationcancel", b2), E2.current === 0 && n4.type !== "animationcancel" && f.classList.remove(...p));
|
|
16811
16249
|
};
|
|
16812
16250
|
(() => {
|
|
16813
16251
|
f.classList.add(...p), f.addEventListener("animationend", b2), f.addEventListener("animationcancel", b2);
|
|
16814
16252
|
})();
|
|
16815
|
-
}, []), (0,
|
|
16253
|
+
}, []), (0, import_react28.useEffect)(() => {
|
|
16816
16254
|
let f = g.current, p = () => {
|
|
16817
16255
|
f.removeEventListener("animationend", p), r4 ? Z(f, T2, s4) : T2();
|
|
16818
16256
|
};
|
|
16819
16257
|
v || (c2 ? p() : (() => {
|
|
16820
16258
|
E2.current = 1, f.className += ` ${S2}`, f.addEventListener("animationend", p);
|
|
16821
16259
|
})());
|
|
16822
|
-
}, [v]),
|
|
16260
|
+
}, [v]), import_react28.default.createElement(import_react28.default.Fragment, null, a2);
|
|
16823
16261
|
};
|
|
16824
16262
|
}
|
|
16825
16263
|
var Xt = 1;
|
|
@@ -16939,7 +16377,7 @@ var po = $2(K("zoom"));
|
|
|
16939
16377
|
var uo = $2(K("flip"));
|
|
16940
16378
|
|
|
16941
16379
|
// src/widgets/common/select-files.tsx
|
|
16942
|
-
var
|
|
16380
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
16943
16381
|
var ButtonSelectFiles = ({
|
|
16944
16382
|
fileInputRef,
|
|
16945
16383
|
selectedFiles,
|
|
@@ -17043,8 +16481,8 @@ var ButtonSelectFiles = ({
|
|
|
17043
16481
|
await handleUpload(formData, serivce, xNode);
|
|
17044
16482
|
}
|
|
17045
16483
|
};
|
|
17046
|
-
return /* @__PURE__ */ (0,
|
|
17047
|
-
isPending ? /* @__PURE__ */ (0,
|
|
16484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
|
|
16485
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm text-gray-500", children: t3("\u0110ang t\u1EA3i l\xEAn...") }) }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
17048
16486
|
"button",
|
|
17049
16487
|
{
|
|
17050
16488
|
type: "button",
|
|
@@ -17052,12 +16490,12 @@ var ButtonSelectFiles = ({
|
|
|
17052
16490
|
className: `w-fit h-[24px] flex gap-2 items-center text-black rounded-full overflow-hidden transition-all ${isPending ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
17053
16491
|
onClick: () => fileInputRef.current.click(),
|
|
17054
16492
|
children: [
|
|
17055
|
-
/* @__PURE__ */ (0,
|
|
17056
|
-
isText && /* @__PURE__ */ (0,
|
|
16493
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(AttachIcon, {}),
|
|
16494
|
+
isText && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: t3("upload_file_placeholder") })
|
|
17057
16495
|
]
|
|
17058
16496
|
}
|
|
17059
16497
|
),
|
|
17060
|
-
/* @__PURE__ */ (0,
|
|
16498
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
17061
16499
|
"input",
|
|
17062
16500
|
{
|
|
17063
16501
|
type: "file",
|
|
@@ -17072,11 +16510,11 @@ var ButtonSelectFiles = ({
|
|
|
17072
16510
|
};
|
|
17073
16511
|
|
|
17074
16512
|
// src/widgets/common/video-player.tsx
|
|
17075
|
-
var
|
|
17076
|
-
var
|
|
16513
|
+
var import_react38 = require("react");
|
|
16514
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
17077
16515
|
var VideoPlayer = ({ src }) => {
|
|
17078
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
17079
|
-
const videoRef = (0,
|
|
16516
|
+
const [isPlaying, setIsPlaying] = (0, import_react38.useState)(false);
|
|
16517
|
+
const videoRef = (0, import_react38.useRef)(null);
|
|
17080
16518
|
const handlePlayPause = () => {
|
|
17081
16519
|
if (videoRef.current) {
|
|
17082
16520
|
if (isPlaying) {
|
|
@@ -17100,8 +16538,8 @@ var VideoPlayer = ({ src }) => {
|
|
|
17100
16538
|
}
|
|
17101
16539
|
}
|
|
17102
16540
|
};
|
|
17103
|
-
return /* @__PURE__ */ (0,
|
|
17104
|
-
/* @__PURE__ */ (0,
|
|
16541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "relative flex aspect-square h-[120px] w-[120px] items-center justify-center overflow-hidden rounded-lg max-sm:h-auto max-sm:w-full", children: [
|
|
16542
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
17105
16543
|
"video",
|
|
17106
16544
|
{
|
|
17107
16545
|
ref: videoRef,
|
|
@@ -17113,13 +16551,13 @@ var VideoPlayer = ({ src }) => {
|
|
|
17113
16551
|
children: "Your browser does not support the video tag."
|
|
17114
16552
|
}
|
|
17115
16553
|
),
|
|
17116
|
-
/* @__PURE__ */ (0,
|
|
17117
|
-
/* @__PURE__ */ (0,
|
|
16554
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16555
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "absolute left-[50%] top-[50%] flex h-8 w-8 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-[#FFFFFF33] p-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { type: "button", onClick: handleFullScreen, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PlayIcon, {}) }) })
|
|
17118
16556
|
] });
|
|
17119
16557
|
};
|
|
17120
16558
|
|
|
17121
16559
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
17122
|
-
var
|
|
16560
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
17123
16561
|
var AvatarField = (props) => {
|
|
17124
16562
|
const {
|
|
17125
16563
|
isForm = false,
|
|
@@ -17143,8 +16581,8 @@ var AvatarField = (props) => {
|
|
|
17143
16581
|
color: textColor,
|
|
17144
16582
|
fontSize: `${size4 / 2.5}px`
|
|
17145
16583
|
};
|
|
17146
|
-
return /* @__PURE__ */ (0,
|
|
17147
|
-
isForm && allowShowDetail && /* @__PURE__ */ (0,
|
|
16584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
16585
|
+
isForm && allowShowDetail && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
17148
16586
|
ModalDetail,
|
|
17149
16587
|
{
|
|
17150
16588
|
idToolTip: `avatar-widget-id-${id}`,
|
|
@@ -17155,7 +16593,7 @@ var AvatarField = (props) => {
|
|
|
17155
16593
|
place: "top-start"
|
|
17156
16594
|
}
|
|
17157
16595
|
),
|
|
17158
|
-
allowShowDetail && /* @__PURE__ */ (0,
|
|
16596
|
+
allowShowDetail && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
17159
16597
|
M,
|
|
17160
16598
|
{
|
|
17161
16599
|
id: `avatar-widget-id-${id}`,
|
|
@@ -17164,7 +16602,7 @@ var AvatarField = (props) => {
|
|
|
17164
16602
|
className: "z-20"
|
|
17165
16603
|
}
|
|
17166
16604
|
),
|
|
17167
|
-
avatarSrc ? /* @__PURE__ */ (0,
|
|
16605
|
+
avatarSrc ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
17168
16606
|
"img",
|
|
17169
16607
|
{
|
|
17170
16608
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -17172,7 +16610,7 @@ var AvatarField = (props) => {
|
|
|
17172
16610
|
className: "uppercase font-medium rounded-md flex items-center justify-center cursor-pointer size-[26px]",
|
|
17173
16611
|
alt: "Avatar"
|
|
17174
16612
|
}
|
|
17175
|
-
) : /* @__PURE__ */ (0,
|
|
16613
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
17176
16614
|
"div",
|
|
17177
16615
|
{
|
|
17178
16616
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -17185,7 +16623,7 @@ var AvatarField = (props) => {
|
|
|
17185
16623
|
};
|
|
17186
16624
|
|
|
17187
16625
|
// src/widgets/basic/binary-field/binary.tsx
|
|
17188
|
-
var
|
|
16626
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
17189
16627
|
var BinaryField = (props) => {
|
|
17190
16628
|
const {
|
|
17191
16629
|
name: name2,
|
|
@@ -17208,7 +16646,7 @@ var BinaryField = (props) => {
|
|
|
17208
16646
|
image
|
|
17209
16647
|
} = props;
|
|
17210
16648
|
const { t: t3 } = useI18n();
|
|
17211
|
-
return /* @__PURE__ */ (0,
|
|
16649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17212
16650
|
Controller,
|
|
17213
16651
|
{
|
|
17214
16652
|
name: name2 ?? "",
|
|
@@ -17218,13 +16656,13 @@ var BinaryField = (props) => {
|
|
|
17218
16656
|
},
|
|
17219
16657
|
render: ({ field }) => {
|
|
17220
16658
|
const renderImage = initialImage || selectedImage;
|
|
17221
|
-
return /* @__PURE__ */ (0,
|
|
16659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17222
16660
|
"div",
|
|
17223
16661
|
{
|
|
17224
16662
|
ref: binaryRef,
|
|
17225
16663
|
className: "flex w-fit items-center gap-4 rounded-lg shadow-md mb-11",
|
|
17226
|
-
children: renderImage ? /* @__PURE__ */ (0,
|
|
17227
|
-
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */ (0,
|
|
16664
|
+
children: renderImage ? /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "relative group", children: [
|
|
16665
|
+
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17228
16666
|
"img",
|
|
17229
16667
|
{
|
|
17230
16668
|
style: {
|
|
@@ -17235,7 +16673,7 @@ var BinaryField = (props) => {
|
|
|
17235
16673
|
alt: "Selected",
|
|
17236
16674
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
17237
16675
|
}
|
|
17238
|
-
) : renderImage ? /* @__PURE__ */ (0,
|
|
16676
|
+
) : renderImage ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17239
16677
|
"img",
|
|
17240
16678
|
{
|
|
17241
16679
|
style: {
|
|
@@ -17246,17 +16684,17 @@ var BinaryField = (props) => {
|
|
|
17246
16684
|
alt: "Selected",
|
|
17247
16685
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
17248
16686
|
}
|
|
17249
|
-
) : /* @__PURE__ */ (0,
|
|
17250
|
-
!isInsideTable && !readonly && /* @__PURE__ */ (0,
|
|
16687
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(PlaceHolderIcon, {}),
|
|
16688
|
+
!isInsideTable && !readonly && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17251
16689
|
"button",
|
|
17252
16690
|
{
|
|
17253
16691
|
type: "button",
|
|
17254
16692
|
onClick: () => handleRemoveImage(field.onChange),
|
|
17255
16693
|
className: "hidden group-hover:block absolute right-0 bottom-0 mr-1 mb-1 rounded-full bg-white p-1 transition-colors duration-300 hover:bg-red-600",
|
|
17256
|
-
children: /* @__PURE__ */ (0,
|
|
16694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(DeleteIcon, {})
|
|
17257
16695
|
}
|
|
17258
16696
|
)
|
|
17259
|
-
] }) : /* @__PURE__ */ (0,
|
|
16697
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
17260
16698
|
"label",
|
|
17261
16699
|
{
|
|
17262
16700
|
htmlFor: inputId,
|
|
@@ -17266,7 +16704,7 @@ var BinaryField = (props) => {
|
|
|
17266
16704
|
},
|
|
17267
16705
|
className: `relative p-2 flex h-32 w-32 cursor-pointer items-center justify-center rounded-lg border border-gray-300 hover:border-gray-500 bg-white transition-colors duration-300 ${readonly && "pointer-events-none"}`,
|
|
17268
16706
|
children: [
|
|
17269
|
-
/* @__PURE__ */ (0,
|
|
16707
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17270
16708
|
"input",
|
|
17271
16709
|
{
|
|
17272
16710
|
id: inputId,
|
|
@@ -17278,8 +16716,8 @@ var BinaryField = (props) => {
|
|
|
17278
16716
|
className: "hidden z-10 relative"
|
|
17279
16717
|
}
|
|
17280
16718
|
),
|
|
17281
|
-
/* @__PURE__ */ (0,
|
|
17282
|
-
/* @__PURE__ */ (0,
|
|
16719
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("img", { src: image, alt: "", className: "z-0 relative" }),
|
|
16720
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17283
16721
|
"div",
|
|
17284
16722
|
{
|
|
17285
16723
|
className: "absolute size-8 bg-white rounded-full flex justify-center items-center z-20",
|
|
@@ -17288,7 +16726,7 @@ var BinaryField = (props) => {
|
|
|
17288
16726
|
left: "-8px",
|
|
17289
16727
|
boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)"
|
|
17290
16728
|
},
|
|
17291
|
-
children: /* @__PURE__ */ (0,
|
|
16729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17292
16730
|
"svg",
|
|
17293
16731
|
{
|
|
17294
16732
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -17296,7 +16734,7 @@ var BinaryField = (props) => {
|
|
|
17296
16734
|
height: "14",
|
|
17297
16735
|
viewBox: "0 0 14 14",
|
|
17298
16736
|
fill: "none",
|
|
17299
|
-
children: /* @__PURE__ */ (0,
|
|
16737
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
17300
16738
|
"path",
|
|
17301
16739
|
{
|
|
17302
16740
|
"fill-rule": "evenodd",
|
|
@@ -17320,7 +16758,7 @@ var BinaryField = (props) => {
|
|
|
17320
16758
|
};
|
|
17321
16759
|
|
|
17322
16760
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
17323
|
-
var
|
|
16761
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
17324
16762
|
var typeStyles = {
|
|
17325
16763
|
primary: {
|
|
17326
16764
|
backgroundColor: "#3b82f6",
|
|
@@ -17395,11 +16833,11 @@ var ButtonBadgeField = (props) => {
|
|
|
17395
16833
|
return item && type === "selection" && Array.isArray(item) ? item[1] : item;
|
|
17396
16834
|
};
|
|
17397
16835
|
const label = getLabel(defaultValue ?? value);
|
|
17398
|
-
return label ? /* @__PURE__ */ (0,
|
|
16836
|
+
return label ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { style: { ...baseStyle, ...getType() }, children: label }) : null;
|
|
17399
16837
|
};
|
|
17400
16838
|
|
|
17401
16839
|
// src/widgets/basic/button-field/button.tsx
|
|
17402
|
-
var
|
|
16840
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
17403
16841
|
var ButtonField = (props) => {
|
|
17404
16842
|
const {
|
|
17405
16843
|
func,
|
|
@@ -17410,7 +16848,7 @@ var ButtonField = (props) => {
|
|
|
17410
16848
|
type = "submit"
|
|
17411
16849
|
} = props;
|
|
17412
16850
|
const { t: t3 } = useI18n();
|
|
17413
|
-
return /* @__PURE__ */ (0,
|
|
16851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, { children: !loading ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
17414
16852
|
"button",
|
|
17415
16853
|
{
|
|
17416
16854
|
type,
|
|
@@ -17419,7 +16857,7 @@ var ButtonField = (props) => {
|
|
|
17419
16857
|
onClick: func,
|
|
17420
16858
|
children: t3(content)
|
|
17421
16859
|
}
|
|
17422
|
-
) : /* @__PURE__ */ (0,
|
|
16860
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
17423
16861
|
"button",
|
|
17424
16862
|
{
|
|
17425
16863
|
type,
|
|
@@ -17428,15 +16866,15 @@ var ButtonField = (props) => {
|
|
|
17428
16866
|
children: [
|
|
17429
16867
|
t3("loading"),
|
|
17430
16868
|
" ",
|
|
17431
|
-
/* @__PURE__ */ (0,
|
|
16869
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(LoadingIcon, {})
|
|
17432
16870
|
]
|
|
17433
16871
|
}
|
|
17434
16872
|
) });
|
|
17435
16873
|
};
|
|
17436
16874
|
|
|
17437
16875
|
// src/widgets/basic/char-field/char.tsx
|
|
17438
|
-
var
|
|
17439
|
-
var
|
|
16876
|
+
var import_react39 = require("react");
|
|
16877
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
17440
16878
|
var WIDGET_AUTO_COMPUTE_DEPEND = "auto_compute_depend_field";
|
|
17441
16879
|
var CharField = (props) => {
|
|
17442
16880
|
const {
|
|
@@ -17464,9 +16902,9 @@ var CharField = (props) => {
|
|
|
17464
16902
|
} = props;
|
|
17465
16903
|
if (!isForm && !isEditTable) {
|
|
17466
16904
|
const propValue = value || defaultValue;
|
|
17467
|
-
return /* @__PURE__ */ (0,
|
|
16905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17468
16906
|
}
|
|
17469
|
-
return /* @__PURE__ */ (0,
|
|
16907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
17470
16908
|
Controller,
|
|
17471
16909
|
{
|
|
17472
16910
|
name: name2 ?? "",
|
|
@@ -17494,12 +16932,12 @@ var CharField = (props) => {
|
|
|
17494
16932
|
fieldState: { error: error2, isDirty }
|
|
17495
16933
|
}) => {
|
|
17496
16934
|
const { setError, clearErrors } = methods;
|
|
17497
|
-
(0,
|
|
16935
|
+
(0, import_react39.useEffect)(() => {
|
|
17498
16936
|
if (value2) {
|
|
17499
16937
|
clearErrors(name2);
|
|
17500
16938
|
}
|
|
17501
16939
|
}, [value2, clearErrors, name2]);
|
|
17502
|
-
(0,
|
|
16940
|
+
(0, import_react39.useEffect)(() => {
|
|
17503
16941
|
if (widget !== WIDGET_AUTO_COMPUTE_DEPEND) return;
|
|
17504
16942
|
const depValue = formValues?.[options2?.depend_field]?.[options2?.field_name];
|
|
17505
16943
|
const currentValue = methods?.getValues(name2);
|
|
@@ -17508,7 +16946,7 @@ var CharField = (props) => {
|
|
|
17508
16946
|
}
|
|
17509
16947
|
}, [widget, formValues]);
|
|
17510
16948
|
const realValue = typeof value2 === "string" || typeof value2 === "number" ? String(value2) : "";
|
|
17511
|
-
const displayValue = (0,
|
|
16949
|
+
const displayValue = (0, import_react39.useMemo)(() => {
|
|
17512
16950
|
if ((widget === "access_token" || widget === "refresh_token") && typeof realValue === "string" && !isDirty) {
|
|
17513
16951
|
return "*".repeat(realValue.length);
|
|
17514
16952
|
}
|
|
@@ -17520,8 +16958,8 @@ var CharField = (props) => {
|
|
|
17520
16958
|
}
|
|
17521
16959
|
return "";
|
|
17522
16960
|
}, [widget, formValues]);
|
|
17523
|
-
return /* @__PURE__ */ (0,
|
|
17524
|
-
/* @__PURE__ */ (0,
|
|
16961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
|
|
16962
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
17525
16963
|
"input",
|
|
17526
16964
|
{
|
|
17527
16965
|
value: displayValue ?? "",
|
|
@@ -17582,7 +17020,7 @@ var CharField = (props) => {
|
|
|
17582
17020
|
`
|
|
17583
17021
|
}
|
|
17584
17022
|
),
|
|
17585
|
-
isEditTable ? /* @__PURE__ */ (0,
|
|
17023
|
+
isEditTable ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_jsx_runtime75.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_jsx_runtime75.Fragment, { children: error2 && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message }) })
|
|
17586
17024
|
] });
|
|
17587
17025
|
}
|
|
17588
17026
|
}
|
|
@@ -17590,7 +17028,7 @@ var CharField = (props) => {
|
|
|
17590
17028
|
};
|
|
17591
17029
|
|
|
17592
17030
|
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
17593
|
-
var
|
|
17031
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
17594
17032
|
var CheckboxField = (props) => {
|
|
17595
17033
|
const {
|
|
17596
17034
|
name: name2,
|
|
@@ -17605,9 +17043,9 @@ var CheckboxField = (props) => {
|
|
|
17605
17043
|
} = props;
|
|
17606
17044
|
if (!isForm) {
|
|
17607
17045
|
if (name2 === "is_active" || name2 === "active") {
|
|
17608
|
-
return /* @__PURE__ */ (0,
|
|
17046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ActiveBadgeField, { type: value });
|
|
17609
17047
|
} else {
|
|
17610
|
-
return /* @__PURE__ */ (0,
|
|
17048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17611
17049
|
"input",
|
|
17612
17050
|
{
|
|
17613
17051
|
type: "checkbox",
|
|
@@ -17618,12 +17056,12 @@ var CheckboxField = (props) => {
|
|
|
17618
17056
|
);
|
|
17619
17057
|
}
|
|
17620
17058
|
}
|
|
17621
|
-
return /* @__PURE__ */ (0,
|
|
17059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17622
17060
|
Controller,
|
|
17623
17061
|
{
|
|
17624
17062
|
name: name2 ?? "",
|
|
17625
17063
|
control: methods?.control,
|
|
17626
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
17064
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17627
17065
|
"div",
|
|
17628
17066
|
{
|
|
17629
17067
|
className: "flex items-center gap-2",
|
|
@@ -17636,7 +17074,7 @@ var CheckboxField = (props) => {
|
|
|
17636
17074
|
onChange2(name2 ?? "", checked);
|
|
17637
17075
|
}
|
|
17638
17076
|
},
|
|
17639
|
-
children: /* @__PURE__ */ (0,
|
|
17077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
17640
17078
|
"input",
|
|
17641
17079
|
{
|
|
17642
17080
|
...field,
|
|
@@ -17663,24 +17101,24 @@ var CheckboxField = (props) => {
|
|
|
17663
17101
|
};
|
|
17664
17102
|
|
|
17665
17103
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
17666
|
-
var
|
|
17667
|
-
var
|
|
17104
|
+
var import_react40 = require("react");
|
|
17105
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
17668
17106
|
var ColorWrapper = (props) => {
|
|
17669
17107
|
const {
|
|
17670
17108
|
colors: colors2,
|
|
17671
17109
|
defaultColor,
|
|
17672
17110
|
savePickColor
|
|
17673
17111
|
} = props;
|
|
17674
|
-
const [selectedColor, setSelectedColor] = (0,
|
|
17675
|
-
const [showFullColors, setIsShowFullColor] = (0,
|
|
17676
|
-
const pickColorsRef = (0,
|
|
17677
|
-
(0,
|
|
17112
|
+
const [selectedColor, setSelectedColor] = (0, import_react40.useState)(colors2[defaultColor]);
|
|
17113
|
+
const [showFullColors, setIsShowFullColor] = (0, import_react40.useState)(false);
|
|
17114
|
+
const pickColorsRef = (0, import_react40.useRef)(null);
|
|
17115
|
+
(0, import_react40.useEffect)(() => {
|
|
17678
17116
|
setSelectedColor(colors2[defaultColor]);
|
|
17679
17117
|
}, [defaultColor]);
|
|
17680
17118
|
const handleShowFullColors = () => {
|
|
17681
17119
|
setIsShowFullColor(!showFullColors);
|
|
17682
17120
|
};
|
|
17683
|
-
(0,
|
|
17121
|
+
(0, import_react40.useEffect)(() => {
|
|
17684
17122
|
const handleClickOutside = (event) => {
|
|
17685
17123
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
17686
17124
|
setIsShowFullColor(false);
|
|
@@ -17691,8 +17129,8 @@ var ColorWrapper = (props) => {
|
|
|
17691
17129
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17692
17130
|
};
|
|
17693
17131
|
}, []);
|
|
17694
|
-
return /* @__PURE__ */ (0,
|
|
17695
|
-
/* @__PURE__ */ (0,
|
|
17132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { children: [
|
|
17133
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
17696
17134
|
"button",
|
|
17697
17135
|
{
|
|
17698
17136
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -17706,7 +17144,7 @@ var ColorWrapper = (props) => {
|
|
|
17706
17144
|
}
|
|
17707
17145
|
}
|
|
17708
17146
|
),
|
|
17709
|
-
/* @__PURE__ */ (0,
|
|
17147
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
17710
17148
|
M,
|
|
17711
17149
|
{
|
|
17712
17150
|
className: "",
|
|
@@ -17715,8 +17153,8 @@ var ColorWrapper = (props) => {
|
|
|
17715
17153
|
content: i18n_default.t(color?.name)
|
|
17716
17154
|
}
|
|
17717
17155
|
)
|
|
17718
|
-
] }, color?.id)) }) : /* @__PURE__ */ (0,
|
|
17719
|
-
/* @__PURE__ */ (0,
|
|
17156
|
+
] }, color?.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
17157
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
17720
17158
|
"button",
|
|
17721
17159
|
{
|
|
17722
17160
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -17729,7 +17167,7 @@ var ColorWrapper = (props) => {
|
|
|
17729
17167
|
style: { backgroundColor: selectedColor?.color }
|
|
17730
17168
|
}
|
|
17731
17169
|
),
|
|
17732
|
-
/* @__PURE__ */ (0,
|
|
17170
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
17733
17171
|
M,
|
|
17734
17172
|
{
|
|
17735
17173
|
place: "top",
|
|
@@ -17741,13 +17179,13 @@ var ColorWrapper = (props) => {
|
|
|
17741
17179
|
};
|
|
17742
17180
|
|
|
17743
17181
|
// src/widgets/basic/color-field/color.tsx
|
|
17744
|
-
var
|
|
17182
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
17745
17183
|
var ColorField = (props) => {
|
|
17746
17184
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
17747
17185
|
if (!isForm) {
|
|
17748
|
-
return /* @__PURE__ */ (0,
|
|
17186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
17749
17187
|
}
|
|
17750
|
-
return /* @__PURE__ */ (0,
|
|
17188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
17751
17189
|
Controller,
|
|
17752
17190
|
{
|
|
17753
17191
|
name: name2 ?? "",
|
|
@@ -17757,7 +17195,7 @@ var ColorField = (props) => {
|
|
|
17757
17195
|
field.onChange(color?.id);
|
|
17758
17196
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17759
17197
|
};
|
|
17760
|
-
return /* @__PURE__ */ (0,
|
|
17198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
17761
17199
|
ColorWrapper,
|
|
17762
17200
|
{
|
|
17763
17201
|
savePickColor: handlePickColorChange,
|
|
@@ -17771,8 +17209,8 @@ var ColorField = (props) => {
|
|
|
17771
17209
|
};
|
|
17772
17210
|
|
|
17773
17211
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17774
|
-
var
|
|
17775
|
-
var
|
|
17212
|
+
var import_react41 = require("react");
|
|
17213
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
17776
17214
|
var CopyLinkButtonField = (props) => {
|
|
17777
17215
|
const {
|
|
17778
17216
|
isForm,
|
|
@@ -17791,9 +17229,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17791
17229
|
} = props;
|
|
17792
17230
|
const { t: t3 } = useI18n();
|
|
17793
17231
|
if (!isForm) {
|
|
17794
|
-
return /* @__PURE__ */ (0,
|
|
17232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17795
17233
|
}
|
|
17796
|
-
return /* @__PURE__ */ (0,
|
|
17234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17797
17235
|
Controller,
|
|
17798
17236
|
{
|
|
17799
17237
|
name: name2 ?? "",
|
|
@@ -17806,13 +17244,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
17806
17244
|
fieldState: { error: error2 }
|
|
17807
17245
|
}) => {
|
|
17808
17246
|
const { setError, clearErrors } = methods;
|
|
17809
|
-
(0,
|
|
17247
|
+
(0, import_react41.useEffect)(() => {
|
|
17810
17248
|
if (value) {
|
|
17811
17249
|
clearErrors(name2);
|
|
17812
17250
|
}
|
|
17813
17251
|
}, [value]);
|
|
17814
|
-
return /* @__PURE__ */ (0,
|
|
17815
|
-
/* @__PURE__ */ (0,
|
|
17252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "relative", children: [
|
|
17253
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
17816
17254
|
"div",
|
|
17817
17255
|
{
|
|
17818
17256
|
"aria-disabled": readonly,
|
|
@@ -17821,7 +17259,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17821
17259
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17822
17260
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17823
17261
|
children: [
|
|
17824
|
-
/* @__PURE__ */ (0,
|
|
17262
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17825
17263
|
"input",
|
|
17826
17264
|
{
|
|
17827
17265
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17862,19 +17300,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17862
17300
|
`
|
|
17863
17301
|
}
|
|
17864
17302
|
),
|
|
17865
|
-
readonly && value && /* @__PURE__ */ (0,
|
|
17303
|
+
readonly && value && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
17866
17304
|
"button",
|
|
17867
17305
|
{
|
|
17868
17306
|
className: "cursor-pointer",
|
|
17869
17307
|
type: "button",
|
|
17870
17308
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17871
|
-
children: isCopied ? /* @__PURE__ */ (0,
|
|
17309
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CopyIcon, {})
|
|
17872
17310
|
}
|
|
17873
17311
|
)
|
|
17874
17312
|
]
|
|
17875
17313
|
}
|
|
17876
17314
|
),
|
|
17877
|
-
error2 && /* @__PURE__ */ (0,
|
|
17315
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17878
17316
|
] });
|
|
17879
17317
|
}
|
|
17880
17318
|
}
|
|
@@ -17882,10 +17320,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
17882
17320
|
};
|
|
17883
17321
|
|
|
17884
17322
|
// src/widgets/basic/date-field/date.tsx
|
|
17885
|
-
var
|
|
17323
|
+
var import_react54 = require("react");
|
|
17886
17324
|
|
|
17887
17325
|
// node_modules/react-datepicker/dist/index.es.js
|
|
17888
|
-
var
|
|
17326
|
+
var import_react44 = __toESM(require("react"));
|
|
17889
17327
|
|
|
17890
17328
|
// node_modules/date-fns/constants.js
|
|
17891
17329
|
var daysInYear = 365.2425;
|
|
@@ -21787,11 +21225,11 @@ var React8 = __toESM(require("react"), 1);
|
|
|
21787
21225
|
|
|
21788
21226
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
21789
21227
|
var React6 = __toESM(require("react"), 1);
|
|
21790
|
-
var
|
|
21228
|
+
var import_react42 = require("react");
|
|
21791
21229
|
var isClient = typeof document !== "undefined";
|
|
21792
21230
|
var noop2 = function noop3() {
|
|
21793
21231
|
};
|
|
21794
|
-
var index = isClient ?
|
|
21232
|
+
var index = isClient ? import_react42.useLayoutEffect : noop2;
|
|
21795
21233
|
var SafeReact = {
|
|
21796
21234
|
...React6
|
|
21797
21235
|
};
|
|
@@ -21815,17 +21253,17 @@ function useEffectEvent(callback) {
|
|
|
21815
21253
|
}
|
|
21816
21254
|
|
|
21817
21255
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21818
|
-
var
|
|
21256
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
21819
21257
|
var ReactDOM2 = __toESM(require("react-dom"), 1);
|
|
21820
21258
|
|
|
21821
21259
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
21822
21260
|
var React7 = __toESM(require("react"), 1);
|
|
21823
|
-
var
|
|
21261
|
+
var import_react43 = require("react");
|
|
21824
21262
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
21825
21263
|
var isClient2 = typeof document !== "undefined";
|
|
21826
21264
|
var noop4 = function noop5() {
|
|
21827
21265
|
};
|
|
21828
|
-
var index2 = isClient2 ?
|
|
21266
|
+
var index2 = isClient2 ? import_react43.useLayoutEffect : noop4;
|
|
21829
21267
|
function deepEqual2(a2, b2) {
|
|
21830
21268
|
if (a2 === b2) {
|
|
21831
21269
|
return true;
|
|
@@ -22213,7 +21651,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
22213
21651
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
22214
21652
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
22215
21653
|
}[side];
|
|
22216
|
-
return /* @__PURE__ */ (0,
|
|
21654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("svg", {
|
|
22217
21655
|
...rest,
|
|
22218
21656
|
"aria-hidden": true,
|
|
22219
21657
|
ref,
|
|
@@ -22229,18 +21667,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
22229
21667
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
22230
21668
|
...restStyle
|
|
22231
21669
|
},
|
|
22232
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0,
|
|
21670
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", {
|
|
22233
21671
|
clipPath: "url(#" + clipPathId + ")",
|
|
22234
21672
|
fill: "none",
|
|
22235
21673
|
stroke,
|
|
22236
21674
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
22237
21675
|
d: dValue
|
|
22238
|
-
}), /* @__PURE__ */ (0,
|
|
21676
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", {
|
|
22239
21677
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
22240
21678
|
d: dValue
|
|
22241
|
-
}), /* @__PURE__ */ (0,
|
|
21679
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("clipPath", {
|
|
22242
21680
|
id: clipPathId,
|
|
22243
|
-
children: /* @__PURE__ */ (0,
|
|
21681
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("rect", {
|
|
22244
21682
|
x: -halfStrokeWidth,
|
|
22245
21683
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
22246
21684
|
width: width + computedStrokeWidth,
|
|
@@ -22452,13 +21890,13 @@ function __spreadArray(to2, from2, pack) {
|
|
|
22452
21890
|
var CalendarContainer = function(_a2) {
|
|
22453
21891
|
var _b = _a2.showTimeSelectOnly, showTimeSelectOnly = _b === void 0 ? false : _b, _c = _a2.showTime, showTime = _c === void 0 ? false : _c, className = _a2.className, children = _a2.children;
|
|
22454
21892
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
22455
|
-
return
|
|
21893
|
+
return import_react44.default.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
22456
21894
|
};
|
|
22457
21895
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
22458
|
-
var ref = (0,
|
|
22459
|
-
var onClickOutsideRef = (0,
|
|
21896
|
+
var ref = (0, import_react44.useRef)(null);
|
|
21897
|
+
var onClickOutsideRef = (0, import_react44.useRef)(onClickOutside);
|
|
22460
21898
|
onClickOutsideRef.current = onClickOutside;
|
|
22461
|
-
var handleClickOutside = (0,
|
|
21899
|
+
var handleClickOutside = (0, import_react44.useCallback)(function(event) {
|
|
22462
21900
|
var _a2;
|
|
22463
21901
|
var target = event.composed && event.composedPath && event.composedPath().find(function(eventTarget) {
|
|
22464
21902
|
return eventTarget instanceof Node;
|
|
@@ -22469,7 +21907,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22469
21907
|
}
|
|
22470
21908
|
}
|
|
22471
21909
|
}, [ignoreClass]);
|
|
22472
|
-
(0,
|
|
21910
|
+
(0, import_react44.useEffect)(function() {
|
|
22473
21911
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22474
21912
|
return function() {
|
|
22475
21913
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -22480,7 +21918,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
22480
21918
|
var ClickOutsideWrapper = function(_a2) {
|
|
22481
21919
|
var children = _a2.children, onClickOutside = _a2.onClickOutside, className = _a2.className, containerRef = _a2.containerRef, style = _a2.style, ignoreClass = _a2.ignoreClass;
|
|
22482
21920
|
var detectRef = useDetectClickOutside(onClickOutside, ignoreClass);
|
|
22483
|
-
return
|
|
21921
|
+
return import_react44.default.createElement("div", { className, style, ref: function(node2) {
|
|
22484
21922
|
detectRef.current = node2;
|
|
22485
21923
|
if (containerRef) {
|
|
22486
21924
|
containerRef.current = node2;
|
|
@@ -23076,7 +22514,7 @@ var InputTime = (
|
|
|
23076
22514
|
__extends(InputTime2, _super);
|
|
23077
22515
|
function InputTime2(props) {
|
|
23078
22516
|
var _this = _super.call(this, props) || this;
|
|
23079
|
-
_this.inputRef =
|
|
22517
|
+
_this.inputRef = import_react44.default.createRef();
|
|
23080
22518
|
_this.onTimeChange = function(time) {
|
|
23081
22519
|
var _a2, _b;
|
|
23082
22520
|
_this.setState({ time });
|
|
@@ -23094,13 +22532,13 @@ var InputTime = (
|
|
|
23094
22532
|
var time = _this.state.time;
|
|
23095
22533
|
var _a2 = _this.props, date = _a2.date, timeString = _a2.timeString, customTimeInput = _a2.customTimeInput;
|
|
23096
22534
|
if (customTimeInput) {
|
|
23097
|
-
return (0,
|
|
22535
|
+
return (0, import_react44.cloneElement)(customTimeInput, {
|
|
23098
22536
|
date,
|
|
23099
22537
|
value: time,
|
|
23100
22538
|
onChange: _this.onTimeChange
|
|
23101
22539
|
});
|
|
23102
22540
|
}
|
|
23103
|
-
return
|
|
22541
|
+
return import_react44.default.createElement("input", { type: "time", className: "react-datepicker-time__input", placeholder: "Time", name: "time-input", ref: _this.inputRef, onClick: function() {
|
|
23104
22542
|
var _a3;
|
|
23105
22543
|
(_a3 = _this.inputRef.current) === null || _a3 === void 0 ? void 0 : _a3.focus();
|
|
23106
22544
|
}, required: true, value: time, onChange: function(event) {
|
|
@@ -23121,19 +22559,19 @@ var InputTime = (
|
|
|
23121
22559
|
return null;
|
|
23122
22560
|
};
|
|
23123
22561
|
InputTime2.prototype.render = function() {
|
|
23124
|
-
return
|
|
22562
|
+
return import_react44.default.createElement(
|
|
23125
22563
|
"div",
|
|
23126
22564
|
{ className: "react-datepicker__input-time-container" },
|
|
23127
|
-
|
|
23128
|
-
|
|
22565
|
+
import_react44.default.createElement("div", { className: "react-datepicker-time__caption" }, this.props.timeInputLabel),
|
|
22566
|
+
import_react44.default.createElement(
|
|
23129
22567
|
"div",
|
|
23130
22568
|
{ className: "react-datepicker-time__input-container" },
|
|
23131
|
-
|
|
22569
|
+
import_react44.default.createElement("div", { className: "react-datepicker-time__input" }, this.renderTimeInput())
|
|
23132
22570
|
)
|
|
23133
22571
|
);
|
|
23134
22572
|
};
|
|
23135
22573
|
return InputTime2;
|
|
23136
|
-
}(
|
|
22574
|
+
}(import_react44.Component)
|
|
23137
22575
|
);
|
|
23138
22576
|
var Day = (
|
|
23139
22577
|
/** @class */
|
|
@@ -23141,7 +22579,7 @@ var Day = (
|
|
|
23141
22579
|
__extends(Day2, _super);
|
|
23142
22580
|
function Day2() {
|
|
23143
22581
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23144
|
-
_this.dayEl = (0,
|
|
22582
|
+
_this.dayEl = (0, import_react44.createRef)();
|
|
23145
22583
|
_this.handleClick = function(event) {
|
|
23146
22584
|
if (!_this.isDisabled() && _this.props.onClick) {
|
|
23147
22585
|
_this.props.onClick(event);
|
|
@@ -23376,11 +22814,11 @@ var Day = (
|
|
|
23376
22814
|
_this.render = function() {
|
|
23377
22815
|
return (
|
|
23378
22816
|
// TODO: Use <option> instead of the "option" role to ensure accessibility across all devices.
|
|
23379
|
-
|
|
22817
|
+
import_react44.default.createElement(
|
|
23380
22818
|
"div",
|
|
23381
22819
|
{ ref: _this.dayEl, className: _this.getClassNames(_this.props.day), onKeyDown: _this.handleOnKeyDown, onClick: _this.handleClick, onMouseEnter: !_this.props.usePointerEvent ? _this.handleMouseEnter : void 0, onPointerEnter: _this.props.usePointerEvent ? _this.handleMouseEnter : void 0, tabIndex: _this.getTabIndex(), "aria-label": _this.getAriaLabel(), role: "option", title: _this.getTitle(), "aria-disabled": _this.isDisabled(), "aria-current": _this.isCurrentDay() ? "date" : void 0, "aria-selected": _this.isSelected() || _this.isInRange() },
|
|
23382
22820
|
_this.renderDayContents(),
|
|
23383
|
-
_this.getTitle() !== "" &&
|
|
22821
|
+
_this.getTitle() !== "" && import_react44.default.createElement("span", { className: "overlay" }, _this.getTitle())
|
|
23384
22822
|
)
|
|
23385
22823
|
);
|
|
23386
22824
|
};
|
|
@@ -23421,7 +22859,7 @@ var Day = (
|
|
|
23421
22859
|
);
|
|
23422
22860
|
};
|
|
23423
22861
|
return Day2;
|
|
23424
|
-
}(
|
|
22862
|
+
}(import_react44.Component)
|
|
23425
22863
|
);
|
|
23426
22864
|
var WeekNumber = (
|
|
23427
22865
|
/** @class */
|
|
@@ -23429,7 +22867,7 @@ var WeekNumber = (
|
|
|
23429
22867
|
__extends(WeekNumber2, _super);
|
|
23430
22868
|
function WeekNumber2() {
|
|
23431
22869
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23432
|
-
_this.weekNumberEl = (0,
|
|
22870
|
+
_this.weekNumberEl = (0, import_react44.createRef)();
|
|
23433
22871
|
_this.handleClick = function(event) {
|
|
23434
22872
|
if (_this.props.onClick) {
|
|
23435
22873
|
_this.props.onClick(event);
|
|
@@ -23489,10 +22927,10 @@ var WeekNumber = (
|
|
|
23489
22927
|
"react-datepicker__week-number--clickable": !!onClick && !isWeekDisabled,
|
|
23490
22928
|
"react-datepicker__week-number--selected": !!onClick && isSameDay2(this.props.date, this.props.selected)
|
|
23491
22929
|
};
|
|
23492
|
-
return
|
|
22930
|
+
return import_react44.default.createElement("div", { ref: this.weekNumberEl, className: clsx(weekNumberClasses), "aria-label": "".concat(ariaLabelPrefix, " ").concat(this.props.weekNumber), onClick: this.handleClick, onKeyDown: this.handleOnKeyDown, tabIndex: this.getTabIndex() }, weekNumber);
|
|
23493
22931
|
};
|
|
23494
22932
|
return WeekNumber2;
|
|
23495
|
-
}(
|
|
22933
|
+
}(import_react44.Component)
|
|
23496
22934
|
);
|
|
23497
22935
|
var Week = (
|
|
23498
22936
|
/** @class */
|
|
@@ -23566,11 +23004,11 @@ var Week = (
|
|
|
23566
23004
|
var weekNumber = _this.formatWeekNumber(startOfWeek2);
|
|
23567
23005
|
if (_this.props.showWeekNumber) {
|
|
23568
23006
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek2, weekNumber) : void 0;
|
|
23569
|
-
days.push(
|
|
23007
|
+
days.push(import_react44.default.createElement(WeekNumber, _assign({ key: "W" }, Week2.defaultProps, _this.props, { weekNumber, isWeekDisabled: _this.isWeekDisabled(), date: startOfWeek2, onClick: onClickAction })));
|
|
23570
23008
|
}
|
|
23571
23009
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
23572
23010
|
var day = addDays(startOfWeek2, offset4);
|
|
23573
|
-
return
|
|
23011
|
+
return import_react44.default.createElement(Day, _assign({}, Week2.defaultProps, _this.props, { ariaLabelPrefixWhenEnabled: _this.props.chooseDayAriaLabelPrefix, ariaLabelPrefixWhenDisabled: _this.props.disabledDayAriaLabelPrefix, key: day.valueOf(), day, onClick: _this.handleDayClick.bind(_this, day), onMouseEnter: _this.handleDayMouseEnter.bind(_this, day) }));
|
|
23574
23012
|
}));
|
|
23575
23013
|
};
|
|
23576
23014
|
_this.startOfWeek = function() {
|
|
@@ -23596,10 +23034,10 @@ var Week = (
|
|
|
23596
23034
|
"react-datepicker__week--selected": isSameDay2(this.startOfWeek(), this.props.selected),
|
|
23597
23035
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
23598
23036
|
};
|
|
23599
|
-
return
|
|
23037
|
+
return import_react44.default.createElement("div", { className: clsx(weekNumberClasses) }, this.renderDays());
|
|
23600
23038
|
};
|
|
23601
23039
|
return Week2;
|
|
23602
|
-
}(
|
|
23040
|
+
}(import_react44.Component)
|
|
23603
23041
|
);
|
|
23604
23042
|
var _a;
|
|
23605
23043
|
var FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6;
|
|
@@ -23651,10 +23089,10 @@ var Month = (
|
|
|
23651
23089
|
function Month2() {
|
|
23652
23090
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23653
23091
|
_this.MONTH_REFS = __spreadArray([], Array(12), true).map(function() {
|
|
23654
|
-
return (0,
|
|
23092
|
+
return (0, import_react44.createRef)();
|
|
23655
23093
|
});
|
|
23656
23094
|
_this.QUARTER_REFS = __spreadArray([], Array(4), true).map(function() {
|
|
23657
|
-
return (0,
|
|
23095
|
+
return (0, import_react44.createRef)();
|
|
23658
23096
|
});
|
|
23659
23097
|
_this.isDisabled = function(day) {
|
|
23660
23098
|
return isDayDisabled(day, {
|
|
@@ -23824,7 +23262,7 @@ var Month = (
|
|
|
23824
23262
|
var selected = _this.props.selected ? isSelected(_this.props.selected) : void 0;
|
|
23825
23263
|
var preSelection = _this.props.preSelection ? isPreSelected(_this.props.preSelection) : void 0;
|
|
23826
23264
|
while (true) {
|
|
23827
|
-
weeks.push(
|
|
23265
|
+
weeks.push(import_react44.default.createElement(Week, _assign({}, _this.props, { ariaLabelPrefix: _this.props.weekAriaLabelPrefix, key: i3, day: currentWeekStart, month: getMonth(_this.props.day), onDayClick: _this.handleDayClick, onDayMouseEnter: _this.handleDayMouseEnter, selected, preSelection, showWeekNumber: _this.props.showWeekNumbers })));
|
|
23828
23266
|
if (breakAfterNextPush)
|
|
23829
23267
|
break;
|
|
23830
23268
|
i3++;
|
|
@@ -24093,8 +23531,8 @@ var Month = (
|
|
|
24093
23531
|
var _b = _this.props, showTwoColumnMonthYearPicker = _b.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker = _b.showFourColumnMonthYearPicker, day = _b.day, selected = _b.selected;
|
|
24094
23532
|
var monthColumns = (_a2 = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)]) === null || _a2 === void 0 ? void 0 : _a2.grid;
|
|
24095
23533
|
return monthColumns === null || monthColumns === void 0 ? void 0 : monthColumns.map(function(month, i3) {
|
|
24096
|
-
return
|
|
24097
|
-
return
|
|
23534
|
+
return import_react44.default.createElement("div", { className: "react-datepicker__month-wrapper", key: i3 }, month.map(function(m, j) {
|
|
23535
|
+
return import_react44.default.createElement("div", { ref: _this.MONTH_REFS[m], key: j, onClick: function(event) {
|
|
24098
23536
|
_this.onMonthClick(event, m);
|
|
24099
23537
|
}, onKeyDown: function(event) {
|
|
24100
23538
|
if (isSpaceKeyDown(event)) {
|
|
@@ -24113,8 +23551,8 @@ var Month = (
|
|
|
24113
23551
|
_this.renderQuarters = function() {
|
|
24114
23552
|
var _a2 = _this.props, day = _a2.day, selected = _a2.selected;
|
|
24115
23553
|
var quarters = [1, 2, 3, 4];
|
|
24116
|
-
return
|
|
24117
|
-
return
|
|
23554
|
+
return import_react44.default.createElement("div", { className: "react-datepicker__quarter-wrapper" }, quarters.map(function(q3, j) {
|
|
23555
|
+
return import_react44.default.createElement("div", { key: j, ref: _this.QUARTER_REFS[j], role: "option", onClick: function(event) {
|
|
24118
23556
|
_this.onQuarterClick(event, q3);
|
|
24119
23557
|
}, onKeyDown: function(event) {
|
|
24120
23558
|
_this.onQuarterKeyDown(event, q3);
|
|
@@ -24146,10 +23584,10 @@ var Month = (
|
|
|
24146
23584
|
Month2.prototype.render = function() {
|
|
24147
23585
|
var _a2 = this.props, showMonthYearPicker = _a2.showMonthYearPicker, showQuarterYearPicker = _a2.showQuarterYearPicker, day = _a2.day, _b = _a2.ariaLabelPrefix, ariaLabelPrefix = _b === void 0 ? "Month " : _b;
|
|
24148
23586
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
24149
|
-
return
|
|
23587
|
+
return import_react44.default.createElement("div", { className: this.getClassNames(), onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : void 0, onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : void 0, "aria-label": "".concat(formattedAriaLabelPrefix).concat(formatDate(day, "MMMM, yyyy", this.props.locale)), role: "listbox" }, showMonthYearPicker ? this.renderMonths() : showQuarterYearPicker ? this.renderQuarters() : this.renderWeeks());
|
|
24150
23588
|
};
|
|
24151
23589
|
return Month2;
|
|
24152
|
-
}(
|
|
23590
|
+
}(import_react44.Component)
|
|
24153
23591
|
);
|
|
24154
23592
|
var MonthDropdownOptions = (
|
|
24155
23593
|
/** @class */
|
|
@@ -24162,10 +23600,10 @@ var MonthDropdownOptions = (
|
|
|
24162
23600
|
};
|
|
24163
23601
|
_this.renderOptions = function() {
|
|
24164
23602
|
return _this.props.monthNames.map(function(month, i3) {
|
|
24165
|
-
return
|
|
23603
|
+
return import_react44.default.createElement(
|
|
24166
23604
|
"div",
|
|
24167
23605
|
{ className: _this.isSelectedMonth(i3) ? "react-datepicker__month-option react-datepicker__month-option--selected_month" : "react-datepicker__month-option", key: month, onClick: _this.onChange.bind(_this, i3), "aria-selected": _this.isSelectedMonth(i3) ? "true" : void 0 },
|
|
24168
|
-
_this.isSelectedMonth(i3) ?
|
|
23606
|
+
_this.isSelectedMonth(i3) ? import_react44.default.createElement("span", { className: "react-datepicker__month-option--selected" }, "\u2713") : "",
|
|
24169
23607
|
month
|
|
24170
23608
|
);
|
|
24171
23609
|
});
|
|
@@ -24179,10 +23617,10 @@ var MonthDropdownOptions = (
|
|
|
24179
23617
|
return _this;
|
|
24180
23618
|
}
|
|
24181
23619
|
MonthDropdownOptions2.prototype.render = function() {
|
|
24182
|
-
return
|
|
23620
|
+
return import_react44.default.createElement(ClickOutsideWrapper, { className: "react-datepicker__month-dropdown", onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24183
23621
|
};
|
|
24184
23622
|
return MonthDropdownOptions2;
|
|
24185
|
-
}(
|
|
23623
|
+
}(import_react44.Component)
|
|
24186
23624
|
);
|
|
24187
23625
|
var MonthDropdown = (
|
|
24188
23626
|
/** @class */
|
|
@@ -24195,24 +23633,24 @@ var MonthDropdown = (
|
|
|
24195
23633
|
};
|
|
24196
23634
|
_this.renderSelectOptions = function(monthNames) {
|
|
24197
23635
|
return monthNames.map(function(m, i3) {
|
|
24198
|
-
return
|
|
23636
|
+
return import_react44.default.createElement("option", { key: m, value: i3 }, m);
|
|
24199
23637
|
});
|
|
24200
23638
|
};
|
|
24201
23639
|
_this.renderSelectMode = function(monthNames) {
|
|
24202
|
-
return
|
|
23640
|
+
return import_react44.default.createElement("select", { value: _this.props.month, className: "react-datepicker__month-select", onChange: function(e3) {
|
|
24203
23641
|
return _this.onChange(parseInt(e3.target.value));
|
|
24204
23642
|
} }, _this.renderSelectOptions(monthNames));
|
|
24205
23643
|
};
|
|
24206
23644
|
_this.renderReadView = function(visible, monthNames) {
|
|
24207
|
-
return
|
|
23645
|
+
return import_react44.default.createElement(
|
|
24208
23646
|
"div",
|
|
24209
23647
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-read-view", onClick: _this.toggleDropdown },
|
|
24210
|
-
|
|
24211
|
-
|
|
23648
|
+
import_react44.default.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
|
|
23649
|
+
import_react44.default.createElement("span", { className: "react-datepicker__month-read-view--selected-month" }, monthNames[_this.props.month])
|
|
24212
23650
|
);
|
|
24213
23651
|
};
|
|
24214
23652
|
_this.renderDropdown = function(monthNames) {
|
|
24215
|
-
return
|
|
23653
|
+
return import_react44.default.createElement(MonthDropdownOptions, _assign({ key: "dropdown" }, _this.props, { monthNames, onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24216
23654
|
};
|
|
24217
23655
|
_this.renderScrollMode = function(monthNames) {
|
|
24218
23656
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24251,10 +23689,10 @@ var MonthDropdown = (
|
|
|
24251
23689
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
24252
23690
|
break;
|
|
24253
23691
|
}
|
|
24254
|
-
return
|
|
23692
|
+
return import_react44.default.createElement("div", { className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24255
23693
|
};
|
|
24256
23694
|
return MonthDropdown2;
|
|
24257
|
-
}(
|
|
23695
|
+
}(import_react44.Component)
|
|
24258
23696
|
);
|
|
24259
23697
|
function generateMonthYears(minDate, maxDate) {
|
|
24260
23698
|
var list = [];
|
|
@@ -24276,10 +23714,10 @@ var MonthYearDropdownOptions = (
|
|
|
24276
23714
|
return _this.state.monthYearsList.map(function(monthYear) {
|
|
24277
23715
|
var monthYearPoint = getTime(monthYear);
|
|
24278
23716
|
var isSameMonthYear = isSameYear2(_this.props.date, monthYear) && isSameMonth2(_this.props.date, monthYear);
|
|
24279
|
-
return
|
|
23717
|
+
return import_react44.default.createElement(
|
|
24280
23718
|
"div",
|
|
24281
23719
|
{ className: isSameMonthYear ? "react-datepicker__month-year-option--selected_month-year" : "react-datepicker__month-year-option", key: monthYearPoint, onClick: _this.onChange.bind(_this, monthYearPoint), "aria-selected": isSameMonthYear ? "true" : void 0 },
|
|
24282
|
-
isSameMonthYear ?
|
|
23720
|
+
isSameMonthYear ? import_react44.default.createElement("span", { className: "react-datepicker__month-year-option--selected" }, "\u2713") : "",
|
|
24283
23721
|
formatDate(monthYear, _this.props.dateFormat, _this.props.locale)
|
|
24284
23722
|
);
|
|
24285
23723
|
});
|
|
@@ -24300,10 +23738,10 @@ var MonthYearDropdownOptions = (
|
|
|
24300
23738
|
"react-datepicker__month-year-dropdown": true,
|
|
24301
23739
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
24302
23740
|
});
|
|
24303
|
-
return
|
|
23741
|
+
return import_react44.default.createElement(ClickOutsideWrapper, { className: dropdownClass, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24304
23742
|
};
|
|
24305
23743
|
return MonthYearDropdownOptions2;
|
|
24306
|
-
}(
|
|
23744
|
+
}(import_react44.Component)
|
|
24307
23745
|
);
|
|
24308
23746
|
var MonthYearDropdown = (
|
|
24309
23747
|
/** @class */
|
|
@@ -24320,7 +23758,7 @@ var MonthYearDropdown = (
|
|
|
24320
23758
|
var options2 = [];
|
|
24321
23759
|
while (!isAfter(currDate, lastDate)) {
|
|
24322
23760
|
var timePoint = getTime(currDate);
|
|
24323
|
-
options2.push(
|
|
23761
|
+
options2.push(import_react44.default.createElement("option", { key: timePoint, value: timePoint }, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
24324
23762
|
currDate = addMonths(currDate, 1);
|
|
24325
23763
|
}
|
|
24326
23764
|
return options2;
|
|
@@ -24329,19 +23767,19 @@ var MonthYearDropdown = (
|
|
|
24329
23767
|
_this.onChange(parseInt(event.target.value));
|
|
24330
23768
|
};
|
|
24331
23769
|
_this.renderSelectMode = function() {
|
|
24332
|
-
return
|
|
23770
|
+
return import_react44.default.createElement("select", { value: getTime(getStartOfMonth(_this.props.date)), className: "react-datepicker__month-year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
24333
23771
|
};
|
|
24334
23772
|
_this.renderReadView = function(visible) {
|
|
24335
23773
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
24336
|
-
return
|
|
23774
|
+
return import_react44.default.createElement(
|
|
24337
23775
|
"div",
|
|
24338
23776
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__month-year-read-view", onClick: _this.toggleDropdown },
|
|
24339
|
-
|
|
24340
|
-
|
|
23777
|
+
import_react44.default.createElement("span", { className: "react-datepicker__month-year-read-view--down-arrow" }),
|
|
23778
|
+
import_react44.default.createElement("span", { className: "react-datepicker__month-year-read-view--selected-month-year" }, yearMonth)
|
|
24341
23779
|
);
|
|
24342
23780
|
};
|
|
24343
23781
|
_this.renderDropdown = function() {
|
|
24344
|
-
return
|
|
23782
|
+
return import_react44.default.createElement(MonthYearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24345
23783
|
};
|
|
24346
23784
|
_this.renderScrollMode = function() {
|
|
24347
23785
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -24376,10 +23814,10 @@ var MonthYearDropdown = (
|
|
|
24376
23814
|
renderedDropdown = this.renderSelectMode();
|
|
24377
23815
|
break;
|
|
24378
23816
|
}
|
|
24379
|
-
return
|
|
23817
|
+
return import_react44.default.createElement("div", { className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
24380
23818
|
};
|
|
24381
23819
|
return MonthYearDropdown2;
|
|
24382
|
-
}(
|
|
23820
|
+
}(import_react44.Component)
|
|
24383
23821
|
);
|
|
24384
23822
|
var Time = (
|
|
24385
23823
|
/** @class */
|
|
@@ -24474,7 +23912,7 @@ var Time = (
|
|
|
24474
23912
|
return prev2;
|
|
24475
23913
|
}, times[0]);
|
|
24476
23914
|
return times.map(function(time) {
|
|
24477
|
-
return
|
|
23915
|
+
return import_react44.default.createElement("li", { key: time.valueOf(), onClick: _this.handleClick.bind(_this, time), className: _this.liClasses(time), ref: function(li) {
|
|
24478
23916
|
if (time === timeToFocus) {
|
|
24479
23917
|
_this.centerLi = li;
|
|
24480
23918
|
}
|
|
@@ -24485,14 +23923,14 @@ var Time = (
|
|
|
24485
23923
|
};
|
|
24486
23924
|
_this.renderTimeCaption = function() {
|
|
24487
23925
|
if (_this.props.showTimeCaption === false) {
|
|
24488
|
-
return
|
|
23926
|
+
return import_react44.default.createElement(import_react44.default.Fragment, null);
|
|
24489
23927
|
}
|
|
24490
|
-
return
|
|
23928
|
+
return import_react44.default.createElement(
|
|
24491
23929
|
"div",
|
|
24492
23930
|
{ className: "react-datepicker__header react-datepicker__header--time ".concat(_this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""), ref: function(header) {
|
|
24493
23931
|
_this.header = header;
|
|
24494
23932
|
} },
|
|
24495
|
-
|
|
23933
|
+
import_react44.default.createElement("div", { className: "react-datepicker-time__header" }, _this.props.timeCaption)
|
|
24496
23934
|
);
|
|
24497
23935
|
};
|
|
24498
23936
|
return _this;
|
|
@@ -24539,17 +23977,17 @@ var Time = (
|
|
|
24539
23977
|
var _this = this;
|
|
24540
23978
|
var _a2;
|
|
24541
23979
|
var height = this.state.height;
|
|
24542
|
-
return
|
|
23980
|
+
return import_react44.default.createElement(
|
|
24543
23981
|
"div",
|
|
24544
23982
|
{ className: "react-datepicker__time-container ".concat(((_a2 = this.props.todayButton) !== null && _a2 !== void 0 ? _a2 : Time2.defaultProps.todayButton) ? "react-datepicker__time-container--with-today-button" : "") },
|
|
24545
23983
|
this.renderTimeCaption(),
|
|
24546
|
-
|
|
23984
|
+
import_react44.default.createElement(
|
|
24547
23985
|
"div",
|
|
24548
23986
|
{ className: "react-datepicker__time" },
|
|
24549
|
-
|
|
23987
|
+
import_react44.default.createElement(
|
|
24550
23988
|
"div",
|
|
24551
23989
|
{ className: "react-datepicker__time-box" },
|
|
24552
|
-
|
|
23990
|
+
import_react44.default.createElement("ul", { className: "react-datepicker__time-list", ref: function(list) {
|
|
24553
23991
|
_this.list = list;
|
|
24554
23992
|
}, style: height ? { height } : {}, role: "listbox", "aria-label": this.props.timeCaption }, this.renderTimes())
|
|
24555
23993
|
)
|
|
@@ -24560,7 +23998,7 @@ var Time = (
|
|
|
24560
23998
|
return centerLiRef.offsetTop - (listHeight / 2 - centerLiRef.clientHeight / 2);
|
|
24561
23999
|
};
|
|
24562
24000
|
return Time2;
|
|
24563
|
-
}(
|
|
24001
|
+
}(import_react44.Component)
|
|
24564
24002
|
);
|
|
24565
24003
|
var VERTICAL_NAVIGATION_OFFSET = 3;
|
|
24566
24004
|
var Year = (
|
|
@@ -24570,7 +24008,7 @@ var Year = (
|
|
|
24570
24008
|
function Year2(props) {
|
|
24571
24009
|
var _this = _super.call(this, props) || this;
|
|
24572
24010
|
_this.YEAR_REFS = __spreadArray([], Array(_this.props.yearItemNumber), true).map(function() {
|
|
24573
|
-
return (0,
|
|
24011
|
+
return (0, import_react44.createRef)();
|
|
24574
24012
|
});
|
|
24575
24013
|
_this.isDisabled = function(date) {
|
|
24576
24014
|
return isDayDisabled(date, {
|
|
@@ -24807,7 +24245,7 @@ var Year = (
|
|
|
24807
24245
|
}
|
|
24808
24246
|
var _b = getYearsPeriod(date, yearItemNumber), startPeriod = _b.startPeriod, endPeriod = _b.endPeriod;
|
|
24809
24247
|
var _loop_1 = function(y4) {
|
|
24810
|
-
yearsList.push(
|
|
24248
|
+
yearsList.push(import_react44.default.createElement("div", { ref: this_1.YEAR_REFS[y4 - startPeriod], onClick: function(event) {
|
|
24811
24249
|
_this.onYearClick(event, y4);
|
|
24812
24250
|
}, onKeyDown: function(event) {
|
|
24813
24251
|
if (isSpaceKeyDown(event)) {
|
|
@@ -24829,14 +24267,14 @@ var Year = (
|
|
|
24829
24267
|
for (var y3 = startPeriod; y3 <= endPeriod; y3++) {
|
|
24830
24268
|
_loop_1(y3);
|
|
24831
24269
|
}
|
|
24832
|
-
return
|
|
24270
|
+
return import_react44.default.createElement(
|
|
24833
24271
|
"div",
|
|
24834
24272
|
{ className: "react-datepicker__year" },
|
|
24835
|
-
|
|
24273
|
+
import_react44.default.createElement("div", { className: "react-datepicker__year-wrapper", onMouseLeave: !this.props.usePointerEvent ? this.props.clearSelectingDate : void 0, onPointerLeave: this.props.usePointerEvent ? this.props.clearSelectingDate : void 0 }, yearsList)
|
|
24836
24274
|
);
|
|
24837
24275
|
};
|
|
24838
24276
|
return Year2;
|
|
24839
|
-
}(
|
|
24277
|
+
}(import_react44.Component)
|
|
24840
24278
|
);
|
|
24841
24279
|
function generateYears(year, noOfYear, minDate, maxDate) {
|
|
24842
24280
|
var list = [];
|
|
@@ -24864,10 +24302,10 @@ var YearDropdownOptions = (
|
|
|
24864
24302
|
_this.renderOptions = function() {
|
|
24865
24303
|
var selectedYear = _this.props.year;
|
|
24866
24304
|
var options2 = _this.state.yearsList.map(function(year) {
|
|
24867
|
-
return
|
|
24305
|
+
return import_react44.default.createElement(
|
|
24868
24306
|
"div",
|
|
24869
24307
|
{ className: selectedYear === year ? "react-datepicker__year-option react-datepicker__year-option--selected_year" : "react-datepicker__year-option", key: year, onClick: _this.onChange.bind(_this, year), "aria-selected": selectedYear === year ? "true" : void 0 },
|
|
24870
|
-
selectedYear === year ?
|
|
24308
|
+
selectedYear === year ? import_react44.default.createElement("span", { className: "react-datepicker__year-option--selected" }, "\u2713") : "",
|
|
24871
24309
|
year
|
|
24872
24310
|
);
|
|
24873
24311
|
});
|
|
@@ -24876,19 +24314,19 @@ var YearDropdownOptions = (
|
|
|
24876
24314
|
if (!maxYear || !_this.state.yearsList.find(function(year) {
|
|
24877
24315
|
return year === maxYear;
|
|
24878
24316
|
})) {
|
|
24879
|
-
options2.unshift(
|
|
24317
|
+
options2.unshift(import_react44.default.createElement(
|
|
24880
24318
|
"div",
|
|
24881
24319
|
{ className: "react-datepicker__year-option", key: "upcoming", onClick: _this.incrementYears },
|
|
24882
|
-
|
|
24320
|
+
import_react44.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
|
|
24883
24321
|
));
|
|
24884
24322
|
}
|
|
24885
24323
|
if (!minYear || !_this.state.yearsList.find(function(year) {
|
|
24886
24324
|
return year === minYear;
|
|
24887
24325
|
})) {
|
|
24888
|
-
options2.push(
|
|
24326
|
+
options2.push(import_react44.default.createElement(
|
|
24889
24327
|
"div",
|
|
24890
24328
|
{ className: "react-datepicker__year-option", key: "previous", onClick: _this.decrementYears },
|
|
24891
|
-
|
|
24329
|
+
import_react44.default.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
|
|
24892
24330
|
));
|
|
24893
24331
|
}
|
|
24894
24332
|
return options2;
|
|
@@ -24918,7 +24356,7 @@ var YearDropdownOptions = (
|
|
|
24918
24356
|
_this.state = {
|
|
24919
24357
|
yearsList: generateYears(_this.props.year, noOfYear, _this.props.minDate, _this.props.maxDate)
|
|
24920
24358
|
};
|
|
24921
|
-
_this.dropdownRef = (0,
|
|
24359
|
+
_this.dropdownRef = (0, import_react44.createRef)();
|
|
24922
24360
|
return _this;
|
|
24923
24361
|
}
|
|
24924
24362
|
YearDropdownOptions2.prototype.componentDidMount = function() {
|
|
@@ -24936,10 +24374,10 @@ var YearDropdownOptions = (
|
|
|
24936
24374
|
"react-datepicker__year-dropdown": true,
|
|
24937
24375
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
24938
24376
|
});
|
|
24939
|
-
return
|
|
24377
|
+
return import_react44.default.createElement(ClickOutsideWrapper, { className: dropdownClass, containerRef: this.dropdownRef, onClickOutside: this.handleClickOutside }, this.renderOptions());
|
|
24940
24378
|
};
|
|
24941
24379
|
return YearDropdownOptions2;
|
|
24942
|
-
}(
|
|
24380
|
+
}(import_react44.Component)
|
|
24943
24381
|
);
|
|
24944
24382
|
var YearDropdown = (
|
|
24945
24383
|
/** @class */
|
|
@@ -24955,7 +24393,7 @@ var YearDropdown = (
|
|
|
24955
24393
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
24956
24394
|
var options2 = [];
|
|
24957
24395
|
for (var i3 = minYear; i3 <= maxYear; i3++) {
|
|
24958
|
-
options2.push(
|
|
24396
|
+
options2.push(import_react44.default.createElement("option", { key: i3, value: i3 }, i3));
|
|
24959
24397
|
}
|
|
24960
24398
|
return options2;
|
|
24961
24399
|
};
|
|
@@ -24963,20 +24401,20 @@ var YearDropdown = (
|
|
|
24963
24401
|
_this.onChange(parseInt(event.target.value));
|
|
24964
24402
|
};
|
|
24965
24403
|
_this.renderSelectMode = function() {
|
|
24966
|
-
return
|
|
24404
|
+
return import_react44.default.createElement("select", { value: _this.props.year, className: "react-datepicker__year-select", onChange: _this.onSelectChange }, _this.renderSelectOptions());
|
|
24967
24405
|
};
|
|
24968
24406
|
_this.renderReadView = function(visible) {
|
|
24969
|
-
return
|
|
24407
|
+
return import_react44.default.createElement(
|
|
24970
24408
|
"div",
|
|
24971
24409
|
{ key: "read", style: { visibility: visible ? "visible" : "hidden" }, className: "react-datepicker__year-read-view", onClick: function(event) {
|
|
24972
24410
|
return _this.toggleDropdown(event);
|
|
24973
24411
|
} },
|
|
24974
|
-
|
|
24975
|
-
|
|
24412
|
+
import_react44.default.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
|
|
24413
|
+
import_react44.default.createElement("span", { className: "react-datepicker__year-read-view--selected-year" }, _this.props.year)
|
|
24976
24414
|
);
|
|
24977
24415
|
};
|
|
24978
24416
|
_this.renderDropdown = function() {
|
|
24979
|
-
return
|
|
24417
|
+
return import_react44.default.createElement(YearDropdownOptions, _assign({ key: "dropdown" }, _this.props, { onChange: _this.onChange, onCancel: _this.toggleDropdown }));
|
|
24980
24418
|
};
|
|
24981
24419
|
_this.renderScrollMode = function() {
|
|
24982
24420
|
var dropdownVisible = _this.state.dropdownVisible;
|
|
@@ -25026,10 +24464,10 @@ var YearDropdown = (
|
|
|
25026
24464
|
renderedDropdown = this.renderSelectMode();
|
|
25027
24465
|
break;
|
|
25028
24466
|
}
|
|
25029
|
-
return
|
|
24467
|
+
return import_react44.default.createElement("div", { className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode) }, renderedDropdown);
|
|
25030
24468
|
};
|
|
25031
24469
|
return YearDropdown2;
|
|
25032
|
-
}(
|
|
24470
|
+
}(import_react44.Component)
|
|
25033
24471
|
);
|
|
25034
24472
|
var DROPDOWN_FOCUS_CLASSNAMES = [
|
|
25035
24473
|
"react-datepicker__year-select",
|
|
@@ -25200,13 +24638,13 @@ var Calendar = (
|
|
|
25200
24638
|
var startOfWeek2 = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
25201
24639
|
var dayNames = [];
|
|
25202
24640
|
if (_this.props.showWeekNumbers) {
|
|
25203
|
-
dayNames.push(
|
|
24641
|
+
dayNames.push(import_react44.default.createElement("div", { key: "W", className: "react-datepicker__day-name" }, _this.props.weekLabel || "#"));
|
|
25204
24642
|
}
|
|
25205
24643
|
return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function(offset4) {
|
|
25206
24644
|
var day = addDays(startOfWeek2, offset4);
|
|
25207
24645
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
25208
24646
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : void 0;
|
|
25209
|
-
return
|
|
24647
|
+
return import_react44.default.createElement("div", { key: offset4, "aria-label": formatDate(day, "EEEE", _this.props.locale), className: clsx("react-datepicker__day-name", weekDayClassName) }, weekDayName);
|
|
25210
24648
|
}));
|
|
25211
24649
|
};
|
|
25212
24650
|
_this.formatWeekday = function(day, locale) {
|
|
@@ -25275,10 +24713,10 @@ var Calendar = (
|
|
|
25275
24713
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
25276
24714
|
var _d = _this.props, _e = _d.previousMonthButtonLabel, previousMonthButtonLabel = _e === void 0 ? Calendar2.defaultProps.previousMonthButtonLabel : _e, _f = _d.previousYearButtonLabel, previousYearButtonLabel = _f === void 0 ? Calendar2.defaultProps.previousYearButtonLabel : _f;
|
|
25277
24715
|
var _g = _this.props, _h = _g.previousMonthAriaLabel, previousMonthAriaLabel = _h === void 0 ? typeof previousMonthButtonLabel === "string" ? previousMonthButtonLabel : "Previous Month" : _h, _j = _g.previousYearAriaLabel, previousYearAriaLabel = _j === void 0 ? typeof previousYearButtonLabel === "string" ? previousYearButtonLabel : "Previous Year" : _j;
|
|
25278
|
-
return
|
|
24716
|
+
return import_react44.default.createElement(
|
|
25279
24717
|
"button",
|
|
25280
24718
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel },
|
|
25281
|
-
|
|
24719
|
+
import_react44.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? previousYearButtonLabel : previousMonthButtonLabel)
|
|
25282
24720
|
);
|
|
25283
24721
|
};
|
|
25284
24722
|
_this.increaseYear = function() {
|
|
@@ -25340,10 +24778,10 @@ var Calendar = (
|
|
|
25340
24778
|
var isForYear = _this.props.showMonthYearPicker || _this.props.showQuarterYearPicker || _this.props.showYearPicker;
|
|
25341
24779
|
var _b = _this.props, _c = _b.nextMonthButtonLabel, nextMonthButtonLabel = _c === void 0 ? Calendar2.defaultProps.nextMonthButtonLabel : _c, _d = _b.nextYearButtonLabel, nextYearButtonLabel = _d === void 0 ? Calendar2.defaultProps.nextYearButtonLabel : _d;
|
|
25342
24780
|
var _e = _this.props, _f = _e.nextMonthAriaLabel, nextMonthAriaLabel = _f === void 0 ? typeof nextMonthButtonLabel === "string" ? nextMonthButtonLabel : "Next Month" : _f, _g = _e.nextYearAriaLabel, nextYearAriaLabel = _g === void 0 ? typeof nextYearButtonLabel === "string" ? nextYearButtonLabel : "Next Year" : _g;
|
|
25343
|
-
return
|
|
24781
|
+
return import_react44.default.createElement(
|
|
25344
24782
|
"button",
|
|
25345
24783
|
{ type: "button", className: classes.join(" "), onClick: clickHandler, onKeyDown: _this.props.handleOnKeyDown, "aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel },
|
|
25346
|
-
|
|
24784
|
+
import_react44.default.createElement("span", { className: iconClasses.join(" ") }, isForYear ? nextYearButtonLabel : nextMonthButtonLabel)
|
|
25347
24785
|
);
|
|
25348
24786
|
};
|
|
25349
24787
|
_this.renderCurrentMonth = function(date) {
|
|
@@ -25360,7 +24798,7 @@ var Calendar = (
|
|
|
25360
24798
|
if (_this.props.showMonthYearDropdown) {
|
|
25361
24799
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
25362
24800
|
}
|
|
25363
|
-
return
|
|
24801
|
+
return import_react44.default.createElement("h2", { className: classes.join(" ") }, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
25364
24802
|
};
|
|
25365
24803
|
_this.renderYearDropdown = function(overrideHide) {
|
|
25366
24804
|
if (overrideHide === void 0) {
|
|
@@ -25369,7 +24807,7 @@ var Calendar = (
|
|
|
25369
24807
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
25370
24808
|
return;
|
|
25371
24809
|
}
|
|
25372
|
-
return
|
|
24810
|
+
return import_react44.default.createElement(YearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeYear, year: getYear(_this.state.date) }));
|
|
25373
24811
|
};
|
|
25374
24812
|
_this.renderMonthDropdown = function(overrideHide) {
|
|
25375
24813
|
if (overrideHide === void 0) {
|
|
@@ -25378,7 +24816,7 @@ var Calendar = (
|
|
|
25378
24816
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
25379
24817
|
return;
|
|
25380
24818
|
}
|
|
25381
|
-
return
|
|
24819
|
+
return import_react44.default.createElement(MonthDropdown, _assign({}, Calendar2.defaultProps, _this.props, { month: getMonth(_this.state.date), onChange: _this.changeMonth }));
|
|
25382
24820
|
};
|
|
25383
24821
|
_this.renderMonthYearDropdown = function(overrideHide) {
|
|
25384
24822
|
if (overrideHide === void 0) {
|
|
@@ -25387,7 +24825,7 @@ var Calendar = (
|
|
|
25387
24825
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
25388
24826
|
return;
|
|
25389
24827
|
}
|
|
25390
|
-
return
|
|
24828
|
+
return import_react44.default.createElement(MonthYearDropdown, _assign({}, Calendar2.defaultProps, _this.props, { date: _this.state.date, onChange: _this.changeMonthYear }));
|
|
25391
24829
|
};
|
|
25392
24830
|
_this.handleTodayButtonClick = function(event) {
|
|
25393
24831
|
_this.props.onSelect(getStartOfToday(), event);
|
|
@@ -25397,22 +24835,22 @@ var Calendar = (
|
|
|
25397
24835
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
25398
24836
|
return;
|
|
25399
24837
|
}
|
|
25400
|
-
return
|
|
24838
|
+
return import_react44.default.createElement("div", { className: "react-datepicker__today-button", onClick: _this.handleTodayButtonClick }, _this.props.todayButton);
|
|
25401
24839
|
};
|
|
25402
24840
|
_this.renderDefaultHeader = function(_a2) {
|
|
25403
24841
|
var monthDate = _a2.monthDate, i3 = _a2.i;
|
|
25404
|
-
return
|
|
24842
|
+
return import_react44.default.createElement(
|
|
25405
24843
|
"div",
|
|
25406
24844
|
{ className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "") },
|
|
25407
24845
|
_this.renderCurrentMonth(monthDate),
|
|
25408
|
-
|
|
24846
|
+
import_react44.default.createElement(
|
|
25409
24847
|
"div",
|
|
25410
24848
|
{ className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode), onFocus: _this.handleDropdownFocus },
|
|
25411
24849
|
_this.renderMonthDropdown(i3 !== 0),
|
|
25412
24850
|
_this.renderMonthYearDropdown(i3 !== 0),
|
|
25413
24851
|
_this.renderYearDropdown(i3 !== 0)
|
|
25414
24852
|
),
|
|
25415
|
-
|
|
24853
|
+
import_react44.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25416
24854
|
);
|
|
25417
24855
|
};
|
|
25418
24856
|
_this.renderCustomHeader = function(headerArgs) {
|
|
@@ -25426,18 +24864,18 @@ var Calendar = (
|
|
|
25426
24864
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
25427
24865
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
25428
24866
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
25429
|
-
return
|
|
24867
|
+
return import_react44.default.createElement(
|
|
25430
24868
|
"div",
|
|
25431
24869
|
{ className: "react-datepicker__header react-datepicker__header--custom", onFocus: _this.props.onDropdownFocus },
|
|
25432
24870
|
(_b = (_a2 = _this.props).renderCustomHeader) === null || _b === void 0 ? void 0 : _b.call(_a2, _assign(_assign({}, _this.state), { customHeaderCount: i3, monthDate, changeMonth: _this.changeMonth, changeYear: _this.changeYear, decreaseMonth: _this.decreaseMonth, increaseMonth: _this.increaseMonth, decreaseYear: _this.decreaseYear, increaseYear: _this.increaseYear, prevMonthButtonDisabled, nextMonthButtonDisabled, prevYearButtonDisabled, nextYearButtonDisabled })),
|
|
25433
|
-
showDayNames &&
|
|
24871
|
+
showDayNames && import_react44.default.createElement("div", { className: "react-datepicker__day-names" }, _this.header(monthDate))
|
|
25434
24872
|
);
|
|
25435
24873
|
};
|
|
25436
24874
|
_this.renderYearHeader = function(_a2) {
|
|
25437
24875
|
var monthDate = _a2.monthDate;
|
|
25438
24876
|
var _b = _this.props, showYearPicker = _b.showYearPicker, _c = _b.yearItemNumber, yearItemNumber = _c === void 0 ? Calendar2.defaultProps.yearItemNumber : _c;
|
|
25439
24877
|
var _d = getYearsPeriod(monthDate, yearItemNumber), startPeriod = _d.startPeriod, endPeriod = _d.endPeriod;
|
|
25440
|
-
return
|
|
24878
|
+
return import_react44.default.createElement("div", { className: "react-datepicker__header react-datepicker-year-header" }, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
25441
24879
|
};
|
|
25442
24880
|
_this.renderHeader = function(_a2) {
|
|
25443
24881
|
var monthDate = _a2.monthDate, _b = _a2.i, i3 = _b === void 0 ? 0 : _b;
|
|
@@ -25467,13 +24905,13 @@ var Calendar = (
|
|
|
25467
24905
|
var monthKey = "month-".concat(i3);
|
|
25468
24906
|
var monthShowsDuplicateDaysEnd = i3 < monthsShown - 1;
|
|
25469
24907
|
var monthShowsDuplicateDaysStart = i3 > 0;
|
|
25470
|
-
monthList.push(
|
|
24908
|
+
monthList.push(import_react44.default.createElement(
|
|
25471
24909
|
"div",
|
|
25472
24910
|
{ key: monthKey, ref: function(div) {
|
|
25473
24911
|
_this.monthContainer = div !== null && div !== void 0 ? div : void 0;
|
|
25474
24912
|
}, className: "react-datepicker__month-container" },
|
|
25475
24913
|
_this.renderHeader({ monthDate, i: i3 }),
|
|
25476
|
-
|
|
24914
|
+
import_react44.default.createElement(Month, _assign({}, Calendar2.defaultProps, _this.props, { containerRef: _this.containerRef, ariaLabelPrefix: _this.props.monthAriaLabelPrefix, day: monthDate, onDayClick: _this.handleDayClick, handleOnKeyDown: _this.props.handleOnDayKeyDown, handleOnMonthKeyDown: _this.props.handleOnKeyDown, onDayMouseEnter: _this.handleDayMouseEnter, onMouseLeave: _this.handleMonthMouseLeave, orderInDisplay: i3, selectingDate: _this.state.selectingDate, monthShowsDuplicateDaysEnd, monthShowsDuplicateDaysStart }))
|
|
25477
24915
|
));
|
|
25478
24916
|
}
|
|
25479
24917
|
return monthList;
|
|
@@ -25483,18 +24921,18 @@ var Calendar = (
|
|
|
25483
24921
|
return;
|
|
25484
24922
|
}
|
|
25485
24923
|
if (_this.props.showYearPicker) {
|
|
25486
|
-
return
|
|
24924
|
+
return import_react44.default.createElement(
|
|
25487
24925
|
"div",
|
|
25488
24926
|
{ className: "react-datepicker__year--container" },
|
|
25489
24927
|
_this.renderHeader({ monthDate: _this.state.date }),
|
|
25490
|
-
|
|
24928
|
+
import_react44.default.createElement(Year, _assign({}, Calendar2.defaultProps, _this.props, { selectingDate: _this.state.selectingDate, date: _this.state.date, onDayClick: _this.handleDayClick, clearSelectingDate: _this.clearSelectingDate, onYearMouseEnter: _this.handleYearMouseEnter, onYearMouseLeave: _this.handleYearMouseLeave }))
|
|
25491
24929
|
);
|
|
25492
24930
|
}
|
|
25493
24931
|
return;
|
|
25494
24932
|
};
|
|
25495
24933
|
_this.renderTimeSection = function() {
|
|
25496
24934
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
25497
|
-
return
|
|
24935
|
+
return import_react44.default.createElement(Time, _assign({}, Calendar2.defaultProps, _this.props, { onChange: _this.props.onTimeChange, format: _this.props.timeFormat, intervals: _this.props.timeIntervals, monthRef: _this.state.monthContainer }));
|
|
25498
24936
|
}
|
|
25499
24937
|
return;
|
|
25500
24938
|
};
|
|
@@ -25503,7 +24941,7 @@ var Calendar = (
|
|
|
25503
24941
|
var timeValid = time && isValid2(time) && Boolean(_this.props.selected);
|
|
25504
24942
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
25505
24943
|
if (_this.props.showTimeInput) {
|
|
25506
|
-
return
|
|
24944
|
+
return import_react44.default.createElement(InputTime, _assign({}, Calendar2.defaultProps, _this.props, { date: time, timeString, onChange: _this.props.onTimeChange }));
|
|
25507
24945
|
}
|
|
25508
24946
|
return;
|
|
25509
24947
|
};
|
|
@@ -25518,15 +24956,15 @@ var Calendar = (
|
|
|
25518
24956
|
} else {
|
|
25519
24957
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
25520
24958
|
}
|
|
25521
|
-
return
|
|
24959
|
+
return import_react44.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, _this.state.isRenderAriaLiveMessage && ariaLiveMessage);
|
|
25522
24960
|
};
|
|
25523
24961
|
_this.renderChildren = function() {
|
|
25524
24962
|
if (_this.props.children) {
|
|
25525
|
-
return
|
|
24963
|
+
return import_react44.default.createElement("div", { className: "react-datepicker__children-container" }, _this.props.children);
|
|
25526
24964
|
}
|
|
25527
24965
|
return;
|
|
25528
24966
|
};
|
|
25529
|
-
_this.containerRef = (0,
|
|
24967
|
+
_this.containerRef = (0, import_react44.createRef)();
|
|
25530
24968
|
_this.state = {
|
|
25531
24969
|
date: _this.getDateInView(),
|
|
25532
24970
|
selectingDate: void 0,
|
|
@@ -25576,13 +25014,13 @@ var Calendar = (
|
|
|
25576
25014
|
};
|
|
25577
25015
|
Calendar2.prototype.render = function() {
|
|
25578
25016
|
var Container = this.props.container || CalendarContainer;
|
|
25579
|
-
return
|
|
25017
|
+
return import_react44.default.createElement(
|
|
25580
25018
|
ClickOutsideWrapper,
|
|
25581
25019
|
{ onClickOutside: this.handleClickOutside, style: { display: "contents" }, ignoreClass: this.props.outsideClickIgnoreClass },
|
|
25582
|
-
|
|
25020
|
+
import_react44.default.createElement(
|
|
25583
25021
|
"div",
|
|
25584
25022
|
{ style: { display: "contents" }, ref: this.containerRef },
|
|
25585
|
-
|
|
25023
|
+
import_react44.default.createElement(
|
|
25586
25024
|
Container,
|
|
25587
25025
|
{ className: clsx("react-datepicker", this.props.className, {
|
|
25588
25026
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
@@ -25601,17 +25039,17 @@ var Calendar = (
|
|
|
25601
25039
|
);
|
|
25602
25040
|
};
|
|
25603
25041
|
return Calendar2;
|
|
25604
|
-
}(
|
|
25042
|
+
}(import_react44.Component)
|
|
25605
25043
|
);
|
|
25606
25044
|
var CalendarIcon2 = function(_a2) {
|
|
25607
25045
|
var icon = _a2.icon, _b = _a2.className, className = _b === void 0 ? "" : _b, onClick = _a2.onClick;
|
|
25608
25046
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
25609
25047
|
if (typeof icon === "string") {
|
|
25610
|
-
return
|
|
25048
|
+
return import_react44.default.createElement("i", { className: "".concat(defaultClass, " ").concat(icon, " ").concat(className), "aria-hidden": "true", onClick });
|
|
25611
25049
|
}
|
|
25612
|
-
if (
|
|
25050
|
+
if (import_react44.default.isValidElement(icon)) {
|
|
25613
25051
|
var iconElement_1 = icon;
|
|
25614
|
-
return
|
|
25052
|
+
return import_react44.default.cloneElement(iconElement_1, {
|
|
25615
25053
|
className: "".concat(iconElement_1.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
25616
25054
|
onClick: function(event) {
|
|
25617
25055
|
if (typeof iconElement_1.props.onClick === "function") {
|
|
@@ -25623,10 +25061,10 @@ var CalendarIcon2 = function(_a2) {
|
|
|
25623
25061
|
}
|
|
25624
25062
|
});
|
|
25625
25063
|
}
|
|
25626
|
-
return
|
|
25064
|
+
return import_react44.default.createElement(
|
|
25627
25065
|
"svg",
|
|
25628
25066
|
{ className: "".concat(defaultClass, " ").concat(className), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", onClick },
|
|
25629
|
-
|
|
25067
|
+
import_react44.default.createElement("path", { d: "M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z" })
|
|
25630
25068
|
);
|
|
25631
25069
|
};
|
|
25632
25070
|
var Portal = (
|
|
@@ -25657,7 +25095,7 @@ var Portal = (
|
|
|
25657
25095
|
return import_react_dom5.default.createPortal(this.props.children, this.el);
|
|
25658
25096
|
};
|
|
25659
25097
|
return Portal2;
|
|
25660
|
-
}(
|
|
25098
|
+
}(import_react44.Component)
|
|
25661
25099
|
);
|
|
25662
25100
|
var focusableElementsSelector = "[tabindex], a, button, input, select, textarea";
|
|
25663
25101
|
var focusableFilter = function(node2) {
|
|
@@ -25684,7 +25122,7 @@ var TabLoop = (
|
|
|
25684
25122
|
var tabChildren = _this.getTabChildren();
|
|
25685
25123
|
tabChildren && tabChildren.length > 1 && tabChildren[0].focus();
|
|
25686
25124
|
};
|
|
25687
|
-
_this.tabLoopRef = (0,
|
|
25125
|
+
_this.tabLoopRef = (0, import_react44.createRef)();
|
|
25688
25126
|
return _this;
|
|
25689
25127
|
}
|
|
25690
25128
|
TabLoop2.prototype.render = function() {
|
|
@@ -25692,32 +25130,32 @@ var TabLoop = (
|
|
|
25692
25130
|
if (!((_a2 = this.props.enableTabLoop) !== null && _a2 !== void 0 ? _a2 : TabLoop2.defaultProps.enableTabLoop)) {
|
|
25693
25131
|
return this.props.children;
|
|
25694
25132
|
}
|
|
25695
|
-
return
|
|
25133
|
+
return import_react44.default.createElement(
|
|
25696
25134
|
"div",
|
|
25697
25135
|
{ className: "react-datepicker__tab-loop", ref: this.tabLoopRef },
|
|
25698
|
-
|
|
25136
|
+
import_react44.default.createElement("div", { className: "react-datepicker__tab-loop__start", tabIndex: 0, onFocus: this.handleFocusStart }),
|
|
25699
25137
|
this.props.children,
|
|
25700
|
-
|
|
25138
|
+
import_react44.default.createElement("div", { className: "react-datepicker__tab-loop__end", tabIndex: 0, onFocus: this.handleFocusEnd })
|
|
25701
25139
|
);
|
|
25702
25140
|
};
|
|
25703
25141
|
TabLoop2.defaultProps = {
|
|
25704
25142
|
enableTabLoop: true
|
|
25705
25143
|
};
|
|
25706
25144
|
return TabLoop2;
|
|
25707
|
-
}(
|
|
25145
|
+
}(import_react44.Component)
|
|
25708
25146
|
);
|
|
25709
25147
|
function withFloating(Component3) {
|
|
25710
25148
|
var WithFloating = function(props) {
|
|
25711
25149
|
var _a2;
|
|
25712
25150
|
var hidePopper = typeof props.hidePopper === "boolean" ? props.hidePopper : true;
|
|
25713
|
-
var arrowRef = (0,
|
|
25151
|
+
var arrowRef = (0, import_react44.useRef)(null);
|
|
25714
25152
|
var floatingProps = useFloating2(_assign({ open: !hidePopper, whileElementsMounted: autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
|
|
25715
25153
|
flip3({ padding: 15 }),
|
|
25716
25154
|
offset3(10),
|
|
25717
25155
|
arrow3({ element: arrowRef })
|
|
25718
25156
|
], (_a2 = props.popperModifiers) !== null && _a2 !== void 0 ? _a2 : [], true) }, props.popperProps));
|
|
25719
25157
|
var componentProps = _assign(_assign({}, props), { hidePopper, popperProps: _assign(_assign({}, floatingProps), { arrowRef }) });
|
|
25720
|
-
return
|
|
25158
|
+
return import_react44.default.createElement(Component3, _assign({}, componentProps));
|
|
25721
25159
|
};
|
|
25722
25160
|
return WithFloating;
|
|
25723
25161
|
}
|
|
@@ -25742,33 +25180,33 @@ var PopperComponent = (
|
|
|
25742
25180
|
var popper = void 0;
|
|
25743
25181
|
if (!hidePopper) {
|
|
25744
25182
|
var classes = clsx("react-datepicker-popper", className);
|
|
25745
|
-
popper =
|
|
25183
|
+
popper = import_react44.default.createElement(
|
|
25746
25184
|
TabLoop,
|
|
25747
25185
|
{ enableTabLoop },
|
|
25748
|
-
|
|
25186
|
+
import_react44.default.createElement(
|
|
25749
25187
|
"div",
|
|
25750
25188
|
{ ref: popperProps.refs.setFloating, style: popperProps.floatingStyles, className: classes, "data-placement": popperProps.placement, onKeyDown: popperOnKeyDown },
|
|
25751
25189
|
popperComponent,
|
|
25752
|
-
showArrow &&
|
|
25190
|
+
showArrow && import_react44.default.createElement(FloatingArrow, { ref: popperProps.arrowRef, context: popperProps.context, fill: "currentColor", strokeWidth: 1, height: 8, width: 16, style: { transform: "translateY(-1px)" }, className: "react-datepicker__triangle" })
|
|
25753
25191
|
)
|
|
25754
25192
|
);
|
|
25755
25193
|
}
|
|
25756
25194
|
if (this.props.popperContainer) {
|
|
25757
|
-
popper = (0,
|
|
25195
|
+
popper = (0, import_react44.createElement)(this.props.popperContainer, {}, popper);
|
|
25758
25196
|
}
|
|
25759
25197
|
if (portalId && !hidePopper) {
|
|
25760
|
-
popper =
|
|
25198
|
+
popper = import_react44.default.createElement(Portal, { portalId, portalHost }, popper);
|
|
25761
25199
|
}
|
|
25762
25200
|
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
25763
|
-
return
|
|
25764
|
-
|
|
25201
|
+
return import_react44.default.createElement(
|
|
25202
|
+
import_react44.default.Fragment,
|
|
25765
25203
|
null,
|
|
25766
|
-
|
|
25204
|
+
import_react44.default.createElement("div", { ref: popperProps.refs.setReference, className: wrapperClasses }, targetComponent),
|
|
25767
25205
|
popper
|
|
25768
25206
|
);
|
|
25769
25207
|
};
|
|
25770
25208
|
return PopperComponent2;
|
|
25771
|
-
}(
|
|
25209
|
+
}(import_react44.Component)
|
|
25772
25210
|
);
|
|
25773
25211
|
var PopperComponent$1 = withFloating(PopperComponent);
|
|
25774
25212
|
var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside";
|
|
@@ -26382,7 +25820,7 @@ var DatePicker = (
|
|
|
26382
25820
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
26383
25821
|
return null;
|
|
26384
25822
|
}
|
|
26385
|
-
return
|
|
25823
|
+
return import_react44.default.createElement(Calendar, _assign({ showMonthYearDropdown: void 0, ref: function(elem) {
|
|
26386
25824
|
_this.calendar = elem;
|
|
26387
25825
|
} }, _this.props, _this.state, { setOpen: _this.setOpen, dateFormat: (_a2 = _this.props.dateFormatCalendar) !== null && _a2 !== void 0 ? _a2 : DatePicker2.defaultProps.dateFormatCalendar, onSelect: _this.handleSelect, onClickOutside: _this.handleCalendarClickOutside, holidays: getHolidaysMap(_this.modifyHolidays()), outsideClickIgnoreClass, onDropdownFocus: _this.handleDropdownFocus, onTimeChange: _this.handleTimeChange, className: _this.props.calendarClassName, container: _this.props.calendarContainer, handleOnKeyDown: _this.props.onKeyDown, handleOnDayKeyDown: _this.onDayKeyDown, setPreSelection: _this.setPreSelection, dropdownMode: (_b = _this.props.dropdownMode) !== null && _b !== void 0 ? _b : DatePicker2.defaultProps.dropdownMode }), _this.props.children);
|
|
26388
25826
|
};
|
|
@@ -26418,13 +25856,13 @@ var DatePicker = (
|
|
|
26418
25856
|
}));
|
|
26419
25857
|
}
|
|
26420
25858
|
}
|
|
26421
|
-
return
|
|
25859
|
+
return import_react44.default.createElement("span", { role: "alert", "aria-live": "polite", className: "react-datepicker__aria-live" }, ariaLiveMessage);
|
|
26422
25860
|
};
|
|
26423
25861
|
_this.renderDateInput = function() {
|
|
26424
25862
|
var _a2, _b;
|
|
26425
25863
|
var _c;
|
|
26426
25864
|
var className = clsx(_this.props.className, (_a2 = {}, _a2[outsideClickIgnoreClass] = _this.state.open, _a2));
|
|
26427
|
-
var customInput = _this.props.customInput ||
|
|
25865
|
+
var customInput = _this.props.customInput || import_react44.default.createElement("input", { type: "text" });
|
|
26428
25866
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
26429
25867
|
var _d = _this.props, _e = _d.dateFormat, dateFormat = _e === void 0 ? DatePicker2.defaultProps.dateFormat : _e, locale = _d.locale;
|
|
26430
25868
|
var inputValue = typeof _this.props.value === "string" ? _this.props.value : typeof _this.state.inputValue === "string" ? _this.state.inputValue : _this.props.selectsRange ? safeDateRangeFormat(_this.props.startDate, _this.props.endDate, {
|
|
@@ -26437,14 +25875,14 @@ var DatePicker = (
|
|
|
26437
25875
|
dateFormat,
|
|
26438
25876
|
locale
|
|
26439
25877
|
});
|
|
26440
|
-
return (0,
|
|
25878
|
+
return (0, import_react44.cloneElement)(customInput, (_b = {}, _b[customInputRef] = function(input) {
|
|
26441
25879
|
_this.input = input;
|
|
26442
25880
|
}, _b.value = inputValue, _b.onBlur = _this.handleBlur, _b.onChange = _this.handleChange, _b.onClick = _this.onInputClick, _b.onFocus = _this.handleFocus, _b.onKeyDown = _this.onInputKeyDown, _b.id = _this.props.id, _b.name = _this.props.name, _b.form = _this.props.form, _b.autoFocus = _this.props.autoFocus, _b.placeholder = _this.props.placeholderText, _b.disabled = _this.props.disabled, _b.autoComplete = _this.props.autoComplete, _b.className = clsx(customInput.props.className, className), _b.title = _this.props.title, _b.readOnly = _this.props.readOnly, _b.required = _this.props.required, _b.tabIndex = _this.props.tabIndex, _b["aria-describedby"] = _this.props.ariaDescribedBy, _b["aria-invalid"] = _this.props.ariaInvalid, _b["aria-labelledby"] = _this.props.ariaLabelledBy, _b["aria-required"] = _this.props.ariaRequired, _b));
|
|
26443
25881
|
};
|
|
26444
25882
|
_this.renderClearButton = function() {
|
|
26445
25883
|
var _a2 = _this.props, isClearable = _a2.isClearable, disabled = _a2.disabled, selected = _a2.selected, startDate = _a2.startDate, endDate = _a2.endDate, clearButtonTitle = _a2.clearButtonTitle, _b = _a2.clearButtonClassName, clearButtonClassName = _b === void 0 ? "" : _b, _c = _a2.ariaLabelClose, ariaLabelClose = _c === void 0 ? "Close" : _c, selectedDates = _a2.selectedDates, readOnly = _a2.readOnly;
|
|
26446
25884
|
if (isClearable && !readOnly && (selected != null || startDate != null || endDate != null || (selectedDates === null || selectedDates === void 0 ? void 0 : selectedDates.length))) {
|
|
26447
|
-
return
|
|
25885
|
+
return import_react44.default.createElement("button", { type: "button", className: clsx("react-datepicker__close-icon", clearButtonClassName, { "react-datepicker__close-icon--disabled": disabled }), disabled, "aria-label": ariaLabelClose, onClick: _this.onClearClick, title: clearButtonTitle, tabIndex: -1 });
|
|
26448
25886
|
} else {
|
|
26449
25887
|
return null;
|
|
26450
25888
|
}
|
|
@@ -26545,10 +25983,10 @@ var DatePicker = (
|
|
|
26545
25983
|
if (calendarIconClassname) {
|
|
26546
25984
|
console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props.");
|
|
26547
25985
|
}
|
|
26548
|
-
return
|
|
25986
|
+
return import_react44.default.createElement(
|
|
26549
25987
|
"div",
|
|
26550
25988
|
{ className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "") },
|
|
26551
|
-
showIcon &&
|
|
25989
|
+
showIcon && import_react44.default.createElement(CalendarIcon2, _assign({ icon, className: clsx(calendarIconClassName, !calendarIconClassName && calendarIconClassname, open && "react-datepicker-ignore-onclickoutside") }, toggleCalendarOnIconClick ? {
|
|
26552
25990
|
onClick: this.toggleCalendar
|
|
26553
25991
|
} : null)),
|
|
26554
25992
|
this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion(),
|
|
@@ -26561,25 +25999,25 @@ var DatePicker = (
|
|
|
26561
25999
|
if (this.props.inline)
|
|
26562
26000
|
return calendar;
|
|
26563
26001
|
if (this.props.withPortal) {
|
|
26564
|
-
var portalContainer = this.state.open ?
|
|
26002
|
+
var portalContainer = this.state.open ? import_react44.default.createElement(
|
|
26565
26003
|
TabLoop,
|
|
26566
26004
|
{ enableTabLoop: this.props.enableTabLoop },
|
|
26567
|
-
|
|
26005
|
+
import_react44.default.createElement("div", { className: "react-datepicker__portal", tabIndex: -1, onKeyDown: this.onPortalKeyDown }, calendar)
|
|
26568
26006
|
) : null;
|
|
26569
26007
|
if (this.state.open && this.props.portalId) {
|
|
26570
|
-
portalContainer =
|
|
26008
|
+
portalContainer = import_react44.default.createElement(Portal, _assign({ portalId: this.props.portalId }, this.props), portalContainer);
|
|
26571
26009
|
}
|
|
26572
|
-
return
|
|
26010
|
+
return import_react44.default.createElement(
|
|
26573
26011
|
"div",
|
|
26574
26012
|
null,
|
|
26575
26013
|
this.renderInputContainer(),
|
|
26576
26014
|
portalContainer
|
|
26577
26015
|
);
|
|
26578
26016
|
}
|
|
26579
|
-
return
|
|
26017
|
+
return import_react44.default.createElement(PopperComponent$1, _assign({}, this.props, { className: this.props.popperClassName, hidePopper: !this.isCalendarOpen(), targetComponent: this.renderInputContainer(), popperComponent: calendar, popperOnKeyDown: this.onPopperKeyDown, showArrow: this.props.showPopperArrow }));
|
|
26580
26018
|
};
|
|
26581
26019
|
return DatePicker2;
|
|
26582
|
-
}(
|
|
26020
|
+
}(import_react44.Component)
|
|
26583
26021
|
);
|
|
26584
26022
|
var PRESELECT_CHANGE_VIA_INPUT = "input";
|
|
26585
26023
|
var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
@@ -26722,33 +26160,33 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
26722
26160
|
}
|
|
26723
26161
|
|
|
26724
26162
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
26725
|
-
var
|
|
26163
|
+
var import_react46 = require("react");
|
|
26726
26164
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
26727
26165
|
function useStateManager(_ref3) {
|
|
26728
26166
|
var _ref$defaultInputValu = _ref3.defaultInputValue, defaultInputValue = _ref$defaultInputValu === void 0 ? "" : _ref$defaultInputValu, _ref$defaultMenuIsOpe = _ref3.defaultMenuIsOpen, defaultMenuIsOpen = _ref$defaultMenuIsOpe === void 0 ? false : _ref$defaultMenuIsOpe, _ref$defaultValue = _ref3.defaultValue, defaultValue = _ref$defaultValue === void 0 ? null : _ref$defaultValue, propsInputValue = _ref3.inputValue, propsMenuIsOpen = _ref3.menuIsOpen, propsOnChange = _ref3.onChange, propsOnInputChange = _ref3.onInputChange, propsOnMenuClose = _ref3.onMenuClose, propsOnMenuOpen = _ref3.onMenuOpen, propsValue = _ref3.value, restSelectProps = _objectWithoutProperties(_ref3, _excluded);
|
|
26729
|
-
var _useState = (0,
|
|
26730
|
-
var _useState3 = (0,
|
|
26731
|
-
var _useState5 = (0,
|
|
26732
|
-
var onChange2 = (0,
|
|
26167
|
+
var _useState = (0, import_react46.useState)(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
26168
|
+
var _useState3 = (0, import_react46.useState)(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
26169
|
+
var _useState5 = (0, import_react46.useState)(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
26170
|
+
var onChange2 = (0, import_react46.useCallback)(function(value2, actionMeta) {
|
|
26733
26171
|
if (typeof propsOnChange === "function") {
|
|
26734
26172
|
propsOnChange(value2, actionMeta);
|
|
26735
26173
|
}
|
|
26736
26174
|
setStateValue(value2);
|
|
26737
26175
|
}, [propsOnChange]);
|
|
26738
|
-
var onInputChange = (0,
|
|
26176
|
+
var onInputChange = (0, import_react46.useCallback)(function(value2, actionMeta) {
|
|
26739
26177
|
var newValue;
|
|
26740
26178
|
if (typeof propsOnInputChange === "function") {
|
|
26741
26179
|
newValue = propsOnInputChange(value2, actionMeta);
|
|
26742
26180
|
}
|
|
26743
26181
|
setStateInputValue(newValue !== void 0 ? newValue : value2);
|
|
26744
26182
|
}, [propsOnInputChange]);
|
|
26745
|
-
var onMenuOpen = (0,
|
|
26183
|
+
var onMenuOpen = (0, import_react46.useCallback)(function() {
|
|
26746
26184
|
if (typeof propsOnMenuOpen === "function") {
|
|
26747
26185
|
propsOnMenuOpen();
|
|
26748
26186
|
}
|
|
26749
26187
|
setStateMenuIsOpen(true);
|
|
26750
26188
|
}, [propsOnMenuOpen]);
|
|
26751
|
-
var onMenuClose = (0,
|
|
26189
|
+
var onMenuClose = (0, import_react46.useCallback)(function() {
|
|
26752
26190
|
if (typeof propsOnMenuClose === "function") {
|
|
26753
26191
|
propsOnMenuClose();
|
|
26754
26192
|
}
|
|
@@ -26781,7 +26219,7 @@ function _extends() {
|
|
|
26781
26219
|
|
|
26782
26220
|
// node_modules/react-select/dist/react-select.esm.js
|
|
26783
26221
|
var React14 = __toESM(require("react"));
|
|
26784
|
-
var
|
|
26222
|
+
var import_react53 = require("react");
|
|
26785
26223
|
|
|
26786
26224
|
// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
26787
26225
|
function _classCallCheck(a2, n4) {
|
|
@@ -26889,11 +26327,11 @@ function _toConsumableArray(r4) {
|
|
|
26889
26327
|
|
|
26890
26328
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
26891
26329
|
var React13 = __toESM(require("react"));
|
|
26892
|
-
var
|
|
26330
|
+
var import_react51 = require("react");
|
|
26893
26331
|
|
|
26894
26332
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
26895
26333
|
var React11 = __toESM(require("react"));
|
|
26896
|
-
var
|
|
26334
|
+
var import_react47 = require("react");
|
|
26897
26335
|
|
|
26898
26336
|
// node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
26899
26337
|
var isDevelopment = false;
|
|
@@ -28081,15 +27519,15 @@ var EmotionCacheContext = /* @__PURE__ */ React11.createContext(
|
|
|
28081
27519
|
);
|
|
28082
27520
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
28083
27521
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
28084
|
-
return /* @__PURE__ */ (0,
|
|
28085
|
-
var cache = (0,
|
|
27522
|
+
return /* @__PURE__ */ (0, import_react47.forwardRef)(function(props, ref) {
|
|
27523
|
+
var cache = (0, import_react47.useContext)(EmotionCacheContext);
|
|
28086
27524
|
return func(props, cache, ref);
|
|
28087
27525
|
});
|
|
28088
27526
|
};
|
|
28089
27527
|
if (!isBrowser4) {
|
|
28090
27528
|
withEmotionCache = function withEmotionCache3(func) {
|
|
28091
27529
|
return function(props) {
|
|
28092
|
-
var cache = (0,
|
|
27530
|
+
var cache = (0, import_react47.useContext)(EmotionCacheContext);
|
|
28093
27531
|
if (cache === null) {
|
|
28094
27532
|
cache = createCache({
|
|
28095
27533
|
key: "css"
|
|
@@ -28173,7 +27611,7 @@ var Emotion$1 = Emotion;
|
|
|
28173
27611
|
var React12 = __toESM(require("react"));
|
|
28174
27612
|
var import_extends2 = __toESM(require_extends());
|
|
28175
27613
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
28176
|
-
var
|
|
27614
|
+
var jsx81 = function jsx82(type, props) {
|
|
28177
27615
|
var args = arguments;
|
|
28178
27616
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
28179
27617
|
return React12.createElement.apply(void 0, args);
|
|
@@ -28191,7 +27629,7 @@ var jsx82 = function jsx83(type, props) {
|
|
|
28191
27629
|
var JSX;
|
|
28192
27630
|
/* @__PURE__ */ (function(_JSX) {
|
|
28193
27631
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
28194
|
-
})(
|
|
27632
|
+
})(jsx81 || (jsx81 = {}));
|
|
28195
27633
|
function css() {
|
|
28196
27634
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28197
27635
|
args[_key] = arguments[_key];
|
|
@@ -28221,15 +27659,15 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
28221
27659
|
}
|
|
28222
27660
|
|
|
28223
27661
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
28224
|
-
var
|
|
27662
|
+
var import_react50 = require("react");
|
|
28225
27663
|
var import_react_dom6 = require("react-dom");
|
|
28226
27664
|
|
|
28227
27665
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
28228
|
-
var
|
|
27666
|
+
var import_react48 = require("react");
|
|
28229
27667
|
var isClient3 = typeof document !== "undefined";
|
|
28230
27668
|
var noop6 = function noop7() {
|
|
28231
27669
|
};
|
|
28232
|
-
var index3 = isClient3 ?
|
|
27670
|
+
var index3 = isClient3 ? import_react48.useLayoutEffect : noop6;
|
|
28233
27671
|
|
|
28234
27672
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
28235
27673
|
var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
@@ -28563,13 +28001,13 @@ var menuCSS = function menuCSS2(_ref23, unstyled) {
|
|
|
28563
28001
|
marginTop: spacing2.menuGutter
|
|
28564
28002
|
});
|
|
28565
28003
|
};
|
|
28566
|
-
var PortalPlacementContext = /* @__PURE__ */ (0,
|
|
28004
|
+
var PortalPlacementContext = /* @__PURE__ */ (0, import_react50.createContext)(null);
|
|
28567
28005
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
28568
28006
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
28569
|
-
var _ref3 = (0,
|
|
28570
|
-
var ref = (0,
|
|
28571
|
-
var _useState = (0,
|
|
28572
|
-
var _useState3 = (0,
|
|
28007
|
+
var _ref3 = (0, import_react50.useContext)(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
28008
|
+
var ref = (0, import_react50.useRef)(null);
|
|
28009
|
+
var _useState = (0, import_react50.useState)(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
28010
|
+
var _useState3 = (0, import_react50.useState)(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
28573
28011
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
28574
28012
|
index3(function() {
|
|
28575
28013
|
var menuEl = ref.current;
|
|
@@ -28599,7 +28037,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
28599
28037
|
};
|
|
28600
28038
|
var Menu = function Menu2(props) {
|
|
28601
28039
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28602
|
-
return
|
|
28040
|
+
return jsx81("div", _extends({}, getStyleProps(props, "menu", {
|
|
28603
28041
|
menu: true
|
|
28604
28042
|
}), {
|
|
28605
28043
|
ref: innerRef
|
|
@@ -28621,7 +28059,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
28621
28059
|
};
|
|
28622
28060
|
var MenuList = function MenuList2(props) {
|
|
28623
28061
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
28624
|
-
return
|
|
28062
|
+
return jsx81("div", _extends({}, getStyleProps(props, "menuList", {
|
|
28625
28063
|
"menu-list": true,
|
|
28626
28064
|
"menu-list--is-multi": isMulti
|
|
28627
28065
|
}), {
|
|
@@ -28641,7 +28079,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
28641
28079
|
var loadingMessageCSS = noticeCSS;
|
|
28642
28080
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
28643
28081
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
28644
|
-
return
|
|
28082
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28645
28083
|
children,
|
|
28646
28084
|
innerProps
|
|
28647
28085
|
}), "noOptionsMessage", {
|
|
@@ -28651,7 +28089,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
28651
28089
|
};
|
|
28652
28090
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
28653
28091
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
28654
|
-
return
|
|
28092
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28655
28093
|
children,
|
|
28656
28094
|
innerProps
|
|
28657
28095
|
}), "loadingMessage", {
|
|
@@ -28671,16 +28109,16 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
28671
28109
|
};
|
|
28672
28110
|
var MenuPortal = function MenuPortal2(props) {
|
|
28673
28111
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
28674
|
-
var menuPortalRef = (0,
|
|
28675
|
-
var cleanupRef = (0,
|
|
28676
|
-
var _useState5 = (0,
|
|
28677
|
-
var portalPlacementContext = (0,
|
|
28112
|
+
var menuPortalRef = (0, import_react50.useRef)(null);
|
|
28113
|
+
var cleanupRef = (0, import_react50.useRef)(null);
|
|
28114
|
+
var _useState5 = (0, import_react50.useState)(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
28115
|
+
var portalPlacementContext = (0, import_react50.useMemo)(function() {
|
|
28678
28116
|
return {
|
|
28679
28117
|
setPortalPlacement
|
|
28680
28118
|
};
|
|
28681
28119
|
}, []);
|
|
28682
|
-
var _useState7 = (0,
|
|
28683
|
-
var updateComputedPosition = (0,
|
|
28120
|
+
var _useState7 = (0, import_react50.useState)(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
28121
|
+
var updateComputedPosition = (0, import_react50.useCallback)(function() {
|
|
28684
28122
|
if (!controlElement) return;
|
|
28685
28123
|
var rect = getBoundingClientObj(controlElement);
|
|
28686
28124
|
var scrollDistance = menuPosition === "fixed" ? 0 : window.pageYOffset;
|
|
@@ -28695,7 +28133,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28695
28133
|
index3(function() {
|
|
28696
28134
|
updateComputedPosition();
|
|
28697
28135
|
}, [updateComputedPosition]);
|
|
28698
|
-
var runAutoUpdate = (0,
|
|
28136
|
+
var runAutoUpdate = (0, import_react50.useCallback)(function() {
|
|
28699
28137
|
if (typeof cleanupRef.current === "function") {
|
|
28700
28138
|
cleanupRef.current();
|
|
28701
28139
|
cleanupRef.current = null;
|
|
@@ -28709,12 +28147,12 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28709
28147
|
index3(function() {
|
|
28710
28148
|
runAutoUpdate();
|
|
28711
28149
|
}, [runAutoUpdate]);
|
|
28712
|
-
var setMenuPortalElement = (0,
|
|
28150
|
+
var setMenuPortalElement = (0, import_react50.useCallback)(function(menuPortalElement) {
|
|
28713
28151
|
menuPortalRef.current = menuPortalElement;
|
|
28714
28152
|
runAutoUpdate();
|
|
28715
28153
|
}, [runAutoUpdate]);
|
|
28716
28154
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
28717
|
-
var menuWrapper =
|
|
28155
|
+
var menuWrapper = jsx81("div", _extends({
|
|
28718
28156
|
ref: setMenuPortalElement
|
|
28719
28157
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
28720
28158
|
offset: computedPosition.offset,
|
|
@@ -28723,7 +28161,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28723
28161
|
}), "menuPortal", {
|
|
28724
28162
|
"menu-portal": true
|
|
28725
28163
|
}), innerProps), children);
|
|
28726
|
-
return
|
|
28164
|
+
return jsx81(PortalPlacementContext.Provider, {
|
|
28727
28165
|
value: portalPlacementContext
|
|
28728
28166
|
}, appendTo ? /* @__PURE__ */ (0, import_react_dom6.createPortal)(menuWrapper, appendTo) : menuWrapper);
|
|
28729
28167
|
};
|
|
@@ -28739,7 +28177,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
28739
28177
|
};
|
|
28740
28178
|
var SelectContainer = function SelectContainer2(props) {
|
|
28741
28179
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
28742
|
-
return
|
|
28180
|
+
return jsx81("div", _extends({}, getStyleProps(props, "container", {
|
|
28743
28181
|
"--is-disabled": isDisabled,
|
|
28744
28182
|
"--is-rtl": isRtl
|
|
28745
28183
|
}), innerProps), children);
|
|
@@ -28760,7 +28198,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28760
28198
|
};
|
|
28761
28199
|
var ValueContainer = function ValueContainer2(props) {
|
|
28762
28200
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28763
|
-
return
|
|
28201
|
+
return jsx81("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28764
28202
|
"value-container": true,
|
|
28765
28203
|
"value-container--is-multi": isMulti,
|
|
28766
28204
|
"value-container--has-value": hasValue
|
|
@@ -28776,7 +28214,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28776
28214
|
};
|
|
28777
28215
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28778
28216
|
var children = props.children, innerProps = props.innerProps;
|
|
28779
|
-
return
|
|
28217
|
+
return jsx81("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28780
28218
|
indicators: true
|
|
28781
28219
|
}), innerProps), children);
|
|
28782
28220
|
};
|
|
@@ -28797,7 +28235,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28797
28235
|
};
|
|
28798
28236
|
var Svg = function Svg2(_ref3) {
|
|
28799
28237
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28800
|
-
return
|
|
28238
|
+
return jsx81("svg", _extends({
|
|
28801
28239
|
height: size4,
|
|
28802
28240
|
width: size4,
|
|
28803
28241
|
viewBox: "0 0 20 20",
|
|
@@ -28807,16 +28245,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28807
28245
|
}, props));
|
|
28808
28246
|
};
|
|
28809
28247
|
var CrossIcon = function CrossIcon2(props) {
|
|
28810
|
-
return
|
|
28248
|
+
return jsx81(Svg, _extends({
|
|
28811
28249
|
size: 20
|
|
28812
|
-
}, props),
|
|
28250
|
+
}, props), jsx81("path", {
|
|
28813
28251
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
28814
28252
|
}));
|
|
28815
28253
|
};
|
|
28816
28254
|
var DownChevron = function DownChevron2(props) {
|
|
28817
|
-
return
|
|
28255
|
+
return jsx81(Svg, _extends({
|
|
28818
28256
|
size: 20
|
|
28819
|
-
}, props),
|
|
28257
|
+
}, props), jsx81("path", {
|
|
28820
28258
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
28821
28259
|
}));
|
|
28822
28260
|
};
|
|
@@ -28837,18 +28275,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28837
28275
|
var dropdownIndicatorCSS = baseCSS;
|
|
28838
28276
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28839
28277
|
var children = props.children, innerProps = props.innerProps;
|
|
28840
|
-
return
|
|
28278
|
+
return jsx81("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28841
28279
|
indicator: true,
|
|
28842
28280
|
"dropdown-indicator": true
|
|
28843
|
-
}), innerProps), children ||
|
|
28281
|
+
}), innerProps), children || jsx81(DownChevron, null));
|
|
28844
28282
|
};
|
|
28845
28283
|
var clearIndicatorCSS = baseCSS;
|
|
28846
28284
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28847
28285
|
var children = props.children, innerProps = props.innerProps;
|
|
28848
|
-
return
|
|
28286
|
+
return jsx81("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28849
28287
|
indicator: true,
|
|
28850
28288
|
"clear-indicator": true
|
|
28851
|
-
}), innerProps), children ||
|
|
28289
|
+
}), innerProps), children || jsx81(CrossIcon, null));
|
|
28852
28290
|
};
|
|
28853
28291
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28854
28292
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28864,7 +28302,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28864
28302
|
};
|
|
28865
28303
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28866
28304
|
var innerProps = props.innerProps;
|
|
28867
|
-
return
|
|
28305
|
+
return jsx81("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28868
28306
|
"indicator-separator": true
|
|
28869
28307
|
})));
|
|
28870
28308
|
};
|
|
@@ -28888,7 +28326,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28888
28326
|
};
|
|
28889
28327
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28890
28328
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28891
|
-
return
|
|
28329
|
+
return jsx81("span", {
|
|
28892
28330
|
css: /* @__PURE__ */ css({
|
|
28893
28331
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28894
28332
|
backgroundColor: "currentColor",
|
|
@@ -28903,20 +28341,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28903
28341
|
};
|
|
28904
28342
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28905
28343
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
28906
|
-
return
|
|
28344
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28907
28345
|
innerProps,
|
|
28908
28346
|
isRtl,
|
|
28909
28347
|
size: size4
|
|
28910
28348
|
}), "loadingIndicator", {
|
|
28911
28349
|
indicator: true,
|
|
28912
28350
|
"loading-indicator": true
|
|
28913
|
-
}), innerProps),
|
|
28351
|
+
}), innerProps), jsx81(LoadingDot, {
|
|
28914
28352
|
delay: 0,
|
|
28915
28353
|
offset: isRtl
|
|
28916
|
-
}),
|
|
28354
|
+
}), jsx81(LoadingDot, {
|
|
28917
28355
|
delay: 160,
|
|
28918
28356
|
offset: true
|
|
28919
|
-
}),
|
|
28357
|
+
}), jsx81(LoadingDot, {
|
|
28920
28358
|
delay: 320,
|
|
28921
28359
|
offset: !isRtl
|
|
28922
28360
|
}));
|
|
@@ -28948,7 +28386,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28948
28386
|
};
|
|
28949
28387
|
var Control = function Control2(props) {
|
|
28950
28388
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28951
|
-
return
|
|
28389
|
+
return jsx81("div", _extends({
|
|
28952
28390
|
ref: innerRef
|
|
28953
28391
|
}, getStyleProps(props, "control", {
|
|
28954
28392
|
control: true,
|
|
@@ -28970,15 +28408,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28970
28408
|
};
|
|
28971
28409
|
var Group = function Group2(props) {
|
|
28972
28410
|
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames = props.getClassNames, Heading = props.Heading, headingProps = props.headingProps, innerProps = props.innerProps, label = props.label, theme = props.theme, selectProps = props.selectProps;
|
|
28973
|
-
return
|
|
28411
|
+
return jsx81("div", _extends({}, getStyleProps(props, "group", {
|
|
28974
28412
|
group: true
|
|
28975
|
-
}), innerProps),
|
|
28413
|
+
}), innerProps), jsx81(Heading, _extends({}, headingProps, {
|
|
28976
28414
|
selectProps,
|
|
28977
28415
|
theme,
|
|
28978
28416
|
getStyles,
|
|
28979
28417
|
getClassNames,
|
|
28980
28418
|
cx
|
|
28981
|
-
}), label),
|
|
28419
|
+
}), label), jsx81("div", null, children));
|
|
28982
28420
|
};
|
|
28983
28421
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28984
28422
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -29000,7 +28438,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
29000
28438
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
29001
28439
|
_cleanCommonProps.data;
|
|
29002
28440
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
29003
|
-
return
|
|
28441
|
+
return jsx81("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
29004
28442
|
"group-heading": true
|
|
29005
28443
|
}), innerProps));
|
|
29006
28444
|
};
|
|
@@ -29052,11 +28490,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
29052
28490
|
var Input = function Input2(props) {
|
|
29053
28491
|
var cx = props.cx, value = props.value;
|
|
29054
28492
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
29055
|
-
return
|
|
28493
|
+
return jsx81("div", _extends({}, getStyleProps(props, "input", {
|
|
29056
28494
|
"input-container": true
|
|
29057
28495
|
}), {
|
|
29058
28496
|
"data-value": value || ""
|
|
29059
|
-
}),
|
|
28497
|
+
}), jsx81("input", _extends({
|
|
29060
28498
|
className: cx({
|
|
29061
28499
|
input: true
|
|
29062
28500
|
}, inputClassName),
|
|
@@ -29110,35 +28548,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
29110
28548
|
};
|
|
29111
28549
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
29112
28550
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
29113
|
-
return
|
|
28551
|
+
return jsx81("div", innerProps, children);
|
|
29114
28552
|
};
|
|
29115
28553
|
var MultiValueContainer = MultiValueGeneric;
|
|
29116
28554
|
var MultiValueLabel = MultiValueGeneric;
|
|
29117
28555
|
function MultiValueRemove(_ref5) {
|
|
29118
28556
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
29119
|
-
return
|
|
28557
|
+
return jsx81("div", _extends({
|
|
29120
28558
|
role: "button"
|
|
29121
|
-
}, innerProps), children ||
|
|
28559
|
+
}, innerProps), children || jsx81(CrossIcon, {
|
|
29122
28560
|
size: 14
|
|
29123
28561
|
}));
|
|
29124
28562
|
}
|
|
29125
28563
|
var MultiValue = function MultiValue2(props) {
|
|
29126
28564
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
29127
28565
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
29128
|
-
return
|
|
28566
|
+
return jsx81(Container, {
|
|
29129
28567
|
data,
|
|
29130
28568
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
29131
28569
|
"multi-value": true,
|
|
29132
28570
|
"multi-value--is-disabled": isDisabled
|
|
29133
28571
|
})), innerProps),
|
|
29134
28572
|
selectProps
|
|
29135
|
-
},
|
|
28573
|
+
}, jsx81(Label, {
|
|
29136
28574
|
data,
|
|
29137
28575
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
29138
28576
|
"multi-value__label": true
|
|
29139
28577
|
})),
|
|
29140
28578
|
selectProps
|
|
29141
|
-
}, children),
|
|
28579
|
+
}, children), jsx81(Remove, {
|
|
29142
28580
|
data,
|
|
29143
28581
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
29144
28582
|
"multi-value__remove": true
|
|
@@ -29171,7 +28609,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
29171
28609
|
};
|
|
29172
28610
|
var Option = function Option2(props) {
|
|
29173
28611
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
29174
|
-
return
|
|
28612
|
+
return jsx81("div", _extends({}, getStyleProps(props, "option", {
|
|
29175
28613
|
option: true,
|
|
29176
28614
|
"option--is-disabled": isDisabled,
|
|
29177
28615
|
"option--is-focused": isFocused,
|
|
@@ -29195,7 +28633,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
29195
28633
|
};
|
|
29196
28634
|
var Placeholder = function Placeholder2(props) {
|
|
29197
28635
|
var children = props.children, innerProps = props.innerProps;
|
|
29198
|
-
return
|
|
28636
|
+
return jsx81("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
29199
28637
|
placeholder: true
|
|
29200
28638
|
}), innerProps), children);
|
|
29201
28639
|
};
|
|
@@ -29217,7 +28655,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
29217
28655
|
};
|
|
29218
28656
|
var SingleValue = function SingleValue2(props) {
|
|
29219
28657
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
29220
|
-
return
|
|
28658
|
+
return jsx81("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
29221
28659
|
"single-value": true,
|
|
29222
28660
|
"single-value--is-disabled": isDisabled
|
|
29223
28661
|
}), innerProps), children);
|
|
@@ -29319,7 +28757,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
29319
28757
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
29320
28758
|
};
|
|
29321
28759
|
var A11yText = function A11yText2(props) {
|
|
29322
|
-
return
|
|
28760
|
+
return jsx81("span", _extends({
|
|
29323
28761
|
css: _ref
|
|
29324
28762
|
}, props));
|
|
29325
28763
|
};
|
|
@@ -29380,10 +28818,10 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29380
28818
|
var ariaLiveMessages = selectProps.ariaLiveMessages, getOptionLabel4 = selectProps.getOptionLabel, inputValue = selectProps.inputValue, isMulti = selectProps.isMulti, isOptionDisabled3 = selectProps.isOptionDisabled, isSearchable = selectProps.isSearchable, menuIsOpen = selectProps.menuIsOpen, options2 = selectProps.options, screenReaderStatus2 = selectProps.screenReaderStatus, tabSelectsValue = selectProps.tabSelectsValue, isLoading = selectProps.isLoading;
|
|
29381
28819
|
var ariaLabel = selectProps["aria-label"];
|
|
29382
28820
|
var ariaLive = selectProps["aria-live"];
|
|
29383
|
-
var messages = (0,
|
|
28821
|
+
var messages = (0, import_react51.useMemo)(function() {
|
|
29384
28822
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
29385
28823
|
}, [ariaLiveMessages]);
|
|
29386
|
-
var ariaSelected = (0,
|
|
28824
|
+
var ariaSelected = (0, import_react51.useMemo)(function() {
|
|
29387
28825
|
var message2 = "";
|
|
29388
28826
|
if (ariaSelection && messages.onChange) {
|
|
29389
28827
|
var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
|
|
@@ -29405,7 +28843,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29405
28843
|
}
|
|
29406
28844
|
return message2;
|
|
29407
28845
|
}, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
|
|
29408
|
-
var ariaFocused = (0,
|
|
28846
|
+
var ariaFocused = (0, import_react51.useMemo)(function() {
|
|
29409
28847
|
var focusMsg = "";
|
|
29410
28848
|
var focused = focusedOption || focusedValue;
|
|
29411
28849
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -29424,7 +28862,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29424
28862
|
}
|
|
29425
28863
|
return focusMsg;
|
|
29426
28864
|
}, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
|
|
29427
|
-
var ariaResults = (0,
|
|
28865
|
+
var ariaResults = (0, import_react51.useMemo)(function() {
|
|
29428
28866
|
var resultsMsg = "";
|
|
29429
28867
|
if (menuIsOpen && options2.length && !isLoading && messages.onFilter) {
|
|
29430
28868
|
var resultsMessage = screenReaderStatus2({
|
|
@@ -29438,7 +28876,7 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29438
28876
|
return resultsMsg;
|
|
29439
28877
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options2, screenReaderStatus2, isLoading]);
|
|
29440
28878
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
|
|
29441
|
-
var ariaGuidance = (0,
|
|
28879
|
+
var ariaGuidance = (0, import_react51.useMemo)(function() {
|
|
29442
28880
|
var guidanceMsg = "";
|
|
29443
28881
|
if (messages.guidance) {
|
|
29444
28882
|
var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
|
|
@@ -29454,18 +28892,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
29454
28892
|
}
|
|
29455
28893
|
return guidanceMsg;
|
|
29456
28894
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
29457
|
-
var ScreenReaderText =
|
|
28895
|
+
var ScreenReaderText = jsx81(import_react51.Fragment, null, jsx81("span", {
|
|
29458
28896
|
id: "aria-selection"
|
|
29459
|
-
}, ariaSelected),
|
|
28897
|
+
}, ariaSelected), jsx81("span", {
|
|
29460
28898
|
id: "aria-focused"
|
|
29461
|
-
}, ariaFocused),
|
|
28899
|
+
}, ariaFocused), jsx81("span", {
|
|
29462
28900
|
id: "aria-results"
|
|
29463
|
-
}, ariaResults),
|
|
28901
|
+
}, ariaResults), jsx81("span", {
|
|
29464
28902
|
id: "aria-guidance"
|
|
29465
28903
|
}, ariaGuidance));
|
|
29466
|
-
return
|
|
28904
|
+
return jsx81(import_react51.Fragment, null, jsx81(A11yText$1, {
|
|
29467
28905
|
id
|
|
29468
|
-
}, isInitialFocus && ScreenReaderText),
|
|
28906
|
+
}, isInitialFocus && ScreenReaderText), jsx81(A11yText$1, {
|
|
29469
28907
|
"aria-live": ariaLive,
|
|
29470
28908
|
"aria-atomic": "false",
|
|
29471
28909
|
"aria-relevant": "additions text",
|
|
@@ -29778,7 +29216,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29778
29216
|
function DummyInput(_ref3) {
|
|
29779
29217
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29780
29218
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29781
|
-
return
|
|
29219
|
+
return jsx81("input", _extends({
|
|
29782
29220
|
ref: innerRef
|
|
29783
29221
|
}, filteredProps, {
|
|
29784
29222
|
css: /* @__PURE__ */ css({
|
|
@@ -29810,11 +29248,11 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
29810
29248
|
};
|
|
29811
29249
|
function useScrollCapture(_ref3) {
|
|
29812
29250
|
var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
|
|
29813
|
-
var isBottom = (0,
|
|
29814
|
-
var isTop = (0,
|
|
29815
|
-
var touchStart = (0,
|
|
29816
|
-
var scrollTarget = (0,
|
|
29817
|
-
var handleEventDelta = (0,
|
|
29251
|
+
var isBottom = (0, import_react51.useRef)(false);
|
|
29252
|
+
var isTop = (0, import_react51.useRef)(false);
|
|
29253
|
+
var touchStart = (0, import_react51.useRef)(0);
|
|
29254
|
+
var scrollTarget = (0, import_react51.useRef)(null);
|
|
29255
|
+
var handleEventDelta = (0, import_react51.useCallback)(function(event, delta) {
|
|
29818
29256
|
if (scrollTarget.current === null) return;
|
|
29819
29257
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
29820
29258
|
var target = scrollTarget.current;
|
|
@@ -29848,17 +29286,17 @@ function useScrollCapture(_ref3) {
|
|
|
29848
29286
|
cancelScroll(event);
|
|
29849
29287
|
}
|
|
29850
29288
|
}, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]);
|
|
29851
|
-
var onWheel = (0,
|
|
29289
|
+
var onWheel = (0, import_react51.useCallback)(function(event) {
|
|
29852
29290
|
handleEventDelta(event, event.deltaY);
|
|
29853
29291
|
}, [handleEventDelta]);
|
|
29854
|
-
var onTouchStart = (0,
|
|
29292
|
+
var onTouchStart = (0, import_react51.useCallback)(function(event) {
|
|
29855
29293
|
touchStart.current = event.changedTouches[0].clientY;
|
|
29856
29294
|
}, []);
|
|
29857
|
-
var onTouchMove = (0,
|
|
29295
|
+
var onTouchMove = (0, import_react51.useCallback)(function(event) {
|
|
29858
29296
|
var deltaY = touchStart.current - event.changedTouches[0].clientY;
|
|
29859
29297
|
handleEventDelta(event, deltaY);
|
|
29860
29298
|
}, [handleEventDelta]);
|
|
29861
|
-
var startListening = (0,
|
|
29299
|
+
var startListening = (0, import_react51.useCallback)(function(el) {
|
|
29862
29300
|
if (!el) return;
|
|
29863
29301
|
var notPassive = supportsPassiveEvents ? {
|
|
29864
29302
|
passive: false
|
|
@@ -29867,13 +29305,13 @@ function useScrollCapture(_ref3) {
|
|
|
29867
29305
|
el.addEventListener("touchstart", onTouchStart, notPassive);
|
|
29868
29306
|
el.addEventListener("touchmove", onTouchMove, notPassive);
|
|
29869
29307
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29870
|
-
var stopListening = (0,
|
|
29308
|
+
var stopListening = (0, import_react51.useCallback)(function(el) {
|
|
29871
29309
|
if (!el) return;
|
|
29872
29310
|
el.removeEventListener("wheel", onWheel, false);
|
|
29873
29311
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
29874
29312
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
29875
29313
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29876
|
-
(0,
|
|
29314
|
+
(0, import_react51.useEffect)(function() {
|
|
29877
29315
|
if (!isEnabled) return;
|
|
29878
29316
|
var element = scrollTarget.current;
|
|
29879
29317
|
startListening(element);
|
|
@@ -29920,9 +29358,9 @@ var listenerOptions = {
|
|
|
29920
29358
|
};
|
|
29921
29359
|
function useScrollLock(_ref3) {
|
|
29922
29360
|
var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
29923
|
-
var originalStyles = (0,
|
|
29924
|
-
var scrollTarget = (0,
|
|
29925
|
-
var addScrollLock = (0,
|
|
29361
|
+
var originalStyles = (0, import_react51.useRef)({});
|
|
29362
|
+
var scrollTarget = (0, import_react51.useRef)(null);
|
|
29363
|
+
var addScrollLock = (0, import_react51.useCallback)(function(touchScrollTarget) {
|
|
29926
29364
|
if (!canUseDOM) return;
|
|
29927
29365
|
var target = document.body;
|
|
29928
29366
|
var targetStyle = target && target.style;
|
|
@@ -29955,7 +29393,7 @@ function useScrollLock(_ref3) {
|
|
|
29955
29393
|
}
|
|
29956
29394
|
activeScrollLocks += 1;
|
|
29957
29395
|
}, [accountForScrollbars]);
|
|
29958
|
-
var removeScrollLock = (0,
|
|
29396
|
+
var removeScrollLock = (0, import_react51.useCallback)(function(touchScrollTarget) {
|
|
29959
29397
|
if (!canUseDOM) return;
|
|
29960
29398
|
var target = document.body;
|
|
29961
29399
|
var targetStyle = target && target.style;
|
|
@@ -29976,7 +29414,7 @@ function useScrollLock(_ref3) {
|
|
|
29976
29414
|
}
|
|
29977
29415
|
}
|
|
29978
29416
|
}, [accountForScrollbars]);
|
|
29979
|
-
(0,
|
|
29417
|
+
(0, import_react51.useEffect)(function() {
|
|
29980
29418
|
if (!isEnabled) return;
|
|
29981
29419
|
var element = scrollTarget.current;
|
|
29982
29420
|
addScrollLock(element);
|
|
@@ -30020,7 +29458,7 @@ function ScrollManager(_ref3) {
|
|
|
30020
29458
|
setScrollCaptureTarget(element);
|
|
30021
29459
|
setScrollLockTarget(element);
|
|
30022
29460
|
};
|
|
30023
|
-
return
|
|
29461
|
+
return jsx81(import_react51.Fragment, null, lockEnabled && jsx81("div", {
|
|
30024
29462
|
onClick: blurSelectInput,
|
|
30025
29463
|
css: _ref2$1
|
|
30026
29464
|
}), children(targetRef));
|
|
@@ -30039,7 +29477,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
30039
29477
|
};
|
|
30040
29478
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
30041
29479
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
30042
|
-
return
|
|
29480
|
+
return jsx81("input", {
|
|
30043
29481
|
required: true,
|
|
30044
29482
|
name: name2,
|
|
30045
29483
|
tabIndex: -1,
|
|
@@ -31603,7 +31041,7 @@ var Select = /* @__PURE__ */ function(_Component) {
|
|
|
31603
31041
|
}
|
|
31604
31042
|
}]);
|
|
31605
31043
|
return Select2;
|
|
31606
|
-
}(
|
|
31044
|
+
}(import_react51.Component);
|
|
31607
31045
|
Select.defaultProps = defaultProps;
|
|
31608
31046
|
|
|
31609
31047
|
// node_modules/react-select/dist/react-select.esm.js
|
|
@@ -31619,7 +31057,7 @@ var import_typeof5 = __toESM(require_typeof());
|
|
|
31619
31057
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
31620
31058
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
31621
31059
|
var import_react_dom7 = require("react-dom");
|
|
31622
|
-
var StateManagedSelect = /* @__PURE__ */ (0,
|
|
31060
|
+
var StateManagedSelect = /* @__PURE__ */ (0, import_react53.forwardRef)(function(props, ref) {
|
|
31623
31061
|
var baseSelectProps = useStateManager(props);
|
|
31624
31062
|
return /* @__PURE__ */ React14.createElement(Select, _extends({
|
|
31625
31063
|
ref
|
|
@@ -31629,7 +31067,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
31629
31067
|
|
|
31630
31068
|
// src/widgets/basic/date-field/date.tsx
|
|
31631
31069
|
var import_moment2 = __toESM(require_moment());
|
|
31632
|
-
var
|
|
31070
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
31633
31071
|
var DateField = (props) => {
|
|
31634
31072
|
const {
|
|
31635
31073
|
name: name2,
|
|
@@ -31656,9 +31094,9 @@ var DateField = (props) => {
|
|
|
31656
31094
|
context
|
|
31657
31095
|
} = props;
|
|
31658
31096
|
const { t: t3 } = useI18n();
|
|
31659
|
-
const InputDateCustom = (0,
|
|
31660
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0,
|
|
31661
|
-
/* @__PURE__ */ (0,
|
|
31097
|
+
const InputDateCustom = (0, import_react54.forwardRef)(
|
|
31098
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("label", { className: `flex ${className}`, children: [
|
|
31099
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31662
31100
|
"input",
|
|
31663
31101
|
{
|
|
31664
31102
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -31672,13 +31110,13 @@ var DateField = (props) => {
|
|
|
31672
31110
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
31673
31111
|
}
|
|
31674
31112
|
),
|
|
31675
|
-
isForm2 && /* @__PURE__ */ (0,
|
|
31113
|
+
isForm2 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(CalendarIcon, {})
|
|
31676
31114
|
] })
|
|
31677
31115
|
);
|
|
31678
31116
|
if (!isForm && !isEditTable) {
|
|
31679
|
-
return /* @__PURE__ */ (0,
|
|
31117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
31680
31118
|
} else {
|
|
31681
|
-
return /* @__PURE__ */ (0,
|
|
31119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31682
31120
|
Controller,
|
|
31683
31121
|
{
|
|
31684
31122
|
name: name2 || "",
|
|
@@ -31694,14 +31132,14 @@ var DateField = (props) => {
|
|
|
31694
31132
|
},
|
|
31695
31133
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31696
31134
|
const { setError, clearErrors } = methods;
|
|
31697
|
-
(0,
|
|
31135
|
+
(0, import_react54.useEffect)(() => {
|
|
31698
31136
|
if (value) {
|
|
31699
31137
|
clearErrors(name2);
|
|
31700
31138
|
}
|
|
31701
31139
|
}, [value, clearErrors, name2]);
|
|
31702
31140
|
const selectedDate = !methods ? value && (0, import_moment2.default)(value, formatDateParse).isValid() ? (0, import_moment2.default)(value, formatDateParse).add(7, "hours").toDate() : null : field?.value && (0, import_moment2.default)(field.value, formatDateParse).isValid() ? (0, import_moment2.default)(field.value, formatDateParse).add(7, "hours").toDate() : null;
|
|
31703
|
-
return /* @__PURE__ */ (0,
|
|
31704
|
-
/* @__PURE__ */ (0,
|
|
31141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
31142
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31705
31143
|
DatePicker,
|
|
31706
31144
|
{
|
|
31707
31145
|
selected: selectedDate,
|
|
@@ -31749,7 +31187,7 @@ var DateField = (props) => {
|
|
|
31749
31187
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
31750
31188
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
31751
31189
|
showTimeInput: showTime,
|
|
31752
|
-
customInput: /* @__PURE__ */ (0,
|
|
31190
|
+
customInput: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31753
31191
|
InputDateCustom,
|
|
31754
31192
|
{
|
|
31755
31193
|
isForm,
|
|
@@ -31767,7 +31205,7 @@ var DateField = (props) => {
|
|
|
31767
31205
|
increaseMonth,
|
|
31768
31206
|
prevMonthButtonDisabled,
|
|
31769
31207
|
nextMonthButtonDisabled
|
|
31770
|
-
}) => /* @__PURE__ */ (0,
|
|
31208
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
31771
31209
|
"div",
|
|
31772
31210
|
{
|
|
31773
31211
|
style: {
|
|
@@ -31776,7 +31214,7 @@ var DateField = (props) => {
|
|
|
31776
31214
|
justifyContent: "center"
|
|
31777
31215
|
},
|
|
31778
31216
|
children: [
|
|
31779
|
-
/* @__PURE__ */ (0,
|
|
31217
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31780
31218
|
"button",
|
|
31781
31219
|
{
|
|
31782
31220
|
onClick: decreaseMonth,
|
|
@@ -31784,7 +31222,7 @@ var DateField = (props) => {
|
|
|
31784
31222
|
children: "<"
|
|
31785
31223
|
}
|
|
31786
31224
|
),
|
|
31787
|
-
/* @__PURE__ */ (0,
|
|
31225
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31788
31226
|
StateManagedSelect$1,
|
|
31789
31227
|
{
|
|
31790
31228
|
classNames: {
|
|
@@ -31810,7 +31248,7 @@ var DateField = (props) => {
|
|
|
31810
31248
|
autoFocus: true
|
|
31811
31249
|
}
|
|
31812
31250
|
),
|
|
31813
|
-
/* @__PURE__ */ (0,
|
|
31251
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31814
31252
|
StateManagedSelect$1,
|
|
31815
31253
|
{
|
|
31816
31254
|
classNames: {
|
|
@@ -31838,7 +31276,7 @@ var DateField = (props) => {
|
|
|
31838
31276
|
}))
|
|
31839
31277
|
}
|
|
31840
31278
|
),
|
|
31841
|
-
/* @__PURE__ */ (0,
|
|
31279
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
31842
31280
|
"button",
|
|
31843
31281
|
{
|
|
31844
31282
|
onClick: increaseMonth,
|
|
@@ -31851,7 +31289,7 @@ var DateField = (props) => {
|
|
|
31851
31289
|
)
|
|
31852
31290
|
}
|
|
31853
31291
|
),
|
|
31854
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
31292
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31855
31293
|
] });
|
|
31856
31294
|
}
|
|
31857
31295
|
}
|
|
@@ -31860,26 +31298,26 @@ var DateField = (props) => {
|
|
|
31860
31298
|
};
|
|
31861
31299
|
|
|
31862
31300
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31863
|
-
var
|
|
31301
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
31864
31302
|
var DownLoadBinaryField = (props) => {
|
|
31865
31303
|
const { handleFileDownload } = props;
|
|
31866
31304
|
const { t: t3 } = useI18n();
|
|
31867
|
-
return /* @__PURE__ */ (0,
|
|
31305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
31868
31306
|
"button",
|
|
31869
31307
|
{
|
|
31870
31308
|
type: "button",
|
|
31871
31309
|
onClick: handleFileDownload,
|
|
31872
31310
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31873
31311
|
children: [
|
|
31874
|
-
/* @__PURE__ */ (0,
|
|
31875
|
-
/* @__PURE__ */ (0,
|
|
31312
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(DownloadIcon, {}),
|
|
31313
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31876
31314
|
]
|
|
31877
31315
|
}
|
|
31878
31316
|
);
|
|
31879
31317
|
};
|
|
31880
31318
|
|
|
31881
31319
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31882
|
-
var
|
|
31320
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
31883
31321
|
var DownloadFileField = (props) => {
|
|
31884
31322
|
const {
|
|
31885
31323
|
readonly,
|
|
@@ -31891,15 +31329,15 @@ var DownloadFileField = (props) => {
|
|
|
31891
31329
|
handleFileChange,
|
|
31892
31330
|
handleFileDownload
|
|
31893
31331
|
} = props;
|
|
31894
|
-
return /* @__PURE__ */ (0,
|
|
31895
|
-
/* @__PURE__ */ (0,
|
|
31332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "", children: [
|
|
31333
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
31896
31334
|
"label",
|
|
31897
31335
|
{
|
|
31898
31336
|
htmlFor: inputId,
|
|
31899
31337
|
className: "flex cursor-pointer items-center justify-center rounded-lg border-2 border-gray-300 bg-white px-3 py-2 transition-colors duration-300 hover:bg-gray-200",
|
|
31900
31338
|
children: [
|
|
31901
|
-
file ? /* @__PURE__ */ (0,
|
|
31902
|
-
/* @__PURE__ */ (0,
|
|
31339
|
+
file ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
31340
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
31903
31341
|
"input",
|
|
31904
31342
|
{
|
|
31905
31343
|
id: inputId,
|
|
@@ -31913,7 +31351,7 @@ var DownloadFileField = (props) => {
|
|
|
31913
31351
|
]
|
|
31914
31352
|
}
|
|
31915
31353
|
),
|
|
31916
|
-
file && /* @__PURE__ */ (0,
|
|
31354
|
+
file && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
31917
31355
|
"button",
|
|
31918
31356
|
{
|
|
31919
31357
|
onClick: handleFileDownload,
|
|
@@ -31926,8 +31364,8 @@ var DownloadFileField = (props) => {
|
|
|
31926
31364
|
};
|
|
31927
31365
|
|
|
31928
31366
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31929
|
-
var
|
|
31930
|
-
var
|
|
31367
|
+
var import_react55 = require("react");
|
|
31368
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
31931
31369
|
var DropdownField = (props) => {
|
|
31932
31370
|
const {
|
|
31933
31371
|
options: options2,
|
|
@@ -31939,32 +31377,32 @@ var DropdownField = (props) => {
|
|
|
31939
31377
|
dropdownClassName = "",
|
|
31940
31378
|
useClickOutside: useClickOutside2
|
|
31941
31379
|
} = props;
|
|
31942
|
-
const [open, setOpen] = (0,
|
|
31380
|
+
const [open, setOpen] = (0, import_react55.useState)(false);
|
|
31943
31381
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31944
|
-
return /* @__PURE__ */ (0,
|
|
31382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
31945
31383
|
"div",
|
|
31946
31384
|
{
|
|
31947
31385
|
ref: dropdownRef,
|
|
31948
31386
|
className: `relative ${className}`,
|
|
31949
31387
|
onClick: () => setOpen(!open),
|
|
31950
31388
|
children: [
|
|
31951
|
-
/* @__PURE__ */ (0,
|
|
31389
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
31952
31390
|
"div",
|
|
31953
31391
|
{
|
|
31954
31392
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31955
31393
|
children: [
|
|
31956
31394
|
selectedValue?.icon,
|
|
31957
|
-
/* @__PURE__ */ (0,
|
|
31958
|
-
/* @__PURE__ */ (0,
|
|
31395
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { children: selectedValue?.label }),
|
|
31396
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31959
31397
|
]
|
|
31960
31398
|
}
|
|
31961
31399
|
),
|
|
31962
|
-
open && /* @__PURE__ */ (0,
|
|
31400
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
31963
31401
|
"div",
|
|
31964
31402
|
{
|
|
31965
31403
|
className: `absolute left-0 top-[calc(100%_+_4px)] z-50 bg-white overflow-hidden rounded-lg border border-[#dbe0e6] shadow-md text-sub-600 h-auto !min-h-fit text-xs !leading-5 !font-bold ${dropdownClassName}`,
|
|
31966
31404
|
onClick: (e3) => e3.stopPropagation(),
|
|
31967
|
-
children: options2.map((option, index4) => /* @__PURE__ */ (0,
|
|
31405
|
+
children: options2.map((option, index4) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
31968
31406
|
"div",
|
|
31969
31407
|
{
|
|
31970
31408
|
onClick: () => {
|
|
@@ -31984,7 +31422,7 @@ var DropdownField = (props) => {
|
|
|
31984
31422
|
};
|
|
31985
31423
|
|
|
31986
31424
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31987
|
-
var
|
|
31425
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
31988
31426
|
var FeeField = (props) => {
|
|
31989
31427
|
const { value, formValues } = props;
|
|
31990
31428
|
const { t: t3 } = useI18n();
|
|
@@ -31995,27 +31433,27 @@ var FeeField = (props) => {
|
|
|
31995
31433
|
)
|
|
31996
31434
|
) + " VND";
|
|
31997
31435
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31998
|
-
return /* @__PURE__ */ (0,
|
|
31436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
31999
31437
|
value?.subtotals?.map((sub) => {
|
|
32000
31438
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
32001
|
-
return /* @__PURE__ */ (0,
|
|
32002
|
-
/* @__PURE__ */ (0,
|
|
32003
|
-
/* @__PURE__ */ (0,
|
|
31439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
31440
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31441
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
32004
31442
|
sub?.name,
|
|
32005
31443
|
":"
|
|
32006
31444
|
] }),
|
|
32007
|
-
/* @__PURE__ */ (0,
|
|
31445
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
32008
31446
|
] }),
|
|
32009
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */ (0,
|
|
31447
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
32010
31448
|
"div",
|
|
32011
31449
|
{
|
|
32012
31450
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
32013
31451
|
children: [
|
|
32014
|
-
/* @__PURE__ */ (0,
|
|
31452
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
32015
31453
|
group?.group_name,
|
|
32016
31454
|
":"
|
|
32017
31455
|
] }),
|
|
32018
|
-
/* @__PURE__ */ (0,
|
|
31456
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
32019
31457
|
]
|
|
32020
31458
|
},
|
|
32021
31459
|
`tax_groups_${group?.id}`
|
|
@@ -32023,33 +31461,33 @@ var FeeField = (props) => {
|
|
|
32023
31461
|
] });
|
|
32024
31462
|
}
|
|
32025
31463
|
}),
|
|
32026
|
-
/* @__PURE__ */ (0,
|
|
32027
|
-
/* @__PURE__ */ (0,
|
|
31464
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5", children: [
|
|
31465
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
32028
31466
|
t3("total"),
|
|
32029
31467
|
":"
|
|
32030
31468
|
] }),
|
|
32031
|
-
/* @__PURE__ */ (0,
|
|
31469
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
32032
31470
|
] }),
|
|
32033
|
-
/* @__PURE__ */ (0,
|
|
32034
|
-
/* @__PURE__ */ (0,
|
|
31471
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 pt-2 lg:mt-5 lg:pt-5 border-t border-[#c4c4c4ee]", children: [
|
|
31472
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
32035
31473
|
t3("paid_amount"),
|
|
32036
31474
|
":"
|
|
32037
31475
|
] }),
|
|
32038
|
-
/* @__PURE__ */ (0,
|
|
31476
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
32039
31477
|
] }),
|
|
32040
|
-
/* @__PURE__ */ (0,
|
|
32041
|
-
/* @__PURE__ */ (0,
|
|
31478
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2 lg:mt-3", children: [
|
|
31479
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
32042
31480
|
t3("remanining_amount"),
|
|
32043
31481
|
":"
|
|
32044
31482
|
] }),
|
|
32045
|
-
/* @__PURE__ */ (0,
|
|
31483
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
32046
31484
|
] })
|
|
32047
31485
|
] });
|
|
32048
31486
|
};
|
|
32049
31487
|
|
|
32050
31488
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
32051
|
-
var
|
|
32052
|
-
var
|
|
31489
|
+
var import_react56 = require("react");
|
|
31490
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
32053
31491
|
var RenderFile = ({
|
|
32054
31492
|
file,
|
|
32055
31493
|
onDelete,
|
|
@@ -32059,16 +31497,16 @@ var RenderFile = ({
|
|
|
32059
31497
|
readAs: "all"
|
|
32060
31498
|
});
|
|
32061
31499
|
const fileTypeIcon = {
|
|
32062
|
-
"application/pdf": /* @__PURE__ */ (0,
|
|
32063
|
-
"application/zip": /* @__PURE__ */ (0,
|
|
32064
|
-
"application/x-zip-compressed": /* @__PURE__ */ (0,
|
|
32065
|
-
"application/vnd.ms-excel": /* @__PURE__ */ (0,
|
|
32066
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0,
|
|
31500
|
+
"application/pdf": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(PdfIcon, {}),
|
|
31501
|
+
"application/zip": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ZipIcon, {}),
|
|
31502
|
+
"application/x-zip-compressed": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ZipIcon, {}),
|
|
31503
|
+
"application/vnd.ms-excel": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ExcelIcon, {}),
|
|
31504
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ExcelIcon, {})
|
|
32067
31505
|
};
|
|
32068
|
-
return /* @__PURE__ */ (0,
|
|
32069
|
-
/* @__PURE__ */ (0,
|
|
32070
|
-
/* @__PURE__ */ (0,
|
|
32071
|
-
/* @__PURE__ */ (0,
|
|
31506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31507
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31508
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { children: [
|
|
31509
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
32072
31510
|
"div",
|
|
32073
31511
|
{
|
|
32074
31512
|
style: {
|
|
@@ -32078,20 +31516,20 @@ var RenderFile = ({
|
|
|
32078
31516
|
children: file?.name || file?.display_name || info?.name
|
|
32079
31517
|
}
|
|
32080
31518
|
),
|
|
32081
|
-
/* @__PURE__ */ (0,
|
|
31519
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
32082
31520
|
] }),
|
|
32083
|
-
/* @__PURE__ */ (0,
|
|
32084
|
-
/* @__PURE__ */ (0,
|
|
31521
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center rounded-[8px] p-[8px] gap-2 bg-white shadow-[0_2px_4px_0_rgba(27,28,29,0.04)]", children: [
|
|
31522
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
32085
31523
|
"span",
|
|
32086
31524
|
{
|
|
32087
31525
|
onClick: () => onDownload && onDownload(
|
|
32088
31526
|
file?.data,
|
|
32089
31527
|
file?.name || file?.display_name || info?.name
|
|
32090
31528
|
),
|
|
32091
|
-
children: /* @__PURE__ */ (0,
|
|
31529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DownloadIcon, {})
|
|
32092
31530
|
}
|
|
32093
31531
|
),
|
|
32094
|
-
/* @__PURE__ */ (0,
|
|
31532
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { onClick: onDelete, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DeleteIconDanger, {}) })
|
|
32095
31533
|
] })
|
|
32096
31534
|
] });
|
|
32097
31535
|
};
|
|
@@ -32113,10 +31551,10 @@ var FileUploadField = (props) => {
|
|
|
32113
31551
|
downloadFunction
|
|
32114
31552
|
} = props;
|
|
32115
31553
|
const { t: t3 } = useI18n();
|
|
32116
|
-
const fileInputRef = (0,
|
|
32117
|
-
const [selectedFiles, setSelectedFiles] = (0,
|
|
32118
|
-
const [uploadError, setUploadError] = (0,
|
|
32119
|
-
(0,
|
|
31554
|
+
const fileInputRef = (0, import_react56.useRef)(null);
|
|
31555
|
+
const [selectedFiles, setSelectedFiles] = (0, import_react56.useState)([]);
|
|
31556
|
+
const [uploadError, setUploadError] = (0, import_react56.useState)();
|
|
31557
|
+
(0, import_react56.useEffect)(() => {
|
|
32120
31558
|
if (selectedFiles?.length === 0 && value) {
|
|
32121
31559
|
setSelectedFiles([
|
|
32122
31560
|
{
|
|
@@ -32125,7 +31563,7 @@ var FileUploadField = (props) => {
|
|
|
32125
31563
|
]);
|
|
32126
31564
|
}
|
|
32127
31565
|
}, [value]);
|
|
32128
|
-
return /* @__PURE__ */ (0,
|
|
31566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
32129
31567
|
Controller,
|
|
32130
31568
|
{
|
|
32131
31569
|
name: name2 || "",
|
|
@@ -32134,7 +31572,7 @@ var FileUploadField = (props) => {
|
|
|
32134
31572
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
32135
31573
|
},
|
|
32136
31574
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
32137
|
-
(0,
|
|
31575
|
+
(0, import_react56.useEffect)(() => {
|
|
32138
31576
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
32139
31577
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
32140
31578
|
data = data.split(",")[1];
|
|
@@ -32150,8 +31588,8 @@ var FileUploadField = (props) => {
|
|
|
32150
31588
|
);
|
|
32151
31589
|
}
|
|
32152
31590
|
}, [selectedFiles]);
|
|
32153
|
-
return /* @__PURE__ */ (0,
|
|
32154
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0,
|
|
31591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { children: [
|
|
31592
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
32155
31593
|
RenderFile,
|
|
32156
31594
|
{
|
|
32157
31595
|
file: fileItem,
|
|
@@ -32166,8 +31604,8 @@ var FileUploadField = (props) => {
|
|
|
32166
31604
|
}
|
|
32167
31605
|
}
|
|
32168
31606
|
)),
|
|
32169
|
-
uploadError && /* @__PURE__ */ (0,
|
|
32170
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0,
|
|
31607
|
+
uploadError && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31608
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
32171
31609
|
ButtonSelectFiles,
|
|
32172
31610
|
{
|
|
32173
31611
|
fileInputRef,
|
|
@@ -32182,7 +31620,7 @@ var FileUploadField = (props) => {
|
|
|
32182
31620
|
useUploadFile
|
|
32183
31621
|
}
|
|
32184
31622
|
),
|
|
32185
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31623
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32186
31624
|
] });
|
|
32187
31625
|
}
|
|
32188
31626
|
}
|
|
@@ -32190,8 +31628,8 @@ var FileUploadField = (props) => {
|
|
|
32190
31628
|
};
|
|
32191
31629
|
|
|
32192
31630
|
// src/widgets/basic/float-field/float.tsx
|
|
32193
|
-
var
|
|
32194
|
-
var
|
|
31631
|
+
var import_react57 = require("react");
|
|
31632
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
32195
31633
|
var FloatField = (props) => {
|
|
32196
31634
|
const {
|
|
32197
31635
|
name: name2,
|
|
@@ -32209,9 +31647,9 @@ var FloatField = (props) => {
|
|
|
32209
31647
|
} = props;
|
|
32210
31648
|
const { t: t3 } = useI18n();
|
|
32211
31649
|
if (!isForm && !isEditTable) {
|
|
32212
|
-
return /* @__PURE__ */ (0,
|
|
31650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
32213
31651
|
}
|
|
32214
|
-
return /* @__PURE__ */ (0,
|
|
31652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
32215
31653
|
Controller,
|
|
32216
31654
|
{
|
|
32217
31655
|
name: name2 ?? "",
|
|
@@ -32222,10 +31660,10 @@ var FloatField = (props) => {
|
|
|
32222
31660
|
},
|
|
32223
31661
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
32224
31662
|
const { setError, clearErrors } = methods;
|
|
32225
|
-
const [inputValue, setInputValue] = (0,
|
|
31663
|
+
const [inputValue, setInputValue] = (0, import_react57.useState)(
|
|
32226
31664
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
32227
31665
|
);
|
|
32228
|
-
(0,
|
|
31666
|
+
(0, import_react57.useEffect)(() => {
|
|
32229
31667
|
if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
|
|
32230
31668
|
setInputValue(formatFloatNumber(propValue));
|
|
32231
31669
|
clearErrors(name2);
|
|
@@ -32236,9 +31674,9 @@ var FloatField = (props) => {
|
|
|
32236
31674
|
setInputValue("");
|
|
32237
31675
|
}
|
|
32238
31676
|
}, [value, name2, clearErrors, propValue]);
|
|
32239
|
-
const isDirtyRef = (0,
|
|
32240
|
-
const inputRef = (0,
|
|
32241
|
-
const lastCommittedValueRef = (0,
|
|
31677
|
+
const isDirtyRef = (0, import_react57.useRef)(false);
|
|
31678
|
+
const inputRef = (0, import_react57.useRef)(null);
|
|
31679
|
+
const lastCommittedValueRef = (0, import_react57.useRef)(null);
|
|
32242
31680
|
const handleInputChange = (e3) => {
|
|
32243
31681
|
const newValue = e3.target.value;
|
|
32244
31682
|
const valueWithoutCommas = newValue.replace(/,/g, "");
|
|
@@ -32316,8 +31754,8 @@ var FloatField = (props) => {
|
|
|
32316
31754
|
}
|
|
32317
31755
|
isDirtyRef.current = false;
|
|
32318
31756
|
};
|
|
32319
|
-
return /* @__PURE__ */ (0,
|
|
32320
|
-
/* @__PURE__ */ (0,
|
|
31757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
|
|
31758
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
32321
31759
|
"input",
|
|
32322
31760
|
{
|
|
32323
31761
|
ref: inputRef,
|
|
@@ -32337,7 +31775,7 @@ var FloatField = (props) => {
|
|
|
32337
31775
|
`
|
|
32338
31776
|
}
|
|
32339
31777
|
),
|
|
32340
|
-
error2 && !isEditTable && /* @__PURE__ */ (0,
|
|
31778
|
+
error2 && !isEditTable && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32341
31779
|
] });
|
|
32342
31780
|
}
|
|
32343
31781
|
}
|
|
@@ -32345,8 +31783,8 @@ var FloatField = (props) => {
|
|
|
32345
31783
|
};
|
|
32346
31784
|
|
|
32347
31785
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
32348
|
-
var
|
|
32349
|
-
var
|
|
31786
|
+
var import_react58 = require("react");
|
|
31787
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
32350
31788
|
var FloatTimeField = (props) => {
|
|
32351
31789
|
const {
|
|
32352
31790
|
name: name2,
|
|
@@ -32362,9 +31800,9 @@ var FloatTimeField = (props) => {
|
|
|
32362
31800
|
const { t: t3 } = useI18n();
|
|
32363
31801
|
if (!isForm) {
|
|
32364
31802
|
const formatValue = value ?? 0;
|
|
32365
|
-
return /* @__PURE__ */ (0,
|
|
31803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { children: convertFloatToTime(formatValue) });
|
|
32366
31804
|
}
|
|
32367
|
-
return /* @__PURE__ */ (0,
|
|
31805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
32368
31806
|
Controller,
|
|
32369
31807
|
{
|
|
32370
31808
|
name: name2 ?? "",
|
|
@@ -32377,11 +31815,11 @@ var FloatTimeField = (props) => {
|
|
|
32377
31815
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
32378
31816
|
fieldState: { error: error2, isDirty }
|
|
32379
31817
|
}) => {
|
|
32380
|
-
const [input, setInput] = (0,
|
|
31818
|
+
const [input, setInput] = (0, import_react58.useState)(
|
|
32381
31819
|
convertFloatToTime(value2 ?? defaultValue)
|
|
32382
31820
|
);
|
|
32383
|
-
const [formattedTime, setFormattedTime] = (0,
|
|
32384
|
-
const [errors, setErrors] = (0,
|
|
31821
|
+
const [formattedTime, setFormattedTime] = (0, import_react58.useState)("");
|
|
31822
|
+
const [errors, setErrors] = (0, import_react58.useState)("");
|
|
32385
31823
|
const handleInputChange = (e3) => {
|
|
32386
31824
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
32387
31825
|
setInput(raw);
|
|
@@ -32426,8 +31864,8 @@ var FloatTimeField = (props) => {
|
|
|
32426
31864
|
}
|
|
32427
31865
|
onBlur();
|
|
32428
31866
|
};
|
|
32429
|
-
return /* @__PURE__ */ (0,
|
|
32430
|
-
/* @__PURE__ */ (0,
|
|
31867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
31868
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
32431
31869
|
"input",
|
|
32432
31870
|
{
|
|
32433
31871
|
type: "text",
|
|
@@ -32459,7 +31897,7 @@ var FloatTimeField = (props) => {
|
|
|
32459
31897
|
readOnly: readonly
|
|
32460
31898
|
}
|
|
32461
31899
|
),
|
|
32462
|
-
(error2 || errors) && /* @__PURE__ */ (0,
|
|
31900
|
+
(error2 || errors) && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
32463
31901
|
] });
|
|
32464
31902
|
}
|
|
32465
31903
|
}
|
|
@@ -32467,8 +31905,8 @@ var FloatTimeField = (props) => {
|
|
|
32467
31905
|
};
|
|
32468
31906
|
|
|
32469
31907
|
// src/widgets/basic/html-field/html.tsx
|
|
32470
|
-
var
|
|
32471
|
-
var
|
|
31908
|
+
var import_react59 = require("react");
|
|
31909
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
32472
31910
|
var HtmlField = (props) => {
|
|
32473
31911
|
const {
|
|
32474
31912
|
name: name2,
|
|
@@ -32480,18 +31918,18 @@ var HtmlField = (props) => {
|
|
|
32480
31918
|
value,
|
|
32481
31919
|
isEditTable
|
|
32482
31920
|
} = props;
|
|
32483
|
-
const divRef = (0,
|
|
31921
|
+
const divRef = (0, import_react59.useRef)(null);
|
|
32484
31922
|
if (!isForm && !isEditTable) {
|
|
32485
|
-
return /* @__PURE__ */ (0,
|
|
31923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
32486
31924
|
}
|
|
32487
|
-
return /* @__PURE__ */ (0,
|
|
31925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
32488
31926
|
Controller,
|
|
32489
31927
|
{
|
|
32490
31928
|
name: name2 ?? "",
|
|
32491
31929
|
control: methods?.control,
|
|
32492
31930
|
defaultValue,
|
|
32493
31931
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
32494
|
-
(0,
|
|
31932
|
+
(0, import_react59.useEffect)(() => {
|
|
32495
31933
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
32496
31934
|
divRef.current.innerHTML = value2 || "";
|
|
32497
31935
|
}
|
|
@@ -32503,7 +31941,7 @@ var HtmlField = (props) => {
|
|
|
32503
31941
|
onChange2(newValue, "");
|
|
32504
31942
|
}
|
|
32505
31943
|
};
|
|
32506
|
-
return /* @__PURE__ */ (0,
|
|
31944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
32507
31945
|
"div",
|
|
32508
31946
|
{
|
|
32509
31947
|
ref: divRef,
|
|
@@ -32522,28 +31960,28 @@ var HtmlField = (props) => {
|
|
|
32522
31960
|
};
|
|
32523
31961
|
|
|
32524
31962
|
// src/widgets/basic/image-field/image.tsx
|
|
32525
|
-
var
|
|
31963
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
32526
31964
|
var ImageField = (props) => {
|
|
32527
31965
|
const { value, type, name: name2, baseURL } = props;
|
|
32528
31966
|
if (!value) return null;
|
|
32529
31967
|
if (type === "url") {
|
|
32530
|
-
return /* @__PURE__ */ (0,
|
|
31968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
32531
31969
|
}
|
|
32532
|
-
return /* @__PURE__ */ (0,
|
|
31970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { id: "qr-code", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
32533
31971
|
};
|
|
32534
31972
|
|
|
32535
31973
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32536
|
-
var
|
|
31974
|
+
var import_react60 = __toESM(require("react"));
|
|
32537
31975
|
|
|
32538
31976
|
// src/widgets/basic/information-field/information.tsx
|
|
32539
|
-
var
|
|
31977
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
32540
31978
|
var InfomationField = (props) => {
|
|
32541
31979
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
32542
31980
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
32543
|
-
return /* @__PURE__ */ (0,
|
|
31981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, {});
|
|
32544
31982
|
}
|
|
32545
31983
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
32546
|
-
return /* @__PURE__ */ (0,
|
|
31984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
32547
31985
|
AvatarField,
|
|
32548
31986
|
{
|
|
32549
31987
|
id: item.id,
|
|
@@ -32552,8 +31990,8 @@ var InfomationField = (props) => {
|
|
|
32552
31990
|
stringToColor
|
|
32553
31991
|
},
|
|
32554
31992
|
item.id
|
|
32555
|
-
)) : /* @__PURE__ */ (0,
|
|
32556
|
-
/* @__PURE__ */ (0,
|
|
31993
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "flex gap-2 items-center w-max", children: [
|
|
31994
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
32557
31995
|
AvatarField,
|
|
32558
31996
|
{
|
|
32559
31997
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -32563,12 +32001,12 @@ var InfomationField = (props) => {
|
|
|
32563
32001
|
stringToColor
|
|
32564
32002
|
}
|
|
32565
32003
|
),
|
|
32566
|
-
showName && /* @__PURE__ */ (0,
|
|
32004
|
+
showName && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
32567
32005
|
] }) });
|
|
32568
32006
|
};
|
|
32569
32007
|
|
|
32570
32008
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
32571
|
-
var
|
|
32009
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
32572
32010
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
32573
32011
|
const { selectProps, data, menuList } = props;
|
|
32574
32012
|
const { relation } = selectProps;
|
|
@@ -32577,8 +32015,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32577
32015
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
32578
32016
|
)
|
|
32579
32017
|
)?.[0]?.action?.id;
|
|
32580
|
-
return /* @__PURE__ */ (0,
|
|
32581
|
-
/* @__PURE__ */ (0,
|
|
32018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
32019
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32582
32020
|
AvatarField,
|
|
32583
32021
|
{
|
|
32584
32022
|
id: data?.id,
|
|
@@ -32590,8 +32028,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32590
32028
|
stringToColor
|
|
32591
32029
|
}
|
|
32592
32030
|
),
|
|
32593
|
-
/* @__PURE__ */ (0,
|
|
32594
|
-
/* @__PURE__ */ (0,
|
|
32031
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
32032
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32595
32033
|
"span",
|
|
32596
32034
|
{
|
|
32597
32035
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -32599,7 +32037,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
32599
32037
|
e3.stopPropagation();
|
|
32600
32038
|
props.removeProps.onClick();
|
|
32601
32039
|
},
|
|
32602
|
-
children: /* @__PURE__ */ (0,
|
|
32040
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CloseIcon, {})
|
|
32603
32041
|
}
|
|
32604
32042
|
)
|
|
32605
32043
|
] });
|
|
@@ -32608,10 +32046,10 @@ var CustomMenuList = (props) => {
|
|
|
32608
32046
|
const { options: options2, children, selectProps } = props;
|
|
32609
32047
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
32610
32048
|
const { t: t3 } = useI18n();
|
|
32611
|
-
const limitedChildren =
|
|
32612
|
-
return /* @__PURE__ */ (0,
|
|
32049
|
+
const limitedChildren = import_react60.default.Children.toArray(children).slice(0, 10);
|
|
32050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
32613
32051
|
limitedChildren,
|
|
32614
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
32052
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
32615
32053
|
"button",
|
|
32616
32054
|
{
|
|
32617
32055
|
type: "button",
|
|
@@ -32656,7 +32094,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32656
32094
|
value: item.id,
|
|
32657
32095
|
label: item.name ?? item.display_name
|
|
32658
32096
|
})) : [];
|
|
32659
|
-
return /* @__PURE__ */ (0,
|
|
32097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32660
32098
|
InfomationField,
|
|
32661
32099
|
{
|
|
32662
32100
|
value: optionValue || null,
|
|
@@ -32665,7 +32103,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32665
32103
|
}
|
|
32666
32104
|
);
|
|
32667
32105
|
}
|
|
32668
|
-
return /* @__PURE__ */ (0,
|
|
32106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32669
32107
|
Controller,
|
|
32670
32108
|
{
|
|
32671
32109
|
name: name2 ?? "",
|
|
@@ -32675,12 +32113,12 @@ var Many2ManyTagField = (props) => {
|
|
|
32675
32113
|
},
|
|
32676
32114
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
32677
32115
|
const { clearErrors } = methods;
|
|
32678
|
-
(0,
|
|
32116
|
+
(0, import_react60.useEffect)(() => {
|
|
32679
32117
|
if (field.value) {
|
|
32680
32118
|
clearErrors(name2);
|
|
32681
32119
|
}
|
|
32682
32120
|
}, [field.value]);
|
|
32683
|
-
const filteredValue = (0,
|
|
32121
|
+
const filteredValue = (0, import_react60.useMemo)(() => {
|
|
32684
32122
|
if (!Array.isArray(field?.value)) return null;
|
|
32685
32123
|
const fieldValueMapped = field.value.map((v) => ({
|
|
32686
32124
|
value: v?.id,
|
|
@@ -32701,8 +32139,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32701
32139
|
onChange2?.(name2 ?? "", newValue);
|
|
32702
32140
|
clearErrors(name2);
|
|
32703
32141
|
};
|
|
32704
|
-
return /* @__PURE__ */ (0,
|
|
32705
|
-
/* @__PURE__ */ (0,
|
|
32142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "group h-full overflow-y-auto", children: [
|
|
32143
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32706
32144
|
StateManagedSelect$1,
|
|
32707
32145
|
{
|
|
32708
32146
|
options: options2,
|
|
@@ -32780,7 +32218,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32780
32218
|
})
|
|
32781
32219
|
},
|
|
32782
32220
|
components: isUser ? {
|
|
32783
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */ (0,
|
|
32221
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32784
32222
|
CustomMultiValue,
|
|
32785
32223
|
{
|
|
32786
32224
|
...multiValueProps,
|
|
@@ -32789,7 +32227,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32789
32227
|
),
|
|
32790
32228
|
IndicatorSeparator: () => null
|
|
32791
32229
|
} : {
|
|
32792
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
32230
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
32793
32231
|
CustomMenuList,
|
|
32794
32232
|
{
|
|
32795
32233
|
...menuListProps,
|
|
@@ -32800,13 +32238,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32800
32238
|
}
|
|
32801
32239
|
),
|
|
32802
32240
|
IndicatorSeparator: () => null,
|
|
32803
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32804
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
32241
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(components.DropdownIndicator, { ...props2 }),
|
|
32242
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(components.ClearIndicator, { ...props2 })
|
|
32805
32243
|
},
|
|
32806
32244
|
required: !invisible && required
|
|
32807
32245
|
}
|
|
32808
32246
|
),
|
|
32809
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32247
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32810
32248
|
] });
|
|
32811
32249
|
}
|
|
32812
32250
|
}
|
|
@@ -32814,8 +32252,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32814
32252
|
};
|
|
32815
32253
|
|
|
32816
32254
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32817
|
-
var
|
|
32818
|
-
var
|
|
32255
|
+
var import_react61 = require("react");
|
|
32256
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
32819
32257
|
var MonetaryField = (props) => {
|
|
32820
32258
|
const { t: t3 } = useI18n();
|
|
32821
32259
|
const {
|
|
@@ -32835,26 +32273,26 @@ var MonetaryField = (props) => {
|
|
|
32835
32273
|
isEditTable
|
|
32836
32274
|
} = props;
|
|
32837
32275
|
if (isForm && name2 === "amount_residual") {
|
|
32838
|
-
return /* @__PURE__ */ (0,
|
|
32839
|
-
/* @__PURE__ */ (0,
|
|
32276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
32277
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("span", { className: "font-semibold", children: [
|
|
32840
32278
|
string,
|
|
32841
32279
|
":"
|
|
32842
32280
|
] }),
|
|
32843
|
-
/* @__PURE__ */ (0,
|
|
32281
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} VND` })
|
|
32844
32282
|
] });
|
|
32845
32283
|
}
|
|
32846
32284
|
if (!isForm) {
|
|
32847
32285
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : "VND";
|
|
32848
32286
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32849
|
-
return /* @__PURE__ */ (0,
|
|
32287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: `${formatNumberOnly(
|
|
32850
32288
|
parseFloat(String(value ?? defaultValue))
|
|
32851
32289
|
)} VND` });
|
|
32852
32290
|
}
|
|
32853
|
-
return /* @__PURE__ */ (0,
|
|
32291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { children: `${formatNumberOnly(
|
|
32854
32292
|
parseFloat(value ?? defaultValue)
|
|
32855
32293
|
)} ${currencySymbol}` });
|
|
32856
32294
|
}
|
|
32857
|
-
return /* @__PURE__ */ (0,
|
|
32295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
32858
32296
|
Controller,
|
|
32859
32297
|
{
|
|
32860
32298
|
name: name2 ?? "",
|
|
@@ -32868,13 +32306,13 @@ var MonetaryField = (props) => {
|
|
|
32868
32306
|
fieldState: { error: error2 }
|
|
32869
32307
|
}) => {
|
|
32870
32308
|
const { setError, clearErrors } = methods;
|
|
32871
|
-
(0,
|
|
32309
|
+
(0, import_react61.useEffect)(() => {
|
|
32872
32310
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
32873
32311
|
clearErrors(name2);
|
|
32874
32312
|
}
|
|
32875
32313
|
}, [value2]);
|
|
32876
|
-
return /* @__PURE__ */ (0,
|
|
32877
|
-
/* @__PURE__ */ (0,
|
|
32314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
32315
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
32878
32316
|
"input",
|
|
32879
32317
|
{
|
|
32880
32318
|
value: formatNumberOnly(value2),
|
|
@@ -32912,7 +32350,7 @@ var MonetaryField = (props) => {
|
|
|
32912
32350
|
`
|
|
32913
32351
|
}
|
|
32914
32352
|
),
|
|
32915
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32353
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32916
32354
|
] });
|
|
32917
32355
|
}
|
|
32918
32356
|
}
|
|
@@ -32920,14 +32358,14 @@ var MonetaryField = (props) => {
|
|
|
32920
32358
|
};
|
|
32921
32359
|
|
|
32922
32360
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32923
|
-
var
|
|
32361
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
32924
32362
|
var PaidBadgedField = () => {
|
|
32925
|
-
return /* @__PURE__ */ (0,
|
|
32363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PaidIcon, {}) });
|
|
32926
32364
|
};
|
|
32927
32365
|
|
|
32928
32366
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32929
|
-
var
|
|
32930
|
-
var
|
|
32367
|
+
var import_react62 = __toESM(require("react"));
|
|
32368
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
32931
32369
|
var RatingStarField = (props) => {
|
|
32932
32370
|
const {
|
|
32933
32371
|
label,
|
|
@@ -32936,9 +32374,9 @@ var RatingStarField = (props) => {
|
|
|
32936
32374
|
onSelectPriority,
|
|
32937
32375
|
id
|
|
32938
32376
|
} = props;
|
|
32939
|
-
const [rating, setRating] = (0,
|
|
32940
|
-
const [hover, setHover] = (0,
|
|
32941
|
-
(0,
|
|
32377
|
+
const [rating, setRating] = (0, import_react62.useState)(defaultValue);
|
|
32378
|
+
const [hover, setHover] = (0, import_react62.useState)(0);
|
|
32379
|
+
(0, import_react62.useEffect)(() => {
|
|
32942
32380
|
setRating(defaultValue);
|
|
32943
32381
|
}, [defaultValue]);
|
|
32944
32382
|
const handleClick = (value) => {
|
|
@@ -32962,7 +32400,7 @@ var RatingStarField = (props) => {
|
|
|
32962
32400
|
setHover(0);
|
|
32963
32401
|
setRating(0);
|
|
32964
32402
|
};
|
|
32965
|
-
return /* @__PURE__ */ (0,
|
|
32403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
32966
32404
|
"div",
|
|
32967
32405
|
{
|
|
32968
32406
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32972,17 +32410,17 @@ var RatingStarField = (props) => {
|
|
|
32972
32410
|
const starValue = index4 + 1;
|
|
32973
32411
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32974
32412
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32975
|
-
return /* @__PURE__ */ (0,
|
|
32976
|
-
/* @__PURE__ */ (0,
|
|
32413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_react62.default.Fragment, { children: [
|
|
32414
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
32977
32415
|
"div",
|
|
32978
32416
|
{
|
|
32979
32417
|
onMouseEnter: () => handleHover(starValue),
|
|
32980
32418
|
onClick: () => handleClick(starValue),
|
|
32981
32419
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32982
|
-
children: /* @__PURE__ */ (0,
|
|
32420
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32983
32421
|
}
|
|
32984
32422
|
),
|
|
32985
|
-
/* @__PURE__ */ (0,
|
|
32423
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
32986
32424
|
M,
|
|
32987
32425
|
{
|
|
32988
32426
|
className: "z-50",
|
|
@@ -32998,7 +32436,7 @@ var RatingStarField = (props) => {
|
|
|
32998
32436
|
};
|
|
32999
32437
|
|
|
33000
32438
|
// src/widgets/basic/priority-field/priority.tsx
|
|
33001
|
-
var
|
|
32439
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
33002
32440
|
var PriorityField = (props) => {
|
|
33003
32441
|
const {
|
|
33004
32442
|
isForm,
|
|
@@ -33014,7 +32452,7 @@ var PriorityField = (props) => {
|
|
|
33014
32452
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
33015
32453
|
const defaultPriority = parseInt(value) + 1;
|
|
33016
32454
|
if (!isForm) {
|
|
33017
|
-
return /* @__PURE__ */ (0,
|
|
32455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
33018
32456
|
RatingStarField,
|
|
33019
32457
|
{
|
|
33020
32458
|
label,
|
|
@@ -33025,7 +32463,7 @@ var PriorityField = (props) => {
|
|
|
33025
32463
|
}
|
|
33026
32464
|
);
|
|
33027
32465
|
}
|
|
33028
|
-
return /* @__PURE__ */ (0,
|
|
32466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
33029
32467
|
Controller,
|
|
33030
32468
|
{
|
|
33031
32469
|
name: name ?? "",
|
|
@@ -33035,7 +32473,7 @@ var PriorityField = (props) => {
|
|
|
33035
32473
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
33036
32474
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
33037
32475
|
};
|
|
33038
|
-
return /* @__PURE__ */ (0,
|
|
32476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
33039
32477
|
RatingStarField,
|
|
33040
32478
|
{
|
|
33041
32479
|
label,
|
|
@@ -33051,8 +32489,8 @@ var PriorityField = (props) => {
|
|
|
33051
32489
|
};
|
|
33052
32490
|
|
|
33053
32491
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
33054
|
-
var
|
|
33055
|
-
var
|
|
32492
|
+
var import_react63 = require("react");
|
|
32493
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
33056
32494
|
var RadioGroupField = (props) => {
|
|
33057
32495
|
const {
|
|
33058
32496
|
name: name2,
|
|
@@ -33065,19 +32503,19 @@ var RadioGroupField = (props) => {
|
|
|
33065
32503
|
onChange: onChange2,
|
|
33066
32504
|
setValue
|
|
33067
32505
|
} = props;
|
|
33068
|
-
(0,
|
|
32506
|
+
(0, import_react63.useEffect)(() => {
|
|
33069
32507
|
if (selection?.length > 0) {
|
|
33070
32508
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
33071
32509
|
}
|
|
33072
32510
|
}, [selection, name2, setValue]);
|
|
33073
32511
|
if (!methods) return null;
|
|
33074
|
-
return /* @__PURE__ */ (0,
|
|
32512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
33075
32513
|
Controller,
|
|
33076
32514
|
{
|
|
33077
32515
|
name: name2 ?? "",
|
|
33078
32516
|
control: methods.control,
|
|
33079
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33080
|
-
/* @__PURE__ */ (0,
|
|
32517
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
32518
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
33081
32519
|
"input",
|
|
33082
32520
|
{
|
|
33083
32521
|
type: "radio",
|
|
@@ -33096,7 +32534,7 @@ var RadioGroupField = (props) => {
|
|
|
33096
32534
|
className: "custom-radio"
|
|
33097
32535
|
}
|
|
33098
32536
|
),
|
|
33099
|
-
/* @__PURE__ */ (0,
|
|
32537
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { htmlFor: String(select[0]), children: select[1] })
|
|
33100
32538
|
] }, select[0])) })
|
|
33101
32539
|
}
|
|
33102
32540
|
);
|
|
@@ -33104,7 +32542,7 @@ var RadioGroupField = (props) => {
|
|
|
33104
32542
|
|
|
33105
32543
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
33106
32544
|
var import_moment3 = __toESM(require_moment());
|
|
33107
|
-
var
|
|
32545
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
33108
32546
|
var RemainingDaysField = (props) => {
|
|
33109
32547
|
const {
|
|
33110
32548
|
value,
|
|
@@ -33115,14 +32553,14 @@ var RemainingDaysField = (props) => {
|
|
|
33115
32553
|
if (!value) return null;
|
|
33116
32554
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
33117
32555
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
33118
|
-
return /* @__PURE__ */ (0,
|
|
33119
|
-
/* @__PURE__ */ (0,
|
|
33120
|
-
/* @__PURE__ */ (0,
|
|
32556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: isForm ? "mb-4" : "", children: [
|
|
32557
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32558
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
33121
32559
|
"div",
|
|
33122
32560
|
{
|
|
33123
32561
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
33124
32562
|
className: "flex items-center w-fit cursor-context-menu",
|
|
33125
|
-
children: /* @__PURE__ */ (0,
|
|
32563
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
33126
32564
|
"div",
|
|
33127
32565
|
{
|
|
33128
32566
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -33135,7 +32573,7 @@ var RemainingDaysField = (props) => {
|
|
|
33135
32573
|
};
|
|
33136
32574
|
|
|
33137
32575
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
33138
|
-
var
|
|
32576
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
33139
32577
|
var SelectDropdownField = (props) => {
|
|
33140
32578
|
const { t: t3 } = useI18n();
|
|
33141
32579
|
const {
|
|
@@ -33157,9 +32595,9 @@ var SelectDropdownField = (props) => {
|
|
|
33157
32595
|
label: val[1]
|
|
33158
32596
|
})) : [];
|
|
33159
32597
|
if (!isForm && !isEditTable) {
|
|
33160
|
-
return /* @__PURE__ */ (0,
|
|
32598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
33161
32599
|
} else {
|
|
33162
|
-
return /* @__PURE__ */ (0,
|
|
32600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
33163
32601
|
Controller,
|
|
33164
32602
|
{
|
|
33165
32603
|
name: name2 || "",
|
|
@@ -33186,8 +32624,8 @@ var SelectDropdownField = (props) => {
|
|
|
33186
32624
|
value: defaultValue || null,
|
|
33187
32625
|
required: !invisible && required
|
|
33188
32626
|
};
|
|
33189
|
-
return /* @__PURE__ */ (0,
|
|
33190
|
-
/* @__PURE__ */ (0,
|
|
32627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
32628
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "group", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
33191
32629
|
StateManagedSelect$1,
|
|
33192
32630
|
{
|
|
33193
32631
|
...commonProps,
|
|
@@ -33242,12 +32680,12 @@ var SelectDropdownField = (props) => {
|
|
|
33242
32680
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
33243
32681
|
components: {
|
|
33244
32682
|
IndicatorSeparator: () => null,
|
|
33245
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0,
|
|
32683
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(components.DropdownIndicator, { ...props2 })
|
|
33246
32684
|
},
|
|
33247
32685
|
noOptionsMessage: () => t3("no-available")
|
|
33248
32686
|
}
|
|
33249
32687
|
) }),
|
|
33250
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
32688
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33251
32689
|
] });
|
|
33252
32690
|
}
|
|
33253
32691
|
}
|
|
@@ -33256,7 +32694,7 @@ var SelectDropdownField = (props) => {
|
|
|
33256
32694
|
};
|
|
33257
32695
|
|
|
33258
32696
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
33259
|
-
var
|
|
32697
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
33260
32698
|
var TextAreaField = (props) => {
|
|
33261
32699
|
const {
|
|
33262
32700
|
methods,
|
|
@@ -33280,9 +32718,9 @@ var TextAreaField = (props) => {
|
|
|
33280
32718
|
}
|
|
33281
32719
|
}) : {};
|
|
33282
32720
|
if (!isForm) {
|
|
33283
|
-
return /* @__PURE__ */ (0,
|
|
32721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
33284
32722
|
}
|
|
33285
|
-
return /* @__PURE__ */ (0,
|
|
32723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
33286
32724
|
"textarea",
|
|
33287
32725
|
{
|
|
33288
32726
|
...formProps,
|
|
@@ -33298,7 +32736,7 @@ var TextAreaField = (props) => {
|
|
|
33298
32736
|
};
|
|
33299
32737
|
|
|
33300
32738
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
33301
|
-
var
|
|
32739
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
33302
32740
|
var ToggleButtonField = (props) => {
|
|
33303
32741
|
const {
|
|
33304
32742
|
name: name2,
|
|
@@ -33308,13 +32746,13 @@ var ToggleButtonField = (props) => {
|
|
|
33308
32746
|
onChange: onChange2,
|
|
33309
32747
|
methods
|
|
33310
32748
|
} = props;
|
|
33311
|
-
return /* @__PURE__ */ (0,
|
|
32749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
33312
32750
|
Controller,
|
|
33313
32751
|
{
|
|
33314
32752
|
name: name2 ?? "",
|
|
33315
32753
|
control: methods?.control,
|
|
33316
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33317
|
-
/* @__PURE__ */ (0,
|
|
32754
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "inline-flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
32755
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
33318
32756
|
"input",
|
|
33319
32757
|
{
|
|
33320
32758
|
...field,
|
|
@@ -33333,7 +32771,7 @@ var ToggleButtonField = (props) => {
|
|
|
33333
32771
|
checked: field.value ?? false
|
|
33334
32772
|
}
|
|
33335
32773
|
),
|
|
33336
|
-
/* @__PURE__ */ (0,
|
|
32774
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
33337
32775
|
"span",
|
|
33338
32776
|
{
|
|
33339
32777
|
style: {
|
|
@@ -33342,7 +32780,7 @@ var ToggleButtonField = (props) => {
|
|
|
33342
32780
|
},
|
|
33343
32781
|
className: `rounded-full transition duration-300
|
|
33344
32782
|
${field.value ? "bg-primary" : "bg-gray-300"}`,
|
|
33345
|
-
children: /* @__PURE__ */ (0,
|
|
32783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
33346
32784
|
"span",
|
|
33347
32785
|
{
|
|
33348
32786
|
style: {
|
|
@@ -33366,8 +32804,8 @@ var ToggleButtonField = (props) => {
|
|
|
33366
32804
|
};
|
|
33367
32805
|
|
|
33368
32806
|
// src/widgets/basic/integer-field/integer.tsx
|
|
33369
|
-
var
|
|
33370
|
-
var
|
|
32807
|
+
var import_react64 = require("react");
|
|
32808
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
33371
32809
|
var IntegerField = (props) => {
|
|
33372
32810
|
const {
|
|
33373
32811
|
name: name2,
|
|
@@ -33386,9 +32824,9 @@ var IntegerField = (props) => {
|
|
|
33386
32824
|
const { t: t3 } = useI18n();
|
|
33387
32825
|
if (!isForm && !isEditTable) {
|
|
33388
32826
|
const displayValue = value ?? defaultValue;
|
|
33389
|
-
return /* @__PURE__ */ (0,
|
|
32827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
33390
32828
|
}
|
|
33391
|
-
return /* @__PURE__ */ (0,
|
|
32829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
33392
32830
|
Controller,
|
|
33393
32831
|
{
|
|
33394
32832
|
name: name2 || "",
|
|
@@ -33402,13 +32840,13 @@ var IntegerField = (props) => {
|
|
|
33402
32840
|
fieldState: { error: error2 }
|
|
33403
32841
|
}) => {
|
|
33404
32842
|
const { setError, clearErrors } = methods;
|
|
33405
|
-
const isDirtyRef = (0,
|
|
33406
|
-
const inputRef = (0,
|
|
33407
|
-
const lastCommittedValueRef = (0,
|
|
33408
|
-
const [inputValue, setInputValue] = (0,
|
|
32843
|
+
const isDirtyRef = (0, import_react64.useRef)(false);
|
|
32844
|
+
const inputRef = (0, import_react64.useRef)(null);
|
|
32845
|
+
const lastCommittedValueRef = (0, import_react64.useRef)(null);
|
|
32846
|
+
const [inputValue, setInputValue] = (0, import_react64.useState)(
|
|
33409
32847
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
33410
32848
|
);
|
|
33411
|
-
(0,
|
|
32849
|
+
(0, import_react64.useEffect)(() => {
|
|
33412
32850
|
if (value2 !== void 0 && value2 !== null) {
|
|
33413
32851
|
setInputValue(String(value2));
|
|
33414
32852
|
clearErrors(name2);
|
|
@@ -33466,8 +32904,8 @@ var IntegerField = (props) => {
|
|
|
33466
32904
|
inputRef.current?.blur();
|
|
33467
32905
|
clearErrors(name2);
|
|
33468
32906
|
};
|
|
33469
|
-
return /* @__PURE__ */ (0,
|
|
33470
|
-
/* @__PURE__ */ (0,
|
|
32907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
32908
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
33471
32909
|
"input",
|
|
33472
32910
|
{
|
|
33473
32911
|
ref: inputRef,
|
|
@@ -33502,7 +32940,7 @@ var IntegerField = (props) => {
|
|
|
33502
32940
|
`
|
|
33503
32941
|
}
|
|
33504
32942
|
),
|
|
33505
|
-
error2 && isEditTable && /* @__PURE__ */ (0,
|
|
32943
|
+
error2 && isEditTable && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33506
32944
|
] });
|
|
33507
32945
|
}
|
|
33508
32946
|
}
|
|
@@ -33510,7 +32948,7 @@ var IntegerField = (props) => {
|
|
|
33510
32948
|
};
|
|
33511
32949
|
|
|
33512
32950
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
33513
|
-
var
|
|
32951
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
33514
32952
|
var StatusDropdownField = (props) => {
|
|
33515
32953
|
const {
|
|
33516
32954
|
buttonRef,
|
|
@@ -33522,13 +32960,13 @@ var StatusDropdownField = (props) => {
|
|
|
33522
32960
|
handleClick,
|
|
33523
32961
|
colors: colors2
|
|
33524
32962
|
} = props;
|
|
33525
|
-
return /* @__PURE__ */ (0,
|
|
32963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
33526
32964
|
"div",
|
|
33527
32965
|
{
|
|
33528
32966
|
ref: buttonRef,
|
|
33529
32967
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
33530
32968
|
children: [
|
|
33531
|
-
/* @__PURE__ */ (0,
|
|
32969
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
33532
32970
|
"button",
|
|
33533
32971
|
{
|
|
33534
32972
|
type: "button",
|
|
@@ -33536,23 +32974,23 @@ var StatusDropdownField = (props) => {
|
|
|
33536
32974
|
className: `transition-all rounded-full size-5 cursor-pointer shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] focus:!shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-[#dbe0e6] ${state == "normal" ? "bg-[#e9ecef]" : state == "done" ? "bg-primary" : "bg-red-500"}`
|
|
33537
32975
|
}
|
|
33538
32976
|
),
|
|
33539
|
-
isOpen && /* @__PURE__ */ (0,
|
|
32977
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "absolute w-[200px] top-full bg-white transition-all right-0 flex flex-col rounded-lg z-10 shadow-md border !border-[#dbe0e6] overflow-hidden", children: selection?.map((item, index4) => {
|
|
33540
32978
|
const isActive = item[0] == state;
|
|
33541
|
-
return /* @__PURE__ */ (0,
|
|
32979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
33542
32980
|
"div",
|
|
33543
32981
|
{
|
|
33544
32982
|
className: `cursor-pointer relative hover:bg-gray-200 pl-[12px] pr-[20px] py-[5px] flex items-center justify-start gap-2 ${isActive ? "bg-gray-100" : ""}`,
|
|
33545
32983
|
onClick: () => handleClick(item[0]),
|
|
33546
32984
|
children: [
|
|
33547
|
-
/* @__PURE__ */ (0,
|
|
33548
|
-
/* @__PURE__ */ (0,
|
|
33549
|
-
/* @__PURE__ */ (0,
|
|
32985
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(CheckIcon, {}) }),
|
|
32986
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
32987
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
33550
32988
|
"div",
|
|
33551
32989
|
{
|
|
33552
32990
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
33553
32991
|
}
|
|
33554
32992
|
),
|
|
33555
|
-
/* @__PURE__ */ (0,
|
|
32993
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "text-sm", children: item[1] })
|
|
33556
32994
|
] })
|
|
33557
32995
|
]
|
|
33558
32996
|
},
|
|
@@ -33566,8 +33004,8 @@ var StatusDropdownField = (props) => {
|
|
|
33566
33004
|
|
|
33567
33005
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
33568
33006
|
var import_react_dom8 = require("react-dom");
|
|
33569
|
-
var
|
|
33570
|
-
var
|
|
33007
|
+
var import_react65 = require("react");
|
|
33008
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
33571
33009
|
var Many2ManyField = (props) => {
|
|
33572
33010
|
const { t: t3 } = useI18n();
|
|
33573
33011
|
const {
|
|
@@ -33626,7 +33064,7 @@ var Many2ManyField = (props) => {
|
|
|
33626
33064
|
clearSearch
|
|
33627
33065
|
} = searchController;
|
|
33628
33066
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
33629
|
-
(0,
|
|
33067
|
+
(0, import_react65.useEffect)(() => {
|
|
33630
33068
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
33631
33069
|
if (groupItems?.length > 0) {
|
|
33632
33070
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -33641,7 +33079,7 @@ var Many2ManyField = (props) => {
|
|
|
33641
33079
|
};
|
|
33642
33080
|
}, [selectedTags]);
|
|
33643
33081
|
return (0, import_react_dom8.createPortal)(
|
|
33644
|
-
/* @__PURE__ */ (0,
|
|
33082
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
33645
33083
|
"div",
|
|
33646
33084
|
{
|
|
33647
33085
|
style: {
|
|
@@ -33649,8 +33087,8 @@ var Many2ManyField = (props) => {
|
|
|
33649
33087
|
},
|
|
33650
33088
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
33651
33089
|
children: [
|
|
33652
|
-
/* @__PURE__ */ (0,
|
|
33653
|
-
/* @__PURE__ */ (0,
|
|
33090
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
33091
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
33654
33092
|
"div",
|
|
33655
33093
|
{
|
|
33656
33094
|
style: {
|
|
@@ -33658,12 +33096,12 @@ var Many2ManyField = (props) => {
|
|
|
33658
33096
|
},
|
|
33659
33097
|
className: "relative p-4 flex flex-col gap-2 max-w-full lg:max-w-[1000px] lg:min-w-[1000px] transform rounded-3xl bg-[#FFF] min-h-[90%] max-h-[90%] h-fit",
|
|
33660
33098
|
children: [
|
|
33661
|
-
/* @__PURE__ */ (0,
|
|
33662
|
-
/* @__PURE__ */ (0,
|
|
33663
|
-
/* @__PURE__ */ (0,
|
|
33099
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
33100
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "text-[20px] font-semibold", children: title }),
|
|
33101
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(CloseIcon, {}) })
|
|
33664
33102
|
] }),
|
|
33665
|
-
/* @__PURE__ */ (0,
|
|
33666
|
-
/* @__PURE__ */ (0,
|
|
33103
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
33104
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "col-span-3 sm:col-span-2 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33667
33105
|
Search,
|
|
33668
33106
|
{
|
|
33669
33107
|
removeSearchItems,
|
|
@@ -33697,7 +33135,7 @@ var Many2ManyField = (props) => {
|
|
|
33697
33135
|
groupByList
|
|
33698
33136
|
}
|
|
33699
33137
|
) }),
|
|
33700
|
-
/* @__PURE__ */ (0,
|
|
33138
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33701
33139
|
PaginationView,
|
|
33702
33140
|
{
|
|
33703
33141
|
className: "pagination-bar col-span-3 sm:col-span-1 justify-end flex-1",
|
|
@@ -33714,20 +33152,20 @@ var Many2ManyField = (props) => {
|
|
|
33714
33152
|
}
|
|
33715
33153
|
)
|
|
33716
33154
|
] }),
|
|
33717
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0,
|
|
33155
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "relative h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33718
33156
|
"div",
|
|
33719
33157
|
{
|
|
33720
33158
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33721
|
-
children: /* @__PURE__ */ (0,
|
|
33159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33722
33160
|
"div",
|
|
33723
33161
|
{
|
|
33724
33162
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33725
|
-
children: /* @__PURE__ */ (0,
|
|
33163
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
33726
33164
|
"table",
|
|
33727
33165
|
{
|
|
33728
33166
|
className: `relative w-full bg-white custom-dropdown `,
|
|
33729
33167
|
children: [
|
|
33730
|
-
/* @__PURE__ */ (0,
|
|
33168
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33731
33169
|
TableHead,
|
|
33732
33170
|
{
|
|
33733
33171
|
columns,
|
|
@@ -33737,7 +33175,7 @@ var Many2ManyField = (props) => {
|
|
|
33737
33175
|
handleCheckBoxAll
|
|
33738
33176
|
}
|
|
33739
33177
|
),
|
|
33740
|
-
rows?.length > 0 ? /* @__PURE__ */ (0,
|
|
33178
|
+
rows?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33741
33179
|
TableBody,
|
|
33742
33180
|
{
|
|
33743
33181
|
tableGroupController,
|
|
@@ -33777,16 +33215,16 @@ var Many2ManyField = (props) => {
|
|
|
33777
33215
|
checkedAll,
|
|
33778
33216
|
context
|
|
33779
33217
|
}
|
|
33780
|
-
) : /* @__PURE__ */ (0,
|
|
33218
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33781
33219
|
"td",
|
|
33782
33220
|
{
|
|
33783
33221
|
className: "w-full",
|
|
33784
33222
|
colSpan: columns?.length + 2,
|
|
33785
|
-
children: /* @__PURE__ */ (0,
|
|
33223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33786
33224
|
"div",
|
|
33787
33225
|
{
|
|
33788
33226
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33789
|
-
children: /* @__PURE__ */ (0,
|
|
33227
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(EmptyTable, {})
|
|
33790
33228
|
}
|
|
33791
33229
|
)
|
|
33792
33230
|
}
|
|
@@ -33797,9 +33235,9 @@ var Many2ManyField = (props) => {
|
|
|
33797
33235
|
}
|
|
33798
33236
|
) }) })
|
|
33799
33237
|
}
|
|
33800
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
33801
|
-
/* @__PURE__ */ (0,
|
|
33802
|
-
isDisplayCheckbox && /* @__PURE__ */ (0,
|
|
33238
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(LayerLoading, {}),
|
|
33239
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
33240
|
+
isDisplayCheckbox && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33803
33241
|
"button",
|
|
33804
33242
|
{
|
|
33805
33243
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33809,7 +33247,7 @@ var Many2ManyField = (props) => {
|
|
|
33809
33247
|
children: t3("choose")
|
|
33810
33248
|
}
|
|
33811
33249
|
),
|
|
33812
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0,
|
|
33250
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33813
33251
|
"button",
|
|
33814
33252
|
{
|
|
33815
33253
|
type: "button",
|
|
@@ -33825,7 +33263,7 @@ var Many2ManyField = (props) => {
|
|
|
33825
33263
|
children: t3("new")
|
|
33826
33264
|
}
|
|
33827
33265
|
),
|
|
33828
|
-
/* @__PURE__ */ (0,
|
|
33266
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
33829
33267
|
"button",
|
|
33830
33268
|
{
|
|
33831
33269
|
type: "button",
|
|
@@ -33846,16 +33284,16 @@ var Many2ManyField = (props) => {
|
|
|
33846
33284
|
};
|
|
33847
33285
|
|
|
33848
33286
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33849
|
-
var
|
|
33850
|
-
var
|
|
33287
|
+
var import_react66 = __toESM(require("react"));
|
|
33288
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
33851
33289
|
var CustomMenuList2 = (props) => {
|
|
33852
33290
|
const { t: t3 } = useI18n();
|
|
33853
33291
|
const { options: options2, children, selectProps } = props;
|
|
33854
33292
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33855
|
-
const limitedChildren =
|
|
33856
|
-
return /* @__PURE__ */ (0,
|
|
33293
|
+
const limitedChildren = import_react66.default.Children.toArray(children).slice(0, 10);
|
|
33294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33857
33295
|
limitedChildren,
|
|
33858
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0,
|
|
33296
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
33859
33297
|
"button",
|
|
33860
33298
|
{
|
|
33861
33299
|
type: "button",
|
|
@@ -33898,14 +33336,14 @@ var Many2OneField = (props) => {
|
|
|
33898
33336
|
const { t: t3 } = useI18n();
|
|
33899
33337
|
if (!isForm && !isEditTable) {
|
|
33900
33338
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33901
|
-
return /* @__PURE__ */ (0,
|
|
33339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
|
|
33902
33340
|
allowShowDetail && renderDetail({
|
|
33903
33341
|
idToolTip: String(name2) + Number(index4),
|
|
33904
33342
|
model: options2?.model ?? relation,
|
|
33905
33343
|
context: contextObject,
|
|
33906
33344
|
idForm: id
|
|
33907
33345
|
}),
|
|
33908
|
-
/* @__PURE__ */ (0,
|
|
33346
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33909
33347
|
"span",
|
|
33910
33348
|
{
|
|
33911
33349
|
className: "cursor-pointer",
|
|
@@ -33916,20 +33354,20 @@ var Many2OneField = (props) => {
|
|
|
33916
33354
|
)
|
|
33917
33355
|
] });
|
|
33918
33356
|
}
|
|
33919
|
-
return /* @__PURE__ */ (0,
|
|
33357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
|
|
33920
33358
|
allowShowDetail && renderDetail({
|
|
33921
33359
|
idToolTip: String(name2),
|
|
33922
33360
|
model: options2?.model ?? relation,
|
|
33923
33361
|
context: contextObject,
|
|
33924
33362
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33925
33363
|
}),
|
|
33926
|
-
/* @__PURE__ */ (0,
|
|
33364
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33927
33365
|
"div",
|
|
33928
33366
|
{
|
|
33929
33367
|
id: name2,
|
|
33930
33368
|
"data-tooltip-id": name2,
|
|
33931
33369
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33932
|
-
children: /* @__PURE__ */ (0,
|
|
33370
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33933
33371
|
Controller,
|
|
33934
33372
|
{
|
|
33935
33373
|
name: name2 ?? "",
|
|
@@ -33949,13 +33387,13 @@ var Many2OneField = (props) => {
|
|
|
33949
33387
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
33950
33388
|
(option) => option.value === tempSelectedOption?.value
|
|
33951
33389
|
) : currentValue ? currentValue : null;
|
|
33952
|
-
(0,
|
|
33390
|
+
(0, import_react66.useEffect)(() => {
|
|
33953
33391
|
if (error2 && selectedOption) {
|
|
33954
33392
|
methods?.clearErrors(name2);
|
|
33955
33393
|
}
|
|
33956
33394
|
}, [selectedOption]);
|
|
33957
|
-
return /* @__PURE__ */ (0,
|
|
33958
|
-
/* @__PURE__ */ (0,
|
|
33395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "h-full", children: [
|
|
33396
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
33959
33397
|
StateManagedSelect$1,
|
|
33960
33398
|
{
|
|
33961
33399
|
menuShouldScrollIntoView: false,
|
|
@@ -34031,7 +33469,7 @@ var Many2OneField = (props) => {
|
|
|
34031
33469
|
})
|
|
34032
33470
|
},
|
|
34033
33471
|
components: {
|
|
34034
|
-
MenuList: (menuListProps) => /* @__PURE__ */ (0,
|
|
33472
|
+
MenuList: (menuListProps) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
34035
33473
|
CustomMenuList2,
|
|
34036
33474
|
{
|
|
34037
33475
|
...menuListProps,
|
|
@@ -34042,13 +33480,13 @@ var Many2OneField = (props) => {
|
|
|
34042
33480
|
}
|
|
34043
33481
|
),
|
|
34044
33482
|
IndicatorSeparator: () => null,
|
|
34045
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0,
|
|
33483
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(components.DropdownIndicator, { ...props2 })
|
|
34046
33484
|
},
|
|
34047
33485
|
isDisabled: readonly,
|
|
34048
33486
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
34049
33487
|
}
|
|
34050
33488
|
),
|
|
34051
|
-
!isEditTable && error2 && /* @__PURE__ */ (0,
|
|
33489
|
+
!isEditTable && error2 && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
34052
33490
|
] });
|
|
34053
33491
|
}
|
|
34054
33492
|
}
|
|
@@ -34059,7 +33497,7 @@ var Many2OneField = (props) => {
|
|
|
34059
33497
|
};
|
|
34060
33498
|
|
|
34061
33499
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
34062
|
-
var
|
|
33500
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
34063
33501
|
var StatusbarDurationField = (props) => {
|
|
34064
33502
|
const {
|
|
34065
33503
|
disabled,
|
|
@@ -34069,14 +33507,14 @@ var StatusbarDurationField = (props) => {
|
|
|
34069
33507
|
defaultValue,
|
|
34070
33508
|
setModalStatus
|
|
34071
33509
|
} = props;
|
|
34072
|
-
return /* @__PURE__ */ (0,
|
|
33510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
34073
33511
|
"div",
|
|
34074
33512
|
{
|
|
34075
33513
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
34076
|
-
children: /* @__PURE__ */ (0,
|
|
34077
|
-
/* @__PURE__ */ (0,
|
|
33514
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center gap-[24px]", children: [
|
|
33515
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
34078
33516
|
const value = option?.id === defaultValue;
|
|
34079
|
-
return /* @__PURE__ */ (0,
|
|
33517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
34080
33518
|
"label",
|
|
34081
33519
|
{
|
|
34082
33520
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -34086,7 +33524,7 @@ var StatusbarDurationField = (props) => {
|
|
|
34086
33524
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
34087
33525
|
`,
|
|
34088
33526
|
children: [
|
|
34089
|
-
/* @__PURE__ */ (0,
|
|
33527
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
34090
33528
|
"input",
|
|
34091
33529
|
{
|
|
34092
33530
|
type: "radio",
|
|
@@ -34096,7 +33534,7 @@ var StatusbarDurationField = (props) => {
|
|
|
34096
33534
|
}
|
|
34097
33535
|
),
|
|
34098
33536
|
option?.name,
|
|
34099
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0,
|
|
33537
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
34100
33538
|
"div",
|
|
34101
33539
|
{
|
|
34102
33540
|
className: `absolute top-[5px] bg-[#dee2e6] z-[2] -right-4 w-[30px] h-[30px] border-t-4 border-r-4 border-white transform rotate-45 group-hover:bg-[#ced4da]
|
|
@@ -34111,14 +33549,14 @@ var StatusbarDurationField = (props) => {
|
|
|
34111
33549
|
}) }),
|
|
34112
33550
|
dataResponse?.records?.some(
|
|
34113
33551
|
(item) => item?.fold && item.id !== defaultValue
|
|
34114
|
-
) && /* @__PURE__ */ (0,
|
|
33552
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
34115
33553
|
"div",
|
|
34116
33554
|
{
|
|
34117
33555
|
onClick: () => setModalStatus(!modelStatus),
|
|
34118
33556
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
34119
33557
|
children: [
|
|
34120
|
-
/* @__PURE__ */ (0,
|
|
34121
|
-
modelStatus && /* @__PURE__ */ (0,
|
|
33558
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(MoreIcon, {}),
|
|
33559
|
+
modelStatus && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
34122
33560
|
"div",
|
|
34123
33561
|
{
|
|
34124
33562
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -34127,7 +33565,7 @@ var StatusbarDurationField = (props) => {
|
|
|
34127
33565
|
(item) => item?.fold && item.id !== defaultValue
|
|
34128
33566
|
)?.map((option) => {
|
|
34129
33567
|
const value = option?.id === defaultValue;
|
|
34130
|
-
return /* @__PURE__ */ (0,
|
|
33568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
34131
33569
|
"div",
|
|
34132
33570
|
{
|
|
34133
33571
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -34148,15 +33586,15 @@ var StatusbarDurationField = (props) => {
|
|
|
34148
33586
|
};
|
|
34149
33587
|
|
|
34150
33588
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
34151
|
-
var
|
|
34152
|
-
var
|
|
33589
|
+
var import_react67 = require("react");
|
|
33590
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
34153
33591
|
var StatusBarOptionField = (props) => {
|
|
34154
33592
|
const { selection, defaultValue } = props;
|
|
34155
|
-
const memoizedStatusOptions = (0,
|
|
33593
|
+
const memoizedStatusOptions = (0, import_react67.useMemo)(() => selection, [selection]);
|
|
34156
33594
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
34157
33595
|
(option) => option?.[0] === defaultValue
|
|
34158
33596
|
);
|
|
34159
|
-
return /* @__PURE__ */ (0,
|
|
33597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34160
33598
|
"div",
|
|
34161
33599
|
{
|
|
34162
33600
|
style: {
|
|
@@ -34165,8 +33603,8 @@ var StatusBarOptionField = (props) => {
|
|
|
34165
33603
|
flexWrap: "wrap"
|
|
34166
33604
|
},
|
|
34167
33605
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
34168
|
-
return /* @__PURE__ */ (0,
|
|
34169
|
-
/* @__PURE__ */ (0,
|
|
33606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
33607
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
34170
33608
|
"div",
|
|
34171
33609
|
{
|
|
34172
33610
|
style: {
|
|
@@ -34184,7 +33622,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34184
33622
|
boxShadow: index4 === indexInProgress ? "0 1px 2px 0 rgba(51, 51, 51, 0.04), 0 2px 4px 0 rgba(51, 51, 51, 0.04), 0 4px 8px -2px rgba(51, 51, 51, 0.06), 0 0 0 1px rgba(51, 51, 51, 0.04), 0 -1px 1px -0.5px rgba(51, 51, 51, 0.06) inset" : ""
|
|
34185
33623
|
},
|
|
34186
33624
|
children: [
|
|
34187
|
-
/* @__PURE__ */ (0,
|
|
33625
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34188
33626
|
"span",
|
|
34189
33627
|
{
|
|
34190
33628
|
style: {
|
|
@@ -34196,10 +33634,10 @@ var StatusBarOptionField = (props) => {
|
|
|
34196
33634
|
alignItems: "center",
|
|
34197
33635
|
borderRadius: "100%"
|
|
34198
33636
|
},
|
|
34199
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0,
|
|
33637
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ICCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ICMinus, {})
|
|
34200
33638
|
}
|
|
34201
33639
|
),
|
|
34202
|
-
/* @__PURE__ */ (0,
|
|
33640
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34203
33641
|
"span",
|
|
34204
33642
|
{
|
|
34205
33643
|
style: {
|
|
@@ -34212,7 +33650,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34212
33650
|
},
|
|
34213
33651
|
option?.[0]
|
|
34214
33652
|
),
|
|
34215
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0,
|
|
33653
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34216
33654
|
"div",
|
|
34217
33655
|
{
|
|
34218
33656
|
style: {
|
|
@@ -34228,7 +33666,7 @@ var StatusBarOptionField = (props) => {
|
|
|
34228
33666
|
);
|
|
34229
33667
|
};
|
|
34230
33668
|
var ICMinus = () => {
|
|
34231
|
-
return /* @__PURE__ */ (0,
|
|
33669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34232
33670
|
"svg",
|
|
34233
33671
|
{
|
|
34234
33672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34236,7 +33674,7 @@ var ICMinus = () => {
|
|
|
34236
33674
|
height: "16",
|
|
34237
33675
|
viewBox: "0 0 16 16",
|
|
34238
33676
|
fill: "none",
|
|
34239
|
-
children: /* @__PURE__ */ (0,
|
|
33677
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34240
33678
|
"path",
|
|
34241
33679
|
{
|
|
34242
33680
|
d: "M4 8H12",
|
|
@@ -34250,7 +33688,7 @@ var ICMinus = () => {
|
|
|
34250
33688
|
);
|
|
34251
33689
|
};
|
|
34252
33690
|
var ICCircle = () => {
|
|
34253
|
-
return /* @__PURE__ */ (0,
|
|
33691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34254
33692
|
"svg",
|
|
34255
33693
|
{
|
|
34256
33694
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34258,12 +33696,12 @@ var ICCircle = () => {
|
|
|
34258
33696
|
height: "8",
|
|
34259
33697
|
viewBox: "0 0 8 8",
|
|
34260
33698
|
fill: "none",
|
|
34261
|
-
children: /* @__PURE__ */ (0,
|
|
33699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
34262
33700
|
}
|
|
34263
33701
|
);
|
|
34264
33702
|
};
|
|
34265
33703
|
var ICCheck = () => {
|
|
34266
|
-
return /* @__PURE__ */ (0,
|
|
33704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34267
33705
|
"svg",
|
|
34268
33706
|
{
|
|
34269
33707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34271,7 +33709,7 @@ var ICCheck = () => {
|
|
|
34271
33709
|
height: "16",
|
|
34272
33710
|
viewBox: "0 0 16 16",
|
|
34273
33711
|
fill: "none",
|
|
34274
|
-
children: /* @__PURE__ */ (0,
|
|
33712
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
34275
33713
|
"path",
|
|
34276
33714
|
{
|
|
34277
33715
|
d: "M13.3408 5.23535L13.252 5.32324L6.88867 11.6875L6.7998 11.7764L6.71191 11.6875L2.89258 7.86914L2.80469 7.78125L2.89258 7.69238L3.74121 6.84375L3.83008 6.75586L6.7998 9.72559L12.2266 4.29785L12.3154 4.20996L13.3408 5.23535Z",
|
|
@@ -34285,7 +33723,7 @@ var ICCheck = () => {
|
|
|
34285
33723
|
};
|
|
34286
33724
|
|
|
34287
33725
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
34288
|
-
var
|
|
33726
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
34289
33727
|
var DateOptionField = (props) => {
|
|
34290
33728
|
const {
|
|
34291
33729
|
name: name2,
|
|
@@ -34296,19 +33734,19 @@ var DateOptionField = (props) => {
|
|
|
34296
33734
|
string,
|
|
34297
33735
|
onChange: onChange2
|
|
34298
33736
|
} = props;
|
|
34299
|
-
return /* @__PURE__ */ (0,
|
|
33737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
34300
33738
|
Controller,
|
|
34301
33739
|
{
|
|
34302
33740
|
name: name2 ?? "",
|
|
34303
33741
|
control: methods?.control,
|
|
34304
|
-
render: ({ field }) => /* @__PURE__ */ (0,
|
|
33742
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
34305
33743
|
"label",
|
|
34306
33744
|
{
|
|
34307
33745
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
34308
33746
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
34309
33747
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
34310
33748
|
children: [
|
|
34311
|
-
/* @__PURE__ */ (0,
|
|
33749
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
34312
33750
|
"input",
|
|
34313
33751
|
{
|
|
34314
33752
|
type: "checkbox",
|
|
@@ -34409,7 +33847,6 @@ var DateOptionField = (props) => {
|
|
|
34409
33847
|
RadioGroupField,
|
|
34410
33848
|
RatingStarField,
|
|
34411
33849
|
RemainingDaysField,
|
|
34412
|
-
RenderFiles,
|
|
34413
33850
|
ResetIcon,
|
|
34414
33851
|
Row,
|
|
34415
33852
|
Search,
|