@fctc/sme-widget-ui 1.9.5 → 1.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +657 -860
- package/dist/index.mjs +452 -654
- package/dist/widgets.d.mts +1 -8
- package/dist/widgets.d.ts +1 -8
- package/dist/widgets.js +657 -937
- package/dist/widgets.mjs +452 -731
- package/package.json +1 -1
package/dist/widgets.mjs
CHANGED
|
@@ -9857,86 +9857,9 @@ var DeleteIconDanger = () => {
|
|
|
9857
9857
|
|
|
9858
9858
|
// src/icons/image-icon.tsx
|
|
9859
9859
|
import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
9860
|
-
var ImageIcon = () => {
|
|
9861
|
-
return /* @__PURE__ */ jsxs21(
|
|
9862
|
-
"svg",
|
|
9863
|
-
{
|
|
9864
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9865
|
-
width: "22",
|
|
9866
|
-
height: "23",
|
|
9867
|
-
viewBox: "0 0 22 23",
|
|
9868
|
-
fill: "none",
|
|
9869
|
-
children: [
|
|
9870
|
-
/* @__PURE__ */ jsx41(
|
|
9871
|
-
"path",
|
|
9872
|
-
{
|
|
9873
|
-
d: "M22 5.36046V17.6395C21.9989 18.9283 21.4865 20.1639 20.5752 21.0752C19.6639 21.9865 18.4283 22.4989 17.1395 22.5H4.86047C4.32055 22.5016 3.78427 22.4116 3.27442 22.2339C2.31857 21.9038 1.48947 21.2838 0.902556 20.4603C0.315646 19.6368 0.000149319 18.6508 0 17.6395V5.36046C0.00108389 4.07172 0.513515 2.83607 1.42479 1.92479C2.33607 1.01351 3.57172 0.501084 4.86047 0.5H17.1395C18.4283 0.501084 19.6639 1.01351 20.5752 1.92479C21.4865 2.83607 21.9989 4.07172 22 5.36046Z",
|
|
9874
|
-
fill: "#E6F7FF"
|
|
9875
|
-
}
|
|
9876
|
-
),
|
|
9877
|
-
/* @__PURE__ */ jsx41(
|
|
9878
|
-
"path",
|
|
9879
|
-
{
|
|
9880
|
-
d: "M13.75 18.4995V22.2495H5C4.47235 22.251 3.94826 22.1631 3.45 21.9895C2.51588 21.6669 1.70561 21.061 1.13204 20.2562C0.558472 19.4514 0.250146 18.4878 0.25 17.4995V14.7695L3.41 12.6595C3.88229 12.3434 4.44129 12.1822 5.00937 12.1984C5.57745 12.2145 6.1264 12.4071 6.58 12.7495L10.07 15.3695L13.45 17.8995C13.5438 17.9687 13.6199 18.0592 13.672 18.1635C13.7241 18.2678 13.7509 18.3829 13.75 18.4995Z",
|
|
9881
|
-
fill: "#70D5B8"
|
|
9882
|
-
}
|
|
9883
|
-
),
|
|
9884
|
-
/* @__PURE__ */ jsx41(
|
|
9885
|
-
"path",
|
|
9886
|
-
{
|
|
9887
|
-
d: "M7.625 8.625C9.00571 8.625 10.125 7.50571 10.125 6.125C10.125 4.74429 9.00571 3.625 7.625 3.625C6.24429 3.625 5.125 4.74429 5.125 6.125C5.125 7.50571 6.24429 8.625 7.625 8.625Z",
|
|
9888
|
-
fill: "#FFD44D"
|
|
9889
|
-
}
|
|
9890
|
-
),
|
|
9891
|
-
/* @__PURE__ */ jsx41(
|
|
9892
|
-
"path",
|
|
9893
|
-
{
|
|
9894
|
-
d: "M21.7492 12.5393V17.4993C21.7482 18.7588 21.2474 19.9663 20.3568 20.8569C19.4662 21.7475 18.2587 22.2483 16.9992 22.2493H4.99922C4.47157 22.2509 3.94748 22.163 3.44922 21.9893L14.4492 10.9893C14.8555 10.5799 15.3808 10.3092 15.95 10.2158C16.5192 10.1224 17.1034 10.2112 17.6192 10.4693L21.7492 12.5393Z",
|
|
9895
|
-
fill: "#13BF8A"
|
|
9896
|
-
}
|
|
9897
|
-
)
|
|
9898
|
-
]
|
|
9899
|
-
}
|
|
9900
|
-
);
|
|
9901
|
-
};
|
|
9902
9860
|
|
|
9903
9861
|
// src/icons/video-icon.tsx
|
|
9904
9862
|
import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
9905
|
-
var VideoIcon = () => {
|
|
9906
|
-
return /* @__PURE__ */ jsxs22(
|
|
9907
|
-
"svg",
|
|
9908
|
-
{
|
|
9909
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9910
|
-
width: "22",
|
|
9911
|
-
height: "21",
|
|
9912
|
-
viewBox: "0 0 22 21",
|
|
9913
|
-
fill: "none",
|
|
9914
|
-
children: [
|
|
9915
|
-
/* @__PURE__ */ jsx42(
|
|
9916
|
-
"path",
|
|
9917
|
-
{
|
|
9918
|
-
d: "M22.0001 2.10859L22.0001 18.8914C22.0001 19.7798 21.2799 20.5 20.3915 20.5H1.61054C0.722142 20.5 0.00195312 19.7798 0.00195312 18.8914V2.10859C0.00195312 1.22019 0.722143 0.5 1.61054 0.5H20.3915C21.2799 0.5 22.0001 1.22019 22.0001 2.10859Z",
|
|
9919
|
-
fill: "#435E88"
|
|
9920
|
-
}
|
|
9921
|
-
),
|
|
9922
|
-
/* @__PURE__ */ jsx42(
|
|
9923
|
-
"path",
|
|
9924
|
-
{
|
|
9925
|
-
d: "M21.9974 2.10515L21.9981 18.8914C21.9981 19.7782 21.2797 20.5 20.3895 20.5H1.60863C0.721846 20.5 0 19.7782 0 18.8914L20.3888 0.5C21.2791 0.5 21.9974 1.21832 21.9974 2.10515Z",
|
|
9926
|
-
fill: "#33527D"
|
|
9927
|
-
}
|
|
9928
|
-
),
|
|
9929
|
-
/* @__PURE__ */ jsx42(
|
|
9930
|
-
"path",
|
|
9931
|
-
{
|
|
9932
|
-
d: "M3.96875 14.8779C4.15191 14.8782 4.30078 15.0267 4.30078 15.21V17.123C4.30078 17.3063 4.15191 17.4549 3.96875 17.4551H2.05469C1.87133 17.4551 1.72266 17.3064 1.72266 17.123V15.21C1.72266 15.0266 1.87133 14.8779 2.05469 14.8779H3.96875ZM19.9492 14.8779C20.1326 14.8779 20.2812 15.0266 20.2812 15.21V17.123C20.2812 17.3064 20.1326 17.4551 19.9492 17.4551H18.0361C17.8528 17.4551 17.7041 17.3064 17.7041 17.123V15.21C17.7041 15.0266 17.8528 14.8779 18.0361 14.8779H19.9492ZM8.59473 7.55566C8.59499 7.0953 9.10791 6.82103 9.49121 7.07617L14.1484 10.1758C14.4914 10.4041 14.4914 10.9084 14.1484 11.1367L9.49121 14.2363C9.10788 14.4915 8.59493 14.2173 8.59473 13.7568V7.55566ZM3.96875 10.6592C4.15175 10.6594 4.30052 10.8072 4.30078 10.9902V12.9043C4.30078 13.0875 4.15191 13.2361 3.96875 13.2363H2.05469C1.87133 13.2363 1.72266 13.0877 1.72266 12.9043V10.9902C1.72292 10.8071 1.87149 10.6592 2.05469 10.6592H3.96875ZM19.9492 10.6592C20.1324 10.6592 20.281 10.8071 20.2812 10.9902V12.9043C20.2812 13.0877 20.1326 13.2363 19.9492 13.2363H18.0361C17.8528 13.2363 17.7041 13.0877 17.7041 12.9043V10.9902C17.7044 10.8071 17.8529 10.6592 18.0361 10.6592H19.9492ZM3.96875 6.4375C4.15177 6.43773 4.30055 6.58651 4.30078 6.76953V8.68359C4.30078 8.86681 4.15191 9.0154 3.96875 9.01562H2.05469C1.87133 9.01562 1.72266 8.86695 1.72266 8.68359V6.76953C1.72289 6.58637 1.87147 6.4375 2.05469 6.4375H3.96875ZM19.9492 6.4375C20.1324 6.4375 20.281 6.58637 20.2812 6.76953V8.68359C20.2812 8.86695 20.1326 9.01562 19.9492 9.01562H18.0361C17.8528 9.01562 17.7041 8.86695 17.7041 8.68359V6.76953C17.7043 6.58637 17.8529 6.4375 18.0361 6.4375H19.9492ZM3.96875 2.21875C4.15181 2.21898 4.3006 2.36771 4.30078 2.55078V4.46484C4.30078 4.64806 4.15191 4.79665 3.96875 4.79688H2.05469C1.87133 4.79688 1.72266 4.6482 1.72266 4.46484V2.55078C1.72283 2.36757 1.87144 2.21875 2.05469 2.21875H3.96875ZM19.9492 2.21875C20.1325 2.21875 20.2811 2.36757 20.2812 2.55078V4.46484C20.2812 4.6482 20.1326 4.79688 19.9492 4.79688H18.0361C17.8528 4.79688 17.7041 4.6482 17.7041 4.46484V2.55078C17.7043 2.36757 17.8529 2.21875 18.0361 2.21875H19.9492Z",
|
|
9933
|
-
fill: "white"
|
|
9934
|
-
}
|
|
9935
|
-
)
|
|
9936
|
-
]
|
|
9937
|
-
}
|
|
9938
|
-
);
|
|
9939
|
-
};
|
|
9940
9863
|
|
|
9941
9864
|
// src/widgets/advanced/table/table-group.tsx
|
|
9942
9865
|
import { Fragment as Fragment2, jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
@@ -15877,207 +15800,6 @@ var LoadingSmall = () => {
|
|
|
15877
15800
|
)) }) }) }) });
|
|
15878
15801
|
};
|
|
15879
15802
|
|
|
15880
|
-
// src/widgets/common/render-files.tsx
|
|
15881
|
-
import { useEffect as useEffect11, useRef as useRef6, useState as useState10 } from "react";
|
|
15882
|
-
import { jsx as jsx69, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
15883
|
-
var FileItem = (props) => {
|
|
15884
|
-
const {
|
|
15885
|
-
filename,
|
|
15886
|
-
index: index4,
|
|
15887
|
-
handleRemoveFile,
|
|
15888
|
-
handleFileDownload,
|
|
15889
|
-
src,
|
|
15890
|
-
mimetype,
|
|
15891
|
-
size: size4,
|
|
15892
|
-
id,
|
|
15893
|
-
envFile,
|
|
15894
|
-
accessToken
|
|
15895
|
-
} = props;
|
|
15896
|
-
const [name2, ext] = filename.split(".");
|
|
15897
|
-
const shortName = name2.length > 12 ? name2.slice(0, 6) : name2;
|
|
15898
|
-
const [isOpen, setIsOpen] = useState10(false);
|
|
15899
|
-
const tooltipRef = useRef6(null);
|
|
15900
|
-
useEffect11(() => {
|
|
15901
|
-
const handleClickOutside = (event) => {
|
|
15902
|
-
if (tooltipRef.current && !tooltipRef.current.contains(event.target)) {
|
|
15903
|
-
setIsOpen(false);
|
|
15904
|
-
}
|
|
15905
|
-
};
|
|
15906
|
-
if (isOpen) {
|
|
15907
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
15908
|
-
} else {
|
|
15909
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
15910
|
-
}
|
|
15911
|
-
return () => {
|
|
15912
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
15913
|
-
};
|
|
15914
|
-
}, [isOpen]);
|
|
15915
|
-
const fileTypeIcon = {
|
|
15916
|
-
"application/pdf": /* @__PURE__ */ jsx69(PdfIcon, {}),
|
|
15917
|
-
"application/zip": /* @__PURE__ */ jsx69(ZipIcon, {}),
|
|
15918
|
-
"application/x-zip-compressed": /* @__PURE__ */ jsx69(ZipIcon, {}),
|
|
15919
|
-
"application/vnd.ms-excel": /* @__PURE__ */ jsx69(ExcelIcon, {}),
|
|
15920
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx69(ExcelIcon, {}),
|
|
15921
|
-
"image/png": /* @__PURE__ */ jsx69(ImageIcon, {}),
|
|
15922
|
-
"video/mp4": /* @__PURE__ */ jsx69(VideoIcon, {})
|
|
15923
|
-
};
|
|
15924
|
-
const renderFile = () => {
|
|
15925
|
-
return /* @__PURE__ */ jsxs44(
|
|
15926
|
-
"div",
|
|
15927
|
-
{
|
|
15928
|
-
onClick: (e3) => {
|
|
15929
|
-
if (accessToken) {
|
|
15930
|
-
e3?.stopPropagation();
|
|
15931
|
-
downloadFile(
|
|
15932
|
-
`${envFile}api/v2/web/content/${id}?download=true`,
|
|
15933
|
-
filename,
|
|
15934
|
-
accessToken
|
|
15935
|
-
);
|
|
15936
|
-
}
|
|
15937
|
-
},
|
|
15938
|
-
style: { backgroundColor: "#E5E7EB", cursor: "pointer" },
|
|
15939
|
-
className: "flex items-center p-2 gap-2 overflow-hidden rounded-lg",
|
|
15940
|
-
children: [
|
|
15941
|
-
fileTypeIcon[mimetype],
|
|
15942
|
-
/* @__PURE__ */ jsxs44("div", { ref: tooltipRef, className: "relative w-fit", children: [
|
|
15943
|
-
/* @__PURE__ */ jsxs44(
|
|
15944
|
-
"p",
|
|
15945
|
-
{
|
|
15946
|
-
className: "text-[#060606] font-medium text-[14px] cursor-pointer",
|
|
15947
|
-
onClick: () => setIsOpen((prev2) => !prev2),
|
|
15948
|
-
"data-tooltip-id": `field-help-${id}`,
|
|
15949
|
-
"data-tooltip-content": filename,
|
|
15950
|
-
children: [
|
|
15951
|
-
shortName + "...",
|
|
15952
|
-
".",
|
|
15953
|
-
ext
|
|
15954
|
-
]
|
|
15955
|
-
}
|
|
15956
|
-
),
|
|
15957
|
-
/* @__PURE__ */ jsx69(
|
|
15958
|
-
M,
|
|
15959
|
-
{
|
|
15960
|
-
id: `field-help-${id}`,
|
|
15961
|
-
isOpen,
|
|
15962
|
-
place: "top",
|
|
15963
|
-
positionStrategy: "fixed",
|
|
15964
|
-
style: {
|
|
15965
|
-
padding: "6px 12px",
|
|
15966
|
-
fontSize: "12px",
|
|
15967
|
-
borderRadius: "4px",
|
|
15968
|
-
maxWidth: "200%",
|
|
15969
|
-
whiteSpace: "wrap",
|
|
15970
|
-
fontWeight: 400,
|
|
15971
|
-
textTransform: "none",
|
|
15972
|
-
zIndex: 999
|
|
15973
|
-
}
|
|
15974
|
-
}
|
|
15975
|
-
),
|
|
15976
|
-
size4 && /* @__PURE__ */ jsx69("span", { className: "text-[12px] font-semibold text-[#666666]", children: formatFileSize(size4) })
|
|
15977
|
-
] })
|
|
15978
|
-
]
|
|
15979
|
-
}
|
|
15980
|
-
);
|
|
15981
|
-
};
|
|
15982
|
-
return /* @__PURE__ */ jsxs44(
|
|
15983
|
-
"div",
|
|
15984
|
-
{
|
|
15985
|
-
className: "flex relative items-center justify-between group rounded-md w-fit",
|
|
15986
|
-
children: [
|
|
15987
|
-
renderFile(),
|
|
15988
|
-
handleRemoveFile && /* @__PURE__ */ jsx69(
|
|
15989
|
-
"div",
|
|
15990
|
-
{
|
|
15991
|
-
style: {
|
|
15992
|
-
position: "absolute",
|
|
15993
|
-
top: 0,
|
|
15994
|
-
right: 0,
|
|
15995
|
-
backgroundColor: "rgba(0,0,0,0.2)"
|
|
15996
|
-
},
|
|
15997
|
-
onClick: () => handleRemoveFile(index4),
|
|
15998
|
-
className: "cursor-pointer p-2 hidden group-hover:block",
|
|
15999
|
-
children: /* @__PURE__ */ jsx69(DeleteIcon, {})
|
|
16000
|
-
}
|
|
16001
|
-
),
|
|
16002
|
-
!handleRemoveFile && /* @__PURE__ */ jsx69(
|
|
16003
|
-
"span",
|
|
16004
|
-
{
|
|
16005
|
-
style: {
|
|
16006
|
-
position: "absolute",
|
|
16007
|
-
top: 0,
|
|
16008
|
-
right: 0,
|
|
16009
|
-
backgroundColor: "rgba(0,0,0,0.2)",
|
|
16010
|
-
zIndex: 10
|
|
16011
|
-
},
|
|
16012
|
-
onClick: (e3) => handleFileDownload(e3, src, filename),
|
|
16013
|
-
className: "hidden group-hover:block cursor-pointer p-2 text-white ",
|
|
16014
|
-
children: /* @__PURE__ */ jsx69(DownloadIcon, {})
|
|
16015
|
-
}
|
|
16016
|
-
)
|
|
16017
|
-
]
|
|
16018
|
-
},
|
|
16019
|
-
index4
|
|
16020
|
-
);
|
|
16021
|
-
};
|
|
16022
|
-
var downloadFile = async (url, filename, accessToken) => {
|
|
16023
|
-
try {
|
|
16024
|
-
const response = accessToken ? await fetch(url, {
|
|
16025
|
-
method: "GET",
|
|
16026
|
-
headers: {
|
|
16027
|
-
Authorization: `Bearer ${accessToken}`
|
|
16028
|
-
}
|
|
16029
|
-
}) : await fetch(url);
|
|
16030
|
-
if (response.ok) {
|
|
16031
|
-
const blob = await response.blob();
|
|
16032
|
-
const urlBlob = window.URL.createObjectURL(blob);
|
|
16033
|
-
const link = document.createElement("a");
|
|
16034
|
-
link.href = urlBlob;
|
|
16035
|
-
link.download = filename || "downloaded-file";
|
|
16036
|
-
document.body.appendChild(link);
|
|
16037
|
-
link.click();
|
|
16038
|
-
document.body.removeChild(link);
|
|
16039
|
-
window.URL.revokeObjectURL(urlBlob);
|
|
16040
|
-
} else {
|
|
16041
|
-
console.error("File download failed:", response.statusText);
|
|
16042
|
-
}
|
|
16043
|
-
} catch (error2) {
|
|
16044
|
-
console.error("File download failed:", error2);
|
|
16045
|
-
}
|
|
16046
|
-
};
|
|
16047
|
-
var RenderFiles = ({
|
|
16048
|
-
selectedFiles,
|
|
16049
|
-
setSelectedFiles,
|
|
16050
|
-
envFile,
|
|
16051
|
-
accessToken
|
|
16052
|
-
}) => {
|
|
16053
|
-
const handleRemoveFile = (index4) => {
|
|
16054
|
-
if (setSelectedFiles) {
|
|
16055
|
-
const files = selectedFiles.filter((_2, i3) => i3 !== index4);
|
|
16056
|
-
setSelectedFiles(files);
|
|
16057
|
-
}
|
|
16058
|
-
};
|
|
16059
|
-
const handleFileDownload = (e3, url, name2) => {
|
|
16060
|
-
e3.stopPropagation();
|
|
16061
|
-
downloadFile(url, name2);
|
|
16062
|
-
};
|
|
16063
|
-
return /* @__PURE__ */ jsx69("div", { className: "flex flex-wrap w-full gap-2", children: selectedFiles.map((file, index4) => {
|
|
16064
|
-
return /* @__PURE__ */ jsx69("div", { className: "relative group/file", children: /* @__PURE__ */ jsx69(
|
|
16065
|
-
FileItem,
|
|
16066
|
-
{
|
|
16067
|
-
...file,
|
|
16068
|
-
src: file?.datas,
|
|
16069
|
-
filename: file?.display_name ?? file?.name ?? file?.filename,
|
|
16070
|
-
id: file?.id,
|
|
16071
|
-
index: index4,
|
|
16072
|
-
handleRemoveFile: setSelectedFiles && handleRemoveFile,
|
|
16073
|
-
handleFileDownload,
|
|
16074
|
-
envFile,
|
|
16075
|
-
accessToken
|
|
16076
|
-
}
|
|
16077
|
-
) }, file?.id ?? index4);
|
|
16078
|
-
}) });
|
|
16079
|
-
};
|
|
16080
|
-
|
|
16081
15803
|
// node_modules/react-toastify/dist/index.mjs
|
|
16082
15804
|
import { isValidElement as $t } from "react";
|
|
16083
15805
|
import ut, { useEffect as Rt, useLayoutEffect as Bt, useRef as zt } from "react";
|
|
@@ -16264,7 +15986,7 @@ var po = $2(K("zoom"));
|
|
|
16264
15986
|
var uo = $2(K("flip"));
|
|
16265
15987
|
|
|
16266
15988
|
// src/widgets/common/select-files.tsx
|
|
16267
|
-
import { Fragment as Fragment14, jsx as
|
|
15989
|
+
import { Fragment as Fragment14, jsx as jsx69, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
16268
15990
|
var ButtonSelectFiles = ({
|
|
16269
15991
|
fileInputRef,
|
|
16270
15992
|
selectedFiles,
|
|
@@ -16368,8 +16090,8 @@ var ButtonSelectFiles = ({
|
|
|
16368
16090
|
await handleUpload(formData, serivce, xNode);
|
|
16369
16091
|
}
|
|
16370
16092
|
};
|
|
16371
|
-
return /* @__PURE__ */
|
|
16372
|
-
isPending ? /* @__PURE__ */
|
|
16093
|
+
return /* @__PURE__ */ jsxs44(Fragment14, { children: [
|
|
16094
|
+
isPending ? /* @__PURE__ */ jsx69(Fragment14, { children: /* @__PURE__ */ jsx69("span", { className: "text-sm text-gray-500", children: t3("\u0110ang t\u1EA3i l\xEAn...") }) }) : /* @__PURE__ */ jsxs44(
|
|
16373
16095
|
"button",
|
|
16374
16096
|
{
|
|
16375
16097
|
type: "button",
|
|
@@ -16377,12 +16099,12 @@ var ButtonSelectFiles = ({
|
|
|
16377
16099
|
className: `w-fit h-[24px] flex gap-2 items-center text-black rounded-full overflow-hidden transition-all ${isPending ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
16378
16100
|
onClick: () => fileInputRef.current.click(),
|
|
16379
16101
|
children: [
|
|
16380
|
-
/* @__PURE__ */
|
|
16381
|
-
isText && /* @__PURE__ */
|
|
16102
|
+
/* @__PURE__ */ jsx69(AttachIcon, {}),
|
|
16103
|
+
isText && /* @__PURE__ */ jsx69("span", { children: t3("upload_file_placeholder") })
|
|
16382
16104
|
]
|
|
16383
16105
|
}
|
|
16384
16106
|
),
|
|
16385
|
-
/* @__PURE__ */
|
|
16107
|
+
/* @__PURE__ */ jsx69(
|
|
16386
16108
|
"input",
|
|
16387
16109
|
{
|
|
16388
16110
|
type: "file",
|
|
@@ -16397,11 +16119,11 @@ var ButtonSelectFiles = ({
|
|
|
16397
16119
|
};
|
|
16398
16120
|
|
|
16399
16121
|
// src/widgets/common/video-player.tsx
|
|
16400
|
-
import { useRef as
|
|
16401
|
-
import { jsx as
|
|
16122
|
+
import { useRef as useRef6, useState as useState10 } from "react";
|
|
16123
|
+
import { jsx as jsx70, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
16402
16124
|
var VideoPlayer = ({ src }) => {
|
|
16403
|
-
const [isPlaying, setIsPlaying] =
|
|
16404
|
-
const videoRef =
|
|
16125
|
+
const [isPlaying, setIsPlaying] = useState10(false);
|
|
16126
|
+
const videoRef = useRef6(null);
|
|
16405
16127
|
const handlePlayPause = () => {
|
|
16406
16128
|
if (videoRef.current) {
|
|
16407
16129
|
if (isPlaying) {
|
|
@@ -16425,8 +16147,8 @@ var VideoPlayer = ({ src }) => {
|
|
|
16425
16147
|
}
|
|
16426
16148
|
}
|
|
16427
16149
|
};
|
|
16428
|
-
return /* @__PURE__ */
|
|
16429
|
-
/* @__PURE__ */
|
|
16150
|
+
return /* @__PURE__ */ jsxs45("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: [
|
|
16151
|
+
/* @__PURE__ */ jsx70(
|
|
16430
16152
|
"video",
|
|
16431
16153
|
{
|
|
16432
16154
|
ref: videoRef,
|
|
@@ -16438,13 +16160,13 @@ var VideoPlayer = ({ src }) => {
|
|
|
16438
16160
|
children: "Your browser does not support the video tag."
|
|
16439
16161
|
}
|
|
16440
16162
|
),
|
|
16441
|
-
/* @__PURE__ */
|
|
16442
|
-
/* @__PURE__ */
|
|
16163
|
+
/* @__PURE__ */ jsx70("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50 p-2" }),
|
|
16164
|
+
/* @__PURE__ */ jsx70("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__ */ jsx70("button", { type: "button", onClick: handleFullScreen, children: /* @__PURE__ */ jsx70(PlayIcon, {}) }) })
|
|
16443
16165
|
] });
|
|
16444
16166
|
};
|
|
16445
16167
|
|
|
16446
16168
|
// src/widgets/basic/avatar-field/avatar.tsx
|
|
16447
|
-
import { Fragment as Fragment15, jsx as
|
|
16169
|
+
import { Fragment as Fragment15, jsx as jsx71, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
16448
16170
|
var AvatarField = (props) => {
|
|
16449
16171
|
const {
|
|
16450
16172
|
isForm = false,
|
|
@@ -16468,8 +16190,8 @@ var AvatarField = (props) => {
|
|
|
16468
16190
|
color: textColor,
|
|
16469
16191
|
fontSize: `${size4 / 2.5}px`
|
|
16470
16192
|
};
|
|
16471
|
-
return /* @__PURE__ */
|
|
16472
|
-
isForm && allowShowDetail && /* @__PURE__ */
|
|
16193
|
+
return /* @__PURE__ */ jsxs46(Fragment15, { children: [
|
|
16194
|
+
isForm && allowShowDetail && /* @__PURE__ */ jsx71(
|
|
16473
16195
|
ModalDetail,
|
|
16474
16196
|
{
|
|
16475
16197
|
idToolTip: `avatar-widget-id-${id}`,
|
|
@@ -16480,7 +16202,7 @@ var AvatarField = (props) => {
|
|
|
16480
16202
|
place: "top-start"
|
|
16481
16203
|
}
|
|
16482
16204
|
),
|
|
16483
|
-
allowShowDetail && /* @__PURE__ */
|
|
16205
|
+
allowShowDetail && /* @__PURE__ */ jsx71(
|
|
16484
16206
|
M,
|
|
16485
16207
|
{
|
|
16486
16208
|
id: `avatar-widget-id-${id}`,
|
|
@@ -16489,7 +16211,7 @@ var AvatarField = (props) => {
|
|
|
16489
16211
|
className: "z-20"
|
|
16490
16212
|
}
|
|
16491
16213
|
),
|
|
16492
|
-
avatarSrc ? /* @__PURE__ */
|
|
16214
|
+
avatarSrc ? /* @__PURE__ */ jsx71(
|
|
16493
16215
|
"img",
|
|
16494
16216
|
{
|
|
16495
16217
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -16497,7 +16219,7 @@ var AvatarField = (props) => {
|
|
|
16497
16219
|
className: "uppercase font-medium rounded-md flex items-center justify-center cursor-pointer size-[26px]",
|
|
16498
16220
|
alt: "Avatar"
|
|
16499
16221
|
}
|
|
16500
|
-
) : /* @__PURE__ */
|
|
16222
|
+
) : /* @__PURE__ */ jsx71("div", { children: /* @__PURE__ */ jsx71(
|
|
16501
16223
|
"div",
|
|
16502
16224
|
{
|
|
16503
16225
|
"data-tooltip-id": `avatar-widget-id-${id}`,
|
|
@@ -16510,7 +16232,7 @@ var AvatarField = (props) => {
|
|
|
16510
16232
|
};
|
|
16511
16233
|
|
|
16512
16234
|
// src/widgets/basic/binary-field/binary.tsx
|
|
16513
|
-
import { jsx as
|
|
16235
|
+
import { jsx as jsx72, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
16514
16236
|
var BinaryField = (props) => {
|
|
16515
16237
|
const {
|
|
16516
16238
|
name: name2,
|
|
@@ -16533,7 +16255,7 @@ var BinaryField = (props) => {
|
|
|
16533
16255
|
image
|
|
16534
16256
|
} = props;
|
|
16535
16257
|
const { t: t3 } = useI18n();
|
|
16536
|
-
return /* @__PURE__ */
|
|
16258
|
+
return /* @__PURE__ */ jsx72(
|
|
16537
16259
|
Controller,
|
|
16538
16260
|
{
|
|
16539
16261
|
name: name2 ?? "",
|
|
@@ -16543,13 +16265,13 @@ var BinaryField = (props) => {
|
|
|
16543
16265
|
},
|
|
16544
16266
|
render: ({ field }) => {
|
|
16545
16267
|
const renderImage = initialImage || selectedImage;
|
|
16546
|
-
return /* @__PURE__ */
|
|
16268
|
+
return /* @__PURE__ */ jsx72(
|
|
16547
16269
|
"div",
|
|
16548
16270
|
{
|
|
16549
16271
|
ref: binaryRef,
|
|
16550
16272
|
className: "flex w-fit items-center gap-4 rounded-lg shadow-md mb-11",
|
|
16551
|
-
children: renderImage ? /* @__PURE__ */
|
|
16552
|
-
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */
|
|
16273
|
+
children: renderImage ? /* @__PURE__ */ jsxs47("div", { className: "relative group", children: [
|
|
16274
|
+
renderImage && checkIsImageLink2(renderImage) ? /* @__PURE__ */ jsx72(
|
|
16553
16275
|
"img",
|
|
16554
16276
|
{
|
|
16555
16277
|
style: {
|
|
@@ -16560,7 +16282,7 @@ var BinaryField = (props) => {
|
|
|
16560
16282
|
alt: "Selected",
|
|
16561
16283
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
16562
16284
|
}
|
|
16563
|
-
) : renderImage ? /* @__PURE__ */
|
|
16285
|
+
) : renderImage ? /* @__PURE__ */ jsx72(
|
|
16564
16286
|
"img",
|
|
16565
16287
|
{
|
|
16566
16288
|
style: {
|
|
@@ -16571,17 +16293,17 @@ var BinaryField = (props) => {
|
|
|
16571
16293
|
alt: "Selected",
|
|
16572
16294
|
className: "h-32 w-32 max-w-fit rounded-lg object-contain"
|
|
16573
16295
|
}
|
|
16574
|
-
) : /* @__PURE__ */
|
|
16575
|
-
!isInsideTable && !readonly && /* @__PURE__ */
|
|
16296
|
+
) : /* @__PURE__ */ jsx72(PlaceHolderIcon, {}),
|
|
16297
|
+
!isInsideTable && !readonly && /* @__PURE__ */ jsx72(
|
|
16576
16298
|
"button",
|
|
16577
16299
|
{
|
|
16578
16300
|
type: "button",
|
|
16579
16301
|
onClick: () => handleRemoveImage(field.onChange),
|
|
16580
16302
|
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",
|
|
16581
|
-
children: /* @__PURE__ */
|
|
16303
|
+
children: /* @__PURE__ */ jsx72(DeleteIcon, {})
|
|
16582
16304
|
}
|
|
16583
16305
|
)
|
|
16584
|
-
] }) : /* @__PURE__ */
|
|
16306
|
+
] }) : /* @__PURE__ */ jsxs47(
|
|
16585
16307
|
"label",
|
|
16586
16308
|
{
|
|
16587
16309
|
htmlFor: inputId,
|
|
@@ -16591,7 +16313,7 @@ var BinaryField = (props) => {
|
|
|
16591
16313
|
},
|
|
16592
16314
|
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"}`,
|
|
16593
16315
|
children: [
|
|
16594
|
-
/* @__PURE__ */
|
|
16316
|
+
/* @__PURE__ */ jsx72(
|
|
16595
16317
|
"input",
|
|
16596
16318
|
{
|
|
16597
16319
|
id: inputId,
|
|
@@ -16603,8 +16325,8 @@ var BinaryField = (props) => {
|
|
|
16603
16325
|
className: "hidden z-10 relative"
|
|
16604
16326
|
}
|
|
16605
16327
|
),
|
|
16606
|
-
/* @__PURE__ */
|
|
16607
|
-
/* @__PURE__ */
|
|
16328
|
+
/* @__PURE__ */ jsx72("img", { src: image, alt: "", className: "z-0 relative" }),
|
|
16329
|
+
/* @__PURE__ */ jsx72(
|
|
16608
16330
|
"div",
|
|
16609
16331
|
{
|
|
16610
16332
|
className: "absolute size-8 bg-white rounded-full flex justify-center items-center z-20",
|
|
@@ -16613,7 +16335,7 @@ var BinaryField = (props) => {
|
|
|
16613
16335
|
left: "-8px",
|
|
16614
16336
|
boxShadow: "0 1px 2px 0 rgba(228, 229, 231, 0.24)"
|
|
16615
16337
|
},
|
|
16616
|
-
children: /* @__PURE__ */
|
|
16338
|
+
children: /* @__PURE__ */ jsx72(
|
|
16617
16339
|
"svg",
|
|
16618
16340
|
{
|
|
16619
16341
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16621,7 +16343,7 @@ var BinaryField = (props) => {
|
|
|
16621
16343
|
height: "14",
|
|
16622
16344
|
viewBox: "0 0 14 14",
|
|
16623
16345
|
fill: "none",
|
|
16624
|
-
children: /* @__PURE__ */
|
|
16346
|
+
children: /* @__PURE__ */ jsx72(
|
|
16625
16347
|
"path",
|
|
16626
16348
|
{
|
|
16627
16349
|
"fill-rule": "evenodd",
|
|
@@ -16645,7 +16367,7 @@ var BinaryField = (props) => {
|
|
|
16645
16367
|
};
|
|
16646
16368
|
|
|
16647
16369
|
// src/widgets/basic/button-badge-field/button-badge.tsx
|
|
16648
|
-
import { jsx as
|
|
16370
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
16649
16371
|
var typeStyles = {
|
|
16650
16372
|
primary: {
|
|
16651
16373
|
backgroundColor: "#3b82f6",
|
|
@@ -16720,11 +16442,11 @@ var ButtonBadgeField = (props) => {
|
|
|
16720
16442
|
return item && type === "selection" && Array.isArray(item) ? item[1] : item;
|
|
16721
16443
|
};
|
|
16722
16444
|
const label = getLabel(defaultValue ?? value);
|
|
16723
|
-
return label ? /* @__PURE__ */
|
|
16445
|
+
return label ? /* @__PURE__ */ jsx73("div", { style: { ...baseStyle, ...getType() }, children: label }) : null;
|
|
16724
16446
|
};
|
|
16725
16447
|
|
|
16726
16448
|
// src/widgets/basic/button-field/button.tsx
|
|
16727
|
-
import { Fragment as Fragment16, jsx as
|
|
16449
|
+
import { Fragment as Fragment16, jsx as jsx74, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
16728
16450
|
var ButtonField = (props) => {
|
|
16729
16451
|
const {
|
|
16730
16452
|
func,
|
|
@@ -16735,7 +16457,7 @@ var ButtonField = (props) => {
|
|
|
16735
16457
|
type = "submit"
|
|
16736
16458
|
} = props;
|
|
16737
16459
|
const { t: t3 } = useI18n();
|
|
16738
|
-
return /* @__PURE__ */
|
|
16460
|
+
return /* @__PURE__ */ jsx74(Fragment16, { children: !loading ? /* @__PURE__ */ jsx74(
|
|
16739
16461
|
"button",
|
|
16740
16462
|
{
|
|
16741
16463
|
type,
|
|
@@ -16744,7 +16466,7 @@ var ButtonField = (props) => {
|
|
|
16744
16466
|
onClick: func,
|
|
16745
16467
|
children: t3(content)
|
|
16746
16468
|
}
|
|
16747
|
-
) : /* @__PURE__ */
|
|
16469
|
+
) : /* @__PURE__ */ jsxs48(
|
|
16748
16470
|
"button",
|
|
16749
16471
|
{
|
|
16750
16472
|
type,
|
|
@@ -16753,15 +16475,15 @@ var ButtonField = (props) => {
|
|
|
16753
16475
|
children: [
|
|
16754
16476
|
t3("loading"),
|
|
16755
16477
|
" ",
|
|
16756
|
-
/* @__PURE__ */
|
|
16478
|
+
/* @__PURE__ */ jsx74(LoadingIcon, {})
|
|
16757
16479
|
]
|
|
16758
16480
|
}
|
|
16759
16481
|
) });
|
|
16760
16482
|
};
|
|
16761
16483
|
|
|
16762
16484
|
// src/widgets/basic/char-field/char.tsx
|
|
16763
|
-
import { useEffect as
|
|
16764
|
-
import { Fragment as Fragment17, jsx as
|
|
16485
|
+
import { useEffect as useEffect11, useMemo as useMemo4 } from "react";
|
|
16486
|
+
import { Fragment as Fragment17, jsx as jsx75, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
16765
16487
|
var WIDGET_AUTO_COMPUTE_DEPEND = "auto_compute_depend_field";
|
|
16766
16488
|
var CharField = (props) => {
|
|
16767
16489
|
const {
|
|
@@ -16789,9 +16511,9 @@ var CharField = (props) => {
|
|
|
16789
16511
|
} = props;
|
|
16790
16512
|
if (!isForm && !isEditTable) {
|
|
16791
16513
|
const propValue = value || defaultValue;
|
|
16792
|
-
return /* @__PURE__ */
|
|
16514
|
+
return /* @__PURE__ */ jsx75("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
16793
16515
|
}
|
|
16794
|
-
return /* @__PURE__ */
|
|
16516
|
+
return /* @__PURE__ */ jsx75(
|
|
16795
16517
|
Controller,
|
|
16796
16518
|
{
|
|
16797
16519
|
name: name2 ?? "",
|
|
@@ -16819,12 +16541,12 @@ var CharField = (props) => {
|
|
|
16819
16541
|
fieldState: { error: error2, isDirty }
|
|
16820
16542
|
}) => {
|
|
16821
16543
|
const { setError, clearErrors } = methods;
|
|
16822
|
-
|
|
16544
|
+
useEffect11(() => {
|
|
16823
16545
|
if (value2) {
|
|
16824
16546
|
clearErrors(name2);
|
|
16825
16547
|
}
|
|
16826
16548
|
}, [value2, clearErrors, name2]);
|
|
16827
|
-
|
|
16549
|
+
useEffect11(() => {
|
|
16828
16550
|
if (widget !== WIDGET_AUTO_COMPUTE_DEPEND) return;
|
|
16829
16551
|
const depValue = formValues?.[options2?.depend_field]?.[options2?.field_name];
|
|
16830
16552
|
const currentValue = methods?.getValues(name2);
|
|
@@ -16845,8 +16567,8 @@ var CharField = (props) => {
|
|
|
16845
16567
|
}
|
|
16846
16568
|
return "";
|
|
16847
16569
|
}, [widget, formValues]);
|
|
16848
|
-
return /* @__PURE__ */
|
|
16849
|
-
/* @__PURE__ */
|
|
16570
|
+
return /* @__PURE__ */ jsxs49(Fragment17, { children: [
|
|
16571
|
+
/* @__PURE__ */ jsx75(
|
|
16850
16572
|
"input",
|
|
16851
16573
|
{
|
|
16852
16574
|
value: displayValue ?? "",
|
|
@@ -16907,7 +16629,7 @@ var CharField = (props) => {
|
|
|
16907
16629
|
`
|
|
16908
16630
|
}
|
|
16909
16631
|
),
|
|
16910
|
-
isEditTable ? /* @__PURE__ */
|
|
16632
|
+
isEditTable ? /* @__PURE__ */ jsx75(Fragment17, {}) : /* @__PURE__ */ jsx75(Fragment17, { children: error2 && /* @__PURE__ */ jsx75("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message }) })
|
|
16911
16633
|
] });
|
|
16912
16634
|
}
|
|
16913
16635
|
}
|
|
@@ -16915,7 +16637,7 @@ var CharField = (props) => {
|
|
|
16915
16637
|
};
|
|
16916
16638
|
|
|
16917
16639
|
// src/widgets/basic/checkbox-field/checkbox.tsx
|
|
16918
|
-
import { jsx as
|
|
16640
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
16919
16641
|
var CheckboxField = (props) => {
|
|
16920
16642
|
const {
|
|
16921
16643
|
name: name2,
|
|
@@ -16930,9 +16652,9 @@ var CheckboxField = (props) => {
|
|
|
16930
16652
|
} = props;
|
|
16931
16653
|
if (!isForm) {
|
|
16932
16654
|
if (name2 === "is_active" || name2 === "active") {
|
|
16933
|
-
return /* @__PURE__ */
|
|
16655
|
+
return /* @__PURE__ */ jsx76(ActiveBadgeField, { type: value });
|
|
16934
16656
|
} else {
|
|
16935
|
-
return /* @__PURE__ */
|
|
16657
|
+
return /* @__PURE__ */ jsx76(
|
|
16936
16658
|
"input",
|
|
16937
16659
|
{
|
|
16938
16660
|
type: "checkbox",
|
|
@@ -16943,12 +16665,12 @@ var CheckboxField = (props) => {
|
|
|
16943
16665
|
);
|
|
16944
16666
|
}
|
|
16945
16667
|
}
|
|
16946
|
-
return /* @__PURE__ */
|
|
16668
|
+
return /* @__PURE__ */ jsx76(
|
|
16947
16669
|
Controller,
|
|
16948
16670
|
{
|
|
16949
16671
|
name: name2 ?? "",
|
|
16950
16672
|
control: methods?.control,
|
|
16951
|
-
render: ({ field }) => /* @__PURE__ */
|
|
16673
|
+
render: ({ field }) => /* @__PURE__ */ jsx76(
|
|
16952
16674
|
"div",
|
|
16953
16675
|
{
|
|
16954
16676
|
className: "flex items-center gap-2",
|
|
@@ -16961,7 +16683,7 @@ var CheckboxField = (props) => {
|
|
|
16961
16683
|
onChange2(name2 ?? "", checked);
|
|
16962
16684
|
}
|
|
16963
16685
|
},
|
|
16964
|
-
children: /* @__PURE__ */
|
|
16686
|
+
children: /* @__PURE__ */ jsx76(
|
|
16965
16687
|
"input",
|
|
16966
16688
|
{
|
|
16967
16689
|
...field,
|
|
@@ -16988,24 +16710,24 @@ var CheckboxField = (props) => {
|
|
|
16988
16710
|
};
|
|
16989
16711
|
|
|
16990
16712
|
// src/widgets/basic/color-field/color-wrapper.tsx
|
|
16991
|
-
import { useEffect as
|
|
16992
|
-
import { Fragment as Fragment18, jsx as
|
|
16713
|
+
import { useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
|
|
16714
|
+
import { Fragment as Fragment18, jsx as jsx77, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
16993
16715
|
var ColorWrapper = (props) => {
|
|
16994
16716
|
const {
|
|
16995
16717
|
colors: colors2,
|
|
16996
16718
|
defaultColor,
|
|
16997
16719
|
savePickColor
|
|
16998
16720
|
} = props;
|
|
16999
|
-
const [selectedColor, setSelectedColor] =
|
|
17000
|
-
const [showFullColors, setIsShowFullColor] =
|
|
17001
|
-
const pickColorsRef =
|
|
17002
|
-
|
|
16721
|
+
const [selectedColor, setSelectedColor] = useState11(colors2[defaultColor]);
|
|
16722
|
+
const [showFullColors, setIsShowFullColor] = useState11(false);
|
|
16723
|
+
const pickColorsRef = useRef7(null);
|
|
16724
|
+
useEffect12(() => {
|
|
17003
16725
|
setSelectedColor(colors2[defaultColor]);
|
|
17004
16726
|
}, [defaultColor]);
|
|
17005
16727
|
const handleShowFullColors = () => {
|
|
17006
16728
|
setIsShowFullColor(!showFullColors);
|
|
17007
16729
|
};
|
|
17008
|
-
|
|
16730
|
+
useEffect12(() => {
|
|
17009
16731
|
const handleClickOutside = (event) => {
|
|
17010
16732
|
if (pickColorsRef.current && !pickColorsRef.current.contains(event.target)) {
|
|
17011
16733
|
setIsShowFullColor(false);
|
|
@@ -17016,8 +16738,8 @@ var ColorWrapper = (props) => {
|
|
|
17016
16738
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
17017
16739
|
};
|
|
17018
16740
|
}, []);
|
|
17019
|
-
return /* @__PURE__ */
|
|
17020
|
-
/* @__PURE__ */
|
|
16741
|
+
return /* @__PURE__ */ jsx77("div", { ref: pickColorsRef, children: showFullColors ? /* @__PURE__ */ jsx77("div", { className: "flex gap-2", children: COLORS.map((color) => /* @__PURE__ */ jsxs50("div", { children: [
|
|
16742
|
+
/* @__PURE__ */ jsx77(
|
|
17021
16743
|
"button",
|
|
17022
16744
|
{
|
|
17023
16745
|
"data-tooltip-id": `${color?.color}${color?.id}`,
|
|
@@ -17031,7 +16753,7 @@ var ColorWrapper = (props) => {
|
|
|
17031
16753
|
}
|
|
17032
16754
|
}
|
|
17033
16755
|
),
|
|
17034
|
-
/* @__PURE__ */
|
|
16756
|
+
/* @__PURE__ */ jsx77(
|
|
17035
16757
|
M,
|
|
17036
16758
|
{
|
|
17037
16759
|
className: "",
|
|
@@ -17040,8 +16762,8 @@ var ColorWrapper = (props) => {
|
|
|
17040
16762
|
content: i18n_default.t(color?.name)
|
|
17041
16763
|
}
|
|
17042
16764
|
)
|
|
17043
|
-
] }, color?.id)) }) : /* @__PURE__ */
|
|
17044
|
-
/* @__PURE__ */
|
|
16765
|
+
] }, color?.id)) }) : /* @__PURE__ */ jsxs50(Fragment18, { children: [
|
|
16766
|
+
/* @__PURE__ */ jsx77(
|
|
17045
16767
|
"button",
|
|
17046
16768
|
{
|
|
17047
16769
|
"data-tooltip-id": `${selectedColor?.id}${selectedColor?.name}`,
|
|
@@ -17054,7 +16776,7 @@ var ColorWrapper = (props) => {
|
|
|
17054
16776
|
style: { backgroundColor: selectedColor?.color }
|
|
17055
16777
|
}
|
|
17056
16778
|
),
|
|
17057
|
-
/* @__PURE__ */
|
|
16779
|
+
/* @__PURE__ */ jsx77(
|
|
17058
16780
|
M,
|
|
17059
16781
|
{
|
|
17060
16782
|
place: "top",
|
|
@@ -17066,13 +16788,13 @@ var ColorWrapper = (props) => {
|
|
|
17066
16788
|
};
|
|
17067
16789
|
|
|
17068
16790
|
// src/widgets/basic/color-field/color.tsx
|
|
17069
|
-
import { jsx as
|
|
16791
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
17070
16792
|
var ColorField = (props) => {
|
|
17071
16793
|
const { value, isForm, name: name2, methods, onChange: onChange2, savePickColor } = props;
|
|
17072
16794
|
if (!isForm) {
|
|
17073
|
-
return /* @__PURE__ */
|
|
16795
|
+
return /* @__PURE__ */ jsx78(ColorWrapper, { savePickColor, defaultColor: value, colors: COLORS });
|
|
17074
16796
|
}
|
|
17075
|
-
return /* @__PURE__ */
|
|
16797
|
+
return /* @__PURE__ */ jsx78(
|
|
17076
16798
|
Controller,
|
|
17077
16799
|
{
|
|
17078
16800
|
name: name2 ?? "",
|
|
@@ -17082,7 +16804,7 @@ var ColorField = (props) => {
|
|
|
17082
16804
|
field.onChange(color?.id);
|
|
17083
16805
|
onChange2 && onChange2(name2 ?? "", color?.id);
|
|
17084
16806
|
};
|
|
17085
|
-
return /* @__PURE__ */
|
|
16807
|
+
return /* @__PURE__ */ jsx78(
|
|
17086
16808
|
ColorWrapper,
|
|
17087
16809
|
{
|
|
17088
16810
|
savePickColor: handlePickColorChange,
|
|
@@ -17096,8 +16818,8 @@ var ColorField = (props) => {
|
|
|
17096
16818
|
};
|
|
17097
16819
|
|
|
17098
16820
|
// src/widgets/basic/copy-link-buttton/copy-link.tsx
|
|
17099
|
-
import { useEffect as
|
|
17100
|
-
import { jsx as
|
|
16821
|
+
import { useEffect as useEffect13 } from "react";
|
|
16822
|
+
import { jsx as jsx79, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
17101
16823
|
var CopyLinkButtonField = (props) => {
|
|
17102
16824
|
const {
|
|
17103
16825
|
isForm,
|
|
@@ -17116,9 +16838,9 @@ var CopyLinkButtonField = (props) => {
|
|
|
17116
16838
|
} = props;
|
|
17117
16839
|
const { t: t3 } = useI18n();
|
|
17118
16840
|
if (!isForm) {
|
|
17119
|
-
return /* @__PURE__ */
|
|
16841
|
+
return /* @__PURE__ */ jsx79("div", { className: "truncate max-w-[300px]", children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
|
|
17120
16842
|
}
|
|
17121
|
-
return /* @__PURE__ */
|
|
16843
|
+
return /* @__PURE__ */ jsx79(
|
|
17122
16844
|
Controller,
|
|
17123
16845
|
{
|
|
17124
16846
|
name: name2 ?? "",
|
|
@@ -17131,13 +16853,13 @@ var CopyLinkButtonField = (props) => {
|
|
|
17131
16853
|
fieldState: { error: error2 }
|
|
17132
16854
|
}) => {
|
|
17133
16855
|
const { setError, clearErrors } = methods;
|
|
17134
|
-
|
|
16856
|
+
useEffect13(() => {
|
|
17135
16857
|
if (value) {
|
|
17136
16858
|
clearErrors(name2);
|
|
17137
16859
|
}
|
|
17138
16860
|
}, [value]);
|
|
17139
|
-
return /* @__PURE__ */
|
|
17140
|
-
/* @__PURE__ */
|
|
16861
|
+
return /* @__PURE__ */ jsxs51("div", { className: "relative", children: [
|
|
16862
|
+
/* @__PURE__ */ jsxs51(
|
|
17141
16863
|
"div",
|
|
17142
16864
|
{
|
|
17143
16865
|
"aria-disabled": readonly,
|
|
@@ -17146,7 +16868,7 @@ var CopyLinkButtonField = (props) => {
|
|
|
17146
16868
|
${!isEditTable ? isForm ? "bg-white border-input-primary rounded-[10px]" : "" : `border-transparent bg-transparent ${readonly ? "" : "border-b-primary"}`}
|
|
17147
16869
|
${error2 && isEditTable && "focus:border-b-[1px] focus:border-[#de4747] hover:border-b-[1px] hover:border-[#de4747]"}`,
|
|
17148
16870
|
children: [
|
|
17149
|
-
/* @__PURE__ */
|
|
16871
|
+
/* @__PURE__ */ jsx79(
|
|
17150
16872
|
"input",
|
|
17151
16873
|
{
|
|
17152
16874
|
value: typeof value === "string" || typeof value === "number" ? String(value) : "",
|
|
@@ -17187,19 +16909,19 @@ var CopyLinkButtonField = (props) => {
|
|
|
17187
16909
|
`
|
|
17188
16910
|
}
|
|
17189
16911
|
),
|
|
17190
|
-
readonly && value && /* @__PURE__ */
|
|
16912
|
+
readonly && value && /* @__PURE__ */ jsx79(
|
|
17191
16913
|
"button",
|
|
17192
16914
|
{
|
|
17193
16915
|
className: "cursor-pointer",
|
|
17194
16916
|
type: "button",
|
|
17195
16917
|
onClick: () => handleCopyToClipboard(propValue),
|
|
17196
|
-
children: isCopied ? /* @__PURE__ */
|
|
16918
|
+
children: isCopied ? /* @__PURE__ */ jsx79(CheckIcon, {}) : /* @__PURE__ */ jsx79(CopyIcon, {})
|
|
17197
16919
|
}
|
|
17198
16920
|
)
|
|
17199
16921
|
]
|
|
17200
16922
|
}
|
|
17201
16923
|
),
|
|
17202
|
-
error2 && /* @__PURE__ */
|
|
16924
|
+
error2 && /* @__PURE__ */ jsx79("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
17203
16925
|
] });
|
|
17204
16926
|
}
|
|
17205
16927
|
}
|
|
@@ -17207,10 +16929,10 @@ var CopyLinkButtonField = (props) => {
|
|
|
17207
16929
|
};
|
|
17208
16930
|
|
|
17209
16931
|
// src/widgets/basic/date-field/date.tsx
|
|
17210
|
-
import { forwardRef as forwardRef6, useEffect as
|
|
16932
|
+
import { forwardRef as forwardRef6, useEffect as useEffect17 } from "react";
|
|
17211
16933
|
|
|
17212
16934
|
// node_modules/react-datepicker/dist/index.es.js
|
|
17213
|
-
import React9, { useRef as
|
|
16935
|
+
import React9, { useRef as useRef11, useCallback as useCallback5, useEffect as useEffect15, cloneElement as cloneElement3, Component, createRef, createElement as createElement5 } from "react";
|
|
17214
16936
|
|
|
17215
16937
|
// node_modules/date-fns/constants.js
|
|
17216
16938
|
var daysInYear = 365.2425;
|
|
@@ -21140,7 +20862,7 @@ function useEffectEvent(callback) {
|
|
|
21140
20862
|
}
|
|
21141
20863
|
|
|
21142
20864
|
// node_modules/react-datepicker/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
21143
|
-
import { jsx as
|
|
20865
|
+
import { jsx as jsx80, jsxs as jsxs52, Fragment as Fragment19 } from "react/jsx-runtime";
|
|
21144
20866
|
import * as ReactDOM2 from "react-dom";
|
|
21145
20867
|
|
|
21146
20868
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
@@ -21538,7 +21260,7 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21538
21260
|
bottom: isCustomShape ? "" : "rotate(180deg)",
|
|
21539
21261
|
right: isCustomShape ? "rotate(-90deg)" : "rotate(90deg)"
|
|
21540
21262
|
}[side];
|
|
21541
|
-
return /* @__PURE__ */
|
|
21263
|
+
return /* @__PURE__ */ jsxs52("svg", {
|
|
21542
21264
|
...rest,
|
|
21543
21265
|
"aria-hidden": true,
|
|
21544
21266
|
ref,
|
|
@@ -21554,18 +21276,18 @@ var FloatingArrow = /* @__PURE__ */ React8.forwardRef(function FloatingArrow2(pr
|
|
|
21554
21276
|
transform: [rotation, transform].filter((t3) => !!t3).join(" "),
|
|
21555
21277
|
...restStyle
|
|
21556
21278
|
},
|
|
21557
|
-
children: [computedStrokeWidth > 0 && /* @__PURE__ */
|
|
21279
|
+
children: [computedStrokeWidth > 0 && /* @__PURE__ */ jsx80("path", {
|
|
21558
21280
|
clipPath: "url(#" + clipPathId + ")",
|
|
21559
21281
|
fill: "none",
|
|
21560
21282
|
stroke,
|
|
21561
21283
|
strokeWidth: computedStrokeWidth + (d ? 0 : 1),
|
|
21562
21284
|
d: dValue
|
|
21563
|
-
}), /* @__PURE__ */
|
|
21285
|
+
}), /* @__PURE__ */ jsx80("path", {
|
|
21564
21286
|
stroke: computedStrokeWidth && !d ? rest.fill : "none",
|
|
21565
21287
|
d: dValue
|
|
21566
|
-
}), /* @__PURE__ */
|
|
21288
|
+
}), /* @__PURE__ */ jsx80("clipPath", {
|
|
21567
21289
|
id: clipPathId,
|
|
21568
|
-
children: /* @__PURE__ */
|
|
21290
|
+
children: /* @__PURE__ */ jsx80("rect", {
|
|
21569
21291
|
x: -halfStrokeWidth,
|
|
21570
21292
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
21571
21293
|
width: width + computedStrokeWidth,
|
|
@@ -21780,8 +21502,8 @@ var CalendarContainer = function(_a2) {
|
|
|
21780
21502
|
return React9.createElement("div", { className, role: "dialog", "aria-label": ariaLabel, "aria-modal": "true" }, children);
|
|
21781
21503
|
};
|
|
21782
21504
|
var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
21783
|
-
var ref =
|
|
21784
|
-
var onClickOutsideRef =
|
|
21505
|
+
var ref = useRef11(null);
|
|
21506
|
+
var onClickOutsideRef = useRef11(onClickOutside);
|
|
21785
21507
|
onClickOutsideRef.current = onClickOutside;
|
|
21786
21508
|
var handleClickOutside = useCallback5(function(event) {
|
|
21787
21509
|
var _a2;
|
|
@@ -21794,7 +21516,7 @@ var useDetectClickOutside = function(onClickOutside, ignoreClass) {
|
|
|
21794
21516
|
}
|
|
21795
21517
|
}
|
|
21796
21518
|
}, [ignoreClass]);
|
|
21797
|
-
|
|
21519
|
+
useEffect15(function() {
|
|
21798
21520
|
document.addEventListener("mousedown", handleClickOutside);
|
|
21799
21521
|
return function() {
|
|
21800
21522
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
@@ -25035,7 +24757,7 @@ function withFloating(Component3) {
|
|
|
25035
24757
|
var WithFloating = function(props) {
|
|
25036
24758
|
var _a2;
|
|
25037
24759
|
var hidePopper = typeof props.hidePopper === "boolean" ? props.hidePopper : true;
|
|
25038
|
-
var arrowRef =
|
|
24760
|
+
var arrowRef = useRef11(null);
|
|
25039
24761
|
var floatingProps = useFloating2(_assign({ open: !hidePopper, whileElementsMounted: autoUpdate, placement: props.popperPlacement, middleware: __spreadArray([
|
|
25040
24762
|
flip3({ padding: 15 }),
|
|
25041
24763
|
offset3(10),
|
|
@@ -26047,13 +25769,13 @@ function _objectWithoutProperties(e3, t3) {
|
|
|
26047
25769
|
}
|
|
26048
25770
|
|
|
26049
25771
|
// node_modules/react-select/dist/useStateManager-7e1e8489.esm.js
|
|
26050
|
-
import { useState as
|
|
25772
|
+
import { useState as useState14, useCallback as useCallback6 } from "react";
|
|
26051
25773
|
var _excluded = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
26052
25774
|
function useStateManager(_ref3) {
|
|
26053
25775
|
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);
|
|
26054
|
-
var _useState =
|
|
26055
|
-
var _useState3 =
|
|
26056
|
-
var _useState5 =
|
|
25776
|
+
var _useState = useState14(propsInputValue !== void 0 ? propsInputValue : defaultInputValue), _useState2 = _slicedToArray(_useState, 2), stateInputValue = _useState2[0], setStateInputValue = _useState2[1];
|
|
25777
|
+
var _useState3 = useState14(propsMenuIsOpen !== void 0 ? propsMenuIsOpen : defaultMenuIsOpen), _useState4 = _slicedToArray(_useState3, 2), stateMenuIsOpen = _useState4[0], setStateMenuIsOpen = _useState4[1];
|
|
25778
|
+
var _useState5 = useState14(propsValue !== void 0 ? propsValue : defaultValue), _useState6 = _slicedToArray(_useState5, 2), stateValue = _useState6[0], setStateValue = _useState6[1];
|
|
26057
25779
|
var onChange2 = useCallback6(function(value2, actionMeta) {
|
|
26058
25780
|
if (typeof propsOnChange === "function") {
|
|
26059
25781
|
propsOnChange(value2, actionMeta);
|
|
@@ -26214,7 +25936,7 @@ function _toConsumableArray(r4) {
|
|
|
26214
25936
|
|
|
26215
25937
|
// node_modules/react-select/dist/Select-ef7c0426.esm.js
|
|
26216
25938
|
import * as React13 from "react";
|
|
26217
|
-
import { useMemo as useMemo8, Fragment as Fragment22, useRef as
|
|
25939
|
+
import { useMemo as useMemo8, Fragment as Fragment22, useRef as useRef14, useCallback as useCallback8, useEffect as useEffect16, Component as Component2 } from "react";
|
|
26218
25940
|
|
|
26219
25941
|
// node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
26220
25942
|
import * as React11 from "react";
|
|
@@ -27498,7 +27220,7 @@ var Emotion$1 = Emotion;
|
|
|
27498
27220
|
import * as React12 from "react";
|
|
27499
27221
|
var import_extends2 = __toESM(require_extends());
|
|
27500
27222
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
27501
|
-
var
|
|
27223
|
+
var jsx81 = function jsx82(type, props) {
|
|
27502
27224
|
var args = arguments;
|
|
27503
27225
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
27504
27226
|
return React12.createElement.apply(void 0, args);
|
|
@@ -27516,7 +27238,7 @@ var jsx82 = function jsx83(type, props) {
|
|
|
27516
27238
|
var JSX;
|
|
27517
27239
|
/* @__PURE__ */ (function(_JSX) {
|
|
27518
27240
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
27519
|
-
})(
|
|
27241
|
+
})(jsx81 || (jsx81 = {}));
|
|
27520
27242
|
function css() {
|
|
27521
27243
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27522
27244
|
args[_key] = arguments[_key];
|
|
@@ -27546,7 +27268,7 @@ function _taggedTemplateLiteral(e3, t3) {
|
|
|
27546
27268
|
}
|
|
27547
27269
|
|
|
27548
27270
|
// node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
27549
|
-
import { useContext as useContext9, useRef as
|
|
27271
|
+
import { useContext as useContext9, useRef as useRef13, useState as useState15, useMemo as useMemo7, useCallback as useCallback7, createContext as createContext5 } from "react";
|
|
27550
27272
|
import { createPortal as createPortal4 } from "react-dom";
|
|
27551
27273
|
|
|
27552
27274
|
// node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js
|
|
@@ -27892,9 +27614,9 @@ var PortalPlacementContext = /* @__PURE__ */ createContext5(null);
|
|
|
27892
27614
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
27893
27615
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
27894
27616
|
var _ref3 = useContext9(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
27895
|
-
var ref =
|
|
27896
|
-
var _useState =
|
|
27897
|
-
var _useState3 =
|
|
27617
|
+
var ref = useRef13(null);
|
|
27618
|
+
var _useState = useState15(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
27619
|
+
var _useState3 = useState15(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
27898
27620
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
27899
27621
|
index3(function() {
|
|
27900
27622
|
var menuEl = ref.current;
|
|
@@ -27924,7 +27646,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
27924
27646
|
};
|
|
27925
27647
|
var Menu = function Menu2(props) {
|
|
27926
27648
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
27927
|
-
return
|
|
27649
|
+
return jsx81("div", _extends({}, getStyleProps(props, "menu", {
|
|
27928
27650
|
menu: true
|
|
27929
27651
|
}), {
|
|
27930
27652
|
ref: innerRef
|
|
@@ -27946,7 +27668,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
27946
27668
|
};
|
|
27947
27669
|
var MenuList = function MenuList2(props) {
|
|
27948
27670
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
27949
|
-
return
|
|
27671
|
+
return jsx81("div", _extends({}, getStyleProps(props, "menuList", {
|
|
27950
27672
|
"menu-list": true,
|
|
27951
27673
|
"menu-list--is-multi": isMulti
|
|
27952
27674
|
}), {
|
|
@@ -27966,7 +27688,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
27966
27688
|
var loadingMessageCSS = noticeCSS;
|
|
27967
27689
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
27968
27690
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
27969
|
-
return
|
|
27691
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27970
27692
|
children,
|
|
27971
27693
|
innerProps
|
|
27972
27694
|
}), "noOptionsMessage", {
|
|
@@ -27976,7 +27698,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
27976
27698
|
};
|
|
27977
27699
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
27978
27700
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
27979
|
-
return
|
|
27701
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
27980
27702
|
children,
|
|
27981
27703
|
innerProps
|
|
27982
27704
|
}), "loadingMessage", {
|
|
@@ -27996,15 +27718,15 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
27996
27718
|
};
|
|
27997
27719
|
var MenuPortal = function MenuPortal2(props) {
|
|
27998
27720
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
27999
|
-
var menuPortalRef =
|
|
28000
|
-
var cleanupRef =
|
|
28001
|
-
var _useState5 =
|
|
27721
|
+
var menuPortalRef = useRef13(null);
|
|
27722
|
+
var cleanupRef = useRef13(null);
|
|
27723
|
+
var _useState5 = useState15(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
28002
27724
|
var portalPlacementContext = useMemo7(function() {
|
|
28003
27725
|
return {
|
|
28004
27726
|
setPortalPlacement
|
|
28005
27727
|
};
|
|
28006
27728
|
}, []);
|
|
28007
|
-
var _useState7 =
|
|
27729
|
+
var _useState7 = useState15(null), _useState8 = _slicedToArray(_useState7, 2), computedPosition = _useState8[0], setComputedPosition = _useState8[1];
|
|
28008
27730
|
var updateComputedPosition = useCallback7(function() {
|
|
28009
27731
|
if (!controlElement) return;
|
|
28010
27732
|
var rect = getBoundingClientObj(controlElement);
|
|
@@ -28039,7 +27761,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28039
27761
|
runAutoUpdate();
|
|
28040
27762
|
}, [runAutoUpdate]);
|
|
28041
27763
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
28042
|
-
var menuWrapper =
|
|
27764
|
+
var menuWrapper = jsx81("div", _extends({
|
|
28043
27765
|
ref: setMenuPortalElement
|
|
28044
27766
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
28045
27767
|
offset: computedPosition.offset,
|
|
@@ -28048,7 +27770,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
28048
27770
|
}), "menuPortal", {
|
|
28049
27771
|
"menu-portal": true
|
|
28050
27772
|
}), innerProps), children);
|
|
28051
|
-
return
|
|
27773
|
+
return jsx81(PortalPlacementContext.Provider, {
|
|
28052
27774
|
value: portalPlacementContext
|
|
28053
27775
|
}, appendTo ? /* @__PURE__ */ createPortal4(menuWrapper, appendTo) : menuWrapper);
|
|
28054
27776
|
};
|
|
@@ -28064,7 +27786,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
28064
27786
|
};
|
|
28065
27787
|
var SelectContainer = function SelectContainer2(props) {
|
|
28066
27788
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
28067
|
-
return
|
|
27789
|
+
return jsx81("div", _extends({}, getStyleProps(props, "container", {
|
|
28068
27790
|
"--is-disabled": isDisabled,
|
|
28069
27791
|
"--is-rtl": isRtl
|
|
28070
27792
|
}), innerProps), children);
|
|
@@ -28085,7 +27807,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
28085
27807
|
};
|
|
28086
27808
|
var ValueContainer = function ValueContainer2(props) {
|
|
28087
27809
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
28088
|
-
return
|
|
27810
|
+
return jsx81("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
28089
27811
|
"value-container": true,
|
|
28090
27812
|
"value-container--is-multi": isMulti,
|
|
28091
27813
|
"value-container--has-value": hasValue
|
|
@@ -28101,7 +27823,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
28101
27823
|
};
|
|
28102
27824
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
28103
27825
|
var children = props.children, innerProps = props.innerProps;
|
|
28104
|
-
return
|
|
27826
|
+
return jsx81("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
28105
27827
|
indicators: true
|
|
28106
27828
|
}), innerProps), children);
|
|
28107
27829
|
};
|
|
@@ -28122,7 +27844,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28122
27844
|
};
|
|
28123
27845
|
var Svg = function Svg2(_ref3) {
|
|
28124
27846
|
var size4 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
28125
|
-
return
|
|
27847
|
+
return jsx81("svg", _extends({
|
|
28126
27848
|
height: size4,
|
|
28127
27849
|
width: size4,
|
|
28128
27850
|
viewBox: "0 0 20 20",
|
|
@@ -28132,16 +27854,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
28132
27854
|
}, props));
|
|
28133
27855
|
};
|
|
28134
27856
|
var CrossIcon = function CrossIcon2(props) {
|
|
28135
|
-
return
|
|
27857
|
+
return jsx81(Svg, _extends({
|
|
28136
27858
|
size: 20
|
|
28137
|
-
}, props),
|
|
27859
|
+
}, props), jsx81("path", {
|
|
28138
27860
|
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"
|
|
28139
27861
|
}));
|
|
28140
27862
|
};
|
|
28141
27863
|
var DownChevron = function DownChevron2(props) {
|
|
28142
|
-
return
|
|
27864
|
+
return jsx81(Svg, _extends({
|
|
28143
27865
|
size: 20
|
|
28144
|
-
}, props),
|
|
27866
|
+
}, props), jsx81("path", {
|
|
28145
27867
|
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"
|
|
28146
27868
|
}));
|
|
28147
27869
|
};
|
|
@@ -28162,18 +27884,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
28162
27884
|
var dropdownIndicatorCSS = baseCSS;
|
|
28163
27885
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
28164
27886
|
var children = props.children, innerProps = props.innerProps;
|
|
28165
|
-
return
|
|
27887
|
+
return jsx81("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
28166
27888
|
indicator: true,
|
|
28167
27889
|
"dropdown-indicator": true
|
|
28168
|
-
}), innerProps), children ||
|
|
27890
|
+
}), innerProps), children || jsx81(DownChevron, null));
|
|
28169
27891
|
};
|
|
28170
27892
|
var clearIndicatorCSS = baseCSS;
|
|
28171
27893
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
28172
27894
|
var children = props.children, innerProps = props.innerProps;
|
|
28173
|
-
return
|
|
27895
|
+
return jsx81("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
28174
27896
|
indicator: true,
|
|
28175
27897
|
"clear-indicator": true
|
|
28176
|
-
}), innerProps), children ||
|
|
27898
|
+
}), innerProps), children || jsx81(CrossIcon, null));
|
|
28177
27899
|
};
|
|
28178
27900
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
28179
27901
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -28189,7 +27911,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
28189
27911
|
};
|
|
28190
27912
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
28191
27913
|
var innerProps = props.innerProps;
|
|
28192
|
-
return
|
|
27914
|
+
return jsx81("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
28193
27915
|
"indicator-separator": true
|
|
28194
27916
|
})));
|
|
28195
27917
|
};
|
|
@@ -28213,7 +27935,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
28213
27935
|
};
|
|
28214
27936
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
28215
27937
|
var delay = _ref6.delay, offset4 = _ref6.offset;
|
|
28216
|
-
return
|
|
27938
|
+
return jsx81("span", {
|
|
28217
27939
|
css: /* @__PURE__ */ css({
|
|
28218
27940
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
28219
27941
|
backgroundColor: "currentColor",
|
|
@@ -28228,20 +27950,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
28228
27950
|
};
|
|
28229
27951
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
28230
27952
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size4 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
28231
|
-
return
|
|
27953
|
+
return jsx81("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
28232
27954
|
innerProps,
|
|
28233
27955
|
isRtl,
|
|
28234
27956
|
size: size4
|
|
28235
27957
|
}), "loadingIndicator", {
|
|
28236
27958
|
indicator: true,
|
|
28237
27959
|
"loading-indicator": true
|
|
28238
|
-
}), innerProps),
|
|
27960
|
+
}), innerProps), jsx81(LoadingDot, {
|
|
28239
27961
|
delay: 0,
|
|
28240
27962
|
offset: isRtl
|
|
28241
|
-
}),
|
|
27963
|
+
}), jsx81(LoadingDot, {
|
|
28242
27964
|
delay: 160,
|
|
28243
27965
|
offset: true
|
|
28244
|
-
}),
|
|
27966
|
+
}), jsx81(LoadingDot, {
|
|
28245
27967
|
delay: 320,
|
|
28246
27968
|
offset: !isRtl
|
|
28247
27969
|
}));
|
|
@@ -28273,7 +27995,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
28273
27995
|
};
|
|
28274
27996
|
var Control = function Control2(props) {
|
|
28275
27997
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
28276
|
-
return
|
|
27998
|
+
return jsx81("div", _extends({
|
|
28277
27999
|
ref: innerRef
|
|
28278
28000
|
}, getStyleProps(props, "control", {
|
|
28279
28001
|
control: true,
|
|
@@ -28295,15 +28017,15 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
28295
28017
|
};
|
|
28296
28018
|
var Group = function Group2(props) {
|
|
28297
28019
|
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;
|
|
28298
|
-
return
|
|
28020
|
+
return jsx81("div", _extends({}, getStyleProps(props, "group", {
|
|
28299
28021
|
group: true
|
|
28300
|
-
}), innerProps),
|
|
28022
|
+
}), innerProps), jsx81(Heading, _extends({}, headingProps, {
|
|
28301
28023
|
selectProps,
|
|
28302
28024
|
theme,
|
|
28303
28025
|
getStyles,
|
|
28304
28026
|
getClassNames,
|
|
28305
28027
|
cx
|
|
28306
|
-
}), label),
|
|
28028
|
+
}), label), jsx81("div", null, children));
|
|
28307
28029
|
};
|
|
28308
28030
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
28309
28031
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -28325,7 +28047,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
28325
28047
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
28326
28048
|
_cleanCommonProps.data;
|
|
28327
28049
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
28328
|
-
return
|
|
28050
|
+
return jsx81("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
28329
28051
|
"group-heading": true
|
|
28330
28052
|
}), innerProps));
|
|
28331
28053
|
};
|
|
@@ -28377,11 +28099,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
28377
28099
|
var Input = function Input2(props) {
|
|
28378
28100
|
var cx = props.cx, value = props.value;
|
|
28379
28101
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
28380
|
-
return
|
|
28102
|
+
return jsx81("div", _extends({}, getStyleProps(props, "input", {
|
|
28381
28103
|
"input-container": true
|
|
28382
28104
|
}), {
|
|
28383
28105
|
"data-value": value || ""
|
|
28384
|
-
}),
|
|
28106
|
+
}), jsx81("input", _extends({
|
|
28385
28107
|
className: cx({
|
|
28386
28108
|
input: true
|
|
28387
28109
|
}, inputClassName),
|
|
@@ -28435,35 +28157,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
28435
28157
|
};
|
|
28436
28158
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
28437
28159
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
28438
|
-
return
|
|
28160
|
+
return jsx81("div", innerProps, children);
|
|
28439
28161
|
};
|
|
28440
28162
|
var MultiValueContainer = MultiValueGeneric;
|
|
28441
28163
|
var MultiValueLabel = MultiValueGeneric;
|
|
28442
28164
|
function MultiValueRemove(_ref5) {
|
|
28443
28165
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
28444
|
-
return
|
|
28166
|
+
return jsx81("div", _extends({
|
|
28445
28167
|
role: "button"
|
|
28446
|
-
}, innerProps), children ||
|
|
28168
|
+
}, innerProps), children || jsx81(CrossIcon, {
|
|
28447
28169
|
size: 14
|
|
28448
28170
|
}));
|
|
28449
28171
|
}
|
|
28450
28172
|
var MultiValue = function MultiValue2(props) {
|
|
28451
28173
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
28452
28174
|
var Container = components2.Container, Label = components2.Label, Remove = components2.Remove;
|
|
28453
|
-
return
|
|
28175
|
+
return jsx81(Container, {
|
|
28454
28176
|
data,
|
|
28455
28177
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
28456
28178
|
"multi-value": true,
|
|
28457
28179
|
"multi-value--is-disabled": isDisabled
|
|
28458
28180
|
})), innerProps),
|
|
28459
28181
|
selectProps
|
|
28460
|
-
},
|
|
28182
|
+
}, jsx81(Label, {
|
|
28461
28183
|
data,
|
|
28462
28184
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
28463
28185
|
"multi-value__label": true
|
|
28464
28186
|
})),
|
|
28465
28187
|
selectProps
|
|
28466
|
-
}, children),
|
|
28188
|
+
}, children), jsx81(Remove, {
|
|
28467
28189
|
data,
|
|
28468
28190
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
28469
28191
|
"multi-value__remove": true
|
|
@@ -28496,7 +28218,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
28496
28218
|
};
|
|
28497
28219
|
var Option = function Option2(props) {
|
|
28498
28220
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
28499
|
-
return
|
|
28221
|
+
return jsx81("div", _extends({}, getStyleProps(props, "option", {
|
|
28500
28222
|
option: true,
|
|
28501
28223
|
"option--is-disabled": isDisabled,
|
|
28502
28224
|
"option--is-focused": isFocused,
|
|
@@ -28520,7 +28242,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
28520
28242
|
};
|
|
28521
28243
|
var Placeholder = function Placeholder2(props) {
|
|
28522
28244
|
var children = props.children, innerProps = props.innerProps;
|
|
28523
|
-
return
|
|
28245
|
+
return jsx81("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
28524
28246
|
placeholder: true
|
|
28525
28247
|
}), innerProps), children);
|
|
28526
28248
|
};
|
|
@@ -28542,7 +28264,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
28542
28264
|
};
|
|
28543
28265
|
var SingleValue = function SingleValue2(props) {
|
|
28544
28266
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
28545
|
-
return
|
|
28267
|
+
return jsx81("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
28546
28268
|
"single-value": true,
|
|
28547
28269
|
"single-value--is-disabled": isDisabled
|
|
28548
28270
|
}), innerProps), children);
|
|
@@ -28644,7 +28366,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
28644
28366
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
28645
28367
|
};
|
|
28646
28368
|
var A11yText = function A11yText2(props) {
|
|
28647
|
-
return
|
|
28369
|
+
return jsx81("span", _extends({
|
|
28648
28370
|
css: _ref
|
|
28649
28371
|
}, props));
|
|
28650
28372
|
};
|
|
@@ -28779,18 +28501,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
28779
28501
|
}
|
|
28780
28502
|
return guidanceMsg;
|
|
28781
28503
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
28782
|
-
var ScreenReaderText =
|
|
28504
|
+
var ScreenReaderText = jsx81(Fragment22, null, jsx81("span", {
|
|
28783
28505
|
id: "aria-selection"
|
|
28784
|
-
}, ariaSelected),
|
|
28506
|
+
}, ariaSelected), jsx81("span", {
|
|
28785
28507
|
id: "aria-focused"
|
|
28786
|
-
}, ariaFocused),
|
|
28508
|
+
}, ariaFocused), jsx81("span", {
|
|
28787
28509
|
id: "aria-results"
|
|
28788
|
-
}, ariaResults),
|
|
28510
|
+
}, ariaResults), jsx81("span", {
|
|
28789
28511
|
id: "aria-guidance"
|
|
28790
28512
|
}, ariaGuidance));
|
|
28791
|
-
return
|
|
28513
|
+
return jsx81(Fragment22, null, jsx81(A11yText$1, {
|
|
28792
28514
|
id
|
|
28793
|
-
}, isInitialFocus && ScreenReaderText),
|
|
28515
|
+
}, isInitialFocus && ScreenReaderText), jsx81(A11yText$1, {
|
|
28794
28516
|
"aria-live": ariaLive,
|
|
28795
28517
|
"aria-atomic": "false",
|
|
28796
28518
|
"aria-relevant": "additions text",
|
|
@@ -29103,7 +28825,7 @@ var _excluded4 = ["innerRef"];
|
|
|
29103
28825
|
function DummyInput(_ref3) {
|
|
29104
28826
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
29105
28827
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
29106
|
-
return
|
|
28828
|
+
return jsx81("input", _extends({
|
|
29107
28829
|
ref: innerRef
|
|
29108
28830
|
}, filteredProps, {
|
|
29109
28831
|
css: /* @__PURE__ */ css({
|
|
@@ -29135,10 +28857,10 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
29135
28857
|
};
|
|
29136
28858
|
function useScrollCapture(_ref3) {
|
|
29137
28859
|
var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
|
|
29138
|
-
var isBottom =
|
|
29139
|
-
var isTop =
|
|
29140
|
-
var touchStart =
|
|
29141
|
-
var scrollTarget =
|
|
28860
|
+
var isBottom = useRef14(false);
|
|
28861
|
+
var isTop = useRef14(false);
|
|
28862
|
+
var touchStart = useRef14(0);
|
|
28863
|
+
var scrollTarget = useRef14(null);
|
|
29142
28864
|
var handleEventDelta = useCallback8(function(event, delta) {
|
|
29143
28865
|
if (scrollTarget.current === null) return;
|
|
29144
28866
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
@@ -29198,7 +28920,7 @@ function useScrollCapture(_ref3) {
|
|
|
29198
28920
|
el.removeEventListener("touchstart", onTouchStart, false);
|
|
29199
28921
|
el.removeEventListener("touchmove", onTouchMove, false);
|
|
29200
28922
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
29201
|
-
|
|
28923
|
+
useEffect16(function() {
|
|
29202
28924
|
if (!isEnabled) return;
|
|
29203
28925
|
var element = scrollTarget.current;
|
|
29204
28926
|
startListening(element);
|
|
@@ -29245,8 +28967,8 @@ var listenerOptions = {
|
|
|
29245
28967
|
};
|
|
29246
28968
|
function useScrollLock(_ref3) {
|
|
29247
28969
|
var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
29248
|
-
var originalStyles =
|
|
29249
|
-
var scrollTarget =
|
|
28970
|
+
var originalStyles = useRef14({});
|
|
28971
|
+
var scrollTarget = useRef14(null);
|
|
29250
28972
|
var addScrollLock = useCallback8(function(touchScrollTarget) {
|
|
29251
28973
|
if (!canUseDOM) return;
|
|
29252
28974
|
var target = document.body;
|
|
@@ -29301,7 +29023,7 @@ function useScrollLock(_ref3) {
|
|
|
29301
29023
|
}
|
|
29302
29024
|
}
|
|
29303
29025
|
}, [accountForScrollbars]);
|
|
29304
|
-
|
|
29026
|
+
useEffect16(function() {
|
|
29305
29027
|
if (!isEnabled) return;
|
|
29306
29028
|
var element = scrollTarget.current;
|
|
29307
29029
|
addScrollLock(element);
|
|
@@ -29345,7 +29067,7 @@ function ScrollManager(_ref3) {
|
|
|
29345
29067
|
setScrollCaptureTarget(element);
|
|
29346
29068
|
setScrollLockTarget(element);
|
|
29347
29069
|
};
|
|
29348
|
-
return
|
|
29070
|
+
return jsx81(Fragment22, null, lockEnabled && jsx81("div", {
|
|
29349
29071
|
onClick: blurSelectInput,
|
|
29350
29072
|
css: _ref2$1
|
|
29351
29073
|
}), children(targetRef));
|
|
@@ -29364,7 +29086,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
29364
29086
|
};
|
|
29365
29087
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
29366
29088
|
var name2 = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
29367
|
-
return
|
|
29089
|
+
return jsx81("input", {
|
|
29368
29090
|
required: true,
|
|
29369
29091
|
name: name2,
|
|
29370
29092
|
tabIndex: -1,
|
|
@@ -30954,7 +30676,7 @@ var StateManagedSelect$1 = StateManagedSelect;
|
|
|
30954
30676
|
|
|
30955
30677
|
// src/widgets/basic/date-field/date.tsx
|
|
30956
30678
|
var import_moment2 = __toESM(require_moment());
|
|
30957
|
-
import { Fragment as Fragment23, jsx as
|
|
30679
|
+
import { Fragment as Fragment23, jsx as jsx83, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
30958
30680
|
var DateField = (props) => {
|
|
30959
30681
|
const {
|
|
30960
30682
|
name: name2,
|
|
@@ -30982,8 +30704,8 @@ var DateField = (props) => {
|
|
|
30982
30704
|
} = props;
|
|
30983
30705
|
const { t: t3 } = useI18n();
|
|
30984
30706
|
const InputDateCustom = forwardRef6(
|
|
30985
|
-
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */
|
|
30986
|
-
/* @__PURE__ */
|
|
30707
|
+
({ onClick, className, onChange: onChange2, isForm: isForm2, defaultValue }, ref) => /* @__PURE__ */ jsxs53("label", { className: `flex ${className}`, children: [
|
|
30708
|
+
/* @__PURE__ */ jsx83(
|
|
30987
30709
|
"input",
|
|
30988
30710
|
{
|
|
30989
30711
|
className: `bg-transparent w-full focus-visible:outline-none outline-none border-none ${readonly && "cursor-not-allowed"}`,
|
|
@@ -30997,13 +30719,13 @@ var DateField = (props) => {
|
|
|
30997
30719
|
value: defaultValue && (0, import_moment2.default)(defaultValue).isValid() ? (0, import_moment2.default)(defaultValue).add(7, "hours").format(formatDate2) : ""
|
|
30998
30720
|
}
|
|
30999
30721
|
),
|
|
31000
|
-
isForm2 && /* @__PURE__ */
|
|
30722
|
+
isForm2 && /* @__PURE__ */ jsx83(CalendarIcon, {})
|
|
31001
30723
|
] })
|
|
31002
30724
|
);
|
|
31003
30725
|
if (!isForm && !isEditTable) {
|
|
31004
|
-
return /* @__PURE__ */
|
|
30726
|
+
return /* @__PURE__ */ jsx83("span", { children: value && (0, import_moment2.default)(value).isValid() ? (0, import_moment2.default)(value).add(7, "hours").format(formatDate2) : "" });
|
|
31005
30727
|
} else {
|
|
31006
|
-
return /* @__PURE__ */
|
|
30728
|
+
return /* @__PURE__ */ jsx83(
|
|
31007
30729
|
Controller,
|
|
31008
30730
|
{
|
|
31009
30731
|
name: name2 || "",
|
|
@@ -31019,14 +30741,14 @@ var DateField = (props) => {
|
|
|
31019
30741
|
},
|
|
31020
30742
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
31021
30743
|
const { setError, clearErrors } = methods;
|
|
31022
|
-
|
|
30744
|
+
useEffect17(() => {
|
|
31023
30745
|
if (value) {
|
|
31024
30746
|
clearErrors(name2);
|
|
31025
30747
|
}
|
|
31026
30748
|
}, [value, clearErrors, name2]);
|
|
31027
30749
|
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;
|
|
31028
|
-
return /* @__PURE__ */
|
|
31029
|
-
/* @__PURE__ */
|
|
30750
|
+
return /* @__PURE__ */ jsxs53(Fragment23, { children: [
|
|
30751
|
+
/* @__PURE__ */ jsx83(
|
|
31030
30752
|
DatePicker,
|
|
31031
30753
|
{
|
|
31032
30754
|
selected: selectedDate,
|
|
@@ -31074,7 +30796,7 @@ var DateField = (props) => {
|
|
|
31074
30796
|
minDate: typeof minNowValue === "boolean" && minNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(minNowValue) ? minNowValue.toDate() : void 0,
|
|
31075
30797
|
maxDate: typeof maxNowValue === "boolean" && maxNowValue === true ? (0, import_moment2.default)(/* @__PURE__ */ new Date()).toDate() : import_moment2.default.isMoment(maxNowValue) ? maxNowValue.toDate() : void 0,
|
|
31076
30798
|
showTimeInput: showTime,
|
|
31077
|
-
customInput: /* @__PURE__ */
|
|
30799
|
+
customInput: /* @__PURE__ */ jsx83(
|
|
31078
30800
|
InputDateCustom,
|
|
31079
30801
|
{
|
|
31080
30802
|
isForm,
|
|
@@ -31092,7 +30814,7 @@ var DateField = (props) => {
|
|
|
31092
30814
|
increaseMonth,
|
|
31093
30815
|
prevMonthButtonDisabled,
|
|
31094
30816
|
nextMonthButtonDisabled
|
|
31095
|
-
}) => /* @__PURE__ */
|
|
30817
|
+
}) => /* @__PURE__ */ jsxs53(
|
|
31096
30818
|
"div",
|
|
31097
30819
|
{
|
|
31098
30820
|
style: {
|
|
@@ -31101,7 +30823,7 @@ var DateField = (props) => {
|
|
|
31101
30823
|
justifyContent: "center"
|
|
31102
30824
|
},
|
|
31103
30825
|
children: [
|
|
31104
|
-
/* @__PURE__ */
|
|
30826
|
+
/* @__PURE__ */ jsx83(
|
|
31105
30827
|
"button",
|
|
31106
30828
|
{
|
|
31107
30829
|
onClick: decreaseMonth,
|
|
@@ -31109,7 +30831,7 @@ var DateField = (props) => {
|
|
|
31109
30831
|
children: "<"
|
|
31110
30832
|
}
|
|
31111
30833
|
),
|
|
31112
|
-
/* @__PURE__ */
|
|
30834
|
+
/* @__PURE__ */ jsx83(
|
|
31113
30835
|
StateManagedSelect$1,
|
|
31114
30836
|
{
|
|
31115
30837
|
classNames: {
|
|
@@ -31135,7 +30857,7 @@ var DateField = (props) => {
|
|
|
31135
30857
|
autoFocus: true
|
|
31136
30858
|
}
|
|
31137
30859
|
),
|
|
31138
|
-
/* @__PURE__ */
|
|
30860
|
+
/* @__PURE__ */ jsx83(
|
|
31139
30861
|
StateManagedSelect$1,
|
|
31140
30862
|
{
|
|
31141
30863
|
classNames: {
|
|
@@ -31163,7 +30885,7 @@ var DateField = (props) => {
|
|
|
31163
30885
|
}))
|
|
31164
30886
|
}
|
|
31165
30887
|
),
|
|
31166
|
-
/* @__PURE__ */
|
|
30888
|
+
/* @__PURE__ */ jsx83(
|
|
31167
30889
|
"button",
|
|
31168
30890
|
{
|
|
31169
30891
|
onClick: increaseMonth,
|
|
@@ -31176,7 +30898,7 @@ var DateField = (props) => {
|
|
|
31176
30898
|
)
|
|
31177
30899
|
}
|
|
31178
30900
|
),
|
|
31179
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
30901
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx83("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31180
30902
|
] });
|
|
31181
30903
|
}
|
|
31182
30904
|
}
|
|
@@ -31185,26 +30907,26 @@ var DateField = (props) => {
|
|
|
31185
30907
|
};
|
|
31186
30908
|
|
|
31187
30909
|
// src/widgets/basic/download-binary-field/download-binary.tsx
|
|
31188
|
-
import { jsx as
|
|
30910
|
+
import { jsx as jsx84, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
31189
30911
|
var DownLoadBinaryField = (props) => {
|
|
31190
30912
|
const { handleFileDownload } = props;
|
|
31191
30913
|
const { t: t3 } = useI18n();
|
|
31192
|
-
return /* @__PURE__ */
|
|
30914
|
+
return /* @__PURE__ */ jsxs54(
|
|
31193
30915
|
"button",
|
|
31194
30916
|
{
|
|
31195
30917
|
type: "button",
|
|
31196
30918
|
onClick: handleFileDownload,
|
|
31197
30919
|
className: "download-binary-field flex items-center gap-1 text-blue-700 my-auto",
|
|
31198
30920
|
children: [
|
|
31199
|
-
/* @__PURE__ */
|
|
31200
|
-
/* @__PURE__ */
|
|
30921
|
+
/* @__PURE__ */ jsx84(DownloadIcon, {}),
|
|
30922
|
+
/* @__PURE__ */ jsx84("span", { className: "text-sm italic underline text-primary", children: t3("download_file") })
|
|
31201
30923
|
]
|
|
31202
30924
|
}
|
|
31203
30925
|
);
|
|
31204
30926
|
};
|
|
31205
30927
|
|
|
31206
30928
|
// src/widgets/basic/download-file-field/download-file.tsx
|
|
31207
|
-
import { jsx as
|
|
30929
|
+
import { jsx as jsx85, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
31208
30930
|
var DownloadFileField = (props) => {
|
|
31209
30931
|
const {
|
|
31210
30932
|
readonly,
|
|
@@ -31216,15 +30938,15 @@ var DownloadFileField = (props) => {
|
|
|
31216
30938
|
handleFileChange,
|
|
31217
30939
|
handleFileDownload
|
|
31218
30940
|
} = props;
|
|
31219
|
-
return /* @__PURE__ */
|
|
31220
|
-
/* @__PURE__ */
|
|
30941
|
+
return /* @__PURE__ */ jsxs55("div", { className: "", children: [
|
|
30942
|
+
/* @__PURE__ */ jsxs55(
|
|
31221
30943
|
"label",
|
|
31222
30944
|
{
|
|
31223
30945
|
htmlFor: inputId,
|
|
31224
30946
|
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",
|
|
31225
30947
|
children: [
|
|
31226
|
-
file ? /* @__PURE__ */
|
|
31227
|
-
/* @__PURE__ */
|
|
30948
|
+
file ? /* @__PURE__ */ jsx85("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx85("span", { className: "cursor-pointer text-lg", children: file.name }) }) : /* @__PURE__ */ jsx85("span", { className: "cursor-pointer text-lg", children: placeholder || "Upload File" }),
|
|
30949
|
+
/* @__PURE__ */ jsx85(
|
|
31228
30950
|
"input",
|
|
31229
30951
|
{
|
|
31230
30952
|
id: inputId,
|
|
@@ -31238,7 +30960,7 @@ var DownloadFileField = (props) => {
|
|
|
31238
30960
|
]
|
|
31239
30961
|
}
|
|
31240
30962
|
),
|
|
31241
|
-
file && /* @__PURE__ */
|
|
30963
|
+
file && /* @__PURE__ */ jsx85(
|
|
31242
30964
|
"button",
|
|
31243
30965
|
{
|
|
31244
30966
|
onClick: handleFileDownload,
|
|
@@ -31251,8 +30973,8 @@ var DownloadFileField = (props) => {
|
|
|
31251
30973
|
};
|
|
31252
30974
|
|
|
31253
30975
|
// src/widgets/basic/dropdown-field/dropdown.tsx
|
|
31254
|
-
import { useState as
|
|
31255
|
-
import { jsx as
|
|
30976
|
+
import { useState as useState16 } from "react";
|
|
30977
|
+
import { jsx as jsx86, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
31256
30978
|
var DropdownField = (props) => {
|
|
31257
30979
|
const {
|
|
31258
30980
|
options: options2,
|
|
@@ -31264,32 +30986,32 @@ var DropdownField = (props) => {
|
|
|
31264
30986
|
dropdownClassName = "",
|
|
31265
30987
|
useClickOutside: useClickOutside2
|
|
31266
30988
|
} = props;
|
|
31267
|
-
const [open, setOpen] =
|
|
30989
|
+
const [open, setOpen] = useState16(false);
|
|
31268
30990
|
const dropdownRef = useClickOutside2({ handler: () => setOpen(false) });
|
|
31269
|
-
return /* @__PURE__ */
|
|
30991
|
+
return /* @__PURE__ */ jsxs56(
|
|
31270
30992
|
"div",
|
|
31271
30993
|
{
|
|
31272
30994
|
ref: dropdownRef,
|
|
31273
30995
|
className: `relative ${className}`,
|
|
31274
30996
|
onClick: () => setOpen(!open),
|
|
31275
30997
|
children: [
|
|
31276
|
-
/* @__PURE__ */
|
|
30998
|
+
/* @__PURE__ */ jsxs56(
|
|
31277
30999
|
"div",
|
|
31278
31000
|
{
|
|
31279
31001
|
className: `flex items-center gap-2 px-3 py-1 bg-white border rounded-lg cursor-pointer ${buttonClassName}`,
|
|
31280
31002
|
children: [
|
|
31281
31003
|
selectedValue?.icon,
|
|
31282
|
-
/* @__PURE__ */
|
|
31283
|
-
/* @__PURE__ */
|
|
31004
|
+
/* @__PURE__ */ jsx86("span", { children: selectedValue?.label }),
|
|
31005
|
+
/* @__PURE__ */ jsx86(ChevronBottomIcon, { className: "h-4 w-4" })
|
|
31284
31006
|
]
|
|
31285
31007
|
}
|
|
31286
31008
|
),
|
|
31287
|
-
open && /* @__PURE__ */
|
|
31009
|
+
open && /* @__PURE__ */ jsx86(
|
|
31288
31010
|
"div",
|
|
31289
31011
|
{
|
|
31290
31012
|
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}`,
|
|
31291
31013
|
onClick: (e3) => e3.stopPropagation(),
|
|
31292
|
-
children: options2.map((option, index4) => /* @__PURE__ */
|
|
31014
|
+
children: options2.map((option, index4) => /* @__PURE__ */ jsx86(
|
|
31293
31015
|
"div",
|
|
31294
31016
|
{
|
|
31295
31017
|
onClick: () => {
|
|
@@ -31309,7 +31031,7 @@ var DropdownField = (props) => {
|
|
|
31309
31031
|
};
|
|
31310
31032
|
|
|
31311
31033
|
// src/widgets/basic/fee-field/fee.tsx
|
|
31312
|
-
import { Fragment as Fragment24, jsx as
|
|
31034
|
+
import { Fragment as Fragment24, jsx as jsx87, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
31313
31035
|
var FeeField = (props) => {
|
|
31314
31036
|
const { value, formValues } = props;
|
|
31315
31037
|
const { t: t3 } = useI18n();
|
|
@@ -31320,27 +31042,27 @@ var FeeField = (props) => {
|
|
|
31320
31042
|
)
|
|
31321
31043
|
) + " VND";
|
|
31322
31044
|
const remaining_amount = formatNumberOnly(parseFloat(formValues?.amount_residual ?? 0)) + " VND";
|
|
31323
|
-
return /* @__PURE__ */
|
|
31045
|
+
return /* @__PURE__ */ jsxs57(Fragment24, { children: [
|
|
31324
31046
|
value?.subtotals?.map((sub) => {
|
|
31325
31047
|
if (sub?.tax_amount > 0 && sub?.tax_groups?.length > 0) {
|
|
31326
|
-
return /* @__PURE__ */
|
|
31327
|
-
/* @__PURE__ */
|
|
31328
|
-
/* @__PURE__ */
|
|
31048
|
+
return /* @__PURE__ */ jsxs57(Fragment24, { children: [
|
|
31049
|
+
/* @__PURE__ */ jsxs57("div", { className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto", children: [
|
|
31050
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31329
31051
|
sub?.name,
|
|
31330
31052
|
":"
|
|
31331
31053
|
] }),
|
|
31332
|
-
/* @__PURE__ */
|
|
31054
|
+
/* @__PURE__ */ jsx87("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right font-semibold", children: formatNumberOnly(parseFloat(sub?.base_amount ?? 0)) + " VND" })
|
|
31333
31055
|
] }),
|
|
31334
|
-
sub?.tax_groups.map((group) => /* @__PURE__ */
|
|
31056
|
+
sub?.tax_groups.map((group) => /* @__PURE__ */ jsxs57(
|
|
31335
31057
|
"div",
|
|
31336
31058
|
{
|
|
31337
31059
|
className: "grid grid-cols-2 gap-x-4 gap-y-2 min-w-[300px] max-w-fit ml-auto mt-2",
|
|
31338
31060
|
children: [
|
|
31339
|
-
/* @__PURE__ */
|
|
31061
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31340
31062
|
group?.group_name,
|
|
31341
31063
|
":"
|
|
31342
31064
|
] }),
|
|
31343
|
-
/* @__PURE__ */
|
|
31065
|
+
/* @__PURE__ */ jsx87("div", { className: "text-[14px] leading-[21px] text-[rgb(73,80,87)] text-right", children: formatNumberOnly(parseFloat(group?.tax_amount ?? 0)) + " VND" })
|
|
31344
31066
|
]
|
|
31345
31067
|
},
|
|
31346
31068
|
`tax_groups_${group?.id}`
|
|
@@ -31348,33 +31070,33 @@ var FeeField = (props) => {
|
|
|
31348
31070
|
] });
|
|
31349
31071
|
}
|
|
31350
31072
|
}),
|
|
31351
|
-
/* @__PURE__ */
|
|
31352
|
-
/* @__PURE__ */
|
|
31073
|
+
/* @__PURE__ */ jsxs57("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: [
|
|
31074
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31353
31075
|
t3("total"),
|
|
31354
31076
|
":"
|
|
31355
31077
|
] }),
|
|
31356
|
-
/* @__PURE__ */
|
|
31078
|
+
/* @__PURE__ */ jsx87("div", { className: "text-xl leading-[21px] font-bold text-[rgb(73,80,87)] text-right ", children: totalAmount })
|
|
31357
31079
|
] }),
|
|
31358
|
-
/* @__PURE__ */
|
|
31359
|
-
/* @__PURE__ */
|
|
31080
|
+
/* @__PURE__ */ jsxs57("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: [
|
|
31081
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31360
31082
|
t3("paid_amount"),
|
|
31361
31083
|
":"
|
|
31362
31084
|
] }),
|
|
31363
|
-
/* @__PURE__ */
|
|
31085
|
+
/* @__PURE__ */ jsx87("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: paid_amount })
|
|
31364
31086
|
] }),
|
|
31365
|
-
/* @__PURE__ */
|
|
31366
|
-
/* @__PURE__ */
|
|
31087
|
+
/* @__PURE__ */ jsxs57("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: [
|
|
31088
|
+
/* @__PURE__ */ jsxs57("div", { className: "text-[14px] leading-[21px] text-right", children: [
|
|
31367
31089
|
t3("remanining_amount"),
|
|
31368
31090
|
":"
|
|
31369
31091
|
] }),
|
|
31370
|
-
/* @__PURE__ */
|
|
31092
|
+
/* @__PURE__ */ jsx87("div", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right ", children: remaining_amount })
|
|
31371
31093
|
] })
|
|
31372
31094
|
] });
|
|
31373
31095
|
};
|
|
31374
31096
|
|
|
31375
31097
|
// src/widgets/basic/file-upload-field/file-upload.tsx
|
|
31376
|
-
import { useEffect as
|
|
31377
|
-
import { jsx as
|
|
31098
|
+
import { useEffect as useEffect18, useRef as useRef15, useState as useState17 } from "react";
|
|
31099
|
+
import { jsx as jsx88, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
31378
31100
|
var RenderFile = ({
|
|
31379
31101
|
file,
|
|
31380
31102
|
onDelete,
|
|
@@ -31384,16 +31106,16 @@ var RenderFile = ({
|
|
|
31384
31106
|
readAs: "all"
|
|
31385
31107
|
});
|
|
31386
31108
|
const fileTypeIcon = {
|
|
31387
|
-
"application/pdf": /* @__PURE__ */
|
|
31388
|
-
"application/zip": /* @__PURE__ */
|
|
31389
|
-
"application/x-zip-compressed": /* @__PURE__ */
|
|
31390
|
-
"application/vnd.ms-excel": /* @__PURE__ */
|
|
31391
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */
|
|
31109
|
+
"application/pdf": /* @__PURE__ */ jsx88(PdfIcon, {}),
|
|
31110
|
+
"application/zip": /* @__PURE__ */ jsx88(ZipIcon, {}),
|
|
31111
|
+
"application/x-zip-compressed": /* @__PURE__ */ jsx88(ZipIcon, {}),
|
|
31112
|
+
"application/vnd.ms-excel": /* @__PURE__ */ jsx88(ExcelIcon, {}),
|
|
31113
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": /* @__PURE__ */ jsx88(ExcelIcon, {})
|
|
31392
31114
|
};
|
|
31393
|
-
return /* @__PURE__ */
|
|
31394
|
-
/* @__PURE__ */
|
|
31395
|
-
/* @__PURE__ */
|
|
31396
|
-
/* @__PURE__ */
|
|
31115
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex gap-2 items-center bg-[#FAFAFA] rounded-[8px] p-[6px]", children: [
|
|
31116
|
+
/* @__PURE__ */ jsx88("div", { className: "w-6 h-6 file-icon", children: info?.type && fileTypeIcon?.[info?.type] }),
|
|
31117
|
+
/* @__PURE__ */ jsxs58("div", { children: [
|
|
31118
|
+
/* @__PURE__ */ jsx88(
|
|
31397
31119
|
"div",
|
|
31398
31120
|
{
|
|
31399
31121
|
style: {
|
|
@@ -31403,20 +31125,20 @@ var RenderFile = ({
|
|
|
31403
31125
|
children: file?.name || file?.display_name || info?.name
|
|
31404
31126
|
}
|
|
31405
31127
|
),
|
|
31406
|
-
/* @__PURE__ */
|
|
31128
|
+
/* @__PURE__ */ jsx88("div", { className: "text-xs text-[#666] font-semibold", children: isNaN(info?.size) ? "" : formatFileSize(info?.size) })
|
|
31407
31129
|
] }),
|
|
31408
|
-
/* @__PURE__ */
|
|
31409
|
-
/* @__PURE__ */
|
|
31130
|
+
/* @__PURE__ */ jsxs58("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: [
|
|
31131
|
+
/* @__PURE__ */ jsx88(
|
|
31410
31132
|
"span",
|
|
31411
31133
|
{
|
|
31412
31134
|
onClick: () => onDownload && onDownload(
|
|
31413
31135
|
file?.data,
|
|
31414
31136
|
file?.name || file?.display_name || info?.name
|
|
31415
31137
|
),
|
|
31416
|
-
children: /* @__PURE__ */
|
|
31138
|
+
children: /* @__PURE__ */ jsx88(DownloadIcon, {})
|
|
31417
31139
|
}
|
|
31418
31140
|
),
|
|
31419
|
-
/* @__PURE__ */
|
|
31141
|
+
/* @__PURE__ */ jsx88("span", { onClick: onDelete, children: /* @__PURE__ */ jsx88(DeleteIconDanger, {}) })
|
|
31420
31142
|
] })
|
|
31421
31143
|
] });
|
|
31422
31144
|
};
|
|
@@ -31438,10 +31160,10 @@ var FileUploadField = (props) => {
|
|
|
31438
31160
|
downloadFunction
|
|
31439
31161
|
} = props;
|
|
31440
31162
|
const { t: t3 } = useI18n();
|
|
31441
|
-
const fileInputRef =
|
|
31442
|
-
const [selectedFiles, setSelectedFiles] =
|
|
31443
|
-
const [uploadError, setUploadError] =
|
|
31444
|
-
|
|
31163
|
+
const fileInputRef = useRef15(null);
|
|
31164
|
+
const [selectedFiles, setSelectedFiles] = useState17([]);
|
|
31165
|
+
const [uploadError, setUploadError] = useState17();
|
|
31166
|
+
useEffect18(() => {
|
|
31445
31167
|
if (selectedFiles?.length === 0 && value) {
|
|
31446
31168
|
setSelectedFiles([
|
|
31447
31169
|
{
|
|
@@ -31450,7 +31172,7 @@ var FileUploadField = (props) => {
|
|
|
31450
31172
|
]);
|
|
31451
31173
|
}
|
|
31452
31174
|
}, [value]);
|
|
31453
|
-
return /* @__PURE__ */
|
|
31175
|
+
return /* @__PURE__ */ jsx88(
|
|
31454
31176
|
Controller,
|
|
31455
31177
|
{
|
|
31456
31178
|
name: name2 || "",
|
|
@@ -31459,7 +31181,7 @@ var FileUploadField = (props) => {
|
|
|
31459
31181
|
required: required ? { value: true, message: `${string} ${t3("must_required")}` } : false
|
|
31460
31182
|
},
|
|
31461
31183
|
render: ({ field: { onChange: onChange2 }, fieldState: { error: error2 } }) => {
|
|
31462
|
-
|
|
31184
|
+
useEffect18(() => {
|
|
31463
31185
|
let data = widget === "many2many_binary" ? selectedFiles : selectedFiles?.[0]?.data;
|
|
31464
31186
|
if (widget !== "many2many_binary" && data && isBase64File(data)) {
|
|
31465
31187
|
data = data.split(",")[1];
|
|
@@ -31475,8 +31197,8 @@ var FileUploadField = (props) => {
|
|
|
31475
31197
|
);
|
|
31476
31198
|
}
|
|
31477
31199
|
}, [selectedFiles]);
|
|
31478
|
-
return /* @__PURE__ */
|
|
31479
|
-
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */
|
|
31200
|
+
return /* @__PURE__ */ jsxs58("div", { children: [
|
|
31201
|
+
selectedFiles?.length > 0 && selectedFiles?.map((fileItem, index4) => /* @__PURE__ */ jsx88(
|
|
31480
31202
|
RenderFile,
|
|
31481
31203
|
{
|
|
31482
31204
|
file: fileItem,
|
|
@@ -31491,8 +31213,8 @@ var FileUploadField = (props) => {
|
|
|
31491
31213
|
}
|
|
31492
31214
|
}
|
|
31493
31215
|
)),
|
|
31494
|
-
uploadError && /* @__PURE__ */
|
|
31495
|
-
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */
|
|
31216
|
+
uploadError && /* @__PURE__ */ jsx88("div", { className: "text-[#de4747]", children: uploadError }),
|
|
31217
|
+
(widget === "many2many_binary" || widget !== "many2many_binary" && selectedFiles?.length === 0) && /* @__PURE__ */ jsx88(
|
|
31496
31218
|
ButtonSelectFiles,
|
|
31497
31219
|
{
|
|
31498
31220
|
fileInputRef,
|
|
@@ -31507,7 +31229,7 @@ var FileUploadField = (props) => {
|
|
|
31507
31229
|
useUploadFile
|
|
31508
31230
|
}
|
|
31509
31231
|
),
|
|
31510
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
31232
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx88("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31511
31233
|
] });
|
|
31512
31234
|
}
|
|
31513
31235
|
}
|
|
@@ -31515,8 +31237,8 @@ var FileUploadField = (props) => {
|
|
|
31515
31237
|
};
|
|
31516
31238
|
|
|
31517
31239
|
// src/widgets/basic/float-field/float.tsx
|
|
31518
|
-
import { useEffect as
|
|
31519
|
-
import { Fragment as Fragment25, jsx as
|
|
31240
|
+
import { useEffect as useEffect19, useRef as useRef16, useState as useState18 } from "react";
|
|
31241
|
+
import { Fragment as Fragment25, jsx as jsx89, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
31520
31242
|
var FloatField = (props) => {
|
|
31521
31243
|
const {
|
|
31522
31244
|
name: name2,
|
|
@@ -31534,9 +31256,9 @@ var FloatField = (props) => {
|
|
|
31534
31256
|
} = props;
|
|
31535
31257
|
const { t: t3 } = useI18n();
|
|
31536
31258
|
if (!isForm && !isEditTable) {
|
|
31537
|
-
return /* @__PURE__ */
|
|
31259
|
+
return /* @__PURE__ */ jsx89("span", { children: formatFloatNumber(propValue ?? defaultValue) });
|
|
31538
31260
|
}
|
|
31539
|
-
return /* @__PURE__ */
|
|
31261
|
+
return /* @__PURE__ */ jsx89(
|
|
31540
31262
|
Controller,
|
|
31541
31263
|
{
|
|
31542
31264
|
name: name2 ?? "",
|
|
@@ -31547,10 +31269,10 @@ var FloatField = (props) => {
|
|
|
31547
31269
|
},
|
|
31548
31270
|
render: ({ field: { onChange: onChange2, value }, fieldState: { error: error2 } }) => {
|
|
31549
31271
|
const { setError, clearErrors } = methods;
|
|
31550
|
-
const [inputValue, setInputValue] =
|
|
31272
|
+
const [inputValue, setInputValue] = useState18(
|
|
31551
31273
|
value !== void 0 && value !== null ? formatFloatNumber(value) : ""
|
|
31552
31274
|
);
|
|
31553
|
-
|
|
31275
|
+
useEffect19(() => {
|
|
31554
31276
|
if (propValue !== void 0 && propValue !== null && propValue !== parseFloat(inputValue?.replace(/,/g, ""))) {
|
|
31555
31277
|
setInputValue(formatFloatNumber(propValue));
|
|
31556
31278
|
clearErrors(name2);
|
|
@@ -31561,9 +31283,9 @@ var FloatField = (props) => {
|
|
|
31561
31283
|
setInputValue("");
|
|
31562
31284
|
}
|
|
31563
31285
|
}, [value, name2, clearErrors, propValue]);
|
|
31564
|
-
const isDirtyRef =
|
|
31565
|
-
const inputRef =
|
|
31566
|
-
const lastCommittedValueRef =
|
|
31286
|
+
const isDirtyRef = useRef16(false);
|
|
31287
|
+
const inputRef = useRef16(null);
|
|
31288
|
+
const lastCommittedValueRef = useRef16(null);
|
|
31567
31289
|
const handleInputChange = (e3) => {
|
|
31568
31290
|
const newValue = e3.target.value;
|
|
31569
31291
|
const valueWithoutCommas = newValue.replace(/,/g, "");
|
|
@@ -31641,8 +31363,8 @@ var FloatField = (props) => {
|
|
|
31641
31363
|
}
|
|
31642
31364
|
isDirtyRef.current = false;
|
|
31643
31365
|
};
|
|
31644
|
-
return /* @__PURE__ */
|
|
31645
|
-
/* @__PURE__ */
|
|
31366
|
+
return /* @__PURE__ */ jsxs59(Fragment25, { children: [
|
|
31367
|
+
/* @__PURE__ */ jsx89(
|
|
31646
31368
|
"input",
|
|
31647
31369
|
{
|
|
31648
31370
|
ref: inputRef,
|
|
@@ -31662,7 +31384,7 @@ var FloatField = (props) => {
|
|
|
31662
31384
|
`
|
|
31663
31385
|
}
|
|
31664
31386
|
),
|
|
31665
|
-
error2 && !isEditTable && /* @__PURE__ */
|
|
31387
|
+
error2 && !isEditTable && /* @__PURE__ */ jsx89("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
31666
31388
|
] });
|
|
31667
31389
|
}
|
|
31668
31390
|
}
|
|
@@ -31670,8 +31392,8 @@ var FloatField = (props) => {
|
|
|
31670
31392
|
};
|
|
31671
31393
|
|
|
31672
31394
|
// src/widgets/basic/float-time-field/float-time.tsx
|
|
31673
|
-
import { useState as
|
|
31674
|
-
import { Fragment as Fragment26, jsx as
|
|
31395
|
+
import { useState as useState19 } from "react";
|
|
31396
|
+
import { Fragment as Fragment26, jsx as jsx90, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
31675
31397
|
var FloatTimeField = (props) => {
|
|
31676
31398
|
const {
|
|
31677
31399
|
name: name2,
|
|
@@ -31687,9 +31409,9 @@ var FloatTimeField = (props) => {
|
|
|
31687
31409
|
const { t: t3 } = useI18n();
|
|
31688
31410
|
if (!isForm) {
|
|
31689
31411
|
const formatValue = value ?? 0;
|
|
31690
|
-
return /* @__PURE__ */
|
|
31412
|
+
return /* @__PURE__ */ jsx90("span", { children: convertFloatToTime(formatValue) });
|
|
31691
31413
|
}
|
|
31692
|
-
return /* @__PURE__ */
|
|
31414
|
+
return /* @__PURE__ */ jsx90(
|
|
31693
31415
|
Controller,
|
|
31694
31416
|
{
|
|
31695
31417
|
name: name2 ?? "",
|
|
@@ -31702,11 +31424,11 @@ var FloatTimeField = (props) => {
|
|
|
31702
31424
|
field: { onChange: fieldOnChange, onBlur, value: value2 },
|
|
31703
31425
|
fieldState: { error: error2, isDirty }
|
|
31704
31426
|
}) => {
|
|
31705
|
-
const [input, setInput] =
|
|
31427
|
+
const [input, setInput] = useState19(
|
|
31706
31428
|
convertFloatToTime(value2 ?? defaultValue)
|
|
31707
31429
|
);
|
|
31708
|
-
const [formattedTime, setFormattedTime] =
|
|
31709
|
-
const [errors, setErrors] =
|
|
31430
|
+
const [formattedTime, setFormattedTime] = useState19("");
|
|
31431
|
+
const [errors, setErrors] = useState19("");
|
|
31710
31432
|
const handleInputChange = (e3) => {
|
|
31711
31433
|
const raw = e3.target.value.replace(/[^\d:]/g, "");
|
|
31712
31434
|
setInput(raw);
|
|
@@ -31751,8 +31473,8 @@ var FloatTimeField = (props) => {
|
|
|
31751
31473
|
}
|
|
31752
31474
|
onBlur();
|
|
31753
31475
|
};
|
|
31754
|
-
return /* @__PURE__ */
|
|
31755
|
-
/* @__PURE__ */
|
|
31476
|
+
return /* @__PURE__ */ jsxs60(Fragment26, { children: [
|
|
31477
|
+
/* @__PURE__ */ jsx90(
|
|
31756
31478
|
"input",
|
|
31757
31479
|
{
|
|
31758
31480
|
type: "text",
|
|
@@ -31784,7 +31506,7 @@ var FloatTimeField = (props) => {
|
|
|
31784
31506
|
readOnly: readonly
|
|
31785
31507
|
}
|
|
31786
31508
|
),
|
|
31787
|
-
(error2 || errors) && /* @__PURE__ */
|
|
31509
|
+
(error2 || errors) && /* @__PURE__ */ jsx90("div", { className: "text-red-500 text-sm", children: error2?.message || errors })
|
|
31788
31510
|
] });
|
|
31789
31511
|
}
|
|
31790
31512
|
}
|
|
@@ -31792,8 +31514,8 @@ var FloatTimeField = (props) => {
|
|
|
31792
31514
|
};
|
|
31793
31515
|
|
|
31794
31516
|
// src/widgets/basic/html-field/html.tsx
|
|
31795
|
-
import { useEffect as
|
|
31796
|
-
import { jsx as
|
|
31517
|
+
import { useEffect as useEffect20, useRef as useRef17 } from "react";
|
|
31518
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
31797
31519
|
var HtmlField = (props) => {
|
|
31798
31520
|
const {
|
|
31799
31521
|
name: name2,
|
|
@@ -31805,18 +31527,18 @@ var HtmlField = (props) => {
|
|
|
31805
31527
|
value,
|
|
31806
31528
|
isEditTable
|
|
31807
31529
|
} = props;
|
|
31808
|
-
const divRef =
|
|
31530
|
+
const divRef = useRef17(null);
|
|
31809
31531
|
if (!isForm && !isEditTable) {
|
|
31810
|
-
return /* @__PURE__ */
|
|
31532
|
+
return /* @__PURE__ */ jsx91("div", { dangerouslySetInnerHTML: { __html: value || defaultValue || "" } });
|
|
31811
31533
|
}
|
|
31812
|
-
return /* @__PURE__ */
|
|
31534
|
+
return /* @__PURE__ */ jsx91(
|
|
31813
31535
|
Controller,
|
|
31814
31536
|
{
|
|
31815
31537
|
name: name2 ?? "",
|
|
31816
31538
|
control: methods?.control,
|
|
31817
31539
|
defaultValue,
|
|
31818
31540
|
render: ({ field: { onChange: fieldOnChange, value: value2 } }) => {
|
|
31819
|
-
|
|
31541
|
+
useEffect20(() => {
|
|
31820
31542
|
if (divRef.current && divRef.current.innerHTML !== value2) {
|
|
31821
31543
|
divRef.current.innerHTML = value2 || "";
|
|
31822
31544
|
}
|
|
@@ -31828,7 +31550,7 @@ var HtmlField = (props) => {
|
|
|
31828
31550
|
onChange2(newValue, "");
|
|
31829
31551
|
}
|
|
31830
31552
|
};
|
|
31831
|
-
return /* @__PURE__ */
|
|
31553
|
+
return /* @__PURE__ */ jsx91(
|
|
31832
31554
|
"div",
|
|
31833
31555
|
{
|
|
31834
31556
|
ref: divRef,
|
|
@@ -31847,28 +31569,28 @@ var HtmlField = (props) => {
|
|
|
31847
31569
|
};
|
|
31848
31570
|
|
|
31849
31571
|
// src/widgets/basic/image-field/image.tsx
|
|
31850
|
-
import { jsx as
|
|
31572
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
31851
31573
|
var ImageField = (props) => {
|
|
31852
31574
|
const { value, type, name: name2, baseURL } = props;
|
|
31853
31575
|
if (!value) return null;
|
|
31854
31576
|
if (type === "url") {
|
|
31855
|
-
return /* @__PURE__ */
|
|
31577
|
+
return /* @__PURE__ */ jsx92("img", { src: `${baseURL}${value}`, width: 48, height: 48, alt: name2 });
|
|
31856
31578
|
}
|
|
31857
|
-
return /* @__PURE__ */
|
|
31579
|
+
return /* @__PURE__ */ jsx92("div", { id: "qr-code", children: /* @__PURE__ */ jsx92("img", { src: `data:image/png;base64,${value}`, alt: "QR Code" }) });
|
|
31858
31580
|
};
|
|
31859
31581
|
|
|
31860
31582
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31861
|
-
import React16, { useEffect as
|
|
31583
|
+
import React16, { useEffect as useEffect21, useMemo as useMemo10 } from "react";
|
|
31862
31584
|
|
|
31863
31585
|
// src/widgets/basic/information-field/information.tsx
|
|
31864
|
-
import { Fragment as Fragment27, jsx as
|
|
31586
|
+
import { Fragment as Fragment27, jsx as jsx93, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
31865
31587
|
var InfomationField = (props) => {
|
|
31866
31588
|
const { value, isForm = false, showName = true, stringToColor } = props;
|
|
31867
31589
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
31868
|
-
return /* @__PURE__ */
|
|
31590
|
+
return /* @__PURE__ */ jsx93(Fragment27, {});
|
|
31869
31591
|
}
|
|
31870
31592
|
const inforValues = Array.isArray(value) ? value : [value];
|
|
31871
|
-
return /* @__PURE__ */
|
|
31593
|
+
return /* @__PURE__ */ jsx93("div", { className: "group relative flex items-center gap-1 rounded-lg transition-shadow duration-300", children: inforValues.length > 1 ? inforValues.map((item) => /* @__PURE__ */ jsx93(
|
|
31872
31594
|
AvatarField,
|
|
31873
31595
|
{
|
|
31874
31596
|
id: item.id,
|
|
@@ -31877,8 +31599,8 @@ var InfomationField = (props) => {
|
|
|
31877
31599
|
stringToColor
|
|
31878
31600
|
},
|
|
31879
31601
|
item.id
|
|
31880
|
-
)) : /* @__PURE__ */
|
|
31881
|
-
/* @__PURE__ */
|
|
31602
|
+
)) : /* @__PURE__ */ jsxs61("div", { className: "flex gap-2 items-center w-max", children: [
|
|
31603
|
+
/* @__PURE__ */ jsx93(
|
|
31882
31604
|
AvatarField,
|
|
31883
31605
|
{
|
|
31884
31606
|
avatarSrc: inforValues[0].image_256,
|
|
@@ -31888,12 +31610,12 @@ var InfomationField = (props) => {
|
|
|
31888
31610
|
stringToColor
|
|
31889
31611
|
}
|
|
31890
31612
|
),
|
|
31891
|
-
showName && /* @__PURE__ */
|
|
31613
|
+
showName && /* @__PURE__ */ jsx93("span", { className: "capitalize", children: inforValues[0].display_name })
|
|
31892
31614
|
] }) });
|
|
31893
31615
|
};
|
|
31894
31616
|
|
|
31895
31617
|
// src/widgets/basic/many2many-tags-field/many2many-tags.tsx
|
|
31896
|
-
import { jsx as
|
|
31618
|
+
import { jsx as jsx94, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
31897
31619
|
var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
31898
31620
|
const { selectProps, data, menuList } = props;
|
|
31899
31621
|
const { relation } = selectProps;
|
|
@@ -31902,8 +31624,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31902
31624
|
(childItem) => childItem?.is_display && childItem?.action?.res_model === relation
|
|
31903
31625
|
)
|
|
31904
31626
|
)?.[0]?.action?.id;
|
|
31905
|
-
return /* @__PURE__ */
|
|
31906
|
-
/* @__PURE__ */
|
|
31627
|
+
return /* @__PURE__ */ jsxs62("div", { className: "flex items-center gap-2 relative mr-2 group", children: [
|
|
31628
|
+
/* @__PURE__ */ jsx94(
|
|
31907
31629
|
AvatarField,
|
|
31908
31630
|
{
|
|
31909
31631
|
id: data?.id,
|
|
@@ -31915,8 +31637,8 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31915
31637
|
stringToColor
|
|
31916
31638
|
}
|
|
31917
31639
|
),
|
|
31918
|
-
/* @__PURE__ */
|
|
31919
|
-
/* @__PURE__ */
|
|
31640
|
+
/* @__PURE__ */ jsx94("span", { className: "capitalize", children: data?.label ?? data?.display_name }),
|
|
31641
|
+
/* @__PURE__ */ jsx94(
|
|
31920
31642
|
"span",
|
|
31921
31643
|
{
|
|
31922
31644
|
className: "absolute !cursor-pointer -top-1 -right-1 font-medium bg-white rounded-full !shadow-lg hidden group-hover:block",
|
|
@@ -31924,7 +31646,7 @@ var CustomMultiValue = ({ stringToColor, ...props }) => {
|
|
|
31924
31646
|
e3.stopPropagation();
|
|
31925
31647
|
props.removeProps.onClick();
|
|
31926
31648
|
},
|
|
31927
|
-
children: /* @__PURE__ */
|
|
31649
|
+
children: /* @__PURE__ */ jsx94(CloseIcon, {})
|
|
31928
31650
|
}
|
|
31929
31651
|
)
|
|
31930
31652
|
] });
|
|
@@ -31934,9 +31656,9 @@ var CustomMenuList = (props) => {
|
|
|
31934
31656
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
31935
31657
|
const { t: t3 } = useI18n();
|
|
31936
31658
|
const limitedChildren = React16.Children.toArray(children).slice(0, 10);
|
|
31937
|
-
return /* @__PURE__ */
|
|
31659
|
+
return /* @__PURE__ */ jsxs62(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
31938
31660
|
limitedChildren,
|
|
31939
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
31661
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs62(
|
|
31940
31662
|
"button",
|
|
31941
31663
|
{
|
|
31942
31664
|
type: "button",
|
|
@@ -31981,7 +31703,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31981
31703
|
value: item.id,
|
|
31982
31704
|
label: item.name ?? item.display_name
|
|
31983
31705
|
})) : [];
|
|
31984
|
-
return /* @__PURE__ */
|
|
31706
|
+
return /* @__PURE__ */ jsx94(
|
|
31985
31707
|
InfomationField,
|
|
31986
31708
|
{
|
|
31987
31709
|
value: optionValue || null,
|
|
@@ -31990,7 +31712,7 @@ var Many2ManyTagField = (props) => {
|
|
|
31990
31712
|
}
|
|
31991
31713
|
);
|
|
31992
31714
|
}
|
|
31993
|
-
return /* @__PURE__ */
|
|
31715
|
+
return /* @__PURE__ */ jsx94(
|
|
31994
31716
|
Controller,
|
|
31995
31717
|
{
|
|
31996
31718
|
name: name2 ?? "",
|
|
@@ -32000,7 +31722,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32000
31722
|
},
|
|
32001
31723
|
render: ({ field, fieldState: { error: error2 } }) => {
|
|
32002
31724
|
const { clearErrors } = methods;
|
|
32003
|
-
|
|
31725
|
+
useEffect21(() => {
|
|
32004
31726
|
if (field.value) {
|
|
32005
31727
|
clearErrors(name2);
|
|
32006
31728
|
}
|
|
@@ -32026,8 +31748,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32026
31748
|
onChange2?.(name2 ?? "", newValue);
|
|
32027
31749
|
clearErrors(name2);
|
|
32028
31750
|
};
|
|
32029
|
-
return /* @__PURE__ */
|
|
32030
|
-
/* @__PURE__ */
|
|
31751
|
+
return /* @__PURE__ */ jsxs62("div", { className: "group h-full overflow-y-auto", children: [
|
|
31752
|
+
/* @__PURE__ */ jsx94(
|
|
32031
31753
|
StateManagedSelect$1,
|
|
32032
31754
|
{
|
|
32033
31755
|
options: options2,
|
|
@@ -32105,7 +31827,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32105
31827
|
})
|
|
32106
31828
|
},
|
|
32107
31829
|
components: isUser ? {
|
|
32108
|
-
MultiValue: (multiValueProps) => /* @__PURE__ */
|
|
31830
|
+
MultiValue: (multiValueProps) => /* @__PURE__ */ jsx94(
|
|
32109
31831
|
CustomMultiValue,
|
|
32110
31832
|
{
|
|
32111
31833
|
...multiValueProps,
|
|
@@ -32114,7 +31836,7 @@ var Many2ManyTagField = (props) => {
|
|
|
32114
31836
|
),
|
|
32115
31837
|
IndicatorSeparator: () => null
|
|
32116
31838
|
} : {
|
|
32117
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
31839
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx94(
|
|
32118
31840
|
CustomMenuList,
|
|
32119
31841
|
{
|
|
32120
31842
|
...menuListProps,
|
|
@@ -32125,13 +31847,13 @@ var Many2ManyTagField = (props) => {
|
|
|
32125
31847
|
}
|
|
32126
31848
|
),
|
|
32127
31849
|
IndicatorSeparator: () => null,
|
|
32128
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
32129
|
-
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
31850
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx94(components.DropdownIndicator, { ...props2 }),
|
|
31851
|
+
ClearIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx94(components.ClearIndicator, { ...props2 })
|
|
32130
31852
|
},
|
|
32131
31853
|
required: !invisible && required
|
|
32132
31854
|
}
|
|
32133
31855
|
),
|
|
32134
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31856
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx94("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32135
31857
|
] });
|
|
32136
31858
|
}
|
|
32137
31859
|
}
|
|
@@ -32139,8 +31861,8 @@ var Many2ManyTagField = (props) => {
|
|
|
32139
31861
|
};
|
|
32140
31862
|
|
|
32141
31863
|
// src/widgets/basic/monetary-field/monetary.tsx
|
|
32142
|
-
import { useEffect as
|
|
32143
|
-
import { Fragment as Fragment28, jsx as
|
|
31864
|
+
import { useEffect as useEffect22 } from "react";
|
|
31865
|
+
import { Fragment as Fragment28, jsx as jsx95, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
32144
31866
|
var MonetaryField = (props) => {
|
|
32145
31867
|
const { t: t3 } = useI18n();
|
|
32146
31868
|
const {
|
|
@@ -32160,26 +31882,26 @@ var MonetaryField = (props) => {
|
|
|
32160
31882
|
isEditTable
|
|
32161
31883
|
} = props;
|
|
32162
31884
|
if (isForm && name2 === "amount_residual") {
|
|
32163
|
-
return /* @__PURE__ */
|
|
32164
|
-
/* @__PURE__ */
|
|
31885
|
+
return /* @__PURE__ */ jsxs63("div", { className: "flex justify-end gap-x-4 gap-y-2 ml-auto mt-2 lg:mt-5", children: [
|
|
31886
|
+
/* @__PURE__ */ jsxs63("span", { className: "font-semibold", children: [
|
|
32165
31887
|
string,
|
|
32166
31888
|
":"
|
|
32167
31889
|
] }),
|
|
32168
|
-
/* @__PURE__ */
|
|
31890
|
+
/* @__PURE__ */ jsx95("span", { className: "text-lg leading-[21px] font-semibold text-[rgb(73,80,87)] text-right", children: `${formatNumberOnly(parseFloat(value ?? defaultValue))} VND` })
|
|
32169
31891
|
] });
|
|
32170
31892
|
}
|
|
32171
31893
|
if (!isForm) {
|
|
32172
31894
|
const currencySymbol = widget === "monetary" ? formValues?.currency_id?.symbol : "VND";
|
|
32173
31895
|
if (widget === "monetary" && !formValues?.currency_id) {
|
|
32174
|
-
return /* @__PURE__ */
|
|
31896
|
+
return /* @__PURE__ */ jsx95("span", { children: `${formatNumberOnly(
|
|
32175
31897
|
parseFloat(String(value ?? defaultValue))
|
|
32176
31898
|
)} VND` });
|
|
32177
31899
|
}
|
|
32178
|
-
return /* @__PURE__ */
|
|
31900
|
+
return /* @__PURE__ */ jsx95("span", { children: `${formatNumberOnly(
|
|
32179
31901
|
parseFloat(value ?? defaultValue)
|
|
32180
31902
|
)} ${currencySymbol}` });
|
|
32181
31903
|
}
|
|
32182
|
-
return /* @__PURE__ */
|
|
31904
|
+
return /* @__PURE__ */ jsx95(
|
|
32183
31905
|
Controller,
|
|
32184
31906
|
{
|
|
32185
31907
|
name: name2 ?? "",
|
|
@@ -32193,13 +31915,13 @@ var MonetaryField = (props) => {
|
|
|
32193
31915
|
fieldState: { error: error2 }
|
|
32194
31916
|
}) => {
|
|
32195
31917
|
const { setError, clearErrors } = methods;
|
|
32196
|
-
|
|
31918
|
+
useEffect22(() => {
|
|
32197
31919
|
if (value2 !== void 0 && value2 !== null && !isNaN(value2)) {
|
|
32198
31920
|
clearErrors(name2);
|
|
32199
31921
|
}
|
|
32200
31922
|
}, [value2]);
|
|
32201
|
-
return /* @__PURE__ */
|
|
32202
|
-
/* @__PURE__ */
|
|
31923
|
+
return /* @__PURE__ */ jsxs63(Fragment28, { children: [
|
|
31924
|
+
/* @__PURE__ */ jsx95(
|
|
32203
31925
|
"input",
|
|
32204
31926
|
{
|
|
32205
31927
|
value: formatNumberOnly(value2),
|
|
@@ -32237,7 +31959,7 @@ var MonetaryField = (props) => {
|
|
|
32237
31959
|
`
|
|
32238
31960
|
}
|
|
32239
31961
|
),
|
|
32240
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
31962
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx95("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32241
31963
|
] });
|
|
32242
31964
|
}
|
|
32243
31965
|
}
|
|
@@ -32245,14 +31967,14 @@ var MonetaryField = (props) => {
|
|
|
32245
31967
|
};
|
|
32246
31968
|
|
|
32247
31969
|
// src/widgets/basic/paid-badged-field/paid-badged.tsx
|
|
32248
|
-
import { jsx as
|
|
31970
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
32249
31971
|
var PaidBadgedField = () => {
|
|
32250
|
-
return /* @__PURE__ */
|
|
31972
|
+
return /* @__PURE__ */ jsx96("div", { className: "absolute z-[4] right-4 top-4", children: /* @__PURE__ */ jsx96(PaidIcon, {}) });
|
|
32251
31973
|
};
|
|
32252
31974
|
|
|
32253
31975
|
// src/widgets/basic/priority-field/rating-star.tsx
|
|
32254
|
-
import React17, { useEffect as
|
|
32255
|
-
import { jsx as
|
|
31976
|
+
import React17, { useEffect as useEffect23, useState as useState20 } from "react";
|
|
31977
|
+
import { jsx as jsx97, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
32256
31978
|
var RatingStarField = (props) => {
|
|
32257
31979
|
const {
|
|
32258
31980
|
label,
|
|
@@ -32261,9 +31983,9 @@ var RatingStarField = (props) => {
|
|
|
32261
31983
|
onSelectPriority,
|
|
32262
31984
|
id
|
|
32263
31985
|
} = props;
|
|
32264
|
-
const [rating, setRating] =
|
|
32265
|
-
const [hover, setHover] =
|
|
32266
|
-
|
|
31986
|
+
const [rating, setRating] = useState20(defaultValue);
|
|
31987
|
+
const [hover, setHover] = useState20(0);
|
|
31988
|
+
useEffect23(() => {
|
|
32267
31989
|
setRating(defaultValue);
|
|
32268
31990
|
}, [defaultValue]);
|
|
32269
31991
|
const handleClick = (value) => {
|
|
@@ -32287,7 +32009,7 @@ var RatingStarField = (props) => {
|
|
|
32287
32009
|
setHover(0);
|
|
32288
32010
|
setRating(0);
|
|
32289
32011
|
};
|
|
32290
|
-
return /* @__PURE__ */
|
|
32012
|
+
return /* @__PURE__ */ jsx97(
|
|
32291
32013
|
"div",
|
|
32292
32014
|
{
|
|
32293
32015
|
className: "flex gap-1 cursor-pointer w-fit",
|
|
@@ -32297,17 +32019,17 @@ var RatingStarField = (props) => {
|
|
|
32297
32019
|
const starValue = index4 + 1;
|
|
32298
32020
|
const fillColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "white" : rating >= starValue ? "#f3cc00" : "white";
|
|
32299
32021
|
const strokeColor = hover > 0 ? hover >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)" : rating >= starValue ? "#f3cc00" : "rgba(73,80,87,0.76)";
|
|
32300
|
-
return /* @__PURE__ */
|
|
32301
|
-
/* @__PURE__ */
|
|
32022
|
+
return /* @__PURE__ */ jsxs64(React17.Fragment, { children: [
|
|
32023
|
+
/* @__PURE__ */ jsx97(
|
|
32302
32024
|
"div",
|
|
32303
32025
|
{
|
|
32304
32026
|
onMouseEnter: () => handleHover(starValue),
|
|
32305
32027
|
onClick: () => handleClick(starValue),
|
|
32306
32028
|
"data-tooltip-id": `${id}-${starValue}`,
|
|
32307
|
-
children: /* @__PURE__ */
|
|
32029
|
+
children: /* @__PURE__ */ jsx97(StarIcon, { fill: fillColor, stroke: strokeColor })
|
|
32308
32030
|
}
|
|
32309
32031
|
),
|
|
32310
|
-
/* @__PURE__ */
|
|
32032
|
+
/* @__PURE__ */ jsx97(
|
|
32311
32033
|
M,
|
|
32312
32034
|
{
|
|
32313
32035
|
className: "z-50",
|
|
@@ -32323,7 +32045,7 @@ var RatingStarField = (props) => {
|
|
|
32323
32045
|
};
|
|
32324
32046
|
|
|
32325
32047
|
// src/widgets/basic/priority-field/priority.tsx
|
|
32326
|
-
import { jsx as
|
|
32048
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
32327
32049
|
var PriorityField = (props) => {
|
|
32328
32050
|
const {
|
|
32329
32051
|
isForm,
|
|
@@ -32339,7 +32061,7 @@ var PriorityField = (props) => {
|
|
|
32339
32061
|
const label = viewData?.models?.[model]?.[name ?? ""]?.string ?? name;
|
|
32340
32062
|
const defaultPriority = parseInt(value) + 1;
|
|
32341
32063
|
if (!isForm) {
|
|
32342
|
-
return /* @__PURE__ */
|
|
32064
|
+
return /* @__PURE__ */ jsx98(
|
|
32343
32065
|
RatingStarField,
|
|
32344
32066
|
{
|
|
32345
32067
|
label,
|
|
@@ -32350,7 +32072,7 @@ var PriorityField = (props) => {
|
|
|
32350
32072
|
}
|
|
32351
32073
|
);
|
|
32352
32074
|
}
|
|
32353
|
-
return /* @__PURE__ */
|
|
32075
|
+
return /* @__PURE__ */ jsx98(
|
|
32354
32076
|
Controller,
|
|
32355
32077
|
{
|
|
32356
32078
|
name: name ?? "",
|
|
@@ -32360,7 +32082,7 @@ var PriorityField = (props) => {
|
|
|
32360
32082
|
field.onChange(String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32361
32083
|
onChange2?.(name ?? "", String(value2 - 1 <= 0 ? 0 : value2 - 1));
|
|
32362
32084
|
};
|
|
32363
|
-
return /* @__PURE__ */
|
|
32085
|
+
return /* @__PURE__ */ jsx98(
|
|
32364
32086
|
RatingStarField,
|
|
32365
32087
|
{
|
|
32366
32088
|
label,
|
|
@@ -32376,8 +32098,8 @@ var PriorityField = (props) => {
|
|
|
32376
32098
|
};
|
|
32377
32099
|
|
|
32378
32100
|
// src/widgets/basic/radio-group-field/radio-group.tsx
|
|
32379
|
-
import { useEffect as
|
|
32380
|
-
import { jsx as
|
|
32101
|
+
import { useEffect as useEffect24 } from "react";
|
|
32102
|
+
import { jsx as jsx99, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
32381
32103
|
var RadioGroupField = (props) => {
|
|
32382
32104
|
const {
|
|
32383
32105
|
name: name2,
|
|
@@ -32390,19 +32112,19 @@ var RadioGroupField = (props) => {
|
|
|
32390
32112
|
onChange: onChange2,
|
|
32391
32113
|
setValue
|
|
32392
32114
|
} = props;
|
|
32393
|
-
|
|
32115
|
+
useEffect24(() => {
|
|
32394
32116
|
if (selection?.length > 0) {
|
|
32395
32117
|
if (setValue) setValue(name2, selection?.[0]?.[0]);
|
|
32396
32118
|
}
|
|
32397
32119
|
}, [selection, name2, setValue]);
|
|
32398
32120
|
if (!methods) return null;
|
|
32399
|
-
return /* @__PURE__ */
|
|
32121
|
+
return /* @__PURE__ */ jsx99(
|
|
32400
32122
|
Controller,
|
|
32401
32123
|
{
|
|
32402
32124
|
name: name2 ?? "",
|
|
32403
32125
|
control: methods.control,
|
|
32404
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32405
|
-
/* @__PURE__ */
|
|
32126
|
+
render: ({ field }) => /* @__PURE__ */ jsx99("div", { className: "flex items-center gap-[10px] pb-4", children: selection?.map((select) => /* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-1", children: [
|
|
32127
|
+
/* @__PURE__ */ jsx99(
|
|
32406
32128
|
"input",
|
|
32407
32129
|
{
|
|
32408
32130
|
type: "radio",
|
|
@@ -32421,7 +32143,7 @@ var RadioGroupField = (props) => {
|
|
|
32421
32143
|
className: "custom-radio"
|
|
32422
32144
|
}
|
|
32423
32145
|
),
|
|
32424
|
-
/* @__PURE__ */
|
|
32146
|
+
/* @__PURE__ */ jsx99("label", { htmlFor: String(select[0]), children: select[1] })
|
|
32425
32147
|
] }, select[0])) })
|
|
32426
32148
|
}
|
|
32427
32149
|
);
|
|
@@ -32429,7 +32151,7 @@ var RadioGroupField = (props) => {
|
|
|
32429
32151
|
|
|
32430
32152
|
// src/widgets/basic/remaining-days-field/remaining-days.tsx
|
|
32431
32153
|
var import_moment3 = __toESM(require_moment());
|
|
32432
|
-
import { jsx as
|
|
32154
|
+
import { jsx as jsx100, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
32433
32155
|
var RemainingDaysField = (props) => {
|
|
32434
32156
|
const {
|
|
32435
32157
|
value,
|
|
@@ -32440,14 +32162,14 @@ var RemainingDaysField = (props) => {
|
|
|
32440
32162
|
if (!value) return null;
|
|
32441
32163
|
const adjustedValue = (0, import_moment3.default)(value).add(7, "hours");
|
|
32442
32164
|
const isFuture = adjustedValue.isAfter((0, import_moment3.default)());
|
|
32443
|
-
return /* @__PURE__ */
|
|
32444
|
-
/* @__PURE__ */
|
|
32445
|
-
/* @__PURE__ */
|
|
32165
|
+
return /* @__PURE__ */ jsxs66("div", { className: isForm ? "mb-4" : "", children: [
|
|
32166
|
+
/* @__PURE__ */ jsx100(M, { id: `remainingDays_${value}`, place: "top", content: string }),
|
|
32167
|
+
/* @__PURE__ */ jsx100(
|
|
32446
32168
|
"div",
|
|
32447
32169
|
{
|
|
32448
32170
|
"data-tooltip-id": `remainingDays_${value}`,
|
|
32449
32171
|
className: "flex items-center w-fit cursor-context-menu",
|
|
32450
|
-
children: /* @__PURE__ */
|
|
32172
|
+
children: /* @__PURE__ */ jsx100(
|
|
32451
32173
|
"div",
|
|
32452
32174
|
{
|
|
32453
32175
|
className: `text-sm font-semibold ${isFuture ? "text-[rgba(73,80,87,0.76)]" : "text-red-700"}`,
|
|
@@ -32460,7 +32182,7 @@ var RemainingDaysField = (props) => {
|
|
|
32460
32182
|
};
|
|
32461
32183
|
|
|
32462
32184
|
// src/widgets/basic/select-dropdown-field/select-dropdown.tsx
|
|
32463
|
-
import { Fragment as Fragment29, jsx as
|
|
32185
|
+
import { Fragment as Fragment29, jsx as jsx101, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
32464
32186
|
var SelectDropdownField = (props) => {
|
|
32465
32187
|
const { t: t3 } = useI18n();
|
|
32466
32188
|
const {
|
|
@@ -32482,9 +32204,9 @@ var SelectDropdownField = (props) => {
|
|
|
32482
32204
|
label: val[1]
|
|
32483
32205
|
})) : [];
|
|
32484
32206
|
if (!isForm && !isEditTable) {
|
|
32485
|
-
return /* @__PURE__ */
|
|
32207
|
+
return /* @__PURE__ */ jsx101("span", { children: options2?.find((item) => item?.value === value)?.label });
|
|
32486
32208
|
} else {
|
|
32487
|
-
return /* @__PURE__ */
|
|
32209
|
+
return /* @__PURE__ */ jsx101(
|
|
32488
32210
|
Controller,
|
|
32489
32211
|
{
|
|
32490
32212
|
name: name2 || "",
|
|
@@ -32511,8 +32233,8 @@ var SelectDropdownField = (props) => {
|
|
|
32511
32233
|
value: defaultValue || null,
|
|
32512
32234
|
required: !invisible && required
|
|
32513
32235
|
};
|
|
32514
|
-
return /* @__PURE__ */
|
|
32515
|
-
/* @__PURE__ */
|
|
32236
|
+
return /* @__PURE__ */ jsxs67(Fragment29, { children: [
|
|
32237
|
+
/* @__PURE__ */ jsx101("div", { className: "group", children: /* @__PURE__ */ jsx101(
|
|
32516
32238
|
StateManagedSelect$1,
|
|
32517
32239
|
{
|
|
32518
32240
|
...commonProps,
|
|
@@ -32567,12 +32289,12 @@ var SelectDropdownField = (props) => {
|
|
|
32567
32289
|
menuPortalTarget: typeof window !== "undefined" ? document.body : null,
|
|
32568
32290
|
components: {
|
|
32569
32291
|
IndicatorSeparator: () => null,
|
|
32570
|
-
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */
|
|
32292
|
+
DropdownIndicator: (props2) => readonly || !isEditTable ? null : /* @__PURE__ */ jsx101(components.DropdownIndicator, { ...props2 })
|
|
32571
32293
|
},
|
|
32572
32294
|
noOptionsMessage: () => t3("no-available")
|
|
32573
32295
|
}
|
|
32574
32296
|
) }),
|
|
32575
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
32297
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx101("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32576
32298
|
] });
|
|
32577
32299
|
}
|
|
32578
32300
|
}
|
|
@@ -32581,7 +32303,7 @@ var SelectDropdownField = (props) => {
|
|
|
32581
32303
|
};
|
|
32582
32304
|
|
|
32583
32305
|
// src/widgets/basic/textarea-field/textarea.tsx
|
|
32584
|
-
import { jsx as
|
|
32306
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
32585
32307
|
var TextAreaField = (props) => {
|
|
32586
32308
|
const {
|
|
32587
32309
|
methods,
|
|
@@ -32605,9 +32327,9 @@ var TextAreaField = (props) => {
|
|
|
32605
32327
|
}
|
|
32606
32328
|
}) : {};
|
|
32607
32329
|
if (!isForm) {
|
|
32608
|
-
return /* @__PURE__ */
|
|
32330
|
+
return /* @__PURE__ */ jsx102("span", { children: value && typeof value === "object" ? value.display_name : value });
|
|
32609
32331
|
}
|
|
32610
|
-
return /* @__PURE__ */
|
|
32332
|
+
return /* @__PURE__ */ jsx102(
|
|
32611
32333
|
"textarea",
|
|
32612
32334
|
{
|
|
32613
32335
|
...formProps,
|
|
@@ -32623,7 +32345,7 @@ var TextAreaField = (props) => {
|
|
|
32623
32345
|
};
|
|
32624
32346
|
|
|
32625
32347
|
// src/widgets/basic/toggle-button-field/toggle-button.tsx
|
|
32626
|
-
import { jsx as
|
|
32348
|
+
import { jsx as jsx103, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
32627
32349
|
var ToggleButtonField = (props) => {
|
|
32628
32350
|
const {
|
|
32629
32351
|
name: name2,
|
|
@@ -32633,13 +32355,13 @@ var ToggleButtonField = (props) => {
|
|
|
32633
32355
|
onChange: onChange2,
|
|
32634
32356
|
methods
|
|
32635
32357
|
} = props;
|
|
32636
|
-
return /* @__PURE__ */
|
|
32358
|
+
return /* @__PURE__ */ jsx103(
|
|
32637
32359
|
Controller,
|
|
32638
32360
|
{
|
|
32639
32361
|
name: name2 ?? "",
|
|
32640
32362
|
control: methods?.control,
|
|
32641
|
-
render: ({ field }) => /* @__PURE__ */
|
|
32642
|
-
/* @__PURE__ */
|
|
32363
|
+
render: ({ field }) => /* @__PURE__ */ jsx103("div", { className: "inline-flex items-center", children: /* @__PURE__ */ jsxs68("label", { className: "relative inline-block w-8 h-5 cursor-pointer", children: [
|
|
32364
|
+
/* @__PURE__ */ jsx103(
|
|
32643
32365
|
"input",
|
|
32644
32366
|
{
|
|
32645
32367
|
...field,
|
|
@@ -32658,7 +32380,7 @@ var ToggleButtonField = (props) => {
|
|
|
32658
32380
|
checked: field.value ?? false
|
|
32659
32381
|
}
|
|
32660
32382
|
),
|
|
32661
|
-
/* @__PURE__ */
|
|
32383
|
+
/* @__PURE__ */ jsx103(
|
|
32662
32384
|
"span",
|
|
32663
32385
|
{
|
|
32664
32386
|
style: {
|
|
@@ -32667,7 +32389,7 @@ var ToggleButtonField = (props) => {
|
|
|
32667
32389
|
},
|
|
32668
32390
|
className: `rounded-full transition duration-300
|
|
32669
32391
|
${field.value ? "bg-primary" : "bg-gray-300"}`,
|
|
32670
|
-
children: /* @__PURE__ */
|
|
32392
|
+
children: /* @__PURE__ */ jsx103(
|
|
32671
32393
|
"span",
|
|
32672
32394
|
{
|
|
32673
32395
|
style: {
|
|
@@ -32691,8 +32413,8 @@ var ToggleButtonField = (props) => {
|
|
|
32691
32413
|
};
|
|
32692
32414
|
|
|
32693
32415
|
// src/widgets/basic/integer-field/integer.tsx
|
|
32694
|
-
import { useEffect as
|
|
32695
|
-
import { Fragment as Fragment30, jsx as
|
|
32416
|
+
import { useEffect as useEffect25, useRef as useRef18, useState as useState21 } from "react";
|
|
32417
|
+
import { Fragment as Fragment30, jsx as jsx104, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
32696
32418
|
var IntegerField = (props) => {
|
|
32697
32419
|
const {
|
|
32698
32420
|
name: name2,
|
|
@@ -32711,9 +32433,9 @@ var IntegerField = (props) => {
|
|
|
32711
32433
|
const { t: t3 } = useI18n();
|
|
32712
32434
|
if (!isForm && !isEditTable) {
|
|
32713
32435
|
const displayValue = value ?? defaultValue;
|
|
32714
|
-
return /* @__PURE__ */
|
|
32436
|
+
return /* @__PURE__ */ jsx104("span", { children: typeof displayValue === "object" ? JSON.stringify(displayValue) : formatNumberOnly(displayValue) });
|
|
32715
32437
|
}
|
|
32716
|
-
return /* @__PURE__ */
|
|
32438
|
+
return /* @__PURE__ */ jsx104(
|
|
32717
32439
|
Controller,
|
|
32718
32440
|
{
|
|
32719
32441
|
name: name2 || "",
|
|
@@ -32727,13 +32449,13 @@ var IntegerField = (props) => {
|
|
|
32727
32449
|
fieldState: { error: error2 }
|
|
32728
32450
|
}) => {
|
|
32729
32451
|
const { setError, clearErrors } = methods;
|
|
32730
|
-
const isDirtyRef =
|
|
32731
|
-
const inputRef =
|
|
32732
|
-
const lastCommittedValueRef =
|
|
32733
|
-
const [inputValue, setInputValue] =
|
|
32452
|
+
const isDirtyRef = useRef18(false);
|
|
32453
|
+
const inputRef = useRef18(null);
|
|
32454
|
+
const lastCommittedValueRef = useRef18(null);
|
|
32455
|
+
const [inputValue, setInputValue] = useState21(
|
|
32734
32456
|
value2 !== void 0 && value2 !== null ? String(value2) : ""
|
|
32735
32457
|
);
|
|
32736
|
-
|
|
32458
|
+
useEffect25(() => {
|
|
32737
32459
|
if (value2 !== void 0 && value2 !== null) {
|
|
32738
32460
|
setInputValue(String(value2));
|
|
32739
32461
|
clearErrors(name2);
|
|
@@ -32791,8 +32513,8 @@ var IntegerField = (props) => {
|
|
|
32791
32513
|
inputRef.current?.blur();
|
|
32792
32514
|
clearErrors(name2);
|
|
32793
32515
|
};
|
|
32794
|
-
return /* @__PURE__ */
|
|
32795
|
-
/* @__PURE__ */
|
|
32516
|
+
return /* @__PURE__ */ jsxs69(Fragment30, { children: [
|
|
32517
|
+
/* @__PURE__ */ jsx104(
|
|
32796
32518
|
"input",
|
|
32797
32519
|
{
|
|
32798
32520
|
ref: inputRef,
|
|
@@ -32827,7 +32549,7 @@ var IntegerField = (props) => {
|
|
|
32827
32549
|
`
|
|
32828
32550
|
}
|
|
32829
32551
|
),
|
|
32830
|
-
error2 && isEditTable && /* @__PURE__ */
|
|
32552
|
+
error2 && isEditTable && /* @__PURE__ */ jsx104("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
32831
32553
|
] });
|
|
32832
32554
|
}
|
|
32833
32555
|
}
|
|
@@ -32835,7 +32557,7 @@ var IntegerField = (props) => {
|
|
|
32835
32557
|
};
|
|
32836
32558
|
|
|
32837
32559
|
// src/widgets/basic/status-dropdown-field/status-dropdown.tsx
|
|
32838
|
-
import { jsx as
|
|
32560
|
+
import { jsx as jsx105, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
32839
32561
|
var StatusDropdownField = (props) => {
|
|
32840
32562
|
const {
|
|
32841
32563
|
buttonRef,
|
|
@@ -32847,13 +32569,13 @@ var StatusDropdownField = (props) => {
|
|
|
32847
32569
|
handleClick,
|
|
32848
32570
|
colors: colors2
|
|
32849
32571
|
} = props;
|
|
32850
|
-
return /* @__PURE__ */
|
|
32572
|
+
return /* @__PURE__ */ jsxs70(
|
|
32851
32573
|
"div",
|
|
32852
32574
|
{
|
|
32853
32575
|
ref: buttonRef,
|
|
32854
32576
|
className: isForm ? "absolute top-7 right-6 z-10" : void 0,
|
|
32855
32577
|
children: [
|
|
32856
|
-
/* @__PURE__ */
|
|
32578
|
+
/* @__PURE__ */ jsx105(
|
|
32857
32579
|
"button",
|
|
32858
32580
|
{
|
|
32859
32581
|
type: "button",
|
|
@@ -32861,23 +32583,23 @@ var StatusDropdownField = (props) => {
|
|
|
32861
32583
|
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"}`
|
|
32862
32584
|
}
|
|
32863
32585
|
),
|
|
32864
|
-
isOpen && /* @__PURE__ */
|
|
32586
|
+
isOpen && /* @__PURE__ */ jsx105("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) => {
|
|
32865
32587
|
const isActive = item[0] == state;
|
|
32866
|
-
return /* @__PURE__ */
|
|
32588
|
+
return /* @__PURE__ */ jsxs70(
|
|
32867
32589
|
"div",
|
|
32868
32590
|
{
|
|
32869
32591
|
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" : ""}`,
|
|
32870
32592
|
onClick: () => handleClick(item[0]),
|
|
32871
32593
|
children: [
|
|
32872
|
-
/* @__PURE__ */
|
|
32873
|
-
/* @__PURE__ */
|
|
32874
|
-
/* @__PURE__ */
|
|
32594
|
+
/* @__PURE__ */ jsx105("div", { className: "w-4 h-4", children: isActive && /* @__PURE__ */ jsx105(CheckIcon, {}) }),
|
|
32595
|
+
/* @__PURE__ */ jsxs70("div", { className: "flex items-center gap-2", children: [
|
|
32596
|
+
/* @__PURE__ */ jsx105(
|
|
32875
32597
|
"div",
|
|
32876
32598
|
{
|
|
32877
32599
|
className: `rounded-full size-4 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.2)] !border-none ${colors2[item[0]]}`
|
|
32878
32600
|
}
|
|
32879
32601
|
),
|
|
32880
|
-
/* @__PURE__ */
|
|
32602
|
+
/* @__PURE__ */ jsx105("span", { className: "text-sm", children: item[1] })
|
|
32881
32603
|
] })
|
|
32882
32604
|
]
|
|
32883
32605
|
},
|
|
@@ -32891,8 +32613,8 @@ var StatusDropdownField = (props) => {
|
|
|
32891
32613
|
|
|
32892
32614
|
// src/widgets/basic/many2many-field/many2many.tsx
|
|
32893
32615
|
import { createPortal as createPortal5 } from "react-dom";
|
|
32894
|
-
import { useEffect as
|
|
32895
|
-
import { jsx as
|
|
32616
|
+
import { useEffect as useEffect26 } from "react";
|
|
32617
|
+
import { jsx as jsx106, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
32896
32618
|
var Many2ManyField = (props) => {
|
|
32897
32619
|
const { t: t3 } = useI18n();
|
|
32898
32620
|
const {
|
|
@@ -32951,7 +32673,7 @@ var Many2ManyField = (props) => {
|
|
|
32951
32673
|
clearSearch
|
|
32952
32674
|
} = searchController;
|
|
32953
32675
|
const { handleCheckBoxAll, checkedAll, selectedRowKeysRef } = tableHeadController;
|
|
32954
|
-
|
|
32676
|
+
useEffect26(() => {
|
|
32955
32677
|
const groupItems = Array.isArray(selectedTags) ? selectedTags.filter((item) => item.type === "group_by") : [];
|
|
32956
32678
|
if (groupItems?.length > 0) {
|
|
32957
32679
|
typeof setPageLimit === "function" && setPageLimit(80);
|
|
@@ -32966,7 +32688,7 @@ var Many2ManyField = (props) => {
|
|
|
32966
32688
|
};
|
|
32967
32689
|
}, [selectedTags]);
|
|
32968
32690
|
return createPortal5(
|
|
32969
|
-
/* @__PURE__ */
|
|
32691
|
+
/* @__PURE__ */ jsxs71(
|
|
32970
32692
|
"div",
|
|
32971
32693
|
{
|
|
32972
32694
|
style: {
|
|
@@ -32974,8 +32696,8 @@ var Many2ManyField = (props) => {
|
|
|
32974
32696
|
},
|
|
32975
32697
|
className: "fixed bottom-0 left-0 right-0 top-0",
|
|
32976
32698
|
children: [
|
|
32977
|
-
/* @__PURE__ */
|
|
32978
|
-
/* @__PURE__ */
|
|
32699
|
+
/* @__PURE__ */ jsx106("div", { className: "absolute inset-0 bg-[rgba(27,27,27,0.48)]" }),
|
|
32700
|
+
/* @__PURE__ */ jsx106("div", { className: "absolute inset-0 overflow-auto px-6 flex justify-center items-center", children: /* @__PURE__ */ jsxs71(
|
|
32979
32701
|
"div",
|
|
32980
32702
|
{
|
|
32981
32703
|
style: {
|
|
@@ -32983,12 +32705,12 @@ var Many2ManyField = (props) => {
|
|
|
32983
32705
|
},
|
|
32984
32706
|
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",
|
|
32985
32707
|
children: [
|
|
32986
|
-
/* @__PURE__ */
|
|
32987
|
-
/* @__PURE__ */
|
|
32988
|
-
/* @__PURE__ */
|
|
32708
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex justify-between items-center border-b border-[rgba(0,0,0,0.1)] pb-2", children: [
|
|
32709
|
+
/* @__PURE__ */ jsx106("div", { className: "text-[20px] font-semibold", children: title }),
|
|
32710
|
+
/* @__PURE__ */ jsx106("button", { className: "cursor-pointer", onClick: onClose, children: /* @__PURE__ */ jsx106(CloseIcon, {}) })
|
|
32989
32711
|
] }),
|
|
32990
|
-
/* @__PURE__ */
|
|
32991
|
-
/* @__PURE__ */
|
|
32712
|
+
/* @__PURE__ */ jsxs71("div", { className: "grid grid-cols-3 gap-2 items-center py-2", children: [
|
|
32713
|
+
/* @__PURE__ */ jsx106("div", { className: "col-span-3 sm:col-span-2 flex-1", children: /* @__PURE__ */ jsx106(
|
|
32992
32714
|
Search,
|
|
32993
32715
|
{
|
|
32994
32716
|
removeSearchItems,
|
|
@@ -33022,7 +32744,7 @@ var Many2ManyField = (props) => {
|
|
|
33022
32744
|
groupByList
|
|
33023
32745
|
}
|
|
33024
32746
|
) }),
|
|
33025
|
-
/* @__PURE__ */
|
|
32747
|
+
/* @__PURE__ */ jsx106(
|
|
33026
32748
|
PaginationView,
|
|
33027
32749
|
{
|
|
33028
32750
|
className: "pagination-bar col-span-3 sm:col-span-1 justify-end flex-1",
|
|
@@ -33039,20 +32761,20 @@ var Many2ManyField = (props) => {
|
|
|
33039
32761
|
}
|
|
33040
32762
|
)
|
|
33041
32763
|
] }),
|
|
33042
|
-
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */
|
|
32764
|
+
!isLoading && isFetched || isPlaceholderData ? /* @__PURE__ */ jsx106("div", { className: "relative overflow-y-auto", children: /* @__PURE__ */ jsx106("div", { className: "relative h-full w-full", children: /* @__PURE__ */ jsx106(
|
|
33043
32765
|
"div",
|
|
33044
32766
|
{
|
|
33045
32767
|
className: `border-y h-full border-solid border-[#dbe0e6] rounded-[10px] relative w-full overflow-hidden`,
|
|
33046
|
-
children: /* @__PURE__ */
|
|
32768
|
+
children: /* @__PURE__ */ jsx106("div", { className: "flex flex-col gap-[16px] w-full h-full", children: /* @__PURE__ */ jsx106("div", { className: `relative w-full h-full`, children: /* @__PURE__ */ jsx106(
|
|
33047
32769
|
"div",
|
|
33048
32770
|
{
|
|
33049
32771
|
className: `flex w-full items-center h-full overflow-auto `,
|
|
33050
|
-
children: /* @__PURE__ */
|
|
32772
|
+
children: /* @__PURE__ */ jsx106("div", { className: "w-full h-full max-w-full", children: /* @__PURE__ */ jsxs71(
|
|
33051
32773
|
"table",
|
|
33052
32774
|
{
|
|
33053
32775
|
className: `relative w-full bg-white custom-dropdown `,
|
|
33054
32776
|
children: [
|
|
33055
|
-
/* @__PURE__ */
|
|
32777
|
+
/* @__PURE__ */ jsx106(
|
|
33056
32778
|
TableHead,
|
|
33057
32779
|
{
|
|
33058
32780
|
columns,
|
|
@@ -33062,7 +32784,7 @@ var Many2ManyField = (props) => {
|
|
|
33062
32784
|
handleCheckBoxAll
|
|
33063
32785
|
}
|
|
33064
32786
|
),
|
|
33065
|
-
rows?.length > 0 ? /* @__PURE__ */
|
|
32787
|
+
rows?.length > 0 ? /* @__PURE__ */ jsx106(
|
|
33066
32788
|
TableBody,
|
|
33067
32789
|
{
|
|
33068
32790
|
tableGroupController,
|
|
@@ -33102,16 +32824,16 @@ var Many2ManyField = (props) => {
|
|
|
33102
32824
|
checkedAll,
|
|
33103
32825
|
context
|
|
33104
32826
|
}
|
|
33105
|
-
) : /* @__PURE__ */
|
|
32827
|
+
) : /* @__PURE__ */ jsx106("tr", { children: /* @__PURE__ */ jsx106(
|
|
33106
32828
|
"td",
|
|
33107
32829
|
{
|
|
33108
32830
|
className: "w-full",
|
|
33109
32831
|
colSpan: columns?.length + 2,
|
|
33110
|
-
children: /* @__PURE__ */
|
|
32832
|
+
children: /* @__PURE__ */ jsx106(
|
|
33111
32833
|
"div",
|
|
33112
32834
|
{
|
|
33113
32835
|
className: `flex flex-col items-center justify-center gap-3 py-6`,
|
|
33114
|
-
children: /* @__PURE__ */
|
|
32836
|
+
children: /* @__PURE__ */ jsx106(EmptyTable, {})
|
|
33115
32837
|
}
|
|
33116
32838
|
)
|
|
33117
32839
|
}
|
|
@@ -33122,9 +32844,9 @@ var Many2ManyField = (props) => {
|
|
|
33122
32844
|
}
|
|
33123
32845
|
) }) })
|
|
33124
32846
|
}
|
|
33125
|
-
) }) }) : /* @__PURE__ */
|
|
33126
|
-
/* @__PURE__ */
|
|
33127
|
-
isDisplayCheckbox && /* @__PURE__ */
|
|
32847
|
+
) }) }) : /* @__PURE__ */ jsx106(LayerLoading, {}),
|
|
32848
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex items-center gap-2 mt-auto", children: [
|
|
32849
|
+
isDisplayCheckbox && /* @__PURE__ */ jsx106(
|
|
33128
32850
|
"button",
|
|
33129
32851
|
{
|
|
33130
32852
|
disabled: selectedRowKeys?.length === 0,
|
|
@@ -33134,7 +32856,7 @@ var Many2ManyField = (props) => {
|
|
|
33134
32856
|
children: t3("choose")
|
|
33135
32857
|
}
|
|
33136
32858
|
),
|
|
33137
|
-
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */
|
|
32859
|
+
optionsObject && "no_create" in optionsObject && optionsObject?.no_create === false && /* @__PURE__ */ jsx106(
|
|
33138
32860
|
"button",
|
|
33139
32861
|
{
|
|
33140
32862
|
type: "button",
|
|
@@ -33150,7 +32872,7 @@ var Many2ManyField = (props) => {
|
|
|
33150
32872
|
children: t3("new")
|
|
33151
32873
|
}
|
|
33152
32874
|
),
|
|
33153
|
-
/* @__PURE__ */
|
|
32875
|
+
/* @__PURE__ */ jsx106(
|
|
33154
32876
|
"button",
|
|
33155
32877
|
{
|
|
33156
32878
|
type: "button",
|
|
@@ -33171,16 +32893,16 @@ var Many2ManyField = (props) => {
|
|
|
33171
32893
|
};
|
|
33172
32894
|
|
|
33173
32895
|
// src/widgets/basic/many2one-field/many2one.tsx
|
|
33174
|
-
import React18, { useEffect as
|
|
33175
|
-
import { Fragment as Fragment31, jsx as
|
|
32896
|
+
import React18, { useEffect as useEffect27 } from "react";
|
|
32897
|
+
import { Fragment as Fragment31, jsx as jsx107, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
33176
32898
|
var CustomMenuList2 = (props) => {
|
|
33177
32899
|
const { t: t3 } = useI18n();
|
|
33178
32900
|
const { options: options2, children, selectProps } = props;
|
|
33179
32901
|
const { setIsShowModalMany2Many, searchable } = selectProps;
|
|
33180
32902
|
const limitedChildren = React18.Children.toArray(children).slice(0, 10);
|
|
33181
|
-
return /* @__PURE__ */
|
|
32903
|
+
return /* @__PURE__ */ jsxs72(components.MenuList, { ...props, className: "z-[99]", children: [
|
|
33182
32904
|
limitedChildren,
|
|
33183
|
-
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */
|
|
32905
|
+
options2?.length > 0 && (options2?.length > 10 || searchable) && /* @__PURE__ */ jsxs72(
|
|
33184
32906
|
"button",
|
|
33185
32907
|
{
|
|
33186
32908
|
type: "button",
|
|
@@ -33223,14 +32945,14 @@ var Many2OneField = (props) => {
|
|
|
33223
32945
|
const { t: t3 } = useI18n();
|
|
33224
32946
|
if (!isForm && !isEditTable) {
|
|
33225
32947
|
const id = propValue && typeof propValue === "object" && "id" in propValue ? propValue?.id : propValue;
|
|
33226
|
-
return /* @__PURE__ */
|
|
32948
|
+
return /* @__PURE__ */ jsxs72(Fragment31, { children: [
|
|
33227
32949
|
allowShowDetail && renderDetail({
|
|
33228
32950
|
idToolTip: String(name2) + Number(index4),
|
|
33229
32951
|
model: options2?.model ?? relation,
|
|
33230
32952
|
context: contextObject,
|
|
33231
32953
|
idForm: id
|
|
33232
32954
|
}),
|
|
33233
|
-
/* @__PURE__ */
|
|
32955
|
+
/* @__PURE__ */ jsx107(
|
|
33234
32956
|
"span",
|
|
33235
32957
|
{
|
|
33236
32958
|
className: "cursor-pointer",
|
|
@@ -33241,20 +32963,20 @@ var Many2OneField = (props) => {
|
|
|
33241
32963
|
)
|
|
33242
32964
|
] });
|
|
33243
32965
|
}
|
|
33244
|
-
return /* @__PURE__ */
|
|
32966
|
+
return /* @__PURE__ */ jsxs72(Fragment31, { children: [
|
|
33245
32967
|
allowShowDetail && renderDetail({
|
|
33246
32968
|
idToolTip: String(name2),
|
|
33247
32969
|
model: options2?.model ?? relation,
|
|
33248
32970
|
context: contextObject,
|
|
33249
32971
|
idForm: methods?.getValues(name2)?.id || methods?.getValues(name2)
|
|
33250
32972
|
}),
|
|
33251
|
-
/* @__PURE__ */
|
|
32973
|
+
/* @__PURE__ */ jsx107(
|
|
33252
32974
|
"div",
|
|
33253
32975
|
{
|
|
33254
32976
|
id: name2,
|
|
33255
32977
|
"data-tooltip-id": name2,
|
|
33256
32978
|
className: `inline-block w-full h-full ${readonly && "cursor-not-allowed"}`,
|
|
33257
|
-
children: /* @__PURE__ */
|
|
32979
|
+
children: /* @__PURE__ */ jsx107(
|
|
33258
32980
|
Controller,
|
|
33259
32981
|
{
|
|
33260
32982
|
name: name2 ?? "",
|
|
@@ -33274,13 +32996,13 @@ var Many2OneField = (props) => {
|
|
|
33274
32996
|
const selectedOption = isForm && options2?.service && options2?.type && options2?.model ? tempSelectedOption : tempSelectedOption && options2?.length > 0 ? options2.find(
|
|
33275
32997
|
(option) => option.value === tempSelectedOption?.value
|
|
33276
32998
|
) : currentValue ? currentValue : null;
|
|
33277
|
-
|
|
32999
|
+
useEffect27(() => {
|
|
33278
33000
|
if (error2 && selectedOption) {
|
|
33279
33001
|
methods?.clearErrors(name2);
|
|
33280
33002
|
}
|
|
33281
33003
|
}, [selectedOption]);
|
|
33282
|
-
return /* @__PURE__ */
|
|
33283
|
-
/* @__PURE__ */
|
|
33004
|
+
return /* @__PURE__ */ jsxs72("div", { className: "h-full", children: [
|
|
33005
|
+
/* @__PURE__ */ jsx107(
|
|
33284
33006
|
StateManagedSelect$1,
|
|
33285
33007
|
{
|
|
33286
33008
|
menuShouldScrollIntoView: false,
|
|
@@ -33356,7 +33078,7 @@ var Many2OneField = (props) => {
|
|
|
33356
33078
|
})
|
|
33357
33079
|
},
|
|
33358
33080
|
components: {
|
|
33359
|
-
MenuList: (menuListProps) => /* @__PURE__ */
|
|
33081
|
+
MenuList: (menuListProps) => /* @__PURE__ */ jsx107(
|
|
33360
33082
|
CustomMenuList2,
|
|
33361
33083
|
{
|
|
33362
33084
|
...menuListProps,
|
|
@@ -33367,13 +33089,13 @@ var Many2OneField = (props) => {
|
|
|
33367
33089
|
}
|
|
33368
33090
|
),
|
|
33369
33091
|
IndicatorSeparator: () => null,
|
|
33370
|
-
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */
|
|
33092
|
+
DropdownIndicator: (props2) => readonly ? null : /* @__PURE__ */ jsx107(components.DropdownIndicator, { ...props2 })
|
|
33371
33093
|
},
|
|
33372
33094
|
isDisabled: readonly,
|
|
33373
33095
|
noOptionsMessage: () => t3(isFetching ? "loading" : "no-available")
|
|
33374
33096
|
}
|
|
33375
33097
|
),
|
|
33376
|
-
!isEditTable && error2 && /* @__PURE__ */
|
|
33098
|
+
!isEditTable && error2 && /* @__PURE__ */ jsx107("p", { className: "text-[#de4747] text-sm mt-1", children: error2.message })
|
|
33377
33099
|
] });
|
|
33378
33100
|
}
|
|
33379
33101
|
}
|
|
@@ -33384,7 +33106,7 @@ var Many2OneField = (props) => {
|
|
|
33384
33106
|
};
|
|
33385
33107
|
|
|
33386
33108
|
// src/widgets/basic/status-bar-field/duration/duration.tsx
|
|
33387
|
-
import { jsx as
|
|
33109
|
+
import { jsx as jsx108, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
33388
33110
|
var StatusbarDurationField = (props) => {
|
|
33389
33111
|
const {
|
|
33390
33112
|
disabled,
|
|
@@ -33394,14 +33116,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33394
33116
|
defaultValue,
|
|
33395
33117
|
setModalStatus
|
|
33396
33118
|
} = props;
|
|
33397
|
-
return /* @__PURE__ */
|
|
33119
|
+
return /* @__PURE__ */ jsx108(
|
|
33398
33120
|
"div",
|
|
33399
33121
|
{
|
|
33400
33122
|
className: `w-full items-center rounded-[10px] !flex flex-col-reverse justify-center lg:!justify-end lg:!flex-row gap-y-[15px]`,
|
|
33401
|
-
children: /* @__PURE__ */
|
|
33402
|
-
/* @__PURE__ */
|
|
33123
|
+
children: /* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-[24px]", children: [
|
|
33124
|
+
/* @__PURE__ */ jsx108("div", { className: "flex items-center", children: dataResponse && dataResponse?.records?.filter((item) => !item?.fold || item.id == defaultValue)?.map((option, index4) => {
|
|
33403
33125
|
const value = option?.id === defaultValue;
|
|
33404
|
-
return /* @__PURE__ */
|
|
33126
|
+
return /* @__PURE__ */ jsxs73(
|
|
33405
33127
|
"label",
|
|
33406
33128
|
{
|
|
33407
33129
|
onClick: () => !disabled && handleClick(option.id),
|
|
@@ -33411,7 +33133,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33411
33133
|
${index4 === dataResponse?.records?.length - 1 ? "rounded-r-xl" : "rounded-none"}
|
|
33412
33134
|
`,
|
|
33413
33135
|
children: [
|
|
33414
|
-
/* @__PURE__ */
|
|
33136
|
+
/* @__PURE__ */ jsx108(
|
|
33415
33137
|
"input",
|
|
33416
33138
|
{
|
|
33417
33139
|
type: "radio",
|
|
@@ -33421,7 +33143,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33421
33143
|
}
|
|
33422
33144
|
),
|
|
33423
33145
|
option?.name,
|
|
33424
|
-
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */
|
|
33146
|
+
index4 !== dataResponse?.records?.length - 1 && /* @__PURE__ */ jsx108(
|
|
33425
33147
|
"div",
|
|
33426
33148
|
{
|
|
33427
33149
|
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]
|
|
@@ -33436,14 +33158,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33436
33158
|
}) }),
|
|
33437
33159
|
dataResponse?.records?.some(
|
|
33438
33160
|
(item) => item?.fold && item.id !== defaultValue
|
|
33439
|
-
) && /* @__PURE__ */
|
|
33161
|
+
) && /* @__PURE__ */ jsxs73(
|
|
33440
33162
|
"div",
|
|
33441
33163
|
{
|
|
33442
33164
|
onClick: () => setModalStatus(!modelStatus),
|
|
33443
33165
|
className: "w-[24px] h-[24px] cursor-pointer relative",
|
|
33444
33166
|
children: [
|
|
33445
|
-
/* @__PURE__ */
|
|
33446
|
-
modelStatus && /* @__PURE__ */
|
|
33167
|
+
/* @__PURE__ */ jsx108(MoreIcon, {}),
|
|
33168
|
+
modelStatus && /* @__PURE__ */ jsx108(
|
|
33447
33169
|
"div",
|
|
33448
33170
|
{
|
|
33449
33171
|
onClick: (e3) => e3.stopPropagation(),
|
|
@@ -33452,7 +33174,7 @@ var StatusbarDurationField = (props) => {
|
|
|
33452
33174
|
(item) => item?.fold && item.id !== defaultValue
|
|
33453
33175
|
)?.map((option) => {
|
|
33454
33176
|
const value = option?.id === defaultValue;
|
|
33455
|
-
return /* @__PURE__ */
|
|
33177
|
+
return /* @__PURE__ */ jsx108(
|
|
33456
33178
|
"div",
|
|
33457
33179
|
{
|
|
33458
33180
|
className: `py-[4px] px-[16px] hover:bg-[#f8f9f9] ${value ? "bg-primary" : "bg-[#F1F6F1]"}`,
|
|
@@ -33474,14 +33196,14 @@ var StatusbarDurationField = (props) => {
|
|
|
33474
33196
|
|
|
33475
33197
|
// src/widgets/basic/status-bar-field/option/option.tsx
|
|
33476
33198
|
import { useMemo as useMemo11 } from "react";
|
|
33477
|
-
import { Fragment as Fragment32, jsx as
|
|
33199
|
+
import { Fragment as Fragment32, jsx as jsx109, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
33478
33200
|
var StatusBarOptionField = (props) => {
|
|
33479
33201
|
const { selection, defaultValue } = props;
|
|
33480
33202
|
const memoizedStatusOptions = useMemo11(() => selection, [selection]);
|
|
33481
33203
|
const indexInProgress = memoizedStatusOptions?.findIndex(
|
|
33482
33204
|
(option) => option?.[0] === defaultValue
|
|
33483
33205
|
);
|
|
33484
|
-
return /* @__PURE__ */
|
|
33206
|
+
return /* @__PURE__ */ jsx109(
|
|
33485
33207
|
"div",
|
|
33486
33208
|
{
|
|
33487
33209
|
style: {
|
|
@@ -33490,8 +33212,8 @@ var StatusBarOptionField = (props) => {
|
|
|
33490
33212
|
flexWrap: "wrap"
|
|
33491
33213
|
},
|
|
33492
33214
|
children: memoizedStatusOptions?.map((option, index4) => {
|
|
33493
|
-
return /* @__PURE__ */
|
|
33494
|
-
/* @__PURE__ */
|
|
33215
|
+
return /* @__PURE__ */ jsxs74(Fragment32, { children: [
|
|
33216
|
+
/* @__PURE__ */ jsxs74(
|
|
33495
33217
|
"div",
|
|
33496
33218
|
{
|
|
33497
33219
|
style: {
|
|
@@ -33509,7 +33231,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33509
33231
|
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" : ""
|
|
33510
33232
|
},
|
|
33511
33233
|
children: [
|
|
33512
|
-
/* @__PURE__ */
|
|
33234
|
+
/* @__PURE__ */ jsx109(
|
|
33513
33235
|
"span",
|
|
33514
33236
|
{
|
|
33515
33237
|
style: {
|
|
@@ -33521,10 +33243,10 @@ var StatusBarOptionField = (props) => {
|
|
|
33521
33243
|
alignItems: "center",
|
|
33522
33244
|
borderRadius: "100%"
|
|
33523
33245
|
},
|
|
33524
|
-
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */
|
|
33246
|
+
children: index4 < indexInProgress || indexInProgress === memoizedStatusOptions?.length - 1 ? /* @__PURE__ */ jsx109(ICCheck, {}) : index4 === indexInProgress ? /* @__PURE__ */ jsx109(ICCircle, {}) : /* @__PURE__ */ jsx109(ICMinus, {})
|
|
33525
33247
|
}
|
|
33526
33248
|
),
|
|
33527
|
-
/* @__PURE__ */
|
|
33249
|
+
/* @__PURE__ */ jsx109(
|
|
33528
33250
|
"span",
|
|
33529
33251
|
{
|
|
33530
33252
|
style: {
|
|
@@ -33537,7 +33259,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33537
33259
|
},
|
|
33538
33260
|
option?.[0]
|
|
33539
33261
|
),
|
|
33540
|
-
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */
|
|
33262
|
+
!(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx109(
|
|
33541
33263
|
"div",
|
|
33542
33264
|
{
|
|
33543
33265
|
style: {
|
|
@@ -33553,7 +33275,7 @@ var StatusBarOptionField = (props) => {
|
|
|
33553
33275
|
);
|
|
33554
33276
|
};
|
|
33555
33277
|
var ICMinus = () => {
|
|
33556
|
-
return /* @__PURE__ */
|
|
33278
|
+
return /* @__PURE__ */ jsx109(
|
|
33557
33279
|
"svg",
|
|
33558
33280
|
{
|
|
33559
33281
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33561,7 +33283,7 @@ var ICMinus = () => {
|
|
|
33561
33283
|
height: "16",
|
|
33562
33284
|
viewBox: "0 0 16 16",
|
|
33563
33285
|
fill: "none",
|
|
33564
|
-
children: /* @__PURE__ */
|
|
33286
|
+
children: /* @__PURE__ */ jsx109(
|
|
33565
33287
|
"path",
|
|
33566
33288
|
{
|
|
33567
33289
|
d: "M4 8H12",
|
|
@@ -33575,7 +33297,7 @@ var ICMinus = () => {
|
|
|
33575
33297
|
);
|
|
33576
33298
|
};
|
|
33577
33299
|
var ICCircle = () => {
|
|
33578
|
-
return /* @__PURE__ */
|
|
33300
|
+
return /* @__PURE__ */ jsx109(
|
|
33579
33301
|
"svg",
|
|
33580
33302
|
{
|
|
33581
33303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33583,12 +33305,12 @@ var ICCircle = () => {
|
|
|
33583
33305
|
height: "8",
|
|
33584
33306
|
viewBox: "0 0 8 8",
|
|
33585
33307
|
fill: "none",
|
|
33586
|
-
children: /* @__PURE__ */
|
|
33308
|
+
children: /* @__PURE__ */ jsx109("circle", { cx: "4", cy: "4", r: "4", fill: "white" })
|
|
33587
33309
|
}
|
|
33588
33310
|
);
|
|
33589
33311
|
};
|
|
33590
33312
|
var ICCheck = () => {
|
|
33591
|
-
return /* @__PURE__ */
|
|
33313
|
+
return /* @__PURE__ */ jsx109(
|
|
33592
33314
|
"svg",
|
|
33593
33315
|
{
|
|
33594
33316
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -33596,7 +33318,7 @@ var ICCheck = () => {
|
|
|
33596
33318
|
height: "16",
|
|
33597
33319
|
viewBox: "0 0 16 16",
|
|
33598
33320
|
fill: "none",
|
|
33599
|
-
children: /* @__PURE__ */
|
|
33321
|
+
children: /* @__PURE__ */ jsx109(
|
|
33600
33322
|
"path",
|
|
33601
33323
|
{
|
|
33602
33324
|
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",
|
|
@@ -33610,7 +33332,7 @@ var ICCheck = () => {
|
|
|
33610
33332
|
};
|
|
33611
33333
|
|
|
33612
33334
|
// src/widgets/basic/date-option-field/date-option.tsx
|
|
33613
|
-
import { jsx as
|
|
33335
|
+
import { jsx as jsx110, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
33614
33336
|
var DateOptionField = (props) => {
|
|
33615
33337
|
const {
|
|
33616
33338
|
name: name2,
|
|
@@ -33621,19 +33343,19 @@ var DateOptionField = (props) => {
|
|
|
33621
33343
|
string,
|
|
33622
33344
|
onChange: onChange2
|
|
33623
33345
|
} = props;
|
|
33624
|
-
return /* @__PURE__ */
|
|
33346
|
+
return /* @__PURE__ */ jsx110(
|
|
33625
33347
|
Controller,
|
|
33626
33348
|
{
|
|
33627
33349
|
name: name2 ?? "",
|
|
33628
33350
|
control: methods?.control,
|
|
33629
|
-
render: ({ field }) => /* @__PURE__ */
|
|
33351
|
+
render: ({ field }) => /* @__PURE__ */ jsxs75(
|
|
33630
33352
|
"label",
|
|
33631
33353
|
{
|
|
33632
33354
|
className: `cursor-pointer mr-2 w-[50px] flex items-center justify-center p-[4px] border rounded-md text-sm
|
|
33633
33355
|
${field.value ? "bg-primary text-white border-primary" : "bg-white text-black border-[#f7f7f7]"}
|
|
33634
33356
|
${readonly ? "opacity-50 pointer-events-none" : ""}`,
|
|
33635
33357
|
children: [
|
|
33636
|
-
/* @__PURE__ */
|
|
33358
|
+
/* @__PURE__ */ jsx110(
|
|
33637
33359
|
"input",
|
|
33638
33360
|
{
|
|
33639
33361
|
type: "checkbox",
|
|
@@ -33700,7 +33422,6 @@ export {
|
|
|
33700
33422
|
RadioGroupField,
|
|
33701
33423
|
RatingStarField,
|
|
33702
33424
|
RemainingDaysField,
|
|
33703
|
-
RenderFiles,
|
|
33704
33425
|
Row,
|
|
33705
33426
|
Search,
|
|
33706
33427
|
SelectDropdownField,
|